Dihedral Computation using "compute dihedral/local phi"

Dear Lammps Users,

I am trying to calculate tabulated dihedral angles using the commands below

compute myDihedral all dihedral/local phi
compute myDihedralType all property/local dtype

Then I saved them into the files (dihedral.dat and dihedralType.dat).

fix printDihedral all print 20 c_myDihedral file dihedral.dat screen no
fix printDihedralType all print 20 c_myDihedralType file dihedralType.dat screen no

When the simulations were done and I checked two files, only words “c_myDihedral” and

“c_myDihedralType” were printed in the dihedral.dat and dihedralType.dat, respectively.

Initial setup

CWJ > Dear Lammps Users,
CWJ >
CWJ >
CWJ > I am trying to calculate tabulated dihedral angles using the commands
CWJ > below
CWJ >
CWJ > compute myDihedral all dihedral/local phi
CWJ > compute myDihedralType all property/local dtype
CWJ >
CWJ > Then I saved them into the files (dihedral.dat and dihedralType.dat).
CWJ >
CWJ > fix printDihedral all print 20 c_myDihedral file dihedral.dat
CWJ > screen no
CWJ > fix printDihedralType all print 20 c_myDihedralType file
CWJ > dihedralType.dat screen no
CWJ >
CWJ >
CWJ > When the simulations were done and I checked two files, only words
CWJ > "c_myDihedral" and
CWJ >
CWJ > "c_myDihedralType" were printed in the dihedral.dat and dihedralType.dat,
CWJ > respectively.
CWJ >
CWJ > Initial setup
CWJ > ========================
CWJ > pair_style lj/cut/coul/long 9.5
CWJ > pair_modify mix arithmetic
CWJ > pair_modify tail yes
CWJ > bond_style harmonic
CWJ > angle_style harmonic
CWJ > dihedral_style harmonic
CWJ > kspace_style pppm 1.0e-4
CWJ > special_bonds amber
CWJ > ========================
CWJ >
CWJ > The simulations ran under NPT at 300K for 1ns with 1fs timestep.
CWJ >
CWJ > Am I missing anything to calculate "tabulated dihedral angles"?

please re-read:

http://lammps.sandia.gov/doc/fix_print.html

you got exactly what you asked for.

axel.

CWJ >
CWJ > Thanks.
CWJ >
CWJ > Best regards,
CWJ > Changwoon Jang

I don't know what you mean by "calculate tabulated dihedral angles".

If your goal is to customize the dihedral angle forces acting on your
molecule using a tabulated dihedral potential, then use this:
http://lammps.sandia.gov/doc/dihedral_table.html

There is a detailed example of a coarse-grained polymer which uses
this dihedral style (in moltemplate format) in the following directory
(inside your LAMMPS directory):

tools/moltemplate/examples/CG_biomolecules/protein_folding_examples/1bead+chaperone/frustrated/moltemplate_files/1beadFrustrated.lt

(Scroll down to the end of the file. Note: This example uses
"dihedral_style hybrid table..." instead of "dihedral_style table...",
but this is a minor, unimportant complication.)

And read Section 6.15 if you want to learn how to get
output from compute dihedral/local summed up or
output to a file, e.g. via compute reduce or dump local.

Steve

Dear all,

I dumped the output using “dump local” instead of “fix print”.

I still do not know why “fix print” did not work printing output for “compute 1 all dihedral/local phi”.

I try to access the compute using “c_ID” in the “fix print” command like

Dear all,

   I dumped the output using "dump local" instead of "fix print".

I still do not know why "fix print" did not work printing output for
"compute 1 all dihedral/local phi".

please show me in the documentation of fix print where it *says* that
it should work like that. i don't see it.

axel.