Questions about parameters in dihedral_style opls

Dear LAMMPS users,

I have a question about the dihedral force field parameters of OPLS. In the document of LAMMPS, it is described as:

cadijhbb.png

But when I look into the code of dihedral_opls.cpp, it seems that the 1/2 factor is included in the K values.

p = k1[type](1.0 + c) + k2[type](1.0 - cos(2.0phi)) +
k3[type]
(1.0 + cos(3.0phi)) + k4[type](1.0 - cos(4.0*phi)) ;

Is my understanding correct ?

Thanks in advance,
Lin

Dear LAMMPS users,

I have a question about the dihedral force field parameters of OPLS. In
the document of LAMMPS, it is described as:

But when I look into the code of dihedral_opls.cpp, it seems that the 1/2
factor is included in the K values.

p = k1[type]*(1.0 + c) + k2[type]*(1.0 - cos(2.0*phi)) +
      k3[type]*(1.0 + cos(3.0*phi)) + k4[type]*(1.0 - cos(4.0*phi)) ;

Is my understanding correct ?

​no. please also have a look at this chunk of code from void
DihedralOPLS::coeff(int narg, char **arg) :

​ // store 1/2 factor with prefactor

  int count = 0;
  for (int i = ilo; i <= ihi; i++) {
    k1[i] = 0.5*k1_one;
    k2[i] = 0.5*k2_one;
    k3[i] = 0.5*k3_one;
    k4[i] = 0.5*k4_one;
    setflag[i] = 1;
    count++;
  }

​axel.​

Dear Axel,

Thank you for your time and help to correct my understanding.

Lin