Skip to content

Commit

Permalink
Merge pull request #145 from martimunicoy/devel
Browse files Browse the repository at this point in the history
1.3.2 Release
  • Loading branch information
martimunicoy committed Jun 10, 2021
2 parents d21a852 + 839ce7b commit b60a28e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion devtools/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requirements:
- networkx
- rdkit
- ambertools
- openforcefield==0.8.3
- openff-toolkit==0.9.2

about:
home: https://github.com/martimunicoy/peleffy
Expand Down
4 changes: 2 additions & 2 deletions devtools/envs/standard.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: standard
channels:
- conda-forge
- omnia

dependencies:
- python
Expand All @@ -11,6 +10,7 @@ dependencies:
- pytest-cov
- codecov
- coverage < 5.0
- ipython
- ambertools
- rdkit
- openforcefield ==0.8.3
- openff-toolkit==0.9.2
12 changes: 11 additions & 1 deletion docs/releasehistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Releases follow the ``major.minor.micro`` scheme recommended by `PEP440 <https:/
* ``micro`` increments represent bugfix releases or improvements in documentation


1.3.2 - Migration and support for openff.toolkit
---------------------------------------------------------

This is a micro release of peleffy that includes a migration to openff.toolkit to support future releases.

New features
""""""""""""
- `PR #144 <https://github.com/martimunicoy/peleffy/pull/144>`_: Migrated openforcefield imports to openff.toolkit


1.3.1 - PELE Platform support
-----------------------------

Expand All @@ -19,7 +29,7 @@ New features

Bugfixes
""""""""
- Minor error when parsing Impact templates.
- `PR #143 <https://github.com/martimunicoy/peleffy/pull/143>`_: Minor error when parsing Impact templates.


1.3.0 - BCE conformations and automatic heteromolecules extraction
Expand Down
4 changes: 2 additions & 2 deletions peleffy/tests/test_molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def test_undefined_stereo(self):
It checks the behaviour when ignoring the stereochemistry
in the Molecule initialization.
"""
from openforcefield.utils.toolkits import UndefinedStereochemistryError
from openff.toolkit.utils.toolkits import UndefinedStereochemistryError
from peleffy.forcefield import OpenForceField

# This should crash due to an undefined stereochemistry error
Expand Down Expand Up @@ -328,7 +328,7 @@ def test_from_openff(self):
It checks the initialization of a peleffy Molecule from an OpenFF
molecular representation.
"""
from openforcefield.topology import Molecule as OpenFFMolecule
from openff.toolkit.topology import Molecule as OpenFFMolecule

openff_molecule = OpenFFMolecule.from_smiles('C(C(=O)[O-])C(=O)[OH]')

Expand Down
2 changes: 1 addition & 1 deletion peleffy/topology/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, path=None, smiles=None, pdb_block=None,
from qcportal and the Open Force Field Toolkit)
>>> import qcportal as ptl
>>> from openforcefield.topology import Molecule as OFFMolecule
>>> from openff.toolkit.topology import Molecule as OFFMolecule
>>> ds = client.get_collection('OptimizationDataset',
'Kinase Inhibitors: WBO Distributions')
Expand Down
12 changes: 6 additions & 6 deletions peleffy/utils/toolkits.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ def is_available():
True if OpenForceField is installed, False otherwise.
"""
try:
importlib.import_module('openforcefield')
importlib.import_module('openff.toolkit')
return True
except ImportError:
return False
Expand All @@ -802,7 +802,7 @@ def from_rdkit(self, molecule):
molecule : an openforcefield.topology.Molecule object
The OpenForceField's Molecule
"""
from openforcefield.topology.molecule import Molecule
from openff.toolkit.topology.molecule import Molecule

rdkit_molecule = molecule.rdkit_molecule
return Molecule.from_rdkit(
Expand All @@ -825,7 +825,7 @@ def get_forcefield(self, forcefield_name):
object
The OpenForceField's forcefield
"""
from openforcefield.typing.engines.smirnoff import ForceField
from openff.toolkit.typing.engines.smirnoff import ForceField

if isinstance(forcefield_name, str):
forcefield = ForceField(forcefield_name)
Expand All @@ -852,8 +852,8 @@ def get_parameters_from_forcefield(self, forcefield, molecule):
openforcefield_parameters : dict
The OpenFF parameters stored in a dict keyed by parameter type
"""
from openforcefield.typing.engines.smirnoff import ForceField
from openforcefield.topology import Topology
from openff.toolkit.typing.engines.smirnoff import ForceField
from openff.toolkit.topology import Topology

off_molecule = molecule.off_molecule
topology = Topology.from_molecules([off_molecule])
Expand Down Expand Up @@ -892,7 +892,7 @@ def get_parameter_handler_from_forcefield(self, parameter_handler_name,
object
The ParameterHandler that was requested
"""
from openforcefield.typing.engines.smirnoff import ForceField
from openff.toolkit.typing.engines.smirnoff import ForceField

if isinstance(forcefield, str):
forcefield = ForceField(forcefield)
Expand Down

0 comments on commit b60a28e

Please sign in to comment.