dihedral_style nharmonic command


I wasn’t sure how to reply to my original question so sorry if I responded incorrectly. Steve Plimpton replied to my original question with the same title of this email and I’m following up to clarify.

I believe that the two equations are different from looking at them. The equations are listed below:

E = Sum(n=0,n) Ancos[nphi] Eqn. (1) From the paper.

E = Sum(n=1,n) An*cos^(n-1)[phi] Eqn. (2) From lammps.

Now if I do the series expansion for a few terms…

(1) E = Ao + A1cos[phi] + A2cos[2phi] + A3cos[3*phi] + …

(2) E = A1 + A2cos[phi] + A3cos^2[phi] + A4*cos^3[phi] + …

Based on how the equations are set up, this is what I believe the series expansion would be. Observing these two expansions it would seem like they are different to me unless I’m incorrect on the expansions.


Faraz Saleem
Graduate Student
University of Colorado Colorado Springs

you’re right, I didn’t notice the difference in formulas between

cos(n*phi) and [cos(phi)]^n. I was focusing on the difference
in the N vs N-1 pre-factors. Those are 2 different potentials.

Someone would have to code up the new one as a new

dihedral style. Or tabulate it and use dihedral_style table.