dihedral_style spherical

I’ve attached code, docs, and a test system for a dihedral_style which is very handy for the coarse-grained polymer simulations I am running.

“For this dihedral style, the energy can be any function that combines the 4-body dihedral-angle (phi) and the two 3-body bond-angles (theta1, theta2).”

I have not benchmarked it, but it should be reasonably efficient. Adding terms to the series should not increase the computation time by that much. I tried to minimize the number of redundant trig function calls (although there are probably ways to optimize this further).

Cheers

Andrew

dihedral_spherical_angles.jpg
dihedral_spherical.jpg

dihedral_spherical.cpp (31.8 KB)

dihedral_spherical.h (1.48 KB)

dihedral_spherical_docs.tar.gz (83.8 KB)

test_dihedral_spherical.tar.gz (1.64 KB)

thanks Andrew - we’ll include this …

Steve

dihedral_spherical_angles.jpg

dihedral_spherical.jpg

​created issue #114 to track integration of this code: ​
https://github.com/lammps/lammps/issues/114

axel.

My apologies.
One of the figures I sent in my previous email showed a misleading representation of the dihedral angle φ. (There’s a reference to this figure inside the “dihedral_spherical.txt” documentation file which was included in the previous email.)
In addition, the same problem also exists in the doc page for dihedral_style (http://lammps.sandia.gov/doc/_images/dihedral_sign.jpg) which is also my fault.
Here’s a new version for both of those figures (SVG, PNG, JPG formats).
I’ll try to minimize the number of corrections and updates.

Thanks Axel and Steve

Andrew

dihedral_spherical_angles.jpg

dihedral_spherical_angles.png

dihedral_spherical_angles.svg

dihedral_sign.jpg

dihedral_sign.png

dihedral_sign.svg