71 Commits

Author SHA1 Message Date
Evan Pretti
7b765ec034 Support multi-residue molecules in template generator and improve performance (#430)
* Support virtual sites and multiple SMIRNOFF force fields

* Put test files where tests can actually find them

* Clean up some changes in template_generators.py

* Clean up virtual site permutation handling in test cases

* Unfinished draft

* Allow specifying multiple force fields

* Support constraints and virtual sites

* Add more tests for constraints

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Run tests on OpenMM 8.5.0 beta since we need ForceField changes

* Need openmm_dev channel

* Use correct channel names (openmm_rc for beta)

* Minor improvement to torsion handling, fix incorrect comment

* Basic test for proteins

* Default to unconstrained variant of force field when given name

* Test molecule is unstable due to vsite/H overlap

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update vsite tests with more varieties of molecules

* Autoformatter

* Update openmmforcefields/generators/template_generators.py

Co-authored-by: Josh Horton <joshua.horton@openforcefield.org>

* 1-4 exception check (not vsites) now uses non-zero scalings

* Use preset list of known force field names, update documentation

* Reduce test set size after Interchange cache behavior change

* Update openmmforcefields/tests/test_template_generators.py

Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>

* Water constraints test also checks TIP3P inside openff_unconstrained

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix error message if preset force field file can't be located

* Update CHARMM force field scripts (see openmm/openmm#5181)

* Change caching behavior so molecules must be added

* Regenerate CHARMM force fields

* Test regenerated force fields on OpenMM 8.5.0 beta

* Refactor multi-residue molecule test

* Put back CHARMM files that didn't change other than generation date

* Add test with virtual site frame atoms spanning residue

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add test file with many amino acids

* Run tests on release version of OpenMM instead of beta

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Josh Horton <joshua.horton@openforcefield.org>
Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>
2026-03-31 17:03:58 -07:00
Evan Pretti
0551fd1fa5 SMIRNOFF: multiple force field files, virtual sites, and constraints (#423)
* Support virtual sites and multiple SMIRNOFF force fields

* Put test files where tests can actually find them

* Clean up some changes in template_generators.py

* Clean up virtual site permutation handling in test cases

* Unfinished draft

* Allow specifying multiple force fields

* Support constraints and virtual sites

* Add more tests for constraints

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Run tests on OpenMM 8.5.0 beta since we need ForceField changes

* Need openmm_dev channel

* Use correct channel names (openmm_rc for beta)

* Minor improvement to torsion handling, fix incorrect comment

* Default to unconstrained variant of force field when given name

* Test molecule is unstable due to vsite/H overlap

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update vsite tests with more varieties of molecules

* Autoformatter

* Update openmmforcefields/generators/template_generators.py

Co-authored-by: Josh Horton <joshua.horton@openforcefield.org>

* 1-4 exception check (not vsites) now uses non-zero scalings

* Use preset list of known force field names, update documentation

* Reduce test set size after Interchange cache behavior change

* Update openmmforcefields/tests/test_template_generators.py

Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>

* Water constraints test also checks TIP3P inside openff_unconstrained

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix error message if preset force field file can't be located

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Josh Horton <joshua.horton@openforcefield.org>
Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>
2026-03-03 13:49:52 -08:00
Mike Henry
74b6557123 Pin numpy <2.3 to fix issue with numpy.compat missing 2025-06-20 12:32:48 -07:00
Evan Pretti
675f14ad6d Update CHARMM force field to July 2024 release (#356)
* Updated files for water models and ions

* First attempt at update of CHARMM force field to July 2024 release

* Checked which excluded files that previously caused problems could now
  be included
* Checked which included files caused inconsistencies or other problems
  and needed to be excluded
* The protein-only force field didn't exist in the ffxml directory so I
  removed protein.yaml (not sure if this is desired)
* Added toppar_ions_won.str to the water models (a citation was present
  but the file was missing)
* Updated some missing citations
* Previously, there were various files for model compounds that were
  split out, but these XML files didn't have any residues in them and only
  had a few random atom types (or were entirely empty other than containing
  irrelevant references).  These have been removed.

* Excluded an ion due to residue name collision

* Update main README

* Increased flexibility of CHARMM conversion

* Added functionality to split out residues from selected CHARMM
  parameter files

* Allow specifying "fixes" to the generated XML files: can provide XPath
  to find elements, and a tree of XML elements to append as children to
  those found

* Work around some issues in ParmEd

* Copy improper objects before compression to work around ParmEd bug

* Add an XML fix for harmonic improper dihedrals to account for
  periodicity of the improper angle (to support equilibrium angles of pi)

* Handle impropers directly instead of relying on ParmEd

* Adds functionality to output impropers in a way that should be
  compatible with their explicit specification in the CHARMM force field
  files

* Ensures that impropers spanning patch and residue atoms will not be
  neglected

* Ensures that duplicate improper entries will not be written to split
  files

* Get compatible patches for patches during improper processing

An improper in a patch with some atoms in the patch might need to find
those atoms in a residue, but alternatively, the atoms might be in
another patch that also modified the residue, so search the residues
compatible with a patch for patches compatible with the residue during
improper processing.

* Split out CGenFF parameters to avoid conflicts

* Restore charmm36_protein for basic protein-only testing

* Initial implementation of new CHARMM/OpenMM test script

Goal is to replace test_charmm.py and energy.py with something cleaner
and more flexible.  Can select CHARMM (if installed), OpenMM-CHARMM,
ParmEd-CHARMM, and OpenMM-FFXML modes and compare energies and forces
across force groups.  Can define tests in a directory containing a
test.yaml file instead of having things hardcoded.  Plan to port
remaining tests over.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Corrections: typo and line too long caught automatically

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Another attempt at proper improper handling

* Uses a force field script to correctly insert impropers.  Should
  handle all cases except for ambiguous equivalent atoms (like OT1/OT2).

* Removed some miscellaneous test code from the conversion script since
  the test script handles this more thoroughly.

* Update and reorganization of testing framework

* New test script to test against CHARMM, OpenMM (reading a PSF) and
  OpenMM (reading FFXML).

* Converted old tests to new test format.

* Several new tests (amino acids and simple peptides for validation).

* Started reworking water box PSF generation as this was not placing the
  correct charges in the PSF files, leading to tests results that were
  not meaningful.

* Cleanup of test files

* Remove files left over from test system generation that are not being
  used by tests

* Remove some old test scripts whose behavior has been incorporated into
  new test script

* Note: 4- and 5-site water tests will be restored once it is determined
  how to generate the PSFs correctly with the virtual sites

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Read coordinates from file instead of standard input for performance

* Extended water tests to 4- and 5-site water boxes

* Use CHARMM to generate correct PSFs since ParmEd doesn't

* Update test script to update virtual site positions in OpenMM and skip
  testing virtual site forces (since CHARMM and OpenMM report them
  differently but accumulate them on the atoms the same way).

* Added DOPC/water box (lipid test case)

* Cleanups to splitting and add DISU atom types

* Remove extraneous debugging statements

* Formatting and linter fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed nucleic acid FFXML generation and added tests

* Add tests for protein-only XML file

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Compatibility fixes for generating multiple template versions

* Added tests for Drude force field

* Updated readme file for test cases

* Add CHARMM parameter set files necessary to run tests

* Update README file, add standard conversion/test run scripts

* Update generated force field files

* Fixes for nucleic acid patches in split files

* Update support to run CHARMM in Docker locally (not CI)

* Commit 1 to fix strange case-sensitivity problem

* Commit 2 to fix strange case-sensitivity problem

* Fix check to omit anisotropy script if it is unneeded

* Add CI test for CHARMM in Docker

* Point to development OpenMM and correct CI image

* Update devtools/conda-envs/test_charmm_env.yaml

Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>

* Pin to specific Ubuntu version instead of latest

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>
2025-03-26 23:46:53 +00:00
Jeff Wagner
8941f7e7b9 undownpin interchange 2025-02-27 13:46:42 -08:00
Mike Henry
7565e25d7c Test new ambertools 24 build (#361)
* test if CI is green

* github has removed macos-12 runners

* something is weird with the ambertools build on macos-13

* test new ambertools 23 build

* try older build

* test new ambertools build

* bump ci

* update the openmm versions we test

* don't test on intel macs
2025-02-27 12:44:36 -07:00
Jeff Wagner
ecb5ccdf9b try downpinning away from openff-interchange 0.4.2 (#366) 2025-02-27 08:04:04 -07:00
Mike Henry
72431bbbde run latest version of openmm in CI (#345)
* run latest version of openmm

* run n, n-1 openmm versions
2024-07-29 14:13:13 -07:00
Mike Henry
051cbcbbb1 Remove shipping gaff/ffxml and read parms from parmchk2 (#344)
* re-enable gaff

* run espaloma and gaff tests

* gaff has two fs michael

* Use 8.1.2rc1

* Update linters

* Remove Espaloma tests

* Apply suggestions from code review

Co-authored-by: Iván Pulido <2949729+ijpulidos@users.noreply.github.com>

* working on parmchk output

* fix pytest warnings

* Migrate from pkg_resources to importlib_resources

* Remove shipping gaff/ffxml and read everything from parmchk2

* make sure we use older openmm version for testing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test on ci now

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* decided to keep shipping the xmls

* cleaned things up, gave a better name to the set we track gaff atom types

* Update openmmforcefields/generators/template_generators.py

* updated change log

* Added note about how we might remove openmmforcefields/ffxml/amber/gaff/ffxml in a future release

---------

Co-authored-by: Matthew W. Thompson <mattwthompson@protonmail.com>
Co-authored-by: Iván Pulido <2949729+ijpulidos@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-24 15:18:58 -07:00
Mike Henry
38eb754ec9 re-enable gaff (#334)
* re-enable gaff

* run espaloma and gaff tests

* gaff has two fs michael

* Use 8.1.2rc1

* Update linters

* Remove Espaloma tests

* Apply suggestions from code review

Co-authored-by: Iván Pulido <2949729+ijpulidos@users.noreply.github.com>

* Use Intel macOS runners

* check if older macos works

* test all the macos versions

* see if rdkit is the issue

* Drop macOS 13

* Typo/fix

* Update dependencies

---------

Co-authored-by: Matthew W. Thompson <mattwthompson@protonmail.com>
Co-authored-by: Iván Pulido <2949729+ijpulidos@users.noreply.github.com>
2024-07-19 10:46:23 -07:00
Matt Thompson
b685637bbe Temporarily remove GAFF because of parmchk2 issues (#329)
* Temporarily remove GAFF because of parmchk2 issues

* Drop OpenEye from tests

* Drop automerge action

* Update Python and AmberTools versions, run tests in parallel

* Remove Espaloma from test environment

* Remove Espaloma CI

* Refactor some tests to enable skipping GAFF

* Skip SPC/E test when iterating over small molecule force fields

* Update default force field in `SystemGenerator`

* Streamline testing

* Update testing setup

* Mask CodeCov upload failures

* Add release notes
2024-05-03 08:07:59 -07:00
John Chodera
ec15b9cb73 Skip problematic test that caused error due to invalid SMIRNOFF parameters 2023-10-11 14:48:01 -07:00
Mike Henry
b3b288628e remove defaults channel 2023-09-25 10:59:28 -07:00
Iván Pulido
cc74477cbc Use latest Espaloma 0.3.x by default 2023-09-22 20:11:40 -04:00
Iván Pulido
175a928872 Espaloma+dgl now on conda-frge 2023-09-22 18:51:27 -04:00
Matt Thompson
8660a1afe8 Scattered fixes to get CI running (#290)
* Scattered fixes

* Pin AmberTools
* Skip non-small molecule force fields at test time
* Always run tests, even if OpenEye is not licensed

* OPC

* Update Python versions

* Trim more force fields at test time

* Parametrize tests

* Revert "Parametrize tests"

This reverts commit 5b37af526f.

* Debug, comments

* Run all tests

* Testing espaloma in different workflow

* pinning dgl version

* Change name of workflow

* Testing espaloma only with latest openff toolkit

* using pytest and fixtures

* Marking espaloma tests and parametrizing

* Running espaloma tests in workflow

* Fixing call in test

* Cache test should be inside context manager

* Remove support for older openff toolkit (<0.11)

* Specifying root path for tests

* testing without the /

* fixing CI yamls

* Mark espaloma tests

* need argument for tests

* remove trailing newline

---------

Co-authored-by: Iván Pulido <2949729+ijpulidos@users.noreply.github.com>
Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>
2023-07-18 23:20:03 +00:00
Matt Thompson
b12c2e871b Convert all amber ions (#242)
* conversion script from openmm #3773

* add converted ions from ambertools-22.0-py38h6177452_1

* OPC and OPC3 water (without ions) from openmm #3654

* move opc waters

* fix typo

* make opc and opc3 standard files by combining water and ions

* Fix paths

* Fiddle with paths again

* Bring in openff-amber-ff-ports by default

* Move `opc.xml` and `opc3.xml`

Co-authored-by: Alex Izvorski <aizvorski@gmail.com>
2022-10-21 14:33:38 -05:00
Mike Henry
33d500e900 make sure we don't install the newest toolkit by mistake (#237)
* make sure we don't install the newest toolkit by mistake

* make sure we don't pull in a really old version of the toolkit

* forgot to add a verb there

* Start to make internals compatible with both unit packages

* Try different logic

* Improve logic in test

* Fix some tests

* Fix

* Fix

* Better units logic in tests

* Remove temporary code

* That's too semantic a variable name

Co-authored-by: Matthew W. Thompson <mattwthompson@protonmail.com>
2022-09-20 15:05:52 -07:00
Mike Henry
35496e5095 Fix toolkit tests (#227)
* Ensure 0.11.0 RC version of toolkit is installed

* Possible fix to finish #191

* Try to ensure bash args thing is passed through

* Naive unit refactor

* Work through tests

* Update CI matrix

* Use mamba for development

* Debug, add boilerplate .gitignore

* Fix syntax

* make sure the package didn't get installed before we install it

* Do not install Espaloma

* Fix some unit registries in tests

* install espaloma, but remove openmmforcefields

* add back in espaloma

* switch to micromamba

* Explicitly move ffxml sources into entry point

* Remove symlinking

* Add boilerplate `.gitignore`

* Update package installation in CI

* Fix finding Amber files in test

* Soft import whatever units module is used by the toolkit

* Switch to micromamba for setting up conda environment

Add boilerplate `.gitignore` file

Do not pull from non-standard labels

Install instead of update

Try to figure out why if: {{ false }} still triggers

Syntax?

Tinker

Bring in (full) mamba

Bash thing everywhere

Bring down old toolkit

Do not present un-loadable ff14SB port as available

More pins

* Fix YAML syntax

* Use pip

* More fixes

* No particles
* Fix unit serialization
* Fix Atom.element calls

* Update some tests

* Clean up un-used imports

* Fix more tests

* Fix more tests

* Exclude Python 3.10 on macOS

* Skip ff14SB being treated as a small molecule

* Fix test

* Track duration of longest 20 tests

* Update action versions

* Try to fix exclusions in CI matrix

* Fix pathing in Amber conversion

* Run `pyupgrade --py38-plus`

* Try directly uploading coverage report

* Fix syntax

* Add back some tests

* Debug

* Drop `pytest-xdist` arg

* Fiddle with path

* Just try to get stuff passing

* Try uploading again

* Switch back to codecov

* Simply coverage reporting

* Allow 0 coverage

* Simplify coverage arguments

* Add `__init__.py` in `/tests/` submodule

https://stackoverflow.com/a/60579142

* Add `__init__.py` in `/tests/` submodule

https://stackoverflow.com/a/60579142

* Simplify coverage arguments

* Add back durations argument

* Apply suggestions from code review

* only upload report if it is not scheduled

Co-authored-by: Matthew W. Thompson <mattwthompson@protonmail.com>
2022-09-15 20:59:04 +00:00
Matt Thompson
140bc79930 Tweak CI: Switch to Micromamba, pin to supported OpenFF Toolkit versions (#232)
* Switch to micromamba for setting up conda environment

Add boilerplate `.gitignore` file

Do not pull from non-standard labels

Install instead of update

Try to figure out why if: {{ false }} still triggers

Syntax?

Tinker

Bring in (full) mamba

Bash thing everywhere

Bring down old toolkit

Do not present un-loadable ff14SB port as available

More pins

* Drop 3.7, add 3.10

Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>
2022-09-09 17:29:32 +00:00
Mike Henry
d4e6a07d89 add back in openeye toolkit (#226) 2022-08-19 16:51:57 -07:00
Mike Henry
ecfa15e34e pull espaloma from conda-froge 2022-08-04 10:00:51 -07:00
John Chodera
364c8e3200 Merge pull request #220 from openmm/feat/remove_openeye_check
remove oe license check
2022-08-02 14:05:08 -07:00
Mike Henry
6a19869112 missed a few bits on openeye removal 2022-08-01 14:54:57 -07:00
Mike Henry
3adb413691 Merge branch 'master' into toolkit-update 2022-07-12 13:53:55 -07:00
John Chodera
b8cd9a0175 Test against espaloma master to see if bugfix addresses test failure 2022-07-12 00:44:31 -04:00
Mike Henry
e5fd0dde2f Fix CI (#202)
* Update ci.yaml

* kill CI when another job is triggered on the same PR and don't upload codecov on scheduled runs

* use cuda shim

* update torch

* update *py*torch
2022-05-16 10:50:05 -07:00
John Chodera
617c5d9315 Update to espaloma-0.2.2 2022-04-05 20:32:42 -07:00
Matthew W. Thompson
bbddefb278 Merge remote-tracking branch 'upstream/master' into toolkit-update 2022-03-28 11:26:47 -05:00
Matthew W. Thompson
2195abab82 Update SMIRNOFFTemplateGenerator for toolkit API breaks 2022-03-28 11:25:52 -05:00
John Chodera
1dab2f1151 Ensure we use a sufficiently recent qcportal 2021-12-20 17:41:20 -08:00
John Chodera
94d86fa77c Update conda env to test against espaloma master 2021-11-14 16:32:45 +01:00
John Chodera
d06c944284 Add qcportal to conda env requirements, since espaloma seems to require it? 2021-10-28 23:27:15 -07:00
John Chodera
f7d0142381 Fix indentation in test environment YAML 2021-10-28 22:18:42 -07:00
John Chodera
5597b73150 Fix test env YAML 2021-10-28 22:16:40 -07:00
John Chodera
243709b15f Initial implementation of EspalomaTemplateGenerator and unit tests 2021-10-28 22:11:59 -07:00
John Chodera
534bd4ee34 Update all simtk.openmm -> openmm and simtk.unit -> openmm.unit imports for OpenMM 7.6; pin to >=7.6 2021-08-27 17:48:27 -07:00
SimonBoothroyd
620543f1bd Migrate the CI to GHA. 2021-01-23 11:03:59 +00:00
SimonBoothroyd
7c0e2a0e96 Migrate to the conda-forge openff-toolkit package. 2021-01-21 09:44:19 +00:00
John Chodera
1ac495ab8e Use new openforcefield 0.7.1 API for finding force fields 2020-07-21 17:31:28 -07:00
John Chodera
d3430010b7 Update to use openmm 7.4.2 rc in build 2020-05-17 17:32:53 -07:00
John Chodera
0e02ae8173 Fix miniconda paths 2020-05-17 17:30:59 -07:00
John Chodera
f18af600df Use openeye toolkits to speed up tests 2020-01-05 18:08:17 -08:00
John Chodera
6e610a4de5 Use https://github.com/openmm/openmm/pull/2511 fix on travis 2020-01-05 16:38:17 -08:00
John Chodera
b11db2098a Update tests for SystemGenerator 2020-01-04 16:57:06 -08:00
John Chodera
86967c642c Update requirements to openmm >=7.5.0 for smirnoff updates 2020-01-04 16:06:30 -08:00
John Chodera
b7ab3fa893 Cleanup 2019-12-21 19:28:35 -05:00
John Chodera
3f880ac840 Allow osx tests by backing off on required AmberTools version 2019-11-30 10:33:20 -05:00
John Chodera
e884280d5d GAFFTemplateGenerator tests pass locally! 2019-11-29 21:36:34 -05:00
John Chodera
86002b5278 Draft GAFFTemplateGenerator migrated from perses branch 2019-11-23 21:39:10 -05:00