-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CHARMM force field to July 2024 release #356
base: main
Are you sure you want to change the base?
Conversation
* 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #356 +/- ##
=======================================
Coverage 69.75% 69.75%
=======================================
Files 5 5
Lines 830 830
=======================================
Hits 579 579
Misses 251 251 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Can these be distinguished from the regular amino acids? I would expect them to differ only in conformation, not topology, and therefore to match the same templates. |
This is part of the problem that I am encountering now. ParmEd will read and write them as distinct residues (possibly because they use different atom classes for their chiral centers), and OpenMM will read a force field with them. But when you try to create a system, OpenMM issues a "Multiple non-identical matching templates found" error. This is not as simple as just excluding the D-amino acids, as some residues have topological equivalents elsewhere. For instance, so far I've run into ILE which has not only DILE from the D-amino acids, but also IIL (the diastereomer alloisoleucine) from another stream file. Do we want to exclude all of these cases (this will prevent users from simulating them but perhaps there is not a lot of demand for them)? If so, I will try to figure out how to go through and find all of them, and make sure I understand why ParmEd isn't eliminating them like it eliminates other topologically equivalent residues. There might have to be a table somewhere where we manually specify which are the "standard" ones that we want since they aren't all localized to one file. |
How about converting them, but keeping them as separate XML files? If you just include |
* 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
* 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)
* 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
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.
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.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
* 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.
* 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.
* 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
for more information, see https://pre-commit.ci
* 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).
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
OK, there's a lot here, but this should be ready to look at now. Notes on changes and issues:
|
This is a work-in-progress and I am opening this pull request as a draft to keep track of issues and potentially solicit feedback on some issues I have encountered during this. This updates the CHARMM force field distributed in FFXML format to the most recent as of this writing (July 2024) release.
toppar_all36_prot_aldehydes.str
andtoppar_all36_na_modifications.str
appear to no longer cause the parameter inconsistency reported previously.toppar_all36_prot_d_aminoacids.str
was excluded for an unknown reason; this file does not cause any naming conflicts or parameter inconsistencies.toppar_ions_won.str
was excluded for an unknown reason from the water/ions files and is included again (one naming collision below could be worked around with a residue-specific exclusion).toppar_all36_prot_heme_for_new_psf_gen_code_2022.str
andtoppar_all36_na_rna_modified_for_new_psf_gen_code_2022.str
are excluded in favor oftoppar_all36_prot_heme.str
andtoppar_all36_na_rna_modified.str
. I can't find documentation on what this is about, but I am guessing that a backwards-incompatible change in CHARMM led to a need for two versions of these files: no parameters seem to change, just a few entries regarding topology modification. ParmEd doesn't seem to complain with either version.par_all36_cgenff.prm
and line 22869 oftoppar_all36_carb_glycolipid.str
. The glycolipid file is excluded as many other files depend on the CGenFF file, and I am proceeding under the assumption that until we know better, it is better to leave out a file than to make manual modifications to one.DMPR
is defined as a residue at line 26903 oftop_all36_cgenff.rtf
(dimethylpropanamide) and as a patch at line 386 oftoppar_all36_na_reactive_rna.str
(thio-substitution of dimyristoyl-D-glycero-1-phosphatidic acid). This name collision prevents ParmEd from reading both files, so the reactive RNA file is excluded.TM3P
is defined as a residue at line 7093 oftop_all36_cgenff.rtf
(4'-methyl,3'-phosphate tetrahydrofuran) andTm3p
is defined as a residue at line 341 oftoppar_ions_won.str
(Thulium(III) ion). ParmEd uppercases many names read which causes a collision when the force field and water/ion XML files are read together. The ion version of the residue is excluded.drude2019.yaml
are still ones causing this issue, or if this is due to something else.protein.yaml
to ostensibly create a protein-only version of the force field, except that no corresponding XML file exists in the repository.toppar_all36_*_model.xml
force fields don't actually contain any residues. Two are empty, containing nothing except some spurious references, and two contain a few atom types and parameters that are then never used.charmm36.yaml
.Presently, I am trying to run the tests to ensure that this conversion is not completely incorrect. Unfortunately there are some issues because of distinct residue templates in the force field that OpenMM sees as topologically equivalent. Apparently this was not an issue before, but the test code may need modification. In the meantime, I wanted to document the current issues with the conversion for reference and in case anyone has encountered these exact problems before.