ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tengDissertation/Methodology.tex
(Generate patch)

Comparing trunk/tengDissertation/Methodology.tex (file contents):
Revision 2685 by tim, Mon Apr 3 18:07:54 2006 UTC vs.
Revision 2729 by tim, Mon Apr 24 18:49:04 2006 UTC

# Line 2 | Line 2
2  
3   \section{\label{methodSection:rigidBodyIntegrators}Integrators for Rigid Body Motion in Molecular Dynamics}
4  
5 < \section{\label{methodSection:conservedQuantities}Integrators to Conserve Properties in Special Ensembles}
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 ensemble, 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 < \section{\label{methodSection:hydrodynamics}Hydrodynamics}
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 and Nakahara 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 traditional methods because of
23 > the time-reversible nature. Extending Trotter-Suzuki to general
24 > system with a flat phase space, Miller and his colleagues devised an
25 > novel symplectic, time-reversible and volume-preserving integrator
26 > in quaternion representation, which was shown to be superior to the
27 > time-reversible integrator of Matubayasi and Nakahara. However, all
28 > of the 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 < \section{\label{methodSection:langevin}Integrators for Langevin Dynamics of Rigid Bodies}
37 > \subsection{\label{methodSection:DLM}Integrating the Equations of Motion: the
38 > DLM method}
39  
40 < \section{\label{methodSection:coarseGrained}Coarse-Grained Modeling}
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 < \section{\label{methodSection:moleculeScale}Molecular-Scale Modeling}
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 > {\sc oopse} automatically updates ${\bf u}$ 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{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.} \label{timestep}
154 > \end{figure}
155 >
156 > In Fig.~\ref{timestep}, the resulting energy drift at various time
157 > steps for both the DLM and quaternion integration schemes is
158 > compared. All of the 1000 molecule water simulations started with
159 > the same configuration, and the only difference was the method for
160 > handling rotational motion. At time steps of 0.1 and 0.5 fs, both
161 > methods for propagating molecule rotation conserve energy fairly
162 > well, with the quaternion method showing a slight energy drift over
163 > time in the 0.5 fs time step simulation. At time steps of 1 and 2
164 > fs, the energy conservation benefits of the DLM method are clearly
165 > demonstrated. Thus, while maintaining the same degree of energy
166 > conservation, one can take considerably longer time steps, leading
167 > to an overall reduction in computation time.
168 >
169 > \subsection{\label{methodSection:NVT}Nos\'{e}-Hoover Thermostatting}
170 >
171 > The Nos\'e-Hoover equations of motion are given by\cite{Hoover85}
172 > \begin{eqnarray}
173 > \dot{{\bf r}} & = & {\bf v}, \\
174 > \dot{{\bf v}} & = & \frac{{\bf f}}{m} - \chi {\bf v} ,\\
175 > \dot{\mathsf{A}} & = & \mathsf{A} \cdot
176 > \mbox{ skew}\left(\overleftrightarrow{\mathsf{I}}^{-1} \cdot {\bf j}\right), \\
177 > \dot{{\bf j}} & = & {\bf j} \times \left(
178 > \overleftrightarrow{\mathsf{I}}^{-1} \cdot {\bf j} \right) - \mbox{
179 > rot}\left(\mathsf{A}^{T} \cdot \frac{\partial V}{\partial
180 > \mathsf{A}} \right) - \chi {\bf j}. \label{eq:nosehoovereom}
181 > \end{eqnarray}
182 >
183 > $\chi$ is an ``extra'' variable included in the extended system, and
184 > it is propagated using the first order equation of motion
185 > \begin{equation}
186 > \dot{\chi} = \frac{1}{\tau_{T}^2} \left(
187 > \frac{T}{T_{\mathrm{target}}} - 1 \right). \label{eq:nosehooverext}
188 > \end{equation}
189 >
190 > The instantaneous temperature $T$ is proportional to the total
191 > kinetic energy (both translational and orientational) and is given
192 > by
193 > \begin{equation}
194 > T = \frac{2 K}{f k_B}
195 > \end{equation}
196 > Here, $f$ is the total number of degrees of freedom in the system,
197 > \begin{equation}
198 > f = 3 N + 3 N_{\mathrm{orient}} - N_{\mathrm{constraints}},
199 > \end{equation}
200 > and $K$ is the total kinetic energy,
201 > \begin{equation}
202 > K = \sum_{i=1}^{N} \frac{1}{2} m_i {\bf v}_i^T \cdot {\bf v}_i +
203 > \sum_{i=1}^{N_{\mathrm{orient}}}  \frac{1}{2} {\bf j}_i^T \cdot
204 > \overleftrightarrow{\mathsf{I}}_i^{-1} \cdot {\bf j}_i.
205 > \end{equation}
206 >
207 > In eq.(\ref{eq:nosehooverext}), $\tau_T$ is the time constant for
208 > relaxation of the temperature to the target value.  To set values
209 > for $\tau_T$ or $T_{\mathrm{target}}$ in a simulation, one would use
210 > the {\tt tauThermostat} and {\tt targetTemperature} keywords in the
211 > {\tt .bass} file.  The units for {\tt tauThermostat} are fs, and the
212 > units for the {\tt targetTemperature} are degrees K.   The
213 > integration of the equations of motion is carried out in a
214 > velocity-Verlet style 2 part algorithm:
215 >
216 > {\tt moveA:}
217 > \begin{align*}
218 > T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
219 > %
220 > {\bf v}\left(t + h / 2\right)  &\leftarrow {\bf v}(t)
221 >    + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
222 >    \chi(t)\right), \\
223 > %
224 > {\bf r}(t + h) &\leftarrow {\bf r}(t)
225 >    + h {\bf v}\left(t + h / 2 \right) ,\\
226 > %
227 > {\bf j}\left(t + h / 2 \right)  &\leftarrow {\bf j}(t)
228 >    + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
229 >    \chi(t) \right) ,\\
230 > %
231 > \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}
232 >    \left(h * {\bf j}(t + h / 2)
233 >    \overleftrightarrow{\mathsf{I}}^{-1} \right) ,\\
234 > %
235 > \chi\left(t + h / 2 \right) &\leftarrow \chi(t)
236 >    + \frac{h}{2 \tau_T^2} \left( \frac{T(t)}
237 >    {T_{\mathrm{target}}} - 1 \right) .
238 > \end{align*}
239 >
240 > Here $\mathrm{rotate}(h * {\bf j}
241 > \overleftrightarrow{\mathsf{I}}^{-1})$ is the same symplectic
242 > Trotter factorization of the three rotation operations that was
243 > discussed in the section on the DLM integrator.  Note that this
244 > operation modifies both the rotation matrix $\mathsf{A}$ and the
245 > angular momentum ${\bf j}$.  {\tt moveA} propagates velocities by a
246 > half time step, and positional degrees of freedom by a full time
247 > step.  The new positions (and orientations) are then used to
248 > calculate a new set of forces and torques in exactly the same way
249 > they are calculated in the {\tt doForces} portion of the DLM
250 > integrator.
251 >
252 > Once the forces and torques have been obtained at the new time step,
253 > the temperature, velocities, and the extended system variable can be
254 > advanced to the same time value.
255 >
256 > {\tt moveB:}
257 > \begin{align*}
258 > T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
259 >    \left\{{\bf j}(t + h)\right\}, \\
260 > %
261 > \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
262 >    2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+h)}
263 >    {T_{\mathrm{target}}} - 1 \right), \\
264 > %
265 > {\bf v}\left(t + h \right)  &\leftarrow {\bf v}\left(t
266 >    + h / 2 \right) + \frac{h}{2} \left(
267 >    \frac{{\bf f}(t + h)}{m} - {\bf v}(t + h)
268 >    \chi(t h)\right) ,\\
269 > %
270 > {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t
271 >    + h / 2 \right) + \frac{h}{2}
272 >    \left( {\bf \tau}^b(t + h) - {\bf j}(t + h)
273 >    \chi(t + h) \right) .
274 > \end{align*}
275 >
276 > Since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required to
277 > caclculate $T(t + h)$ as well as $\chi(t + h)$, they indirectly
278 > depend on their own values at time $t + h$.  {\tt moveB} is
279 > therefore done in an iterative fashion until $\chi(t + h)$ becomes
280 > self-consistent.  The relative tolerance for the self-consistency
281 > check defaults to a value of $\mbox{10}^{-6}$, but {\sc oopse} will
282 > terminate the iteration after 4 loops even if the consistency check
283 > has not been satisfied.
284 >
285 > The Nos\'e-Hoover algorithm is known to conserve a Hamiltonian for
286 > the extended system that is, to within a constant, identical to the
287 > Helmholtz free energy,\cite{melchionna93}
288 > \begin{equation}
289 > H_{\mathrm{NVT}} = V + K + f k_B T_{\mathrm{target}} \left(
290 > \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime)
291 > dt^\prime \right).
292 > \end{equation}
293 > Poor choices of $h$ or $\tau_T$ can result in non-conservation of
294 > $H_{\mathrm{NVT}}$, so the conserved quantity is maintained in the
295 > last column of the {\tt .stat} file to allow checks on the quality
296 > of the integration.
297 >
298 > Bond constraints are applied at the end of both the {\tt moveA} and
299 > {\tt moveB} portions of the algorithm.  Details on the constraint
300 > algorithms are given in section \ref{oopseSec:rattle}.
301 >
302 > \subsection{\label{methodSection:NPTi}Constant-pressure integration with
303 > isotropic box deformations (NPTi)}
304 >
305 > To carry out isobaric-isothermal ensemble calculations {\sc oopse}
306 > implements the Melchionna modifications to the
307 > Nos\'e-Hoover-Andersen equations of motion,\cite{melchionna93}
308 >
309 > \begin{eqnarray}
310 > \dot{{\bf r}} & = & {\bf v} + \eta \left( {\bf r} - {\bf R}_0 \right), \\
311 > \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\eta + \chi) {\bf v}, \\
312 > \dot{\mathsf{A}} & = & \mathsf{A} \cdot
313 > \mbox{ skew}\left(\overleftrightarrow{I}^{-1} \cdot {\bf j}\right),\\
314 > \dot{{\bf j}} & = & {\bf j} \times \left(
315 > \overleftrightarrow{I}^{-1} \cdot {\bf j} \right) - \mbox{
316 > rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
317 > V}{\partial \mathsf{A}} \right) - \chi {\bf j}, \\
318 > \dot{\chi} & = & \frac{1}{\tau_{T}^2} \left(
319 > \frac{T}{T_{\mathrm{target}}} - 1 \right) ,\\
320 > \dot{\eta} & = & \frac{1}{\tau_{B}^2 f k_B T_{\mathrm{target}}} V
321 > \left( P -
322 > P_{\mathrm{target}} \right), \\
323 > \dot{\mathcal{V}} & = & 3 \mathcal{V} \eta . \label{eq:melchionna1}
324 > \end{eqnarray}
325 >
326 > $\chi$ and $\eta$ are the ``extra'' degrees of freedom in the
327 > extended system.  $\chi$ is a thermostat, and it has the same
328 > function as it does in the Nos\'e-Hoover NVT integrator.  $\eta$ is
329 > a barostat which controls changes to the volume of the simulation
330 > box.  ${\bf R}_0$ is the location of the center of mass for the
331 > entire system, and $\mathcal{V}$ is the volume of the simulation
332 > box.  At any time, the volume can be calculated from the determinant
333 > of the matrix which describes the box shape:
334 > \begin{equation}
335 > \mathcal{V} = \det(\mathsf{H}).
336 > \end{equation}
337 >
338 > The NPTi integrator requires an instantaneous pressure. This
339 > quantity is calculated via the pressure tensor,
340 > \begin{equation}
341 > \overleftrightarrow{\mathsf{P}}(t) = \frac{1}{\mathcal{V}(t)} \left(
342 > \sum_{i=1}^{N} m_i {\bf v}_i(t) \otimes {\bf v}_i(t) \right) +
343 > \overleftrightarrow{\mathsf{W}}(t).
344 > \end{equation}
345 > The kinetic contribution to the pressure tensor utilizes the {\it
346 > outer} product of the velocities denoted by the $\otimes$ symbol.
347 > The stress tensor is calculated from another outer product of the
348 > inter-atomic separation vectors (${\bf r}_{ij} = {\bf r}_j - {\bf
349 > r}_i$) with the forces between the same two atoms,
350 > \begin{equation}
351 > \overleftrightarrow{\mathsf{W}}(t) = \sum_{i} \sum_{j>i} {\bf
352 > r}_{ij}(t) \otimes {\bf f}_{ij}(t).
353 > \end{equation}
354 > The instantaneous pressure is then simply obtained from the trace of
355 > the Pressure tensor,
356 > \begin{equation}
357 > P(t) = \frac{1}{3} \mathrm{Tr} \left(
358 > \overleftrightarrow{\mathsf{P}}(t). \right)
359 > \end{equation}
360 >
361 > In eq.(\ref{eq:melchionna1}), $\tau_B$ is the time constant for
362 > relaxation of the pressure to the target value.  To set values for
363 > $\tau_B$ or $P_{\mathrm{target}}$ in a simulation, one would use the
364 > {\tt tauBarostat} and {\tt targetPressure} keywords in the {\tt
365 > .bass} file.  The units for {\tt tauBarostat} are fs, and the units
366 > for the {\tt targetPressure} are atmospheres.  Like in the NVT
367 > integrator, the integration of the equations of motion is carried
368 > out in a velocity-Verlet style 2 part algorithm:
369 >
370 > {\tt moveA:}
371 > \begin{align*}
372 > T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
373 > %
374 > P(t) &\leftarrow \left\{{\bf r}(t)\right\}, \left\{{\bf v}(t)\right\} ,\\
375 > %
376 > {\bf v}\left(t + h / 2\right)  &\leftarrow {\bf v}(t)
377 >    + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
378 >    \left(\chi(t) + \eta(t) \right) \right), \\
379 > %
380 > {\bf j}\left(t + h / 2 \right)  &\leftarrow {\bf j}(t)
381 >    + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
382 >    \chi(t) \right), \\
383 > %
384 > \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left(h *
385 >    {\bf j}(t + h / 2) \overleftrightarrow{\mathsf{I}}^{-1}
386 >    \right) ,\\
387 > %
388 > \chi\left(t + h / 2 \right) &\leftarrow \chi(t) +
389 >    \frac{h}{2 \tau_T^2} \left( \frac{T(t)}{T_{\mathrm{target}}} - 1
390 >    \right) ,\\
391 > %
392 > \eta(t + h / 2) &\leftarrow \eta(t) + \frac{h
393 >    \mathcal{V}(t)}{2 N k_B T(t) \tau_B^2} \left( P(t)
394 >    - P_{\mathrm{target}} \right), \\
395 > %
396 > {\bf r}(t + h) &\leftarrow {\bf r}(t) + h
397 >    \left\{ {\bf v}\left(t + h / 2 \right)
398 >    + \eta(t + h / 2)\left[ {\bf r}(t + h)
399 >    - {\bf R}_0 \right] \right\} ,\\
400 > %
401 > \mathsf{H}(t + h) &\leftarrow e^{-h \eta(t + h / 2)}
402 >    \mathsf{H}(t).
403 > \end{align*}
404 >
405 > Most of these equations are identical to their counterparts in the
406 > NVT integrator, but the propagation of positions to time $t + h$
407 > depends on the positions at the same time.  {\sc oopse} carries out
408 > this step iteratively (with a limit of 5 passes through the
409 > iterative loop).  Also, the simulation box $\mathsf{H}$ is scaled
410 > uniformly for one full time step by an exponential factor that
411 > depends on the value of $\eta$ at time $t + h / 2$.  Reshaping the
412 > box uniformly also scales the volume of the box by
413 > \begin{equation}
414 > \mathcal{V}(t + h) \leftarrow e^{ - 3 h \eta(t + h /2)}.
415 > \mathcal{V}(t)
416 > \end{equation}
417 >
418 > The {\tt doForces} step for the NPTi integrator is exactly the same
419 > as in both the DLM and NVT integrators.  Once the forces and torques
420 > have been obtained at the new time step, the velocities can be
421 > advanced to the same time value.
422 >
423 > {\tt moveB:}
424 > \begin{align*}
425 > T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
426 >    \left\{{\bf j}(t + h)\right\} ,\\
427 > %
428 > P(t + h) &\leftarrow  \left\{{\bf r}(t + h)\right\},
429 >    \left\{{\bf v}(t + h)\right\}, \\
430 > %
431 > \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
432 >    2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+h)}
433 >    {T_{\mathrm{target}}} - 1 \right), \\
434 > %
435 > \eta(t + h) &\leftarrow \eta(t + h / 2) +
436 >    \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
437 >    \tau_B^2} \left( P(t + h) - P_{\mathrm{target}} \right), \\
438 > %
439 > {\bf v}\left(t + h \right)  &\leftarrow {\bf v}\left(t
440 >    + h / 2 \right) + \frac{h}{2} \left(
441 >    \frac{{\bf f}(t + h)}{m} - {\bf v}(t + h)
442 >    (\chi(t + h) + \eta(t + h)) \right) ,\\
443 > %
444 > {\bf j}\left(t + h \right)  &\leftarrow {\bf j}\left(t
445 >    + h / 2 \right) + \frac{h}{2} \left( {\bf
446 >    \tau}^b(t + h) - {\bf j}(t + h)
447 >    \chi(t + h) \right) .
448 > \end{align*}
449 >
450 > Once again, since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required
451 > to caclculate $T(t + h)$, $P(t + h)$, $\chi(t + h)$, and $\eta(t +
452 > h)$, they indirectly depend on their own values at time $t + h$.
453 > {\tt moveB} is therefore done in an iterative fashion until $\chi(t
454 > + h)$ and $\eta(t + h)$ become self-consistent.  The relative
455 > tolerance for the self-consistency check defaults to a value of
456 > $\mbox{10}^{-6}$, but {\sc oopse} will terminate the iteration after
457 > 4 loops even if the consistency check has not been satisfied.
458 >
459 > The Melchionna modification of the Nos\'e-Hoover-Andersen algorithm
460 > is known to conserve a Hamiltonian for the extended system that is,
461 > to within a constant, identical to the Gibbs free energy,
462 > \begin{equation}
463 > H_{\mathrm{NPTi}} = V + K + f k_B T_{\mathrm{target}} \left(
464 > \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime)
465 > dt^\prime \right) + P_{\mathrm{target}} \mathcal{V}(t).
466 > \end{equation}
467 > Poor choices of $\delta t$, $\tau_T$, or $\tau_B$ can result in
468 > non-conservation of $H_{\mathrm{NPTi}}$, so the conserved quantity
469 > is maintained in the last column of the {\tt .stat} file to allow
470 > checks on the quality of the integration.  It is also known that
471 > this algorithm samples the equilibrium distribution for the enthalpy
472 > (including contributions for the thermostat and barostat),
473 > \begin{equation}
474 > H_{\mathrm{NPTi}} = V + K + \frac{f k_B T_{\mathrm{target}}}{2}
475 > \left( \chi^2 \tau_T^2 + \eta^2 \tau_B^2 \right) +
476 > P_{\mathrm{target}} \mathcal{V}(t).
477 > \end{equation}
478 >
479 > Bond constraints are applied at the end of both the {\tt moveA} and
480 > {\tt moveB} portions of the algorithm.  Details on the constraint
481 > algorithms are given in section \ref{oopseSec:rattle}.
482 >
483 > \subsection{\label{methodSection:NPTf}Constant-pressure integration with a
484 > flexible box (NPTf)}
485 >
486 > There is a relatively simple generalization of the
487 > Nos\'e-Hoover-Andersen method to include changes in the simulation
488 > box {\it shape} as well as in the volume of the box.  This method
489 > utilizes the full $3 \times 3$ pressure tensor and introduces a
490 > tensor of extended variables ($\overleftrightarrow{\eta}$) to
491 > control changes to the box shape.  The equations of motion for this
492 > method are
493 > \begin{eqnarray}
494 > \dot{{\bf r}} & = & {\bf v} + \overleftrightarrow{\eta} \cdot \left( {\bf r} - {\bf R}_0 \right), \\
495 > \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\overleftrightarrow{\eta} +
496 > \chi \cdot \mathsf{1}) {\bf v}, \\
497 > \dot{\mathsf{A}} & = & \mathsf{A} \cdot
498 > \mbox{ skew}\left(\overleftrightarrow{I}^{-1} \cdot {\bf j}\right) ,\\
499 > \dot{{\bf j}} & = & {\bf j} \times \left(
500 > \overleftrightarrow{I}^{-1} \cdot {\bf j} \right) - \mbox{
501 > rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
502 > V}{\partial \mathsf{A}} \right) - \chi {\bf j} ,\\
503 > \dot{\chi} & = & \frac{1}{\tau_{T}^2} \left(
504 > \frac{T}{T_{\mathrm{target}}} - 1 \right) ,\\
505 > \dot{\overleftrightarrow{\eta}} & = & \frac{1}{\tau_{B}^2 f k_B
506 > T_{\mathrm{target}}} V \left( \overleftrightarrow{\mathsf{P}} - P_{\mathrm{target}}\mathsf{1} \right) ,\\
507 > \dot{\mathsf{H}} & = &  \overleftrightarrow{\eta} \cdot \mathsf{H} .
508 > \label{eq:melchionna2}
509 > \end{eqnarray}
510 >
511 > Here, $\mathsf{1}$ is the unit matrix and
512 > $\overleftrightarrow{\mathsf{P}}$ is the pressure tensor.  Again,
513 > the volume, $\mathcal{V} = \det \mathsf{H}$.
514 >
515 > The propagation of the equations of motion is nearly identical to
516 > the NPTi integration:
517 >
518 > {\tt moveA:}
519 > \begin{align*}
520 > T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
521 > %
522 > \overleftrightarrow{\mathsf{P}}(t) &\leftarrow \left\{{\bf
523 > r}(t)\right\},
524 >    \left\{{\bf v}(t)\right\} ,\\
525 > %
526 > {\bf v}\left(t + h / 2\right)  &\leftarrow {\bf v}(t)
527 >    + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} -
528 >    \left(\chi(t)\mathsf{1} + \overleftrightarrow{\eta}(t) \right) \cdot
529 >    {\bf v}(t) \right), \\
530 > %
531 > {\bf j}\left(t + h / 2 \right)  &\leftarrow {\bf j}(t)
532 >    + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
533 >    \chi(t) \right), \\
534 > %
535 > \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left(h *
536 >    {\bf j}(t + h / 2) \overleftrightarrow{\mathsf{I}}^{-1}
537 >    \right), \\
538 > %
539 > \chi\left(t + h / 2 \right) &\leftarrow \chi(t) +
540 >    \frac{h}{2 \tau_T^2} \left( \frac{T(t)}{T_{\mathrm{target}}}
541 >    - 1 \right), \\
542 > %
543 > \overleftrightarrow{\eta}(t + h / 2) &\leftarrow
544 >    \overleftrightarrow{\eta}(t) + \frac{h \mathcal{V}(t)}{2 N k_B
545 >    T(t) \tau_B^2} \left( \overleftrightarrow{\mathsf{P}}(t)
546 >    - P_{\mathrm{target}}\mathsf{1} \right), \\
547 > %
548 > {\bf r}(t + h) &\leftarrow {\bf r}(t) + h \left\{ {\bf v}
549 >    \left(t + h / 2 \right) + \overleftrightarrow{\eta}(t +
550 >    h / 2) \cdot \left[ {\bf r}(t + h)
551 >    - {\bf R}_0 \right] \right\}, \\
552 > %
553 > \mathsf{H}(t + h) &\leftarrow \mathsf{H}(t) \cdot e^{-h
554 >    \overleftrightarrow{\eta}(t + h / 2)} .
555 > \end{align*}
556 > {\sc oopse} uses a power series expansion truncated at second order
557 > for the exponential operation which scales the simulation box.
558 >
559 > The {\tt moveB} portion of the algorithm is largely unchanged from
560 > the NPTi integrator:
561 >
562 > {\tt moveB:}
563 > \begin{align*}
564 > T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
565 >    \left\{{\bf j}(t + h)\right\}, \\
566 > %
567 > \overleftrightarrow{\mathsf{P}}(t + h) &\leftarrow \left\{{\bf r}
568 >    (t + h)\right\}, \left\{{\bf v}(t
569 >    + h)\right\}, \left\{{\bf f}(t + h)\right\} ,\\
570 > %
571 > \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
572 >    2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+
573 >    h)}{T_{\mathrm{target}}} - 1 \right), \\
574 > %
575 > \overleftrightarrow{\eta}(t + h) &\leftarrow
576 >    \overleftrightarrow{\eta}(t + h / 2) +
577 >    \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
578 >    \tau_B^2} \left( \overleftrightarrow{P}(t + h)
579 >    - P_{\mathrm{target}}\mathsf{1} \right) ,\\
580 > %
581 > {\bf v}\left(t + h \right)  &\leftarrow {\bf v}\left(t
582 >    + h / 2 \right) + \frac{h}{2} \left(
583 >    \frac{{\bf f}(t + h)}{m} -
584 >    (\chi(t + h)\mathsf{1} + \overleftrightarrow{\eta}(t
585 >    + h)) \right) \cdot {\bf v}(t + h), \\
586 > %
587 > {\bf j}\left(t + h \right)  &\leftarrow {\bf j}\left(t
588 >    + h / 2 \right) + \frac{h}{2} \left( {\bf \tau}^b(t
589 >    + h) - {\bf j}(t + h) \chi(t + h) \right) .
590 > \end{align*}
591 >
592 > The iterative schemes for both {\tt moveA} and {\tt moveB} are
593 > identical to those described for the NPTi integrator.
594 >
595 > The NPTf integrator is known to conserve the following Hamiltonian:
596 > \begin{equation}
597 > H_{\mathrm{NPTf}} = V + K + f k_B T_{\mathrm{target}} \left(
598 > \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime)
599 > dt^\prime \right) + P_{\mathrm{target}} \mathcal{V}(t) + \frac{f k_B
600 > T_{\mathrm{target}}}{2}
601 > \mathrm{Tr}\left[\overleftrightarrow{\eta}(t)\right]^2 \tau_B^2.
602 > \end{equation}
603 >
604 > This integrator must be used with care, particularly in liquid
605 > simulations.  Liquids have very small restoring forces in the
606 > off-diagonal directions, and the simulation box can very quickly
607 > form elongated and sheared geometries which become smaller than the
608 > electrostatic or Lennard-Jones cutoff radii.  The NPTf integrator
609 > finds most use in simulating crystals or liquid crystals which
610 > assume non-orthorhombic geometries.
611 >
612 > \subsection{\label{methodSection:NPAT}Constant Lateral Pressure and Constant Surface Area (NPAT)}
613 >
614 > \subsection{\label{methodSection:NPrT}Constant lateral Pressure and Constant Surface Tension (NP\gamma T) }
615 >
616 > \subsection{\label{methodSection:NPTxyz}Constant pressure in 3 axes (NPTxyz)}
617 >
618 > There is one additional extended system integrator which is somewhat
619 > simpler than the NPTf method described above.  In this case, the
620 > three axes have independent barostats which each attempt to preserve
621 > the target pressure along the box walls perpendicular to that
622 > particular axis.  The lengths of the box axes are allowed to
623 > fluctuate independently, but the angle between the box axes does not
624 > change. The equations of motion are identical to those described
625 > above, but only the {\it diagonal} elements of
626 > $\overleftrightarrow{\eta}$ are computed.  The off-diagonal elements
627 > are set to zero (even when the pressure tensor has non-zero
628 > off-diagonal elements). It should be noted that the NPTxyz
629 > integrator is a special case of $NP\gamma T$ if the surface tension
630 > $\gamma$ is set to zero.
631 >
632 >
633 > \section{\label{methodSection:constraintMethods}Constraint Methods}
634 >
635 > \subsection{\label{methodSection:rattle}The {\sc rattle} Method for Bond
636 >    Constraints}
637 >
638 > \subsection{\label{methodSection:zcons}Z-Constraint Method}
639 >
640 > Based on the fluctuation-dissipation theorem, a force
641 > auto-correlation method was developed by Roux and Karplus to
642 > investigate the dynamics of ions inside ion channels.\cite{Roux91}
643 > The time-dependent friction coefficient can be calculated from the
644 > deviation of the instantaneous force from its mean force.
645 > \begin{equation}
646 > \xi(z,t)=\langle\delta F(z,t)\delta F(z,0)\rangle/k_{B}T,
647 > \end{equation}
648 > where%
649 > \begin{equation}
650 > \delta F(z,t)=F(z,t)-\langle F(z,t)\rangle.
651 > \end{equation}
652 >
653 > If the time-dependent friction decays rapidly, the static friction
654 > coefficient can be approximated by
655 > \begin{equation}
656 > \xi_{\text{static}}(z)=\int_{0}^{\infty}\langle\delta F(z,t)\delta
657 > F(z,0)\rangle dt.
658 > \end{equation}
659 > Allowing diffusion constant to then be calculated through the
660 > Einstein relation:\cite{Marrink94}
661 > \begin{equation}
662 > D(z)=\frac{k_{B}T}{\xi_{\text{static}}(z)}=\frac{(k_{B}T)^{2}}{\int_{0}^{\infty
663 > }\langle\delta F(z,t)\delta F(z,0)\rangle dt}.%
664 > \end{equation}
665 >
666 > The Z-Constraint method, which fixes the z coordinates of the
667 > molecules with respect to the center of the mass of the system, has
668 > been a method suggested to obtain the forces required for the force
669 > auto-correlation calculation.\cite{Marrink94} However, simply
670 > resetting the coordinate will move the center of the mass of the
671 > whole system. To avoid this problem, a new method was used in {\sc
672 > oopse}. Instead of resetting the coordinate, we reset the forces of
673 > z-constrained molecules as well as subtract the total constraint
674 > forces from the rest of the system after the force calculation at
675 > each time step.
676 >
677 > After the force calculation, define $G_\alpha$ as
678 > \begin{equation}
679 > G_{\alpha} = \sum_i F_{\alpha i}, \label{oopseEq:zc1}
680 > \end{equation}
681 > where $F_{\alpha i}$ is the force in the z direction of atom $i$ in
682 > z-constrained molecule $\alpha$. The forces of the z constrained
683 > molecule are then set to:
684 > \begin{equation}
685 > F_{\alpha i} = F_{\alpha i} -
686 >    \frac{m_{\alpha i} G_{\alpha}}{\sum_i m_{\alpha i}}.
687 > \end{equation}
688 > Here, $m_{\alpha i}$ is the mass of atom $i$ in the z-constrained
689 > molecule. Having rescaled the forces, the velocities must also be
690 > rescaled to subtract out any center of mass velocity in the z
691 > direction.
692 > \begin{equation}
693 > v_{\alpha i} = v_{\alpha i} -
694 >    \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}},
695 > \end{equation}
696 > where $v_{\alpha i}$ is the velocity of atom $i$ in the z direction.
697 > Lastly, all of the accumulated z constrained forces must be
698 > subtracted from the system to keep the system center of mass from
699 > drifting.
700 > \begin{equation}
701 > F_{\beta i} = F_{\beta i} - \frac{m_{\beta i} \sum_{\alpha}
702 > G_{\alpha}}
703 >    {\sum_{\beta}\sum_i m_{\beta i}},
704 > \end{equation}
705 > where $\beta$ are all of the unconstrained molecules in the system.
706 > Similarly, the velocities of the unconstrained molecules must also
707 > be scaled.
708 > \begin{equation}
709 > v_{\beta i} = v_{\beta i} + \sum_{\alpha}
710 >    \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}}.
711 > \end{equation}
712 >
713 > At the very beginning of the simulation, the molecules may not be at
714 > their constrained positions. To move a z-constrained molecule to its
715 > specified position, a simple harmonic potential is used
716 > \begin{equation}
717 > U(t)=\frac{1}{2}k_{\text{Harmonic}}(z(t)-z_{\text{cons}})^{2},%
718 > \end{equation}
719 > where $k_{\text{Harmonic}}$ is the harmonic force constant, $z(t)$
720 > is the current $z$ coordinate of the center of mass of the
721 > constrained molecule, and $z_{\text{cons}}$ is the constrained
722 > position. The harmonic force operating on the z-constrained molecule
723 > at time $t$ can be calculated by
724 > \begin{equation}
725 > F_{z_{\text{Harmonic}}}(t)=-\frac{\partial U(t)}{\partial z(t)}=
726 >    -k_{\text{Harmonic}}(z(t)-z_{\text{cons}}).
727 > \end{equation}
728 >
729 > \section{\label{methodSection:langevin}Integrators for Langevin Dynamics of Rigid Bodies}
730 >
731 > \subsection{\label{methodSection:temperature}Temperature Control}
732 >
733 > \subsection{\label{methodSection:pressureControl}Pressure Control}
734 >
735 > \section{\label{methodSection:hydrodynamics}Hydrodynamics}
736 >
737 > %\section{\label{methodSection:coarseGrained}Coarse-Grained Modeling}
738 >
739 > %\section{\label{methodSection:moleculeScale}Molecular-Scale Modeling}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines