Replace gmx_large_int_t with gmx_int64_t
[gromacs.git] / manual / forcefield.tex
blobd33aae7507ccfee929f08314e7a055a99c90741d
1 % This file is part of the GROMACS molecular simulation package.
3 % Copyright (c) 2013, by the GROMACS development team, led by
4 % David van der Spoel, Berk Hess, Erik Lindahl, and including many
5 % others, as listed in the AUTHORS file in the top-level source
6 % directory and at http://www.gromacs.org.
8 % GROMACS is free software; you can redistribute it and/or
9 % modify it under the terms of the GNU Lesser General Public License
10 % as published by the Free Software Foundation; either version 2.1
11 % of the License, or (at your option) any later version.
13 % GROMACS is distributed in the hope that it will be useful,
14 % but WITHOUT ANY WARRANTY; without even the implied warranty of
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 % Lesser General Public License for more details.
18 % You should have received a copy of the GNU Lesser General Public
19 % License along with GROMACS; if not, see
20 % http://www.gnu.org/licenses, or write to the Free Software Foundation,
21 % Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 % If you want to redistribute modifications to GROMACS, please
24 % consider that scientific software is very special. Version
25 % control is crucial - bugs must be traceable. We will be happy to
26 % consider code for inclusion in the official distribution, but
27 % derived work must not be called official GROMACS. Details are found
28 % in the README & COPYING files - if they are missing, get the
29 % official version at http://www.gromacs.org.
31 % To help us fund GROMACS development, we humbly ask that you cite
32 % the research papers on the package. Check out http://www.gromacs.org
34 \chapter{Interaction function and force fields\index{force field}}
35 \label{ch:ff}
36 To accommodate the potential functions used
37 in some popular force fields (see \ref{sec:ff}), {\gromacs} offers a choice of functions,
38 both for non-bonded interaction and for dihedral interactions. They
39 are described in the appropriate subsections.
41 The potential functions can be subdivided into three parts
42 \begin{enumerate}
43 \item {\em Non-bonded}: Lennard-Jones or Buckingham, and Coulomb or
44 modified Coulomb. The non-bonded interactions are computed on the
45 basis of a neighbor list (a list of non-bonded atoms within a certain
46 radius), in which exclusions are already removed.
47 \item {\em Bonded}: covalent bond-stretching, angle-bending,
48 improper dihedrals, and proper dihedrals. These are computed on the
49 basis of fixed lists.
50 \item {\em Restraints}: position restraints, angle restraints,
51 distance restraints, orientation restraints and dihedral restraints, all
52 based on fixed lists.
53 \end{enumerate}
55 \section{Non-bonded interactions}
56 Non-bonded interactions in {\gromacs} are pair-additive and centro-symmetric:
57 \beq
58 V(\ve{r}_1,\ldots \ve{r}_N) = \sum_{i<j}V_{ij}(\rvij);
59 \eeq
60 \beq
61 \ve{F}_i = -\sum_j \frac{dV_{ij}(r_{ij})}{dr_{ij}} \frac{\rvij}{r_{ij}} = -\ve{F}_j
62 \eeq
63 The non-bonded interactions contain a \normindex{repulsion} term,
64 a \normindex{dispersion}
65 term, and a Coulomb term. The repulsion and dispersion term are
66 combined in either the Lennard-Jones (or 6-12 interaction), or the
67 Buckingham (or exp-6 potential). In addition, (partially) charged atoms
68 act through the Coulomb term.
70 \subsection{The Lennard-Jones interaction}
71 \label{sec:lj}
72 The \normindex{Lennard-Jones} potential $V_{LJ}$ between two atoms equals:
73 \beq
74 V_{LJ}(\rij) = \frac{C_{ij}^{(12)}}{\rij^{12}} -
75 \frac{C_{ij}^{(6)}}{\rij^6}
76 \eeq
77 See also \figref{lj}
78 The parameters $C^{(12)}_{ij}$ and $C^{(6)}_{ij}$ depend on pairs of
79 {\em atom types}; consequently they are taken from a matrix of
80 LJ-parameters. In the Verlet cut-off scheme, the potential is shifted
81 by a constant such that it is zero at the cut-off distance.
83 \begin{figure}
84 \centerline{\includegraphics[width=8cm]{plots/f-lj}}
85 \caption {The Lennard-Jones interaction.}
86 \label{fig:lj}
87 \end{figure}
89 The force derived from this potential is:
90 \beq
91 \ve{F}_i(\rvij) = \left( 12~\frac{C_{ij}^{(12)}}{\rij^{13}} -
92 6~\frac{C_{ij}^{(6)}}{\rij^7} \right) \rnorm
93 \eeq
95 The LJ potential may also be written in the following form:
96 \beq
97 V_{LJ}(\rvij) = 4\epsilon_{ij}\left(\left(\frac{\sigma_{ij}} {\rij}\right)^{12}
98 - \left(\frac{\sigma_{ij}}{\rij}\right)^{6} \right)
99 \label{eqn:sigeps}
100 \eeq
102 In constructing the parameter matrix for the non-bonded LJ-parameters,
103 two types of \normindex{combination rule}s can be used within {\gromacs},
104 only geometric averages (type 1 in the input section of the force field file):
105 \beq
106 \begin{array}{rcl}
107 C_{ij}^{(6)} &=& \left({C_{ii}^{(6)} \, C_{jj}^{(6)}}\right)^{1/2} \\
108 C_{ij}^{(12)} &=& \left({C_{ii}^{(12)} \, C_{jj}^{(12)}}\right)^{1/2}
109 \label{eqn:comb}
110 \end{array}
111 \eeq
112 or, alternatively the Lorentz-Berthelot rules can be used. An arithmetic average is used to calculate $\sigma_{ij}$, while a geometric average is used to calculate $\epsilon_{ij}$ (type 2):
113 \beq
114 \begin{array}{rcl}
115 \sigma_{ij} &=& \frac{1}{ 2}(\sigma_{ii} + \sigma_{jj}) \\
116 \epsilon_{ij} &=& \left({\epsilon_{ii} \, \epsilon_{jj}}\right)^{1/2}
117 \end{array}
118 \eeq
119 finally an geometric average for both parameters can be used (type 3):
120 \beq
121 \begin{array}{rcl}
122 \sigma_{ij} &=& \left({\sigma_{ii} \, \sigma_{jj}}\right)^{1/2} \\
123 \epsilon_{ij} &=& \left({\epsilon_{ii} \, \epsilon_{jj}}\right)^{1/2}
124 \end{array}
125 \eeq
126 This last rule is used by the OPLS force field.
129 %\ifthenelse{\equal{\gmxlite}{1}}{}{
130 \subsection{\normindex{Buckingham potential}}
131 The Buckingham
132 potential has a more flexible and realistic repulsion term
133 than the Lennard-Jones interaction, but is also more expensive to
134 compute. The potential form is:
135 \beq
136 V_{bh}(\rij) = A_{ij} \exp(-B_{ij} \rij) -
137 \frac{C_{ij}}{\rij^6}
138 \eeq
139 \begin{figure}
140 \centerline{\includegraphics[width=8cm]{plots/f-bham}}
141 \caption {The Buckingham interaction.}
142 \label{fig:bham}
143 \end{figure}
145 See also \figref{bham}. The force derived from this is:
146 \beq
147 \ve{F}_i(\rij) = \left[ A_{ij}B_{ij}\exp(-B_{ij} \rij) -
148 6\frac{C_{ij}}{\rij^7} \right] \rnorm
149 \eeq
151 %} % Brace matches ifthenelse test for gmxlite
153 \subsection{Coulomb interaction}
154 \label{sec:coul}
155 \newcommand{\epsr}{\varepsilon_r}
156 \newcommand{\epsrf}{\varepsilon_{rf}}
157 The \normindex{Coulomb} interaction between two charge particles is given by:
158 \beq
159 V_c(\rij) = f \frac{q_i q_j}{\epsr \rij}
160 \label{eqn:vcoul}
161 \eeq
162 See also \figref{coul}, where $f = \frac{1}{4\pi \varepsilon_0} =
163 138.935\,485$ (see \chref{defunits})
165 \begin{figure}
166 \centerline{\includegraphics[width=8cm]{plots/vcrf}}
167 \caption[The Coulomb interaction with and without reaction field.]{The
168 Coulomb interaction (for particles with equal signed charge) with and
169 without reaction field. In the latter case $\epsr$ was 1, $\epsrf$ was 78,
170 and $r_c$ was 0.9 nm.
171 The dot-dashed line is the same as the dashed line, except for a constant.}
172 \label{fig:coul}
173 \end{figure}
175 The force derived from this potential is:
176 \beq
177 \ve{F}_i(\rvij) = f \frac{q_i q_j}{\epsr\rij^2}\rnorm
178 \eeq
180 In {\gromacs} the relative \swapindex{dielectric}{constant}
181 \normindex{$\epsr$}
182 may be set in the in the input for {\tt grompp}.
184 %\ifthenelse{\equal{\gmxlite}{1}}{}{
185 \subsection{Coulomb interaction with \normindex{reaction field}}
186 \label{sec:coulrf}
187 The Coulomb interaction can be modified for homogeneous systems by
188 assuming a constant dielectric environment beyond the cut-off $r_c$
189 with a dielectric constant of {$\epsrf$}. The interaction then reads:
190 \beq
191 V_{crf} ~=~
192 f \frac{q_i q_j}{\epsr\rij}\left[1+\frac{\epsrf-\epsr}{2\epsrf+\epsr}
193 \,\frac{\rij^3}{r_c^3}\right]
194 - f\frac{q_i q_j}{\epsr r_c}\,\frac{3\epsrf}{2\epsrf+\epsr}
195 \label{eqn:vcrf}
196 \eeq
197 in which the constant expression on the right makes the potential
198 zero at the cut-off $r_c$. For charged cut-off spheres this corresponds
199 to neutralization with a homogeneous background charge.
200 We can rewrite \eqnref{vcrf} for simplicity as
201 \beq
202 V_{crf} ~=~ f \frac{q_i q_j}{\epsr}\left[\frac{1}{\rij} + k_{rf}~ \rij^2 -c_{rf}\right]
203 \eeq
204 with
205 \bea
206 k_{rf} &=& \frac{1}{r_c^3}\,\frac{\epsrf-\epsr}{(2\epsrf+\epsr)} \label{eqn:krf}\\
207 c_{rf} &=& \frac{1}{r_c}+k_{rf}\,r_c^2 ~=~ \frac{1}{r_c}\,\frac{3\epsrf}{(2\epsrf+\epsr)}
208 \label{eqn:crf}
209 \eea
210 For large $\epsrf$ the $k_{rf}$ goes to $r_c^{-3}/2$,
211 while for $\epsrf$ = $\epsr$ the correction vanishes.
212 In \figref{coul}
213 the modified interaction is plotted, and it is clear that the derivative
214 with respect to $\rij$ (= -force) goes to zero at the cut-off distance.
215 The force derived from this potential reads:
216 \beq
217 \ve{F}_i(\rvij) = f \frac{q_i q_j}{\epsr}\left[\frac{1}{\rij^2} - 2 k_{rf}\rij\right]\rnorm
218 \label{eqn:fcrf}
219 \eeq
220 The reaction-field correction should also be applied to all excluded
221 atoms pairs, including self pairs, in which case the normal Coulomb
222 term in \eqnsref{vcrf}{fcrf} is absent.
224 Tironi {\etal} have introduced a generalized reaction field in which
225 the dielectric continuum beyond the cut-off $r_c$ also has an ionic strength
226 $I$~\cite{Tironi95}. In this case we can rewrite the constants $k_{rf}$ and
227 $c_{rf}$ using the inverse Debye screening length $\kappa$:
228 \bea
229 \kappa^2 &=&
230 \frac{2 I \,F^2}{\varepsilon_0 \epsrf RT}
231 = \frac{F^2}{\varepsilon_0 \epsrf RT}\sum_{i=1}^{K} c_i z_i^2 \\
232 k_{rf} &=& \frac{1}{r_c^3}\,
233 \frac{(\epsrf-\epsr)(1 + \kappa r_c) + \half\epsrf(\kappa r_c)^2}
234 {(2\epsrf + \epsr)(1 + \kappa r_c) + \epsrf(\kappa r_c)^2}
235 \label{eqn:kgrf}\\
236 c_{rf} &=& \frac{1}{r_c}\,
237 \frac{3\epsrf(1 + \kappa r_c + \half(\kappa r_c)^2)}
238 {(2\epsrf+\epsr)(1 + \kappa r_c) + \epsrf(\kappa r_c)^2}
239 \label{eqn:cgrf}
240 \eea
241 where $F$ is Faraday's constant, $R$ is the ideal gas constant, $T$
242 the absolute temperature, $c_i$ the molar concentration for species
243 $i$ and $z_i$ the charge number of species $i$ where we have $K$
244 different species. In the limit of zero ionic strength ($\kappa=0$)
245 \eqnsref{kgrf}{cgrf} reduce to the simple forms of \eqnsref{krf}{crf}
246 respectively.
248 \subsection{Modified non-bonded interactions}
249 \label{sec:mod_nb_int}
250 In {\gromacs}, the non-bonded potentials can be
251 modified by a shift function. The purpose of this is to replace the
252 truncated forces by forces that are continuous and have continuous
253 derivatives at the \normindex{cut-off} radius. With such forces the
254 timestep integration produces much smaller errors and there are no
255 such complications as creating charges from dipoles by the truncation
256 procedure. In fact, by using shifted forces there is no need for
257 charge groups in the construction of neighbor lists. However, the
258 shift function produces a considerable modification of the Coulomb
259 potential. Unless the ``missing'' long-range potential is properly
260 calculated and added (through the use of PPPM, Ewald, or PME), the
261 effect of such modifications must be carefully evaluated. The
262 modification of the Lennard-Jones dispersion and repulsion is only
263 minor, but it does remove the noise caused by cut-off effects.
265 There is {\em no} fundamental difference between a switch function
266 (which multiplies the potential with a function) and a shift function
267 (which adds a function to the force or potential)~\cite{Spoel2006a}. The switch
268 function is a special case of the shift function, which we apply to
269 the {\em force function} $F(r)$, related to the electrostatic or
270 van der Waals force acting on particle $i$ by particle $j$ as:
271 \beq
272 \ve{F}_i = c F(r_{ij}) \frac{\rvij}{r_{ij}}
273 \eeq
274 For pure Coulomb or Lennard-Jones interactions
275 $F(r)=F_\alpha(r)=r^{-(\alpha+1)}$.
276 The shifted force $F_s(r)$ can generally be written as:
277 \beq
278 \begin{array}{rcl}
279 \vspace{2mm}
280 F_s(r)~=&~F_\alpha(r) & r < r_1 \\
281 \vspace{2mm}
282 F_s(r)~=&~F_\alpha(r)+S(r) & r_1 \le r < r_c \\
283 F_s(r)~=&~0 & r_c \le r
284 \end{array}
285 \eeq
286 When $r_1=0$ this is a traditional shift function, otherwise it acts as a
287 switch function. The corresponding shifted coulomb potential then reads:
288 \beq
289 V_s(r_{ij}) = f \Phi_s (r_{ij}) q_i q_j
290 \eeq
291 where $\Phi(r)$ is the potential function
292 \beq
293 \Phi_s(r) = \int^{\infty}_r~F_s(x)\, dx
294 \eeq
296 The {\gromacs} shift function should be smooth at the boundaries, therefore
297 the following boundary conditions are imposed on the shift function:
298 \beq
299 \begin{array}{rcl}
300 S(r_1) &=&0 \\
301 S'(r_1) &=&0 \\
302 S(r_c) &=&-F_\alpha(r_c) \\
303 S'(r_c) &=&-F_\alpha'(r_c)
304 \end{array}
305 \eeq
306 A 3$^{rd}$ degree polynomial of the form
307 \beq
308 S(r) = A(r-r_1)^2 + B(r-r_1)^3
309 \eeq
310 fulfills these requirements. The constants A and B are given by the
311 boundary condition at $r_c$:
312 \beq
313 \begin{array}{rcl}
314 \vspace{2mm}
315 A &~=~& -\displaystyle
316 \frac{(\alpha+4)r_c~-~(\alpha+1)r_1} {r_c^{\alpha+2}~(r_c-r_1)^2} \\
317 B &~=~& \displaystyle
318 \frac{(\alpha+3)r_c~-~(\alpha+1)r_1}{r_c^{\alpha+2}~(r_c-r_1)^3}
319 \end{array}
320 \eeq
321 Thus the total force function is:
322 \beq
323 F_s(r) = \frac{\alpha}{r^{\alpha+1}} + A(r-r_1)^2 + B(r-r_1)^3
324 \eeq
325 and the potential function reads:
326 \beq
327 \Phi(r) = \frac{1}{r^\alpha} - \frac{A}{3} (r-r_1)^3 - \frac{B}{4} (r-r_1)^4 - C
328 \eeq
329 where
330 \beq
331 C = \frac{1}{r_c^\alpha} - \frac{A}{3} (r_c-r_1)^3 - \frac{B}{4} (r_c-r_1)^4
332 \eeq
334 When $r_1$ = 0, the modified Coulomb force function is
335 \beq
336 F_s(r) = \frac{1}{r^2} - \frac{5 r^2}{r_c^4} + \frac{4 r^3}{r_c^5}
337 \eeq
338 which is identical to the {\em \index{parabolic force}}
339 function recommended to be used as a short-range function in
340 conjunction with a \swapindex{Poisson}{solver}
341 for the long-range part~\cite{Berendsen93a}.
342 The modified Coulomb potential function is:
343 \beq
344 \Phi(r) = \frac{1}{r} - \frac{5}{3r_c} + \frac{5r^3}{3r_c^4} - \frac{r^4}{r_c^5}
345 \eeq
346 See also \figref{shift}.
348 \begin{figure}
349 \centerline{\includegraphics[angle=270,width=10cm]{plots/shiftf}}
350 \caption[The Coulomb Force, Shifted Force and Shift Function
351 $S(r)$,.]{The Coulomb Force, Shifted Force and Shift Function $S(r)$,
352 using r$_1$ = 2 and r$_c$ = 4.}
353 \label{fig:shift}
354 \end{figure}
356 \subsection{Modified short-range interactions with Ewald summation}
357 When Ewald summation\index{Ewald sum} or \seeindex{particle-mesh
358 Ewald}{PME}\index{Ewald, particle-mesh} is used to calculate the
359 long-range interactions, the
360 short-range Coulomb potential must also be modified, similar to the
361 switch function above. In this case the short range potential is given
363 \beq
364 V(r) = f \frac{\mbox{erfc}(\beta r_{ij})}{r_{ij}} q_i q_j,
365 \eeq
366 where $\beta$ is a parameter that determines the relative weight
367 between the direct space sum and the reciprocal space sum and erfc$(x)$ is
368 the complementary error function. For further
369 details on long-range electrostatics, see \secref{lr_elstat}.
370 %} % Brace matches ifthenelse test for gmxlite
373 \section{Bonded interactions}
374 Bonded interactions are based on a fixed list of atoms. They are not
375 exclusively pair interactions, but include 3- and 4-body interactions
376 as well. There are {\em bond stretching} (2-body), {\em bond angle}
377 (3-body), and {\em dihedral angle} (4-body) interactions. A special
378 type of dihedral interaction (called {\em improper dihedral}) is used
379 to force atoms to remain in a plane or to prevent transition to a
380 configuration of opposite chirality (a mirror image).
382 \subsection{Bond stretching}
383 \label{sec:bondpot}
384 \subsubsection{Harmonic potential}
385 \label{subsec:harmonicbond}
386 The \swapindex{bond}{stretching} between two covalently bonded atoms
387 $i$ and $j$ is represented by a harmonic potential:
389 \begin{figure}
390 \centerline{\raisebox{4cm}{\includegraphics[angle=270,width=5cm]{plots/bstretch}}\includegraphics[width=7cm]{plots/f-bond}}
391 \caption[Bond stretching.]{Principle of bond stretching (left), and the bond
392 stretching potential (right).}
393 \label{fig:bstretch1}
394 \end{figure}
396 \beq
397 V_b~(\rij) = \half k^b_{ij}(\rij-b_{ij})^2
398 \eeq
399 See also \figref{bstretch1}, with the force given by:
400 \beq
401 \ve{F}_i(\rvij) = k^b_{ij}(\rij-b_{ij}) \rnorm
402 \eeq
404 %\ifthenelse{\equal{\gmxlite}{1}}{}{
405 \subsubsection{Fourth power potential}
406 \label{subsec:G96bond}
407 In the \gromosv{96} force field~\cite{gromos96}, the covalent bond potential
408 is, for reasons of computational efficiency, written as:
409 \beq
410 V_b~(\rij) = \frac{1}{4}k^b_{ij}\left(\rij^2-b_{ij}^2\right)^2
411 \eeq
412 The corresponding force is:
413 \beq
414 \ve{F}_i(\rvij) = k^b_{ij}(\rij^2-b_{ij}^2)~\rvij
415 \eeq
416 The force constants for this form of the potential are related to the usual
417 harmonic force constant $k^{b,harm}$ (\secref{bondpot}) as
418 \beq
419 2 k^b b_{ij}^2 = k^{b,harm}
420 \eeq
421 The force constants are mostly derived from the harmonic ones used in
422 \gromosv{87}~\cite{biomos}. Although this form is computationally more
423 efficient
424 (because no square root has to be evaluated), it is conceptually more
425 complex. One particular disadvantage is that since the form is not harmonic,
426 the average energy of a single bond is not equal to $\half kT$ as it is for
427 the normal harmonic potential.
429 \subsection{\normindex{Morse potential} bond stretching}
430 \label{subsec:Morsebond}
431 %\author{F.P.X. Everdij}
433 For some systems that require an anharmonic bond stretching potential,
434 the Morse potential~\cite{Morse29}
435 between two atoms {\it i} and {\it j} is available
436 in {\gromacs}. This potential differs from the harmonic potential in
437 that it has an asymmetric potential well and a zero force at infinite
438 distance. The functional form is:
439 \beq
440 \displaystyle V_{morse} (r_{ij}) = D_{ij} [1 - \exp(-\beta_{ij}(r_{ij}-b_{ij}))]^2,
441 \eeq
442 See also \figref{morse}, and the corresponding force is:
443 \beq
444 \begin{array}{rcl}
445 \displaystyle {\bf F}_{morse} ({\bf r}_{ij})&=&2 D_{ij} \beta_{ij} r_{ij} \exp(-\beta_{ij}(r_{ij}-b_{ij})) * \\
446 \displaystyle \: & \: &[1 - \exp(-\beta_{ij}(r_{ij}-b_{ij}))] \frac{\displaystyle {\bf r}_{ij}}{\displaystyle r_{ij}},
447 \end{array}
448 \eeq
449 where \( \displaystyle D_{ij} \) is the depth of the well in kJ/mol,
450 \( \displaystyle \beta_{ij} \) defines the steepness of the well (in
451 nm\(^{-1} \)), and \( \displaystyle b_{ij} \) is the equilibrium
452 distance in nm. The steepness parameter \( \displaystyle \beta_{ij}
453 \) can be expressed in terms of the reduced mass of the atoms {\it i}
454 and {\it j}, the fundamental vibration frequency \( \displaystyle
455 \omega_{ij} \) and the well depth \( \displaystyle D_{ij} \):
456 \beq
457 \displaystyle \beta_{ij}= \omega_{ij} \sqrt{\frac{\mu_{ij}}{2 D_{ij}}}
458 \eeq
459 and because \( \displaystyle \omega = \sqrt{k/\mu} \), one can rewrite \( \displaystyle \beta_{ij} \) in terms of the harmonic force constant \( \displaystyle k_{ij} \):
460 \beq
461 \displaystyle \beta_{ij}= \sqrt{\frac{k_{ij}}{2 D_{ij}}}
462 \label{eqn:betaij}
463 \eeq
464 For small deviations \( \displaystyle (r_{ij}-b_{ij}) \), one can
465 approximate the \( \displaystyle \exp \)-term to first-order using a
466 Taylor expansion:
467 \beq
468 \displaystyle \exp(-x) \approx 1-x
469 \label{eqn:expminx}
470 \eeq
471 and substituting \eqnref{betaij} and \eqnref{expminx} in the functional form:
472 \beq
473 \begin{array}{rcl}
474 \displaystyle V_{morse} (r_{ij})&=&D_{ij} [1 - \exp(-\beta_{ij}(r_{ij}-b_{ij}))]^2\\
475 \displaystyle \:&=&D_{ij} [1 - (1 -\sqrt{\frac{k_{ij}}{2 D_{ij}}}(r_{ij}-b_{ij}))]^2\\
476 \displaystyle \:&=&\frac{1}{2} k_{ij} (r_{ij}-b_{ij}))^2
477 \end{array}
478 \eeq
479 we recover the harmonic bond stretching potential.
481 \begin{figure}
482 \centerline{\includegraphics[width=7cm]{plots/f-morse}}
483 \caption{The Morse potential well, with bond length 0.15 nm.}
484 \label{fig:morse}
485 \end{figure}
487 \subsection{Cubic bond stretching potential}
488 \label{subsec:cubicbond}
489 Another anharmonic bond stretching potential that is slightly simpler
490 than the Morse potential adds a cubic term in the distance to the
491 simple harmonic form:
492 \beq
493 V_b~(\rij) = k^b_{ij}(\rij-b_{ij})^2 + k^b_{ij}k^{cub}_{ij}(\rij-b_{ij})^3
494 \eeq
495 A flexible \normindex{water} model (based on
496 the SPC water model~\cite{Berendsen81}) including
497 a cubic bond stretching potential for the O-H bond
498 was developed by Ferguson~\cite{Ferguson95}. This model was found
499 to yield a reasonable infrared spectrum. The Ferguson water model is
500 available in the {\gromacs} library ({\tt flexwat-ferguson.itp}).
501 It should be noted that the potential is asymmetric: overstretching leads to
502 infinitely low energies. The \swapindex{integration}{timestep} is therefore
503 limited to 1 fs.
505 The force corresponding to this potential is:
506 \beq
507 \ve{F}_i(\rvij) = 2k^b_{ij}(\rij-b_{ij})~\rnorm + 3k^b_{ij}k^{cub}_{ij}(\rij-b_{ij})^2~\rnorm
508 \eeq
510 \subsection{FENE bond stretching potential\index{FENE potential}}
511 \label{subsec:FENEbond}
512 In coarse-grained polymer simulations the beads are often connected
513 by a FENE (finitely extensible nonlinear elastic) potential~\cite{Warner72}:
514 \beq
515 V_{\mbox{\small FENE}}(\rij) =
516 -\half k^b_{ij} b^2_{ij} \log\left(1 - \frac{\rij^2}{b^2_{ij}}\right)
517 \eeq
518 The potential looks complicated, but the expression for the force is simpler:
519 \beq
520 F_{\mbox{\small FENE}}(\rvij) =
521 -k^b_{ij} \left(1 - \frac{\rij^2}{b^2_{ij}}\right)^{-1} \rvij
522 \eeq
523 At short distances the potential asymptotically goes to a harmonic
524 potential with force constant $k^b$, while it diverges at distance $b$.
525 %} % Brace matches ifthenelse test for gmxlite
527 \subsection{Harmonic angle potential}
528 \label{subsec:harmonicangle}
529 \newcommand{\tijk}{\theta_{ijk}}
530 The bond-\swapindex{angle}{vibration} between a triplet of atoms $i$ - $j$ - $k$
531 is also represented by a harmonic potential on the angle $\tijk$
533 \begin{figure}
534 \centerline{\raisebox{4cm}{\includegraphics[angle=270,width=5cm]{plots/angle}}\includegraphics[width=7cm]{plots/f-angle}}
535 \caption[Angle vibration.]{Principle of angle vibration (left) and the
536 bond angle potential (right).}
537 \label{fig:angle}
538 \end{figure}
540 \beq
541 V_a(\tijk) = \half k^{\theta}_{ijk}(\tijk-\tijk^0)^2
542 \eeq
543 As the bond-angle vibration is represented by a harmonic potential, the
544 form is the same as the bond stretching (\figref{bstretch1}).
546 The force equations are given by the chain rule:
547 \beq
548 \begin{array}{l}
549 \Fvi ~=~ -\displaystyle\frac{d V_a(\tijk)}{d \rvi} \\
550 \Fvk ~=~ -\displaystyle\frac{d V_a(\tijk)}{d \rvk} \\
551 \Fvj ~=~ -\Fvi-\Fvk
552 \end{array}
553 ~ \mbox{ ~ where ~ } ~
554 \tijk = \arccos \frac{(\rvij \cdot \ve{r}_{kj})}{r_{ij}r_{kj}}
555 \eeq
556 The numbering $i,j,k$ is in sequence of covalently bonded atoms. Atom
557 $j$ is in the middle; atoms $i$ and $k$ are at the ends (see \figref{angle}).
558 {\bf Note} that in the input in topology files, angles are given in degrees and
559 force constants in kJ/mol/rad$^2$.
561 %\ifthenelse{\equal{\gmxlite}{1}}{}{
562 \subsection{Cosine based angle potential}
563 \label{subsec:G96angle}
564 In the \gromosv{96} force field a simplified function is used to represent angle
565 vibrations:
566 \beq
567 V_a(\tijk) = \half k^{\theta}_{ijk}\left(\cos(\tijk) - \cos(\tijk^0)\right)^2
568 \eeq
569 where
570 \beq
571 \cos(\tijk) = \frac{\rvij\cdot\ve{r}_{kj}}{\rij r_{kj}}
572 \eeq
573 The corresponding force can be derived by partial differentiation with respect
574 to the atomic positions. The force constants in this function are related
575 to the force constants in the harmonic form $k^{\theta,harm}$
576 (\ssecref{harmonicangle}) by:
577 \beq
578 k^{\theta} \sin^2(\tijk^0) = k^{\theta,harm}
579 \eeq
580 In the \gromosv{96} manual there is a much more complicated conversion formula
581 which is temperature dependent. The formulas are equivalent at 0 K
582 and the differences at 300 K are on the order of 0.1 to 0.2\%.
583 {\bf Note} that in the input in topology files, angles are given in degrees and
584 force constants in kJ/mol.
586 \subsection{Urey-Bradley potential}
587 \label{subsec:Urey-Bradley}
588 The \swapindex{Urey-Bradley bond-angle}{vibration} between a triplet
589 of atoms $i$ - $j$ - $k$ is represented by a harmonic potential on the
590 angle $\tijk$ and a harmonic correction term on the distance between
591 the atoms $i$ and $k$. Although this can be easily written as a simple
592 sum of two terms, it is convenient to have it as a single entry in the
593 topology file and in the output as a separate energy term. It is used mainly
594 in the CHARMm force field~\cite{BBrooks83}. The energy is given by:
596 \beq
597 V_a(\tijk) = \half k^{\theta}_{ijk}(\tijk-\tijk^0)^2 + \half k^{UB}_{ijk}(r_{ik}-r_{ik}^0)^2
598 \eeq
600 The force equations can be deduced from sections~\ssecref{harmonicbond}
601 and~\ssecref{harmonicangle}.
603 \subsection{Bond-Bond cross term}
604 \label{subsec:bondbondcross}
605 The bond-bond cross term for three particles $i, j, k$ forming bonds
606 $i-j$ and $k-j$ is given by~\cite{Lawrence2003b}:
607 \begin{equation}
608 V_{rr'} ~=~ k_{rr'} \left(\left|\ve{r}_{i}-\ve{r}_j\right|-r_{1e}\right) \left(\left|\ve{r}_{k}-\ve{r}_j\right|-r_{2e}\right)
609 \label{crossbb}
610 \end{equation}
611 where $k_{rr'}$ is the force constant, and $r_{1e}$ and $r_{2e}$ are the
612 equilibrium bond lengths of the $i-j$ and $k-j$ bonds respectively. The force
613 associated with this potential on particle $i$ is:
614 \begin{equation}
615 \ve{F}_{i} = -k_{rr'}\left(\left|\ve{r}_{k}-\ve{r}_j\right|-r_{2e}\right)\frac{\ve{r}_i-\ve{r}_j}{\left|\ve{r}_{i}-\ve{r}_j\right|}
616 \end{equation}
617 The force on atom $k$ can be obtained by swapping $i$ and $k$ in the above
618 equation. Finally, the force on atom $j$ follows from the fact that the sum
619 of internal forces should be zero: $\ve{F}_j = -\ve{F}_i-\ve{F}_k$.
621 \subsection{Bond-Angle cross term}
622 \label{subsec:bondanglecross}
623 The bond-angle cross term for three particles $i, j, k$ forming bonds
624 $i-j$ and $k-j$ is given by~\cite{Lawrence2003b}:
625 \begin{equation}
626 V_{r\theta} ~=~ k_{r\theta} \left(\left|\ve{r}_{i}-\ve{r}_k\right|-r_{3e} \right) \left(\left|\ve{r}_{i}-\ve{r}_j\right|-r_{1e} + \left|\ve{r}_{k}-\ve{r}_j\right|-r_{2e}\right)
627 \end{equation}
628 where $k_{r\theta}$ is the force constant, $r_{3e}$ is the $i-k$ distance,
629 and the other constants are the same as in Equation~\ref{crossbb}. The force
630 associated with the potential on atom $i$ is:
631 \begin{equation}
632 \ve{F}_{i} ~=~ -k_{r\theta}\left[\left(\left|\ve{r}_{i}-\ve{r}_{k}\right|-r_{3e}\right)\frac{\ve{r}_i-\ve{r}_j}{\left|\ve{r}_{i}-\ve{r}_j\right|} \\
633 + \left(\left|\ve{r}_{i}-\ve{r}_j\right|-r_{1e} + \left|\ve{r}_{k}-\ve{r}_j\right|-r_{2e}\right)\frac{\ve{r}_i-\ve{r}_k}{\left|\ve{r}_{i}-\ve{r}_k\right|}\right]
634 \end{equation}
636 \subsection{Quartic angle potential}
637 \label{subsec:quarticangle}
638 For special purposes there is an angle potential
639 that uses a fourth order polynomial:
640 \beq
641 V_q(\tijk) ~=~ \sum_{n=0}^5 C_n (\tijk-\tijk^0)^n
642 \eeq
643 %} % Brace matches ifthenelse test for gmxlite
645 %% new commands %%%%%%%%%%%%%%%%%%%%%%
646 \newcommand{\rvkj}{{\bf r}_{kj}}
647 \newcommand{\rkj}{r_{kj}}
648 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
650 \subsection{Improper dihedrals\swapindexquiet{improper}{dihedral}}
651 \label{sec:imp}
652 Improper dihedrals are meant to keep \swapindex{planar}{group}s ({\eg}
653 aromatic rings) planar, or to prevent molecules from flipping over to their
654 \normindex{mirror image}s, see \figref{imp}.
656 \begin {figure}
657 \centerline{\includegraphics[angle=270,width=4cm]{plots/ring-imp}\hspace{1cm}
658 \includegraphics[angle=270,width=3cm]{plots/subst-im}\hspace{1cm}\includegraphics[angle=270,width=3cm]{plots/tetra-im}}
659 \caption[Improper dihedral angles.]{Principle of improper
660 dihedral angles. Out of plane bending for rings (left), substituents
661 of rings (middle), out of tetrahedral (right). The improper dihedral
662 angle $\xi$ is defined as the angle between planes (i,j,k) and (j,k,l)
663 in all cases.}
664 \label{fig:imp}
665 \end {figure}
667 \subsubsection{Improper dihedrals: harmonic type}
668 \label{subsec:harmonicimproperdihedral}
669 The simplest improper dihedral potential is a harmonic potential; it is plotted in
670 \figref{imps}.
671 \beq
672 V_{id}(\xi_{ijkl}) = \half k_{\xi}(\xi_{ijkl}-\xi_0)^2
673 \eeq
674 Since the potential is harmonic it is discontinuous,
675 but since the discontinuity is chosen at 180$^\circ$ distance from $\xi_0$
676 this will never cause problems.
677 {\bf Note} that in the input in topology files, angles are given in degrees and
678 force constants in kJ/mol/rad$^2$.
680 \begin{figure}
681 \centerline{\includegraphics[width=8cm]{plots/f-imps}}
682 \caption{Improper dihedral potential.}
683 \label{fig:imps}
684 \end{figure}
686 \subsubsection{Improper dihedrals: periodic type}
687 \label{subsec:periodicimproperdihedral}
688 This potential is identical to the periodic proper dihedral (see below).
689 There is a separate dihedral type for this (type 4) only to be able
690 to distinguish improper from proper dihedrals in the parameter section
691 and the output.
693 \subsection{Proper dihedrals\swapindexquiet{proper}{dihedral}}
694 For the normal \normindex{dihedral} interaction there is a choice of
695 either the {\gromos} periodic function or a function based on
696 expansion in powers of $\cos \phi$ (the so-called Ryckaert-Bellemans
697 potential). This choice has consequences for the inclusion of special
698 interactions between the first and the fourth atom of the dihedral
699 quadruple. With the periodic {\gromos} potential a special 1-4
700 LJ-interaction must be included; with the Ryckaert-Bellemans potential
701 {\em for alkanes} the \normindex{1-4 interaction}s must be excluded
702 from the non-bonded list. {\bf Note:} Ryckaert-Bellemans potentials
703 are also used in {\eg} the OPLS force field in combination with 1-4
704 interactions. You should therefore not modify topologies generated by
705 {\tt \normindex{pdb2gmx}} in this case.
707 \subsubsection{Proper dihedrals: periodic type}
708 \label{subsec:properdihedral}
709 Proper dihedral angles are defined according to the IUPAC/IUB
710 convention, where $\phi$ is the angle between the $ijk$ and the $jkl$
711 planes, with {\bf zero} corresponding to the {\em cis} configuration
712 ($i$ and $l$ on the same side). There are two dihedral function types
713 in {\gromacs} topology files. There is the standard type 1 which behaves
714 like any other bonded interactions. For certain force fields, type 9
715 is useful. Type 9 allows multiple potential functions to be applied
716 automatically to a single dihedral in the {\tt [ dihedral ]} section
717 when multiple parameters are defined for the same atomtypes
718 in the {\tt [ dihedraltypes ]} section.
720 \begin{figure}
721 \centerline{\raisebox{4.5cm}{\includegraphics[angle=270,width=5cm]{plots/dih}}\includegraphics[width=7cm]{plots/f-dih}}
722 \caption[Proper dihedral angle.]{Principle of proper dihedral angle
723 (left, in {\em trans} form) and the dihedral angle potential (right).}
724 \label{fig:pdihf}
725 \end{figure}
726 \beq
727 V_d(\phi_{ijkl}) = k_{\phi}(1 + \cos(n \phi - \phi_s))
728 \eeq
730 %\ifthenelse{\equal{\gmxlite}{1}}{}{
731 \subsubsection{Proper dihedrals: Ryckaert-Bellemans function}
732 \label{subsec:RBdihedral}
733 For alkanes, the following proper dihedral potential is often used
734 (see \figref{rbdih}):
735 \beq
736 V_{rb}(\phi_{ijkl}) = \sum_{n=0}^5 C_n( \cos(\psi ))^n,
737 \eeq
738 where $\psi = \phi - 180^\circ$. \\
739 {\bf Note:} A conversion from one convention to another can be achieved by
740 multiplying every coefficient \( \displaystyle C_n \)
741 by \( \displaystyle (-1)^n \).
743 An example of constants for $C$ is given in \tabref{crb}.
745 \begin{table}
746 \centerline{
747 \begin{tabular}{|lr|lr|lr|}
748 \dline
749 $C_0$ & 9.28 & $C_2$ & -13.12 & $C_4$ & 26.24 \\
750 $C_1$ & 12.16 & $C_3$ & -3.06 & $C_5$ & -31.5 \\
751 \dline
752 \end{tabular}
754 \caption{Constants for Ryckaert-Bellemans potential (kJ mol$^{-1}$).}
755 \label{tab:crb}
756 \end{table}
758 \begin{figure}
759 \centerline{\includegraphics[width=8cm]{plots/f-rbs}}
760 \caption{Ryckaert-Bellemans dihedral potential.}
761 \label{fig:rbdih}
762 \end{figure}
764 ({\bf Note:} The use of this potential implies exclusion of LJ interactions
765 between the first and the last atom of the dihedral, and $\psi$ is defined
766 according to the ``polymer convention'' ($\psi_{trans}=0$).)
768 The RB dihedral function can also be used to include Fourier dihedrals
769 (see below):
770 \beq
771 V_{rb} (\phi_{ijkl}) ~=~ \frac{1}{2} \left[F_1(1+\cos(\phi)) + F_2(
772 1-\cos(2\phi)) + F_3(1+\cos(3\phi)) + F_4(1-\cos(4\phi))\right]
773 \eeq
774 Because of the equalities \( \cos(2\phi) = 2\cos^2(\phi) - 1 \),
775 \( \cos(3\phi) = 4\cos^3(\phi) - 3\cos(\phi) \) and
776 \( \cos(4\phi) = 8\cos^4(\phi) - 8\cos^2(\phi) + 1 \)
777 one can translate the OPLS parameters to
778 Ryckaert-Bellemans parameters as follows:
779 \beq
780 \displaystyle
781 \begin{array}{rcl}
782 \displaystyle C_0&=&F_2 + \frac{1}{2} (F_1 + F_3)\\
783 \displaystyle C_1&=&\frac{1}{2} (- F_1 + 3 \, F_3)\\
784 \displaystyle C_2&=& -F_2 + 4 \, F_4\\
785 \displaystyle C_3&=&-2 \, F_3\\
786 \displaystyle C_4&=&-4 \, F_4\\
787 \displaystyle C_5&=&0
788 \end{array}
789 \eeq
790 with OPLS parameters in protein convention and RB parameters in
791 polymer convention (this yields a minus sign for the odd powers of
792 cos$(\phi)$).\\
793 \noindent{\bf Note:} Mind the conversion from {\bf kcal mol$^{-1}$} for
794 literature OPLS and RB parameters to {\bf kJ mol$^{-1}$} in {\gromacs}.\\
795 %} % Brace matches ifthenelse test for gmxlite
797 \subsubsection{Proper dihedrals: Fourier function}
798 \label{subsec:Fourierdihedral}
799 The OPLS potential function is given as the first three
800 or four~\cite{Jorgensen2005a} cosine terms of a Fourier series.
801 In {\gromacs} the four term function is implemented:
802 \beq
803 V_{F} (\phi_{ijkl}) ~=~ \frac{1}{2} \left[C_1(1+\cos(\phi)) + C_2(
804 1-\cos(2\phi)) + C_3(1+\cos(3\phi)) + C_4(1+\cos(4\phi))\right],
805 \eeq
806 %\ifthenelse{\equal{\gmxlite}{1}}{}{
807 Internally, {\gromacs}
808 uses the Ryckaert-Bellemans code
809 to compute Fourier dihedrals (see above), because this is more efficient.\\
810 \noindent{\bf Note:} Mind the conversion from {\emph kcal mol$^{-1}$} for
811 literature OPLS parameters to {\bf kJ mol$^{-1}$} in {\gromacs}.\\
813 %\ifthenelse{\equal{\gmxlite}{1}}{}{
814 \subsection{Tabulated bonded interaction functions\index{tabulated bonded interaction function}}
815 \label{subsec:tabulatedinteraction}
816 For full flexibility, any functional shape can be used for
817 bonds, angles and dihedrals through user-supplied tabulated functions.
818 The functional shapes are:
819 \bea
820 V_b(r_{ij}) &=& k \, f^b_n(r_{ij}) \\
821 V_a(\tijk) &=& k \, f^a_n(\tijk) \\
822 V_d(\phi_{ijkl}) &=& k \, f^d_n(\phi_{ijkl})
823 \eea
824 where $k$ is a force constant in units of energy
825 and $f$ is a cubic spline function; for details see \ssecref{cubicspline}.
826 For each interaction, the force constant $k$ and the table number $n$
827 are specified in the topology.
828 There are two different types of bonds, one that generates exclusions (type 8)
829 and one that does not (type 9).
830 For details see \tabref{topfile2}.
831 The table files are supplied to the {\tt mdrun} program.
832 After the table file name an underscore, the letter ``b'' for bonds,
833 ``a'' for angles or ``d'' for dihedrals and the table number are appended.
834 For example, for a bond with $n=0$ (and using the default table file name)
835 the table is read from the file {\tt table_b0.xvg}. Multiple tables can be
836 supplied simply by using different values of $n$, and are applied to the appropriate
837 bonds, as specified in the topology (\tabref{topfile2}).
838 The format for the table files is three columns with $x$, $f(x)$, $-f'(x)$,
839 where $x$ should be uniformly-spaced. Requirements for entries in the topology
840 are given in~\tabref{topfile2}.
841 The setup of the tables is as follows:
842 \\{\bf bonds}:
843 $x$ is the distance in nm. For distances beyond the table length,
844 {\tt mdrun} will quit with an error message.
845 \\{\bf angles}:
846 $x$ is the angle in degrees. The table should go from
847 0 up to and including 180 degrees; the derivative is taken in degrees.
848 \\{\bf dihedrals}:
849 $x$ is the dihedral angle in degrees. The table should go from
850 -180 up to and including 180 degrees;
851 the IUPAC/IUB convention is used, {\ie} zero is cis,
852 the derivative is taken in degrees.
853 %} % Brace matches ifthenelse test for gmxlite
855 \section{Restraints}
856 Special potentials are used for imposing restraints on the motion of
857 the system, either to avoid disastrous deviations, or to include
858 knowledge from experimental data. In either case they are not really
859 part of the force field and the reliability of the parameters is not
860 important. The potential forms, as implemented in {\gromacs}, are
861 mentioned just for the sake of completeness. Restraints and constraints
862 refer to quite different algorithms in {\gromacs}.
864 \subsection{Position restraints\swapindexquiet{position}{restraint}}
865 \label{subsec:positionrestraint}
866 These are used to restrain particles to fixed reference positions
867 $\ve{R}_i$. They can be used during equilibration in order to avoid
868 drastic rearrangements of critical parts ({\eg} to restrain motion
869 in a protein that is subjected to large solvent forces when the
870 solvent is not yet equilibrated). Another application is the
871 restraining of particles in a shell around a region that is simulated
872 in detail, while the shell is only approximated because it lacks
873 proper interaction from missing particles outside the
874 shell. Restraining will then maintain the integrity of the inner
875 part. For spherical shells, it is a wise procedure to make the force
876 constant depend on the radius, increasing from zero at the inner
877 boundary to a large value at the outer boundary. This feature has
878 not, however, been implemented in {\gromacs}.
879 \newcommand{\unitv}[1]{\hat{\bf #1}}
880 \newcommand{\halfje}[1]{\frac{#1}{2}}
882 The following form is used:
883 \beq
884 V_{pr}(\ve{r}_i) = \halfje{1}k_{pr}|\rvi-\ve{R}_i|^2
885 \eeq
886 The potential is plotted in \figref{positionrestraint}.
888 \begin{figure}
889 \centerline{\includegraphics[width=8cm]{plots/f-pr}}
890 \caption{Position restraint potential.}
891 \label{fig:positionrestraint}
892 \end{figure}
894 The potential form can be rewritten without loss of generality as:
895 \beq
896 V_{pr}(\ve{r}_i) = \halfje{1} \left[ k_{pr}^x (x_i-X_i)^2 ~\unitv{x} + k_{pr}^y (y_i-Y_i)^2 ~\unitv{y} + k_{pr}^z (z_i-Z_i)^2 ~\unitv{z}\right]
897 \eeq
899 Now the forces are:
900 \beq
901 \begin{array}{rcl}
902 F_i^x &=& -k_{pr}^x~(x_i - X_i) \\
903 F_i^y &=& -k_{pr}^y~(y_i - Y_i) \\
904 F_i^z &=& -k_{pr}^z~(z_i - Z_i)
905 \end{array}
906 \eeq
907 Using three different force constants the position
908 restraints can be turned on or off
909 in each spatial dimension; this means that atoms can be harmonically
910 restrained to a plane or a line.
911 Position restraints are applied to a special fixed list of atoms. Such a
912 list is usually generated by the {\tt \normindex{pdb2gmx}} program.
914 \subsection{\swapindex{Flat-bottomed}{position restraint}s}
915 \label{subsec:fbpositionrestraint}
916 Flat-bottomed position restraints can be used to restrain particles to
917 part of the simulation volume. No force acts on the restrained
918 particle within the flat-bottomed region of the potential, however a
919 harmonic force acts to move the particle to the flat-bottomed region
920 if it is outside it. It is possible to apply normal and
921 flat-bottomed position restraints on the same particle (however, only
922 with the same reference position $\ve{R}_i$). The following general potential
923 is used (Figure~\ref{fig:fbposres}A):
924 \beq
925 V_\mathrm{fb}(\ve{r}_i) = \frac{1}{2}k_\mathrm{fb} [d_g(\ve{r}_i;\ve{R}_i) - r_\mathrm{fb}]^2\,H[d_g(\ve{r}_i;\ve{R}_i) - r_\mathrm{fb}],
926 \eeq
927 where $\ve{R}_i$ is the reference position, $r_\mathrm{fb}$ is the distance
928 from the center with a flat potential, $k_\mathrm{fb}$ the force constant, and $H$ is the Heaviside step
929 function. The distance $d_g(\ve{r}_i;\ve{R}_i)$ from the reference
930 position depends on the geometry $g$ of the flat-bottomed potential.
932 \begin{figure}
933 \centerline{\includegraphics[width=10cm]{plots/fbposres}}
934 \caption{Flat-bottomed position restraint potential. (A) Not
935 inverted, (B) inverted.}
936 \label{fig:fbposres}
937 \end{figure}
939 The following geometries for the flat-bottomed potential are supported:\newline
940 {\bfseries Sphere} ($g =1$): The particle is kept in a sphere of given
941 radius. The force acts towards the center of the sphere. The following distance calculation is used:
942 \beq
943 d_g(\ve{r}_i;\ve{R}_i) = |\ve{r}_i-\ve{R}_i|
944 \eeq
945 {\bfseries Cylinder} ($g=2$): The particle is kept in a cylinder of given radius
946 parallel to the $z$-axis. The force from the flat-bottomed potential acts
947 towards the axis of the cylinder. The $z$-component of the force is zero.
948 \beq
949 d_g(\ve{r}_i;\ve{R}_i) = \sqrt{ (x_i-X_i)^2 + (y_i - Y_i)^2 }
950 \eeq
951 {\bfseries Layer} ($g=3,4,5$): The particle is kept in a layer defined by the
952 thickness and the normal of the layer. The layer normal can be parallel to the $x$, $y$, or
953 $z$-axis. The force acts parallel to the layer normal.\\
954 \beq
955 d_g(\ve{r}_i;\ve{R}_i) = |x_i-X_i|, \;\;\;\mbox{or}\;\;\;
956 d_g(\ve{r}_i;\ve{R}_i) = |y_i-Y_i|, \;\;\;\mbox{or}\;\;\;
957 d_g(\ve{r}_i;\ve{R}_i) = |z_i-Z_i|.
958 \eeq
960 It is possible to apply multiple independent flat-bottomed position
961 restraints of different geometry on one particle. For example, applying
962 a cylinder and a layer in $z$ keeps a particle within a
963 disk. Applying three layers in $x$, $y$, and $z$ keeps the particle within a cuboid.
965 In addition, it is possible to invert the restrained region with the
966 unrestrained region, leading to a potential that acts to keep the particle {\it outside} of the volume
967 defined by $\ve{R}_i$, $g$, and $r_\mathrm{fb}$. That feature is
968 switched on by defining a negative $r_\mathrm{fb}$ in the
969 topology. The following potential is used (Figure~\ref{fig:fbposres}B):
970 \beq
971 V_\mathrm{fb}^{\mathrm{inv}}(\ve{r}_i) = \frac{1}{2}k_\mathrm{fb}
972 [d_g(\ve{r}_i;\ve{R}_i) - |r_\mathrm{fb}|]^2\,
973 H[ -(d_g(\ve{r}_i;\ve{R}_i) - |r_\mathrm{fb}|)].
974 \eeq
978 %\ifthenelse{\equal{\gmxlite}{1}}{}{
979 \subsection{Angle restraints\swapindexquiet{angle}{restraint}}
980 \label{subsec:anglerestraint}
981 These are used to restrain the angle between two pairs of particles
982 or between one pair of particles and the $z$-axis.
983 The functional form is similar to that of a proper dihedral.
984 For two pairs of atoms:
985 \beq
986 V_{ar}(\ve{r}_i,\ve{r}_j,\ve{r}_k,\ve{r}_l)
987 = k_{ar}(1 - \cos(n (\theta - \theta_0))
989 ,~~~~\mbox{where}~~
990 \theta = \arccos\left(\frac{\ve{r}_j -\ve{r}_i}{\|\ve{r}_j -\ve{r}_i\|}
991 \cdot \frac{\ve{r}_l -\ve{r}_k}{\|\ve{r}_l -\ve{r}_k\|} \right)
992 \eeq
993 For one pair of atoms and the $z$-axis:
994 \beq
995 V_{ar}(\ve{r}_i,\ve{r}_j) = k_{ar}(1 - \cos(n (\theta - \theta_0))
997 ,~~~~\mbox{where}~~
998 \theta = \arccos\left(\frac{\ve{r}_j -\ve{r}_i}{\|\ve{r}_j -\ve{r}_i\|}
999 \cdot \left( \begin{array}{c} 0 \\ 0 \\ 1 \\ \end{array} \right) \right)
1000 \eeq
1001 A multiplicity ($n$) of 2 is useful when you do not want to distinguish
1002 between parallel and anti-parallel vectors.
1003 The equilibrium angle $\theta$ should be between 0 and 180 degrees
1004 for multiplicity 1 and between 0 and 90 degrees for multiplicity 2.
1007 \subsection{Dihedral restraints\swapindexquiet{dihedral}{restraint}}
1008 \label{subsec:dihedralrestraint}
1009 These are used to restrain the dihedral angle $\phi$ defined by four particles
1010 as in an improper dihedral (sec.~\ref{sec:imp}) but with a slightly
1011 modified potential. Using:
1012 \beq
1013 \phi' = \left(\phi-\phi_0\right) ~{\rm MOD}~ 2\pi
1014 \eeq
1015 where $\phi_0$ is the reference angle, the potential is defined as:
1016 \beq
1017 V_{dihr}(\phi') ~=~ \left\{
1018 \begin{array}{lcllll}
1019 \half k_{dihr}(\phi'-\phi_0-\Delta\phi)^2
1020 &\mbox{for}& \phi' & > & \Delta\phi \\[1.5ex]
1021 0 &\mbox{for}& \phi' & \le & \Delta\phi \\[1.5ex]
1022 \end{array}\right.
1023 \label{eqn:dihre}
1024 \eeq
1025 where $\Delta\phi$ is a user defined angle and $k_{dihr}$ is the force
1026 constant.
1027 {\bf Note} that in the input in topology files, angles are given in degrees and
1028 force constants in kJ/mol/rad$^2$.
1029 %} % Brace matches ifthenelse test for gmxlite
1031 \subsection{Distance restraints\swapindexquiet{distance}{restraint}}
1032 \label{subsec:distancerestraint}
1033 Distance restraints
1034 add a penalty to the potential when the distance between specified
1035 pairs of atoms exceeds a threshold value. They are normally used to
1036 impose experimental restraints from, for instance, experiments in nuclear
1037 magnetic resonance (NMR), on the motion of the system. Thus, MD can be
1038 used for structure refinement using NMR data\index{nmr
1039 refinement}\index{refinement,nmr}.
1040 In {\gromacs} there are three ways to impose restraints on pairs of atoms:
1041 \begin{itemize}
1042 \item Simple harmonic restraints: use {\tt [ bonds ]} type 6
1043 %\ifthenelse{\equal{\gmxlite}{1}}
1045 {(see \secref{excl}).}
1046 \item\label{subsec:harmonicrestraint}Piecewise linear/harmonic restraints: {\tt [ bonds ]} type 10.
1047 \item Complex NMR distance restraints, optionally with pair, time and/or
1048 ensemble averaging.
1049 \end{itemize}
1050 The last two options will be detailed now.
1052 The potential form for distance restraints is quadratic below a specified
1053 lower bound and between two specified upper bounds, and linear beyond the
1054 largest bound (see \figref{dist}).
1055 \beq
1056 V_{dr}(r_{ij}) ~=~ \left\{
1057 \begin{array}{lcllllll}
1058 \half k_{dr}(r_{ij}-r_0)^2
1059 &\mbox{for}& & & r_{ij} & < & r_0 \\[1.5ex]
1060 0 &\mbox{for}& r_0 & \le & r_{ij} & < & r_1 \\[1.5ex]
1061 \half k_{dr}(r_{ij}-r_1)^2
1062 &\mbox{for}& r_1 & \le & r_{ij} & < & r_2 \\[1.5ex]
1063 \half k_{dr}(r_2-r_1)(2r_{ij}-r_2-r_1)
1064 &\mbox{for}& r_2 & \le & r_{ij} & &
1065 \end{array}\right.
1066 \label{eqn:disre}
1067 \eeq
1069 \begin{figure}
1070 \centerline{\includegraphics[width=8cm]{plots/f-dr}}
1071 \caption{Distance Restraint potential.}
1072 \label{fig:dist}
1073 \end{figure}
1075 The forces are
1076 \beq
1077 \ve{F}_i~=~ \left\{
1078 \begin{array}{lcllllll}
1079 -k_{dr}(r_{ij}-r_0)\frac{\rvij}{r_{ij}}
1080 &\mbox{for}& & & r_{ij} & < & r_0 \\[1.5ex]
1081 0 &\mbox{for}& r_0 & \le & r_{ij} & < & r_1 \\[1.5ex]
1082 -k_{dr}(r_{ij}-r_1)\frac{\rvij}{r_{ij}}
1083 &\mbox{for}& r_1 & \le & r_{ij} & < & r_2 \\[1.5ex]
1084 -k_{dr}(r_2-r_1)\frac{\rvij}{r_{ij}}
1085 &\mbox{for}& r_2 & \le & r_{ij} & &
1086 \end{array} \right.
1087 \eeq
1089 For restraints not derived from NMR data, this functionality
1090 will usually suffice and a section of {\tt [ bonds ]} type 10
1091 can be used to apply individual restraints between pairs of
1092 %\ifthenelse{\equal{\gmxlite}{1}}{atoms.}{
1093 atoms, see \ssecref{topfile}.
1094 %} % Brace matches ifthenelse test for gmxlite
1095 For applying restraints derived from NMR measurements, more complex
1096 functionality might be required, which is provided through
1097 the {\tt [~distance_restraints~]} section and is described below.
1099 %\ifthenelse{\equal{\gmxlite}{1}}{}{
1100 \subsubsection{Time averaging\swapindexquiet{time-averaged}{distance restraint}}
1101 Distance restraints based on instantaneous distances can potentially reduce
1102 the fluctuations in a molecule significantly. This problem can be overcome by restraining
1103 to a {\em time averaged} distance~\cite{Torda89}.
1104 The forces with time averaging are:
1105 \beq
1106 \ve{F}_i~=~ \left\{
1107 \begin{array}{lcllllll}
1108 -k^a_{dr}(\bar{r}_{ij}-r_0)\frac{\rvij}{r_{ij}}
1109 &\mbox{for}& & & \bar{r}_{ij} & < & r_0 \\[1.5ex]
1110 0 &\mbox{for}& r_0 & \le & \bar{r}_{ij} & < & r_1 \\[1.5ex]
1111 -k^a_{dr}(\bar{r}_{ij}-r_1)\frac{\rvij}{r_{ij}}
1112 &\mbox{for}& r_1 & \le & \bar{r}_{ij} & < & r_2 \\[1.5ex]
1113 -k^a_{dr}(r_2-r_1)\frac{\rvij}{r_{ij}}
1114 &\mbox{for}& r_2 & \le & \bar{r}_{ij} & &
1115 \end{array} \right.
1116 \eeq
1117 where $\bar{r}_{ij}$ is given by an exponential running average with decay time $\tau$:
1118 \beq
1119 \bar{r}_{ij} ~=~ < r_{ij}^{-3} >^{-1/3}
1120 \label{eqn:rav}
1121 \eeq
1122 The force constant $k^a_{dr}$ is switched on slowly to compensate for
1123 the lack of history at the beginning of the simulation:
1124 \beq
1125 k^a_{dr} = k_{dr} \left(1-\exp\left(-\frac{t}{\tau}\right)\right)
1126 \eeq
1127 Because of the time averaging, we can no longer speak of a distance restraint
1128 potential.
1130 This way an atom can satisfy two incompatible distance restraints
1131 {\em on average} by moving between two positions.
1132 An example would be an amino acid side-chain that is rotating around
1133 its $\chi$ dihedral angle, thereby coming close to various other groups.
1134 Such a mobile side chain can give rise to multiple NOEs that can not be
1135 fulfilled by a single structure.
1137 The computation of the time
1138 averaged distance in the {\tt mdrun} program is done in the following fashion:
1139 \beq
1140 \begin{array}{rcl}
1141 \overline{r^{-3}}_{ij}(0) &=& r_{ij}(0)^{-3} \\
1142 \overline{r^{-3}}_{ij}(t) &=& \overline{r^{-3}}_{ij}(t-\Delta t)~\exp{\left(-\frac{\Delta t}{\tau}\right)} + r_{ij}(t)^{-3}\left[1-\exp{\left(-\frac{\Delta t}{\tau}\right)}\right]
1143 \label{eqn:ravdisre}
1144 \end{array}
1145 \eeq
1147 When a pair is within the bounds, it can still feel a force
1148 because the time averaged distance can still be beyond a bound.
1149 To prevent the protons from being pulled too close together, a mixed
1150 approach can be used. In this approach, the penalty is zero when the
1151 instantaneous distance is within the bounds, otherwise the violation is
1152 the square root of the product of the instantaneous violation and the
1153 time averaged violation:
1154 \beq
1155 \ve{F}_i~=~ \left\{
1156 \begin{array}{lclll}
1157 k^a_{dr}\sqrt{(r_{ij}-r_0)(\bar{r}_{ij}-r_0)}\frac{\rvij}{r_{ij}}
1158 & \mbox{for} & r_{ij} < r_0 & \mbox{and} & \bar{r}_{ij} < r_0 \\[1.5ex]
1159 -k^a _{dr} \,
1160 \mbox{min}\left(\sqrt{(r_{ij}-r_1)(\bar{r}_{ij}-r_1)},r_2-r_1\right)
1161 \frac{\rvij}{r_{ij}}
1162 & \mbox{for} & r_{ij} > r_1 & \mbox{and} & \bar{r}_{ij} > r_1 \\[1.5ex]
1163 0 &\mbox{otherwise}
1164 \end{array} \right.
1165 \eeq
1167 \subsubsection{Averaging over multiple pairs\swapindexquiet{ensemble-averaged}{distance restraint}}
1169 Sometimes it is unclear from experimental data which atom pair
1170 gives rise to a single NOE, in other occasions it can be obvious that
1171 more than one pair contributes due to the symmetry of the system, {\eg} a
1172 methyl group with three protons. For such a group, it is not possible
1173 to distinguish between the protons, therefore they should all be taken into
1174 account when calculating the distance between this methyl group and another
1175 proton (or group of protons).
1176 Due to the physical nature of magnetic resonance, the intensity of the
1177 NOE signal is inversely proportional to the sixth power of the inter-atomic
1178 distance.
1179 Thus, when combining atom pairs,
1180 a fixed list of $N$ restraints may be taken together,
1181 where the apparent ``distance'' is given by:
1182 \beq
1183 r_N(t) = \left [\sum_{n=1}^{N} \bar{r}_{n}(t)^{-6} \right]^{-1/6}
1184 \label{eqn:rsix}
1185 \eeq
1186 where we use $r_{ij}$ or \eqnref{rav} for the $\bar{r}_{n}$.
1187 The $r_N$ of the instantaneous and time-averaged distances
1188 can be combined to do a mixed restraining, as indicated above.
1189 As more pairs of protons contribute to the same NOE signal, the intensity
1190 will increase, and the summed ``distance'' will be shorter than any of
1191 its components due to the reciprocal summation.
1193 There are two options for distributing the forces over the atom pairs.
1194 In the conservative option, the force is defined as the derivative of the
1195 restraint potential with respect to the coordinates. This results in
1196 a conservative potential when time averaging is not used.
1197 The force distribution over the pairs is proportional to $r^{-6}$.
1198 This means that a close pair feels a much larger force than a distant pair,
1199 which might lead to a molecule that is ``too rigid.''
1200 The other option is an equal force distribution. In this case each pair
1201 feels $1/N$ of the derivative of the restraint potential with respect to
1202 $r_N$. The advantage of this method is that more conformations might be
1203 sampled, but the non-conservative nature of the forces can lead to
1204 local heating of the protons.
1206 It is also possible to use {\em ensemble averaging} using multiple
1207 (protein) molecules. In this case the bounds should be lowered as in:
1208 \beq
1209 \begin{array}{rcl}
1210 r_1 &~=~& r_1 * M^{-1/6} \\
1211 r_2 &~=~& r_2 * M^{-1/6}
1212 \end{array}
1213 \eeq
1214 where $M$ is the number of molecules. The {\gromacs} preprocessor {\tt grompp}
1215 can do this automatically when the appropriate option is given.
1216 The resulting ``distance'' is
1217 then used to calculate the scalar force according to:
1218 \beq
1219 \ve{F}_i~=~\left\{
1220 \begin{array}{rcl}
1221 ~& 0 \hspace{4cm} & r_{N} < r_1 \\
1222 & k_{dr}(r_{N}-r_1)\frac{\rvij}{r_{ij}} & r_1 \le r_{N} < r_2 \\
1223 & k_{dr}(r_2-r_1)\frac{\rvij}{r_{ij}} & r_{N} \ge r_2
1224 \end{array} \right.
1225 \eeq
1226 where $i$ and $j$ denote the atoms of all the
1227 pairs that contribute to the NOE signal.
1229 \subsubsection{Using distance restraints}
1231 A list of distance restrains based on NOE data can be added to a molecule
1232 definition in your topology file, like in the following example:
1234 \begin{verbatim}
1235 [ distance_restraints ]
1236 ; ai aj type index type' low up1 up2 fac
1237 10 16 1 0 1 0.0 0.3 0.4 1.0
1238 10 28 1 1 1 0.0 0.3 0.4 1.0
1239 10 46 1 1 1 0.0 0.3 0.4 1.0
1240 16 22 1 2 1 0.0 0.3 0.4 2.5
1241 16 34 1 3 1 0.0 0.5 0.6 1.0
1242 \end{verbatim}
1244 In this example a number of features can be found. In columns {\tt
1245 ai} and {\tt aj} you find the atom numbers of the particles to be
1246 restrained. The {\tt type} column should always be 1. As explained in
1247 ~\ssecref{distancerestraint}, multiple distances can contribute to a single NOE
1248 signal. In the topology this can be set using the {\tt index}
1249 column. In our example, the restraints 10-28 and 10-46 both have index
1250 1, therefore they are treated simultaneously. An extra requirement
1251 for treating restraints together is that the restraints must be on
1252 successive lines, without any other intervening restraint. The {\tt
1253 type'} column will usually be 1, but can be set to 2 to obtain a
1254 distance restraint that will never be time- and ensemble-averaged;
1255 this can be useful for restraining hydrogen bonds. The columns {\tt
1256 low}, {\tt up1}, and {\tt up2} hold the values of $r_0$, $r_1$, and
1257 $r_2$ from ~\eqnref{disre}. In some cases it can be useful to have
1258 different force constants for some restraints; this is controlled by
1259 the column {\tt fac}. The force constant in the parameter file is
1260 multiplied by the value in the column {\tt fac} for each restraint.
1261 %} % Brace matches ifthenelse test for gmxlite
1263 \newcommand{\SSS}{{\mathbf S}}
1264 \newcommand{\DD}{{\mathbf D}}
1265 \newcommand{\RR}{{\mathbf R}}
1267 %\ifthenelse{\equal{\gmxlite}{1}}{}{
1268 \subsection{Orientation restraints\swapindexquiet{orientation}{restraint}}
1269 \label{subsec:orientationrestraint}
1270 This section describes how orientations between vectors,
1271 as measured in certain NMR experiments, can be calculated
1272 and restrained in MD simulations.
1273 The presented refinement methodology and a comparison of results
1274 with and without time and ensemble averaging have been
1275 published~\cite{Hess2003}.
1276 \subsubsection{Theory}
1277 In an NMR experiment, orientations of vectors can be measured when a
1278 molecule does not tumble completely isotropically in the solvent.
1279 Two examples of such orientation measurements are
1280 residual \normindex{dipolar couplings}
1281 (between two nuclei) or chemical shift anisotropies.
1282 An observable for a vector $\ve{r}_i$ can be written as follows:
1283 \beq
1284 \delta_i = \frac{2}{3} \mbox{tr}(\SSS\DD_i)
1285 \eeq
1286 where $\SSS$ is the dimensionless order tensor of the molecule.
1287 The tensor $\DD_i$ is given by:
1288 \beq
1289 \label{orient_def}
1290 \DD_i = \frac{c_i}{\|\ve{r}_i\|^\alpha} \left(
1291 %\begin{array}{lll}
1292 %3 r_x r_x - \ve{r}\cdot\ve{r} & 3 r_x r_y & 3 r_x r_z \\
1293 %3 r_x r_y & 3 r_y r_y - \ve{r}\cdot\ve{r} & 3yz \\
1294 %3 r_x r_z & 3 r_y r_z & 3 r_z r_z - \ve{r}\cdot\ve{r}
1295 %\end{array} \right)
1296 \begin{array}{lll}
1297 3 x x - 1 & 3 x y & 3 x z \\
1298 3 x y & 3 y y - 1 & 3 y z \\
1299 3 x z & 3 y z & 3 z z - 1 \\
1300 \end{array} \right)
1301 \eeq
1302 \beq
1303 \mbox{with:} \quad
1304 x=\frac{r_{i,x}}{\|\ve{r}_i\|}, \quad
1305 y=\frac{r_{i,y}}{\|\ve{r}_i\|}, \quad
1306 z=\frac{r_{i,z}}{\|\ve{r}_i\|}
1307 \eeq
1308 For a dipolar coupling $\ve{r}_i$ is the vector connecting the two
1309 nuclei, $\alpha=3$ and the constant $c_i$ is given by:
1310 \beq
1311 c_i = \frac{\mu_0}{4\pi} \gamma_1^i \gamma_2^i \frac{\hbar}{4\pi}
1312 \eeq
1313 where $\gamma_1^i$ and $\gamma_2^i$ are the gyromagnetic ratios of the
1314 two nuclei.
1316 The order tensor is symmetric and has trace zero. Using a rotation matrix
1317 ${\mathbf T}$ it can be transformed into the following form:
1318 \beq
1319 {\mathbf T}^T \SSS {\mathbf T} = s \left( \begin{array}{ccc}
1320 -\frac{1}{2}(1-\eta) & 0 & 0 \\
1321 0 & -\frac{1}{2}(1+\eta) & 0 \\
1322 0 & 0 & 1
1323 \end{array} \right)
1324 \eeq
1325 where $-1 \leq s \leq 1$ and $0 \leq \eta \leq 1$.
1326 $s$ is called the order parameter and $\eta$ the asymmetry of the
1327 order tensor $\SSS$. When the molecule tumbles isotropically in the
1328 solvent, $s$ is zero, and no orientational effects can be observed
1329 because all $\delta_i$ are zero.
1331 %\newpage
1333 \subsubsection{Calculating orientations in a simulation}
1334 For reasons which are explained below, the $\DD$ matrices are calculated
1335 which respect to a reference orientation of the molecule. The orientation
1336 is defined by a rotation matrix $\RR$, which is needed to least-squares fit
1337 the current coordinates of a selected set of atoms onto
1338 a reference conformation. The reference conformation is the starting
1339 conformation of the simulation. In case of ensemble averaging, which will
1340 be treated later, the structure is taken from the first subsystem.
1341 The calculated $\DD_i^c$ matrix is given by:
1342 \begin{equation}
1343 \label{D_rot}
1344 \DD_i^c(t) = \RR(t) \DD_i(t) \RR^T(t)
1345 \end{equation}
1346 The calculated orientation for vector $i$ is given by:
1347 \beq
1348 \delta^c_i(t) = \frac{2}{3} \mbox{tr}(\SSS(t)\DD_i^c(t))
1349 \eeq
1350 The order tensor $\SSS(t)$ is usually unknown.
1351 A reasonable choice for the order tensor is the tensor
1352 which minimizes the (weighted) mean square difference between the calculated
1353 and the observed orientations:
1354 \begin{equation}
1355 \label{S_msd}
1356 MSD(t) = \left(\sum_{i=1}^N w_i\right)^{-1} \sum_{i=1}^N w_i (\delta_i^c (t) -\delta_i^{exp})^2
1357 \end{equation}
1358 To properly combine different types of measurements, the unit of $w_i$ should
1359 be such that all terms are dimensionless. This means the unit of $w_i$
1360 is the unit of $\delta_i$ to the power $-2$.
1361 {\bf Note} that scaling all $w_i$ with a constant factor does not influence
1362 the order tensor.
1364 \subsubsection{Time averaging}
1365 Since the tensors $\DD_i$ fluctuate rapidly in time, much faster than can
1366 be observed in an experiment, they should be averaged over time in the simulation.
1367 However, in a simulation the time and the number of copies of
1368 a molecule are limited. Usually one can not obtain a converged average
1369 of the $\DD_i$ tensors over all orientations of the molecule.
1370 If one assumes that the average orientations of the $\ve{r}_i$ vectors
1371 within the molecule converge much faster than the tumbling time of
1372 the molecule, the tensor can be averaged in an axis system that
1373 rotates with the molecule, as expressed by equation~(\ref{D_rot}).
1374 The time-averaged tensors are calculated
1375 using an exponentially decaying memory function:
1376 \beq
1377 \DD^a_i(t) = \frac{\displaystyle
1378 \int_{u=t_0}^t \DD^c_i(u) \exp\left(-\frac{t-u}{\tau}\right)\mbox{d} u
1379 }{\displaystyle
1380 \int_{u=t_0}^t \exp\left(-\frac{t-u}{\tau}\right)\mbox{d} u
1382 \eeq
1383 Assuming that the order tensor $\SSS$ fluctuates slower than the
1384 $\DD_i$, the time-averaged orientation can be calculated as:
1385 \beq
1386 \delta_i^a(t) = \frac{2}{3} \mbox{tr}(\SSS(t) \DD_i^a(t))
1387 \eeq
1388 where the order tensor $\SSS(t)$ is calculated using expression~(\ref{S_msd})
1389 with $\delta_i^c(t)$ replaced by $\delta_i^a(t)$.
1391 \subsubsection{Restraining}
1392 The simulated structure can be restrained by applying a force proportional
1393 to the difference between the calculated and the experimental orientations.
1394 When no time averaging is applied, a proper potential can be defined as:
1395 \beq
1396 V = \frac{1}{2} k \sum_{i=1}^N w_i (\delta_i^c (t) -\delta_i^{exp})^2
1397 \eeq
1398 where the unit of $k$ is the unit of energy.
1399 Thus the effective force constant for restraint $i$ is $k w_i$.
1400 The forces are given by minus the gradient of $V$.
1401 The force $\ve{F}\!_i$ working on vector $\ve{r}_i$ is:
1402 \begin{eqnarray*}
1403 \ve{F}\!_i(t)
1404 & = & - \frac{\mbox{d} V}{\mbox{d}\ve{r}_i} \\
1405 & = & -k w_i (\delta_i^c (t) -\delta_i^{exp}) \frac{\mbox{d} \delta_i (t)}{\mbox{d}\ve{r}_i} \\
1406 & = & -k w_i (\delta_i^c (t) -\delta_i^{exp})
1407 \frac{2 c_i}{\|\ve{r}\|^{2+\alpha}} \left(2 \RR^T \SSS \RR \ve{r}_i - \frac{2+\alpha}{\|\ve{r}\|^2} \mbox{tr}(\RR^T \SSS \RR \ve{r}_i \ve{r}_i^T) \ve{r}_i \right)
1408 \end{eqnarray*}
1410 \subsubsection{Ensemble averaging}
1411 Ensemble averaging can be applied by simulating a system of $M$ subsystems
1412 that each contain an identical set of orientation restraints. The systems only
1413 interact via the orientation restraint potential which is defined as:
1414 \beq
1415 V = M \frac{1}{2} k \sum_{i=1}^N w_i
1416 \langle \delta_i^c (t) -\delta_i^{exp} \rangle^2
1417 \eeq
1418 The force on vector $\ve{r}_{i,m}$ in subsystem $m$ is given by:
1419 \beq
1420 \ve{F}\!_{i,m}(t) = - \frac{\mbox{d} V}{\mbox{d}\ve{r}_{i,m}} =
1421 -k w_i \langle \delta_i^c (t) -\delta_i^{exp} \rangle \frac{\mbox{d} \delta_{i,m}^c (t)}{\mbox{d}\ve{r}_{i,m}} \\
1422 \eeq
1424 \subsubsection{Time averaging}
1425 When using time averaging it is not possible to define a potential.
1426 We can still define a quantity that gives a rough idea of the energy
1427 stored in the restraints:
1428 \beq
1429 V = M \frac{1}{2} k^a \sum_{i=1}^N w_i
1430 \langle \delta_i^a (t) -\delta_i^{exp} \rangle^2
1431 \eeq
1432 The force constant $k_a$ is switched on slowly to compensate for the
1433 lack of history at times close to $t_0$. It is exactly proportional
1434 to the amount of average that has been accumulated:
1435 \beq
1436 k^a =
1437 k \, \frac{1}{\tau}\int_{u=t_0}^t \exp\left(-\frac{t-u}{\tau}\right)\mbox{d} u
1438 \eeq
1439 What really matters is the definition of the force. It is chosen to
1440 be proportional to the square root of the product of the time-averaged
1441 and the instantaneous deviation.
1442 Using only the time-averaged deviation induces large oscillations.
1443 The force is given by:
1444 \beq
1445 \ve{F}\!_{i,m}(t) =
1446 %\left\{ \begin{array}{ll}
1447 %0 & \mbox{for} \quad \langle \delta_i^a (t) -\delta_i^{exp} \rangle \langle \delta_i (t) -\delta_i^{exp} \rangle \leq 0 \\
1448 %... & \mbox{for} \quad \langle \delta_i^a (t) -\delta_i^{exp} \rangle \langle \delta_i (t) -\delta_i^{exp} \rangle > 0
1449 %\end{array}
1450 %\right.
1451 \left\{ \begin{array}{ll}
1452 0 & \quad \mbox{for} \quad a\, b \leq 0 \\
1453 \displaystyle
1454 k^a w_i \frac{a}{|a|} \sqrt{a\, b} \, \frac{\mbox{d} \delta_{i,m}^c (t)}{\mbox{d}\ve{r}_{i,m}}
1455 & \quad \mbox{for} \quad a\, b > 0
1456 \end{array}
1457 \right.
1458 \eeq
1459 \begin{eqnarray*}
1460 a &=& \langle \delta_i^a (t) -\delta_i^{exp} \rangle \\
1461 b &=& \langle \delta_i^c (t) -\delta_i^{exp} \rangle
1462 \end{eqnarray*}
1464 \subsubsection{Using orientation restraints}
1465 Orientation restraints can be added to a molecule definition in
1466 the topology file in the section {\tt [~orientation_restraints~]}.
1467 Here we give an example section containing five N-H residual dipolar
1468 coupling restraints:
1470 \begin{verbatim}
1471 [ orientation_restraints ]
1472 ; ai aj type exp. label alpha const. obs. weight
1473 ; Hz nm^3 Hz Hz^-2
1474 31 32 1 1 3 3 6.083 -6.73 1.0
1475 43 44 1 1 4 3 6.083 -7.87 1.0
1476 55 56 1 1 5 3 6.083 -7.13 1.0
1477 65 66 1 1 6 3 6.083 -2.57 1.0
1478 73 74 1 1 7 3 6.083 -2.10 1.0
1479 \end{verbatim}
1481 The unit of the observable is Hz, but one can choose any other unit.
1482 In columns {\tt
1483 ai} and {\tt aj} you find the atom numbers of the particles to be
1484 restrained. The {\tt type} column should always be 1.
1485 The {\tt exp.} column denotes the experiment number, starting
1486 at 1. For each experiment a separate order tensor $\SSS$
1487 is optimized. The label should be a unique number larger than zero
1488 for each restraint. The {\tt alpha} column contains the power $\alpha$
1489 that is used in equation~(\ref{orient_def}) to calculate the orientation.
1490 The {\tt const.} column contains the constant $c_i$ used in the same
1491 equation. The constant should have the unit of the observable times
1492 nm$^\alpha$. The column {\tt obs.} contains the observable, in any
1493 unit you like. The last column contains the weights $w_i$; the unit
1494 should be the inverse of the square of the unit of the observable.
1496 Some parameters for orientation restraints can be specified in the
1497 {\tt grompp.mdp} file, for a study of the effect of different
1498 force constants and averaging times and ensemble averaging see~\cite{Hess2003}.
1499 %} % Brace matches ifthenelse test for gmxlite
1501 %\ifthenelse{\equal{\gmxlite}{1}}{}{
1502 \section{Polarization}
1503 Polarization can be treated by {\gromacs} by attaching
1504 \normindex{shell} (\normindex{Drude}) particles to atoms and/or
1505 virtual sites. The energy of the shell particle is then minimized at
1506 each time step in order to remain on the Born-Oppenheimer surface.
1508 \subsection{Simple polarization}
1509 This is merely a harmonic potential with equilibrium distance 0.
1511 \subsection{Water polarization}
1512 A special potential for water that allows anisotropic polarization of
1513 a single shell particle~\cite{Maaren2001a}.
1515 \subsection{Thole polarization}
1516 Based on early work by \normindex{Thole}~\cite{Thole81}, Roux and
1517 coworkers have implemented potentials for molecules like
1518 ethanol~\cite{Lamoureux2003a,Lamoureux2003b,Noskov2005a}. Within such
1519 molecules, there are intra-molecular interactions between shell
1520 particles, however these must be screened because full Coulomb would
1521 be too strong. The potential between two shell particles $i$ and $j$ is:
1522 \newcommand{\rbij}{\bar{r}_{ij}}
1523 \beq
1524 V_{thole} ~=~ \frac{q_i q_j}{r_{ij}}\left[1-\left(1+\frac{\rbij}{2}\right){\rm exp}^{-\rbij}\right]
1525 \eeq
1526 {\bf Note} that there is a sign error in Equation~1 of Noskov {\em et al.}~\cite{Noskov2005a}:
1527 \beq
1528 \rbij ~=~ a\frac{r_{ij}}{(\alpha_i \alpha_j)^{1/6}}
1529 \eeq
1530 where $a$ is a magic (dimensionless) constant, usually chosen to be
1531 2.6~\cite{Noskov2005a}; $\alpha_i$ and $\alpha_j$ are the polarizabilities
1532 of the respective shell particles.
1534 %} % Brace matches ifthenelse test for gmxlite
1536 %\ifthenelse{\equal{\gmxlite}{1}}{}{
1537 \section{Free energy interactions}
1538 \label{sec:feia}
1539 \index{free energy interactions}
1540 \newcommand{\LAM}{\lambda}
1541 \newcommand{\LL}{(1-\LAM)}
1542 \newcommand{\dvdl}[1]{\frac{\partial #1}{\partial \LAM}}
1543 This section describes the $\lambda$-dependence of the potentials
1544 used for free energy calculations (see \secref{fecalc}).
1545 All common types of potentials and constraints can be
1546 interpolated smoothly from state A ($\lambda=0$) to state B
1547 ($\lambda=1$) and vice versa.
1548 All bonded interactions are interpolated by linear interpolation
1549 of the interaction parameters. Non-bonded interactions can be
1550 interpolated linearly or via soft-core interactions.
1552 Starting in {\gromacs} 4.6, $\lambda$ is a vector, allowing different
1553 components of the free energy transformation to be carried out at
1554 different rates. Coulomb, Lennard-Jones, bonded, and restraint terms
1555 can all be controlled independently, as described in the {\tt .mdp}
1556 options.
1558 \subsubsection{Harmonic potentials}
1559 The example given here is for the bond potential, which is harmonic
1560 in {\gromacs}. However, these equations apply to the angle potential
1561 and the improper dihedral potential as well.
1562 \bea
1563 V_b &=&\half\left[\LL k_b^A +
1564 \LAM k_b^B\right] \left[b - \LL b_0^A - \LAM b_0^B\right]^2 \\
1565 \dvdl{V_b}&=&\half(k_b^B-k_b^A)
1566 \left[b - \LL b_0^A + \LAM b_0^B\right]^2 +
1567 \nonumber\\
1568 & & \phantom{\half}(b_0^A-b_0^B) \left[b - \LL b_0^A -\LAM b_0^B\right]
1569 \left[\LL k_b^A + \LAM k_b^B \right]
1570 \eea
1572 \subsubsection{\gromosv{96} bonds and angles}
1573 Fourth-power bond stretching and cosine-based angle potentials
1574 are interpolated by linear interpolation of the force constant
1575 and the equilibrium position. Formulas are not given here.
1577 \subsubsection{Proper dihedrals}
1578 For the proper dihedrals, the equations are somewhat more complicated:
1579 \bea
1580 V_d &=&\left[\LL k_d^A + \LAM k_d^B \right]
1581 \left( 1+ \cos\left[n_{\phi} \phi -
1582 \LL \phi_s^A - \LAM \phi_s^B
1583 \right]\right)\\
1584 \dvdl{V_d}&=&(k_d^B-k_d^A)
1585 \left( 1+ \cos
1586 \left[
1587 n_{\phi} \phi- \LL \phi_s^A - \LAM \phi_s^B
1588 \right]
1589 \right) +
1590 \nonumber\\
1591 &&(\phi_s^B - \phi_s^A) \left[\LL k_d^A - \LAM k_d^B\right]
1592 \sin\left[ n_{\phi}\phi - \LL \phi_s^A - \LAM \phi_s^B \right]
1593 \eea
1594 {\bf Note:} that the multiplicity $n_{\phi}$ can not be parameterized
1595 because the function should remain periodic on the interval $[0,2\pi]$.
1597 \subsubsection{Tabulated bonded interactions}
1598 For tabulated bonded interactions only the force constant can interpolated:
1599 \bea
1600 V &=& (\LL k^A + \LAM k^B) \, f \\
1601 \dvdl{V} &=& (k^B - k^A) \, f
1602 \eea
1604 \subsubsection{Coulomb interaction}
1605 The \normindex{Coulomb} interaction between two particles
1606 of which the charge varies with $\LAM$ is:
1607 \bea
1608 V_c &=& \frac{f}{\epsrf \rij}\left[\LL q_i^A q_j^A + \LAM\, q_i^B q_j^B\right] \\
1609 \dvdl{V_c}&=& \frac{f}{\epsrf \rij}\left[- q_i^A q_j^A + q_i^B q_j^B\right]
1610 \eea
1611 where $f = \frac{1}{4\pi \varepsilon_0} = 138.935\,485$ (see \chref{defunits}).
1613 \subsubsection{Coulomb interaction with \normindex{reaction field}}
1614 The Coulomb interaction including a reaction field, between two particles
1615 of which the charge varies with $\LAM$ is:
1616 \bea
1617 V_c &=& f\left[\frac{1}{\rij} + k_{rf}~ \rij^2 -c_{rf}\right]
1618 \left[\LL q_i^A q_j^A + \LAM\, q_i^B q_j^B\right] \\
1619 \dvdl{V_c}&=& f\left[\frac{1}{\rij} + k_{rf}~ \rij^2 -c_{rf}\right]
1620 \left[- q_i^A q_j^A + q_i^B q_j^B\right]
1621 \label{eq:dVcoulombdlambda}
1622 \eea
1623 {\bf Note} that the constants $k_{rf}$ and $c_{rf}$ are
1624 defined using the dielectric
1625 constant $\epsrf$ of the medium (see \secref{coulrf}).
1627 \subsubsection{Lennard-Jones interaction}
1628 For the \normindex{Lennard-Jones} interaction between two particles
1629 of which the {\em atom type} varies with $\LAM$ we can write:
1630 \bea
1631 V_{LJ} &=& \frac{\LL C_{12}^A + \LAM\, C_{12}^B}{\rij^{12}} -
1632 \frac{\LL C_6^A + \LAM\, C_6^B}{\rij^6} \\
1633 \dvdl{V_{LJ}}&=&\frac{C_{12}^B - C_{12}^A}{\rij^{12}} -
1634 \frac{C_6^B - C_6^A}{\rij^6}
1635 \label{eq:dVljdlambda}
1636 \eea
1637 It should be noted that it is also possible to express a pathway from
1638 state A to state B using $\sigma$ and $\epsilon$ (see \eqnref{sigeps}).
1639 It may seem to make sense physically to vary the force field parameters
1640 $\sigma$ and $\epsilon$ rather
1641 than the derived parameters $C_{12}$ and $C_{6}$.
1642 However, the difference between the pathways in parameter space
1643 is not large, and the free energy itself
1644 does not depend on the pathway, so we use the simple formulation
1645 presented above.
1647 \subsubsection{Kinetic Energy}
1648 When the mass of a particle changes, there is also a contribution of
1649 the kinetic energy to the free energy (note that we can not write
1650 the momentum \ve{p} as m\ve{v}, since that would result
1651 in the sign of $\dvdl{E_k}$ being incorrect~\cite{Gunsteren98a}):
1653 \bea
1654 E_k &=& \half\frac{\ve{p}^2}{\LL m^A + \LAM m^B} \\
1655 \dvdl{E_k}&=& -\half\frac{\ve{p}^2(m^B-m^A)}{(\LL m^A + \LAM m^B)^2}
1656 \eea
1657 after taking the derivative, we {\em can} insert \ve{p} = m\ve{v}, such that:
1658 \beq
1659 \dvdl{E_k}~=~ -\half\ve{v}^2(m^B-m^A)
1660 \eeq
1662 \subsubsection{Constraints}
1663 \label{subsubsec:constraints}
1664 \newcommand{\clam}{C_{\lambda}}
1665 The constraints are formally part of the Hamiltonian, and therefore
1666 they give a contribution to the free energy. In {\gromacs} this can be
1667 calculated using the \normindex{LINCS} or the \normindex{SHAKE} algorithm.
1668 If we have a number of constraint equations $g_k$:
1669 \beq
1670 g_k = \ve{r}_{k} - d_{k}
1671 \eeq
1672 where $\ve{r}_k$ is the distance vector between two particles and
1673 $d_k$ is the constraint distance between the two particles, we can write
1674 this using a $\LAM$-dependent distance as
1675 \beq
1676 g_k = \ve{r}_{k} - \left(\LL d_{k}^A + \LAM d_k^B\right)
1677 \eeq
1678 the contribution $\clam$
1679 to the Hamiltonian using Lagrange multipliers $\lambda$:
1680 \bea
1681 \clam &=& \sum_k \lambda_k g_k \\
1682 \dvdl{\clam} &=& \sum_k \lambda_k \left(d_k^B-d_k^A\right)
1683 \eea
1686 \subsection{Soft-core interactions\index{soft-core interactions}}
1687 \begin{figure}
1688 \centerline{\includegraphics[height=6cm]{plots/softcore}}
1689 \caption{Soft-core interactions at $\LAM=0.5$, with $p=2$ and
1690 $C_6^A=C_{12}^A=C_6^B=C_{12}^B=1$.}
1691 \label{fig:softcore}
1692 \end{figure}
1693 In a free-energy calculation where particles grow out of nothing, or
1694 particles disappear, using the the simple linear interpolation of the
1695 Lennard-Jones and Coulomb potentials as described in Equations~\ref{eq:dVljdlambda}
1696 and \ref{eq:dVcoulombdlambda} may lead to poor convergence. When the particles have nearly disappeared, or are close to appearing (at $\LAM$ close to 0 or 1), the interaction energy will be weak enough for particles to get very
1697 close to each other, leading to large fluctuations in the measured values of
1698 $\partial V/\partial \LAM$ (which, because of the simple linear
1699 interpolation, depends on the potentials at both the endpoints of $\LAM$).
1701 To circumvent these problems, the singularities in the potentials need to be removed. This can be done by modifying the regular Lennard-Jones and Coulomb potentials with ``soft-core'' potentials that limit the energies and forces
1702 involved at $\LAM$ values between 0 and 1, but not \emph{at} $\LAM=0$
1703 or 1.
1705 In {\gromacs} the soft-core potentials $V_{sc}$ are shifted versions of the
1706 regular potentials, so that the singularity in the potential and its
1707 derivatives at $r=0$ is never reached:
1708 \bea
1709 V_{sc}(r) &=& \LL V^A(r_A) + \LAM V^B(r_B)
1711 r_A &=& \left(\alpha \sigma_A^6 \LAM^p + r^6 \right)^\frac{1}{6}
1713 r_B &=& \left(\alpha \sigma_B^6 \LL^p + r^6 \right)^\frac{1}{6}
1714 \eea
1715 where $V^A$ and $V^B$ are the normal ``hard core'' Van der Waals or
1716 electrostatic potentials in state A ($\LAM=0$) and state B ($\LAM=1$)
1717 respectively, $\alpha$ is the soft-core parameter (set with {\tt sc_alpha}
1718 in the {\tt .mdp} file), $p$ is the soft-core $\LAM$ power (set with
1719 {\tt sc_power}), $\sigma$ is the radius of the interaction, which is
1720 $(C_{12}/C_6)^{1/6}$ or an input parameter ({\tt sc_sigma}) when $C_6$
1721 or $C_{12}$ is zero.
1723 For intermediate $\LAM$, $r_A$ and $r_B$ alter the interactions very little
1724 for $r > \alpha^{1/6} \sigma$ and quickly switch the soft-core
1725 interaction to an almost constant value for smaller $r$ (\figref{softcore}).
1726 The force is:
1727 \beq
1728 F_{sc}(r) = -\frac{\partial V_{sc}(r)}{\partial r} =
1729 \LL F^A(r_A) \left(\frac{r}{r_A}\right)^5 +
1730 \LAM F^B(r_B) \left(\frac{r}{r_B}\right)^5
1731 \eeq
1732 where $F^A$ and $F^B$ are the ``hard core'' forces.
1733 The contribution to the derivative of the free energy is:
1734 \bea
1735 \dvdl{V_{sc}(r)} & = &
1736 V^B(r_B) -V^A(r_A) +
1737 \LL \frac{\partial V^A(r_A)}{\partial r_A}
1738 \frac{\partial r_A}{\partial \LAM} +
1739 \LAM\frac{\partial V^B(r_B)}{\partial r_B}
1740 \frac{\partial r_B}{\partial \LAM}
1741 \nonumber\\
1743 V^B(r_B) -V^A(r_A) + \nonumber \\
1745 \frac{p \alpha}{6}
1746 \left[ \LAM F^B(r_B) r^{-5}_B \sigma_B^6 \LL^{p-1} -
1747 \LL F^A(r_A) r^{-5}_A \sigma_A^6 \LAM^{p-1} \right]
1748 \eea
1750 The original GROMOS Lennard-Jones soft-core function~\cite{Beutler94}
1751 uses $p=2$, but $p=1$ gives a smoother $\partial H/\partial\LAM$ curve.
1752 %When the changes between the two states involve both the disappearing
1753 %and appearing of atoms, it is important that the overlapping of atoms
1754 %happens around $\LAM=0.5$. This can usually be achieved with
1755 %$\alpha$$\approx0.7$ for $p=1$ and $\alpha$$\approx1.5$ for $p=2$.
1756 %MRS: this is now eliminated as of 4.6, since changes between atoms are done linearly.
1758 Another issue that should be considered is the soft-core effect of hydrogens
1759 without Lennard-Jones interaction. Their soft-core $\sigma$ is
1760 set with {\tt sc-sigma} in the {\tt .mdp} file. These hydrogens
1761 produce peaks in $\partial H/\partial\LAM$ at $\LAM$ is 0 and/or 1 for $p=1$
1762 and close to 0 and/or 1 with $p=2$. Lowering {\tt\mbox{sc-sigma}} will decrease
1763 this effect, but it will also increase the interactions with hydrogens
1764 relative to the other interactions in the soft-core state.
1766 When soft core potentials are selected (by setting {\tt sc-alpha} \textgreater
1767 0), and the Coulomb and Lennard-Jones potentials are turned on or off
1768 sequentially, then the Coulombic interaction is turned off linearly,
1769 rather than using soft core interactions, which should be less
1770 statistically noisy in most cases. This behavior can be overwritten
1771 by using the mdp option {\tt sc-coul} to 'yes'. Additionally, the
1772 soft-core interaction potential is only applied when either the A or B
1773 state has zero interaction potential. If both A and B states have
1774 nonzero interaction potential, default linear scaling described above
1775 is used. When both Coulombic and Lennard-Jones interactions are turned
1776 off simultaneously, a soft-core potential is used, and a hydrogen is
1777 being introduced or deleted, the sigma is set to {\tt sc-sigma-min},
1778 which itself defaults to {\tt sc-sigma-default}.
1780 Recently, a new formulation of the soft-core approach has been derived
1781 that in most cases gives lower and more even statistical variance than
1782 the standard soft-core path described above.~\cite{Pham2011,Pham2012}
1783 Specifically, we have:
1784 \bea
1785 V_{sc}(r) &=& \LL V^A(r_A) + \LAM V^B(r_B)
1787 r_A &=& \left(\alpha \sigma_A^{48} \LAM^p + r^{48} \right)^\frac{1}{48}
1789 r_B &=& \left(\alpha \sigma_B^{48} \LL^p + r^{48} \right)^\frac{1}{48}
1790 \eea
1791 This ``1-1-48'' path is also implemented in {\gromacs}. Note that for this path the soft core $\alpha$
1792 should satisfy $0.001 < \alpha < 0.003$,rather than $\alpha \approx
1793 0.5$.
1795 %} % Brace matches ifthenelse test for gmxlite
1797 %\ifthenelse{\equal{\gmxlite}{1}}{}{
1798 \section{Methods}
1799 \subsection{Exclusions and 1-4 Interactions.}
1800 Atoms within a molecule that are close by in the chain,
1801 {\ie} atoms that are covalently bonded, or linked by one or two
1802 atoms are called {\em first neighbors, second neighbors} and
1803 {\em \swapindex{third}{neighbor}s}, respectively (see \figref{chain}).
1804 Since the interactions of atom {\bf i} with atoms {\bf i+1} and {\bf i+2}
1805 are mainly quantum mechanical, they can not be modeled by a Lennard-Jones potential.
1806 Instead it is assumed that these interactions are adequately modeled
1807 by a harmonic bond term or constraint ({\bf i, i+1}) and a harmonic angle term
1808 ({\bf i, i+2}). The first and second neighbors (atoms {\bf i+1} and {\bf i+2})
1809 are therefore
1810 {\em excluded} from the Lennard-Jones \swapindex{interaction}{list}
1811 of atom {\bf i};
1812 atoms {\bf i+1} and {\bf i+2} are called {\em \normindex{exclusions}} of atom {\bf i}.
1814 \begin{figure}
1815 \centerline{\includegraphics[angle=270,width=8cm]{plots/chain}}
1816 \caption{Atoms along an alkane chain.}
1817 \label{fig:chain}
1818 \end{figure}
1820 For third neighbors, the normal Lennard-Jones repulsion is sometimes
1821 still too strong, which means that when applied to a molecule, the
1822 molecule would deform or break due to the internal strain. This is
1823 especially the case for carbon-carbon interactions in a {\em
1824 cis}-conformation ({\eg} {\em cis}-butane). Therefore, for some of these
1825 interactions, the Lennard-Jones repulsion has been reduced in the
1826 {\gromos} force field, which is implemented by keeping a separate list of
1827 1-4 and normal Lennard-Jones parameters. In other force fields, such
1828 as OPLS~\cite{Jorgensen88}, the standard Lennard-Jones parameters are reduced
1829 by a factor of two, but in that case also the dispersion (r$^{-6}$)
1830 and the Coulomb interaction are scaled.
1831 {\gromacs} can use either of these methods.
1833 \subsection{Charge Groups\index{charge group}}
1834 \label{sec:cg}
1835 In principle, the force calculation in MD is an $O(N^2)$ problem.
1836 Therefore, we apply a \normindex{cut-off} for non-bonded force (NBF)
1837 calculations; only the particles within a certain distance of each
1838 other are interacting. This reduces the cost to $O(N)$ (typically
1839 $100N$ to $200N$) of the NBF. It also introduces an error, which is,
1840 in most cases, acceptable, except when applying the cut-off implies
1841 the creation of charges, in which case you should consider using the
1842 lattice sum methods provided by {\gromacs}.
1844 Consider a water molecule interacting with another atom. When we would apply
1845 the cut-off on an atom-atom basis we might include the atom-oxygen
1846 interaction (with a charge of $-0.82$) without the compensating charge
1847 of the protons, and as a result, induce a large dipole moment over the system.
1848 Therefore, we have to keep groups of atoms with total charge
1849 0 together. These groups are called {\em charge groups}.
1851 \subsection{Treatment of Cut-offs\index{cut-off}}
1852 \newcommand{\rs}{$r_{short}$}
1853 \newcommand{\rl}{$r_{long}$}
1854 {\gromacs} is quite flexible in treating cut-offs, which implies
1855 there can be quite a number of parameters to set. These parameters are
1856 set in the input file for {\tt grompp}. There are two sort of parameters
1857 that affect the cut-off interactions; you can select which type
1858 of interaction to use in each case, and which cut-offs should be
1859 used in the neighbor searching.
1861 For both Coulomb and van der Waals interactions there are interaction
1862 type selectors (termed {\tt vdwtype} and {\tt coulombtype}) and two
1863 parameters, for a total of six non-bonded interaction parameters. See
1864 \secref{mdpopt} for a complete description of these parameters.
1866 The neighbor searching (NS) can be performed using a single-range, or a twin-range
1867 approach. Since the former is merely a special case of the latter, we will
1868 discuss the more general twin-range. In this case, NS is described by two
1869 radii: {\tt rlist} and max({\tt rcoulomb},{\tt rvdw}).
1870 Usually one builds the neighbor list every 10 time steps
1871 or every 20 fs (parameter {\tt nstlist}). In the neighbor list, all interaction
1872 pairs that fall within {\tt rlist} are stored. Furthermore, the
1873 interactions between pairs that do not
1874 fall within {\tt rlist} but do fall within max({\tt rcoulomb},{\tt rvdw})
1875 are computed during NS. The
1876 forces and energy are stored separately and added to short-range forces
1877 at every time step between successive NS. If {\tt rlist} =
1878 max({\tt rcoulomb},{\tt rvdw}), no forces
1879 are evaluated during neighbor list generation.
1880 The \normindex{virial} is calculated from the sum of the short- and
1881 long-range forces.
1882 This means that the virial can be slightly asymmetrical at non-NS steps.
1883 In single precision, the virial is almost always asymmetrical because the
1884 off-diagonal elements are about as large as each element in the sum.
1885 In most cases this is not really a problem, since the fluctuations in the
1886 virial can be 2 orders of magnitude larger than the average.
1888 Except for the plain cut-off,
1889 all of the interaction functions in \tabref{funcparm}
1890 require that neighbor searching be done with a larger radius than the $r_c$
1891 specified for the functional form, because of the use of charge groups.
1892 The extra radius is typically of the order of 0.25 nm (roughly the
1893 largest distance between two atoms in a charge group plus the distance a
1894 charge group can diffuse within neighbor list updates).
1896 %If your charge groups are very large it may be interesting to turn off charge
1897 %groups, by setting the option
1898 %{\tt bAtomList = yes} in your {\tt grompp.mdp} file.
1899 %In this case only a small extra radius to account for diffusion needs to be
1900 %added (0.1 nm). Do not however use this together with the plain cut-off
1901 %method, as it will generate large artifacts (\secref{cg}).
1902 %In summary, there are four parameters that describe NS behavior:
1903 %{\tt nstlist} (update frequency in number of time steps),
1904 %{\tt bAtomList} (whether or not charge groups are used to generate neighbor list, the default is to use charge groups, so {\tt bAtomList = no}),
1905 %{\tt rshort} and {\tt rlong} which are the two radii {\rs} and {\rl}
1906 %described above.
1908 \begin{table}[ht]
1909 \centering
1910 \begin{tabular}{|ll|l|}
1911 \dline
1912 \multicolumn{2}{|c|}{Type} & Parameters \\
1913 \hline
1914 Coulomb&Plain cut-off & $r_c$, $\epsr$ \\
1915 &Reaction field & $r_c$, $\epsrf$ \\
1916 &Shift function & $r_1$, $r_c$, $\epsr$ \\
1917 &Switch function & $r_1$, $r_c$, $\epsr$ \\
1918 \hline
1919 VdW&Plain cut-off & $r_c$ \\
1920 &Shift function & $r_1$, $r_c$ \\
1921 &Switch function & $r_1$, $r_c$ \\
1922 \dline
1923 \end{tabular}
1924 \caption[Parameters for the different functional forms of the
1925 non-bonded interactions.]{Parameters for the different functional
1926 forms of the non-bonded interactions.}
1927 \label{tab:funcparm}
1928 \end{table}
1929 %} % Brace matches ifthenelse test for gmxlite
1932 \newcommand{\vvis}{\ve{r}_s}
1933 \newcommand{\Fi}{\ve{F}_i'}
1934 \newcommand{\Fj}{\ve{F}_j'}
1935 \newcommand{\Fk}{\ve{F}_k'}
1936 \newcommand{\Fl}{\ve{F}_l'}
1937 \newcommand{\Fvis}{\ve{F}_{s}}
1938 \newcommand{\rvik}{\ve{r}_{ik}}
1939 \newcommand{\rvis}{\ve{r}_{is}}
1940 \newcommand{\rvjk}{\ve{r}_{jk}}
1941 \newcommand{\rvjl}{\ve{r}_{jl}}
1943 %\ifthenelse{\equal{\gmxlite}{1}}{}{
1944 \section{Virtual interaction sites\index{virtual interaction sites}}
1945 \label{sec:virtual_sites}
1946 Virtual interaction sites (called \seeindex{dummy atoms}{virtual interaction sites} in {\gromacs} versions before 3.3)
1947 can be used in {\gromacs} in a number of ways.
1948 We write the position of the virtual site $\ve{r}_s$ as a function of
1949 the positions of other particles \ve{r}$_i$: $\ve{r}_s =
1950 f(\ve{r}_1..\ve{r}_n)$. The virtual site, which may carry charge or be
1951 involved in other interactions, can now be used in the force
1952 calculation. The force acting on the virtual site must be
1953 redistributed over the particles with mass in a consistent way.
1954 A good way to do this can be found in ref.~\cite{Berendsen84b}.
1955 We can write the potential energy as:
1956 \beq
1957 V = V(\vvis,\ve{r}_1,\ldots,\ve{r}_n) = V^*(\ve{r}_1,\ldots,\ve{r}_n)
1958 \eeq
1959 The force on the particle $i$ is then:
1960 \beq
1961 \ve{F}_i = -\frac{\partial V^*}{\partial \ve{r}_i}
1962 = -\frac{\partial V}{\partial \ve{r}_i} -
1963 \frac{\partial V}{\partial \vvis}
1964 \frac{\partial \vvis}{\partial \ve{r}_i}
1965 = \ve{F}_i^{direct} + \Fi
1966 \eeq
1967 The first term is the normal force.
1968 The second term is the force on particle $i$ due to the virtual site, which
1969 can be written in tensor notation:
1970 \newcommand{\partd}[2]{\displaystyle\frac{\partial #1}{\partial #2_i}}
1971 \beq
1972 \Fi = \left[\begin{array}{ccc}
1973 \partd{x_s}{x} & \partd{y_s}{x} & \partd{z_s}{x} \\[1ex]
1974 \partd{x_s}{y} & \partd{y_s}{y} & \partd{z_s}{y} \\[1ex]
1975 \partd{x_s}{z} & \partd{y_s}{z} & \partd{z_s}{z}
1976 \end{array}\right]\Fvis
1977 \label{eqn:fvsite}
1978 \eeq
1979 where $\Fvis$ is the force on the virtual site and $x_s$, $y_s$ and
1980 $z_s$ are the coordinates of the virtual site. In this way, the total
1981 force and the total torque are conserved~\cite{Berendsen84b}.
1983 The computation of the \normindex{virial}
1984 (\eqnref{Xi}) is non-trivial when virtual sites are used. Since the
1985 virial involves a summation over all the atoms (rather than virtual
1986 sites), the forces must be redistributed from the virtual sites to the
1987 atoms (using ~\eqnref{fvsite}) {\em before} computation of the
1988 virial. In some special cases where the forces on the atoms can be
1989 written as a linear combination of the forces on the virtual sites (types 2
1990 and 3 below) there is no difference between computing the virial
1991 before and after the redistribution of forces. However, in the
1992 general case redistribution should be done first.
1994 \begin{figure}
1995 \centerline{\includegraphics[width=15cm]{plots/dummies}}
1996 \caption[Virtual site construction.]{The six different types of virtual
1997 site construction in \protect{\gromacs}. The constructing atoms are
1998 shown as black circles, the virtual sites in gray.}
1999 \label{fig:vsites}
2000 \end{figure}
2002 There are six ways to construct virtual sites from surrounding atoms in
2003 {\gromacs}, which we classify by the number of constructing
2004 atoms. {\bf Note} that all site types mentioned can be constructed from
2005 types 3fd (normalized, in-plane) and 3out (non-normalized, out of
2006 plane). However, the amount of computation involved increases sharply
2007 along this list, so we strongly recommended using the first adequate
2008 virtual site type that will be sufficient for a certain purpose.
2009 \figref{vsites} depicts 6 of the available virtual site constructions.
2010 The conceptually simplest construction types are linear combinations:
2011 \beq
2012 \vvis = \sum_{i=1}^N w_i \, \ve{r}_i
2013 \eeq
2014 The force is then redistributed using the same weights:
2015 \beq
2016 \Fi = w_i \, \Fvis
2017 \eeq
2019 The types of virtual sites supported in {\gromacs} are given in the list below.
2020 Constructing atoms in virtual sites can be virtual sites themselves, but
2021 only if they are higher in the list, i.e. virtual sites can be
2022 constructed from ``particles'' that are simpler virtual sites.
2023 \begin{itemize}
2024 \item[{\bf\sf 2.}]\label{subsec:vsite2}As a linear combination of two atoms
2025 (\figref{vsites} 2):
2026 \beq
2027 w_i = 1 - a ~,~~ w_j = a
2028 \eeq
2029 In this case the virtual site is on the line through atoms $i$ and
2030 $j$.
2032 \item[{\bf\sf 3.}]\label{subsec:vsite3}As a linear combination of three atoms
2033 (\figref{vsites} 3):
2034 \beq
2035 w_i = 1 - a - b ~,~~ w_j = a ~,~~ w_k = b
2036 \eeq
2037 In this case the virtual site is in the plane of the other three
2038 particles.
2040 \item[{\bf\sf 3fd.}]\label{subsec:vsite3fd}In the plane of three atoms, with a fixed distance
2041 (\figref{vsites} 3fd):
2042 \beq
2043 \vvis ~=~ \ve{r}_i + b \frac{ \rvij + a \rvjk }
2044 {| \rvij + a \rvjk |}
2045 \eeq
2046 In this case the virtual site is in the plane of the other three
2047 particles at a distance of $|b|$ from $i$.
2048 The force on particles $i$, $j$ and $k$ due to the force on the virtual
2049 site can be computed as:
2050 \beq
2051 \begin{array}{lcr}
2052 \Fi &=& \displaystyle \Fvis - \gamma ( \Fvis - \ve{p} ) \\[1ex]
2053 \Fj &=& \displaystyle (1-a)\gamma (\Fvis - \ve{p}) \\[1ex]
2054 \Fk &=& \displaystyle a \gamma (\Fvis - \ve{p}) \\
2055 \end{array}
2056 ~\mbox{~ where~ }~
2057 \begin{array}{c}
2058 \displaystyle \gamma = \frac{b}{| \rvij + a \rvjk |} \\[2ex]
2059 \displaystyle \ve{p} = \frac{ \rvis \cdot \Fvis }
2060 { \rvis \cdot \rvis } \rvis
2061 \end{array}
2062 \eeq
2064 \item[{\bf\sf 3fad.}]\label{subsec:vsite3fad}In the plane of three atoms, with a fixed angle and
2065 distance (\figref{vsites} 3fad):
2066 \beq
2067 \label{eqn:vsite2fad-F}
2068 \vvis ~=~ \ve{r}_i +
2069 d \cos \theta \frac{\rvij}{|\rvij|} +
2070 d \sin \theta \frac{\ve{r}_\perp}{|\ve{r}_\perp|}
2071 ~\mbox{~ where~ }~
2072 \ve{r}_\perp ~=~ \rvjk -
2073 \frac{ \rvij \cdot \rvjk }
2074 { \rvij \cdot \rvij }
2075 \rvij
2076 \eeq
2077 In this case the virtual site is in the plane of the other three
2078 particles at a distance of $|d|$ from $i$ at an angle of
2079 $\alpha$ with $\rvij$. Atom $k$ defines the plane and the
2080 direction of the angle. {\bf Note} that in this case $b$ and
2081 $\alpha$ must be specified, instead of $a$ and $b$ (see also
2082 \secref{vsitetop}). The force on particles $i$, $j$ and $k$
2083 due to the force on the virtual site can be computed as (with
2084 $\ve{r}_\perp$ as defined in \eqnref{vsite2fad-F}):
2085 \newcommand{\dfrac}{\displaystyle\frac}
2086 \beq
2087 \begin{array}{c}
2088 \begin{array}{lclllll}
2089 \Fi &=& \Fvis &-&
2090 \dfrac{d \cos \theta}{|\rvij|} \ve{F}_1 &+&
2091 \dfrac{d \sin \theta}{|\ve{r}_\perp|} \left(
2092 \dfrac{ \rvij \cdot \rvjk }
2093 { \rvij \cdot \rvij } \ve{F}_2 +
2094 \ve{F}_3 \right) \\[3ex]
2095 \Fj &=& &&
2096 \dfrac{d \cos \theta}{|\rvij|} \ve{F}_1 &-&
2097 \dfrac{d \sin \theta}{|\ve{r}_\perp|} \left(
2098 \ve{F}_2 +
2099 \dfrac{ \rvij \cdot \rvjk }
2100 { \rvij \cdot \rvij } \ve{F}_2 +
2101 \ve{F}_3 \right) \\[3ex]
2102 \Fk &=& && &&
2103 \dfrac{d \sin \theta}{|\ve{r}_\perp|} \ve{F}_2 \\[3ex]
2104 \end{array} \\[5ex]
2105 \mbox{where ~}
2106 \ve{F}_1 = \Fvis -
2107 \dfrac{ \rvij \cdot \Fvis }
2108 { \rvij \cdot \rvij } \rvij
2109 \mbox{\,, ~}
2110 \ve{F}_2 = \ve{F}_1 -
2111 \dfrac{ \ve{r}_\perp \cdot \Fvis }
2112 { \ve{r}_\perp \cdot \ve{r}_\perp } \ve{r}_\perp
2113 \mbox{~and ~}
2114 \ve{F}_3 = \dfrac{ \rvij \cdot \Fvis }
2115 { \rvij \cdot \rvij } \ve{r}_\perp
2116 \end{array}
2117 \eeq
2119 \item[{\bf\sf 3out.}]\label{subsec:vsite3out}As a non-linear combination of three atoms, out of plane
2120 (\figref{vsites} 3out):
2121 \beq
2122 \vvis ~=~ \ve{r}_i + a \rvij + b \rvik +
2123 c (\rvij \times \rvik)
2124 \eeq
2125 This enables the construction of virtual sites out of the plane of the
2126 other atoms.
2127 The force on particles $i,j$ and $k$ due to the force on the virtual
2128 site can be computed as:
2129 \beq
2130 \begin{array}{lcl}
2131 \vspace{4mm}
2132 \Fj &=& \left[\begin{array}{ccc}
2133 a & -c\,z_{ik} & c\,y_{ik} \\[0.5ex]
2134 c\,z_{ik} & a & -c\,x_{ik} \\[0.5ex]
2135 -c\,y_{ik} & c\,x_{ik} & a
2136 \end{array}\right]\Fvis \\
2137 \vspace{4mm}
2138 \Fk &=& \left[\begin{array}{ccc}
2139 b & c\,z_{ij} & -c\,y_{ij} \\[0.5ex]
2140 -c\,z_{ij} & b & c\,x_{ij} \\[0.5ex]
2141 c\,y_{ij} & -c\,x_{ij} & b
2142 \end{array}\right]\Fvis \\
2143 \Fi &=& \Fvis - \Fj - \Fk
2144 \end{array}
2145 \eeq
2147 \item[{\bf\sf 4fdn.}]\label{subsec:vsite4fdn}From four atoms, with a fixed distance, see separate Fig.\ \ref{fig:vsite-4fdn}.
2148 This construction is a bit
2149 complex, in particular since the previous type (4fd) could be unstable which forced us
2150 to introduce a more elaborate construction:
2152 \begin{figure}
2153 \centerline{\includegraphics[width=5cm]{plots/vsite-4fdn}}
2154 \caption {The new 4fdn virtual site construction, which is stable even when all constructing
2155 atoms are in the same plane.}
2156 \label{fig:vsite-4fdn}
2157 \end{figure}
2159 \begin{eqnarray}
2160 \mathbf{r}_{ja} &=& a\, \mathbf{r}_{ik} - \mathbf{r}_{ij} = a\, (\mathbf{x}_k - \mathbf{x}_i) - (\mathbf{x}_j - \mathbf{x}_i) \nonumber \\
2161 \mathbf{r}_{jb} &=& b\, \mathbf{r}_{il} - \mathbf{r}_{ij} = b\, (\mathbf{x}_l - \mathbf{x}_i) - (\mathbf{x}_j - \mathbf{x}_i) \nonumber \\
2162 \mathbf{r}_m &=& \mathbf{r}_{ja} \times \mathbf{r}_{jb} \nonumber \\
2163 \mathbf{x}_s &=& \mathbf{x}_i + c \frac{\mathbf{r}_m}{|\mathbf{r}_m|}
2164 \label{eq:vsite}
2165 \end{eqnarray}
2167 In this case the virtual site is at a distance of $|c|$ from $i$, while $a$ and $b$ are
2168 parameters. {\bf Note} that the vectors $\mathbf{r}_{ik}$ and $\mathbf{r}_{ij}$ are not normalized
2169 to save floating-point operations.
2170 The force on particles $i$, $j$, $k$ and $l$ due to the force
2171 on the virtual site are computed through chain rule derivatives
2172 of the construction expression. This is exact and conserves energy,
2173 but it does lead to relatively lengthy expressions that we do not
2174 include here (over 200 floating-point operations). The interested reader can
2175 look at the source code in \verb+vsite.c+. Fortunately, this vsite type is normally
2176 only used for chiral centers such as $C_{\alpha}$ atoms in proteins.
2178 The new 4fdn construct is identified with a `type' value of 2 in the topology. The earlier 4fd
2179 type is still supported internally (`type' value 1), but it should not be used for
2180 new simulations. All current {\gromacs} tools will automatically generate type 4fdn instead.
2183 \item[{\bf\sf N.}]\label{subsec:vsiteN} A linear combination of $N$ atoms with relative
2184 weights $a_i$. The weight for atom $i$ is:
2185 \beq
2186 w_i = a_i \left(\sum_{j=1}^N a_j \right)^{-1}
2187 \eeq
2188 There are three options for setting the weights:
2189 \begin{itemize}
2190 \item[COG] center of geometry: equal weights
2191 \item[COM] center of mass: $a_i$ is the mass of atom $i$;
2192 when in free-energy simulations the mass of the atom is changed,
2193 only the mass of the A-state is used for the weight
2194 \item[COW] center of weights: $a_i$ is defined by the user
2195 \end{itemize}
2197 \end{itemize}
2198 %} % Brace matches ifthenelse test for gmxlite
2200 \newcommand{\dr}{{\rm d}r}
2201 \newcommand{\avcsix}{\left< C_6 \right>}
2203 %\ifthenelse{\equal{\gmxlite}{1}}{}{
2204 \section{Long Range Electrostatics}
2205 \label{sec:lr_elstat}
2206 \subsection{Ewald summation\index{Ewald sum}}
2207 \label{sec:ewald}
2208 The total electrostatic energy of $N$ particles and their periodic
2209 images\index{periodic boundary conditions} is given by
2210 \begin{equation}
2211 V=\frac{f}{2}\sum_{n_x}\sum_{n_y}
2212 \sum_{n_{z}*} \sum_{i}^{N} \sum_{j}^{N}
2213 \frac{q_i q_j}{{\bf r}_{ij,{\bf n}}}.
2214 \label{eqn:totalcoulomb}
2215 \end{equation}
2216 $(n_x,n_y,n_z)={\bf n}$ is the box index vector, and the star indicates that
2217 terms with $i=j$ should be omitted when $(n_x,n_y,n_z)=(0,0,0)$. The
2218 distance ${\bf r}_{ij,{\bf n}}$ is the real distance between the charges and
2219 not the minimum-image. This sum is conditionally convergent, but
2220 very slow.
2222 Ewald summation was first introduced as a method to calculate
2223 long-range interactions of the periodic images in
2224 crystals~\cite{Ewald21}. The idea is to convert the single
2225 slowly-converging sum \eqnref{totalcoulomb} into two
2226 quickly-converging terms and a constant term:
2227 \begin{eqnarray}
2228 V &=& V_{dir} + V_{rec} + V_{0} \\[0.5ex]
2229 V_{dir} &=& \frac{f}{2} \sum_{i,j}^{N}
2230 \sum_{n_x}\sum_{n_y}
2231 \sum_{n_{z}*} q_i q_j \frac{\mbox{erfc}(\beta {r}_{ij,{\bf n}} )}{{r}_{ij,{\bf n}}} \\[0.5ex]
2232 V_{rec} &=& \frac{f}{2 \pi V} \sum_{i,j}^{N} q_i q_j
2233 \sum_{m_x}\sum_{m_y}
2234 \sum_{m_{z}*} \frac{\exp{\left( -(\pi {\bf m}/\beta)^2 + 2 \pi i
2235 {\bf m} \cdot ({\bf r}_i - {\bf r}_j)\right)}}{{\bf m}^2} \\[0.5ex]
2236 V_{0} &=& -\frac{f \beta}{\sqrt{\pi}}\sum_{i}^{N} q_i^2,
2237 \end{eqnarray}
2238 where $\beta$ is a parameter that determines the relative weight of the
2239 direct and reciprocal sums and ${\bf m}=(m_x,m_y,m_z)$.
2240 In this way we can use a short cut-off (of the order of $1$~nm) in the direct space sum and a
2241 short cut-off in the reciprocal space sum ({\eg} 10 wave vectors in each
2242 direction). Unfortunately, the computational cost of the reciprocal
2243 part of the sum increases as $N^2$
2244 (or $N^{3/2}$ with a slightly better algorithm) and it is therefore not
2245 realistic for use in large systems.
2247 \subsubsection{Using Ewald}
2248 Don't use Ewald unless you are absolutely sure this is what you want -
2249 for almost all cases the PME method below will perform much better.
2250 If you still want to employ classical Ewald summation enter this in
2251 your {\tt .mdp} file, if the side of your box is about $3$~nm:
2253 \begin{verbatim}
2254 coulombtype = Ewald
2255 rvdw = 0.9
2256 rlist = 0.9
2257 rcoulomb = 0.9
2258 fourierspacing = 0.6
2259 ewald-rtol = 1e-5
2260 \end{verbatim}
2262 The ratio of the box dimensions and the {\tt fourierspacing} parameter determines
2263 the highest magnitude of wave vectors $m_x,m_y,m_z$ to use in each
2264 direction. With a 3-nm cubic box this example would use $11$ wave vectors
2265 (from $-5$ to $5$) in each direction. The {\tt ewald-rtol} parameter
2266 is the relative strength of the electrostatic interaction at the
2267 cut-off. Decreasing this gives you a more accurate direct sum, but a
2268 less accurate reciprocal sum.
2270 \subsection{\normindex{PME}}
2271 \label{sec:pme}
2272 Particle-mesh Ewald is a method proposed by Tom
2273 Darden~\cite{Darden93} to improve the performance of the
2274 reciprocal sum. Instead of directly summing wave vectors, the charges
2275 are assigned to a grid using interpolation. The implementation in
2276 {\gromacs} uses cardinal B-spline interpolation~\cite{Essmann95},
2277 which is referred to as smooth PME (SPME).
2278 The grid is then Fourier transformed with a 3D FFT algorithm and the
2279 reciprocal energy term obtained by a single sum over the grid in
2280 k-space.
2282 The potential at the grid points is calculated by inverse
2283 transformation, and by using the interpolation factors we get the
2284 forces on each atom.
2286 The PME algorithm scales as $N \log(N)$, and is substantially faster
2287 than ordinary Ewald summation on medium to large systems. On very
2288 small systems it might still be better to use Ewald to avoid the
2289 overhead in setting up grids and transforms.
2290 For the parallelization of PME see the section on MPMD PME (\ssecref{mpmd_pme}).
2292 With the Verlet cut-off scheme, the PME direct space potential is
2293 shifted by a constant such that the potential is zero at the
2294 cut-off. This shift is small and since the net system charge is close
2295 to zero, the total shift is very small, unlike in the case of the
2296 Lennard-Jones potential where all shifts add up. We apply the shift
2297 anyhow, such that the potential is the exact integral of the force.
2299 \subsubsection{Using PME}
2300 To use Particle-mesh Ewald summation in {\gromacs}, specify the
2301 following lines in your {\tt .mdp} file:
2303 \begin{verbatim}
2304 coulombtype = PME
2305 rvdw = 0.9
2306 rlist = 0.9
2307 rcoulomb = 0.9
2308 fourierspacing = 0.12
2309 pme-order = 4
2310 ewald-rtol = 1e-5
2311 \end{verbatim}
2313 In this case the {\tt fourierspacing} parameter determines the maximum
2314 spacing for the FFT grid (i.e. minimum number of grid points),
2315 and {\tt pme-order} controls the
2316 interpolation order. Using fourth-order (cubic) interpolation and this
2317 spacing should give electrostatic energies accurate to about
2318 $5\cdot10^{-3}$. Since the Lennard-Jones energies are not this
2319 accurate it might even be possible to increase this spacing slightly.
2321 Pressure scaling works with PME, but be aware of the fact that
2322 anisotropic scaling can introduce artificial ordering in some systems.
2324 \subsection{\normindex{P3M-AD}}
2325 \label{sec:pppm}
2326 The \seeindex{Particle-Particle Particle-Mesh}{P3M} methods of
2327 Hockney \& Eastwood can also be applied in {\gromacs} for the
2328 treatment of long range electrostatic interactions~\cite{Hockney81}.
2329 Although the P3M method was the first efficient long-range electrostatics
2330 method for molecular simulation, the smooth PME (SPME) method has largely
2331 replaced P3M as the method of choice in atomistic simulations. One performance
2332 disadvantage of the original P3M method was that it required 3 3D-FFT
2333 back transforms to obtain the forces on the particles. But this is not
2334 required for P3M and the forces can be derived through analytical differentiation
2335 of the potential, as done in PME. The resulting method is termed P3M-AD.
2336 The only remaining difference between P3M-AD and PME is the optimization
2337 of the lattice Green influence function for error minimization that P3M uses.
2338 However, in 2012 it has been shown that the SPME influence function can be
2339 modified to obtain P3M~\cite{Ballenegger2012}.
2340 This means that the advantage of error minimization in P3M-AD can be used
2341 at the same computational cost and with the same code as PME,
2342 just by adding a few lines to modify the influence function.
2343 However, at optimal parameter setting the effect of error minimization
2344 in P3M-AD is less than 10\%. P3M-AD does show large accuracy gains with
2345 interlaced (also known as staggered) grids, but that is not supported
2346 in {\gromacs} (yet).
2348 P3M is used in {\gromacs} with exactly the same options as used with PME
2349 by selecting the electrostatics type:
2350 \begin{verbatim}
2351 coulombtype = P3M-AD
2352 \end{verbatim}
2354 \subsection{Optimizing Fourier transforms}
2355 To get the best possible performance you should try to avoid large
2356 prime numbers for grid dimensions.
2357 The FFT code used in {\gromacs} is
2358 optimized for grid sizes of the form $2^a 3^b 5^c 7^d 11^e 13^f$,
2359 where $e+f$ is $0$ or $1$ and the other exponents arbitrary. (See
2360 further the documentation of the FFT algorithms at
2361 \href{http://www.fftw.org}{www.fftw.org}.
2363 It is also possible to optimize the transforms for the current problem
2364 by performing some calculations at the start of the run. This is not
2365 done by default since it takes a couple of minutes, but for large
2366 runs it will save time. Turn it on by specifying
2368 \begin{verbatim}
2369 optimize-fft = yes
2370 \end{verbatim}
2371 in your {\tt .mdp} file.
2373 When running in parallel, the grid must be communicated several times,
2374 thus hurting scaling performance. With PME you can improve this
2375 by increasing grid spacing while simultaneously increasing the
2376 interpolation to {\eg} sixth order.
2377 Since the interpolation is entirely local, doing so will
2378 improve the scaling in most cases.
2381 % Temporarily removed since I am not sure about the state of the testlr
2382 % program...
2384 %It is possible to test the accuracy of your settings using the program
2385 %{\tt\normindex{testlr}} in the {\tt src/gmxlib} dir. This program computes
2386 %forces and potentials using PPPM and an Ewald implementation and gives the
2387 %absolute and RMS errors in both:
2388 %\begin{verbatim}
2389 %ERROR ANALYSIS
2390 %Error: Max Abs RMS
2391 %Force 1.132 0.251
2392 %Potential 0.113 0.035
2393 %\end{verbatim}
2394 %{\bf Note:} these numbers were generated using a grid spacing of
2395 %0.058 nm and $r_c$ = 1.0 nm.
2397 %You can see what the accuracy is without optimizing the
2398 %$\hat{G}(k)$ function, if you pass the {\tt -ghat} option to {\tt
2399 %testlr}. Try it if you think the {\tt mk_ghat} procedure is a waste
2400 %of time.
2401 %} % Brace matches ifthenelse test for gmxlite
2404 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2405 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2408 %\ifthenelse{\equal{\gmxlite}{1}}{}{
2409 \section{Long Range Van der Waals interactions}
2410 \subsection{Dispersion correction\index{dispersion correction}}
2411 In this section, we derive long-range corrections due to the use of a
2412 cut-off for Lennard-Jones or Buckingham interactions.
2413 We assume that the cut-off is
2414 so long that the repulsion term can safely be neglected, and therefore
2415 only the dispersion term is taken into account. Due to the nature of
2416 the dispersion interaction (we are truncating a potential proportional
2417 to $-r^{-6}$), energy and pressure corrections are both negative. While
2418 the energy correction is usually small, it may be important for free
2419 energy calculations where differences between two different Hamiltonians
2420 are considered. In contrast, the pressure correction is very large and
2421 can not be neglected under any circumstances where a correct pressure is
2422 required, especially for any NPT simulations. Although it is, in
2423 principle, possible to parameterize a force field such that the pressure
2424 is close to the desired experimental value without correction, such a
2425 method makes the parameterization dependent on the cut-off and is therefore
2426 undesirable.
2428 \subsubsection{Energy}
2429 \label{sec:ecorr}
2430 The long-range contribution of the dispersion interaction to the
2431 virial can be derived analytically, if we assume a homogeneous
2432 system beyond the cut-off distance $r_c$. The dispersion energy
2433 between two particles is written as:
2434 \beq
2435 V(\rij) ~=~- C_6\,\rij^{-6}
2436 \eeq
2437 and the corresponding force is:
2438 \beq
2439 \Fvij ~=~- 6\,C_6\,\rij^{-8}\rvij
2440 \eeq
2441 In a periodic system it is not easy to calculate the full potentials,
2442 so usually a cut-off is applied, which can be abrupt or smooth.
2443 We will call the potential and force with cut-off $V_c$ and $\ve{F}_c$.
2444 The long-range contribution to the dispersion energy
2445 in a system with $N$ particles and particle density $\rho$ = $N/V$ is:
2446 \beq
2447 \label{eqn:enercorr}
2448 V_{lr} ~=~ \half N \rho\int_0^{\infty} 4\pi r^2 g(r) \left( V(r) -V_c(r) \right) {\dr}
2449 \eeq
2450 We will integrate this for the shift function, which is the most general
2451 form of van der Waals interaction available in {\gromacs}.
2452 The shift function has a constant difference $S$ from 0 to $r_1$
2453 and is 0 beyond the cut-off distance $r_c$.
2454 We can integrate \eqnref{enercorr}, assuming that the density in the sphere
2455 within $r_1$ is equal to the global density and
2456 the radial distribution function $g(r)$ is 1 beyond $r_1$:
2457 \bea
2458 \nonumber
2459 V_{lr} &=& \half N \left(
2460 \rho\int_0^{r_1} 4\pi r^2 g(r) \, C_6 \,S\,{\dr}
2461 + \rho\int_{r_1}^{r_c} 4\pi r^2 \left( V(r) -V_c(r) \right) {\dr}
2462 + \rho\int_{r_c}^{\infty} 4\pi r^2 V(r) \, {\dr}
2463 \right) \\
2464 & = & \half N \left(\left(\frac{4}{3}\pi \rho r_1^{3} - 1\right) C_6 \,S
2465 + \rho\int_{r_1}^{r_c} 4\pi r^2 \left( V(r) -V_c(r) \right) {\dr}
2466 -\frac{4}{3} \pi N \rho\, C_6\,r_c^{-3}
2467 \right)
2468 \eea
2469 where the term $-1$ corrects for the self-interaction.
2470 For a plain cut-off we only need to assume that $g(r)$ is 1 beyond $r_c$
2471 and the correction reduces to~\cite{Allen87}:
2472 \bea
2473 V_{lr} & = & -\frac{2}{3} \pi N \rho\, C_6\,r_c^{-3}
2474 \eea
2475 If we consider, for example, a box of pure water, simulated with a cut-off
2476 of 0.9 nm and a density of 1 g cm$^{-3}$ this correction is
2477 $-0.75$ kJ mol$^{-1}$ per molecule.
2479 For a homogeneous mixture we need to define
2480 an {\em average dispersion constant}:
2481 \beq
2482 \label{eqn:avcsix}
2483 \avcsix = \frac{2}{N(N-1)}\sum_i^N\sum_{j>i}^N C_6(i,j)\\
2484 \eeq
2485 In {\gromacs}, excluded pairs of atoms do not contribute to the average.
2487 In the case of inhomogeneous simulation systems, {\eg} a system with a
2488 lipid interface, the energy correction can be applied if
2489 $\avcsix$ for both components is comparable.
2491 \subsubsection{Virial and pressure}
2492 The scalar virial of the system due to the dispersion interaction between
2493 two particles $i$ and $j$ is given by:
2494 \beq
2495 \Xi~=~-\half \rvij \cdot \Fvij ~=~ 3\,C_6\,\rij^{-6}
2496 \eeq
2497 The pressure is given by:
2498 \beq
2499 P~=~\frac{2}{3\,V}\left(E_{kin} - \Xi\right)
2500 \eeq
2501 The long-range correction to the virial is given by:
2502 \beq
2503 \Xi_{lr} ~=~ \half N \rho \int_0^{\infty} 4\pi r^2 g(r) (\Xi -\Xi_c) \,\dr
2504 \eeq
2505 We can again integrate the long-range contribution to the
2506 virial assuming $g(r)$ is 1 beyond $r_1$:
2507 \bea
2508 \Xi_{lr}&=& \half N \rho \left(
2509 \int_{r_1}^{r_c} 4 \pi r^2 (\Xi -\Xi_c) \,\dr
2510 + \int_{r_c}^{\infty} 4 \pi r^2 3\,C_6\,\rij^{-6}\, \dr
2511 \right) \nonumber\\
2512 &=& \half N \rho \left(
2513 \int_{r_1}^{r_c} 4 \pi r^2 (\Xi -\Xi_c) \, \dr
2514 + 4 \pi C_6 \, r_c^{-3} \right)
2515 \eea
2516 For a plain cut-off the correction to the pressure is~\cite{Allen87}:
2517 \beq
2518 P_{lr}~=~-\frac{4}{3} \pi C_6\, \rho^2 r_c^{-3}
2519 \eeq
2520 Using the same example of a water box, the correction to the virial is
2521 0.75 kJ mol$^{-1}$ per molecule,
2522 the corresponding correction to the pressure for
2523 SPC water is approximately $-280$ bar.
2525 For homogeneous mixtures, we can again use the average dispersion constant
2526 $\avcsix$ (\eqnref{avcsix}):
2527 \beq
2528 P_{lr}~=~-\frac{4}{3} \pi \avcsix \rho^2 r_c^{-3}
2529 \label{eqn:pcorr}
2530 \eeq
2531 For inhomogeneous systems, \eqnref{pcorr} can be applied under the same
2532 restriction as holds for the energy (see \secref{ecorr}).
2534 \subsection{Lennard-Jones PME\index{LJ-PME}}
2536 In order to treat systems, using Lennard-Jones potentials, that are
2537 non-homogeneous outside of the cut-off distance, we can instead use
2538 the Particle-mesh Ewald method as discussed for electrostatics above.
2539 In this case the modified Ewald equations become
2540 \begin{eqnarray}
2541 V &=& V_{dir} + V_{rec} + V_{0} \\[0.5ex]
2542 V_{dir} &=& -\frac{1}{2} \sum_{i,j}^{N}
2543 \sum_{n_x}\sum_{n_y}
2544 \sum_{n_{z}*} \frac{C_{ij}^{(6)}g(\beta {r}_{ij,{\bf n}})}{{r_{ij,{\bf n}}}^6} \\[0.5ex]
2545 V_{rec} &=& \frac{{\pi}^{\frac{3}{2}} \beta^{3}}{2V} \sum_{m_x}\sum_{m_y}\sum_{m_{z}*}
2546 f(\pi |{\mathbf m}|/\beta) \times \sum_{i,j}^{N} C_{ij}^{(6)} {\mathrm{exp}}\left[-2\pi i {\bf m}\cdot({\bf r_i}-{\bf r_j})\right] \\[0.5ex]
2547 V_{0} &=& -\frac{\beta^{6}}{12}\sum_{i}^{N} C_{ii}^{(6)},
2548 \end{eqnarray}
2550 where ${\bf m}=(m_x,m_y,m_z)$, $\beta$ is the parameter determining the weight between
2551 direct and reciprocal space, and ${C_{ij}}^{(6)}$ is the combined dispersion
2552 parameter for particle $i$ and $j$. The star indicates that terms
2553 with $i = j$ should be omitted when $((n_x,n_y,n_z)=(0,0,0))$, and
2554 ${\bf r}_{ij,{\bf n}}$ is the real distance between the particles.
2555 Following the derivation by Essmann~\cite{Essmann95}, the functions $f$ and $g$ introduced above are defined as
2556 \begin{eqnarray}
2557 f(x)&=&1/3\left[(1-2x^2){\mathrm{exp}}(-x^2) + 2{x^3}\sqrt{\pi}\,{\mathrm{erfc}}(x) \right] \\
2558 g(x)&=&{\mathrm{exp}}(-x^2)(1+x^2+\frac{x^4}{2}).
2559 \end{eqnarray}
2561 The above methodology works fine as long as the dispersion parameters can be factorized in the same
2562 way as the charges for electrostatics
2563 \begin{equation}
2564 C_{ij}^{(6)} = \left({C_{ii}^{(6)} \, C_{jj}^{(6)}}\right)^{1/2}
2565 \end{equation}
2566 For Lorentz-Berthelot combination rules, the reciprocal part of this sum has to be calculated
2567 seven times due to the splitting of the dispersion parameter according to
2568 \begin{equation}
2569 C_{ij}^{(6)}=(\sigma_i+\sigma_j)^6=\sum_{n=0}^{6} P_{n}\sigma_{i}^{n}\sigma_{j}^{(6-n)},
2570 \end{equation}
2571 for $P_{n}$ the Pascal triangle coefficients. This introduces a
2572 non-negligible cost to the reciprocal part, requiring seven separate
2573 FFTs, and therefore this have been the limiting factor in previous
2574 attempts to implement LJ-PME. A solution to this problem is to
2575 approximate the interaction parameters in reciprocal space using
2576 geometrical combination rules. This will preserve a well-defined
2577 Hamiltonian and significantly increase the performance of the
2578 simulations.
2580 \begin{figure}
2581 \centerline{\includegraphics[width=15cm]{plots/ljpmedifference}}
2582 \caption {Dispersion potential between phosphorous and oxygen, The total, real and
2583 reciprocal parts of the total dispersion are shown. The reciprocal parts are calculated
2584 using either LB or geometric rules. The difference introduced by the use of the
2585 geometric approximation in the reciprocal part is small compared to the total
2586 interaction energy.}
2587 \label{fig:ljpmedifference}
2588 \end{figure}
2590 This approximation does introduce some errors, but since the
2591 difference is located in the interactions calculated in reciprocal
2592 space, the effect will be very small compared to the total interaction
2593 energy (see \figref{ljpmedifference}). The relative error in
2594 the total dispersion energy will stay below 0.5\% in a lipid bilayer
2595 simulation, when using a real space cut-off of 1.0 nm. A more
2596 thorough discussion of this can be found in \cite{Wennberg13}.
2598 \subsubsection{Using LJ-PME}
2599 To use Particle-mesh Ewald summation for Lennard-Jones interactions in {\gromacs}, specify the
2600 following lines in your {\tt .mdp} file:
2601 \begin{verbatim}
2602 vdwtype = PME
2603 rvdw = 1.0
2604 rlist = 1.0
2605 rcoulomb = 1.0
2606 fourierspacing = 0.12
2607 pme-order = 4
2608 ewald-rtol-lj = 0.001
2609 lj-pme-comb-rule = geometric
2610 \end{verbatim}
2612 The {\tt fourierspacing} and {\tt pme-order} are the same parameters
2613 as is used for electrostatic PME, and {\tt ewald-rtol-lj} controls
2614 splitting between real and reciprocal space in the same way as
2615 {\tt ewald-rtol}. In addition to this, the combination rule to be used
2616 in reciprocal space is determined by {\tt lj-pme-comb-rule}. If the
2617 current force field uses Lorentz-Berthelot combination rules, it is
2618 possible to set {\tt lj-pme-comb-rule = geometric} in order to gain a
2619 significant increase in performance for a small loss in accuracy. The
2620 details of this approximation can be found in the section above. The
2621 implementation of LJ-PME is currently unsupported together with the
2622 Verlet cut-off scheme and/or free energy calculations. These features
2623 will be added in upcoming releases
2624 %} % Brace matches ifthenelse test for gmxlite
2626 \section{Force field\index{force field}}
2627 \label{sec:ff}
2628 A force field is built up from two distinct components:
2629 \begin{itemize}
2630 \item The set of equations (called the {\em
2631 \index{potential function}s}) used to generate the potential
2632 energies and their derivatives, the forces. These are described in
2633 detail in the previous chapter.
2634 \item The parameters used in this set of equations. These are not
2635 given in this manual, but in the data files corresponding to your
2636 {\gromacs} distribution.
2637 \end{itemize}
2638 Within one set of equations various sets of parameters can be
2639 used. Care must be taken that the combination of equations and
2640 parameters form a consistent set. It is in general dangerous to make
2641 {\em ad hoc} changes in a subset of parameters, because the various
2642 contributions to the total force are usually interdependent. This
2643 means in principle that every change should be documented, verified by
2644 comparison to experimental data and published in a peer-reviewed
2645 journal before it can be used.
2647 {\gromacs} {\gmxver} includes several force fields, and additional
2648 ones are available on the website. If you do not know which one to
2649 select we recommend \gromosv{96} for united-atom setups and OPLS-AA/L for
2650 all-atom parameters. That said, we describe the available options in
2651 some detail.
2653 \subsection{GROMOS87\index{GROMOS87 force field}}
2654 The \gromosv{87} suite of programs and corresponding force
2655 field~\cite{biomos} formed the basis for the development of {\gromacs}
2656 in the early 1990s. The original GROMOS87 force field is not
2657 available in {\gromacs}. In previous versions ($<$ 3.3.2) there used
2658 to be the so-called ``{\gromacs} force field,'' which was based on
2659 \gromosv{87}~\cite{biomos}\index{GROMOS87}, with a small modification
2660 concerning the interaction between water oxygens and carbon
2661 atoms~\cite{Buuren93b,Mark94}, as well as 10 extra atom
2662 types~\cite{Jorgensen83,Buuren93a,Buuren93b,Mark94,Liu95}. Whenever
2663 using this force field, please cite the above references, and {\bf do not}
2664 call it the ``{\gromacs} force field,'' instead name it
2665 \gromosv{87}~\cite{biomos} with corrections as detailed
2666 in~\cite{Buuren93b,Mark94}. As noted by {\tt pdb2gmx}, this force field is
2667 ``deprecated,'' indicating that newer, perhaps more reliable, versions of this
2668 parameter set are available. For backwards compatibility, it is maintained
2669 in the current release. Should you have a justifiable reason to use this
2670 force field, all necessary files are provided in the {\tt gmx.ff} sub-directory
2671 of the {\gromacs} library. See also the note in~\ssecref{atomtype}.
2673 \subsubsection{All-hydrogen force field}
2674 The \gromosv{87}-based all-hydrogen force field is almost identical to the
2675 normal \gromosv{87} force field, since the extra hydrogens have no
2676 Lennard-Jones interaction and zero charge. The only differences are in
2677 the bond angle and improper dihedral angle terms. This force field is
2678 only useful when you need the exact hydrogen positions, for instance
2679 for distance restraints derived from NMR measurements. When citing
2680 this force field please read the previous paragraph.
2682 \subsection{\gromosv{96}\index{GROMOS96 force field}}
2683 {\gromacs} supports the \gromosv{96} force fields~\cite{gromos96}.
2684 All parameters for the 43A1, 43A2 (development, improved alkane
2685 dihedrals), 45A3, 53A5, and 53A6 parameter sets are included. All standard
2686 building blocks are included and topologies can be built automatically
2687 by {\tt pdb2gmx}.
2689 The \gromosv{96} force field is a further development of the \gromosv{87} force field.
2690 It has improvements over the \gromosv{87} force field for proteins and small molecules.
2691 {\bf Note} that the sugar parameters present in 53A6 do correspond to those published in
2692 2004\cite{Oostenbrink2004}, which are different from those present in 45A4, which
2693 is not included in {\gromacs} at this time. The 45A4 parameter set corresponds to a later
2694 revision of these parameters.
2695 The \gromosv{96} force field is not, however, recommended for use with long alkanes and
2696 lipids. The \gromosv{96} force field differs from the \gromosv{87}
2697 force field in a few respects:
2698 \begin{itemize}
2699 \item the force field parameters
2700 \item the parameters for the bonded interactions are not linked to atom types
2701 \item a fourth power bond stretching potential (\ssecref{G96bond})
2702 \item an angle potential based on the cosine of the angle (\ssecref{G96angle})
2703 \end{itemize}
2704 There are two differences in implementation between {\gromacs} and \gromosv{96}
2705 which can lead to slightly different results when simulating the same system
2706 with both packages:
2707 \begin{itemize}
2708 \item in \gromosv{96} neighbor searching for solvents is performed on the
2709 first atom of the solvent molecule. This is not implemented in {\gromacs},
2710 but the difference with searching by centers of charge groups is very small
2711 \item the virial in \gromosv{96} is molecule-based. This is not implemented in
2712 {\gromacs}, which uses atomic virials
2713 \end{itemize}
2714 The \gromosv{96} force field was parameterized with a Lennard-Jones cut-off
2715 of 1.4 nm, so be sure to use a Lennard-Jones cut-off ({\tt rvdw}) of at least 1.4.
2716 A larger cut-off is possible because the Lennard-Jones potential and forces
2717 are almost zero beyond 1.4 nm.
2719 \subsubsection{\gromosv{96} files\swapindexquiet{GROMOS96}{files}}
2720 {\gromacs} can read and write \gromosv{96} coordinate and trajectory files.
2721 These files should have the extension {\tt .g96}.
2722 Such a file can be a \gromosv{96} initial/final
2723 configuration file, a coordinate trajectory file, or a combination of both.
2724 The file is fixed format; all floats are written as 15.9, and as such, files can get huge.
2725 {\gromacs} supports the following data blocks in the given order:
2726 \begin{itemize}
2727 \item Header block:
2728 \begin{verbatim}
2729 TITLE (mandatory)
2730 \end{verbatim}
2732 \item Frame blocks:
2733 \begin{verbatim}
2734 TIMESTEP (optional)
2735 POSITION/POSITIONRED (mandatory)
2736 VELOCITY/VELOCITYRED (optional)
2737 BOX (optional)
2738 \end{verbatim}
2740 \end{itemize}
2741 See the \gromosv{96} manual~\cite{gromos96} for a complete description
2742 of the blocks. {\bf Note} that all {\gromacs} programs can read compressed
2743 (.Z) or gzipped (.gz) files.
2745 \subsection{OPLS/AA\index{OPLS/AA force field}}
2747 \subsection{AMBER\index{AMBER force field}}
2749 As of version 4.5, {\gromacs} provides native support for the following AMBER force fields:
2751 \begin{itemize}
2752 \item AMBER94~\cite{Cornell1995}
2753 \item AMBER96~\cite{Kollman1996}
2754 \item AMBER99~\cite{Wang2000}
2755 \item AMBER99SB~\cite{Hornak2006}
2756 \item AMBER99SB-ILDN~\cite{Lindorff2010}
2757 \item AMBER03~\cite{Duan2003}
2758 \item AMBERGS~\cite{Garcia2002}
2759 \end{itemize}
2761 \subsection{CHARMM\index{CHARMM force field}}
2763 As of version 4.5, {\gromacs} supports the CHARMM27 force field for proteins~\cite{mackerell04, mackerell98}, lipids~\cite{feller00} and nucleic acids~\cite{foloppe00}. The protein parameters (and to some extent the lipid and nucleic acid parameters) were thoroughly tested -- both by comparing potential energies between the port and the standard parameter set in the CHARMM molecular simulation package, as well by how the protein force field behaves together with {\gromacs}-specific techniques such as virtual sites (enabling long time steps) and a fast implicit solvent recently implemented~\cite{Larsson10} -- and the details and results are presented in the paper by Bjelkmar et al.~\cite{Bjelkmar10}. The nucleic acid parameters, as well as the ones for HEME, were converted and tested by Michel Cuendet.
2765 When selecting the CHARMM force field in {\tt \normindex{pdb2gmx}} the default option is to use \normindex{CMAP} (for torsional correction map). To exclude CMAP, use {\tt -nocmap}. The basic form of the CMAP term implemented in {\gromacs} is a function of the $\phi$ and $\psi$ backbone torsion angles. This term is defined in the {\tt .rtp} file by a {\tt [ cmap ]} statement at the end of each residue supporting CMAP. The following five atom names define the two torsional angles. Atoms 1-4 define $\phi$, and atoms 2-5 define $\psi$. The corresponding atom types are then matched to the correct CMAP type in the {\tt cmap.itp} file that contains the correction maps.
2767 \subsection{Coarse-grained force-fields}
2768 \index{force-field, coarse-grained}
2769 \label{sec:cg-forcefields}
2770 Coarse-graining is a systematic way of reducing the number of degrees of freedom representing a system of interest. To achieve this, typically whole groups of atoms are represented by single beads and the coarse-grained force fields describes their effective interactions. Depending on the choice of parameterization, the functional form of such an interaction can be complicated and often tabulated potentials are used.
2772 Coarse-grained models are designed to reproduce certain properties of a reference system. This can be either a full atomistic model or even experimental data. Depending on the properties to reproduce there are different methods to derive such force fields. An incomplete list of methods is given below:
2773 \begin{itemize}
2774 \item Conserving free energies
2775 \begin{itemize}
2776 \item Simplex method
2777 \item MARTINI force-field (see next section)
2778 \end{itemize}
2779 \item Conserving distributions (like the radial distribution function), so-called structure-based coarse-graining
2780 \begin{itemize}
2781 \item (iterative) Boltzmann inversion
2782 \item Inverse Monte Carlo
2783 \end{itemize}
2784 \item Conversing forces
2785 \begin{itemize}
2786 \item Force matching
2787 \end{itemize}
2788 \end{itemize}
2790 Note that coarse-grained potentials are state dependent (e.g. temperature, density,...) and should be re-parametrized depending on the system of interest and the simulation conditions. This can for example be done using the \normindex{Versatile Object-oriented Toolkit for Coarse-Graining Applications (VOTCA)}~\cite{ruehle2009}. The package was designed to assists in systematic coarse-graining, provides implementations for most of the algorithms mentioned above and has a well tested interface to {\gromacs}. It is available as open source and further information can be found at \href{http://www.votca.org}{www.votca.org}.
2792 \subsection{MARTINI\index{Martini force field}}
2794 The MARTINI force field is a coarse-grain parameter set that allows for the construction
2795 of many systems, including proteins and membranes.
2797 \subsection{PLUM\index{PLUM force field}}
2799 The \normindex{PLUM force field}~\cite{bereau12} is an example of a solvent-free
2800 protein-membrane model for which the membrane was derived from structure-based
2801 coarse-graining~\cite{wang_jpcb10}. A {\gromacs} implementation can be found at
2802 \href{http://code.google.com/p/plumx/}{code.google.com/p/plumx}.
2804 % LocalWords: dihedrals centro ij dV dr LJ lj rcl jj Bertelot OPLS bh bham rf
2805 % LocalWords: coul defunits grompp crf vcrf fcrf Tironi Debye kgrf cgrf krf dx
2806 % LocalWords: PPPM der Waals erfc lr elstat chirality bstretch bondpot kT kJ
2807 % LocalWords: anharmonic morse mol betaij expminx SPC timestep fs FENE ijk kj
2808 % LocalWords: anglepot CHARMm UB ik rr substituents ijkl Ryckaert Bellemans rb
2809 % LocalWords: alkanes pdb gmx IUPAC IUB jkl cis rbdih crb kcal cubicspline xvg
2810 % LocalWords: topfile mdrun posres ar dihr lcllll NMR nmr lcllllll NOEs lclll
2811 % LocalWords: rav preprocessor ccccccccc ai aj fac disre mdp multi topol tpr
2812 % LocalWords: fc ravdisre nstdisreout dipolar lll ccc orientational MSD const
2813 % LocalWords: orire fitgrp nstorireout Drude intra Noskov et al fecalc coulrf
2814 % LocalWords: polarizabilities parameterized sigeps Ek sc softcore GROMOS NBF
2815 % LocalWords: hydrogens alkane vdwtype coulombtype mdpopt rlist rcoulomb rvdw
2816 % LocalWords: nstlist virial funcparm VdW jk jl fvsite fd vsites lcr vsitetop
2817 % LocalWords: vsite lclllll lcl parameterize parameterization enercorr avcsix
2818 % LocalWords: pcorr ecorr totalcoulomb dir fourierspacing ewald rtol Darden gz
2819 % LocalWords: FFT parallelization MPMD mpmd pme fft hoc Gromos gromos oxygens
2820 % LocalWords: virials POSITIONRED VELOCITYRED gzipped Charmm Larsson Bjelkmar
2821 % LocalWords: Cuendet CMAP nocmap dihedral Lennard covalent Verlet
2822 % LocalWords: Berthelot nm flexwat ferguson itp harmonicangle versa
2823 % LocalWords: harmonicbond atomtypes dihedraltypes equilibrated fdn
2824 % LocalWords: distancerestraint LINCS Coulombic ja jb il SPME ILDN
2825 % LocalWords: Hamiltonians atomtype AMBERGS rtp cmap graining VOTCA