jhrmnn / pyberny

Molecular structure optimizer
Mozilla Public License 2.0
110 stars 21 forks source link

Python2 import error #1

Closed andersx closed 7 years ago

andersx commented 7 years ago

Hi, import works fine under Python3, but I get the following error from Python2

>>> import berny
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/andersx/.local/lib/python2.7/site-packages/berny/__init__.py", line 1, in <module>
    from .berny import Berny, Logger
  File "/home/andersx/.local/lib/python2.7/site-packages/berny/berny.py", line 22
    def __call__(self, *lines, level=0):
                                   ^
SyntaxError: invalid syntax

/Anders

andersx commented 7 years ago

Thanks, that was quick! :)

jhrmnn commented 7 years ago

Hi, thanks. Easy to forget these things do not work in Python 2.

Btw, here's a Jupyter notebook using pyscf to optimize a methane molecule. Long-term, I'd like to have some robust testing framework, but there's nothing like that for now.

Also, I'm sure you'll encounter problems very soon. Please, think of it more as a work-in-progress.