Closed mquevill closed 3 years ago
Hi,
yes, we are constantly making changes to the keyfile, especially in databaseparser, so I have not been able to get back to unittesting at the moment. The way I intended it to work was to have example key file match newly generated keyfile, however, we would have to keep updating example keyfile everytime I make changes to parameterization....
On Fri, Feb 26, 2021 at 12:06 PM Michael Quevillon notifications@github.com wrote:
NOTE
This PR probably needs a whole lot of testing to make sure it works in all/most cases, but I was able to run the following examples with it: SymmetryMethane, SymmetryMethylamine, SymmetryTriMethylPhosphate Changelog
-
More verbose way of importing the package with from openbabel import openbabel
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#python-module
Exact replacement of OBBitVec::BitIsOn() --> OBBitVec::BitIsSet()
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html?highlight=BitIsOn#removal-of-deprecated-methods
Exact replacement of OBBond::GetBO() --> OBBond::GetBondOrder()
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html?highlight=GetBO#removal-of-deprecated-methods
When OBAtom::GetValence(), was called, it actually returns the degree. This would give the exact replacement of OBAtom::GetValence() --> OBAtom::GetExplicitDegree(). I renamed some variables from val to deg, to note these changes.
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#obatom-valence-and-degree-methods
There is no longer a need to call OBElementTable, since we can use GetSymbol() directly.
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#handling-of-elements-and-related-information
I've tried to replace hard-coded atomic numbers with OpenBabel's constants to make it more clear what is being compared (== 1 is more cryptic than == openbabel.H). I may have missed some, but this doesn't change any of the behavior.
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#handling-of-elements-and-related-information
Improved iterating on OBAtom::OBAtomAtomIter().
Manually specified openbabel>=3.0.0 in the Conda environment file, since these changes are incompatible with OpenBabel v2. (Python version does not need to be explicitly set, since this was to avoid OpenBabel v3 previously.)
Fixes #6 https://github.com/pren/poltype/pull/6. Fixes #8 https://github.com/pren/poltype/issues/8.
You can view, comment on, or merge this pull request online at:
https://github.com/pren/poltype/pull/86 Commit Summary
- Use OpenBabel v3+
File Changes
- M PoltypeModules/databaseparser.py https://github.com/pren/poltype/pull/86/files#diff-8eb38930c267a719160760f86794cf8708fda3d79fe1c29a011cdda6136460e2 (36)
- M PoltypeModules/electrostaticpotential.py https://github.com/pren/poltype/pull/86/files#diff-22dce1b44ec64c6d7fe67a9ec2ffe0d38b1f5e9381640960dc20048a9a95004b (5)
- M PoltypeModules/fragmenter.py https://github.com/pren/poltype/pull/86/files#diff-49cda568886ce0f00a24b182df150fbbd8c4151ebc9bfa41102a7767ff7856c5 (20)
- M PoltypeModules/modifiedresidues.py https://github.com/pren/poltype/pull/86/files#diff-14174b167013ad09217f3f2e4c2a3c6f26ed6af25f205c127b181bd48e86782d (61)
- M PoltypeModules/multipole.py https://github.com/pren/poltype/pull/86/files#diff-b800171d01c60e9347b8df77ff6096f7d5de45d9a8590a6ea7e1e078e5f8c8ba (60)
- M PoltypeModules/optimization.py https://github.com/pren/poltype/pull/86/files#diff-d0e41bfd8f3d198e8fb0da5f084bf0c10e7c28cfdf9a81cb3e80805782b4477b (9)
- M PoltypeModules/poltype.py https://github.com/pren/poltype/pull/86/files#diff-93c1dadc4915faa2b711bea9a9de1dff21798aca0bb3a544be8e23764d8cafc1 (2)
- M PoltypeModules/rings.py https://github.com/pren/poltype/pull/86/files#diff-10debaf8e5bc5f773b4bbc002faad414a9b61f835881df2e96c11874e9047290 (20)
- M PoltypeModules/symmetry.py https://github.com/pren/poltype/pull/86/files#diff-639d78e23db0f2f63d0ff8d50194081fca7ed07cb872061babf807a10b5c27b4 (11)
- M PoltypeModules/torsiongenerator.py https://github.com/pren/poltype/pull/86/files#diff-13fa453bbe706cc828ab728e9870c2502dd84112ffeec4f66b557eb8c4252199 (74)
- M PoltypeModules/vdwfit.py https://github.com/pren/poltype/pull/86/files#diff-fd0f98156c563bca89b9f7eb537761b16540414632e80269a8a855e10929f024 (17)
- M environment.yml https://github.com/pren/poltype/pull/86/files#diff-9efd195f4e9bfb79ccd456a1d8370fafcc4bcb0b00ea3799222667d2ae818533 (4)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pren/poltype/pull/86, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNB26L3Z3LRLZHQTBQRIADTA7PETANCNFSM4YI3266Q .
NOTE
This PR probably needs a whole lot of testing to make sure it works in all/most cases, but I was able to run the following examples with it: SymmetryMethane, SymmetryMethylamine, SymmetryTriMethylPhosphate
Changelog
More verbose way of importing the package with
from openbabel import openbabel
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#python-moduleExact replacement of
OBBitVec::BitIsOn() --> OBBitVec::BitIsSet()
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html?highlight=BitIsOn#removal-of-deprecated-methodsExact replacement of
OBBond::GetBO() --> OBBond::GetBondOrder()
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html?highlight=GetBO#removal-of-deprecated-methodsWhen
OBAtom::GetValence()
, was called, it actually returns the degree. This would give the exact replacement ofOBAtom::GetValence() --> OBAtom::GetExplicitDegree()
. I renamed some variables fromval
todeg
, to note these changes. https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#obatom-valence-and-degree-methodsThere is no longer a need to call
OBElementTable
, since we can useGetSymbol()
directly. https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#handling-of-elements-and-related-informationI've tried to replace hard-coded atomic numbers with OpenBabel's constants to make it more clear what is being compared (
== 1
is more cryptic than== openbabel.H
). I may have missed some, but this doesn't change any of the behavior. https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#handling-of-elements-and-related-informationImproved iterating on
OBAtom::OBAtomAtomIter()
.Manually specified
openbabel>=3.0.0
in the Conda environment file, since these changes are incompatible with OpenBabel v2. (Python version does not need to be explicitly set, since this was to avoid OpenBabel v3 previously.)Fixes #6. Fixes #8.