ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tengDissertation/Methodology.tex
Revision: 2864
Committed: Fri Jun 16 01:53:48 2006 UTC (18 years, 2 months ago) by tim
Content type: application/x-tex
File size: 30494 byte(s)
Log Message:
finishing temperature control of Langevin

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