openmm
openmm copied to clipboard
openmm does not recognize calcium ion
Hi,
I am trying to simulate calcium bound calmodulin using the script
pdb0 = PDBFile('test.pdb') forcefield = app.ForceField('amber99sbildn.xml', 'tip3p.xml') modeller = Modeller(pdb0.topology, pdb0.positions) modeller.addHydrogens(forcefield) modeller.addSolvent(forcefield1,padding=1.0nanometers,ionicStrength=0.1molar)
I got the following error
Traceback (most recent call last):
File "test.py", line 11, in
I am also attaching the PDB file which was generated by AMBER.
The similar error I am getting using YANK as mentioned https://github.com/choderalab/yank/issues/1251 test.zip
@ShahbazQalandar The base tip3p.xml doesn't have any ions included, but the version amber14/tip3p.xml does. The simple fix is to use app.ForceField('amber99sbildn.xml', 'amber14/tip3p.xml'). Despite the name that wouldn't include anything else from amber14, just TIP3P water and ions.
I'm sorry if this is a bit counterintuitive, there is an open issue to change the way ions are handled in #3663 but this should fix the problem.
Thanks. It is working now.
Those files aren't really meant to be combined with each other. Amber has changed how they handled ions over the years. In 99SBILDN, the ions are included with the main force field. However, it only supports a smaller set of ions: Cl, Cs, K, Li, Mg, Na, and Rb. Later force fields added more ions, and also started having different ion parameters for different water models. Using Amber14 ion parameters with Amber99 probably isn't a good idea. I suggest instead using Amber14 for everything: app.ForceField('amber14-all.xml', 'amber14/tip3pfb.xml'). Notice I also changed the water model. You can use TIP3P if you really want to, but TIP3P-FB is a much more realistic one.