Skip to content

Commit

Permalink
pin foyer and ffutils version (#694)
Browse files Browse the repository at this point in the history
* pin foyer and ffutils version

* Add some tests and fix precommit error
  • Loading branch information
daico007 authored Sep 14, 2022
1 parent 1e5a606 commit 24d579c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
15 changes: 7 additions & 8 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ dependencies:
- pydantic>1.8
- networkx
- pytest
- mbuild >= 0.11.0
- openbabel >= 3.0.0
- foyer >= 0.11.1
- gsd >= 2.0
- parmed >= 3.4.3
- mbuild>=0.11.0
- openbabel>=3.0.0
- foyer>=0.11.3
- forcefield-utilities>=0.2.1
- gsd>=2.0
- parmed>=3.4.3
- pytest-cov
- codecov
- bump2version
- matplotlib
- ipywidgets
- ele >= 0.2.0
- ele>=0.2.0
- pre-commit
- pip:
- "--editable=git+https://github.com/mosdef-hub/forcefield-utilities.git#egg=forcefield-utilities"
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dependencies:
- lxml
- pydantic>1.8
- networkx
- ele >= 0.2.0
- forcefield-utilities
- ele>=0.2.0
- foyer>=0.11.3
- forcefield-utilities>=0.2.1
13 changes: 13 additions & 0 deletions gmso/tests/test_forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from gmso.exceptions import (
ForceFieldError,
ForceFieldParseError,
GMSOError,
MissingAtomTypesError,
MissingPotentialError,
)
Expand Down Expand Up @@ -658,3 +659,15 @@ def test_valid_sequence(self):
def test_deprecated_gmso(self):
with pytest.warns(DeprecationWarning):
ForceField(get_path("ff-example0.xml"), backend="gmso")

def test_not_supoprted_backend(self, opls_ethane_foyer):
# Unsupported ff parser backend
with pytest.raises(GMSOError):
ForceField(get_path("ff-example0.xml"), backend="bogus")

# Unsupported ff writer backend
with pytest.raises(NotImplementedError):
opls_ethane_foyer.to_xml("test_xml_writer.xml", backend="ffutils")

with pytest.raises(GMSOError):
opls_ethane_foyer.to_xml("test_xml_writer.xml", backend="bogus")
1 change: 1 addition & 0 deletions gmso/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __call__(self, cls):


def deprecate_kwargs(deprecated_kwargs=None):
"""Decorate functions with deprecated/deprecating kwargs."""
if deprecated_kwargs is None:
deprecated_kwargs = set()

Expand Down

0 comments on commit 24d579c

Please sign in to comment.