"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)

:line

dihedral_style command :h3

[Syntax:]

dihedral_style style :pre

style = {none} or {hybrid} or {charmm} or {class2} or {harmonic} or {helix} or \
        {multi/harmonic} or {opls} :ul

[Examples:]

dihedral_style harmonic
dihedral_style multi/harmonic
dihedral_style hybrid harmonic charmm :pre

[Description:]

Set the formula(s) LAMMPS uses to compute dihedral interactions
between quadruplets of atoms, which remain in force for the duration
of the simulation.  The list of dihedral quadruplets is read in by a
"read_data"_read_data.html or "read_restart"_read_restart.html command
from a data or restart file.

Hybrid models where dihedrals are computed using different dihedral
potentials can be setup using the {hybrid} dihedral style.

The coefficients associated with a dihedral style can be specified in
a data or restart file or via the "dihedral_coeff"_dihedral_coeff.html
command.

All dihedral potentials store their coefficient data in binary restart
files which means dihedral_style and
"dihedral_coeff"_dihedral_coeff.html commands do not need to be
re-specified in an input script that restarts a simulation.  See the
"read_restart"_read_restart.html command for details on how to do
this.  The one exception is that dihedral_style {hybrid} only stores
the list of sub-styles in the restart file; dihedral coefficients need
to be re-specified.

NOTE: When both a dihedral and pair style is defined, the
"special_bonds"_special_bonds.html command often needs to be used to
turn off (or weight) the pairwise interaction that would otherwise
exist between 4 bonded atoms.

In the formulas listed for each dihedral style, {phi} is the torsional
angle defined by the quadruplet of atoms.  This angle has a sign
convention as shown in this diagram:

:c,image(JPG/dihedral_sign.jpg)

where the I,J,K,L ordering of the 4 atoms that define the dihedral
is from left to right.

This sign convention effects several of the dihedral styles listed
below (e.g. charmm, helix) in the sense that the energy formula
depends on the sign of phi, which may be reflected in the value of the
coefficients you specify.

NOTE: When comparing the formulas and coefficients for various LAMMPS
dihedral styles with dihedral equations defined by other force fields,
note that some force field implementations divide/multiply the energy
prefactor {K} by the multiple number of torsions that contain the J-K
bond in an I-J-K-L torsion.  LAMMPS does not do this, i.e. the listed
dihedral equation applies to each individual dihedral.  Thus you need
to define {K} appropriately via the
"dihedral_coeff"_dihedral_coeff.html command to account for this
difference if necessary.

:line

Here is an alphabetic list of dihedral styles defined in LAMMPS.  Click on
the style to display the formula it computes and coefficients
specified by the associated "dihedral_coeff"_dihedral_coeff.html command.

Click on the style to display the formula it computes, any additional
arguments specified in the dihedral_style command, and coefficients
specified by the associated "dihedral_coeff"_dihedral_coeff.html
command.

There are also additional accelerated pair styles included in the
LAMMPS distribution for faster performance on CPUs, GPUs, and KNLs.
The individual style names on the "Commands
dihedral"_Commands_bond.html#dihedral doc page are followed by one or
more of (g,i,k,o,t) to indicate which accelerated styles exist.

"none"_dihedral_none.html - turn off dihedral interactions
"zero"_dihedral_zero.html - topology but no interactions
"hybrid"_dihedral_hybrid.html - define multiple styles of dihedral interactions :ul

"charmm"_dihedral_charmm.html - CHARMM dihedral
"charmmfsw"_dihedral_charmm.html - CHARMM dihedral with force switching
"class2"_dihedral_class2.html - COMPASS (class 2) dihedral
"cosine/shift/exp"_dihedral_cosine_shift_exp.html - dihedral with exponential in spring constant
"fourier"_dihedral_fourier.html - dihedral with multiple cosine terms
"harmonic"_dihedral_harmonic.html - harmonic dihedral
"helix"_dihedral_helix.html - helix dihedral
"multi/harmonic"_dihedral_multi_harmonic.html - dihedral with 5 harmonic terms
"nharmonic"_dihedral_nharmonic.html - same as multi-harmonic with N terms
"opls"_dihedral_opls.html - OPLS dihedral
"quadratic"_dihedral_quadratic.html - dihedral with quadratic term in angle
"spherical"_dihedral_spherical.html - dihedral which includes angle terms to avoid singularities
"table"_dihedral_table.html - tabulated dihedral
"table/cut"_dihedral_table_cut.html - tabulated dihedral with analytic cutoff :ul

:line

[Restrictions:]

Dihedral styles can only be set for atom styles that allow dihedrals
to be defined.

Most dihedral styles are part of the MOLECULE package.  They are only
enabled if LAMMPS was built with that package.  See the "Build
package"_Build_package.html doc page for more info.  The doc pages for
individual dihedral potentials tell if it is part of a package.

[Related commands:]

"dihedral_coeff"_dihedral_coeff.html

[Default:]

dihedral_style none
