1.. index:: dihedral_style class2
2.. index:: dihedral_style class2/omp
3.. index:: dihedral_style class2/kk
4
5dihedral_style class2 command
6=============================
7
8Accelerator Variants: *class2/omp*, *class2/kk*
9
10Syntax
11""""""
12
13.. code-block:: LAMMPS
14
15   dihedral_style class2
16
17Examples
18""""""""
19
20.. code-block:: LAMMPS
21
22   dihedral_style class2
23   dihedral_coeff 1 100 75 100 70 80 60
24   dihedral_coeff * mbt 3.5945 0.1704 -0.5490 1.5228
25   dihedral_coeff * ebt 0.3417 0.3264 -0.9036 0.1368 0.0 -0.8080 1.0119 1.1010
26   dihedral_coeff 2 at 0.0 -0.1850 -0.7963 -2.0220 0.0 -0.3991 110.2453 105.1270
27   dihedral_coeff * aat -13.5271 110.2453 105.1270
28   dihedral_coeff * bb13 0.0 1.0119 1.1010
29
30Description
31"""""""""""
32
33The *class2* dihedral style uses the potential
34
35.. math::
36
37   E        = & E_d + E_{mbt} + E_{ebt} + E_{at} + E_{aat} + E_{bb13} \\
38   E_d      = & \sum_{n=1}^{3} K_n [ 1 - \cos (n \phi - \phi_n) ] \\
39   E_{mbt}  = & (r_{jk} - r_2) [ A_1 \cos (\phi) + A_2 \cos (2\phi) + A_3 \cos (3\phi) ] \\
40   E_{ebt}  = & (r_{ij} - r_1) [ B_1 \cos (\phi) + B_2 \cos (2\phi) + B_3 \cos (3\phi) ] + \\
41              & (r_{kl} - r_3) [ C_1 \cos (\phi) + C_2 \cos (2\phi) + C_3 \cos (3\phi) ] \\
42   E_{at}   = & (\theta_{ijk} - \theta_1) [ D_1 \cos (\phi) + D_2 \cos (2\phi) + D_3 \cos (3\phi) ] + \\
43              & (\theta_{jkl} - \theta_2) [ E_1 \cos (\phi) + E_2 \cos (2\phi) + E_3 \cos (3\phi) ] \\
44   E_{aat}  = & M (\theta_{ijk} - \theta_1) (\theta_{jkl} - \theta_2) \cos (\phi) \\
45   E_{bb13} = & N (r_{ij} - r_1) (r_{kl} - r_3)
46
47where :math:`E_d` is the dihedral term, :math:`E_{mbt}` is a middle-bond-torsion term,
48:math:`E_{ebt}` is an end-bond-torsion term, :math:`E_{at}` is an angle-torsion term, :math:`E_{aat}`
49is an angle-angle-torsion term, and :math:`E_{bb13}` is a bond-bond-13 term.
50
51:math:`\theta_1` and :math:`\theta_2` are equilibrium angles and :math:`r_1`, :math:`r_2`, and
52:math:`r_3` are equilibrium bond lengths.
53
54See :ref:`(Sun) <dihedral-Sun>` for a description of the COMPASS class2 force field.
55
56Coefficients for the :math:`E_d`, :math:`E_{mbt}`, :math:`E_{ebt}`,
57:math:`E_{at}`, :math:`E_{aat}`, and :math:`E_{bb13}` formulas must be
58defined for each dihedral type via the :doc:`dihedral_coeff <dihedral_coeff>`
59command as in the example above, or in the data file
60or restart files read by the :doc:`read_data <read_data>` or
61:doc:`read_restart <read_restart>` commands.
62
63These are the 6 coefficients for the :math:`E_d` formula:
64
65* :math:`K_1` (energy)
66* :math:`\phi_1` (degrees)
67* :math:`K_2` (energy)
68* :math:`\phi_2` (degrees)
69* :math:`K_3` (energy)
70* :math:`phi_3` (degrees)
71
72For the :math:`E_{mbt}` formula, each line in a
73:doc:`dihedral_coeff <dihedral_coeff>` command in the input script lists
745 coefficients, the first of which is *mbt* to indicate they are
75MiddleBondTorsion coefficients.  In a data file, these coefficients
76should be listed under a *MiddleBondTorsion Coeffs* heading and you
77must leave out the *mbt*, i.e. only list 4 coefficients after the
78dihedral type.
79
80* *mbt*
81* :math:`A_1` (energy/distance)
82* :math:`A_2` (energy/distance)
83* :math:`A_3` (energy/distance)
84* :math:`r_2` (distance)
85
86For the :math:`E_{ebt}` formula, each line in a
87:doc:`dihedral_coeff <dihedral_coeff>` command in the input script lists
889 coefficients, the first of which is *ebt* to indicate they are
89EndBondTorsion coefficients.  In a data file, these coefficients
90should be listed under a *EndBondTorsion Coeffs* heading and you must
91leave out the *ebt*, i.e. only list 8 coefficients after the dihedral
92type.
93
94* *ebt*
95* :math:`B_1` (energy/distance)
96* :math:`B_2` (energy/distance)
97* :math:`B_3` (energy/distance)
98* :math:`C_1` (energy/distance)
99* :math:`C_2` (energy/distance)
100* :math:`C_3` (energy/distance)
101* :math:`r_1` (distance)
102* :math:`r_3` (distance)
103
104For the :math:`E_{at}` formula, each line in a
105:doc:`dihedral_coeff <dihedral_coeff>` command in the input script lists
1069 coefficients, the first of which is *at* to indicate they are
107AngleTorsion coefficients.  In a data file, these coefficients should
108be listed under a *AngleTorsion Coeffs* heading and you must leave out
109the *at*, i.e. only list 8 coefficients after the dihedral type.
110
111* *at*
112* :math:`D_1` (energy)
113* :math:`D_2` (energy)
114* :math:`D_3` (energy)
115* :math:`E_1` (energy)
116* :math:`E_2` (energy)
117* :math:`E_3` (energy)
118* :math:`\theta_1` (degrees)
119* :math:`\theta_2` (degrees)
120
121:math:`\theta_1` and :math:`\theta_2` are specified in degrees, but
122LAMMPS converts them to radians internally; hence the various
123:math:`D` and :math:`E` are effectively energy per radian.
124
125For the :math:`E_{aat}` formula, each line in a :doc:`dihedral_coeff
126<dihedral_coeff>` command in the input script lists 4 coefficients,
127the first of which is *aat* to indicate they are AngleAngleTorsion
128coefficients.  In a data file, these coefficients should be listed
129under a *AngleAngleTorsion Coeffs* heading and you must leave out the
130*aat*, i.e. only list 3 coefficients after the dihedral type.
131
132* *aat*
133* :math:`M` (energy)
134* :math:`\theta_1` (degrees)
135* :math:`\theta_2` (degrees)
136
137:math:`\theta_1` and :math:`\theta_2` are specified in degrees, but
138LAMMPS converts them to radians internally; hence :math:`M` is
139effectively energy per radian\^2.
140
141For the :math:`E_{bb13}` formula, each line in a
142:doc:`dihedral_coeff <dihedral_coeff>` command in the input script lists
1434 coefficients, the first of which is *bb13* to indicate they are
144BondBond13 coefficients.  In a data file, these coefficients should be
145listed under a *BondBond13 Coeffs* heading and you must leave out the
146*bb13*, i.e. only list 3 coefficients after the dihedral type.
147
148* *bb13*
149* :math:`N` (energy/distance\^2)
150* :math:`r_1` (distance)
151* :math:`r_3` (distance)
152
153----------
154
155.. include:: accel_styles.rst
156
157----------
158
159Restrictions
160""""""""""""
161
162This dihedral style can only be used if LAMMPS was built with the
163CLASS2 package.  See the :doc:`Build package <Build_package>` doc
164page for more info.
165
166Related commands
167""""""""""""""""
168
169:doc:`dihedral_coeff <dihedral_coeff>`
170
171Default
172"""""""
173
174none
175
176----------
177
178.. _dihedral-Sun:
179
180**(Sun)** Sun, J Phys Chem B 102, 7338-7364 (1998).
181