pren / poltype

POLTYPE: AMOEBA parametrization tool
https://pren.github.io/poltype
Other
4 stars 11 forks source link

Use OpenBabel v3+ #86

Closed mquevill closed 3 years ago

mquevill commented 3 years ago

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

Fixes #6. Fixes #8.

misterbrandonwalker commented 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

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 .