Closed janjoswig closed 3 years ago
Hi everybody,
this PR wants to make the gmx2qmmm code compatible with the recent version of Python 3.9.0 alongside a few other changes.
A detailed description will follow, but here are the main changes:
I reorganized the project structure, so that gmx2qmmm becomes a proper Python package (setup.py, requirements.txt). This has the following advantages:
gmx2qmmm
imp.load_source
python -m gmx2qmmm.gmx2qmmm -flags
Dots have been removed from script names (e.g. "xyz_zmat_g16RevA_02.py") to make them importable
The deprecated compiler.ast.flatten has been replaced by gmx2qmmm._helper._flatten
compiler.ast.flatten
gmx2qmmm._helper._flatten
Some cosmetic changes to comply with PEP8 using Black reformatting
.gitignore file to exclude unnecessary files from the repo
Explicit module imports and calls (e.g. import numpy as np instead of from numpy import linalg as LA
import numpy as np
from numpy import linalg as LA
Replaced sort() by sorted()
sort()
sorted()
Parenthesis for print() calls
print()
...
Planned changes:
subprocess.call
subprocess.run
No actual changes have been made to the code base, so everything should still work as before (needs to be validated).
The examples (sp/opt) pass successfully with these changes.
Thx! I have created a new branch for your py3.9 version
Hi everybody,
this PR wants to make the gmx2qmmm code compatible with the recent version of Python 3.9.0 alongside a few other changes.
A detailed description will follow, but here are the main changes:
I reorganized the project structure, so that
gmx2qmmm
becomes a proper Python package (setup.py, requirements.txt). This has the following advantages:imp.load_source
procedure (deprecated in Python3)python -m gmx2qmmm.gmx2qmmm -flags
" from anywhere (no path maintenance)Dots have been removed from script names (e.g. "xyz_zmat_g16RevA_02.py") to make them importable
The deprecated
compiler.ast.flatten
has been replaced bygmx2qmmm._helper._flatten
Some cosmetic changes to comply with PEP8 using Black reformatting
.gitignore file to exclude unnecessary files from the repo
Explicit module imports and calls (e.g.
import numpy as np
instead offrom numpy import linalg as LA
Replaced
sort()
bysorted()
Parenthesis for
print()
calls...
Planned changes:
subprocess.call
by the recommendedsubprocess.run
No actual changes have been made to the code base, so everything should still work as before (needs to be validated).