Skip to content

Commit

Permalink
Fix nightly and conda CI (#1965)
Browse files Browse the repository at this point in the history
* fix gbsa test by relaxing tolerance

* see if gbsa tests pass using OpenMM 8.1

* skip external examples in conda tests due to parmed incompatibility

* tighten tolerance again

* see if tests pass on older macoses

* force use of reference platform

* re-enable test matrix

* skip bad bond test

* update nagl failure test mol to avoid success due to new lookup table

* Remove parmed and downpin nagl in conda tests

* update releasenotes

* revert slow test changes
  • Loading branch information
j-wags authored Nov 14, 2024
1 parent 8aa96bc commit 3d84c70
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,5 @@ jobs:
- name: Run example notebooks
run: |
python -m pytest -r fE -v -x --tb=short --nbval-lax --ignore=examples/deprecated examples
# External examples are temporarily skipped due to parmed incompatibility https://github.com/openforcefield/openff-toolkit/issues/1532
python -m pytest -r fE -v -x --tb=short --nbval-lax --ignore=examples/deprecated --ignore=examples/external examples
4 changes: 3 additions & 1 deletion devtools/conda-envs/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ dependencies:
- pytest=7.4
- pytest-rerunfailures
- nbval
- parmed=3
- openff-nagl=0.4
# https://github.com/openforcefield/openff-toolkit/issues/1532
#- parmed=3
4 changes: 3 additions & 1 deletion devtools/conda-envs/conda_oe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ dependencies:
- pytest=7.4
- pytest-rerunfailures
- nbval
- parmed=3
# https://github.com/openforcefield/openff-toolkit/issues/1532
# - parmed=3
- openff-nagl=0.4
6 changes: 6 additions & 0 deletions docs/releasehistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w

### Improved documentation and warnings

### Tests updated

- [PR #1965](https://github.com/openforcefield/openff-toolkit/pull/1965): Fixes slight difference in GBSA energy reported in [Issue #1964](https://github.com/openforcefield/openff-toolkit/issues/1964) by forcing the use of the Reference platform in OpenMM for both calculations.
- [PR #1965](https://github.com/openforcefield/openff-toolkit/pull/1965): Disables testing of parmed-dependent notebook in `external` examples, since ParmEd 3 is no longer compatible with our upstreams and ParmEd 4 raises an error for our use cases.
- [PR #1965](https://github.com/openforcefield/openff-toolkit/pull/1965): Uses a different molecule in test_nagl's test_unsupported_molecule_bond to avoid having molecule handled successfully by nagl's new lookup table.

## 0.16.6

### Behavior changes
Expand Down
2 changes: 1 addition & 1 deletion openff/toolkit/_tests/test_nagl.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_unsupported_molecule_element(self):
)

def test_unsupported_molecule_bond(self):
mol = Molecule.from_smiles("C=[Cl+1]")
mol = Molecule.from_smiles("CCC=[Cl+]")
err = re.escape("Molecule contains forbidden SMARTS pattern [#17:1]#,:,=[*:2]")
with pytest.raises(ValueError, match=err):
mol.assign_partial_charges(
Expand Down
5 changes: 3 additions & 2 deletions openff/toolkit/_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,9 @@ def compare_system_energies(

# Create Contexts and compare the energies.
integrator = openmm.VerletIntegrator(1.0 * openmm_unit.femtoseconds)
context1 = openmm.Context(system1, integrator)
context2 = openmm.Context(system2, copy.deepcopy(integrator))
from openmm import Platform
context1 = openmm.Context(system1, integrator, Platform.getPlatformByName("Reference"))
context2 = openmm.Context(system2, copy.deepcopy(integrator), Platform.getPlatformByName("Reference"))

def map_energies_by_force_type(potential_energy1, potential_energy2):
"""Convert dictionary force_group -> energy to force_type -> energy."""
Expand Down

0 comments on commit 3d84c70

Please sign in to comment.