ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tengDissertation/Methodology.tex
Revision: 2941
Committed: Mon Jul 17 20:01:05 2006 UTC (17 years, 11 months ago) by tim
Content type: application/x-tex
File size: 30077 byte(s)
Log Message:
references corrections

File Contents

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