In Moltemplate how to convert force field in the GROMACS topology format to LAMMPS format

Dear All,

How do I convert this Ethylene glycol topology and parameter set in GROMACS format to LAMMPS format in moltemplate?

So, I have this OPLS-AA file and the ethlyene glycol molecule file from ATB.

The set was obtained from this paper

#define _FF_OPLS
#define _FF_OPLSAA

[ defaults ]
; nbfunc    comb-rule   gen-pairs   fudgeLJ fudgeQQ
       1            3         yes       0.5     0.5

[ atomtypes ]
; name  bond_type      mass    charge   ptype          sigma      epsilon
    CG      CG  6  12.01100    0.1650       A    3.50000e-01  2.76144e-01
    HG      HG  1   1.00800    0.0600       A    2.50000e-01  1.25520e-01
    OG      OG  8  15.99940   -0.7200       A    3.00000e-01  7.11280e-01
    HO      HO  1   1.00800    0.4350       A    0.00000e+00  0.00000e+00

[ bondtypes ]
;  i     j   func         b0         kb
  CG    CG      1    0.15290   224262.0
  CG    HG      1    0.10900   284512.0
  CG    OG      1    0.14300   267776.0
  OG    HO      1    0.09450   462750.4

[ angletypes ]
;  i     j     k   func      th0      cth
  CG    CG    OG      1   108.00   418.40
  CG    CG    HG      1   110.70   313.80
  HG    CG    HG      1   107.80   276.14
  HG    CG    OG      1   109.50   292.88
  CG    OG    HO      1   108.50   460.24

[ dihedraltypes ]
;   i    j     k     l   func  coefficients
   OG    CG    CG    OG  3    9.852  11.989   4.987 -26.828   0.000   0.000
   CG    CG    OG    HO  3   -0.141   5.591   3.156  -8.606   0.000   0.000

; Fourier coefficients
; angle    F1      F2      F3
; OCCO   16.264  -4.987  13.414
; CCOH    1.727  -3.156   4.303

Best regards,
Yunes Salman

Hi Yunes,
first of all, I have to say that this question is completely off-topic in this forum, as it is specific to Moltemplate.

Now, I showed you how to use the OPLS-AA force field with Moltemplate, cashing on the fine work of conversion which has been conveniently done by Andrew & co. It is very simple to use, as you are required to write the LT file using basically only the XYZ structure of any given structure, name the list of bonds, and most importantly assign the right atom types. This is not a complex task, as every atom type is clearly commented in the file, eg:

set type @atom:80 charge -0.18  # "Alkane CH3-"

I won’t spend more time on that, as it is your job to figure things out and do your homework.

Conversely, if the parameters you posted are somehow unique to that particular ethylene glycol, you have to create an LT file that contains the list of bonds, angles, dihedrals, improper angles, and relative parameters. Axel already mentioned what you need to consider for the conversion, so you are good to go. No one is going to do this for you.

1 Like