1.. index:: angle_style class2
2.. index:: angle_style class2/kk
3.. index:: angle_style class2/omp
4.. index:: angle_style class2/p6
5
6angle_style class2 command
7==========================
8
9Accelerator Variants: *class2/kk*, *class2/omp*
10
11angle_style class2/p6 command
12=============================
13
14Syntax
15""""""
16
17.. code-block:: LAMMPS
18
19   angle_style class2
20
21Examples
22""""""""
23
24.. code-block:: LAMMPS
25
26   angle_style class2
27   angle_coeff * 75.0
28   angle_coeff 1 bb 10.5872 1.0119 1.5228
29   angle_coeff * ba 3.6551 24.895 1.0119 1.5228
30
31Description
32"""""""""""
33
34The *class2* angle style uses the potential
35
36.. math::
37
38   E & = E_a + E_{bb} + E_{ba} \\
39   E_a & = K_2 (\theta - \theta_0)^2 + K_3 (\theta - \theta_0)^3 + K_4(\theta - \theta_0)^4 \\
40   E_{bb} & = M (r_{ij} - r_1) (r_{jk} - r_2) \\
41   E_{ba} & = N_1 (r_{ij} - r_1) (\theta - \theta_0) + N_2(r_{jk} - r_2)(\theta - \theta_0)
42
43where :math:`E_a` is the angle term, :math:`E_{bb}` is a bond-bond
44term, and :math:`E_{ba}` is a bond-angle term.  :math:`\theta_0` is
45the equilibrium angle and :math:`r_1` and :math:`r_2` are the
46equilibrium bond lengths.
47
48See :ref:`(Sun) <angle-Sun>` for a description of the COMPASS class2 force field.
49
50Coefficients for the :math:`E_a`, :math:`E_{bb}`, and :math:`E_{ba}`
51formulas must be defined for each angle type via the :doc:`angle_coeff
52<angle_coeff>` command as in the example above, or in the data file or
53restart files read by the :doc:`read_data <read_data>` or
54:doc:`read_restart <read_restart>` commands.
55
56These are the 4 coefficients for the :math:`E_a` formula:
57
58* :math:`\theta_0` (degrees)
59* :math:`K_2` (energy)
60* :math:`K_3` (energy)
61* :math:`K_4` (energy)
62
63:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
64radians internally; hence the various :math:`K` are effectively energy
65per radian\^2 or radian\^3 or radian\^4.
66
67For the :math:`E_{bb}` formula, each line in a :doc:`angle_coeff <angle_coeff>`
68command in the input script lists 4 coefficients, the first of which
69is "bb" to indicate they are BondBond coefficients.  In a data file,
70these coefficients should be listed under a "BondBond Coeffs" heading
71and you must leave out the "bb", i.e. only list 3 coefficients after
72the angle type.
73
74* bb
75* :math:`M` (energy/distance\^2)
76* :math:`r_1` (distance)
77* :math:`r_2` (distance)
78
79For the :math:`E_{ba}` formula, each line in a :doc:`angle_coeff <angle_coeff>`
80command in the input script lists 5 coefficients, the first of which
81is "ba" to indicate they are BondAngle coefficients.  In a data file,
82these coefficients should be listed under a "BondAngle Coeffs" heading
83and you must leave out the "ba", i.e. only list 4 coefficients after
84the angle type.
85
86* ba
87* :math:`N_1` (energy/distance\^2)
88* :math:`N_2` (energy/distance\^2)
89* :math:`r_1` (distance)
90* :math:`r_2` (distance)
91
92The :math:`\theta_0` value in the :math:`E_{ba}` formula is not specified,
93since it is the same value from the :math:`E_a` formula.
94
95----------
96
97.. include:: accel_styles.rst
98
99----------
100
101The *class2/p6* angle style uses the *class2* potential expanded to sixth order:
102
103.. math::
104
105   E_{a} = K_2\left(\theta - \theta_0\right)^2 + K_3\left(\theta - \theta_0\right)^3 + K_4\left(\theta - \theta_0\right)^4 + K_5\left(\theta - \theta_0\right)^5 + K_6\left(\theta - \theta_0\right)^6
106
107In this expanded term 6 coefficients for the :math:`E_a` formula need to be set:
108
109* :math:`\theta_0` (degrees)
110* :math:`K_2` (energy)
111* :math:`K_3` (energy)
112* :math:`K_4` (energy)
113* :math:`K_5` (energy)
114* :math:`K_6` (energy)
115
116:math:`\theta_0` is specified in degrees, but LAMMPS converts it to
117radians internally; hence the various :math:`K` are effectively energy
118per radian\^2 or radian\^3 or radian\^4 or radian\^5 or radian\^6.
119
120The bond-bond and bond-angle terms remain unchanged.
121
122----------
123
124Restrictions
125""""""""""""
126
127This angle style can only be used if LAMMPS was built with the CLASS2
128package.  For the *class2/p6* style LAMMPS needs to be built with the
129MOFFF package.  See the :doc:`Build package <Build_package>` doc
130page for more info.
131
132Related commands
133""""""""""""""""
134
135:doc:`angle_coeff <angle_coeff>`
136
137Default
138"""""""
139
140none
141
142----------
143
144.. _angle-Sun:
145
146**(Sun)** Sun, J Phys Chem B 102, 7338-7364 (1998).
147