openmmforcefields
openmmforcefields copied to clipboard
Residue name conflict with Amber ions and RNA
Many of the ports of the Amber ion parameters use the residue name "U" for the uranium cation U4+, which conflicts with the residue uracil in RNA force fields. This leads to an error when these force fields are combined.
MWE:
>>> from openmm import app
>>> ff = app.ForceField("amber/RNA.OL3.xml", "amber/ions/ionslm_126_opc.xml")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ccavende/anaconda3/envs/openff-proteinbenchmark/lib/python3.10/site-packages/openmm/app/forcefield.py", line 214, in __init__
self.loadFile(files)
File "/home/ccavende/anaconda3/envs/openff-proteinbenchmark/lib/python3.10/site-packages/openmm/app/forcefield.py", line 334, in loadFile
self.registerResidueTemplate(template)
File "/home/ccavende/anaconda3/envs/openff-proteinbenchmark/lib/python3.10/site-packages/openmm/app/forcefield.py", line 471, in registerResidueTemplate
raise ValueError('Residue template %s with the same override level %d already exists.' % (template.name, template.overrideLevel))
ValueError: Residue template U with the same override level 0 already exists.
The following files are affected.
$ grep -l 'Residue name="U"' openmmforcefields/ffxml/amber/ions/*.xml
openmmforcefields/ffxml/amber/ions/ions234lm_126_spce.xml
openmmforcefields/ffxml/amber/ions/ions234lm_126_tip3p.xml
openmmforcefields/ffxml/amber/ions/ions234lm_126_tip4pew.xml
openmmforcefields/ffxml/amber/ions/ions234lm_hfe_spce.xml
openmmforcefields/ffxml/amber/ions/ions234lm_hfe_tip3p.xml
openmmforcefields/ffxml/amber/ions/ions234lm_hfe_tip4pew.xml
openmmforcefields/ffxml/amber/ions/ions234lm_iod_spce.xml
openmmforcefields/ffxml/amber/ions/ions234lm_iod_tip3p.xml
openmmforcefields/ffxml/amber/ions/ions234lm_iod_tip4pew.xml
openmmforcefields/ffxml/amber/ions/ionslm_126_fb3.xml
openmmforcefields/ffxml/amber/ions/ionslm_126_fb4.xml
openmmforcefields/ffxml/amber/ions/ionslm_126_opc3.xml
openmmforcefields/ffxml/amber/ions/ionslm_126_opc.xml
openmmforcefields/ffxml/amber/ions/ionslm_hfe_fb3.xml
openmmforcefields/ffxml/amber/ions/ionslm_hfe_fb4.xml
openmmforcefields/ffxml/amber/ions/ionslm_hfe_opc3.xml
openmmforcefields/ffxml/amber/ions/ionslm_hfe_opc.xml
openmmforcefields/ffxml/amber/ions/ionslm_iod_fb3.xml
openmmforcefields/ffxml/amber/ions/ionslm_iod_fb4.xml
openmmforcefields/ffxml/amber/ions/ionslm_iod_opc3.xml
openmmforcefields/ffxml/amber/ions/ionslm_iod_opc.xml
I suggest changing the residue name for all of these to "U4+" as in openmmforcefields/ffxml/amber/tip3p_standard.xml and in lib/atomic_ions.lib in AmberTools.