1.. index:: pair_style e3b
2
3pair_style e3b command
4======================
5
6Syntax
7""""""
8
9.. code-block:: LAMMPS
10
11   pair_style e3b Otype
12
13* Otype = atom type for oxygen
14
15.. code-block:: LAMMPS
16
17   pair_coeff * * keyword
18
19* one or more keyword/value pairs must be appended.
20* keyword = *preset* or *Ea* or *Eb* or *Ec* or *E2* or *K3* or *K2* or *Rs* or *Rc3* or *Rc2* or *bondL* or *neigh*
21* If the *preset* keyword is given, no others are needed.
22  Otherwise, all are mandatory except for *neigh*\ .
23  The *neigh* keyword is always optional.
24
25.. parsed-literal::
26
27     *preset* arg = *2011* or *2015* = which set of predefined parameters to use
28              2011 = use the potential parameters from :ref:`(Tainter 2011) <Tainter2011>`
29              2015 = use the potential parameters from :ref:`(Tainter 2015) <Tainter2015>`
30     *Ea* arg = three-body energy for type A hydrogen bonding interactions (energy units)
31     *Eb* arg = three-body energy for type B hydrogen bonding interactions (energy units)
32     *Ec* arg = three-body energy for type C hydrogen bonding interactions (energy units)
33     *E2* arg = two-body energy correction (energy units)
34     *K3* arg = three-body exponential constant (inverse distance units)
35     *K2* arg = two-body exponential constant (inverse distance units)
36     *Rc3* arg = three-body cutoff (distance units)
37     *Rc2* arg = two-body cutoff (distance units)
38     *Rs* arg = three-body switching function cutoff (distance units)
39     *bondL* arg = intramolecular OH bond length (distance units)
40     *neigh* arg = approximate integer number of molecules within Rc3 of an oxygen atom
41
42Examples
43""""""""
44
45.. code-block:: LAMMPS
46
47   pair_style e3b 1
48   pair_coeff * * Ea 35.85 Eb -240.2 Ec 449.3 E2 108269.9 K3 1.907 K2 4.872 Rc3 5.2 Rc2 5.2 Rs 5.0 bondL 0.9572
49
50   pair_style hybrid/overlay e3b 1 lj/cut/tip4p/long 1 2 1 1 0.15 8.5
51   pair_coeff * * e3b preset 2011
52
53Description
54"""""""""""
55
56The *e3b* style computes an \"explicit three-body\" (E3B) potential for water :ref:`(Kumar 2008) <Kumar>`.
57
58.. math::
59
60   E =& E_2 \sum_{i,j}e^{-k_2 r_{ij}} + E_A \sum_{\substack{i,j,k,\ell \\
61   \in \textrm{type A}}} f(r_{ij})f(r_{k\ell}) + E_B \sum_{\substack{i,j,k,\ell \\
62   \in \textrm{type B}}} f(r_{ij})f(r_{k\ell}) + E_C \sum_{\substack{i,j,k,\ell \\
63   \in \textrm{type C}}} f(r_{ij})f(r_{k\ell}) \\
64   f(r) =& e^{-k_3 r}s(r) \\
65   s(r) =& \begin{cases}
66   1 & r<R_s \\
67   \displaystyle\frac{(R_f-r)^2(R_f-3R_s+2r)}{(R_f-R_s)^3} & R_s\leq r\leq R_f \\
68   0 & r>R_f\\
69   \end{cases}
70
71This potential was developed as a water model that includes the three-body cooperativity of hydrogen bonding explicitly.
72To use it in this way, it must be applied in conjunction with a conventional two-body water model, through *pair_style hybrid/overlay*.
73The three body interactions are split into three types: A, B, and C.
74Type A corresponds to anti-cooperative double hydrogen bond donor interactions.
75Type B corresponds to the cooperative interaction of molecules that both donate and accept a hydrogen bond.
76Type C corresponds to anti-cooperative double hydrogen bond acceptor interactions.
77The three-body interactions are smoothly cutoff by the switching function s(r) between Rs and Rc3.
78The two-body interactions are designed to correct for the effective many-body interactions implicitly included in the conventional two-body potential.
79The two-body interactions are cut off sharply at Rc2, because K3 is typically significantly smaller than K2.
80See :ref:`(Kumar 2008) <Kumar>` for more details.
81
82Only a single *pair_coeff* command is used with the *e3b* style.
83The first two arguments must be \* \*.
84The oxygen atom type for the pair style is passed as the only argument to the *pair_style* command, not in the *pair_coeff* command.
85The hydrogen atom type is inferred by the ordering of the atoms.
86
87.. note::
88
89   Every atom of type Otype must be part of a water molecule.
90   Each water molecule must have consecutive IDs with the oxygen first.
91   This pair style does not test that this criteria is met.
92
93The *pair_coeff* command must have at least one keyword/value pair, as described above.
94The *preset* keyword sets the potential parameters to the values used in :ref:`(Tainter 2011) <Tainter2011>` or :ref:`(Tainter 2015) <Tainter2015>`.
95To use the water models defined in those references, the *e3b* style should always be used in conjunction with an *lj/cut/tip4p/long* style through *pair_style hybrid/overlay*, as demonstrated in the second example above.
96The *preset 2011* option should be used with the :doc:`TIP4P water model <Howto_tip4p>`.
97The *preset 2015* option should be used with the :doc:`TIP4P/2005 water model <Howto_tip4p>`.
98If the *preset* keyword is used, no other keyword is needed.
99Changes to the preset parameters can be made by specifying the *preset* keyword followed by the specific parameter to change, like *Ea*\ .
100Note that the other keywords must come after *preset* in the pair_style command.
101The *e3b* style can also be used to implement any three-body potential of the same form by specifying all the keywords except *neigh*\ : *Ea*, *Eb*, *Ec*, *E2*, *K3*, *K2*, *Rc3*, *Rc2*, *Rs*, and *bondL*\ .
102The keyword *bondL* specifies the intramolecular OH bond length of the water model being used.
103This is needed to include H atoms that are within the cutoff even when the attached oxygen atom is not.
104
105This pair style allocates arrays sized according to the number of pairwise interactions within Rc3.
106To do this it needs an estimate for the number of water molecules within Rc3 of an oxygen atom.
107This estimate defaults to 10 and can be changed using the *neigh* keyword, which takes an integer as an argument.
108If the neigh setting is too small, the simulation will fail with the error "neigh is too small".
109If the neigh setting is too large, the pair style will use more memory than necessary.
110
111This pair style tallies a breakdown of the total E3B potential energy into sub-categories, which can be accessed via the :doc:`compute pair <compute_pair>` command as a vector of values of length 4.
112The 4 values correspond to the terms in the first equation above: the E2 term, the Ea term, the Eb term, and the Ec term.
113
114See the examples/PACKAGES/e3b directory for a complete example script.
115
116----------
117
118Mixing, shift, table, tail correction, restart, rRESPA info
119"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
120
121This pair style does not support the :doc:`pair_modify <pair_modify>`
122shift, table, and tail options.
123
124This pair style does not write its information to :doc:`binary restart files <restart>`.  Thus, you
125need to re-specify the pair_style and pair_coeff commands in an input
126script that reads a restart file.
127
128This pair style is incompatible with :doc:`respa <run_style>`.
129
130----------
131
132Restrictions
133""""""""""""
134
135This pair style is part of the EXTRA-PAIR package.  It is only enabled
136if LAMMPS was built with that package.  See the :doc:`Build package <Build_package>` page for more info.
137
138This pair style requires the :doc:`newton <newton>` setting to be "on"
139for pair interactions.
140
141This pair style requires a fixed number of atoms in the simulation, so it is incompatible with fixes like :doc:`fix deposit <fix_deposit>`.
142If the number of atoms changes between runs, this pair style must be re-initialized by calling the *pair_style* and *pair_coeffs* commands.
143This is not a fundamental limitation of the pair style, but the code currently does not support a variable number of atoms.
144
145The *preset* keyword currently only works with real, metal, si, and cgs :doc:`units <units>`.
146
147Related commands
148""""""""""""""""
149
150:doc:`pair_coeff <pair_coeff>`, :doc:`compute pair <compute_pair>`
151
152Default
153"""""""
154
155The option default for the *neigh* keyword is 10.
156
157----------
158
159.. _Kumar:
160
161.. _Tainter2011:
162
163**(Kumar)** Kumar and Skinner, J. Phys. Chem. B, 112, 8311 (2008)
164
165.. _Tainter2015:
166
167**(Tainter 2011)** Tainter, Pieniazek, Lin, and Skinner, J. Chem. Phys., 134, 184501 (2011)
168
169**(Tainter 2015)** Tainter, Shi, and Skinner, 11, 2268 (2015)
170