Isra3l / ligpargen

MIT License
50 stars 20 forks source link

Generating parameters for water #6

Closed wutobias closed 2 years ago

wutobias commented 2 years ago

When running the following command to obtain parameters for water

ligpargen -s O -cgen CM1A

I am getting weird angle parameters and partial charges (consistent over all parameter files for all codes supported). The angle0 parameter is much too low and the partial charges do not sum to zero. This is the openmm xml file:

<ForceField>
<AtomTypes>
<Type name="opls_800" class"O800" element="O" mass="15.999"/>
<Type name="opls_801" class"H801" element="H" mass="1.008"/>
<Type name="opls_802" class"H802" element="H" mass="1.008"/>
</AtomTypes>
<Residues>
<Residue name="MOL">
<Atom name="O00" type="opls_800"/>
<Atom name="H01" type="opls_801"/>
<Atom name="H02" type="opls_802"/>
<Bond from="1" to="0"/>
<Bond from="2" to="0"/>
</Residue>
</Residues>
<HarmonicBondForce>
<Bond class1="H801" class2="O800" length="0.094500" k="462750.400000"/>
<Bond class1="H802" class2="O800" length="0.094500" k="462750.400000"/>
</HarmonicBondForce>
<HarmonicAngleForce>
<Angle class1="H802" class2="O800" class3="H801" angle="1.433264" k="523.000000"/>
</HarmonicAngleForce>
<PeriodicTorsionForce>
</PeriodicTorsionForce>
<NonbondedForce coulomb14scale="0.5" lj14scale="0.5"/>
<Atom type="opls_800" charge="-0.838675" sigma="0.315365" epsilon="0.648520"/>
<Atom type="opls_801" charge="0.419338" sigma="0.000000" epsilon="0.000000"/>
<Atom type="opls_802" charge="0.419337" sigma="0.000000" epsilon="0.000000"/>
</NonbondedForce>
</ForceField>

I am not too familiar with the OPLS-AA force field, so I could be missing something obvious, but I think the perceived parameters should at least be physically reasonable. I know there is TIP3P, but in my case rigid bulk water models won't work that well so I am interested in getting parameters for a single water molecule.

If I run the above for say ammonia or hydrogen sulfid

ligpargen -s N -cgen CM1A

or

ligpargen -s S -cgen CM1A

I am getting reasonable parameters.

Any help is greatly appreciated. If this is indeed a bug I can try to help fixing it, but would need some guidance on where to look at :-)

--Tobias

Isra3l commented 2 years ago

Hey Tobias!

LigParGen generates OPLSAA parameters for organic molecules. Water, ammonia ... are not organic and the parameters generated may not be accurate. In your case, I would take the water molecule generated by LigPargen which contains flexible parameters and replace the bonded and nonbonded terms with the original TIP3P. So, use the charge, vdw, bond, and angle values of TIP3P but keep the harmonic modified terms to add flexibility.

TIP: As a general rule, I recommend you use TIP4P instead of TIP3P if you need better accuracy. This water model has been proven to be better than TIP3P reproducing water properties.

I hope it works,

Israel