ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tengDissertation/Methodology.tex
Revision: 2905
Committed: Wed Jun 28 19:09:25 2006 UTC (18 years ago) by tim
Content type: application/x-tex
File size: 30635 byte(s)
Log Message:
more corrections.

File Contents

# Content
1 \chapter{\label{chapt:methodology}METHODOLOGY}
2
3 \section{\label{methodSection:rigidBodyIntegrators}Integrators for Rigid Body Motion in Molecular Dynamics}
4
5 In order to mimic experiments which are usually performed under
6 constant temperature and/or pressure, extended Hamiltonian system
7 methods have been developed to generate statistical ensembles, such
8 as the canonical and isobaric-isothermal ensembles. In addition to
9 the standard ensemble, specific ensembles have been developed to
10 account for the anisotropy between the lateral and normal directions
11 of membranes. The $NPAT$ ensemble, in which the normal pressure and
12 the lateral surface area of the membrane are kept constant, and the
13 $NP\gamma T$ ensemble, in which the normal pressure and the lateral
14 surface tension are kept constant were proposed to address the
15 issues.
16
17 Integration schemes for the rotational motion of the rigid molecules
18 in the microcanonical ensemble have been extensively studied over
19 the last two decades. Matubayasi developed a time-reversible
20 integrator for rigid bodies in quaternion representation. Although
21 it is not symplectic, this integrator still demonstrates a better
22 long-time energy conservation than Euler angle methods because of
23 the time-reversible nature. Extending the Trotter-Suzuki
24 factorization to general system with a flat phase space, Miller and
25 his colleagues devised a novel symplectic, time-reversible and
26 volume-preserving integrator in the quaternion representation, which
27 was shown to be superior to the Matubayasi's time-reversible
28 integrator. However, all of the integrators in the quaternion
29 representation suffer from the computational penalty of constructing
30 a rotation matrix from quaternions to evolve coordinates and
31 velocities at every time step. An alternative integration scheme
32 utilizing the rotation matrix directly proposed by Dullweber,
33 Leimkuhler and McLachlan (DLM) also preserved the same structural
34 properties of the Hamiltonian flow. In this section, the integration
35 scheme of DLM method will be reviewed and extended to other
36 ensembles.
37
38 \subsection{\label{methodSection:DLM}Integrating the Equations of Motion: the
39 DLM method}
40
41 The DLM method uses a Trotter factorization of the orientational
42 propagator. This has three effects:
43 \begin{enumerate}
44 \item the integrator is area-preserving in phase space (i.e. it is
45 {\it symplectic}),
46 \item the integrator is time-{\it reversible}, making it suitable for Hybrid
47 Monte Carlo applications, and
48 \item the error for a single time step is of order $\mathcal{O}\left(h^4\right)$
49 for timesteps of length $h$.
50 \end{enumerate}
51 The integration of the equations of motion is carried out in a
52 velocity-Verlet style 2-part algorithm, where $h= \delta t$:
53
54 {\tt moveA:}
55 \begin{align*}
56 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
57 + \frac{h}{2} \left( {\bf f}(t) / m \right), \\
58 %
59 {\bf r}(t + h) &\leftarrow {\bf r}(t)
60 + h {\bf v}\left(t + h / 2 \right), \\
61 %
62 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
63 + \frac{h}{2} {\bf \tau}^b(t), \\
64 %
65 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left( h {\bf j}
66 (t + h / 2) \cdot \overleftrightarrow{\mathsf{I}}^{-1} \right).
67 \end{align*}
68 In this context, the $\mathrm{rotate}$ function is the reversible
69 product of the three body-fixed rotations,
70 \begin{equation}
71 \mathrm{rotate}({\bf a}) = \mathsf{G}_x(a_x / 2) \cdot
72 \mathsf{G}_y(a_y / 2) \cdot \mathsf{G}_z(a_z) \cdot \mathsf{G}_y(a_y
73 / 2) \cdot \mathsf{G}_x(a_x /2),
74 \end{equation}
75 where each rotational propagator, $\mathsf{G}_\alpha(\theta)$,
76 rotates both the rotation matrix ($\mathsf{A}$) and the body-fixed
77 angular momentum (${\bf j}$) by an angle $\theta$ around body-fixed
78 axis $\alpha$,
79 \begin{equation}
80 \mathsf{G}_\alpha( \theta ) = \left\{
81 \begin{array}{lcl}
82 \mathsf{A}(t) & \leftarrow & \mathsf{A}(0) \cdot \mathsf{R}_\alpha(\theta)^T, \\
83 {\bf j}(t) & \leftarrow & \mathsf{R}_\alpha(\theta) \cdot {\bf
84 j}(0).
85 \end{array}
86 \right.
87 \end{equation}
88 $\mathsf{R}_\alpha$ is a quadratic approximation to the single-axis
89 rotation matrix. For example, in the small-angle limit, the
90 rotation matrix around the body-fixed x-axis can be approximated as
91 \begin{equation}
92 \mathsf{R}_x(\theta) \approx \left(
93 \begin{array}{ccc}
94 1 & 0 & 0 \\
95 0 & \frac{1-\theta^2 / 4}{1 + \theta^2 / 4} & -\frac{\theta}{1+
96 \theta^2 / 4} \\
97 0 & \frac{\theta}{1+ \theta^2 / 4} & \frac{1-\theta^2 / 4}{1 +
98 \theta^2 / 4}
99 \end{array}
100 \right).
101 \end{equation}
102 All other rotations follow in a straightforward manner. After the
103 first part of the propagation, the forces and body-fixed torques are
104 calculated at the new positions and orientations
105
106 {\tt doForces:}
107 \begin{align*}
108 {\bf f}(t + h) &\leftarrow
109 - \left(\frac{\partial V}{\partial {\bf r}}\right)_{{\bf r}(t + h)}, \\
110 %
111 {\bf \tau}^{s}(t + h) &\leftarrow {\bf u}(t + h)
112 \times (\frac{\partial V}{\partial {\bf u}})_{u(t+h)}, \\
113 %
114 {\bf \tau}^{b}(t + h) &\leftarrow \mathsf{A}(t + h)
115 \cdot {\bf \tau}^s(t + h).
116 \end{align*}
117 ${\bf u}$ is automatically updated when the rotation matrix
118 $\mathsf{A}$ is calculated in {\tt moveA}. Once the forces and
119 torques have been obtained at the new time step, the velocities can
120 be advanced to the same time value.
121
122 {\tt moveB:}
123 \begin{align*}
124 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t + h / 2
125 \right)
126 + \frac{h}{2} \left( {\bf f}(t + h) / m \right), \\
127 %
128 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t + h / 2
129 \right)
130 + \frac{h}{2} {\bf \tau}^b(t + h) .
131 \end{align*}
132 The matrix rotations used in the DLM method end up being more costly
133 computationally than the simpler arithmetic quaternion propagation.
134 With the same time step, a 1000-molecule water simulation shows an
135 average 7\% increase in computation time using the DLM method in
136 place of quaternions. This cost is more than justified when
137 comparing the energy conservation of the two methods as illustrated
138 in Fig.~\ref{methodFig:timestep} where the resulting energy drift at
139 various time steps for both the DLM and quaternion integration
140 schemes is compared. All of the 1000 molecule water simulations
141 started with the same configuration, and the only difference was the
142 method for handling rotational motion. At time steps of 0.1 and 0.5
143 fs, both methods for propagating molecule rotation conserve energy
144 fairly well, with the quaternion method showing a slight energy
145 drift over time in the 0.5 fs time step simulation. At time steps of
146 1 and 2 fs, the energy conservation benefits of the DLM method are
147 clearly demonstrated. Thus, while maintaining the same degree of
148 energy conservation, one can take considerably longer time steps,
149 leading to an overall reduction in computation time.
150
151 \begin{figure}
152 \centering
153 \includegraphics[width=\linewidth]{timeStep.eps}
154 \caption[Energy conservation for quaternion versus DLM
155 dynamics]{Energy conservation using quaternion based integration
156 versus the method proposed by Dullweber \emph{et al.} with
157 increasing time step. For each time step, the dotted line is total
158 energy using the DLM integrator, and the solid line comes from the
159 quaternion integrator. The larger time step plots are shifted up
160 from the true energy baseline for clarity.}
161 \label{methodFig:timestep}
162 \end{figure}
163
164 \subsection{\label{methodSection:NVT}Nos\'{e}-Hoover Thermostatting}
165
166 The Nos\'e-Hoover equations of motion are given by\cite{Hoover1985}
167 \begin{eqnarray}
168 \dot{{\bf r}} & = & {\bf v}, \\
169 \dot{{\bf v}} & = & \frac{{\bf f}}{m} - \chi {\bf v} ,\\
170 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
171 \mbox{ skew}\left(\overleftrightarrow{\mathsf{I}}^{-1} \cdot {\bf j}\right), \\
172 \dot{{\bf j}} & = & {\bf j} \times \left(
173 \overleftrightarrow{\mathsf{I}}^{-1} \cdot {\bf j} \right) - \mbox{
174 rot}\left(\mathsf{A}^{T} \cdot \frac{\partial V}{\partial
175 \mathsf{A}} \right) - \chi {\bf j}. \label{eq:nosehoovereom}
176 \end{eqnarray}
177 $\chi$ is an ``extra'' variable included in the extended system, and
178 it is propagated using the first order equation of motion
179 \begin{equation}
180 \dot{\chi} = \frac{1}{\tau_{T}^2} \left(
181 \frac{T}{T_{\mathrm{target}}} - 1 \right). \label{eq:nosehooverext}
182 \end{equation}
183 The instantaneous temperature $T$ is proportional to the total
184 kinetic energy (both translational and orientational) and is given
185 by
186 \begin{equation}
187 T = \frac{2 K}{f k_B}.
188 \end{equation}
189 Here, $f$ is the total number of degrees of freedom in the system,
190 \begin{equation}
191 f = 3 N + 3 N_{\mathrm{orient}} - N_{\mathrm{constraints}},
192 \end{equation}
193 where $N_{\mathrm{orient}}$ is the number of molecules with
194 orientational degrees of freedom, and $K$ is the total kinetic
195 energy,
196 \begin{equation}
197 K = \sum_{i=1}^{N} \frac{1}{2} m_i {\bf v}_i^T \cdot {\bf v}_i +
198 \sum_{i=1}^{N_{\mathrm{orient}}} \frac{1}{2} {\bf j}_i^T \cdot
199 \overleftrightarrow{\mathsf{I}}_i^{-1} \cdot {\bf j}_i.
200 \end{equation}
201 In Eq.~\ref{eq:nosehooverext}, $\tau_T$ is the time constant for
202 relaxation of the temperature to the target value. The integration
203 of the equations of motion is carried out in a velocity-Verlet style
204 2 part algorithm:
205
206 {\tt moveA:}
207 \begin{align*}
208 T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
209 %
210 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
211 + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
212 \chi(t)\right), \\
213 %
214 {\bf r}(t + h) &\leftarrow {\bf r}(t)
215 + h {\bf v}\left(t + h / 2 \right) ,\\
216 %
217 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
218 + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
219 \chi(t) \right) ,\\
220 %
221 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}
222 \left(h * {\bf j}(t + h / 2)
223 \overleftrightarrow{\mathsf{I}}^{-1} \right) ,\\
224 %
225 \chi\left(t + h / 2 \right) &\leftarrow \chi(t)
226 + \frac{h}{2 \tau_T^2} \left( \frac{T(t)}
227 {T_{\mathrm{target}}} - 1 \right) .
228 \end{align*}
229 Here $\mathrm{rotate}(h * {\bf j}
230 \overleftrightarrow{\mathsf{I}}^{-1})$ is the same symplectic
231 Trotter factorization of the three rotation operations that was
232 discussed in the section on the DLM integrator. Note that this
233 operation modifies both the rotation matrix $\mathsf{A}$ and the
234 angular momentum ${\bf j}$. {\tt moveA} propagates velocities by a
235 half time step, and positional degrees of freedom by a full time
236 step. The new positions (and orientations) are then used to
237 calculate a new set of forces and torques in exactly the same way
238 they are calculated in the {\tt doForces} portion of the DLM
239 integrator. Once the forces and torques have been obtained at the
240 new time step, the temperature, velocities, and the extended system
241 variable can be advanced to the same time value.
242
243 {\tt moveB:}
244 \begin{align*}
245 T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
246 \left\{{\bf j}(t + h)\right\}, \\
247 %
248 \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
249 2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+h)}
250 {T_{\mathrm{target}}} - 1 \right), \\
251 %
252 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t
253 + h / 2 \right) + \frac{h}{2} \left(
254 \frac{{\bf f}(t + h)}{m} - {\bf v}(t + h)
255 \chi(t h)\right) ,\\
256 %
257 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t
258 + h / 2 \right) + \frac{h}{2}
259 \left( {\bf \tau}^b(t + h) - {\bf j}(t + h)
260 \chi(t + h) \right) .
261 \end{align*}
262 Since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required to
263 caclculate $T(t + h)$ as well as $\chi(t + h)$, they indirectly
264 depend on their own values at time $t + h$. {\tt moveB} is
265 therefore done in an iterative fashion until $\chi(t + h)$ becomes
266 self-consistent. The Nos\'e-Hoover algorithm is known to conserve a
267 Hamiltonian for the extended system that is, to within a constant,
268 identical to the Helmholtz free energy,\cite{Melchionna1993}
269 \begin{equation}
270 H_{\mathrm{NVT}} = V + K + f k_B T_{\mathrm{target}} \left(
271 \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime)
272 dt^\prime \right).
273 \end{equation}
274 Poor choices of $h$ or $\tau_T$ can result in non-conservation of
275 $H_{\mathrm{NVT}}$, so the conserved quantity is maintained in the
276 last column of the {\tt .stat} file to allow checks on the quality
277 of the integration.
278
279 \subsection{\label{methodSection:NPTi}Constant-pressure integration with
280 isotropic box (NPTi)}
281
282 We can used an isobaric-isothermal ensemble integrator which is
283 implemented using the Melchionna modifications to the
284 Nos\'e-Hoover-Andersen equations of motion\cite{Melchionna1993}
285 \begin{eqnarray}
286 \dot{{\bf r}} & = & {\bf v} + \eta \left( {\bf r} - {\bf R}_0 \right), \\
287 \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\eta + \chi) {\bf v}, \\
288 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
289 \mbox{ skew}\left(\overleftrightarrow{I}^{-1} \cdot {\bf j}\right),\\
290 \dot{{\bf j}} & = & {\bf j} \times \left(
291 \overleftrightarrow{I}^{-1} \cdot {\bf j} \right) - \mbox{
292 rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
293 V}{\partial \mathsf{A}} \right) - \chi {\bf j}, \\
294 \dot{\chi} & = & \frac{1}{\tau_{T}^2} \left(
295 \frac{T}{T_{\mathrm{target}}} - 1 \right) ,\\
296 \dot{\eta} & = & \frac{1}{\tau_{B}^2 f k_B T_{\mathrm{target}}} V
297 \left( P -
298 P_{\mathrm{target}} \right), \\
299 \dot{\mathcal{V}} & = & 3 \mathcal{V} \eta . \label{eq:melchionna1}
300 \end{eqnarray}
301 $\chi$ and $\eta$ are the ``extra'' degrees of freedom in the
302 extended system. $\chi$ is a thermostat, and it has the same
303 function as it does in the Nos\'e-Hoover NVT integrator. $\eta$ is
304 a barostat which controls changes to the volume of the simulation
305 box. ${\bf R}_0$ is the location of the center of mass for the
306 entire system, and $\mathcal{V}$ is the volume of the simulation
307 box. At any time, the volume can be calculated from the determinant
308 of the matrix which describes the box shape:
309 \begin{equation}
310 \mathcal{V} = \det(\mathsf{H}).
311 \end{equation}
312
313 The NPTi integrator requires an instantaneous pressure. This
314 quantity is calculated via the pressure tensor,
315 \begin{equation}
316 \overleftrightarrow{\mathsf{P}}(t) = \frac{1}{\mathcal{V}(t)} \left(
317 \sum_{i=1}^{N} m_i {\bf v}_i(t) \otimes {\bf v}_i(t) \right) +
318 \overleftrightarrow{\mathsf{W}}(t).
319 \end{equation}
320 The kinetic contribution to the pressure tensor utilizes the {\it
321 outer} product of the velocities denoted by the $\otimes$ symbol.
322 The stress tensor is calculated from another outer product of the
323 inter-atomic separation vectors (${\bf r}_{ij} = {\bf r}_j - {\bf
324 r}_i$) with the forces between the same two atoms,
325 \begin{equation}
326 \overleftrightarrow{\mathsf{W}}(t) = \sum_{i} \sum_{j>i} {\bf
327 r}_{ij}(t) \otimes {\bf f}_{ij}(t).
328 \end{equation}
329 The instantaneous pressure is then simply obtained from the trace of
330 the Pressure tensor,
331 \begin{equation}
332 P(t) = \frac{1}{3} \mathrm{Tr} \left(
333 \overleftrightarrow{\mathsf{P}}(t) \right) .
334 \end{equation}
335 In Eq.~\ref{eq:melchionna1}, $\tau_B$ is the time constant for
336 relaxation of the pressure to the target value. Like in the NVT
337 integrator, the integration of the equations of motion is carried
338 out in a velocity-Verlet style 2 part algorithm:
339
340 {\tt moveA:}
341 \begin{align*}
342 T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
343 %
344 P(t) &\leftarrow \left\{{\bf r}(t)\right\}, \left\{{\bf v}(t)\right\} ,\\
345 %
346 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
347 + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
348 \left(\chi(t) + \eta(t) \right) \right), \\
349 %
350 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
351 + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
352 \chi(t) \right), \\
353 %
354 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left(h *
355 {\bf j}(t + h / 2) \overleftrightarrow{\mathsf{I}}^{-1}
356 \right) ,\\
357 %
358 \chi\left(t + h / 2 \right) &\leftarrow \chi(t) +
359 \frac{h}{2 \tau_T^2} \left( \frac{T(t)}{T_{\mathrm{target}}} - 1
360 \right) ,\\
361 %
362 \eta(t + h / 2) &\leftarrow \eta(t) + \frac{h
363 \mathcal{V}(t)}{2 N k_B T(t) \tau_B^2} \left( P(t)
364 - P_{\mathrm{target}} \right), \\
365 %
366 {\bf r}(t + h) &\leftarrow {\bf r}(t) + h
367 \left\{ {\bf v}\left(t + h / 2 \right)
368 + \eta(t + h / 2)\left[ {\bf r}(t + h)
369 - {\bf R}_0 \right] \right\} ,\\
370 %
371 \mathsf{H}(t + h) &\leftarrow e^{-h \eta(t + h / 2)}
372 \mathsf{H}(t).
373 \end{align*}
374 Most of these equations are identical to their counterparts in the
375 NVT integrator, but the propagation of positions to time $t + h$
376 depends on the positions at the same time. The simulation box
377 $\mathsf{H}$ is scaled uniformly for one full time step by an
378 exponential factor that depends on the value of $\eta$ at time $t +
379 h / 2$. Reshaping the box uniformly also scales the volume of the
380 box by
381 \begin{equation}
382 \mathcal{V}(t + h) \leftarrow e^{ - 3 h \eta(t + h /2)}.
383 \mathcal{V}(t)
384 \end{equation}
385 The {\tt doForces} step for the NPTi integrator is exactly the same
386 as in both the DLM and NVT integrators. Once the forces and torques
387 have been obtained at the new time step, the velocities can be
388 advanced to the same time value.
389
390 {\tt moveB:}
391 \begin{align*}
392 T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
393 \left\{{\bf j}(t + h)\right\} ,\\
394 %
395 P(t + h) &\leftarrow \left\{{\bf r}(t + h)\right\},
396 \left\{{\bf v}(t + h)\right\}, \\
397 %
398 \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
399 2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+h)}
400 {T_{\mathrm{target}}} - 1 \right), \\
401 %
402 \eta(t + h) &\leftarrow \eta(t + h / 2) +
403 \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
404 \tau_B^2} \left( P(t + h) - P_{\mathrm{target}} \right), \\
405 %
406 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t
407 + h / 2 \right) + \frac{h}{2} \left(
408 \frac{{\bf f}(t + h)}{m} - {\bf v}(t + h)
409 (\chi(t + h) + \eta(t + h)) \right) ,\\
410 %
411 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t
412 + h / 2 \right) + \frac{h}{2} \left( {\bf
413 \tau}^b(t + h) - {\bf j}(t + h)
414 \chi(t + h) \right) .
415 \end{align*}
416 Once again, since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required
417 to caclculate $T(t + h)$, $P(t + h)$, $\chi(t + h)$, and $\eta(t +
418 h)$, they indirectly depend on their own values at time $t + h$.
419 {\tt moveB} is therefore done in an iterative fashion until $\chi(t
420 + h)$ and $\eta(t + h)$ become self-consistent.
421
422 The Melchionna modification of the Nos\'e-Hoover-Andersen algorithm
423 is known to conserve a Hamiltonian for the extended system that is,
424 to within a constant, identical to the Gibbs free energy,
425 \begin{equation}
426 H_{\mathrm{NPTi}} = V + K + f k_B T_{\mathrm{target}} \left(
427 \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime)
428 dt^\prime \right) + P_{\mathrm{target}} \mathcal{V}(t).
429 \end{equation}
430 Poor choices of $\delta t$, $\tau_T$, or $\tau_B$ can result in
431 non-conservation of $H_{\mathrm{NPTi}}$, so the conserved quantity
432 is maintained in the last column of the {\tt .stat} file to allow
433 checks on the quality of the integration. It is also known that
434 this algorithm samples the equilibrium distribution for the enthalpy
435 (including contributions for the thermostat and barostat),
436 \begin{equation}
437 H_{\mathrm{NPTi}} = V + K + \frac{f k_B T_{\mathrm{target}}}{2}
438 \left( \chi^2 \tau_T^2 + \eta^2 \tau_B^2 \right) +
439 P_{\mathrm{target}} \mathcal{V}(t).
440 \end{equation}
441
442 \subsection{\label{methodSection:NPTf}Constant-pressure integration with a
443 flexible box (NPTf)}
444
445 There is a relatively simple generalization of the
446 Nos\'e-Hoover-Andersen method to include changes in the simulation
447 box {\it shape} as well as in the volume of the box. This method
448 utilizes the full $3 \times 3$ pressure tensor and introduces a
449 tensor of extended variables ($\overleftrightarrow{\eta}$) to
450 control changes to the box shape. The equations of motion for this
451 method are
452 \begin{eqnarray}
453 \dot{{\bf r}} & = & {\bf v} + \overleftrightarrow{\eta} \cdot \left( {\bf r} - {\bf R}_0 \right), \\
454 \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\overleftrightarrow{\eta} +
455 \chi \cdot \mathsf{1}) {\bf v}, \\
456 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
457 \mbox{ skew}\left(\overleftrightarrow{I}^{-1} \cdot {\bf j}\right) ,\\
458 \dot{{\bf j}} & = & {\bf j} \times \left(
459 \overleftrightarrow{I}^{-1} \cdot {\bf j} \right) - \mbox{
460 rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
461 V}{\partial \mathsf{A}} \right) - \chi {\bf j} ,\\
462 \dot{\chi} & = & \frac{1}{\tau_{T}^2} \left(
463 \frac{T}{T_{\mathrm{target}}} - 1 \right) ,\\
464 \dot{\overleftrightarrow{\eta}} & = & \frac{1}{\tau_{B}^2 f k_B
465 T_{\mathrm{target}}} V \left( \overleftrightarrow{\mathsf{P}} - P_{\mathrm{target}}\mathsf{1} \right) ,\\
466 \dot{\mathsf{H}} & = & \overleftrightarrow{\eta} \cdot \mathsf{H} .
467 \label{eq:melchionna2}
468 \end{eqnarray}
469
470 Here, $\mathsf{1}$ is the unit matrix and
471 $\overleftrightarrow{\mathsf{P}}$ is the pressure tensor. Again,
472 the volume, $\mathcal{V} = \det \mathsf{H}$.
473
474 The propagation of the equations of motion is nearly identical to
475 the NPTi integration:
476
477 {\tt moveA:}
478 \begin{align*}
479 T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
480 %
481 \overleftrightarrow{\mathsf{P}}(t) &\leftarrow \left\{{\bf
482 r}(t)\right\},
483 \left\{{\bf v}(t)\right\} ,\\
484 %
485 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
486 + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} -
487 \left(\chi(t)\mathsf{1} + \overleftrightarrow{\eta}(t) \right) \cdot
488 {\bf v}(t) \right), \\
489 %
490 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
491 + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
492 \chi(t) \right), \\
493 %
494 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left(h *
495 {\bf j}(t + h / 2) \overleftrightarrow{\mathsf{I}}^{-1}
496 \right), \\
497 %
498 \chi\left(t + h / 2 \right) &\leftarrow \chi(t) +
499 \frac{h}{2 \tau_T^2} \left( \frac{T(t)}{T_{\mathrm{target}}}
500 - 1 \right), \\
501 %
502 \overleftrightarrow{\eta}(t + h / 2) &\leftarrow
503 \overleftrightarrow{\eta}(t) + \frac{h \mathcal{V}(t)}{2 N k_B
504 T(t) \tau_B^2} \left( \overleftrightarrow{\mathsf{P}}(t)
505 - P_{\mathrm{target}}\mathsf{1} \right), \\
506 %
507 {\bf r}(t + h) &\leftarrow {\bf r}(t) + h \left\{ {\bf v}
508 \left(t + h / 2 \right) + \overleftrightarrow{\eta}(t +
509 h / 2) \cdot \left[ {\bf r}(t + h)
510 - {\bf R}_0 \right] \right\}, \\
511 %
512 \mathsf{H}(t + h) &\leftarrow \mathsf{H}(t) \cdot e^{-h
513 \overleftrightarrow{\eta}(t + h / 2)} .
514 \end{align*}
515 Here, a power series expansion truncated at second order for the
516 exponential operation is used to scale the simulation box. The {\tt
517 moveB} portion of the algorithm is largely unchanged from the NPTi
518 integrator:
519
520 {\tt moveB:}
521 \begin{align*}
522 T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
523 \left\{{\bf j}(t + h)\right\}, \\
524 %
525 \overleftrightarrow{\mathsf{P}}(t + h) &\leftarrow \left\{{\bf r}
526 (t + h)\right\}, \left\{{\bf v}(t
527 + h)\right\}, \left\{{\bf f}(t + h)\right\} ,\\
528 %
529 \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
530 2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+
531 h)}{T_{\mathrm{target}}} - 1 \right), \\
532 %
533 \overleftrightarrow{\eta}(t + h) &\leftarrow
534 \overleftrightarrow{\eta}(t + h / 2) +
535 \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
536 \tau_B^2} \left( \overleftrightarrow{P}(t + h)
537 - P_{\mathrm{target}}\mathsf{1} \right) ,\\
538 %
539 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t
540 + h / 2 \right) + \frac{h}{2} \left(
541 \frac{{\bf f}(t + h)}{m} -
542 (\chi(t + h)\mathsf{1} + \overleftrightarrow{\eta}(t
543 + h)) \right) \cdot {\bf v}(t + h), \\
544 %
545 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t
546 + h / 2 \right) + \frac{h}{2} \left( {\bf \tau}^b(t
547 + h) - {\bf j}(t + h) \chi(t + h) \right) .
548 \end{align*}
549 The iterative schemes for both {\tt moveA} and {\tt moveB} are
550 identical to those described for the NPTi integrator. The NPTf
551 integrator is known to conserve the following Hamiltonian:
552 \begin{eqnarray*}
553 H_{\mathrm{NPTf}} & = & V + K + f k_B T_{\mathrm{target}} \left(
554 \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime)
555 dt^\prime \right) \\
556 & & + P_{\mathrm{target}} \mathcal{V}(t) + \frac{f k_B
557 T_{\mathrm{target}}}{2}
558 \mathrm{Tr}\left[\overleftrightarrow{\eta}(t)\right]^2 \tau_B^2.
559 \end{eqnarray*}
560 This integrator must be used with care, particularly in liquid
561 simulations. Liquids have very small restoring forces in the
562 off-diagonal directions, and the simulation box can very quickly
563 form elongated and sheared geometries which become smaller than the
564 electrostatic or Lennard-Jones cutoff radii. The NPTf integrator
565 finds most use in simulating crystals or liquid crystals which
566 assume non-orthorhombic geometries.
567
568 \subsection{\label{methodSection:NPAT}NPAT Ensemble}
569
570 A comprehensive understanding of relations between structures and
571 functions in biological membrane system ultimately relies on
572 structure and dynamics of lipid bilayers, which are strongly
573 affected by the interfacial interaction between lipid molecules and
574 surrounding media. One quantity to describe the interfacial
575 interaction is so called the average surface area per lipid.
576 Constant area and constant lateral pressure simulations can be
577 achieved by extending the standard NPT ensemble with a different
578 pressure control strategy
579
580 \begin{equation}
581 \dot {\overleftrightarrow{\eta}} _{\alpha \beta}=\left\{\begin{array}{ll}
582 \frac{{V(P_{\alpha \beta } - P_{{\rm{target}}} )}}{{\tau_{\rm{B}}^{\rm{2}} fk_B T_{{\rm{target}}} }}
583 & \mbox{if $ \alpha = \beta = z$}\\
584 0 & \mbox{otherwise}\\
585 \end{array}
586 \right.
587 \end{equation}
588
589 Note that the iterative schemes for NPAT are identical to those
590 described for the NPTi integrator.
591
592 \subsection{\label{methodSection:NPrT}NP$\gamma$T
593 Ensemble}
594
595 Theoretically, the surface tension $\gamma$ of a stress free
596 membrane system should be zero since its surface free energy $G$ is
597 minimum with respect to surface area $A$, $\gamma = \frac{{\partial
598 G}}{{\partial A}}.$ However, a surface tension of zero is not
599 appropriate for relatively small patches of membrane. In order to
600 eliminate the edge effect of the membrane simulation, a special
601 ensemble, NP$\gamma$T, has been proposed to maintain the lateral
602 surface tension and normal pressure. The equation of motion for the
603 cell size control tensor, $\eta$, in $NP\gamma T$ is
604 \begin{equation}
605 \dot {\overleftrightarrow{\eta}} _{\alpha \beta}=\left\{\begin{array}{ll}
606 - A_{xy} (\gamma _\alpha - \gamma _{{\rm{target}}} ) & \mbox{$\alpha = \beta = x$ or $\alpha = \beta = y$}\\
607 \frac{{V(P_{\alpha \beta } - P_{{\rm{target}}} )}}{{\tau _{\rm{B}}^{\rm{2}} fk_B T_{{\rm{target}}}}} & \mbox{$\alpha = \beta = z$} \\
608 0 & \mbox{$\alpha \ne \beta$} \\
609 \end{array}
610 \right.
611 \end{equation}
612 where $ \gamma _{{\rm{target}}}$ is the external surface tension and
613 the instantaneous surface tensor $\gamma _\alpha$ is given by
614 \begin{equation}
615 \gamma _\alpha = - h_z( \overleftrightarrow{P} _{\alpha \alpha }
616 - P_{{\rm{target}}} )
617 \label{methodEquation:instantaneousSurfaceTensor}
618 \end{equation}
619 There is one additional extended system integrator (NPTxyz), in
620 which each attempt to preserve the target pressure along the box
621 walls perpendicular to that particular axis. The lengths of the box
622 axes are allowed to fluctuate independently, but the angle between
623 the box axes does not change. It should be noted that the NPTxyz
624 integrator is a special case of $NP\gamma T$ if the surface tension
625 $\gamma$ is set to zero, and if $x$ and $y$ can move independently.
626
627 \section{\label{methodSection:zcons}The Z-Constraint Method}
628
629 Based on the fluctuation-dissipation theorem, a force
630 auto-correlation method was developed by Roux and Karplus to
631 investigate the dynamics of ions inside ion channels\cite{Roux1991}.
632 The time-dependent friction coefficient can be calculated from the
633 deviation of the instantaneous force from its mean force.
634 \begin{equation}
635 \xi(z,t)=\langle\delta F(z,t)\delta F(z,0)\rangle/k_{B}T,
636 \end{equation}
637 where%
638 \begin{equation}
639 \delta F(z,t)=F(z,t)-\langle F(z,t)\rangle.
640 \end{equation}
641 If the time-dependent friction decays rapidly, the static friction
642 coefficient can be approximated by
643 \begin{equation}
644 \xi_{\text{static}}(z)=\int_{0}^{\infty}\langle\delta F(z,t)\delta
645 F(z,0)\rangle dt.
646 \end{equation}
647 Allowing diffusion constant to then be calculated through the
648 Einstein relation:\cite{Marrink1994}
649 \begin{equation}
650 D(z)=\frac{k_{B}T}{\xi_{\text{static}}(z)}=\frac{(k_{B}T)^{2}}{\int_{0}^{\infty
651 }\langle\delta F(z,t)\delta F(z,0)\rangle dt}.%
652 \end{equation}
653 The Z-Constraint method, which fixes the z coordinates of the
654 molecules with respect to the center of the mass of the system, has
655 been a method suggested to obtain the forces required for the force
656 auto-correlation calculation.\cite{Marrink1994} However, simply
657 resetting the coordinate will move the center of the mass of the
658 whole system. To avoid this problem, we reset the forces of
659 z-constrained molecules as well as subtract the total constraint
660 forces from the rest of the system after the force calculation at
661 each time step instead of resetting the coordinate. After the force
662 calculation, we define $G_\alpha$ as
663 \begin{equation}
664 G_{\alpha} = \sum_i F_{\alpha i}, \label{oopseEq:zc1}
665 \end{equation}
666 where $F_{\alpha i}$ is the force in the z direction of atom $i$ in
667 z-constrained molecule $\alpha$. The forces of the z constrained
668 molecule are then set to:
669 \begin{equation}
670 F_{\alpha i} = F_{\alpha i} -
671 \frac{m_{\alpha i} G_{\alpha}}{\sum_i m_{\alpha i}}.
672 \end{equation}
673 Here, $m_{\alpha i}$ is the mass of atom $i$ in the z-constrained
674 molecule. Having rescaled the forces, the velocities must also be
675 rescaled to subtract out any center of mass velocity in the z
676 direction.
677 \begin{equation}
678 v_{\alpha i} = v_{\alpha i} -
679 \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}},
680 \end{equation}
681 where $v_{\alpha i}$ is the velocity of atom $i$ in the z direction.
682 Lastly, all of the accumulated z constrained forces must be
683 subtracted from the system to keep the system center of mass from
684 drifting.
685 \begin{equation}
686 F_{\beta i} = F_{\beta i} - \frac{m_{\beta i} \sum_{\alpha}
687 G_{\alpha}}
688 {\sum_{\beta}\sum_i m_{\beta i}},
689 \end{equation}
690 where $\beta$ are all of the unconstrained molecules in the system.
691 Similarly, the velocities of the unconstrained molecules must also
692 be scaled.
693 \begin{equation}
694 v_{\beta i} = v_{\beta i} + \sum_{\alpha}
695 \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}}.
696 \end{equation}
697 At the very beginning of the simulation, the molecules may not be at
698 their constrained positions. To move a z-constrained molecule to its
699 specified position, a simple harmonic potential is used
700 \begin{equation}
701 U(t)=\frac{1}{2}k_{\text{Harmonic}}(z(t)-z_{\text{cons}})^{2},%
702 \end{equation}
703 where $k_{\text{Harmonic}}$ is the harmonic force constant, $z(t)$
704 is the current $z$ coordinate of the center of mass of the
705 constrained molecule, and $z_{\text{cons}}$ is the constrained
706 position. The harmonic force operating on the z-constrained molecule
707 at time $t$ can be calculated by
708 \begin{equation}
709 F_{z_{\text{Harmonic}}}(t)=-\frac{\partial U(t)}{\partial z(t)}=
710 -k_{\text{Harmonic}}(z(t)-z_{\text{cons}}).
711 \end{equation}