Dihedrals in the loplsaa.lt of moltemplate don't match the ones reported in the Siu paper

I am using Moltemplate to generate a forcefield (L-OPLSAA) for my simulation. As a test run, I decided to make a forcefield for hexadecane from their given examples: moltemplate/examples/all_atom/force_field_OPLSAA/hexadecane.

After executing

moltemplate.sh system.lt
cleanup_moltemplate.sh

I get the following forcefield in the system.in.settings file:

pair_coeff 1 1 0.066 3.5 
pair_coeff 2 2 0.066 3.5 
pair_coeff 3 3 0.03 2.5 
pair_coeff 4 4 0.026290630975 2.5 
bond_coeff 1 268.0 1.529
bond_coeff 2 340.0 1.09
angle_coeff 1 58.35 112.7
angle_coeff 2 33.0 107.8
angle_coeff 3 37.5 110.7
dihedral_coeff 1 0.0 0.0 0.3 0.0 
dihedral_coeff 2 0.0 0.0 0.3 0.0 
dihedral_coeff 3 0.6446926386 -0.2143420172 0.1782194073 0.0 
set type 1 charge -0.222
set type 2 charge -0.148
set type 3 charge 0.074
set type 4 charge 0.074

Dihedral type 3 is for atom types 1-2-2-2 which is (CT-C-C-C) where CT is the terminal carbon. Per the paper by Siu (https://pubs.acs.org/doi/10.1021/ct200908r), the dihedral parameters under for a fourier dihedral are (V0, V1, V2, V3) = (-0.0731, 0.64469263862, -0.21434201721, 0.1782194073) kcal/mol (see Table 2). These are decidedly NOT the parameters presented by moltemplate.

I wanted to ask if this is a bug in moltemplate? or is there a conversion i am not aware of over here?

1 Like

Hi @mence,

The dihedral conversion from one formula to another is generally a mess. The best way to know what is going on is to plot and compare. Unfortunately, the paper from Siu does not give the precise formula they refer to and the conversion, as they refer to a (probably outdated) version of the gromacs manual (see here for the current version).

As far as I can tell I do not know to what multiple of the dihedral angles correspond V_0, V_1 etc… However, plotting the RB formula is straight forward (if you don’t forget the difference of convention between \psi and \phi). I can reproduce the RB shape of the potential up to a constant using the moltemplate values and the 3 terms Fourier formula, so I think the parameters are correct. Note that the original OPLS formula used only 3 term for the dihedrals so it is not uncommon to have the last one of them set to 0. I suspect the V_0 parameter to be an energy constant that has no impact on the forces.

See an example of plot I got using the RB formula and your dihedral coefficient with the write_dihedral command.

The best person to answer on moltemplate however is @jewettaij .

Thank you for your response @Germain! This makes sense.

On the topic of moltemplate, though, @jewettaij, I wanted to ask why is there not C82L atom type? There is a C80L and a C81L atom type with the corresponding hydrogen types, but not one for C82L?

The OPLS-AA force field shipped with Moltemplate was converted in 2008 from this file. There is an issue on github about the version: Question regarding Napthalene C (atom type 92) in OPLSAA · Issue #93 · jewettaij/moltemplate · GitHub, and one about the specific example of hexadecane: About OPLSAA example of hexadecane · Issue #98 · jewettaij/moltemplate · GitHub.

If you are interested in using the latest version of the force field, please consider writing a script for converting the parameters to the LT format and push your contribution to the Moltemplate repository. That’s how open-source software is improved over time.

1 Like

Adding to @hothello 's post – I recently submitted a patch for moltemplate (oplsaa.lt type 93 is from methylbenzene, not ethylbenzene · Issue #101 · jewettaij/moltemplate · GitHub). See that for an example of the kinds of issues that arise in transcription.

1 Like