dihedral function format

Hi all
i want to use class 2 style for dihedral (because I want to set cross terms).
as we know the function format class 2 in lammps is

image.png

which needs 6 parameter (k1 k2 k3 phi1 phi2 phi3).
but the dihedral format in forcefield I use (cff93) is:

image.png

which needs 4 parameter (k1 k2 k3 k4)

how can I use this parameters in class2 dihedral format ?
thanks in advance.

Hi all

[…]

how can I use this parameters in class2 dihedral format ?

you can only model systems where the k4 parameter is 0.0
otherwise you would have to modify the source code accordingly to support a 4th entry.

axel.

thanks alex
but without considering k4 .i still have problem with term
image.png

which if I expand it (to convert it cos(n(phi)) format) it yields sin terms as bellow formula

image.png

please advice.

but phi_n is always zero in the dihedral potential you quoted.

image.png

image.png

Thanks.

image.png

image.png

I don’t know if this is relevant, but “dihedral_style spherical” supports cross-terms between θ and φ angles, and there is no limit on the number of terms allowed in the expansion:
https://lammps.sandia.gov/doc/dihedral_spherical.html

I am not familiar enough with CFF93 to know if this is general enough to support what you need. (Probably not, but perhaps some of the other people who stumble upon this discussion using google will find this reply useful.)
Either way, editing the “dihedral_class2.cpp” code to add an extra term (as Axel suggested) should not be difficult to do.

Andrew

image.png

image.png

Thank you very much.

image.png

image.png