Skip to content

Commit

Permalink
run latest openmmff version (#905)
Browse files Browse the repository at this point in the history
* run latest openmmff version

* remove duplicated runner

* Update test_openmm_plain_md_protocols.py

* Update test_openmm_equil_rfe_protocols.py

---------

Co-authored-by: Irfan Alibay <[email protected]>
  • Loading branch information
mikemhenry and IAlibay authored Jul 31, 2024
1 parent ba4d892 commit 64f615e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 58 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- "3.11"
- "3.12"
openeye: ["no"]
ommff-version: [">0.13"]
include:
- os: "macos-12"
python-version: "3.12"
Expand All @@ -53,11 +52,6 @@ jobs:
python-version: "3.11"
pydantic-version: ">1"
openeye: "yes"
- os: "ubuntu-latest"
python-version: "3.10"
pydantic-version: ">1"
openeye: "no"
ommff-version: "0.13"
- os: "macos-latest"
python-version: "3.12"
pydantic-version: ">1"
Expand Down Expand Up @@ -88,7 +82,6 @@ jobs:
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic-version }}
openmmforcefields=${{ matrix.ommff-version }}
init-shell: bash

- name: "Install OpenEye"
Expand Down
27 changes: 1 addition & 26 deletions openfe/tests/protocols/test_openmm_equil_rfe_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,32 +244,7 @@ def test_dry_run_gaff_vacuum(benzene_vacuum_system, toluene_vacuum_system,
mapping=benzene_to_toluene_mapping,
)
unit = list(dag.protocol_units)[0]

# If we do a lot of GAFF testing, this should be refactored so we don't
# have to copy it all over the place.
# https://github.com/OpenFreeEnergy/openfe/pull/847#issuecomment-2096810453


import openmmforcefields
from packaging import version

ommff_version = openmmforcefields.__version__

gaff_should_fail = version.parse(
ommff_version
) == version.parse("0.13.0")

if gaff_should_fail:
from openmmforcefields.generators.template_generators import (
GAFFNotSupportedError,
)

with pytest.raises(GAFFNotSupportedError):
with tmpdir.as_cwd():
sampler = unit.run(dry=True)["debug"]["sampler"]
else:
with tmpdir.as_cwd():
sampler = unit.run(dry=True)["debug"]["sampler"]
sampler = unit.run(dry=True)["debug"]["sampler"]


@pytest.mark.slow
Expand Down
26 changes: 1 addition & 25 deletions openfe/tests/protocols/test_openmm_plain_md_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,31 +176,7 @@ def test_dry_run_gaff_vacuum(benzene_vacuum_system, tmpdir):
mapping=None,
)
unit = list(dag.protocol_units)[0]

# If we do a lot of GAFF testing, this should be refactored so we don't
# have to copy it all over the place.
# https://github.com/OpenFreeEnergy/openfe/pull/847#issuecomment-2096810453

import openmmforcefields
from packaging import version

ommff_version = openmmforcefields.__version__

gaff_should_fail = version.parse(
ommff_version
) == version.parse("0.13.0")

if gaff_should_fail:
from openmmforcefields.generators.template_generators import (
GAFFNotSupportedError,
)

with pytest.raises(GAFFNotSupportedError):
with tmpdir.as_cwd():
system = unit.run(dry=True)["debug"]["system"]
else:
with tmpdir.as_cwd():
system = unit.run(dry=True)["debug"]["system"]
system = unit.run(dry=True)["debug"]["system"]


@pytest.mark.parametrize('method, backend, ref_key', [
Expand Down

0 comments on commit 64f615e

Please sign in to comment.