ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/openmdDocs/openmdDoc.tex
Revision: 4102
Committed: Fri Apr 18 18:39:38 2014 UTC (10 years, 4 months ago) by gezelter
Content type: application/x-tex
File size: 207269 byte(s)
Log Message:
Edits for version 2.2

File Contents

# Content
1 \documentclass[]{book}
2 \usepackage{amssymb}
3 \usepackage{amsmath}
4 \usepackage{times}
5 \usepackage{listings}
6 \usepackage{graphicx}
7 \usepackage{setspace}
8 \usepackage{tabularx}
9 \usepackage{longtable}
10 \pagestyle{plain}
11 \pagenumbering{arabic}
12 \usepackage{floatrow}
13 \oddsidemargin 0.0cm
14 \evensidemargin 0.0cm
15 \topmargin -21pt
16 \headsep 10pt
17 \textheight 9.0in
18 \textwidth 6.5in
19 \brokenpenalty=10000
20 \renewcommand{\baselinestretch}{1.2}
21 \usepackage[square, comma, sort&compress]{natbib}
22 \bibpunct{[}{]}{,}{n}{}{;}
23
24 \DeclareFloatFont{tiny}{\scriptsize}% "scriptsize" is defined by floatrow, "tiny" not
25 \floatsetup[table]{font=tiny}
26
27
28 %\renewcommand\citemid{\ } % no comma in optional reference note
29 \lstset{language=C,frame=TB,basicstyle=\footnotesize\ttfamily, %
30 xleftmargin=0.25in, xrightmargin=0.25in,captionpos=b, %
31 abovecaptionskip=0.5cm, belowcaptionskip=0.5cm, escapeinside={~}{~}}
32 \renewcommand{\lstlistingname}{Scheme}
33
34 \begin{document}
35
36 \newcolumntype{A}{p{1.5in}}
37 \newcolumntype{B}{p{0.75in}}
38 \newcolumntype{C}{p{1.5in}}
39 \newcolumntype{D}{p{2in}}
40
41 \newcolumntype{E}{p{0.5in}}
42 \newcolumntype{F}{p{2.25in}}
43 \newcolumntype{G}{p{3in}}
44
45 \newcolumntype{H}{p{0.75in}}
46 \newcolumntype{I}{p{5in}}
47
48 \newcolumntype{J}{p{1.5in}}
49 \newcolumntype{K}{p{1.2in}}
50 \newcolumntype{L}{p{1.5in}}
51 \newcolumntype{M}{p{1.55in}}
52
53
54 \title{{\sc OpenMD-2.2}: Molecular Dynamics in the Open}
55
56 \author{Joseph Michalka, James Marr, Kelsey Stocker, Madan Lamichhane,
57 Patrick Louden, \\
58 Teng Lin, Charles F. Vardeman II, Christopher J. Fennell, Shenyu
59 Kuang, Xiuquan Sun, \\
60 Chunlei Li, Kyle Daily, Yang Zheng, Matthew A. Meineke, and \\
61 J. Daniel Gezelter \\
62 Department of Chemistry and Biochemistry\\
63 University of Notre Dame\\
64 Notre Dame, Indiana 46556}
65
66 \maketitle
67
68 \section*{Preface}
69 {\sc OpenMD} is an open source molecular dynamics engine which is capable of
70 efficiently simulating liquids, proteins, nanoparticles, interfaces,
71 and other complex systems using atom types with orientational degrees
72 of freedom (e.g. ``sticky'' atoms, point dipoles, and coarse-grained
73 assemblies). Proteins, zeolites, lipids, transition metals (bulk, flat
74 interfaces, and nanoparticles) have all been simulated using force
75 fields included with the code. {\sc OpenMD} works on parallel computers
76 using the Message Passing Interface (MPI), and comes with a number of
77 analysis and utility programs that are easy to use and modify. An
78 OpenMD simulation is specified using a very simple meta-data language
79 that is easy to learn.
80
81 \tableofcontents
82 \listoffigures
83 \listoftables
84
85 \mainmatter
86
87 \chapter{\label{sec:intro}Introduction}
88
89 There are a number of excellent molecular dynamics packages available
90 to the chemical physics
91 community.\cite{Brooks83,MacKerell98,pearlman:1995,Gromacs,Gromacs3,DL_POLY,Tinker,Paradyn,namd,macromodel}
92 All of these packages are stable, polished programs which solve many
93 problems of interest. Most are now capable of performing molecular
94 dynamics simulations on parallel computers. Some have source code
95 which is freely available to the entire scientific community. Few,
96 however, are capable of efficiently integrating the equations of
97 motion for atom types with orientational degrees of freedom
98 (e.g. point dipoles, and ``sticky'' atoms). And only one of the
99 programs referenced can handle transition metal force fields like the
100 Embedded Atom Method ({\sc eam}). The direction our research program
101 has taken us now involves the use of atoms with orientational degrees
102 of freedom as well as transition metals. Since these simulation
103 methods may be of some use to other researchers, we have decided to
104 release our program (and all related source code) to the scientific
105 community.
106
107 This document communicates the algorithmic details of our program,
108 {\sc OpenMD}. We have structured this document to first discuss the
109 underlying concepts in this simulation package (Sec.
110 \ref{section:IOfiles}). The empirical energy functions implemented
111 are discussed in Sec.~\ref{section:empiricalEnergy}.
112 Sec.~\ref{section:mechanics} describes the various Molecular Dynamics
113 algorithms {\sc OpenMD} implements in the integration of Hamilton's
114 equations of motion. Program design considerations for parallel
115 computing are presented in Sec.~\ref{section:parallelization}.
116 Concluding remarks are presented in Sec.~\ref{section:conclusion}.
117
118 \chapter{\label{section:IOfiles}Concepts \& Files}
119
120 A simulation in {\sc OpenMD} is built using a few fundamental
121 conceptual building blocks most of which are chemically intuitive.
122 The basic unit of a simulation is an {\tt atom}. The parameters
123 describing an {\tt atom} have been generalized to make it as flexible
124 as possible; this means that in addition to translational degrees of
125 freedom, {\tt Atoms} may also have {\it orientational} degrees of freedom.
126
127 The fundamental (static) properties of {\tt atoms} are defined by the
128 {\tt forceField} chosen for the simulation. The atomic properties
129 specified by a {\tt forceField} might include (but are not limited to)
130 charge, $\sigma$ and $\epsilon$ values for Lennard-Jones interactions,
131 the strength of the dipole moment ($\mu$), the mass, and the moments
132 of inertia. Other more complicated properties of atoms might also be
133 specified by the {\tt forceField}.
134
135 {\tt Atoms} can be grouped together in many ways. A {\tt rigidBody}
136 contains atoms that exert no forces on one another and which move as a
137 single rigid unit. A {\tt cutoffGroup} may contain atoms which
138 function together as a (rigid {\it or} non-rigid) unit for potential
139 energy calculations,
140 \begin{equation}
141 V_{ab} = s(r_{ab}) \sum_{i \in a} \sum_{j \in b} V_{ij}(r_{ij})
142 \end{equation}
143 Here, $a$ and $b$ are two {\tt cutoffGroups} containing multiple atoms
144 ($a = \left\{i\right\}$ and $b = \left\{j\right\}$). $s(r_{ab})$ is a
145 generalized switching function which insures that the atoms in the two
146 {\tt cutoffGroups} are treated identically as the two groups enter or
147 leave an interaction region.
148
149 {\tt Atoms} may also be grouped in more traditional ways into {\tt
150 bonds}, {\tt bends}, {\tt torsions}, and {\tt inversions}. These
151 groupings allow the correct choice of interaction parameters for
152 short-range interactions to be chosen from the definitions in the {\tt
153 forceField}.
154
155 All of these groups of {\tt atoms} are brought together in the {\tt
156 molecule}, which is the fundamental structure for setting up and {\sc
157 OpenMD} simulation. {\tt Molecules} contain lists of {\tt atoms}
158 followed by listings of the other atomic groupings ({\tt bonds}, {\tt
159 bends}, {\tt torsions}, {\tt rigidBodies}, and {\tt cutoffGroups})
160 which relate the atoms to one another. Since a {\tt rigidBody} is a
161 collection of atoms that are propagated in fixed relationships to one
162 another, {\sc OpenMD} uses an internal structure called a {\tt
163 StuntDouble} to store information about those objects that can change
164 position {\it independently} during a simulation. That is, an atom
165 that is part of a rigid body is not itself a StuntDouble. In this
166 case, the rigid body is the StuntDouble. However, an atom that is
167 free to move independently {\it is} its own StuntDouble.
168
169 Simulations often involve heterogeneous collections of molecules. To
170 specify a mixture of {\tt molecule} types, {\sc OpenMD} uses {\tt
171 components}. Even simulations containing only one type of molecule
172 must specify a single {\tt component}.
173
174 Starting a simulation requires two types of information: {\it
175 meta-data}, which describes the types of objects present in the
176 simulation, and {\it configuration} information, which describes the
177 initial state of these objects. An {\sc OpenMD} file is a single
178 combined file format that describes both of these kinds of data. An
179 {\sc OpenMD} file contains one {\tt $<$MetaData$>$} block and {\it at least
180 one} {\tt $<$Snapshot$>$} block.
181
182 The language for the {\tt $<$MetaData$>$} block is a C-based syntax that
183 is parsed at the beginning of the simulation. Configuration
184 information is specified for all {\tt integrableObjects} in a {\tt
185 $<$Snapshot$>$} block. Both the {\tt $<$MetaData$>$} and {\tt $<$Snapshot$>$}
186 formats are described in the following sections.
187
188 \begin{lstlisting}[float,caption={[The structure of an {\sc OpenMD} file]
189 The basic structure of an {\sc OpenMD} file contains HTML-like tags to
190 define simulation meta-data and subsequent instantaneous configuration
191 information. A well-formed {\sc OpenMD} file must contain one $<$MetaData$>$
192 block and {\it at least one} $<$Snapshot$>$ block. Each
193 $<$Snapshot$>$ is further divided into $<$FrameData$>$ and
194 $<$StuntDoubles$>$ sections.},
195 label=sch:mdFormat]
196 <OpenMD>
197 <MetaData>
198 // see section ~\ref{sec:miscConcepts}~ for details on the formatting
199 // of information contained inside the <MetaData> tags
200 </MetaData>
201 <Snapshot> // An instantaneous configuration
202 <FrameData>
203 // FrameData contains information on the time
204 // stamp, the size of the simulation box, and
205 // the current state of extended system
206 // ensemble variables.
207 </FrameData>
208 <StuntDoubles>
209 // StuntDouble information comprises the
210 // positions, velocities, orientations, and
211 // angular velocities of anything that is
212 // capable of independent motion during
213 // the simulation.
214 </StuntDoubles>
215 </Snapshot>
216 <Snapshot> // Multiple <Snapshot> sections can be
217 </Snapshot> // present in a well-formed OpenMD file
218 <Snapshot> // Further information on <Snapshot> blocks
219 </Snapshot> // can be found in section ~\ref{section:coordFiles}~.
220 </OpenMD>
221 \end{lstlisting}
222
223
224 \section{OpenMD Files and $<$MetaData$>$ blocks}
225
226 {\sc OpenMD} uses a HTML-like syntax to separate {\tt $<$MetaData$>$} and
227 {\tt $<$Snapshot$>$} blocks. A C-based syntax is used to parse the {\tt
228 $<$MetaData$>$} blocks at run time. These blocks allow the user to
229 completely describe the system they wish to simulate, as well as
230 tailor {\sc OpenMD}'s behavior during the simulation. {\sc OpenMD}
231 files are typically denoted with the extension {\tt .md} (which can
232 stand for Meta-Data or Molecular Dynamics or Molecule Definition
233 depending on the user's mood). An overview of an {\sc OpenMD} file is
234 shown in Scheme~\ref{sch:mdFormat} and example file is shown in
235 Scheme~\ref{sch:mdExample}.
236
237 \begin{lstlisting}[float,caption={[An example of a complete OpenMD
238 file] An example showing a complete OpenMD file.},
239 label={sch:mdExample}]
240 <OpenMD>
241 <MetaData>
242 molecule{
243 name = "Ar";
244 atom[0]{
245 type="Ar";
246 position( 0.0, 0.0, 0.0 );
247 }
248 }
249
250 component{
251 type = "Ar";
252 nMol = 3;
253 }
254
255 forceField = "LJ";
256 ensemble = "NVE"; // specify the simulation ensemble
257 dt = 1.0; // the time step for integration
258 runTime = 1e3; // the total simulation run time
259 sampleTime = 100; // trajectory file frequency
260 statusTime = 50; // statistics file frequency
261 </MetaData>
262 <Snapshot>
263 <FrameData>
264 Time: 0
265 Hmat: {{ 28.569, 0, 0 }, { 0, 28.569, 0 }, { 0, 0, 28.569 }}
266 Thermostat: 0 , 0
267 Barostat: {{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }}
268 </FrameData>
269 <StuntDoubles>
270 0 pv 17.5 13.3 12.8 1.181e-03 -1.630e-03 -1.369e-03
271 1 pv -12.8 -14.9 -8.4 -4.440e-04 -2.048e-03 1.130e-03
272 2 pv -10.0 -15.2 -6.5 2.239e-03 -6.310e-03 1.810e-03
273 </StuntDoubles>
274 </Snapshot>
275 </OpenMD>
276 \end{lstlisting}
277
278 Within the {\tt $<$MetaData$>$} block it is necessary to provide a
279 complete description of the molecule before it is actually placed in
280 the simulation. {\sc OpenMD}'s meta-data syntax was originally
281 developed with this goal in mind, and allows for the use of {\it
282 include files} to specify all atoms in a molecular prototype, as well
283 as any bonds, bends, or torsions. Include files allow the user to
284 describe a molecular prototype once, then simply include it into each
285 simulation containing that molecule. Returning to the example in
286 Scheme~\ref{sch:mdExample}, the include file's contents would be
287 Scheme~\ref{sch:mdIncludeExample}, and the new {\sc OpenMD} file would
288 become Scheme~\ref{sch:mdExPrime}.
289
290 \begin{lstlisting}[float,caption={An example molecule definition in an
291 include file.},label={sch:mdIncludeExample}]
292 molecule{
293 name = "Ar";
294 atom[0]{
295 type="Ar";
296 position( 0.0, 0.0, 0.0 );
297 }
298 }
299 \end{lstlisting}
300
301 \begin{lstlisting}[float,caption={Revised OpenMD input file
302 example.},label={sch:mdExPrime}]
303 <OpenMD>
304 <MetaData>
305 #include "argon.md"
306
307 component{
308 type = "Ar";
309 nMol = 3;
310 }
311
312 forceField = "LJ";
313 ensemble = "NVE";
314 dt = 1.0;
315 runTime = 1e3;
316 sampleTime = 100;
317 statusTime = 50;
318 </MetaData>
319 </MetaData>
320 <Snapshot>
321 <FrameData>
322 Time: 0
323 Hmat: {{ 28.569, 0, 0 }, { 0, 28.569, 0 }, { 0, 0, 28.569 }}
324 Thermostat: 0 , 0
325 Barostat: {{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }}
326 </FrameData>
327 <StuntDoubles>
328 0 pv 17.5 13.3 12.8 1.181e-03 -1.630e-03 -1.369e-03
329 1 pv -12.8 -14.9 -8.4 -4.440e-04 -2.048e-03 1.130e-03
330 2 pv -10.0 -15.2 -6.5 2.239e-03 -6.310e-03 1.810e-03
331 </StuntDoubles>
332 </Snapshot>
333 </OpenMD>
334 \end{lstlisting}
335
336 \section{\label{section:atomsMolecules}Atoms, Molecules, and other
337 ways of grouping atoms}
338
339 As mentioned above, the fundamental unit for an {\sc OpenMD} simulation
340 is the {\tt atom}. Atoms can be collected into secondary structures
341 such as {\tt rigidBodies}, {\tt cutoffGroups}, or {\tt molecules}. The
342 {\tt molecule} is a way for {\sc OpenMD} to keep track of the atoms in
343 a simulation in logical manner. Molecular units store the identities
344 of all the atoms and rigid bodies associated with themselves, and they
345 are responsible for the evaluation of their own internal interactions
346 (\emph{i.e.}~bonds, bends, and torsions). Scheme
347 \ref{sch:mdIncludeExample} shows how one creates a molecule in an
348 included meta-data file. The positions of the atoms given in the
349 declaration are relative to the origin of the molecule, and the origin
350 is used when creating a system containing the molecule.
351
352 One of the features that sets {\sc OpenMD} apart from most of the
353 current molecular simulation packages is the ability to handle rigid
354 body dynamics. Rigid bodies are non-spherical particles or collections
355 of particles (e.g. $\mbox{C}_{60}$) that have a constant internal
356 potential and move collectively.\cite{Goldstein01} They are not
357 included in most simulation packages because of the algorithmic
358 complexity involved in propagating orientational degrees of freedom.
359 Integrators which propagate orientational motion with an acceptable
360 level of energy conservation for molecular dynamics are relatively
361 new inventions.
362
363 Moving a rigid body involves determination of both the force and
364 torque applied by the surroundings, which directly affect the
365 translational and rotational motion in turn. In order to accumulate
366 the total force on a rigid body, the external forces and torques must
367 first be calculated for all the internal particles. The total force on
368 the rigid body is simply the sum of these external forces.
369 Accumulation of the total torque on the rigid body is more complex
370 than the force because the torque is applied to the center of mass of
371 the rigid body. The space-fixed torque on rigid body $i$ is
372 \begin{equation}
373 \boldsymbol{\tau}_i=
374 \sum_{a}\biggl[(\mathbf{r}_{ia}-\mathbf{r}_i)\times \mathbf{f}_{ia}
375 + \boldsymbol{\tau}_{ia}\biggr],
376 \label{eq:torqueAccumulate}
377 \end{equation}
378 where $\boldsymbol{\tau}_i$ and $\mathbf{r}_i$ are the torque on and
379 position of the center of mass respectively, while $\mathbf{f}_{ia}$,
380 $\mathbf{r}_{ia}$, and $\boldsymbol{\tau}_{ia}$ are the force on,
381 position of, and torque on the component particles of the rigid body.
382
383 The summation of the total torque is done in the body fixed axis of
384 each rigid body. In order to move between the space fixed and body
385 fixed coordinate axes, parameters describing the orientation must be
386 maintained for each rigid body. At a minimum, the rotation matrix
387 ($\mathsf{A}$) can be described by the three Euler angles ($\phi,
388 \theta,$ and $\psi$), where the elements of $\mathsf{A}$ are composed of
389 trigonometric operations involving $\phi, \theta,$ and
390 $\psi$.\cite{Goldstein01} In order to avoid numerical instabilities
391 inherent in using the Euler angles, the four parameter ``quaternion''
392 scheme is often used. The elements of $\mathsf{A}$ can be expressed as
393 arithmetic operations involving the four quaternions ($q_w, q_x, q_y,$
394 and $q_z$).\cite{Allen87} Use of quaternions also leads to
395 performance enhancements, particularly for very small
396 systems.\cite{Evans77}
397
398 Rather than use one of the previously stated methods, {\sc OpenMD}
399 utilizes a relatively new scheme that propagates the entire nine
400 parameter rotation matrix. Further discussion on this choice can be
401 found in Sec.~\ref{section:integrate}. An example definition of a
402 rigid body can be seen in Scheme
403 \ref{sch:rigidBody}.
404
405 \begin{lstlisting}[float,caption={[Defining rigid bodies]A sample
406 definition of a molecule containing a rigid body and a cutoff
407 group},label={sch:rigidBody}]
408 molecule{
409 name = "TIP3P";
410 atom[0]{
411 type = "O_TIP3P";
412 position( 0.0, 0.0, -0.06556 );
413 }
414 atom[1]{
415 type = "H_TIP3P";
416 position( 0.0, 0.75695, 0.52032 );
417 }
418 atom[2]{
419 type = "H_TIP3P";
420 position( 0.0, -0.75695, 0.52032 );
421 }
422
423 rigidBody[0]{
424 members(0, 1, 2);
425 }
426
427 cutoffGroup{
428 members(0, 1, 2);
429 }
430 }
431 \end{lstlisting}
432
433 \section{\label{sec:miscConcepts}Creating a $<$MetaData$>$ block}
434
435 The actual creation of a {\tt $<$MetaData$>$} block requires several key
436 components. The first part of the file needs to be the declaration of
437 all of the molecule prototypes used in the simulation. This is
438 typically done through included prototype files. Only the molecules
439 actually present in the simulation need to be declared; however, {\sc
440 OpenMD} allows for the declaration of more molecules than are
441 needed. This gives the user the ability to build up a library of
442 commonly used molecules into a single include file.
443
444 Once all prototypes are declared, the ordering of the rest of the
445 block is less stringent. The molecular composition of the simulation
446 is specified with {\tt component} statements. Each different type of
447 molecule present in the simulation is considered a separate
448 component (an example is shown in
449 Sch.~\ref{sch:mdExPrime}). The component blocks tell {\sc OpenMD} the
450 number of molecules that will be in the simulation, and the order in
451 which the components blocks are declared sets the ordering of the real
452 atoms in the {\tt $<$Snapshot$>$} block as well as in the output files. The
453 remainder of the script then sets the various simulation parameters
454 for the system of interest.
455
456 The required set of parameters that must be present in all simulations
457 is given in Table~\ref{table:reqParams}. Since the user can use {\sc
458 OpenMD} to perform energy minimizations as well as molecular dynamics
459 simulations, one of the {\tt minimizer} or {\tt ensemble} keywords
460 must be present. The {\tt ensemble} keyword is responsible for
461 selecting the integration method used for the calculation of the
462 equations of motion. An in depth discussion of the various methods
463 available in {\sc OpenMD} can be found in
464 Sec.~\ref{section:mechanics}. The {\tt minimizer} keyword selects
465 which minimization method to use, and more details on the choices of
466 minimizer parameters can be found in
467 Sec.~\ref{section:minimizer}. The {\tt forceField} statement is
468 important for the selection of which forces will be used in the course
469 of the simulation. {\sc OpenMD} supports several force fields, as
470 outlined in Sec.~\ref{section:empiricalEnergy}. The force fields are
471 interchangeable between simulations, with the only requirement being
472 that all atoms needed by the simulation are defined within the
473 selected force field.
474
475 For molecular dynamics simulations, the time step between force
476 evaluations is set with the {\tt dt} parameter, and {\tt runTime} will
477 set the time length of the simulation. Note, that {\tt runTime} is an
478 absolute time, meaning if the simulation is started at t = 10.0~ns
479 with a {\tt runTime} of 25.0~ns, the simulation will only run for an
480 additional 15.0~ns.
481
482 For energy minimizations, it is not necessary to specify {\tt dt} or
483 {\tt runTime}.
484
485 To set the initial positions and velocities of all the integrable
486 objects in the simulation, {\sc OpenMD} will use the last good {\tt
487 $<$Snapshot$>$} block that was found in the startup file that it was
488 called with. If the {\tt useInitalTime} flag is set to {\tt true},
489 the time stamp from this snapshot will also set the initial time stamp
490 for the simulation. Additional parameters are summarized in
491 Table~\ref{table:genParams}.
492
493 It is important to note the fundamental units in all files which are
494 read and written by {\sc OpenMD}. Energies are in $\mbox{kcal
495 mol}^{-1}$, distances are in $\mbox{\AA}$, times are in $\mbox{fs}$,
496 translational velocities are in $\mbox{\AA~fs}^{-1}$, and masses are
497 in $\mbox{amu}$. Orientational degrees of freedom are described using
498 quaternions (unitless, but $q_w^2 + q_x^2 + q_y^2 + q_z^2 = 1$),
499 body-fixed angular momenta ($\mbox{amu \AA}^{2} \mbox{radians
500 fs}^{-1}$), and body-fixed moments of inertia ($\mbox{amu \AA}^{2}$).
501
502 \begin{longtable}[c]{ABCD}
503 \caption{Meta-data Keywords: Required Parameters}
504 \\
505 {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
506 \endhead
507 \hline
508 \endfoot
509 {\tt forceField} & string & Sets the base name for the force field file &
510 OpenMD appends a {\tt .frc} to the end of this to look for a force
511 field file.\\
512 {\tt component} & & Defines the molecular components of the system &
513 Every {\tt $<$MetaData$>$} block must have a component statement. \\
514 {\tt minimizer} & string & Chooses a minimizer & Possible minimizers
515 are SD and CG. Either {\tt ensemble} or {\tt minimizer} must be specified. \\
516 {\tt ensemble} & string & Sets the ensemble. & Possible ensembles are
517 NVE, NVT, NPTi, NPAT, NPTf, NPTxyz, LD and LangevinHull. Either {\tt ensemble}
518 or {\tt minimizer} must be specified. \\
519 {\tt dt} & fs & Sets the time step. & Selection of {\tt dt} should be
520 small enough to sample the fastest motion of the simulation. ({\tt
521 dt} is required for molecular dynamics simulations)\\
522 {\tt runTime} & fs & Sets the time at which the simulation should
523 end. & This is an absolute time, and will end the simulation when the
524 current time meets or exceeds the {\tt runTime}. ({\tt runTime} is
525 required for molecular dynamics simulations)
526 \label{table:reqParams}
527 \end{longtable}
528
529 \begin{longtable}[c]{ABCD}
530 \caption{Meta-data Keywords: Optional Parameters}
531 \\
532 {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
533 \endhead
534 \hline
535 \endfoot
536 {\tt forceFieldVariant} & string & Sets the name of the variant of the
537 force field. & {\sc eam} has three variants: {\tt u3}, {\tt u6}, and
538 {\tt VC}. \\
539 {\tt forceFieldFileName} & string & Overrides the default force field
540 file name & Each force field has a default file name, and this
541 parameter can override the default file name for the chosen force
542 field. \\
543 {\tt usePeriodicBoundaryConditions} & & & \\
544 & logical & Turns periodic boundary conditions on/off. & Default is true. \\
545 {\tt orthoBoxTolerance} & double & & decides how orthogonal the periodic
546 box must be before we can use cheaper box calculations \\
547 {\tt cutoffRadius} & $\mbox{\AA}$ & Manually sets the cutoff radius &
548 the default value is set by the {\tt cutoffPolicy} \\
549 {\tt cutoffPolicy} & string & one of mix, max, or
550 traditional & the traditional cutoff policy is to set the cutoff
551 radius for all atoms in the system to the same value (governed by the
552 largest atom). mix and max are pair-dependent cutoff
553 methods. \\
554 {\tt skinThickness} & \AA & thickness of the skin for the Verlet
555 neighbor lists & defaults to 1 \AA \\
556 {\tt switchingRadius} & $\mbox{\AA}$ & Manually sets the inner radius
557 for the switching function. & Defaults to 85~\% of the {\tt
558 cutoffRadius}. \\
559 {\tt switchingFunctionType} & & & \\
560 & string & cubic or
561 fifth\_order\_polynomial & Default is cubic. \\
562 {\tt useInitialTime} & logical & Sets whether the initial time is
563 taken from the last $<$Snapshot$>$ in the startup file. & Useful when recovering a simulation from a crashed processor. Default is false. \\
564 {\tt useInitialExtendedSystemState} & & & \\
565 & logical & keep the extended
566 system variables? & Should the extended
567 variables (the thermostat and barostat) be kept from the {\tt $<$Snapshot$>$} block? \\
568 {\tt sampleTime} & fs & Sets the frequency at which the {\tt .dump} file is written. & The default is equal to the {\tt runTime}. \\
569 {\tt resetTime} & fs & Sets the frequency at which the extended system
570 variables are reset to zero & The default is to never reset these
571 variables. \\
572 {\tt statusTime} & fs & Sets the frequency at which the {\tt .stat} file is written. & The default is equal to the {\tt sampleTime}. \\
573 {\tt finalConfig} & string & Sets the name of the final output file. & Useful when stringing simulations together. Defaults to the root name of the initial meta-data file but with an {\tt .eor} extension. \\
574 {\tt compressDumpFile} & logical & & should the {\tt .dump} file be
575 compressed on the fly? \\
576 {\tt statFileFormat} & string & columns to print in the {\tt .stat}
577 file where each column is separated by a pipe ($\mid$) symbol. & (The
578 default is the first eight of these columns in order.) \\
579 & & \multicolumn{2}{p{3.5in}}{Allowed
580 column names are: {\sc time, total\_energy, potential\_energy, kinetic\_energy,
581 temperature, pressure, volume, conserved\_quantity, hullvolume, gyrvolume,
582 translational\_kinetic, rotational\_kinetic, long\_range\_potential,
583 short\_range\_potential, vanderwaals\_potential,
584 electrostatic\_potential, metallic\_potential,
585 hydrogen\_bonding\_potential, bond\_potential, bend\_potential,
586 dihedral\_potential, inversion\_potential, raw\_potential, restraint\_potential,
587 pressure\_tensor, system\_dipole, heatflux, electronic\_temperature}} \\
588 {\tt printPressureTensor} & logical & sets whether {\sc OpenMD} will print
589 out the pressure tensor & can be useful for calculations of the bulk
590 modulus \\
591 {\tt electrostaticSummationMethod} & & & \\
592 & string & shifted\_force,
593 shifted\_potential, shifted\_force, or reaction\_field &
594 default is shifted\_force. \\
595 {\tt electrostaticScreeningMethod} & & & \\
596 & string & undamped or damped & default is damped \\
597 {\tt dielectric} & unitless & Sets the dielectric constant for
598 reaction field. & If {\tt electrostaticSummationMethod} is set to {\tt
599 reaction\_field}, then {\tt dielectric} must be set. \\
600 {\tt dampingAlpha} & $\mbox{\AA}^{-1}$ & governs strength of
601 electrostatic damping & defaults to 0.2 $\mbox{\AA}^{-1}$. \\
602 {\tt tempSet} & logical & resample velocities from a Maxwell-Boltzmann
603 distribution set to {\tt targetTemp} & default is false. \\
604 {\tt thermalTime} & fs & how often to perform a {\tt tempSet} &
605 default is never \\
606 {\tt targetTemp} & K & sets the target temperature & no default value \\
607 {\tt tauThermostat} & fs & time constant for Nos\'{e}-Hoover
608 thermostat & times from 1000-10,000 fs are reasonable \\
609 {\tt targetPressure} & atm & sets the target pressure & no default value\\
610 {\tt surfaceTension} & & sets the target surface tension in the x-y
611 plane & no default value \\
612 {\tt tauBarostat} & fs & time constant for the
613 Nos\'{e}-Hoover-Andersen barostat & times from 10,000 to 100,000 fs
614 are reasonable \\
615 {\tt seed } & integer & Sets the seed value for the random number generator. & The seed needs to be at least 9 digits long. The default is to take the seed from the CPU clock. \\
616 \label{table:genParams}
617 \end{longtable}
618
619
620 \section{\label{section:coordFiles}$<$Snapshot$>$ Blocks}
621
622 The standard format for storage of a system's coordinates is the {\tt
623 $<$Snapshot$>$} block , the exact details of which can be seen in
624 Scheme~\ref{sch:dumpFormat}. As all bonding and molecular information
625 is stored in the {\tt $<$MetaData$>$} blocks, the {\tt $<$Snapshot$>$} blocks
626 contain only the coordinates of the objects which move independently
627 during the simulation. It is important to note that {\it not all
628 atoms} are capable of independent motion. Atoms which are part of
629 rigid bodies are not ``integrable objects'' in the equations of
630 motion; the rigid bodies themselves are the integrable objects.
631 Therefore, the coordinate file contains coordinates of all the {\tt
632 integrableObjects} in the system. For systems without rigid bodies,
633 this is simply the coordinates of all the atoms.
634
635 It is important to note that although the simulation propagates the
636 complete rotation matrix, directional entities are written out using
637 quaternions to save space in the output files.
638
639 \begin{lstlisting}[float,caption={[The format of the {\tt $<$Snapshot$>$} block]
640 An example of the format of the {\tt $<$Snapshot$>$} block. There is an
641 initial sub-block called {\tt $<$FrameData$>$} which contains the time
642 stamp, the three column vectors of $\mathsf{H}$, and optional extra
643 information for the extended sytem ensembles. The lines in the {\tt
644 $<$StuntDoubles$>$} sub-block provide information about the instantaneous
645 configuration of each integrable object. For each integrable object,
646 the global index is followed by a short string describing what
647 additional information is present on the line. Atoms with only
648 position and velocity information use the ``pv'' string which must
649 then be followed by the position and velocity vectors for that atom.
650 Directional atoms and Rigid Bodies typically use the ``pvqj'' string
651 which is followed by position, velocity, quaternions, and
652 lastly, body fixed angular momentum for that integrable object.},
653 label=sch:dumpFormat]
654 <Snapshot>
655 <FrameData>
656 Time: 0
657 Hmat: {{ Hxx, Hyx, Hzx }, { Hxy, Hyy, Hzy }, { Hxz, Hyz, Hzz }}
658 Thermostat: 0 , 0
659 Barostat: {{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }}
660 </FrameData>
661 <StuntDoubles>
662 0 pv x y z vx vy vz
663 1 pv x y z vx vy vz
664 2 pvqj x y z vx vy vz qw qx qy qz jx jy jz
665 3 pvqj x y z vx vy vz qw qx qy qz jx jy jz
666 </StuntDoubles>
667 </Snapshot>
668 \end{lstlisting}
669
670 There are three {\sc OpenMD} files that are written using the combined
671 format. They are: the initial startup file (\texttt{.md}), the
672 simulation trajectory file (\texttt{.dump}), and the final coordinates
673 or ``end-of-run'' for the simulation (\texttt{.eor}). The initial
674 startup file is necessary for {\sc OpenMD} to start the simulation with
675 the proper coordinates, and this file must be generated by the user
676 before the simulation run. The trajectory (or ``dump'') file is
677 updated during simulation and is used to store snapshots of the
678 coordinates at regular intervals. The first frame is a duplication of
679 the initial configuration (the last good {\tt $<$Snapshot$>$} in the
680 startup file), and each subsequent frame is appended to the dump file
681 at an interval specified in the meta-data file with the
682 \texttt{sampleTime} flag. The final coordinate file is the
683 ``end-of-run'' file. The \texttt{.eor} file stores the final
684 configuration of the system for a given simulation. The file is
685 updated at the same time as the \texttt{.dump} file, but it only
686 contains the most recent frame. In this way, an \texttt{.eor} file may
687 be used to initialize a second simulation should it be necessary to
688 recover from a crash or power outage. The coordinate files generated
689 by {\sc OpenMD} (both \texttt{.dump} and \texttt{.eor}) all contain the
690 same {\tt $<$MetaData$>$} block as the startup file, so they may be
691 used to start up a new simulation if desired.
692
693 \section{\label{section:initCoords}Generation of Initial Coordinates}
694
695 As was stated in Sec.~\ref{section:coordFiles}, a meaningful {\tt
696 $<$Snapshot$>$} block is necessary for specifying for the starting
697 coordinates for a simulation. Since each simulation is different,
698 system creation is left to the end user; however, we have included a
699 few sample programs which make some specialized structures. The {\tt
700 $<$Snapshot$>$} block must index the integrable objects in the correct
701 order. The ordering of the integrable objects relies on the ordering
702 of molecules within the {\tt $<$MetaData$>$} block. {\sc OpenMD}
703 expects the order to comply with the following guidelines:
704 \begin{enumerate}
705 \item All of the molecules of the first declared component are given
706 before proceeding to the molecules of the second component, and so on
707 for all subsequently declared components.
708 \item The ordering of the atoms for each molecule follows the order
709 declared in the molecule's declaration within the model file.
710 \item Only atoms which are not members of a {\tt rigidBody} are
711 included.
712 \item Rigid Body coordinates for a molecule are listed immediately
713 after the the other atoms in a molecule. Some molecules may be
714 entirely rigid, in which case, only the rigid body coordinates are
715 given.
716 \end{enumerate}
717 An example is given in the {\sc OpenMD} file in Scheme~\ref{sch:initEx1}.
718
719 \begin{lstlisting}[float,caption={Example declaration of the
720 $\text{I}_2$ molecule and the HCl molecule in $<$MetaData$>$ and
721 $<$Snapshot$>$ blocks. Note that even though $\text{I}_2$ is
722 declared before HCl, the $<$Snapshot$>$ block follows the order {\it in
723 which the components were included}.}, label=sch:initEx1]
724 <OpenMD>
725 <MetaData>
726 molecule{
727 name = "I2";
728 atom[0]{ type = "I"; }
729 atom[1]{ type = "I"; }
730 bond{ members( 0, 1); }
731 }
732 molecule{
733 name = "HCl"
734 atom[0]{ type = "H";}
735 atom[1]{ type = "Cl";}
736 bond{ members( 0, 1); }
737 }
738 component{
739 type = "HCl";
740 nMol = 4;
741 }
742 component{
743 type = "I2";
744 nMol = 1;
745 }
746 </MetaData>
747 <Snapshot>
748 <FrameData>
749 Time: 0
750 Hmat: {{ 10.0, 0.0, 0.0 }, { 0.0, 10.0, 0.0 }, { 0.0, 0.0, 10.0 }}
751 </FrameData>
752 <StuntDoubles>
753 0 pv x y z vx vy vz // H from first HCl molecule
754 1 pv x y z vx vy vz // Cl from first HCl molecule
755 2 pv x y z vx vy vz // H from second HCl molecule
756 3 pv x y z vx vy vz // Cl from second HCl molecule
757 4 pv x y z vx vy vz // H from third HCl molecule
758 5 pv x y z vx vy vz // Cl from third HCl molecule
759 6 pv x y z vx vy vz // H from fourth HCl molecule
760 7 pv x y z vx vy vz // Cl from fourth HCl molecule
761 8 pv x y z vx vy vz // First I from I2 molecule
762 9 pv x y z vx vy vz // Second I from I2 molecule
763 </StuntDoubles>
764 </Snapshot>
765 </OpenMD>
766 \end{lstlisting}
767
768 \section{The Statistics File}
769
770 The last output file generated by {\sc OpenMD} is the statistics
771 file. This file records such statistical quantities as the
772 instantaneous temperature (in $K$), volume (in $\mbox{\AA}^{3}$),
773 pressure (in $\mbox{atm}$), etc. It is written out with the frequency
774 specified in the meta-data file with the
775 \texttt{statusTime} keyword. The file allows the user to observe the
776 system variables as a function of simulation time while the simulation
777 is in progress. One useful function the statistics file serves is to
778 monitor the conserved quantity of a given simulation ensemble,
779 allowing the user to gauge the stability of the integrator. The
780 statistics file is denoted with the \texttt{.stat} file extension.
781
782 \chapter{\label{section:forceFields}Force Fields}
783
784 Like many molecular simulation packages, {\sc OpenMD} splits the
785 potential energy into the short-ranged (bonded) portion and a
786 long-range (non-bonded) potential,
787 \begin{equation}
788 V = V_{\mathrm{short-range}} + V_{\mathrm{long-range}}.
789 \end{equation}
790 The short-ranged portion includes the bonds, bends, torsions, and
791 inversions which have been defined in the meta-data file for the
792 molecules. The functional forms and parameters for these interactions
793 are defined by the force field which is selected in the MetaData
794 section.
795
796 \section{\label{section:shortRange}The basic interactions}
797
798 The energy function for a system composed of $N$ molecules is
799 traditionally written
800 \begin{equation}
801 V = \sum^{N}_{I=1} V^{I}_{\text{Internal}}
802 + \sum^{N-1}_{I=1} \sum_{J>I} V^{IJ}_{\text{Cross}},
803 \label{eq:totalPotential}
804 \end{equation}
805 where $V^{IJ}_{\text{Cross}}$ contains all intermolecular interactions
806 between molecules $I$ and $J$, and $V^{I}_{\text{Internal}}$ is the
807 internal potential of molecule $I$:
808 \begin{align*}
809 V^{I}_{\text{Internal}} = &
810 \sum_{r_{ij} \in I} V_{\text{bond}}(r_{ij})
811 + \sum_{\theta_{ijk} \in I} V_{\text{bend}}(\theta_{ijk})
812 + \sum_{\phi_{ijkl} \in I} V_{\text{torsion}}(\phi_{ijkl})
813 + \sum_{\omega_{ijkl} \in I} V_{\text{inversion}}(\omega_{ijkl}) \\
814 & + \sum_{i \in I} \sum_{(j>i+4) \in I}
815 \biggl[ V_{\text{dispersion}}(r_{ij}) + V_{\text{electrostatic}}
816 (\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},\boldsymbol{\Omega}_{j})
817 \biggr].
818 \label{eq:internalPotential}
819 \end{align*}
820 Here $V_{\text{bond}}, V_{\text{bend}},
821 V_{\text{torsion}},\mathrm{~and~} V_{\text{inversion}}$ represent the
822 bond, bend, torsion, and inversion potentials for all
823 topologically-connected sets of atoms within the molecule. Bonds are
824 the primary way of specifying how the atoms are connected together to
825 form the molecule (i.e. they define the molecular topology). The
826 other short-range interactions may be specified explicitly in the
827 molecule definition, or they may be deduced from bonding information.
828 For example, bends can be implicitly deduced from two bonds which
829 share an atom. Torsions can be deduced from two bends that share a
830 bond. Inversion potentials are utilized primarily to enforce
831 planarity around $sp^2$-hybridized sites, and these are specified with
832 central atoms and satellites (or an atom with bonds to exactly three
833 satellites). The pairwise portions of the non-bonded interactions are
834 usually excluded for atom pairs that are involved in the same bond,
835 bend, or torsion. All other atom pairs within a molecule are subject
836 to non-bonded pair potentials.
837
838 The types of atoms being simulated, as well as the specific functional
839 forms and parameters of the intra-molecular functions and the
840 long-range potentials are defined by the force field. In the following
841 sections we discuss the stucture of an OpenMD force field file and the
842 specification of blocks that may be present within these files.
843
844 \section{\label{section:frcFile}Force Field Files}
845
846 Force field files have a number of ``Blocks'' to delineate different
847 types of information. The blocks contain AtomType data, which provide
848 properties belonging to a single AtomType, as well as interaction
849 information which provides information about bonded or non-bonded
850 interactions that cannot be deduced from AtomType information alone.
851 A simple example of a forceField file is shown in scheme
852 \ref{sch:frcExample}.
853
854 \begin{lstlisting}[float,caption={[An example of a complete OpenMD
855 force field file for straight-chain united-atom alkanes.] An example
856 showing a complete OpenMD force field for straight-chain united-atom
857 alkanes.}, label={sch:frcExample}]
858 begin Options
859 Name = "alkane"
860 end Options
861
862 begin BaseAtomTypes
863 //name mass
864 C 12.0107
865 end BaseAtomTypes
866
867 begin AtomTypes
868 //name base mass
869 CH4 C 16.05
870 CH3 C 15.04
871 CH2 C 14.03
872 end AtomTypes
873
874 begin LennardJonesAtomTypes
875 //name epsilon sigma
876 CH4 0.2941 3.73
877 CH3 0.1947 3.75
878 CH2 0.09140 3.95
879 end LennardJonesAtomTypes
880
881 begin BondTypes
882 //AT1 AT2 Type r0 k
883 CH3 CH3 Harmonic 1.526 260
884 CH3 CH2 Harmonic 1.526 260
885 CH2 CH2 Harmonic 1.526 260
886 end BondTypes
887
888 begin BendTypes
889 //AT1 AT2 AT3 Type theta0 k
890 CH3 CH2 CH3 Harmonic 114.0 124.19
891 CH3 CH2 CH2 Harmonic 114.0 124.19
892 CH2 CH2 CH2 Harmonic 114.0 124.19
893 end BendTypes
894
895 begin TorsionTypes
896 //AT1 AT2 AT3 AT4 Type
897 CH3 CH2 CH2 CH3 Trappe 0.0 0.70544 -0.13549 1.5723
898 CH3 CH2 CH2 CH2 Trappe 0.0 0.70544 -0.13549 1.5723
899 CH2 CH2 CH2 CH2 Trappe 0.0 0.70544 -0.13549 1.5723
900 end TorsionTypes
901 \end{lstlisting}
902
903 \subsection{\label{section:ffOptions}The Options block}
904
905 The Options block defines properties governing how the force field
906 interactions are carried out. This block is delineated with the text
907 tags {\tt begin Options} and {\tt end Options}. Most options don't
908 need to be set as they come with fairly sensible default values, but
909 the various keywords and their possible values are given in Scheme
910 \ref{sch:optionsBlock}.
911
912 \begin{lstlisting}[caption={[A force field Options block showing default values
913 for many force field options.] A force field Options block showing default values
914 for many force field options. Most of these options do not need to be
915 specified if the default values are working.},
916 label={sch:optionsBlock}]
917 begin Options
918 Name = "alkane" // any string
919 vdWtype = "Lennard-Jones"
920 DistanceMixingRule = "arithmetic" // can also be "geometric" or "cubic"
921 DistanceType = "sigma" // can also be Rmin
922 EnergyMixingRule = "geometric" // can also be "arithmetic" or "hhg"
923 EnergyUnitScaling = 1.0
924 MetallicEnergyUnitScaling = 1.0
925 DistanceUnitScaling = 1.0
926 AngleUnitScaling = 1.0
927 TorsionAngleConvention = "180_is_trans" // can also be "0_is_trans"
928 vdW-12-scale = 0.0
929 vdW-13-scale = 0.0
930 vdW-14-scale = 0.0
931 electrostatic-12-scale = 0.0
932 electrostatic-13-scale = 0.0
933 electrostatic-14-scale = 0.0
934 GayBerneMu = 2.0
935 GayBerneNu = 1.0
936 EAMMixingMethod = "Johnson" // can also be "Daw"
937 end Options
938 \end{lstlisting}
939
940 \subsection{\label{section:ffBase}The BaseAtomTypes block}
941
942 An AtomType the primary data structure that OpenMD uses to store
943 static data about an atom. Things that belong to AtomType are
944 universal properties (i.e. does this atom have a fixed charge? What
945 is its mass?) Dynamic properties of an atom are not intended to be
946 properties of an atom type. A BaseAtomType can be used to build
947 extended sets of related atom types that all fall back to one
948 particular type. For example, one might want a series of atomTypes
949 that inherit from more basic types:
950 \begin{displaymath}
951 \mathtt{ALA-CA} \rightarrow \mathtt{CT} \rightarrow \mathtt{CSP3} \rightarrow \mathtt{C}
952 \end{displaymath}
953 where for each step to the right, the atomType falls back to more
954 primitive data. That is, the mass could be a property of the {\tt C}
955 type, while Lennard-Jones parameters could be properties of the {\tt
956 CSP3} type. {\tt CT} could have charge information and its own set
957 of Lennard-Jones parameter that override the CSP3 parameters. And the
958 {\tt ALA-CA} type might have specific torsion or charge information
959 that override the lower level types. A BaseAtomType contains only
960 information a primitive name and the mass of this atom type.
961 BaseAtomTypes can also be useful in creating files that can be easily
962 viewed in visualization programs. The {\tt Dump2XYZ} utility has the
963 ability to print out the names of the base atom types for displaying
964 simulations in Jmol or VMD.
965
966 \begin{lstlisting}[caption={[A simple example of a BaseAtomTypes
967 block.] A simple example of a BaseAtomTypes block.},
968 label={sch:baseAtomTypesBlock}]
969 begin BaseAtomTypes
970 //Name mass (amu)
971 H 1.0079
972 O 15.9994
973 Si 28.0855
974 Al 26.981538
975 Mg 24.3050
976 Ca 40.078
977 Fe 55.845
978 Li 6.941
979 Na 22.98977
980 K 39.0983
981 Cs 132.90545
982 Ca 40.078
983 Ba 137.327
984 Cl 35.453
985 end BaseAtomTypes
986 \end{lstlisting}
987
988 \subsection{\label{section:ffAtom}The AtomTypes block}
989
990 AtomTypes inherit most properties from BaseAtomTypes, but can override
991 their lower-level properties as well. Scheme \ref{sch:atomTypesBlock}
992 shows an example where multiple types of oxygen atoms can inherit mass
993 from the oxygen base type.
994
995 \begin{lstlisting}[caption={[An example of a AtomTypes block.] A
996 simple example of an AtomTypes block which
997 shows how multiple types can inherit from the same base type.},
998 label={sch:atomTypesBlock}]
999 begin AtomTypes
1000 //Name baseatomtype
1001 h* H
1002 ho H
1003 o* O
1004 oh O
1005 ob O
1006 obos O
1007 obts O
1008 obss O
1009 ohs O
1010 st Si
1011 ao Al
1012 at Al
1013 mgo Mg
1014 mgh Mg
1015 cao Ca
1016 cah Ca
1017 feo Fe
1018 lio Li
1019 end AtomTypes
1020 \end{lstlisting}
1021
1022 \subsection{\label{section:ffDirectionalAtom}The DirectionalAtomTypes
1023 block}
1024 DirectionalAtoms have orientational degrees of freedom as well as
1025 translation, so moving these atoms requires information about the
1026 moments of inertias in the same way that translational motion requires
1027 mass. For DirectionalAtoms, OpenMD treats the mass distribution with
1028 higher priority than electrostatic distributions; the moment of
1029 inertia tensor, $\overleftrightarrow{\mathsf I}$, should be
1030 diagonalized to obtain body-fixed axes, and the three diagonal moments
1031 should correspond to rotational motion \textit{around} each of these
1032 body-fixed axes. Charge distributions may then result in dipole
1033 vectors that are oriented along a linear combination of the body-axes,
1034 and in quadrupole tensors that are not necessarily diagonal in the
1035 body frame.
1036
1037 \begin{lstlisting}[caption={[An example of a DirectionalAtomTypes block.] A
1038 simple example of a DirectionalAtomTypes block.},
1039 label={sch:datomTypesBlock}]
1040 begin DirectionalAtomTypes
1041 //Name I_xx I_yy I_zz (All moments in (amu*Ang^2)
1042 SSD 1.7696 0.6145 1.1550
1043 GBC6H6 88.781 88.781 177.561
1044 GBCH3OH 4.056 20.258 20.999
1045 GBH2O 1.777 0.581 1.196
1046 CO2 43.06 43.06 0.0 // single-site model for CO2
1047 end DirectionalAtomTypes
1048
1049 \end{lstlisting}
1050
1051 For a DirectionalAtom that represents a linear object, it is
1052 appropriate for one of the moments of inertia to be zero. In this
1053 case, OpenMD identifies that DirectionalAtom as having only 5 degrees
1054 of freedom (three translations and two rotations), and will alter
1055 calculation of temperatures to reflect this.
1056
1057 \subsection{\label{section::ffAtomProperties}AtomType properties}
1058 \subsubsection{\label{section:ffLJ}The LennardJonesAtomTypes block}
1059 One of the most basic interatomic interactions implemented in {\sc
1060 OpenMD} is the Lennard-Jones potential, which mimics the van der
1061 Waals interaction at long distances and uses an empirical repulsion at
1062 short distances. The Lennard-Jones potential is given by:
1063 \begin{equation}
1064 V_{\text{LJ}}(r_{ij}) =
1065 4\epsilon_{ij} \biggl[
1066 \biggl(\frac{\sigma_{ij}}{r_{ij}}\biggr)^{12}
1067 - \biggl(\frac{\sigma_{ij}}{r_{ij}}\biggr)^{6}
1068 \biggr],
1069 \label{eq:lennardJonesPot}
1070 \end{equation}
1071 where $r_{ij}$ is the distance between particles $i$ and $j$,
1072 $\sigma_{ij}$ scales the length of the interaction, and
1073 $\epsilon_{ij}$ scales the well depth of the potential.
1074
1075 Interactions between dissimilar particles requires the generation of
1076 cross term parameters for $\sigma$ and $\epsilon$. These parameters
1077 are usually determined using the Lorentz-Berthelot mixing
1078 rules:\cite{Allen87}
1079 \begin{equation}
1080 \sigma_{ij} = \frac{1}{2}[\sigma_{ii} + \sigma_{jj}],
1081 \label{eq:sigmaMix}
1082 \end{equation}
1083 and
1084 \begin{equation}
1085 \epsilon_{ij} = \sqrt{\epsilon_{ii} \epsilon_{jj}}.
1086 \label{eq:epsilonMix}
1087 \end{equation}
1088
1089 The values of $\sigma_{ii}$ and $\epsilon_{ii}$ are properties of atom
1090 type $i$, and must be specified in a section of the force field file
1091 called the {\tt LennardJonesAtomTypes} block (see listing
1092 \ref{sch:LJatomTypesBlock}). Separate Lennard-Jones interactions
1093 which are not determined by the mixing rules can also be specified in
1094 the {\tt NonbondedInteractionTypes} block (see section
1095 \ref{section:ffNBinteraction}).
1096
1097 \begin{lstlisting}[caption={[An example of a LennardJonesAtomTypes block.] A
1098 simple example of a LennardJonesAtomTypee block. Units for
1099 $\epsilon$ are kcal / mol and for $\sigma$ are \AA\ .},
1100 label={sch:LJatomTypesBlock}]
1101 begin LennardJonesAtomTypes
1102 //Name epsilon sigma
1103 O_TIP4P 0.1550 3.15365
1104 O_TIP4P-Ew 0.16275 3.16435
1105 O_TIP5P 0.16 3.12
1106 O_TIP5P-E 0.178 3.097
1107 O_SPCE 0.15532 3.16549
1108 O_SPC 0.15532 3.16549
1109 CH4 0.279 3.73
1110 CH3 0.185 3.75
1111 CH2 0.0866 3.95
1112 CH 0.0189 4.68
1113 end LennardJonesAtomTypes
1114 \end{lstlisting}
1115
1116 \subsubsection{\label{section:ffCharge}The ChargeAtomTypes block}
1117
1118 In molecular simulations, proper accumulation of the electrostatic
1119 interactions is essential and is one of the most
1120 computationally-demanding tasks. Most common molecular mechanics
1121 force fields represent atomic sites with full or partial charges
1122 protected by Lennard-Jones (short range) interactions. Partial charge
1123 values, $q_i$ are empirical representations of the distribution of
1124 electronic charge in a molecule. This means that nearly every pair
1125 interaction involves a calculation of charge-charge forces. Coupled
1126 with relatively long-ranged $r^{-1}$ decay, the monopole interactions
1127 quickly become the most expensive part of molecular simulations. The
1128 interactions between point charges can be handled via a number of
1129 different algorithms, but Coulomb's law is the fundamental physical
1130 principle governing these interactions,
1131 \begin{equation}
1132 V_{\text{charge}}(r_{ij}) = \sum_{ij}\frac{q_iq_je^2}{4 \pi \epsilon_0
1133 r_{ij}},
1134 \end{equation}
1135 where $q$ represents the charge on particle $i$ or $j$, and $e$ is the
1136 charge of an electron in Coulombs. $\epsilon_0$ is the permittivity
1137 of free space.
1138
1139 \begin{lstlisting}[caption={[An example of a ChargeAtomTypes block.] A
1140 simple example of a ChargeAtomTypes block. Units for
1141 charge are in multiples of electron charge.},
1142 label={sch:ChargeAtomTypesBlock}]
1143 begin ChargeAtomTypes
1144 // Name charge
1145 O_TIP3P -0.834
1146 O_SPCE -0.8476
1147 H_TIP3P 0.417
1148 H_TIP4P 0.520
1149 H_SPCE 0.4238
1150 EP_TIP4P -1.040
1151 Na+ 1.0
1152 Cl- -1.0
1153 end ChargeAtomTypes
1154 \end{lstlisting}
1155
1156 \subsubsection{\label{section:ffMultipole}The MultipoleAtomTypes
1157 block}
1158 For complex charge distributions that are centered on single sites, it
1159 is convenient to write the total electrostatic potential in terms of
1160 multipole moments,
1161 \begin{equation}
1162 U_{\bf{ab}}(r)=\hat{M}_{\bf a} \hat{M}_{\bf b} \frac{1}{r} \label{kernel}.
1163 \end{equation}
1164 where the multipole operator on site $\bf a$,
1165 \begin{equation}
1166 \hat{M}_{\bf a} = C_{\bf a} - D_{{\bf a}\alpha} \frac{\partial}{\partial r_{\alpha}}
1167 + Q_{{\bf a}\alpha\beta}
1168 \frac{\partial^2}{\partial r_{\alpha} \partial r_{\beta}} + \dots
1169 \end{equation}
1170 Here, the point charge, dipole, and quadrupole for site $\bf a$ are
1171 given by $C_{\bf a}$, $D_{{\bf a}\alpha}$, and $Q_{{\bf
1172 a}\alpha\beta}$, respectively. These are the primitive
1173 multipoles. If the site is representing a distribution of charges,
1174 these can be expressed as,
1175 \begin{align}
1176 C_{\bf a} =&\sum_{k \, \text{in \bf a}} q_k , \label{eq:charge} \\
1177 D_{{\bf a}\alpha} =&\sum_{k \, \text{in \bf a}} q_k r_{k\alpha}, \label{eq:dipole}\\
1178 Q_{{\bf a}\alpha\beta} =& \frac{1}{2} \sum_{k \, \text{in \bf a}} q_k
1179 r_{k\alpha} r_{k\beta} . \label{eq:quadrupole}
1180 \end{align}
1181 Note that the definition of the primitive quadrupole here differs from
1182 the standard traceless form, and contains an additional Taylor-series
1183 based factor of $1/2$.
1184
1185 The details of the multipolar interactions will be given later, but
1186 many readers are familiar with the dipole-dipole potential:
1187 \begin{equation}
1188 V_{\text{dipole}}(\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},
1189 \boldsymbol{\Omega}_{j}) = \frac{|{\bf D}_i||{\bf D}_j|}{4\pi\epsilon_{0}r_{ij}^{3}} \biggl[
1190 \boldsymbol{\hat{u}}_{i} \cdot \boldsymbol{\hat{u}}_{j}
1191 -
1192 3(\boldsymbol{\hat{u}}_i \cdot \hat{\mathbf{r}}_{ij}) %
1193 (\boldsymbol{\hat{u}}_j \cdot \hat{\mathbf{r}}_{ij}) \biggr].
1194 \label{eq:dipolePot}
1195 \end{equation}
1196 Here $\mathbf{r}_{ij}$ is the vector starting at atom $i$ pointing
1197 towards $j$, and $\boldsymbol{\Omega}_i$ and $\boldsymbol{\Omega}_j$
1198 are the orientational degrees of freedom for atoms $i$ and $j$
1199 respectively. The magnitude of the dipole moment of atom $i$ is $|{\bf
1200 D}_i|$, $\boldsymbol{\hat{u}}_i$ is the standard unit orientation
1201 vector of $\boldsymbol{\Omega}_i$, and $\boldsymbol{\hat{r}}_{ij}$ is
1202 the unit vector pointing along $\mathbf{r}_{ij}$
1203 ($\boldsymbol{\hat{r}}_{ij}=\mathbf{r}_{ij}/|\mathbf{r}_{ij}|$).
1204
1205
1206 \begin{lstlisting}[caption={[An example of a MultipoleAtomTypes block.] A
1207 simple example of a MultipoleAtomTypes block. Dipoles are given in
1208 units of Debyes, and Quadrupole moments are given in units of Debye
1209 \AA~(or $10^{-26} \mathrm{~esu~cm}^2$)},
1210 label={sch:MultipoleAtomTypesBlock}]
1211 begin MultipoleAtomTypes
1212 // Euler angles are given in zxz convention in units of degrees.
1213 //
1214 // point dipoles:
1215 // name d phi theta psi dipole_moment
1216 DIP d 0.0 0.0 0.0 1.91 // dipole points along z-body axis
1217 //
1218 // point quadrupoles:
1219 // name q phi theta psi Qxx Qyy Qzz
1220 CO2 q 0.0 0.0 0.0 0.0 0.0 -0.430592 //quadrupole tensor has zz element
1221 //
1222 // Atoms with both dipole and quadrupole moments:
1223 // name dq phi theta psi dipole_moment Qxx Qyy Qzz
1224 SSD dq 0.0 0.0 0.0 2.35 -1.682 1.762 -0.08
1225 end MultipoleAtomTypes
1226 \end{lstlisting}
1227
1228 Specifying a MultipoleAtomType requires declaring how the
1229 electrostatic frame for the site is rotated relative to the body-fixed
1230 axes for that atom. The Euler angles $(\phi, \theta, \psi)$ for this
1231 rotation must be given, and then the dipole, quadrupole, or all of
1232 these moments are specified in the electrostatic frame. In OpenMD,
1233 the Euler angles are specified in the $zxz$ convention and are entered
1234 in units of degrees. Dipole moments are entered in units of Debye,
1235 and Quadrupole moments in units of Debye \AA.
1236
1237 \subsubsection{\label{section:ffGB}The FluctuatingChargeAtomTypes block}
1238 \subsubsection{\label{section:ffPol}The PolarizableAtomTypes block}
1239 \subsubsection{\label{section:ffGB}The GayBerneAtomTypes block}
1240
1241 The Gay-Berne potential has been widely used in the liquid crystal
1242 community to describe this anisotropic phase
1243 behavior.~\cite{Gay:1981yu,Berne:1972pb,Kushick:1976xy,Luckhurst:1990fy,Cleaver:1996rt}
1244 The form of the Gay-Berne potential implemented in OpenMD was
1245 generalized by Cleaver {\it et al.} and is appropriate for dissimilar
1246 uniaxial ellipsoids.\cite{Cleaver:1996rt} The potential is constructed in the
1247 familiar form of the Lennard-Jones function using
1248 orientation-dependent $\sigma$ and $\epsilon$ parameters,
1249 \begin{equation*}
1250 V_{ij}({{\bf \hat u}_i}, {{\bf \hat u}_j}, {{\bf \hat
1251 r}_{ij}}) = 4\epsilon ({{\bf \hat u}_i}, {{\bf \hat u}_j},
1252 {{\bf \hat r}_{ij}})\left[\left(\frac{\sigma_0}{r_{ij}-\sigma({{\bf \hat u
1253 }_i},
1254 {{\bf \hat u}_j}, {{\bf \hat r}_{ij}})+\sigma_0}\right)^{12}
1255 -\left(\frac{\sigma_0}{r_{ij}-\sigma({{\bf \hat u}_i}, {{\bf \hat u}_j},
1256 {{\bf \hat r}_{ij}})+\sigma_0}\right)^6\right]
1257 \label{eq:gb}
1258 \end{equation*}
1259
1260 The range $(\sigma({\bf \hat{u}}_{i},{\bf \hat{u}}_{j},{\bf
1261 \hat{r}}_{ij}))$, and strength $(\epsilon({\bf \hat{u}}_{i},{\bf
1262 \hat{u}}_{j},{\bf \hat{r}}_{ij}))$ parameters
1263 are dependent on the relative orientations of the two ellipsoids (${\bf
1264 \hat{u}}_{i},{\bf \hat{u}}_{j}$) as well as the direction of the
1265 inter-ellipsoid separation (${\bf \hat{r}}_{ij}$). The shape and
1266 attractiveness of each ellipsoid is governed by a relatively small set
1267 of parameters:
1268 \begin{itemize}
1269 \item $d$: range parameter for the side-by-side (S) and cross (X) configurations
1270 \item $l$: range parameter for the end-to-end (E) configuration
1271 \item $\epsilon_X$: well-depth parameter for the cross (X) configuration
1272 \item $\epsilon_S$: well-depth parameter for the side-by-side (S) configuration
1273 \item $\epsilon_E$: well depth parameter for the end-to-end (E) configuration
1274 \item $dw$: The ``softness'' of the potential
1275 \end{itemize}
1276 Additionally, there are two universal paramters to govern the overall
1277 importance of the purely orientational ($\nu$) and the mixed
1278 orientational / translational ($\mu$) parts of strength of the
1279 interactions. These parameters have default or ``canonical'' values,
1280 but may be changed as a force field option:
1281 \begin{itemize}
1282 \item $\nu$: purely orientational part : defaults to 1
1283 \item $\mu$: mixed orientational / translational part : defaults to
1284 2
1285 \end{itemize}
1286 Further details of the potential are given
1287 elsewhere,\cite{Luckhurst:1990fy,Golubkov06,SunX._jp0762020} and an
1288 excellent overview of the computational methods that can be used to
1289 efficiently compute forces and torques for this potential can be found
1290 in Ref. \citealp{Golubkov06}
1291
1292 \begin{lstlisting}[caption={[An example of a GayBerneAtomTypes block.] A
1293 simple example of a GayBerneAtomTypes block. Distances ($d$ and $l$)
1294 are given in \AA\ and energies ($\epsilon_X, \epsilon_S, \epsilon_E$)
1295 are in units of kcal/mol. $dw$ is unitless.},
1296 label={sch:GayBerneAtomTypes}]
1297 begin GayBerneAtomTypes
1298 //Name d l eps_X eps_S eps_E dw
1299 GBlinear 2.8104 9.993 0.774729 0.774729 0.116839 1.0
1300 GBC6H6 4.65 2.03 0.540 0.540 1.9818 0.6
1301 GBCH3OH 2.55 3.18 0.542 0.542 0.55826 1.0
1302 end GayBerneAtomTypes
1303 \end{lstlisting}
1304
1305 \subsubsection{\label{section:ffSticky}The StickyAtomTypes block}
1306
1307 One of the solvents that can be simulated by {\sc OpenMD} is the
1308 extended Soft Sticky Dipole (SSD/E) water model.\cite{fennell04} The
1309 original SSD was developed by Ichiye \emph{et
1310 al.}\cite{liu96:new_model} as a modified form of the hard-sphere
1311 water model proposed by Bratko, Blum, and
1312 Luzar.\cite{Bratko85,Bratko95} It consists of a single point dipole
1313 with a Lennard-Jones core and a sticky potential that directs the
1314 particles to assume the proper hydrogen bond orientation in the first
1315 solvation shell. Thus, the interaction between two SSD water molecules
1316 \emph{i} and \emph{j} is given by the potential
1317 \begin{equation}
1318 V_{ij} =
1319 V_{ij}^{LJ} (r_{ij})\ + V_{ij}^{dp}
1320 (\mathbf{r}_{ij},\boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j)\ +
1321 V_{ij}^{sp}
1322 (\mathbf{r}_{ij},\boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j),
1323 \label{eq:ssdPot}
1324 \end{equation}
1325 where the $\mathbf{r}_{ij}$ is the position vector between molecules
1326 \emph{i} and \emph{j} with magnitude equal to the distance $r_{ij}$, and
1327 $\boldsymbol{\Omega}_i$ and $\boldsymbol{\Omega}_j$ represent the
1328 orientations of the respective molecules. The Lennard-Jones and dipole
1329 parts of the potential are given by equations \ref{eq:lennardJonesPot}
1330 and \ref{eq:dipolePot} respectively. The sticky part is described by
1331 the following,
1332 \begin{equation}
1333 u_{ij}^{sp}(\mathbf{r}_{ij},\boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j)=
1334 \frac{\nu_0}{2}[s(r_{ij})w(\mathbf{r}_{ij},
1335 \boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j) +
1336 s^\prime(r_{ij})w^\prime(\mathbf{r}_{ij},
1337 \boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j)]\ ,
1338 \label{eq:stickyPot}
1339 \end{equation}
1340 where $\nu_0$ is a strength parameter for the sticky potential, and
1341 $s$ and $s^\prime$ are cubic switching functions which turn off the
1342 sticky interaction beyond the first solvation shell. The $w$ function
1343 can be thought of as an attractive potential with tetrahedral
1344 geometry:
1345 \begin{equation}
1346 w({\bf r}_{ij},{\bf \Omega}_i,{\bf \Omega}_j)=
1347 \sin\theta_{ij}\sin2\theta_{ij}\cos2\phi_{ij},
1348 \label{eq:stickyW}
1349 \end{equation}
1350 while the $w^\prime$ function counters the normal aligned and
1351 anti-aligned structures favored by point dipoles:
1352 \begin{equation}
1353 w^\prime({\bf r}_{ij},{\bf \Omega}_i,{\bf \Omega}_j)=
1354 (\cos\theta_{ij}-0.6)^2(\cos\theta_{ij}+0.8)^2-w^0,
1355 \label{eq:stickyWprime}
1356 \end{equation}
1357 It should be noted that $w$ is proportional to the sum of the $Y_3^2$
1358 and $Y_3^{-2}$ spherical harmonics (a linear combination which
1359 enhances the tetrahedral geometry for hydrogen bonded structures),
1360 while $w^\prime$ is a purely empirical function. A more detailed
1361 description of the functional parts and variables in this potential
1362 can be found in the original SSD
1363 articles.\cite{liu96:new_model,liu96:monte_carlo,chandra99:ssd_md,Ichiye03}
1364
1365 \begin{figure}
1366 \centering
1367 \includegraphics[width=\linewidth]{waterAngle.pdf}
1368 \caption[Coordinate definition for the SSD/E water model]{Coordinates
1369 for the interaction between two SSD/E water molecules. $\theta_{ij}$
1370 is the angle that $r_{ij}$ makes with the $\hat{z}$ vector in the
1371 body-fixed frame for molecule $i$. The $\hat{z}$ vector bisects the
1372 HOH angle in each water molecule. }
1373 \label{fig:ssd}
1374 \end{figure}
1375
1376 Since SSD/E is a single-point {\it dipolar} model, the force
1377 calculations are simplified significantly relative to the standard
1378 {\it charged} multi-point models. In the original Monte Carlo
1379 simulations using this model, Ichiye {\it et al.} reported that using
1380 SSD decreased computer time by a factor of 6-7 compared to other
1381 models.\cite{liu96:new_model} What is most impressive is that these
1382 savings did not come at the expense of accurate depiction of the
1383 liquid state properties. Indeed, SSD/E maintains reasonable agreement
1384 with the Head-Gordon diffraction data for the structural features of
1385 liquid water.\cite{hura00,liu96:new_model} Additionally, the dynamical
1386 properties exhibited by SSD/E agree with experiment better than those
1387 of more computationally expensive models (like TIP3P and
1388 SPC/E).\cite{chandra99:ssd_md} The combination of speed and accurate
1389 depiction of solvent properties makes SSD/E a very attractive model
1390 for the simulation of large scale biochemical simulations.
1391
1392 Recent constant pressure simulations revealed issues in the original
1393 SSD model that led to lower than expected densities at all target
1394 pressures,\cite{Ichiye03,fennell04} so variants on the sticky
1395 potential can be specified by using one of a number of substitute atom
1396 types (see listing \ref{sch:StickyAtomTypes}). A table of the
1397 parameter values and the drawbacks and benefits of the different
1398 density corrected SSD models can be found in
1399 reference~\citealp{fennell04}.
1400
1401 \begin{lstlisting}[caption={[An example of a StickyAtomTypes block.] A
1402 simple example of a StickyAtomTypes block. Distances ($r_l$, $r_u$,
1403 $r_{l}'$ and $r_{u}'$) are given in \AA\ and energies ($v_0, v_{0}'$)
1404 are in units of kcal/mol. $w_0$ is unitless.},
1405 label={sch:StickyAtomTypes}]
1406 begin StickyAtomTypes
1407 //name w0 v0 (kcal/mol) v0p rl (Ang) ru rlp rup
1408 SSD_E 0.07715 3.90 3.90 2.40 3.80 2.75 3.35
1409 SSD_RF 0.07715 3.90 3.90 2.40 3.80 2.75 3.35
1410 SSD 0.07715 3.7284 3.7284 2.75 3.35 2.75 4.0
1411 SSD1 0.07715 3.6613 3.6613 2.75 3.35 2.75 4.0
1412 end StickyAtomTypes
1413 \end{lstlisting}
1414
1415 \subsection{\label{section::ffMetals}Metallic Atom Types}
1416
1417 {\sc OpenMD} implements a number of related potentials that describe
1418 bonding in transition metals. These potentials have an attractive
1419 interaction which models ``Embedding'' a positively charged
1420 pseudo-atom core in the electron density due to the free valance
1421 ``sea'' of electrons created by the surrounding atoms in the system.
1422 A pairwise part of the potential (which is primarily repulsive)
1423 describes the interaction of the positively charged metal core ions
1424 with one another. These potentials have the form:
1425 \begin{equation}
1426 V = \sum_{i} F_{i}\left[\rho_{i}\right] + \sum_{i} \sum_{j \neq i}
1427 \phi_{ij}({\bf r}_{ij})
1428 \end{equation}
1429 where $F_{i} $ is an embedding functional that approximates the energy
1430 required to embed a positively-charged core ion $i$ into a linear
1431 superposition of spherically averaged atomic electron densities given
1432 by $\rho_{i}$,
1433 \begin{equation}
1434 \rho_{i} = \sum_{j \neq i} f_{j}({\bf r}_{ij}),
1435 \end{equation}
1436 Since the density at site $i$ ($\rho_i$) must be computed before the
1437 embedding functional can be evaluated, {\sc eam} and the related
1438 transition metal potentials require two loops through the atom pairs
1439 to compute the inter-atomic forces.
1440
1441 The pairwise portion of the potential, $\phi_{ij}$, is usually a
1442 repulsive interaction between atoms $i$ and $j$.
1443
1444 \subsubsection{\label{section:ffEAM}The EAMAtomTypes block}
1445 The Embedded Atom Method ({\sc eam}) is one of the most widely-used
1446 potentials for transition
1447 metals.~\cite{Finnis84,Ercolessi88,Chen90,Qi99,Ercolessi02,Daw84,FBD86,johnson89,Lu97}
1448 It has been widely adopted in the materials science community and a
1449 good review of {\sc eam} and other formulations of metallic potentials
1450 was given by Voter.\cite{Voter:95}
1451
1452 In the original formulation of {\sc eam}\cite{Daw84}, the pair
1453 potential, $\phi_{ij}$ was an entirely repulsive term; however later
1454 refinements to {\sc eam} allowed for more general forms for
1455 $\phi$.\cite{Daw89} The effective cutoff distance, $r_{{\text cut}}$
1456 is the distance at which the values of $f(r)$ and $\phi(r)$ drop to
1457 zero for all atoms present in the simulation. In practice, this
1458 distance is fairly small, limiting the summations in the {\sc eam}
1459 equation to the few dozen atoms surrounding atom $i$ for both the
1460 density $\rho$ and pairwise $\phi$ interactions.
1461
1462 In computing forces for alloys, OpenMD uses mixing rules outlined by
1463 Johnson~\cite{johnson89} to compute the heterogenous pair potential,
1464 \begin{equation}
1465 \label{eq:johnson}
1466 \phi_{ab}(r)=\frac{1}{2}\left(
1467 \frac{f_{b}(r)}{f_{a}(r)}\phi_{aa}(r)+
1468 \frac{f_{a}(r)}{f_{b}(r)}\phi_{bb}(r)
1469 \right).
1470 \end{equation}
1471 No mixing rule is needed for the densities, since the density at site
1472 $i$ is simply the linear sum of density contributions of all the other
1473 atoms.
1474
1475 The {\sc eam} force field illustrates an additional feature of {\sc
1476 OpenMD}. Foiles, Baskes and Daw fit {\sc eam} potentials for Cu, Ag,
1477 Au, Ni, Pd, Pt and alloys of these metals.\cite{FBD86} These fits are
1478 included in {\sc OpenMD} as the {\tt u3} variant of the {\sc eam} force
1479 field. Voter and Chen reparamaterized a set of {\sc eam} functions
1480 which do a better job of predicting melting points.\cite{Voter:87}
1481 These functions are included in {\sc OpenMD} as the {\tt VC} variant of
1482 the {\sc eam} force field. An additional set of functions (the
1483 ``Universal 6'' functions) are included in {\sc OpenMD} as the {\tt u6}
1484 variant of {\sc eam}. For example, to specify the Voter-Chen variant
1485 of the {\sc eam} force field, the user would add the {\tt
1486 forceFieldVariant = "VC";} line to the meta-data file.
1487
1488 The potential files used by the {\sc eam} force field are in the
1489 standard {\tt funcfl} format, which is the format utilized by a number
1490 of other codes (e.g. ParaDyn~\cite{Paradyn}, {\sc dynamo 86}). It
1491 should be noted that the energy units in these files are in eV, not
1492 $\mbox{kcal mol}^{-1}$ as in the rest of the {\sc OpenMD} force field
1493 files.
1494
1495 \begin{lstlisting}[caption={[An example of a EAMAtomTypes block.] A
1496 simple example of a EAMAtomTypes block. Here the only data provided is
1497 the name of a {\tt funcfl} file which contains the raw data for spline
1498 interpolations for the density, functional, and pair potential.},
1499 label={sch:EAMAtomTypes}]
1500 begin EAMAtomTypes
1501 Au Au.u3.funcfl
1502 Ag Ag.u3.funcfl
1503 Cu Cu.u3.funcfl
1504 Ni Ni.u3.funcfl
1505 Pd Pd.u3.funcfl
1506 Pt Pt.u3.funcfl
1507 end EAMAtomTypes
1508 \end{lstlisting}
1509
1510
1511 \subsubsection{\label{section:ffSC}The SuttonChenAtomTypes block}
1512
1513 The Sutton-Chen ({\sc sc})~\cite{Chen90} potential has been used to
1514 study a wide range of phenomena in metals. Although it has the same
1515 basic form as the {\sc eam} potential, the Sutton-Chen model takes on
1516 a simpler form,
1517 \begin{equation}
1518 \label{eq:SCP1}
1519 U_{tot}=\sum _{i}\left[ \frac{1}{2}\sum _{j\neq
1520 i}\epsilon_{ij}V^{pair}_{ij}(r_{ij})-c_{i}\epsilon_{ii}\sqrt{\rho_{i}}\right] ,
1521 \end{equation}
1522 where $V^{pair}_{ij}$ and $\rho_{i}$ are given by
1523 \begin{equation}
1524 \label{eq:SCP2}
1525 V^{pair}_{ij}(r)=\left(
1526 \frac{\alpha_{ij}}{r_{ij}}\right)^{n_{ij}} \hspace{1in} \rho_{i}=\sum_{j\neq i}\left(
1527 \frac{\alpha_{ij}}{r_{ij}}\right) ^{m_{ij}}
1528 \end{equation}
1529
1530 $V^{pair}_{ij}$ is a repulsive pairwise potential that accounts for
1531 interactions of the pseudo-atom cores. The $\sqrt{\rho_i}$ term in
1532 Eq. (\ref{eq:SCP1}) is an attractive many-body potential that models
1533 the interactions between the valence electrons and the cores of the
1534 pseudo-atoms. $\epsilon_{ij}$, $\epsilon_{ii}$, $c_i$ and
1535 $\alpha_{ij}$ are parameters used to tune the potential for different
1536 transition metals.
1537
1538 The {\sc sc} potential form has also been parameterized by Qi {\it et
1539 al.}\cite{Qi99} These parameters were obtained via empirical and {\it
1540 ab initio} calculations to match structural features of the FCC
1541 crystal. Interested readers are encouraged to consult reference
1542 \citealp{Qi99} for further details.
1543
1544 \begin{lstlisting}[caption={[An example of a SCAtomTypes block.] A
1545 simple example of a SCAtomTypes block. Distances ($\alpha$)
1546 are given in \AA\ and energies ($\epsilon$) are (by convention) given in
1547 units of eV. These units must be specified in the {\tt Options} block
1548 using the keyword {\tt MetallicEnergyUnitScaling}. Without this {\tt
1549 Options} keyword, the default units for $\epsilon$ are kcal/mol. The
1550 other parameters, $m$, $n$, and $c$ are unitless.},
1551 label={sch:SCAtomTypes}]
1552 begin SCAtomTypes
1553 // Name epsilon(eV) c m n alpha(angstroms)
1554 Ni 0.0073767 84.745 5.0 10.0 3.5157
1555 Cu 0.0057921 84.843 5.0 10.0 3.6030
1556 Rh 0.0024612 305.499 5.0 13.0 3.7984
1557 Pd 0.0032864 148.205 6.0 12.0 3.8813
1558 Ag 0.0039450 96.524 6.0 11.0 4.0691
1559 Ir 0.0037674 224.815 6.0 13.0 3.8344
1560 Pt 0.0097894 71.336 7.0 11.0 3.9163
1561 Au 0.0078052 53.581 8.0 11.0 4.0651
1562 Au2 0.0078052 53.581 8.0 11.0 4.0651
1563 end SCAtomTypes
1564 \end{lstlisting}
1565
1566 \subsection{\label{section::ffShortRange}Short Range Interactions}
1567 \subsubsection{\label{section:ffBond}The BondTypes block}
1568 \subsubsection{\label{section:ffBend}The BendTypes block}
1569 A harmonic bend potential is represented by the following function:
1570 \begin{equation}
1571 V_{\text{bend}}(\theta_{ijk}) = k_{\theta}( \theta_{ijk} - \theta_0
1572 )^2, \label{eq:bendPot}
1573 \end{equation}
1574 where $\theta_{ijk}$ is the angle defined by atoms $i$, $j$, and $k$,
1575 $\theta_0$ is the equilibrium bond angle, and $k_{\theta}$ is the
1576 force constant which determines the strength of the harmonic bend.
1577
1578 \subsubsection{\label{section:ffTorsion}The TorsionTypes block}
1579 The torsion potential is often represented as a cosine series of the
1580 form:
1581 \begin{equation}
1582 V_{\text{torsion}}(\phi) = c_1[1 + \cos \phi]
1583 + c_2[1 + \cos(2\phi)]
1584 + c_3[1 + \cos(3\phi)],
1585 \label{eq:origTorsionPot}
1586 \end{equation}
1587 where:
1588 \begin{equation}
1589 \cos\phi = (\hat{\mathbf{r}}_{ij} \times \hat{\mathbf{r}}_{jk}) \cdot
1590 (\hat{\mathbf{r}}_{jk} \times \hat{\mathbf{r}}_{kl}).
1591 \label{eq:torsPhi}
1592 \end{equation}
1593 Here, $\hat{\mathbf{r}}_{\alpha\beta}$ are the set of unit bond
1594 vectors between atoms $i$, $j$, $k$, and $l$. For computational
1595 efficiency, the torsion potential has been recast after the method of
1596 {\sc charmm},\cite{Brooks83} in which the angle series is converted to
1597 a power series of the form:
1598 \begin{equation}
1599 V_{\text{torsion}}(\phi) =
1600 k_3 \cos^3 \phi + k_2 \cos^2 \phi + k_1 \cos \phi + k_0,
1601 \label{eq:torsionPot}
1602 \end{equation}
1603 where:
1604 \begin{align*}
1605 k_0 &= c_1 + c_3, \\
1606 k_1 &= c_1 - 3c_3, \\
1607 k_2 &= 2 c_2, \\
1608 k_3 &= 4c_3.
1609 \end{align*}
1610 By recasting the potential as a power series, repeated trigonometric
1611 evaluations are avoided during the calculation of the potential
1612 energy.
1613
1614 \subsubsection{\label{section:ffInversion}The InversionTypes block}
1615 \subsection{\label{section::ffLongRange}Long Range Interactions}
1616 \subsubsection{\label{section:ffNBinteraction}The NonBondedInteraction block}
1617
1618
1619
1620 (see Fig.~\ref{fig:lipidModel}), The parameters for $k_{\theta}$ and
1621 $\theta_0$ are borrowed from those in TraPPE.\cite{Siepmann1998}
1622
1623 Calculating the long-range (non-bonded) potential involves a sum over
1624 all pairs of atoms (except for those atoms which are involved in a
1625 bond, bend, or torsion with each other). If done poorly, calculating
1626 the the long-range interactions for $N$ atoms would involve $N(N-1)/2$
1627 evaluations of atomic distances. To reduce the number of distance
1628 evaluations between pairs of atoms, {\sc OpenMD} allows the use of
1629 switched cutoffs with Verlet neighbor lists.\cite{Allen87} Neutral
1630 groups which contain charges will exhibit pathological forces unless
1631 the cutoff is applied to the neutral groups evenly instead of to the
1632 individual atoms.\cite{leach01:mm} {\sc OpenMD} allows users to
1633 specify cutoff groups which may contain an arbitrary number of atoms
1634 in the molecule. Atoms in a cutoff group are treated as a single unit
1635 for the evaluation of the switching function:
1636 \begin{equation}
1637 V_{\mathrm{long-range}} = \sum_{a} \sum_{b>a} s(r_{ab}) \sum_{i \in a} \sum_{j \in b} V_{ij}(r_{ij}),
1638 \end{equation}
1639 where $r_{ab}$ is the distance between the centers of mass of the two
1640 cutoff groups ($a$ and $b$).
1641
1642 The sums over $a$ and $b$ are over the cutoff groups that are present
1643 in the simulation. Atoms which are not explicitly defined as members
1644 of a {\tt cutoffGroup} are treated as a group consisting of only one
1645 atom. The switching function, $s(r)$ is the standard cubic switching
1646 function,
1647 \begin{equation}
1648 S(r) =
1649 \begin{cases}
1650 1 & \text{if $r \le r_{\text{sw}}$},\\
1651 \frac{(r_{\text{cut}} + 2r - 3r_{\text{sw}})(r_{\text{cut}} - r)^2}
1652 {(r_{\text{cut}} - r_{\text{sw}})^3}
1653 & \text{if $r_{\text{sw}} < r \le r_{\text{cut}}$}, \\
1654 0 & \text{if $r > r_{\text{cut}}$.}
1655 \end{cases}
1656 \label{eq:dipoleSwitching}
1657 \end{equation}
1658 Here, $r_{\text{sw}}$ is the {\tt switchingRadius}, or the distance
1659 beyond which interactions are reduced, and $r_{\text{cut}}$ is the
1660 {\tt cutoffRadius}, or the distance at which interactions are
1661 truncated.
1662
1663 Users of {\sc OpenMD} do not need to specify the {\tt cutoffRadius} or
1664 {\tt switchingRadius}. In simulations containing only Lennard-Jones
1665 atoms, the cutoff radius has a default value of $2.5\sigma_{ii}$,
1666 where $\sigma_{ii}$ is the largest Lennard-Jones length parameter
1667 present in the simulation. In simulations containing charged or
1668 dipolar atoms, the default cutoff radius is $15 \mbox{\AA}$.
1669
1670 The {\tt switchingRadius} is set to a default value of 95\% of the
1671 {\tt cutoffRadius}. In the special case of a simulation containing
1672 {\it only} Lennard-Jones atoms, the default switching radius takes the
1673 same value as the cutoff radius, and {\sc OpenMD} will use a shifted
1674 potential to remove discontinuities in the potential at the cutoff.
1675 Both radii may be specified in the meta-data file.
1676
1677 Force fields can be added to {\sc OpenMD}, although it comes with a few
1678 simple examples (Lennard-Jones, {\sc duff}, {\sc water}, and {\sc
1679 eam}) which are explained in the following sections.
1680
1681 \section{\label{sec:LJPot}The Lennard Jones Force Field}
1682
1683 Scheme
1684 \ref{sch:LJFF} gives an example meta-data file that
1685 sets up a system of 108 Ar particles to be simulated using the
1686 Lennard-Jones force field.
1687
1688 \begin{lstlisting}[float,caption={[Invocation of the Lennard-Jones
1689 force field] A sample startup file for a small Lennard-Jones
1690 simulation.},label={sch:LJFF}]
1691 <OpenMD>
1692 <MetaData>
1693 #include "argon.md"
1694
1695 component{
1696 type = "Ar";
1697 nMol = 108;
1698 }
1699
1700 forceField = "LJ";
1701 </MetaData>
1702 <Snapshot> // not shown in this scheme
1703 </Snapshot>
1704 </OpenMD>
1705 \end{lstlisting}
1706
1707
1708 \section{\label{section:DUFF}Dipolar Unified-Atom Force Field}
1709
1710 The dipolar unified-atom force field ({\sc duff}) was developed to
1711 simulate lipid bilayers. These types of simulations require a model
1712 capable of forming bilayers, while still being sufficiently
1713 computationally efficient to allow large systems ($\sim$100's of
1714 phospholipids, $\sim$1000's of waters) to be simulated for long times
1715 ($\sim$10's of nanoseconds). With this goal in mind, {\sc duff} has no
1716 point charges. Charge-neutral distributions are replaced with dipoles,
1717 while most atoms and groups of atoms are reduced to Lennard-Jones
1718 interaction sites. This simplification reduces the length scale of
1719 long range interactions from $\frac{1}{r}$ to $\frac{1}{r^3}$,
1720 removing the need for the computationally expensive Ewald
1721 sum. Instead, Verlet neighbor-lists and cutoff radii are used for the
1722 dipolar interactions, and, if desired, a reaction field may be added
1723 to mimic longer range interactions.
1724
1725 As an example, lipid head-groups in {\sc duff} are represented as
1726 point dipole interaction sites. Placing a dipole at the head group's
1727 center of mass mimics the charge separation found in common
1728 phospholipid head groups such as phosphatidylcholine.\cite{Cevc87}
1729 Additionally, a large Lennard-Jones site is located at the
1730 pseudoatom's center of mass. The model is illustrated by the red atom
1731 in Fig.~\ref{fig:lipidModel}. The water model we use to
1732 complement the dipoles of the lipids is a
1733 reparameterization\cite{fennell04} of the soft sticky dipole (SSD)
1734 model of Ichiye
1735 \emph{et al.}\cite{liu96:new_model}
1736
1737 \begin{figure}
1738 \centering
1739 \includegraphics[width=\linewidth]{lipidModel.pdf}
1740 \caption[A representation of a lipid model in {\sc duff}]{A
1741 representation of the lipid model. $\phi$ is the torsion angle,
1742 $\theta$ is the bend angle, and $\mu$ is the dipole moment of the head
1743 group.}
1744 \label{fig:lipidModel}
1745 \end{figure}
1746
1747 A set of scalable parameters has been used to model the alkyl groups
1748 with Lennard-Jones sites. For this, parameters from the TraPPE force
1749 field of Siepmann \emph{et al.}\cite{Siepmann1998} have been
1750 utilized. TraPPE is a unified-atom representation of n-alkanes which
1751 is parametrized against phase equilibria using Gibbs ensemble Monte
1752 Carlo simulation techniques.\cite{Siepmann1998} One of the advantages
1753 of TraPPE is that it generalizes the types of atoms in an alkyl chain
1754 to keep the number of pseudoatoms to a minimum; thus, the parameters
1755 for a unified atom such as $\text{CH}_2$ do not change depending on
1756 what species are bonded to it.
1757
1758 As is required by TraPPE, {\sc duff} also constrains all bonds to be
1759 of fixed length. Typically, bond vibrations are the fastest motions in
1760 a molecular dynamic simulation. With these vibrations present, small
1761 time steps between force evaluations must be used to ensure adequate
1762 energy conservation in the bond degrees of freedom. By constraining
1763 the bond lengths, larger time steps may be used when integrating the
1764 equations of motion. A simulation using {\sc duff} is illustrated in
1765 Scheme \ref{sch:DUFF}.
1766
1767 \begin{lstlisting}[float,caption={[Invocation of {\sc duff}]A portion
1768 of a startup file showing a simulation utilizing {\sc
1769 duff}},label={sch:DUFF}]
1770 <OpenMD>
1771 <MetaData>
1772 #include "water.md"
1773 #include "lipid.md"
1774
1775 component{
1776 type = "simpleLipid_16";
1777 nMol = 60;
1778 }
1779
1780 component{
1781 type = "SSD_water";
1782 nMol = 1936;
1783 }
1784
1785 forceField = "DUFF";
1786 </MetaData>
1787 <Snapshot> // not shown in this scheme
1788 </Snapshot>
1789 </OpenMD>
1790 \end{lstlisting}
1791
1792
1793
1794 The cross potential between molecules $I$ and $J$,
1795 $V^{IJ}_{\text{Cross}}$, is as follows:
1796 \begin{equation}
1797 V^{IJ}_{\text{Cross}} =
1798 \sum_{i \in I} \sum_{j \in J}
1799 \biggl[ V_{\text{LJ}}(r_{ij}) + V_{\text{dipole}}
1800 (\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},\boldsymbol{\Omega}_{j})
1801 + V_{\text{sticky}}
1802 (\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},\boldsymbol{\Omega}_{j})
1803 \biggr],
1804 \label{eq:crossPotentail}
1805 \end{equation}
1806 where $V_{\text{LJ}}$ is the Lennard Jones potential,
1807 $V_{\text{dipole}}$ is the dipole dipole potential, and
1808 $V_{\text{sticky}}$ is the sticky potential defined by the SSD model
1809 (Sec.~\ref{section:SSD}). Note that not all atom types include all
1810 interactions.
1811
1812
1813 \section{\label{section:WATER}The {\sc water} Force Field}
1814
1815 In addition to the {\sc duff} force field's solvent description, a
1816 separate {\sc water} force field has been included for simulating most
1817 of the common rigid-body water models. This force field includes the
1818 simple and point-dipolar models (SSD, SSD1, SSD/E, SSD/RF, and DPD
1819 water), as well as the common charge-based models (SPC, SPC/E, TIP3P,
1820 TIP4P, and
1821 TIP5P).\cite{liu96:new_model,Ichiye03,fennell04,Marrink01,Berendsen81,Berendsen87,Jorgensen83,Mahoney00}
1822 In order to handle these models, charge-charge interactions were
1823 included in the force-loop:
1824 \begin{equation}
1825 V_{\text{charge}}(r_{ij}) = \sum_{ij}\frac{q_iq_je^2}{r_{ij}},
1826 \end{equation}
1827 where $q$ represents the charge on particle $i$ or $j$, and $e$ is the
1828 charge of an electron in Coulombs. The charge-charge interaction
1829 support is rudimentary in the current version of {\sc OpenMD}. As with
1830 the other pair interactions, charges can be simulated with a pure
1831 cutoff or a reaction field. The various methods for performing the
1832 Ewald summation have not yet been included. The {\sc water} force
1833 field can be easily expanded through modification of the {\sc water}
1834 force field file ({\tt WATER.frc}). By adding atom types and inserting
1835 the appropriate parameters, it is possible to extend the force field
1836 to handle rigid molecules other than water.
1837
1838
1839 \section{\label{section:sc}The Sutton-Chen Force Field}
1840
1841
1842 \section{\label{section:clay}The CLAY force field}
1843
1844 The {\sc clay} force field is based on an ionic (nonbonded)
1845 description of the metal-oxygen interactions associated with hydrated
1846 phases. All atoms are represented as point charges and are allowed
1847 complete translational freedom. Metal-oxygen interactions are based on
1848 a simple Lennard-Jones potential combined with electrostatics. The
1849 empirical parameters were optimized by Cygan {\it et
1850 al.}\cite{Cygan04} on the basis of known mineral structures, and
1851 partial atomic charges were derived from periodic DFT quantum chemical
1852 calculations of simple oxide, hydroxide, and oxyhydroxide model
1853 compounds with well-defined structures.
1854
1855
1856 \section{\label{section:electrostatics}Electrostatics}
1857
1858 To aid in performing simulations in more traditional force fields, we
1859 have added routines to carry out electrostatic interactions using a
1860 number of different electrostatic summation methods. These methods
1861 are extended from the damped and cutoff-neutralized Coulombic sum
1862 originally proposed by Wolf, {\it et al.}\cite{Wolf99} One of these,
1863 the damped shifted force method, shows a remarkable ability to
1864 reproduce the energetic and dynamic characteristics exhibited by
1865 simulations employing lattice summation techniques. The basic idea is
1866 to construct well-behaved real-space summation methods using two tricks:
1867 \begin{enumerate}
1868 \item shifting through the use of image charges, and
1869 \item damping the electrostatic interaction.
1870 \end{enumerate}
1871 Starting with the original observation that the effective range of the
1872 electrostatic interaction in condensed phases is considerably less
1873 than $r^{-1}$, either the cutoff sphere neutralization or the
1874 distance-dependent damping technique could be used as a foundation for
1875 a new pairwise summation method. Wolf \textit{et al.} made the
1876 observation that charge neutralization within the cutoff sphere plays
1877 a significant role in energy convergence; therefore we will begin our
1878 analysis with the various shifted forms that maintain this charge
1879 neutralization. We can evaluate the methods of Wolf
1880 \textit{et al.} and Zahn \textit{et al.} by considering the standard
1881 shifted potential,
1882 \begin{equation}
1883 V_\textrm{SP}(r) = \begin{cases}
1884 v(r)-v_\textrm{c} &\quad r\leqslant R_\textrm{c} \\ 0 &\quad r >
1885 R_\textrm{c}
1886 \end{cases},
1887 \label{eq:shiftingPotForm}
1888 \end{equation}
1889 and shifted force,
1890 \begin{equation}
1891 V_\textrm{SF}(r) = \begin{cases}
1892 v(r)-v_\textrm{c}-\left(\frac{d v(r)}{d r}\right)_{r=R_\textrm{c}}(r-R_\textrm{c
1893 })
1894 &\quad r\leqslant R_\textrm{c} \\ 0 &\quad r > R_\textrm{c}
1895 \end{cases},
1896 \label{eq:shiftingForm}
1897 \end{equation}
1898 functions where $v(r)$ is the unshifted form of the potential, and
1899 $v_c$ is $v(R_\textrm{c})$. The Shifted Force ({\sc sf}) form ensures
1900 that both the potential and the forces goes to zero at the cutoff
1901 radius, while the Shifted Potential ({\sc sp}) form only ensures the
1902 potential is smooth at the cutoff radius
1903 ($R_\textrm{c}$).\cite{Allen87}
1904
1905 The forces associated with the shifted potential are simply the forces
1906 of the unshifted potential itself (when inside the cutoff sphere),
1907 \begin{equation}
1908 F_{\textrm{SP}} = -\left( \frac{d v(r)}{dr} \right),
1909 \end{equation}
1910 and are zero outside. Inside the cutoff sphere, the forces associated
1911 with the shifted force form can be written,
1912 \begin{equation}
1913 F_{\textrm{SF}} = -\left( \frac{d v(r)}{dr} \right) + \left(\frac{d
1914 v(r)}{dr} \right)_{r=R_\textrm{c}}.
1915 \end{equation}
1916
1917 If the potential, $v(r)$, is taken to be the normal Coulomb potential,
1918 \begin{equation}
1919 v(r) = \frac{q_i q_j}{r},
1920 \label{eq:Coulomb}
1921 \end{equation}
1922 then the Shifted Potential ({\sc sp}) forms will give Wolf {\it et
1923 al.}'s undamped prescription:
1924 \begin{equation}
1925 V_\textrm{SP}(r) =
1926 q_iq_j\left(\frac{1}{r}-\frac{1}{R_\textrm{c}}\right) \quad
1927 r\leqslant R_\textrm{c},
1928 \label{eq:SPPot}
1929 \end{equation}
1930 with associated forces,
1931 \begin{equation}
1932 F_\textrm{SP}(r) = q_iq_j\left(\frac{1}{r^2}\right) \quad r\leqslant R_\textrm{c
1933 }.
1934 \label{eq:SPForces}
1935 \end{equation}
1936 These forces are identical to the forces of the standard Coulomb
1937 interaction, and cutting these off at $R_c$ was addressed by Wolf
1938 \textit{et al.} as undesirable. They pointed out that the effect of
1939 the image charges is neglected in the forces when this form is
1940 used,\cite{Wolf99} thereby eliminating any benefit from the method in
1941 molecular dynamics. Additionally, there is a discontinuity in the
1942 forces at the cutoff radius which results in energy drift during MD
1943 simulations.
1944
1945 The shifted force ({\sc sf}) form using the normal Coulomb potential
1946 will give,
1947 \begin{equation}
1948 V_\textrm{SF}(r) = q_iq_j\left[\frac{1}{r}-\frac{1}{R_\textrm{c}}+\left(\frac{1}
1949 {R_\textrm{c}^2}\right)(r-R_\textrm{c})\right] \quad r\leqslant R_\textrm{c}.
1950 \label{eq:SFPot}
1951 \end{equation}
1952 with associated forces,
1953 \begin{equation}
1954 F_\textrm{SF}(r) = q_iq_j\left(\frac{1}{r^2}-\frac{1}{R_\textrm{c}^2}\right) \quad r\leqslant R_\textrm{c}.
1955 \label{eq:SFForces}
1956 \end{equation}
1957 This formulation has the benefits that there are no discontinuities at
1958 the cutoff radius, while the neutralizing image charges are present in
1959 both the energy and force expressions. It would be simple to add the
1960 self-neutralizing term back when computing the total energy of the
1961 system, thereby maintaining the agreement with the Madelung energies.
1962 A side effect of this treatment is the alteration in the shape of the
1963 potential that comes from the derivative term. Thus, a degree of
1964 clarity about agreement with the empirical potential is lost in order
1965 to gain functionality in dynamics simulations.
1966
1967 Wolf \textit{et al.} originally discussed the energetics of the
1968 shifted Coulomb potential (Eq. \ref{eq:SPPot}) and found that it was
1969 insufficient for accurate determination of the energy with reasonable
1970 cutoff distances. The calculated Madelung energies fluctuated around
1971 the expected value as the cutoff radius was increased, but the
1972 oscillations converged toward the correct value.\cite{Wolf99} A
1973 damping function was incorporated to accelerate the convergence; and
1974 though alternative forms for the damping function could be
1975 used,\cite{Jones56,Heyes81} the complimentary error function was
1976 chosen to mirror the effective screening used in the Ewald summation.
1977 Incorporating this error function damping into the simple Coulomb
1978 potential,
1979 \begin{equation}
1980 v(r) = \frac{\mathrm{erfc}\left(\alpha r\right)}{r},
1981 \label{eq:dampCoulomb}
1982 \end{equation}
1983 the shifted potential (eq. (\ref{eq:SPPot})) becomes
1984 \begin{equation}
1985 V_{\textrm{DSP}}(r) = q_iq_j\left(\frac{\textrm{erfc}\left(\alpha r\right)}{r}-\
1986 frac{\textrm{erfc}\left(\alpha R_\textrm{c}\right)}{R_\textrm{c}}\right) \quad r
1987 \leqslant R_\textrm{c},
1988 \label{eq:DSPPot}
1989 \end{equation}
1990 with associated forces,
1991 \begin{equation}
1992 F_{\textrm{DSP}}(r) = q_iq_j\left(\frac{\textrm{erfc}\left(\alpha r\right)}{r^2}
1993 +\frac{2\alpha}{\pi^{1/2}}\frac{\exp{\left(-\alpha^2r^2\right)}}{r}\right) \quad
1994 r\leqslant R_\textrm{c}.
1995 \label{eq:DSPForces}
1996 \end{equation}
1997 Again, this damped shifted potential suffers from a
1998 force-discontinuity at the cutoff radius, and the image charges play
1999 no role in the forces. To remedy these concerns, one may derive a
2000 {\sc sf} variant by including the derivative term in
2001 eq. (\ref{eq:shiftingForm}),
2002 \begin{equation}
2003 \begin{split}
2004 V_\mathrm{DSF}(r) = q_iq_j\Biggr{[} & \frac{\mathrm{erfc}\left(\alpha r \right)}{r} -\frac{\mathrm{erfc}\left(\alpha R_\mathrm{c} \right) }{R_\mathrm{c}} \\
2005 & \left. +\left(\frac{\mathrm{erfc}\left(\alpha
2006 R_\mathrm{c}\right)}{R_\mathrm{c}^2}+\frac{2\alpha}{\pi^{1/2}}\frac{\exp\left(-\alpha^2R_\mathrm{c}^2\right)}{R_\mathrm{c}}\right)\left(r-R_\mathrm{c}\right)
2007 \right] \quad r\leqslant R_\textrm{c}
2008 \label{eq:DSFPot}
2009 \end{split}
2010 \end{equation}
2011 The derivative of the above potential will lead to the following forces,
2012 \begin{equation}
2013 \begin{split}
2014 F_\mathrm{DSF}(r) =
2015 q_iq_j\Biggr{[}&\left(\frac{\textrm{erfc}\left(\alpha r\right)}{r^2}+\frac{2\alpha}{\pi^{1/2}}\frac{\exp{\left(-\alpha^2r^2\right)}}{r}\right) \\ &\left.-\left(\frac{\textrm{erfc}\left(\alpha R_{\textrm{c}}\right)}{R_{\textrm{c}}^2}+\frac{2\alpha}{\pi^{1/2}}\frac{\exp{\left(-\alpha^2R_{\textrm{c}}^2
2016 \right)}}{R_{\textrm{c}}}\right)\right] \quad r\leqslant R_\textrm{c}.
2017 \label{eq:DSFForces}
2018 \end{split}
2019 \end{equation}
2020 If the damping parameter $(\alpha)$ is set to zero, the undamped case,
2021 eqs. (\ref{eq:SPPot} through \ref{eq:SFForces}) are correctly
2022 recovered from eqs. (\ref{eq:DSPPot} through \ref{eq:DSFForces}).
2023
2024 It has been shown that the Damped Shifted Force method obtains nearly
2025 identical behavior to the smooth particle mesh Ewald ({\sc spme})
2026 method on a number of commonly simulated systems.\cite{Fennell06} For
2027 this reason, the default electrostatic summation method utilized by
2028 {\sc OpenMD} is the DSF (Eq. \ref{eq:DSFPot}) with a damping parameter
2029 ($\alpha$) that is set algorithmically from the cutoff radius.
2030
2031 \section{\label{section:pbc}Periodic Boundary Conditions}
2032
2033 \newcommand{\roundme}{\operatorname{round}}
2034
2035 \textit{Periodic boundary conditions} are widely used to simulate bulk
2036 properties with a relatively small number of particles. In this method
2037 the simulation box is replicated throughout space to form an infinite
2038 lattice. During the simulation, when a particle moves in the primary
2039 cell, its image in other cells move in exactly the same direction with
2040 exactly the same orientation. Thus, as a particle leaves the primary
2041 cell, one of its images will enter through the opposite face. If the
2042 simulation box is large enough to avoid ``feeling'' the symmetries of
2043 the periodic lattice, surface effects can be ignored. The available
2044 periodic cells in {\sc OpenMD} are cubic, orthorhombic and
2045 parallelepiped. {\sc OpenMD} use a $3 \times 3$ matrix, $\mathsf{H}$,
2046 to describe the shape and size of the simulation box. $\mathsf{H}$ is
2047 defined:
2048 \begin{equation}
2049 \mathsf{H} = ( \mathbf{h}_x, \mathbf{h}_y, \mathbf{h}_z ),
2050 \end{equation}
2051 where $\mathbf{h}_{\alpha}$ is the column vector of the $\alpha$ axis of the
2052 box. During the course of the simulation both the size and shape of
2053 the box can be changed to allow volume fluctuations when constraining
2054 the pressure.
2055
2056 A real space vector, $\mathbf{r}$ can be transformed in to a box space
2057 vector, $\mathbf{s}$, and back through the following transformations:
2058 \begin{align}
2059 \mathbf{s} &= \mathsf{H}^{-1} \mathbf{r}, \\
2060 \mathbf{r} &= \mathsf{H} \mathbf{s}.
2061 \end{align}
2062 The vector $\mathbf{s}$ is now a vector expressed as the number of box
2063 lengths in the $\mathbf{h}_x$, $\mathbf{h}_y$, and $\mathbf{h}_z$
2064 directions. To find the minimum image of a vector $\mathbf{r}$, {\sc
2065 OpenMD} first converts it to its corresponding vector in box space, and
2066 then casts each element to lie in the range $[-0.5,0.5]$:
2067 \begin{equation}
2068 s_{i}^{\prime}=s_{i}-\roundme(s_{i}),
2069 \end{equation}
2070 where $s_i$ is the $i$th element of $\mathbf{s}$, and
2071 $\roundme(s_i)$ is given by
2072 \begin{equation}
2073 \roundme(x) =
2074 \begin{cases}
2075 \lfloor x+0.5 \rfloor & \text{if $x \ge 0$,} \\
2076 \lceil x-0.5 \rceil & \text{if $x < 0$.}
2077 \end{cases}
2078 \end{equation}
2079 Here $\lfloor x \rfloor$ is the floor operator, and gives the largest
2080 integer value that is not greater than $x$, and $\lceil x \rceil$ is
2081 the ceiling operator, and gives the smallest integer that is not less
2082 than $x$.
2083
2084 Finally, the minimum image coordinates $\mathbf{r}^{\prime}$ are
2085 obtained by transforming back to real space,
2086 \begin{equation}
2087 \mathbf{r}^{\prime}=\mathsf{H}^{-1}\mathbf{s}^{\prime}.%
2088 \end{equation}
2089 In this way, particles are allowed to diffuse freely in $\mathbf{r}$,
2090 but their minimum images, or $\mathbf{r}^{\prime}$, are used to compute
2091 the inter-atomic forces.
2092
2093 \chapter{\label{section:mechanics}Mechanics}
2094
2095 \section{\label{section:integrate}Integrating the Equations of Motion: the
2096 {\sc dlm} method}
2097
2098 The default method for integrating the equations of motion in {\sc
2099 OpenMD} is a velocity-Verlet version of the symplectic splitting method
2100 proposed by Dullweber, Leimkuhler and McLachlan
2101 ({\sc dlm}).\cite{Dullweber1997} When there are no directional atoms or
2102 rigid bodies present in the simulation, this integrator becomes the
2103 standard velocity-Verlet integrator which is known to sample the
2104 microcanonical (NVE) ensemble.\cite{Frenkel1996}
2105
2106 Previous integration methods for orientational motion have problems
2107 that are avoided in the {\sc dlm} method. Direct propagation of the Euler
2108 angles has a known $1/\sin\theta$ divergence in the equations of
2109 motion for $\phi$ and $\psi$,\cite{Allen87} leading to numerical
2110 instabilities any time one of the directional atoms or rigid bodies
2111 has an orientation near $\theta=0$ or $\theta=\pi$. Quaternion-based
2112 integration methods work well for propagating orientational motion;
2113 however, energy conservation concerns arise when using the
2114 microcanonical (NVE) ensemble. An earlier implementation of {\sc
2115 OpenMD} utilized quaternions for propagation of rotational motion;
2116 however, a detailed investigation showed that they resulted in a
2117 steady drift in the total energy, something that has been observed by
2118 Laird {\it et al.}\cite{Laird97}
2119
2120 The key difference in the integration method proposed by Dullweber
2121 \emph{et al.} is that the entire $3 \times 3$ rotation matrix is
2122 propagated from one time step to the next. In the past, this would not
2123 have been feasible, since the rotation matrix for a single body has
2124 nine elements compared with the more memory-efficient methods (using
2125 three Euler angles or 4 quaternions). Computer memory has become much
2126 less costly in recent years, and this can be translated into
2127 substantial benefits in energy conservation.
2128
2129 The basic equations of motion being integrated are derived from the
2130 Hamiltonian for conservative systems containing rigid bodies,
2131 \begin{equation}
2132 H = \sum_{i} \left( \frac{1}{2} m_i {\bf v}_i^T \cdot {\bf v}_i +
2133 \frac{1}{2} {\bf j}_i^T \cdot \overleftrightarrow{\mathsf{I}}_i^{-1} \cdot
2134 {\bf j}_i \right) +
2135 V\left(\left\{{\bf r}\right\}, \left\{\mathsf{A}\right\}\right),
2136 \end{equation}
2137 where ${\bf r}_i$ and ${\bf v}_i$ are the cartesian position vector
2138 and velocity of the center of mass of particle $i$, and ${\bf j}_i$,
2139 $\overleftrightarrow{\mathsf{I}}_i$ are the body-fixed angular
2140 momentum and moment of inertia tensor respectively, and the
2141 superscript $T$ denotes the transpose of the vector. $\mathsf{A}_i$
2142 is the $3 \times 3$ rotation matrix describing the instantaneous
2143 orientation of the particle. $V$ is the potential energy function
2144 which may depend on both the positions $\left\{{\bf r}\right\}$ and
2145 orientations $\left\{\mathsf{A}\right\}$ of all particles. The
2146 equations of motion for the particle centers of mass are derived from
2147 Hamilton's equations and are quite simple,
2148 \begin{eqnarray}
2149 \dot{{\bf r}} & = & {\bf v}, \\
2150 \dot{{\bf v}} & = & \frac{{\bf f}}{m},
2151 \end{eqnarray}
2152 where ${\bf f}$ is the instantaneous force on the center of mass
2153 of the particle,
2154 \begin{equation}
2155 {\bf f} = - \frac{\partial}{\partial
2156 {\bf r}} V(\left\{{\bf r}(t)\right\}, \left\{\mathsf{A}(t)\right\}).
2157 \end{equation}
2158
2159 The equations of motion for the orientational degrees of freedom are
2160 \begin{eqnarray}
2161 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
2162 \mbox{ skew}\left(\overleftrightarrow{\mathsf{I}}^{-1} \cdot {\bf j}\right),\\
2163 \dot{{\bf j}} & = & {\bf j} \times \left( \overleftrightarrow{\mathsf{I}}^{-1}
2164 \cdot {\bf j} \right) - \mbox{ rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
2165 V}{\partial \mathsf{A}} \right).
2166 \end{eqnarray}
2167 In these equations of motion, the $\mbox{skew}$ matrix of a vector
2168 ${\bf v} = \left( v_1, v_2, v_3 \right)$ is defined:
2169 \begin{equation}
2170 \mbox{skew}\left( {\bf v} \right) := \left(
2171 \begin{array}{ccc}
2172 0 & v_3 & - v_2 \\
2173 -v_3 & 0 & v_1 \\
2174 v_2 & -v_1 & 0
2175 \end{array}
2176 \right).
2177 \end{equation}
2178 The $\mbox{rot}$ notation refers to the mapping of the $3 \times 3$
2179 rotation matrix to a vector of orientations by first computing the
2180 skew-symmetric part $\left(\mathsf{A} - \mathsf{A}^{T}\right)$ and
2181 then associating this with a length 3 vector by inverting the
2182 $\mbox{skew}$ function above:
2183 \begin{equation}
2184 \mbox{rot}\left(\mathsf{A}\right) := \mbox{ skew}^{-1}\left(\mathsf{A}
2185 - \mathsf{A}^{T} \right).
2186 \end{equation}
2187 Written this way, the $\mbox{rot}$ operation creates a set of
2188 conjugate angle coordinates to the body-fixed angular momenta
2189 represented by ${\bf j}$. This equation of motion for angular momenta
2190 is equivalent to the more familiar body-fixed forms,
2191 \begin{eqnarray}
2192 \dot{j_{x}} & = & \tau^b_x(t) -
2193 \left(\overleftrightarrow{\mathsf{I}}_{yy}^{-1} - \overleftrightarrow{\mathsf{I}}_{zz}^{-1} \right) j_y j_z, \\
2194 \dot{j_{y}} & = & \tau^b_y(t) -
2195 \left(\overleftrightarrow{\mathsf{I}}_{zz}^{-1} - \overleftrightarrow{\mathsf{I}}_{xx}^{-1} \right) j_z j_x,\\
2196 \dot{j_{z}} & = & \tau^b_z(t) -
2197 \left(\overleftrightarrow{\mathsf{I}}_{xx}^{-1} - \overleftrightarrow{\mathsf{I}}_{yy}^{-1} \right) j_x j_y,
2198 \end{eqnarray}
2199 which utilize the body-fixed torques, ${\bf \tau}^b$. Torques are
2200 most easily derived in the space-fixed frame,
2201 \begin{equation}
2202 {\bf \tau}^b(t) = \mathsf{A}(t) \cdot {\bf \tau}^s(t),
2203 \end{equation}
2204 where the torques are either derived from the forces on the
2205 constituent atoms of the rigid body, or for directional atoms,
2206 directly from derivatives of the potential energy,
2207 \begin{equation}
2208 {\bf \tau}^s(t) = - \hat{\bf u}(t) \times \left( \frac{\partial}
2209 {\partial \hat{\bf u}} V\left(\left\{ {\bf r}(t) \right\}, \left\{
2210 \mathsf{A}(t) \right\}\right) \right).
2211 \end{equation}
2212 Here $\hat{\bf u}$ is a unit vector pointing along the principal axis
2213 of the particle in the space-fixed frame.
2214
2215 The {\sc dlm} method uses a Trotter factorization of the orientational
2216 propagator. This has three effects:
2217 \begin{enumerate}
2218 \item the integrator is area-preserving in phase space (i.e. it is
2219 {\it symplectic}),
2220 \item the integrator is time-{\it reversible}, making it suitable for Hybrid
2221 Monte Carlo applications, and
2222 \item the error for a single time step is of order $\mathcal{O}\left(h^4\right)$
2223 for timesteps of length $h$.
2224 \end{enumerate}
2225
2226 The integration of the equations of motion is carried out in a
2227 velocity-Verlet style 2-part algorithm, where $h= \delta t$:
2228
2229 {\tt moveA:}
2230 \begin{align*}
2231 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
2232 + \frac{h}{2} \left( {\bf f}(t) / m \right), \\
2233 %
2234 {\bf r}(t + h) &\leftarrow {\bf r}(t)
2235 + h {\bf v}\left(t + h / 2 \right), \\
2236 %
2237 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
2238 + \frac{h}{2} {\bf \tau}^b(t), \\
2239 %
2240 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left( h {\bf j}
2241 (t + h / 2) \cdot \overleftrightarrow{\mathsf{I}}^{-1} \right).
2242 \end{align*}
2243
2244 In this context, the $\mathrm{rotate}$ function is the reversible product
2245 of the three body-fixed rotations,
2246 \begin{equation}
2247 \mathrm{rotate}({\bf a}) = \mathsf{G}_x(a_x / 2) \cdot
2248 \mathsf{G}_y(a_y / 2) \cdot \mathsf{G}_z(a_z) \cdot \mathsf{G}_y(a_y /
2249 2) \cdot \mathsf{G}_x(a_x /2),
2250 \end{equation}
2251 where each rotational propagator, $\mathsf{G}_\alpha(\theta)$, rotates
2252 both the rotation matrix ($\mathsf{A}$) and the body-fixed angular
2253 momentum (${\bf j}$) by an angle $\theta$ around body-fixed axis
2254 $\alpha$,
2255 \begin{equation}
2256 \mathsf{G}_\alpha( \theta ) = \left\{
2257 \begin{array}{lcl}
2258 \mathsf{A}(t) & \leftarrow & \mathsf{A}(0) \cdot \mathsf{R}_\alpha(\theta)^T, \\
2259 {\bf j}(t) & \leftarrow & \mathsf{R}_\alpha(\theta) \cdot {\bf j}(0).
2260 \end{array}
2261 \right.
2262 \end{equation}
2263 $\mathsf{R}_\alpha$ is a quadratic approximation to
2264 the single-axis rotation matrix. For example, in the small-angle
2265 limit, the rotation matrix around the body-fixed x-axis can be
2266 approximated as
2267 \begin{equation}
2268 \mathsf{R}_x(\theta) \approx \left(
2269 \begin{array}{ccc}
2270 1 & 0 & 0 \\
2271 0 & \frac{1-\theta^2 / 4}{1 + \theta^2 / 4} & -\frac{\theta}{1+
2272 \theta^2 / 4} \\
2273 0 & \frac{\theta}{1+
2274 \theta^2 / 4} & \frac{1-\theta^2 / 4}{1 + \theta^2 / 4}
2275 \end{array}
2276 \right).
2277 \end{equation}
2278 All other rotations follow in a straightforward manner.
2279
2280 After the first part of the propagation, the forces and body-fixed
2281 torques are calculated at the new positions and orientations
2282
2283 {\tt doForces:}
2284 \begin{align*}
2285 {\bf f}(t + h) &\leftarrow
2286 - \left(\frac{\partial V}{\partial {\bf r}}\right)_{{\bf r}(t + h)}, \\
2287 %
2288 {\bf \tau}^{s}(t + h) &\leftarrow {\bf u}(t + h)
2289 \times \frac{\partial V}{\partial {\bf u}}, \\
2290 %
2291 {\bf \tau}^{b}(t + h) &\leftarrow \mathsf{A}(t + h)
2292 \cdot {\bf \tau}^s(t + h).
2293 \end{align*}
2294
2295 {\sc OpenMD} automatically updates ${\bf u}$ when the rotation matrix
2296 $\mathsf{A}$ is calculated in {\tt moveA}. Once the forces and
2297 torques have been obtained at the new time step, the velocities can be
2298 advanced to the same time value.
2299
2300 {\tt moveB:}
2301 \begin{align*}
2302 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t + h / 2 \right)
2303 + \frac{h}{2} \left( {\bf f}(t + h) / m \right), \\
2304 %
2305 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t + h / 2 \right)
2306 + \frac{h}{2} {\bf \tau}^b(t + h) .
2307 \end{align*}
2308
2309 The matrix rotations used in the {\sc dlm} method end up being more
2310 costly computationally than the simpler arithmetic quaternion
2311 propagation. With the same time step, a 1024-molecule water simulation
2312 incurs an average 12\% increase in computation time using the {\sc
2313 dlm} method in place of quaternions. This cost is more than justified
2314 when comparing the energy conservation achieved by the two
2315 methods. Figure ~\ref{quatdlm} provides a comparative analysis of the
2316 {\sc dlm} method versus the traditional quaternion scheme.
2317
2318 \begin{figure}
2319 \centering
2320 \includegraphics[width=\linewidth]{quatvsdlm.pdf}
2321 \caption[Energy conservation analysis of the {\sc dlm} and quaternion
2322 integration methods]{Analysis of the energy conservation of the {\sc
2323 dlm} and quaternion integration methods. $\delta \mathrm{E}_1$ is the
2324 linear drift in energy over time and $\delta \mathrm{E}_0$ is the
2325 standard deviation of energy fluctuations around this drift. All
2326 simulations were of a 1024-molecule simulation of SSD water at 298 K
2327 starting from the same initial configuration. Note that the {\sc dlm}
2328 method provides more than an order of magnitude improvement in both
2329 the energy drift and the size of the energy fluctuations when compared
2330 with the quaternion method at any given time step. At time steps
2331 larger than 4 fs, the quaternion scheme resulted in rapidly rising
2332 energies which eventually lead to simulation failure. Using the {\sc
2333 dlm} method, time steps up to 8 fs can be taken before this behavior
2334 is evident.}
2335 \label{quatdlm}
2336 \end{figure}
2337
2338 In Fig.~\ref{quatdlm}, $\delta \mbox{E}_1$ is a measure of the linear
2339 energy drift in units of $\mbox{kcal mol}^{-1}$ per particle over a
2340 nanosecond of simulation time, and $\delta \mbox{E}_0$ is the standard
2341 deviation of the energy fluctuations in units of $\mbox{kcal
2342 mol}^{-1}$ per particle. In the top plot, it is apparent that the
2343 energy drift is reduced by a significant amount (2 to 3 orders of
2344 magnitude improvement at all tested time steps) by chosing the {\sc
2345 dlm} method over the simple non-symplectic quaternion integration
2346 method. In addition to this improvement in energy drift, the
2347 fluctuations in the total energy are also dampened by 1 to 2 orders of
2348 magnitude by utilizing the {\sc dlm} method.
2349
2350 Although the {\sc dlm} method is more computationally expensive than
2351 the traditional quaternion scheme for propagating a single time step,
2352 consideration of the computational cost for a long simulation with a
2353 particular level of energy conservation is in order. A plot of energy
2354 drift versus computational cost was generated
2355 (Fig.~\ref{cpuCost}). This figure provides an estimate of the CPU time
2356 required under the two integration schemes for 1 nanosecond of
2357 simulation time for the model 1024-molecule system. By chosing a
2358 desired energy drift value it is possible to determine the CPU time
2359 required for both methods. If a $\delta \mbox{E}_1$ of $1 \times
2360 10^{-3} \mbox{kcal mol}^{-1}$ per particle is desired, a nanosecond of
2361 simulation time will require ~19 hours of CPU time with the {\sc dlm}
2362 integrator, while the quaternion scheme will require ~154 hours of CPU
2363 time. This demonstrates the computational advantage of the integration
2364 scheme utilized in {\sc OpenMD}.
2365
2366 \begin{figure}
2367 \centering
2368 \includegraphics[width=\linewidth]{compCost.pdf}
2369 \caption[Energy drift as a function of required simulation run
2370 time]{Energy drift as a function of required simulation run time.
2371 $\delta \mathrm{E}_1$ is the linear drift in energy over time.
2372 Simulations were performed on a single 2.5 GHz Pentium 4
2373 processor. Simulation time comparisons can be made by tracing
2374 horizontally from one curve to the other. For example, a simulation
2375 that takes ~24 hours using the {\sc dlm} method will take roughly 210
2376 hours using the simple quaternion method if the same degree of energy
2377 conservation is desired.}
2378 \label{cpuCost}
2379 \end{figure}
2380
2381 There is only one specific keyword relevant to the default integrator,
2382 and that is the time step for integrating the equations of motion.
2383
2384 \begin{center}
2385 \begin{tabular}{llll}
2386 {\bf variable} & {\bf Meta-data keyword} & {\bf units} & {\bf
2387 default value} \\
2388 $h$ & {\tt dt = 2.0;} & fs & none
2389 \end{tabular}
2390 \end{center}
2391
2392 \section{\label{sec:extended}Extended Systems for other Ensembles}
2393
2394 {\sc OpenMD} implements a number of extended system integrators for
2395 sampling from other ensembles relevant to chemical physics. The
2396 integrator can be selected with the {\tt ensemble} keyword in the
2397 meta-data file:
2398
2399 \begin{center}
2400 \begin{tabular}{lll}
2401 {\bf Integrator} & {\bf Ensemble} & {\bf Meta-data instruction} \\
2402 NVE & microcanonical & {\tt ensemble = NVE; } \\
2403 NVT & canonical & {\tt ensemble = NVT; } \\
2404 NPTi & isobaric-isothermal & {\tt ensemble = NPTi;} \\
2405 & (with isotropic volume changes) & \\
2406 NPTf & isobaric-isothermal & {\tt ensemble = NPTf;} \\
2407 & (with changes to box shape) & \\
2408 NPTxyz & approximate isobaric-isothermal & {\tt ensemble = NPTxyz;} \\
2409 & (with separate barostats on each box dimension) & \\
2410 LD & Langevin Dynamics & {\tt ensemble = LD;} \\
2411 & (approximates the effects of an implicit solvent) & \\
2412 LangevinHull & Non-periodic Langevin Dynamics & {\tt ensemble = LangevinHull;} \\
2413 & (Langevin Dynamics for molecules on convex hull;\\
2414 & Newtonian for interior molecules) & \\
2415 \end{tabular}
2416 \end{center}
2417
2418 The relatively well-known Nos\'e-Hoover thermostat\cite{Hoover85} is
2419 implemented in {\sc OpenMD}'s NVT integrator. This method couples an
2420 extra degree of freedom (the thermostat) to the kinetic energy of the
2421 system and it has been shown to sample the canonical distribution in
2422 the system degrees of freedom while conserving a quantity that is, to
2423 within a constant, the Helmholtz free energy.\cite{melchionna93}
2424
2425 NPT algorithms attempt to maintain constant pressure in the system by
2426 coupling the volume of the system to a barostat. {\sc OpenMD} contains
2427 three different constant pressure algorithms. The first two, NPTi and
2428 NPTf have been shown to conserve a quantity that is, to within a
2429 constant, the Gibbs free energy.\cite{melchionna93} The Melchionna
2430 modification to the Hoover barostat is implemented in both NPTi and
2431 NPTf. NPTi allows only isotropic changes in the simulation box, while
2432 box {\it shape} variations are allowed in NPTf. The NPTxyz integrator
2433 has {\it not} been shown to sample from the isobaric-isothermal
2434 ensemble. It is useful, however, in that it maintains orthogonality
2435 for the axes of the simulation box while attempting to equalize
2436 pressure along the three perpendicular directions in the box.
2437
2438 Each of the extended system integrators requires additional keywords
2439 to set target values for the thermodynamic state variables that are
2440 being held constant. Keywords are also required to set the
2441 characteristic decay times for the dynamics of the extended
2442 variables.
2443
2444 \begin{center}
2445 \begin{tabular}{llll}
2446 {\bf variable} & {\bf Meta-data instruction} & {\bf units} & {\bf
2447 default value} \\
2448 $T_{\mathrm{target}}$ & {\tt targetTemperature = 300;} & K & none \\
2449 $P_{\mathrm{target}}$ & {\tt targetPressure = 1;} & atm & none \\
2450 $\tau_T$ & {\tt tauThermostat = 1e3;} & fs & none \\
2451 $\tau_B$ & {\tt tauBarostat = 5e3;} & fs & none \\
2452 & {\tt resetTime = 200;} & fs & none \\
2453 & {\tt useInitialExtendedSystemState = true;} & logical &
2454 true
2455 \end{tabular}
2456 \end{center}
2457
2458 Two additional keywords can be used to either clear the extended
2459 system variables periodically ({\tt resetTime}), or to maintain the
2460 state of the extended system variables between simulations ({\tt
2461 useInitialExtendedSystemState}). More details on these variables
2462 and their use in the integrators follows below.
2463
2464 \section{\label{section:noseHooverThermo}Nos\'{e}-Hoover Thermostatting}
2465
2466 The Nos\'e-Hoover equations of motion are given by\cite{Hoover85}
2467 \begin{eqnarray}
2468 \dot{{\bf r}} & = & {\bf v}, \\
2469 \dot{{\bf v}} & = & \frac{{\bf f}}{m} - \chi {\bf v} ,\\
2470 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
2471 \mbox{ skew}\left(\overleftrightarrow{\mathsf{I}}^{-1} \cdot {\bf j}\right), \\
2472 \dot{{\bf j}} & = & {\bf j} \times \left( \overleftrightarrow{\mathsf{I}}^{-1}
2473 \cdot {\bf j} \right) - \mbox{ rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
2474 V}{\partial \mathsf{A}} \right) - \chi {\bf j}.
2475 \label{eq:nosehoovereom}
2476 \end{eqnarray}
2477
2478 $\chi$ is an ``extra'' variable included in the extended system, and
2479 it is propagated using the first order equation of motion
2480 \begin{equation}
2481 \dot{\chi} = \frac{1}{\tau_{T}^2} \left( \frac{T}{T_{\mathrm{target}}} - 1 \right).
2482 \label{eq:nosehooverext}
2483 \end{equation}
2484
2485 The instantaneous temperature $T$ is proportional to the total kinetic
2486 energy (both translational and orientational) and is given by
2487 \begin{equation}
2488 T = \frac{2 K}{f k_B}
2489 \end{equation}
2490 Here, $f$ is the total number of degrees of freedom in the system,
2491 \begin{equation}
2492 f = 3 N + 2 N_{\mathrm{linear}} + 3 N_{\mathrm{non-linear}} - N_{\mathrm{constraints}},
2493 \end{equation}
2494 and $K$ is the total kinetic energy,
2495 \begin{equation}
2496 K = \sum_{i=1}^{N} \frac{1}{2} m_i {\bf v}_i^T \cdot {\bf v}_i +
2497 \sum_{i=1}^{N_{\mathrm{linear}}+N_{\mathrm{non-linear}}} \frac{1}{2} {\bf j}_i^T \cdot
2498 \overleftrightarrow{\mathsf{I}}_i^{-1} \cdot {\bf j}_i.
2499 \end{equation}
2500 $N_{\mathrm{linear}}$ is the number of linear rotors (i.e. with two
2501 non-zero moments of inertia), and $N_{\mathrm{non-linear}}$ is the
2502 number of non-linear rotors (i.e. with three non-zero moments of
2503 inertia).
2504
2505 In eq.(\ref{eq:nosehooverext}), $\tau_T$ is the time constant for
2506 relaxation of the temperature to the target value. To set values for
2507 $\tau_T$ or $T_{\mathrm{target}}$ in a simulation, one would use the
2508 {\tt tauThermostat} and {\tt targetTemperature} keywords in the
2509 meta-data file. The units for {\tt tauThermostat} are fs, and the
2510 units for the {\tt targetTemperature} are degrees K. The integration
2511 of the equations of motion is carried out in a velocity-Verlet style 2
2512 part algorithm:
2513
2514 {\tt moveA:}
2515 \begin{align*}
2516 T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
2517 %
2518 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
2519 + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
2520 \chi(t)\right), \\
2521 %
2522 {\bf r}(t + h) &\leftarrow {\bf r}(t)
2523 + h {\bf v}\left(t + h / 2 \right) ,\\
2524 %
2525 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
2526 + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
2527 \chi(t) \right) ,\\
2528 %
2529 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}
2530 \left(h * {\bf j}(t + h / 2)
2531 \overleftrightarrow{\mathsf{I}}^{-1} \right) ,\\
2532 %
2533 \chi\left(t + h / 2 \right) &\leftarrow \chi(t)
2534 + \frac{h}{2 \tau_T^2} \left( \frac{T(t)}
2535 {T_{\mathrm{target}}} - 1 \right) .
2536 \end{align*}
2537
2538 Here $\mathrm{rotate}(h * {\bf j}
2539 \overleftrightarrow{\mathsf{I}}^{-1})$ is the same symplectic Trotter
2540 factorization of the three rotation operations that was discussed in
2541 the section on the {\sc dlm} integrator. Note that this operation modifies
2542 both the rotation matrix $\mathsf{A}$ and the angular momentum ${\bf
2543 j}$. {\tt moveA} propagates velocities by a half time step, and
2544 positional degrees of freedom by a full time step. The new positions
2545 (and orientations) are then used to calculate a new set of forces and
2546 torques in exactly the same way they are calculated in the {\tt
2547 doForces} portion of the {\sc dlm} integrator.
2548
2549 Once the forces and torques have been obtained at the new time step,
2550 the temperature, velocities, and the extended system variable can be
2551 advanced to the same time value.
2552
2553 {\tt moveB:}
2554 \begin{align*}
2555 T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
2556 \left\{{\bf j}(t + h)\right\}, \\
2557 %
2558 \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
2559 2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+h)}
2560 {T_{\mathrm{target}}} - 1 \right), \\
2561 %
2562 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t
2563 + h / 2 \right) + \frac{h}{2} \left(
2564 \frac{{\bf f}(t + h)}{m} - {\bf v}(t + h)
2565 \chi(t h)\right) ,\\
2566 %
2567 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t
2568 + h / 2 \right) + \frac{h}{2}
2569 \left( {\bf \tau}^b(t + h) - {\bf j}(t + h)
2570 \chi(t + h) \right) .
2571 \end{align*}
2572
2573 Since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required to calculate
2574 $T(t + h)$ as well as $\chi(t + h)$, they indirectly depend on their
2575 own values at time $t + h$. {\tt moveB} is therefore done in an
2576 iterative fashion until $\chi(t + h)$ becomes self-consistent. The
2577 relative tolerance for the self-consistency check defaults to a value
2578 of $\mbox{10}^{-6}$, but {\sc OpenMD} will terminate the iteration
2579 after 4 loops even if the consistency check has not been satisfied.
2580
2581 The Nos\'e-Hoover algorithm is known to conserve a Hamiltonian for the
2582 extended system that is, to within a constant, identical to the
2583 Helmholtz free energy,\cite{melchionna93}
2584 \begin{equation}
2585 H_{\mathrm{NVT}} = V + K + f k_B T_{\mathrm{target}} \left(
2586 \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime) dt^\prime
2587 \right).
2588 \end{equation}
2589 Poor choices of $h$ or $\tau_T$ can result in non-conservation
2590 of $H_{\mathrm{NVT}}$, so the conserved quantity is maintained in the
2591 last column of the {\tt .stat} file to allow checks on the quality of
2592 the integration.
2593
2594 Bond constraints are applied at the end of both the {\tt moveA} and
2595 {\tt moveB} portions of the algorithm. Details on the constraint
2596 algorithms are given in section \ref{section:rattle}.
2597
2598 \section{\label{sec:NPTi}Constant-pressure integration with
2599 isotropic box deformations (NPTi)}
2600
2601 To carry out isobaric-isothermal ensemble calculations, {\sc OpenMD}
2602 implements the Melchionna modifications to the Nos\'e-Hoover-Andersen
2603 equations of motion.\cite{melchionna93} The equations of motion are
2604 the same as NVT with the following exceptions:
2605
2606 \begin{eqnarray}
2607 \dot{{\bf r}} & = & {\bf v} + \eta \left( {\bf r} - {\bf R}_0 \right), \\
2608 \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\eta + \chi) {\bf v}, \\
2609 \dot{\eta} & = & \frac{1}{\tau_{B}^2 f k_B T_{\mathrm{target}}} V \left( P -
2610 P_{\mathrm{target}} \right), \\
2611 \dot{\mathcal{V}} & = & 3 \mathcal{V} \eta .
2612 \label{eq:melchionna1}
2613 \end{eqnarray}
2614
2615 $\chi$ and $\eta$ are the ``extra'' degrees of freedom in the extended
2616 system. $\chi$ is a thermostat, and it has the same function as it
2617 does in the Nos\'e-Hoover NVT integrator. $\eta$ is a barostat which
2618 controls changes to the volume of the simulation box. ${\bf R}_0$ is
2619 the location of the center of mass for the entire system, and
2620 $\mathcal{V}$ is the volume of the simulation box. At any time, the
2621 volume can be calculated from the determinant of the matrix which
2622 describes the box shape:
2623 \begin{equation}
2624 \mathcal{V} = \det(\mathsf{H}).
2625 \end{equation}
2626
2627 The NPTi integrator requires an instantaneous pressure. This quantity
2628 is calculated via the pressure tensor,
2629 \begin{equation}
2630 \overleftrightarrow{\mathsf{P}}(t) = \frac{1}{\mathcal{V}(t)} \left(
2631 \sum_{i=1}^{N} m_i {\bf v}_i(t) \otimes {\bf v}_i(t) \right) +
2632 \overleftrightarrow{\mathsf{W}}(t).
2633 \end{equation}
2634 The kinetic contribution to the pressure tensor utilizes the {\it
2635 outer} product of the velocities, denoted by the $\otimes$ symbol. The
2636 stress tensor is calculated from another outer product of the
2637 inter-atomic separation vectors (${\bf r}_{ij} = {\bf r}_j - {\bf
2638 r}_i$) with the forces between the same two atoms,
2639 \begin{equation}
2640 \overleftrightarrow{\mathsf{W}}(t) = \sum_{i} \sum_{j>i} {\bf r}_{ij}(t)
2641 \otimes {\bf f}_{ij}(t).
2642 \end{equation}
2643 In systems containing cutoff groups, the stress tensor is computed
2644 between the centers-of-mass of the cutoff groups:
2645 \begin{equation}
2646 \overleftrightarrow{\mathsf{W}}(t) = \sum_{a} \sum_{b} {\bf r}_{ab}(t)
2647 \otimes {\bf f}_{ab}(t).
2648 \end{equation}
2649 where ${\bf r}_{ab}$ is the distance between the centers of mass, and
2650 \begin{equation}
2651 {\bf f}_{ab} = s(r_{ab}) \sum_{i \in a} \sum_{j \in b} {\bf f}_{ij} +
2652 s^{\prime}(r_{ab}) \frac{{\bf r}_{ab}}{|r_{ab}|} \sum_{i \in a} \sum_{j
2653 \in b} V_{ij}({\bf r}_{ij}).
2654 \end{equation}
2655
2656 The instantaneous pressure is then simply obtained from the trace of
2657 the pressure tensor,
2658 \begin{equation}
2659 P(t) = \frac{1}{3} \mathrm{Tr} \left( \overleftrightarrow{\mathsf{P}}(t)
2660 \right).
2661 \end{equation}
2662
2663 In eq.(\ref{eq:melchionna1}), $\tau_B$ is the time constant for
2664 relaxation of the pressure to the target value. To set values for
2665 $\tau_B$ or $P_{\mathrm{target}}$ in a simulation, one would use the
2666 {\tt tauBarostat} and {\tt targetPressure} keywords in the meta-data
2667 file. The units for {\tt tauBarostat} are fs, and the units for the
2668 {\tt targetPressure} are atmospheres. Like in the NVT integrator, the
2669 integration of the equations of motion is carried out in a
2670 velocity-Verlet style two part algorithm with only the following
2671 differences:
2672
2673 {\tt moveA:}
2674 \begin{align*}
2675 P(t) &\leftarrow \left\{{\bf r}(t)\right\}, \left\{{\bf v}(t)\right\} ,\\
2676 %
2677 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
2678 + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
2679 \left(\chi(t) + \eta(t) \right) \right), \\
2680 %
2681 \eta(t + h / 2) &\leftarrow \eta(t) + \frac{h
2682 \mathcal{V}(t)}{2 N k_B T(t) \tau_B^2} \left( P(t)
2683 - P_{\mathrm{target}} \right), \\
2684 %
2685 {\bf r}(t + h) &\leftarrow {\bf r}(t) + h
2686 \left\{ {\bf v}\left(t + h / 2 \right)
2687 + \eta(t + h / 2)\left[ {\bf r}(t + h)
2688 - {\bf R}_0 \right] \right\} ,\\
2689 %
2690 \mathsf{H}(t + h) &\leftarrow e^{-h \eta(t + h / 2)}
2691 \mathsf{H}(t).
2692 \end{align*}
2693
2694 The propagation of positions to time $t + h$
2695 depends on the positions at the same time. {\sc OpenMD} carries out
2696 this step iteratively (with a limit of 5 passes through the iterative
2697 loop). Also, the simulation box $\mathsf{H}$ is scaled uniformly for
2698 one full time step by an exponential factor that depends on the value
2699 of $\eta$ at time $t +
2700 h / 2$. Reshaping the box uniformly also scales the volume of
2701 the box by
2702 \begin{equation}
2703 \mathcal{V}(t + h) \leftarrow e^{ - 3 h \eta(t + h /2)} \times
2704 \mathcal{V}(t).
2705 \end{equation}
2706
2707 The {\tt doForces} step for the NPTi integrator is exactly the same as
2708 in both the {\sc dlm} and NVT integrators. Once the forces and torques have
2709 been obtained at the new time step, the velocities can be advanced to
2710 the same time value.
2711
2712 {\tt moveB:}
2713 \begin{align*}
2714 P(t + h) &\leftarrow \left\{{\bf r}(t + h)\right\},
2715 \left\{{\bf v}(t + h)\right\}, \\
2716 %
2717 \eta(t + h) &\leftarrow \eta(t + h / 2) +
2718 \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
2719 \tau_B^2} \left( P(t + h) - P_{\mathrm{target}} \right), \\
2720 %
2721 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t
2722 + h / 2 \right) + \frac{h}{2} \left(
2723 \frac{{\bf f}(t + h)}{m} - {\bf v}(t + h)
2724 (\chi(t + h) + \eta(t + h)) \right) ,\\
2725 %
2726 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t
2727 + h / 2 \right) + \frac{h}{2} \left( {\bf
2728 \tau}^b(t + h) - {\bf j}(t + h)
2729 \chi(t + h) \right) .
2730 \end{align*}
2731
2732 Once again, since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required
2733 to calculate $T(t + h)$, $P(t + h)$, $\chi(t + h)$, and $\eta(t +
2734 h)$, they indirectly depend on their own values at time $t + h$. {\tt
2735 moveB} is therefore done in an iterative fashion until $\chi(t + h)$
2736 and $\eta(t + h)$ become self-consistent. The relative tolerance for
2737 the self-consistency check defaults to a value of $\mbox{10}^{-6}$,
2738 but {\sc OpenMD} will terminate the iteration after 4 loops even if the
2739 consistency check has not been satisfied.
2740
2741 The Melchionna modification of the Nos\'e-Hoover-Andersen algorithm is
2742 known to conserve a Hamiltonian for the extended system that is, to
2743 within a constant, identical to the Gibbs free energy,
2744 \begin{equation}
2745 H_{\mathrm{NPTi}} = V + K + f k_B T_{\mathrm{target}} \left(
2746 \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime) dt^\prime
2747 \right) + P_{\mathrm{target}} \mathcal{V}(t).
2748 \end{equation}
2749 Poor choices of $\delta t$, $\tau_T$, or $\tau_B$ can result in
2750 non-conservation of $H_{\mathrm{NPTi}}$, so the conserved quantity is
2751 maintained in the last column of the {\tt .stat} file to allow checks
2752 on the quality of the integration. It is also known that this
2753 algorithm samples the equilibrium distribution for the enthalpy
2754 (including contributions for the thermostat and barostat),
2755 \begin{equation}
2756 H_{\mathrm{NPTi}} = V + K + \frac{f k_B T_{\mathrm{target}}}{2} \left(
2757 \chi^2 \tau_T^2 + \eta^2 \tau_B^2 \right) + P_{\mathrm{target}}
2758 \mathcal{V}(t).
2759 \end{equation}
2760
2761 Bond constraints are applied at the end of both the {\tt moveA} and
2762 {\tt moveB} portions of the algorithm. Details on the constraint
2763 algorithms are given in section \ref{section:rattle}.
2764
2765 \section{\label{sec:NPTf}Constant-pressure integration with a
2766 flexible box (NPTf)}
2767
2768 There is a relatively simple generalization of the
2769 Nos\'e-Hoover-Andersen method to include changes in the simulation box
2770 {\it shape} as well as in the volume of the box. This method utilizes
2771 the full $3 \times 3$ pressure tensor and introduces a tensor of
2772 extended variables ($\overleftrightarrow{\eta}$) to control changes to
2773 the box shape. The equations of motion for this method differ from
2774 those of NPTi as follows:
2775 \begin{eqnarray}
2776 \dot{{\bf r}} & = & {\bf v} + \overleftrightarrow{\eta} \cdot \left( {\bf r} - {\bf R}_0 \right), \\
2777 \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\overleftrightarrow{\eta} +
2778 \chi \cdot \mathsf{1}) {\bf v}, \\
2779 \dot{\overleftrightarrow{\eta}} & = & \frac{1}{\tau_{B}^2 f k_B
2780 T_{\mathrm{target}}} V \left( \overleftrightarrow{\mathsf{P}} - P_{\mathrm{target}}\mathsf{1} \right) ,\\
2781 \dot{\mathsf{H}} & = & \overleftrightarrow{\eta} \cdot \mathsf{H} .
2782 \label{eq:melchionna2}
2783 \end{eqnarray}
2784
2785 Here, $\mathsf{1}$ is the unit matrix and $\overleftrightarrow{\mathsf{P}}$
2786 is the pressure tensor. Again, the volume, $\mathcal{V} = \det
2787 \mathsf{H}$.
2788
2789 The propagation of the equations of motion is nearly identical to the
2790 NPTi integration:
2791
2792 {\tt moveA:}
2793 \begin{align*}
2794 \overleftrightarrow{\mathsf{P}}(t) &\leftarrow \left\{{\bf r}(t)\right\},
2795 \left\{{\bf v}(t)\right\} ,\\
2796 %
2797 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
2798 + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} -
2799 \left(\chi(t)\mathsf{1} + \overleftrightarrow{\eta}(t) \right) \cdot
2800 {\bf v}(t) \right), \\
2801 %
2802 \overleftrightarrow{\eta}(t + h / 2) &\leftarrow
2803 \overleftrightarrow{\eta}(t) + \frac{h \mathcal{V}(t)}{2 N k_B
2804 T(t) \tau_B^2} \left( \overleftrightarrow{\mathsf{P}}(t)
2805 - P_{\mathrm{target}}\mathsf{1} \right), \\
2806 %
2807 {\bf r}(t + h) &\leftarrow {\bf r}(t) + h \left\{ {\bf v}
2808 \left(t + h / 2 \right) + \overleftrightarrow{\eta}(t +
2809 h / 2) \cdot \left[ {\bf r}(t + h)
2810 - {\bf R}_0 \right] \right\}, \\
2811 %
2812 \mathsf{H}(t + h) &\leftarrow \mathsf{H}(t) \cdot e^{-h
2813 \overleftrightarrow{\eta}(t + h / 2)} .
2814 \end{align*}
2815 {\sc OpenMD} uses a power series expansion truncated at second order
2816 for the exponential operation which scales the simulation box.
2817
2818 The {\tt moveB} portion of the algorithm is largely unchanged from the
2819 NPTi integrator:
2820
2821 {\tt moveB:}
2822 \begin{align*}
2823 \overleftrightarrow{\mathsf{P}}(t + h) &\leftarrow \left\{{\bf r}
2824 (t + h)\right\}, \left\{{\bf v}(t
2825 + h)\right\}, \left\{{\bf f}(t + h)\right\} ,\\
2826 %
2827 \overleftrightarrow{\eta}(t + h) &\leftarrow
2828 \overleftrightarrow{\eta}(t + h / 2) +
2829 \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
2830 \tau_B^2} \left( \overleftrightarrow{P}(t + h)
2831 - P_{\mathrm{target}}\mathsf{1} \right) ,\\
2832 %
2833 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t
2834 + h / 2 \right) + \frac{h}{2} \left(
2835 \frac{{\bf f}(t + h)}{m} -
2836 (\chi(t + h)\mathsf{1} + \overleftrightarrow{\eta}(t
2837 + h)) \right) \cdot {\bf v}(t + h), \\
2838 \end{align*}
2839
2840 The iterative schemes for both {\tt moveA} and {\tt moveB} are
2841 identical to those described for the NPTi integrator.
2842
2843 The NPTf integrator is known to conserve the following Hamiltonian:
2844 \begin{equation}
2845 H_{\mathrm{NPTf}} = V + K + f k_B T_{\mathrm{target}} \left(
2846 \frac{\tau_{T}^2 \chi^2(t)}{2} + \int_{0}^{t} \chi(t^\prime) dt^\prime
2847 \right) + P_{\mathrm{target}} \mathcal{V}(t) + \frac{f k_B
2848 T_{\mathrm{target}}}{2}
2849 \mathrm{Tr}\left[\overleftrightarrow{\eta}(t)\right]^2 \tau_B^2.
2850 \end{equation}
2851
2852 This integrator must be used with care, particularly in liquid
2853 simulations. Liquids have very small restoring forces in the
2854 off-diagonal directions, and the simulation box can very quickly form
2855 elongated and sheared geometries which become smaller than the cutoff
2856 radius. The NPTf integrator finds most use in simulating crystals or
2857 liquid crystals which assume non-orthorhombic geometries.
2858
2859 \section{\label{nptxyz}Constant pressure in 3 axes (NPTxyz)}
2860
2861 There is one additional extended system integrator which is somewhat
2862 simpler than the NPTf method described above. In this case, the three
2863 axes have independent barostats which each attempt to preserve the
2864 target pressure along the box walls perpendicular to that particular
2865 axis. The lengths of the box axes are allowed to fluctuate
2866 independently, but the angle between the box axes does not change.
2867 The equations of motion are identical to those described above, but
2868 only the {\it diagonal} elements of $\overleftrightarrow{\eta}$ are
2869 computed. The off-diagonal elements are set to zero (even when the
2870 pressure tensor has non-zero off-diagonal elements).
2871
2872 It should be noted that the NPTxyz integrator is {\it not} known to
2873 preserve any Hamiltonian of interest to the chemical physics
2874 community. The integrator is extremely useful, however, in generating
2875 initial conditions for other integration methods. It {\it is} suitable
2876 for use with liquid simulations, or in cases where there is
2877 orientational anisotropy in the system (i.e. in lipid bilayer
2878 simulations).
2879
2880 \section{Langevin Dynamics (LD)\label{LDRB}}
2881
2882 {\sc OpenMD} implements a Langevin integrator in order to perform
2883 molecular dynamics simulations in implicit solvent environments. This
2884 can result in substantial performance gains when the detailed dynamics
2885 of the solvent is not important. Since {\sc OpenMD} also handles rigid
2886 bodies of arbitrary composition and shape, the Langevin integrator is
2887 by necessity somewhat more complex than in other simulation packages.
2888
2889 Consider the Langevin equations of motion in generalized coordinates
2890 \begin{equation}
2891 {\bf M} \dot{{\bf V}}(t) = {\bf F}_{s}(t) +
2892 {\bf F}_{f}(t) + {\bf F}_{r}(t)
2893 \label{LDGeneralizedForm}
2894 \end{equation}
2895 where ${\bf M}$ is a $6 \times 6$ diagonal mass matrix (which
2896 includes the mass of the rigid body as well as the moments of inertia
2897 in the body-fixed frame) and ${\bf V}$ is a generalized velocity,
2898 ${\bf V} =
2899 \left\{{\bf v},{\bf \omega}\right\}$. The right side of
2900 Eq. \ref{LDGeneralizedForm} consists of three generalized forces: a
2901 system force (${\bf F}_{s}$), a frictional or dissipative force (${\bf
2902 F}_{f}$) and a stochastic force (${\bf F}_{r}$). While the evolution
2903 of the system in Newtonian mechanics is typically done in the lab
2904 frame, it is convenient to handle the dynamics of rigid bodies in
2905 body-fixed frames. Thus the friction and random forces on each
2906 substructure are calculated in a body-fixed frame and may converted
2907 back to the lab frame using that substructure's rotation matrix (${\bf
2908 Q}$):
2909 \begin{equation}
2910 {\bf F}_{f,r} =
2911 \left( \begin{array}{c}
2912 {\bf f}_{f,r} \\
2913 {\bf \tau}_{f,r}
2914 \end{array} \right)
2915 =
2916 \left( \begin{array}{c}
2917 {\bf Q}^{T} {\bf f}^{~b}_{f,r} \\
2918 {\bf Q}^{T} {\bf \tau}^{~b}_{f,r}
2919 \end{array} \right)
2920 \end{equation}
2921 The body-fixed friction force, ${\bf F}_{f}^{~b}$, is proportional to
2922 the (body-fixed) velocity at the center of resistance
2923 ${\bf v}_{R}^{~b}$ and the angular velocity ${\bf \omega}$
2924 \begin{equation}
2925 {\bf F}_{f}^{~b}(t) = \left( \begin{array}{l}
2926 {\bf f}_{f}^{~b}(t) \\
2927 {\bf \tau}_{f}^{~b}(t) \\
2928 \end{array} \right) = - \left( \begin{array}{*{20}c}
2929 \Xi_{R}^{tt} & \Xi_{R}^{rt} \\
2930 \Xi_{R}^{tr} & \Xi_{R}^{rr} \\
2931 \end{array} \right)\left( \begin{array}{l}
2932 {\bf v}_{R}^{~b}(t) \\
2933 {\bf \omega}(t) \\
2934 \end{array} \right),
2935 \end{equation}
2936 while the random force, ${\bf F}_{r}$, is a Gaussian stochastic
2937 variable with zero mean and variance,
2938 \begin{equation}
2939 \left\langle {{\bf F}_{r}(t) ({\bf F}_{r}(t'))^T } \right\rangle =
2940 \left\langle {{\bf F}_{r}^{~b} (t) ({\bf F}_{r}^{~b} (t'))^T } \right\rangle =
2941 2 k_B T \Xi_R \delta(t - t'). \label{eq:randomForce}
2942 \end{equation}
2943 $\Xi_R$ is the $6\times6$ resistance tensor at the center of
2944 resistance.
2945
2946 For atoms and ellipsoids, there are good approximations for this
2947 tensor that are based on Stokes' law. For arbitrary rigid bodies, the
2948 resistance tensor must be pre-computed before Langevin dynamics can be
2949 used. The {\sc OpenMD} distribution contains a utitilty program called
2950 Hydro that performs this computation.
2951
2952 Once this tensor is known for a given {\tt integrableObject},
2953 obtaining a stochastic vector that has the properties in
2954 Eq. (\ref{eq:randomForce}) can be done efficiently by carrying out a
2955 one-time Cholesky decomposition to obtain the square root matrix of
2956 the resistance tensor,
2957 \begin{equation}
2958 \Xi_R = {\bf S} {\bf S}^{T},
2959 \label{eq:Cholesky}
2960 \end{equation}
2961 where ${\bf S}$ is a lower triangular matrix.\cite{Schlick2002} A
2962 vector with the statistics required for the random force can then be
2963 obtained by multiplying ${\bf S}$ onto a random 6-vector ${\bf Z}$ which
2964 has elements chosen from a Gaussian distribution, such that:
2965 \begin{equation}
2966 \langle {\bf Z}_i \rangle = 0, \hspace{1in} \langle {\bf Z}_i \cdot
2967 {\bf Z}_j \rangle = \frac{2 k_B T}{\delta t} \delta_{ij},
2968 \end{equation}
2969 where $\delta t$ is the timestep in use during the simulation. The
2970 random force, ${\bf F}_{r}^{~b} = {\bf S} {\bf Z}$, can be shown to have the
2971 correct properties required by Eq. (\ref{eq:randomForce}).
2972
2973 The equation of motion for the translational velocity of the center of
2974 mass (${\bf v}$) can be written as
2975 \begin{equation}
2976 m \dot{{\bf v}} (t) = {\bf f}_{s}(t) + {\bf f}_{f}(t) +
2977 {\bf f}_{r}(t)
2978 \end{equation}
2979 Since the frictional and random forces are applied at the center of
2980 resistance, which generally does not coincide with the center of mass,
2981 extra torques are exerted at the center of mass. Thus, the net
2982 body-fixed torque at the center of mass, $\tau^{~b}(t)$,
2983 is given by
2984 \begin{equation}
2985 \tau^{~b} \leftarrow \tau_{s}^{~b} + \tau_{f}^{~b} + \tau_{r}^{~b} + {\bf r}_{MR} \times \left( {\bf f}_{f}^{~b} + {\bf f}_{r}^{~b} \right)
2986 \end{equation}
2987 where ${\bf r}_{MR}$ is the vector from the center of mass to the center of
2988 resistance. Instead of integrating the angular velocity in lab-fixed
2989 frame, we consider the equation of motion for the angular momentum
2990 (${\bf j}$) in the body-fixed frame
2991 \begin{equation}
2992 \frac{\partial}{\partial t}{\bf j}(t) = \tau^{~b}(t)
2993 \end{equation}
2994 By embedding the friction and random forces into the the total force
2995 and torque, {\sc OpenMD} integrates the Langevin equations of motion
2996 for a rigid body of arbitrary shape in a velocity-Verlet style 2-part
2997 algorithm, where $h = \delta t$:
2998
2999 {\tt move A:}
3000 \begin{align*}
3001 {\bf v}\left(t + h / 2\right) &\leftarrow {\bf v}(t)
3002 + \frac{h}{2} \left( {\bf f}(t) / m \right), \\
3003 %
3004 {\bf r}(t + h) &\leftarrow {\bf r}(t)
3005 + h {\bf v}\left(t + h / 2 \right), \\
3006 %
3007 {\bf j}\left(t + h / 2 \right) &\leftarrow {\bf j}(t)
3008 + \frac{h}{2} {\bf \tau}^{~b}(t), \\
3009 %
3010 {\bf Q}(t + h) &\leftarrow \mathrm{rotate}\left( h {\bf j}
3011 (t + h / 2) \cdot \overleftrightarrow{\mathsf{I}}^{-1} \right).
3012 \end{align*}
3013 In this context, $\overleftrightarrow{\mathsf{I}}$ is the diagonal
3014 moment of inertia tensor, and the $\mathrm{rotate}$ function is the
3015 reversible product of the three body-fixed rotations,
3016 \begin{equation}
3017 \mathrm{rotate}({\bf a}) = \mathsf{G}_x(a_x / 2) \cdot
3018 \mathsf{G}_y(a_y / 2) \cdot \mathsf{G}_z(a_z) \cdot \mathsf{G}_y(a_y
3019 / 2) \cdot \mathsf{G}_x(a_x /2),
3020 \end{equation}
3021 where each rotational propagator, $\mathsf{G}_\alpha(\theta)$,
3022 rotates both the rotation matrix ($\mathbf{Q}$) and the body-fixed
3023 angular momentum (${\bf j}$) by an angle $\theta$ around body-fixed
3024 axis $\alpha$,
3025 \begin{equation}
3026 \mathsf{G}_\alpha( \theta ) = \left\{
3027 \begin{array}{lcl}
3028 \mathbf{Q}(t) & \leftarrow & \mathbf{Q}(0) \cdot \mathsf{R}_\alpha(\theta)^T, \\
3029 {\bf j}(t) & \leftarrow & \mathsf{R}_\alpha(\theta) \cdot {\bf
3030 j}(0).
3031 \end{array}
3032 \right.
3033 \end{equation}
3034 $\mathsf{R}_\alpha$ is a quadratic approximation to the single-axis
3035 rotation matrix. For example, in the small-angle limit, the
3036 rotation matrix around the body-fixed x-axis can be approximated as
3037 \begin{equation}
3038 \mathsf{R}_x(\theta) \approx \left(
3039 \begin{array}{ccc}
3040 1 & 0 & 0 \\
3041 0 & \frac{1-\theta^2 / 4}{1 + \theta^2 / 4} & -\frac{\theta}{1+
3042 \theta^2 / 4} \\
3043 0 & \frac{\theta}{1+ \theta^2 / 4} & \frac{1-\theta^2 / 4}{1 +
3044 \theta^2 / 4}
3045 \end{array}
3046 \right).
3047 \end{equation}
3048 All other rotations follow in a straightforward manner. After the
3049 first part of the propagation, the forces and body-fixed torques are
3050 calculated at the new positions and orientations. The system forces
3051 and torques are derivatives of the total potential energy function
3052 ($U$) with respect to the rigid body positions (${\bf r}$) and the
3053 columns of the transposed rotation matrix ${\bf Q}^T = \left({\bf
3054 u}_x, {\bf u}_y, {\bf u}_z \right)$:
3055
3056 {\tt Forces:}
3057 \begin{align*}
3058 {\bf f}_{s}(t + h) & \leftarrow
3059 - \left(\frac{\partial U}{\partial {\bf r}}\right)_{{\bf r}(t + h)} \\
3060 %
3061 {\bf \tau}_{s}(t + h) &\leftarrow {\bf u}(t + h)
3062 \times \frac{\partial U}{\partial {\bf u}} \\
3063 %
3064 {\bf v}^{b}_{R}(t+h) & \leftarrow \mathbf{Q}(t+h) \cdot \left({\bf v}(t+h) + {\bf \omega}(t+h) \times {\bf r}_{MR} \right) \\
3065 %
3066 {\bf f}_{R,f}^{b}(t+h) & \leftarrow - \Xi_{R}^{tt} \cdot
3067 {\bf v}^{b}_{R}(t+h) - \Xi_{R}^{rt} \cdot {\bf \omega}(t+h) \\
3068 %
3069 {\bf \tau}_{R,f}^{b}(t+h) & \leftarrow - \Xi_{R}^{tr} \cdot
3070 {\bf v}^{b}_{R}(t+h) - \Xi_{R}^{rr} \cdot {\bf \omega}(t+h) \\
3071 %
3072 Z & \leftarrow {\tt GaussianNormal}(2 k_B T / h, 6) \\
3073 {\bf F}_{R,r}^{b}(t+h) & \leftarrow {\bf S} \cdot Z \\
3074 %
3075 {\bf f}(t+h) & \leftarrow {\bf f}_{s}(t+h) + \mathbf{Q}^{T}(t+h)
3076 \cdot \left({\bf f}_{R,f}^{~b} + {\bf f}_{R,r}^{~b} \right) \\
3077 %
3078 \tau(t+h) & \leftarrow \tau_{s}(t+h) + \mathbf{Q}^{T}(t+h) \cdot \left(\tau_{R,f}^{~b} + \tau_{R,r}^{~b} \right) + {\bf r}_{MR} \times \left({\bf f}_{f}(t+h) + {\bf f}_{r}(t+h) \right) \\
3079 \tau^{~b}(t+h) & \leftarrow \mathbf{Q}(t+h) \cdot \tau(t+h) \\
3080 \end{align*}
3081 Frictional (and random) forces and torques must be computed at the
3082 center of resistance, so there are additional steps required to find
3083 the body-fixed velocity (${\bf v}_{R}^{~b}$) at this location. Mapping
3084 the frictional and random forces at the center of resistance back to
3085 the center of mass also introduces an additional term in the torque
3086 one obtains at the center of mass.
3087
3088 Once the forces and torques have been obtained at the new time step,
3089 the velocities can be advanced to the same time value.
3090
3091 {\tt move B:}
3092 \begin{align*}
3093 {\bf v}\left(t + h \right) &\leftarrow {\bf v}\left(t + h / 2
3094 \right)
3095 + \frac{h}{2} \left( {\bf f}(t + h) / m \right), \\
3096 %
3097 {\bf j}\left(t + h \right) &\leftarrow {\bf j}\left(t + h / 2
3098 \right)
3099 + \frac{h}{2} {\bf \tau}^{~b}(t + h) .
3100 \end{align*}
3101
3102 The viscosity of the implicit solvent must be specified using the {\tt
3103 viscosity} keyword in the meta-data file if the Langevin integrator is
3104 selected. For simple particles (spheres and ellipsoids), no further
3105 parameters are necessary. Since there are no analytic solutions for
3106 the resistance tensors for composite rigid bodies, the approximate
3107 tensors for these objects must also be specified in order to use
3108 Langevin dynamics. The meta-data file must therefore point to another
3109 file which contains the information about the hydrodynamic properties
3110 of all complex rigid bodies being used during the simulation. The
3111 {\tt HydroPropFile} keyword is used to specify the name of this
3112 file. A {\tt HydroPropFile} should be precalculated using the Hydro
3113 program that is included in the {\sc OpenMD} distribution.
3114
3115 \begin{longtable}[c]{ABG}
3116 \caption{Meta-data Keywords: Required parameters for the Langevin integrator}
3117 \\
3118 {\bf keyword} & {\bf units} & {\bf use} \\ \hline
3119 \endhead
3120 \hline
3121 \endfoot
3122 {\tt viscosity} & poise & Sets the value of viscosity of the implicit
3123 solvent \\
3124 {\tt targetTemp} & K & Sets the target temperature of the system.
3125 This parameter must be specified to use Langevin dynamics. \\
3126 {\tt HydroPropFile} & string & Specifies the name of the resistance
3127 tensor (usually a {\tt .diff} file) which is precalculated by {\tt
3128 Hydro}. This keyword is not necessary if the simulation contains only
3129 simple bodies (spheres and ellipsoids). \\
3130 {\tt beadSize} & $\mbox{\AA}$ & Sets the diameter of the beads to use
3131 when the {\tt RoughShell} model is used to approximate the resistance
3132 tensor.
3133 \label{table:ldParameters}
3134 \end{longtable}
3135
3136 \section{Constant Pressure without periodic boundary conditions (The LangevinHull)}
3137
3138 The Langevin Hull\cite{Vardeman2011} uses an external bath at a fixed constant pressure
3139 ($P$) and temperature ($T$) with an effective solvent viscosity
3140 ($\eta$). This bath interacts only with the objects on the exterior
3141 hull of the system. Defining the hull of the atoms in a simulation is
3142 done in a manner similar to the approach of Kohanoff, Caro and
3143 Finnis.\cite{Kohanoff:2005qm} That is, any instantaneous configuration
3144 of the atoms in the system is considered as a point cloud in three
3145 dimensional space. Delaunay triangulation is used to find all facets
3146 between coplanar
3147 neighbors.\cite{delaunay,springerlink:10.1007/BF00977785} In highly
3148 symmetric point clouds, facets can contain many atoms, but in all but
3149 the most symmetric of cases, the facets are simple triangles in
3150 3-space which contain exactly three atoms.
3151
3152 The convex hull is the set of facets that have {\it no concave
3153 corners} at an atomic site.\cite{Barber96,EDELSBRUNNER:1994oq} This
3154 eliminates all facets on the interior of the point cloud, leaving only
3155 those exposed to the bath. Sites on the convex hull are dynamic; as
3156 molecules re-enter the cluster, all interactions between atoms on that
3157 molecule and the external bath are removed. Since the edge is
3158 determined dynamically as the simulation progresses, no {\it a priori}
3159 geometry is defined. The pressure and temperature bath interacts only
3160 with the atoms on the edge and not with atoms interior to the
3161 simulation.
3162
3163 Atomic sites in the interior of the simulation move under standard
3164 Newtonian dynamics,
3165 \begin{equation}
3166 m_i \dot{\mathbf v}_i(t)=-{\mathbf \nabla}_i U,
3167 \label{eq:Newton}
3168 \end{equation}
3169 where $m_i$ is the mass of site $i$, ${\mathbf v}_i(t)$ is the
3170 instantaneous velocity of site $i$ at time $t$, and $U$ is the total
3171 potential energy. For atoms on the exterior of the cluster
3172 (i.e. those that occupy one of the vertices of the convex hull), the
3173 equation of motion is modified with an external force, ${\mathbf
3174 F}_i^{\mathrm ext}$:
3175 \begin{equation}
3176 m_i \dot{\mathbf v}_i(t)=-{\mathbf \nabla}_i U + {\mathbf F}_i^{\mathrm ext}.
3177 \end{equation}
3178
3179 The external bath interacts indirectly with the atomic sites through
3180 the intermediary of the hull facets. Since each vertex (or atom)
3181 provides one corner of a triangular facet, the force on the facets are
3182 divided equally to each vertex. However, each vertex can participate
3183 in multiple facets, so the resultant force is a sum over all facets
3184 $f$ containing vertex $i$:
3185 \begin{equation}
3186 {\mathbf F}_{i}^{\mathrm ext} = \sum_{\begin{array}{c}\mathrm{facets\
3187 } f \\ \mathrm{containing\ } i\end{array}} \frac{1}{3}\ {\mathbf
3188 F}_f^{\mathrm ext}
3189 \end{equation}
3190
3191 The external pressure bath applies a force to the facets of the convex
3192 hull in direct proportion to the area of the facet, while the thermal
3193 coupling depends on the solvent temperature, viscosity and the size
3194 and shape of each facet. The thermal interactions are expressed as a
3195 standard Langevin description of the forces,
3196 \begin{equation}
3197 \begin{array}{rclclcl}
3198 {\mathbf F}_f^{\text{ext}} & = & \text{external pressure} & + & \text{drag force} & + & \text{random force} \\
3199 & = & -\hat{n}_f P A_f & - & \Xi_f(t) {\mathbf v}_f(t) & + & {\mathbf R}_f(t)
3200 \end{array}
3201 \end{equation}
3202 Here, $A_f$ and $\hat{n}_f$ are the area and (outward-facing) normal
3203 vectors for facet $f$, respectively. ${\mathbf v}_f(t)$ is the
3204 velocity of the facet centroid,
3205 \begin{equation}
3206 {\mathbf v}_f(t) = \frac{1}{3} \sum_{i=1}^{3} {\mathbf v}_i,
3207 \end{equation}
3208 and $\Xi_f(t)$ is an approximate ($3 \times 3$) resistance tensor that
3209 depends on the geometry and surface area of facet $f$ and the
3210 viscosity of the bath. The resistance tensor is related to the
3211 fluctuations of the random force, $\mathbf{R}(t)$, by the
3212 fluctuation-dissipation theorem (see Eq. \ref{eq:randomForce}).
3213
3214 Once the resistance tensor is known for a given facet, a stochastic
3215 vector that has the properties in Eq. (\ref{eq:randomForce}) can be
3216 calculated efficiently by carrying out a Cholesky decomposition to
3217 obtain the square root matrix of the resistance tensor (see
3218 Eq. \ref{eq:Cholesky}).
3219
3220 Our treatment of the resistance tensor for the Langevin Hull facets is
3221 approximate. $\Xi_f$ for a rigid triangular plate would normally be
3222 treated as a $6 \times 6$ tensor that includes translational and
3223 rotational drag as well as translational-rotational coupling. The
3224 computation of resistance tensors for rigid bodies has been detailed
3225 elsewhere,\cite{JoseGarciadelaTorre02012000,Garcia-de-la-Torre:2001wd,GarciadelaTorreJ2002,Sun:2008fk}
3226 but the standard approach involving bead approximations would be
3227 prohibitively expensive if it were recomputed at each step in a
3228 molecular dynamics simulation.
3229
3230 Instead, we are utilizing an approximate resistance tensor obtained by
3231 first constructing the Oseen tensor for the interaction of the
3232 centroid of the facet ($f$) with each of the subfacets $\ell=1,2,3$,
3233 \begin{equation}
3234 T_{\ell f}=\frac{A_\ell}{8\pi\eta R_{\ell f}}\left(I +
3235 \frac{\mathbf{R}_{\ell f}\mathbf{R}_{\ell f}^T}{R_{\ell f}^2}\right)
3236 \end{equation}
3237 Here, $A_\ell$ is the area of subfacet $\ell$ which is a triangle
3238 containing two of the vertices of the facet along with the centroid.
3239 $\mathbf{R}_{\ell f}$ is the vector between the centroid of facet $f$
3240 and the centroid of sub-facet $\ell$, and $I$ is the ($3 \times 3$)
3241 identity matrix. $\eta$ is the viscosity of the external bath.
3242
3243 The tensors for each of the sub-facets are added together, and the
3244 resulting matrix is inverted to give a $3 \times 3$ resistance tensor
3245 for translations of the triangular facet,
3246 \begin{equation}
3247 \Xi_f(t) =\left[\sum_{i=1}^3 T_{if}\right]^{-1}.
3248 \end{equation}
3249 Note that this treatment ignores rotations (and
3250 translational-rotational coupling) of the facet. In compact systems,
3251 the facets stay relatively fixed in orientation between
3252 configurations, so this appears to be a reasonably good approximation.
3253
3254 At each
3255 molecular dynamics time step, the following process is carried out:
3256 \begin{enumerate}
3257 \item The standard inter-atomic forces ($\nabla_iU$) are computed.
3258 \item Delaunay triangulation is carried out using the current atomic
3259 configuration.
3260 \item The convex hull is computed and facets are identified.
3261 \item For each facet:
3262 \begin{itemize}
3263 \item[a.] The force from the pressure bath ($-\hat{n}_fPA_f$) is
3264 computed.
3265 \item[b.] The resistance tensor ($\Xi_f(t)$) is computed using the
3266 viscosity ($\eta$) of the bath.
3267 \item[c.] Facet drag ($-\Xi_f(t) \mathbf{v}_f(t)$) forces are
3268 computed.
3269 \item[d.] Random forces ($\mathbf{R}_f(t)$) are computed using the
3270 resistance tensor and the temperature ($T$) of the bath.
3271 \end{itemize}
3272 \item The facet forces are divided equally among the vertex atoms.
3273 \item Atomic positions and velocities are propagated.
3274 \end{enumerate}
3275 The Delaunay triangulation and computation of the convex hull are done
3276 using calls to the qhull library,\cite{Qhull} and for this reason, if
3277 qhull is not detected during the build, the Langevin Hull integrator
3278 will not be available. There is a minimal penalty for computing the
3279 convex hull and resistance tensors at each step in the molecular
3280 dynamics simulation (roughly 0.02 $\times$ cost of a single force
3281 evaluation).
3282
3283 \begin{longtable}[c]{GBF}
3284 \caption{Meta-data Keywords: Required parameters for the Langevin Hull integrator}
3285 \\
3286 {\bf keyword} & {\bf units} & {\bf use} \\ \hline
3287 \endhead
3288 \hline
3289 \endfoot
3290 {\tt viscosity} & poise & Sets the value of viscosity of the implicit
3291 solven . \\
3292 {\tt targetTemp} & K & Sets the target temperature of the system.
3293 This parameter must be specified to use Langevin Hull dynamics. \\
3294 {\tt targetPressure} & atm & Sets the target pressure of the system.
3295 This parameter must be specified to use Langevin Hull dynamics. \\
3296 {\tt usePeriodicBoundaryConditions} & logical & Turns off periodic boundary conditions.
3297 This parameter must be set to \tt false \\
3298 \label{table:lhullParameters}
3299 \end{longtable}
3300
3301
3302 \section{\label{sec:constraints}Constraint Methods}
3303
3304 \subsection{\label{section:rattle}The {\sc rattle} Method for Bond
3305 Constraints}
3306
3307 In order to satisfy the constraints of fixed bond lengths within {\sc
3308 OpenMD}, we have implemented the {\sc rattle} algorithm of
3309 Andersen.\cite{andersen83} {\sc rattle} is a velocity-Verlet
3310 formulation of the {\sc shake} method\cite{ryckaert77} for iteratively
3311 solving the Lagrange multipliers which maintain the holonomic
3312 constraints. Both methods are covered in depth in the
3313 literature,\cite{leach01:mm,Allen87} and a detailed description of
3314 this method would be redundant.
3315
3316 \subsection{\label{section:zcons}The Z-Constraint Method}
3317
3318 A force auto-correlation method based on the fluctuation-dissipation
3319 theorem was developed by Roux and Karplus to investigate the dynamics
3320 of ions inside ion channels.\cite{Roux91} The time-dependent friction
3321 coefficient can be calculated from the deviation of the instantaneous
3322 force from its mean value:
3323 \begin{equation}
3324 \xi(z,t)=\langle\delta F(z,t)\delta F(z,0)\rangle/k_{B}T,
3325 \end{equation}
3326 where%
3327 \begin{equation}
3328 \delta F(z,t)=F(z,t)-\langle F(z,t)\rangle.
3329 \end{equation}
3330
3331 If the time-dependent friction decays rapidly, the static friction
3332 coefficient can be approximated by
3333 \begin{equation}
3334 \xi_{\text{static}}(z)=\int_{0}^{\infty}\langle\delta F(z,t)\delta F(z,0)\rangle dt.
3335 \end{equation}
3336
3337 This allows the diffusion constant to then be calculated through the
3338 Einstein relation:\cite{Marrink94}
3339 \begin{equation}
3340 D(z)=\frac{k_{B}T}{\xi_{\text{static}}(z)}=\frac{(k_{B}T)^{2}}{\int_{0}^{\infty
3341 }\langle\delta F(z,t)\delta F(z,0)\rangle dt}.%
3342 \end{equation}
3343
3344 The Z-Constraint method, which fixes the $z$ coordinates of a few
3345 ``tagged'' molecules with respect to the center of the mass of the
3346 system is a technique that was proposed to obtain the forces required
3347 for the force auto-correlation calculation.\cite{Marrink94} However,
3348 simply resetting the coordinate will move the center of the mass of
3349 the whole system. To avoid this problem, we have developed a new
3350 method that is utilized in {\sc OpenMD}. Instead of resetting the
3351 coordinates, we reset the forces of $z$-constrained molecules and
3352 subtract the total constraint forces from the rest of the system after
3353 the force calculation at each time step.
3354
3355 After the force calculation, the total force on molecule $\alpha$ is:
3356 \begin{equation}
3357 G_{\alpha} = \sum_i F_{\alpha i},
3358 \label{eq:zc1}
3359 \end{equation}
3360 where $F_{\alpha i}$ is the force in the $z$ direction on atom $i$ in
3361 $z$-constrained molecule $\alpha$. The forces on the atoms in the
3362 $z$-constrained molecule are then adjusted to remove the total force
3363 on molecule $\alpha$:
3364 \begin{equation}
3365 F_{\alpha i} = F_{\alpha i} -
3366 \frac{m_{\alpha i} G_{\alpha}}{\sum_i m_{\alpha i}}.
3367 \end{equation}
3368 Here, $m_{\alpha i}$ is the mass of atom $i$ in the $z$-constrained
3369 molecule. After the forces have been adjusted, the velocities must
3370 also be modified to subtract out molecule $\alpha$'s center-of-mass
3371 velocity in the $z$ direction.
3372 \begin{equation}
3373 v_{\alpha i} = v_{\alpha i} -
3374 \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}},
3375 \end{equation}
3376 where $v_{\alpha i}$ is the velocity of atom $i$ in the $z$ direction.
3377 Lastly, all of the accumulated constraint forces must be subtracted
3378 from the rest of the unconstrained system to keep the system center of
3379 mass of the entire system from drifting.
3380 \begin{equation}
3381 F_{\beta i} = F_{\beta i} - \frac{m_{\beta i} \sum_{\alpha} G_{\alpha}}
3382 {\sum_{\beta}\sum_i m_{\beta i}},
3383 \end{equation}
3384 where $\beta$ denotes all {\it unconstrained} molecules in the
3385 system. Similarly, the velocities of the unconstrained molecules must
3386 also be scaled:
3387 \begin{equation}
3388 v_{\beta i} = v_{\beta i} + \sum_{\alpha} \frac{\sum_i m_{\alpha i}
3389 v_{\alpha i}}{\sum_i m_{\alpha i}}.
3390 \end{equation}
3391
3392 This method will pin down the centers-of-mass of all of the
3393 $z$-constrained molecules, and will also keep the entire system fixed
3394 at the original system center-of-mass location.
3395
3396 At the very beginning of the simulation, the molecules may not be at
3397 their desired positions. To steer a $z$-constrained molecule to its
3398 specified position, a simple harmonic potential is used:
3399 \begin{equation}
3400 U(t)=\frac{1}{2}k_{\text{Harmonic}}(z(t)-z_{\text{cons}})^{2},%
3401 \end{equation}
3402 where $k_{\text{Harmonic}}$ is an harmonic force constant, $z(t)$ is
3403 the current $z$ coordinate of the center of mass of the constrained
3404 molecule, and $z_{\text{cons}}$ is the desired constraint
3405 position. The harmonic force operating on the $z$-constrained molecule
3406 at time $t$ can be calculated by
3407 \begin{equation}
3408 F_{z_{\text{Harmonic}}}(t)=-\frac{\partial U(t)}{\partial z(t)}=
3409 -k_{\text{Harmonic}}(z(t)-z_{\text{cons}}).
3410 \end{equation}
3411
3412 The user may also specify the use of a constant velocity method
3413 (steered molecular dynamics) to move the molecules to their desired
3414 initial positions. Based on concepts from atomic force microscopy,
3415 {\sc smd} has been used to study many processes which occur via rare
3416 events on the time scale of a few hundreds of picoseconds. For
3417 example,{\sc smd} has been used to observe the dissociation of
3418 Streptavidin-biotin Complex.\cite{smd}
3419
3420 To use of the $z$-constraint method in an {\sc OpenMD} simulation, the
3421 molecules must be specified using the {\tt nZconstraints} keyword in
3422 the meta-data file. The other parameters for modifying the behavior
3423 of the $z$-constraint method are listed in table~\ref{table:zconParams}.
3424
3425 \begin{longtable}[c]{ABCD}
3426 \caption{Meta-data Keywords: Z-Constraint Parameters}
3427 \\
3428 {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
3429 \endhead
3430 \hline
3431 \endfoot
3432 {\tt zconsTime} & fs & Sets the frequency at which the {\tt .fz} file
3433 is written & \\
3434 {\tt zconsForcePolicy} & string & The strategy for subtracting
3435 the $z$-constraint force from the {\it unconstrained} molecules & Possible
3436 strategies are {\tt BYMASS} and {\tt BYNUMBER}. The default
3437 strategy is {\tt BYMASS}\\
3438 {\tt zconsGap} & $\mbox{\AA}$ & Sets the distance between two adjacent
3439 constraint positions&Used mainly to move molecules through a
3440 simulation to estimate potentials of mean force. \\
3441 {\tt zconsFixtime} & fs & Sets the length of time the $z$-constraint
3442 molecule is held fixed & {\tt zconsFixtime} must be set if {\tt
3443 zconsGap} is set\\
3444 {\tt zconsUsingSMD} & logical & Flag for using Steered Molecular
3445 Dynamics to move the molecules to the correct constrained positions &
3446 Harmonic Forces are used by default
3447 \label{table:zconParams}
3448 \end{longtable}
3449
3450 % \chapter{\label{section:restraints}Restraints}
3451 % Restraints are external potentials that are added to a system to
3452 % keep particular molecules or collections of particles close to some
3453 % reference structure. A restraint can be a collective
3454
3455 \chapter{\label{section:thermInt}Thermodynamic Integration}
3456
3457 Thermodynamic integration is an established technique that has been
3458 used extensively in the calculation of free energies for condensed
3459 phases of
3460 materials.\cite{Frenkel84,Hermens88,Meijer90,Baez95a,Vlot99}. This
3461 method uses a sequence of simulations during which the system of
3462 interest is converted into a reference system for which the free
3463 energy is known analytically ($A_0$). The difference in potential
3464 energy between the reference system and the system of interest
3465 ($\Delta V$) is then integrated in order to determine the free energy
3466 difference between the two states:
3467 \begin{equation}
3468 A = A_0 + \int_0^1 \left\langle \Delta V \right\rangle_\lambda
3469 d\lambda.
3470 \label{eq:thermInt}
3471 \end{equation}
3472 Here, $\lambda$ is the parameter that governs the transformation
3473 between the reference system and the system of interest. For
3474 crystalline phases, an harmonically-restrained (Einstein) crystal is
3475 chosen as the reference state, while for liquid phases, the ideal gas
3476 is taken as the reference state.
3477
3478 In an Einstein crystal, the molecules are restrained at their ideal
3479 lattice locations and orientations. Using harmonic restraints, as
3480 applied by B\`{a}ez and Clancy, the total potential for this reference
3481 crystal ($V_\mathrm{EC}$) is the sum of all the harmonic restraints,
3482 \begin{equation}
3483 V_\mathrm{EC} = \sum_{i} \left[ \frac{K_\mathrm{v}}{2} (r_i - r_i^\circ)^2 +
3484 \frac{K_\theta}{2} (\theta_i - \theta_i^\circ)^2 +
3485 \frac{K_\omega}{2}(\omega_i - \omega_i^\circ)^2 \right],
3486 \end{equation}
3487 where $K_\mathrm{v}$, $K_\mathrm{\theta}$, and $K_\mathrm{\omega}$ are
3488 the spring constants restraining translational motion and deflection
3489 of and rotation around the principle axis of the molecule
3490 respectively. The values of $\theta$ range from $0$ to $\pi$, while
3491 $\omega$ ranges from $-\pi$ to $\pi$.
3492
3493 The partition function for a molecular crystal restrained in this
3494 fashion can be evaluated analytically, and the Helmholtz Free Energy
3495 ({\it A}) is given by
3496 \begin{eqnarray}
3497 \frac{A}{N} = \frac{E_m}{N}\ -\ kT\ln \left (\frac{kT}{h\nu}\right )^3&-&kT\ln \left
3498 [\pi^\frac{1}{2}\left (\frac{8\pi^2I_\mathrm{A}kT}{h^2}\right
3499 )^\frac{1}{2}\left (\frac{8\pi^2I_\mathrm{B}kT}{h^2}\right
3500 )^\frac{1}{2}\left (\frac{8\pi^2I_\mathrm{C}kT}{h^2}\right
3501 )^\frac{1}{2}\right ] \nonumber \\ &-& kT\ln \left [\frac{kT}{2(\pi
3502 K_\omega K_\theta)^{\frac{1}{2}}}\exp\left
3503 (-\frac{kT}{2K_\theta}\right)\int_0^{\left (\frac{kT}{2K_\theta}\right
3504 )^\frac{1}{2}}\exp(t^2)\mathrm{d}t\right ],
3505 \label{ecFreeEnergy}
3506 \end{eqnarray}
3507 where $2\pi\nu = (K_\mathrm{v}/m)^{1/2}$, and $E_m$ is the minimum
3508 potential energy of the ideal crystal.\cite{Baez95a}
3509
3510 {\sc OpenMD} can perform the simulations that aid the user in
3511 constructing the thermodynamic path from the molecular system to one
3512 of the reference systems. To do this, the user sets the value of
3513 $\lambda$ (between 0 \& 1) in the meta-data file. If the system of
3514 interest is crystalline, {\sc OpenMD} must be able to find the {\it
3515 reference} configuration of the system in a file called {\tt
3516 idealCrystal.in} in the directory from which the simulation was run.
3517 This file is a standard {\tt .dump} file, but all information about
3518 velocities and angular momenta are discarded when the file is read.
3519
3520 The configuration found in the {\tt idealCrystal.in} file is used for
3521 the reference positions and molecular orientations of the Einstein
3522 crystal. To complete the specification of the Einstein crystal, a set
3523 of force constants must also be specified; one for displacments of the
3524 molecular centers of mass, and two for displacements from the ideal
3525 orientations of the molecules.
3526
3527 To construct a thermodynamic integration path, the user would run a
3528 sequence of $N$ simulations, each with a different value of lambda
3529 between $0$ and $1$. When {\tt useSolidThermInt} is set to {\tt true}
3530 in the meta-data file, two additional energy columns are reported in
3531 the {\tt .stat} file for the simulation. The first, {\tt vRaw}, is
3532 the unperturbed energy for the configuration, and the second, {\tt
3533 vHarm}, is the energy of the harmonic (Einstein) system in an
3534 identical configuration. The total potential energy of the
3535 configuration is a linear combination of {\tt vRaw} and {\tt vHarm}
3536 weighted by the value of $\lambda$.
3537
3538 From a running average of the difference between {\tt vRaw} and {\tt
3539 vHarm}, the user can obtain the integrand in Eq. (\ref{eq:thermInt})
3540 for fixed value of $\lambda$.
3541
3542 There are two additional files with the suffixes {\tt .zang0} and {\tt
3543 .zang} generated by {\sc OpenMD} during the first run of a solid
3544 thermodynamic integration. These files contain the initial ({\tt
3545 .zang0}) and final ({\tt .zang}) values of the angular displacement
3546 coordinates for each of the molecules. These are particularly useful
3547 when chaining a number of simulations (with successive values of
3548 $\lambda$) together.
3549
3550 For {\it liquid} thermodynamic integrations, the reference system is
3551 the ideal gas (with a potential exactly equal to 0), so the {\tt
3552 .stat} file contains only the standard columns. The potential energy
3553 column contains the potential of the {\it unperturbed} system (and not
3554 the $\lambda$-weighted potential. This allows the user to use the
3555 potential energy directly as the $\Delta V$ in the integrand of
3556 Eq. (\ref{eq:thermInt}).
3557
3558 Meta-data parameters concerning thermodynamic integrations are given in
3559 Table~\ref{table:thermIntParams}
3560
3561 \begin{longtable}[c]{ABCD}
3562 \caption{Meta-data Keywords: Thermodynamic Integration Parameters}
3563 \\
3564 {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
3565 \endhead
3566 \hline
3567 \endfoot
3568 {\tt useSolidThermInt} & logical & perform thermodynamic integration
3569 to an Einstein crystal? & default is ``false'' \\
3570 {\tt useLiquidThermInt} & logical & perform thermodynamic integration
3571 to an ideal gas? & default is ``false'' \\
3572 {\tt thermodynamicIntegrationLambda} & & & \\
3573 & double & transformation
3574 parameter & Sets how far along the thermodynamic integration path the
3575 simulation will be. \\
3576 {\tt thermodynamicIntegrationK} & & & \\
3577 & double & & power of $\lambda$
3578 governing shape of integration pathway \\
3579 {\tt thermIntDistSpringConst} & & & \\
3580 & $\mbox{kcal~mol}^{-1} \mbox{\AA}^{-2}$
3581 & & spring constant for translations in Einstein crystal \\
3582 {\tt thermIntThetaSpringConst} & & & \\
3583 & $\mbox{kcal~mol}^{-1}
3584 \mbox{rad}^{-2}$ & & spring constant for deflection away from z-axis
3585 in Einstein crystal \\
3586 {\tt thermIntOmegaSpringConst} & & & \\
3587 & $\mbox{kcal~mol}^{-1}
3588 \mbox{rad}^{-2}$ & & spring constant for rotation around z-axis in
3589 Einstein crystal
3590 \label{table:thermIntParams}
3591 \end{longtable}
3592
3593 \chapter{\label{section:rnemd}Reverse Non-Equilibrium Molecular Dynamics (RNEMD)}
3594
3595 There are many ways to compute transport properties from molecular
3596 dynamics simulations. Equilibrium Molecular Dynamics (EMD)
3597 simulations can be used by computing relevant time correlation
3598 functions and assuming linear response theory holds. For some transport properties (notably thermal conductivity), EMD approaches
3599 are subject to noise and poor convergence of the relevant
3600 correlation functions. Traditional Non-equilibrium Molecular Dynamics
3601 (NEMD) methods impose a gradient (e.g. thermal or momentum) on a
3602 simulation. However, the resulting flux is often difficult to
3603 measure. Furthermore, problems arise for NEMD simulations of
3604 heterogeneous systems, such as phase-phase boundaries or interfaces,
3605 where the type of gradient to enforce at the boundary between
3606 materials is unclear.
3607
3608 {\it Reverse} Non-Equilibrium Molecular Dynamics (RNEMD) methods adopt
3609 a different approach in that an unphysical {\it flux} is imposed
3610 between different regions or ``slabs'' of the simulation box. The
3611 response of the system is to develop a temperature or momentum {\it
3612 gradient} between the two regions. Since the amount of the applied
3613 flux is known exactly, and the measurement of gradient is generally
3614 less complicated, imposed-flux methods typically take shorter
3615 simulation times to obtain converged results for transport properties.
3616
3617 \begin{figure}
3618 \includegraphics[width=\linewidth]{rnemdDemo}
3619 \caption{The (VSS) RNEMD approach imposes unphysical transfer of both
3620 linear momentum and kinetic energy between a ``hot'' slab and a
3621 ``cold'' slab in the simulation box. The system responds to this
3622 imposed flux by generating both momentum and temperature gradients.
3623 The slope of the gradients can then be used to compute transport
3624 properties (e.g. shear viscosity and thermal conductivity).}
3625 \label{rnemdDemo}
3626 \end{figure}
3627
3628 \section{\label{section:algo}Three algorithms for carrying out RNEMD simulations}
3629 \subsection{\label{subsection:swapping}The swapping algorithm}
3630 The original ``swapping'' approaches by M\"{u}ller-Plathe {\it et
3631 al.}\cite{ISI:000080382700030,MullerPlathe:1997xw} can be understood
3632 as a sequence of imaginary elastic collisions between particles in
3633 opposite slabs. In each collision, the entire momentum vectors of
3634 both particles may be exchanged to generate a thermal
3635 flux. Alternatively, a single component of the momentum vectors may be
3636 exchanged to generate a shear flux. This algorithm turns out to be
3637 quite useful in many simulations. However, the M\"{u}ller-Plathe
3638 swapping approach perturbs the system away from ideal
3639 Maxwell-Boltzmann distributions, and this may leads to undesirable
3640 side-effects when the applied flux becomes large.\cite{Maginn:2010}
3641 This limits the applicability of the swapping algorithm, so in OpenMD,
3642 we have implemented two additional algorithms for RNEMD in addition to the
3643 original swapping approach.
3644
3645 \subsection{\label{subsection:nivs}Non-Isotropic Velocity Scaling (NIVS)}
3646 Instead of having momentum exchange between {\it individual particles}
3647 in each slab, the NIVS algorithm applies velocity scaling to all of
3648 the selected particles in both slabs.\cite{kuang:164101} A combination of linear
3649 momentum, kinetic energy, and flux constraint equations governs the
3650 amount of velocity scaling performed at each step. Interested readers
3651 should consult ref. \citealp{kuang:164101} for further details on the
3652 methodology.
3653
3654 NIVS has been shown to be very effective at producing thermal
3655 gradients and for computing thermal conductivities, particularly for
3656 heterogeneous interfaces. Although the NIVS algorithm can also be
3657 applied to impose a directional momentum flux, thermal anisotropy was
3658 observed in relatively high flux simulations, and the method is not
3659 suitable for imposing a shear flux or for computing shear viscosities.
3660
3661 \subsection{\label{subsection:vss}Velocity Shearing and Scaling (VSS)}
3662 The third RNEMD algorithm implemented in OpenMD utilizes a series of
3663 simultaneous velocity shearing and scaling exchanges between the two
3664 slabs.\cite{2012MolPh.110..691K} This method results in a set of simpler equations to satisfy
3665 the conservation constraints while creating a desired flux between the
3666 two slabs.
3667
3668 The VSS approach is versatile in that it may be used to implement both
3669 thermal and shear transport either separately or simultaneously.
3670 Perturbations of velocities away from the ideal Maxwell-Boltzmann
3671 distributions are minimal, and thermal anisotropy is kept to a
3672 minimum. This ability to generate simultaneous thermal and shear
3673 fluxes has been utilized to map out the shear viscosity of SPC/E water
3674 over a wide range of temperatures (90~K) just with a single simulation.
3675 VSS-RNEMD also allows the directional momentum flux to have
3676 arbitary directions, which could aid in the study of anisotropic solid
3677 surfaces in contact with liquid environments.
3678
3679 \section{\label{section:usingRNEMD}Using OpenMD to perform a RNEMD simulation}
3680 \subsection{\label{section:rnemdParams} What the user needs to specify}
3681 To carry out a RNEMD simulation,
3682 a user must specify a number of parameters in the MetaData (.md) file.
3683 Because the RNEMD methods have a large number of parameters, these
3684 must be enclosed in a {\it separate} {\tt RNEMD\{...\}} block. The most important
3685 parameters to specify are the {\tt useRNEMD}, {\tt fluxType} and flux
3686 parameters. Most other parameters (summarized in table
3687 \ref{table:rnemd}) have reasonable default values. {\tt fluxType}
3688 sets up the kind of exchange that will be carried out between the two
3689 slabs (either Kinetic Energy ({\tt KE}) or momentum ({\tt Px, Py, Pz,
3690 Pvector}), or some combination of these). The flux is specified
3691 with the use of three possible parameters: {\tt kineticFlux} for
3692 kinetic energy exchange, as well as {\tt momentumFlux} or {\tt
3693 momentumFluxVector} for simulations with directional exchange.
3694
3695 \subsection{\label{section:rnemdResults} Processing the results}
3696 OpenMD will generate a {\tt .rnemd}
3697 file with the same prefix as the original {\tt .md} file. This file
3698 contains a running average of properties of interest computed within a
3699 set of bins that divide the simulation cell along the $z$-axis. The
3700 first column of the {\tt .rnemd} file is the $z$ coordinate of the
3701 center of each bin, while following columns may contain the average
3702 temperature, velocity, or density within each bin. The output format
3703 in the {\tt .rnemd} file can be altered with the {\tt outputFields},
3704 {\tt outputBins}, and {\tt outputFileName} parameters. A report at
3705 the top of the {\tt .rnemd} file contains the current exchange totals
3706 as well as the average flux applied during the simulation. Using the
3707 slope of the temperature or velocity gradient obtaine from the {\tt
3708 .rnemd} file along with the applied flux, the user can very simply
3709 arrive at estimates of thermal conductivities ($\lambda$),
3710 \begin{equation}
3711 J_z = -\lambda \frac{\partial T}{\partial z},
3712 \end{equation}
3713 and shear viscosities ($\eta$),
3714 \begin{equation}
3715 j_z(p_x) = -\eta \frac{\partial \langle v_x \rangle}{\partial z}.
3716 \end{equation}
3717 Here, the quantities on the left hand side are the actual flux values
3718 (in the header of the {\tt .rnemd} file), while the slopes are
3719 obtained from linear fits to the gradients observed in the {\tt
3720 .rnemd} file.
3721
3722 More complicated simulations (including interfaces) require a bit more
3723 care. Here the second derivative may be required to compute the
3724 interfacial thermal conductance,
3725 \begin{align}
3726 G^\prime &= \left(\nabla\lambda \cdot \mathbf{\hat{n}}\right)_{z_0} \\
3727 &= \frac{\partial}{\partial z}\left(-\frac{J_z}{
3728 \left(\frac{\partial T}{\partial z}\right)}\right)_{z_0} \\
3729 &= J_z\left(\frac{\partial^2 T}{\partial z^2}\right)_{z_0} \Big/
3730 \left(\frac{\partial T}{\partial z}\right)_{z_0}^2.
3731 \label{derivativeG}
3732 \end{align}
3733 where $z_0$ is the location of the interface between two materials and
3734 $\mathbf{\hat{n}}$ is a unit vector normal to the interface. We
3735 suggest that users interested in interfacial conductance consult
3736 reference \citealp{kuang:AuThl} for other approaches to computing $G$.
3737 Users interested in {\it friction coefficients} at heterogeneous
3738 interfaces may also find reference \citealp{2012MolPh.110..691K}
3739 useful.
3740
3741 \newpage
3742
3743 \begin{longtable}[c]{JKLM}
3744 \caption{Meta-data Keywords: Parameters for RNEMD simulations}\\
3745 \multicolumn{4}{c}{The following keywords must be enclosed inside a {\tt RNEMD\{...\}} block.}
3746 \\ \hline
3747 {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
3748 \endhead
3749 \hline
3750 \endfoot
3751 {\tt useRNEMD} & logical & perform RNEMD? & default is ``false'' \\
3752 {\tt objectSelection} & string & see section \ref{section:syntax}
3753 for selection syntax & default is ``select all'' \\
3754 {\tt method} & string & exchange method & one of the following:
3755 {\tt Swap, NIVS,} or {\tt VSS} (default is {\tt VSS}) \\
3756 {\tt fluxType} & string & what is being exchanged between slabs? & one
3757 of the following: {\tt KE, Px, Py, Pz, Pvector, KE+Px, KE+Py, KE+Pvector} \\
3758 {\tt kineticFlux} & kcal mol$^{-1}$ \AA$^{-2}$ fs$^{-1}$ & specify the kinetic energy flux & \\
3759 {\tt momentumFlux} & amu \AA$^{-1}$ fs$^{-2}$ & specify the momentum flux & \\
3760 {\tt momentumFluxVector} & amu \AA$^{-1}$ fs$^{-2}$ & specify the momentum flux when
3761 {\tt Pvector} is part of the exchange & Vector3d input\\
3762 {\tt exchangeTime} & fs & how often to perform the exchange & default is 100 fs\\
3763
3764 {\tt slabWidth} & $\mbox{\AA}$ & width of the two exchange slabs & default is $\mathsf{H}_{zz} / 10.0$ \\
3765 {\tt slabAcenter} & $\mbox{\AA}$ & center of the end slab & default is 0 \\
3766 {\tt slabBcenter} & $\mbox{\AA}$ & center of the middle slab & default is $\mathsf{H}_{zz} / 2$ \\
3767 {\tt outputFileName} & string & file name for output histograms & default is the same prefix as the
3768 .md file, but with the {\tt .rnemd} extension \\
3769 {\tt outputBins} & int & number of $z$-bins in the output histogram &
3770 default is 20 \\
3771 {\tt outputFields} & string & columns to print in the {\tt .rnemd}
3772 file where each column is separated by a pipe ($\mid$) symbol. & Allowed column names are: {\sc z, temperature, velocity, density} \\
3773 \label{table:rnemd}
3774 \end{longtable}
3775
3776 \chapter{\label{section:minimizer}Energy Minimization}
3777
3778 Energy minimization is used to identify local configurations that are stable
3779 points on the potential energy surface. There is a vast literature on
3780 energy minimization algorithms have been developed to search for the
3781 global energy minimum as well as to find local structures which are
3782 stable fixed points on the surface. We have included two simple
3783 minimization algorithms: steepest descent, ({\sc sd}) and conjugate
3784 gradient ({\sc cg}) to help users find reasonable local minima from
3785 their initial configurations. Since {\sc OpenMD} handles atoms and
3786 rigid bodies which have orientational coordinates as well as
3787 translational coordinates, there is some subtlety to the choice of
3788 parameters for minimization algorithms.
3789
3790 Given a coordinate set $x_{k}$ and a search direction $d_{k}$, a line
3791 search algorithm is performed along $d_{k}$ to produce
3792 $x_{k+1}=x_{k}+$ $\lambda _{k}d_{k}$. In the steepest descent ({\sc
3793 sd}) algorithm,%
3794 \begin{equation}
3795 d_{k}=-\nabla V(x_{k}).
3796 \end{equation}
3797 The gradient and the direction of next step are always orthogonal.
3798 This may cause oscillatory behavior in narrow valleys. To overcome
3799 this problem, the Fletcher-Reeves variant~\cite{FletcherReeves} of the
3800 conjugate gradient ({\sc cg}) algorithm is used to generate $d_{k+1}$
3801 via simple recursion:
3802 \begin{equation}
3803 d_{k+1} =-\nabla V(x_{k+1})+\gamma_{k}d_{k}
3804 \end{equation}
3805 where
3806 \begin{equation}
3807 \gamma_{k} =\frac{\nabla V(x_{k+1})^{T}\nabla V(x_{k+1})}{\nabla
3808 V(x_{k})^{T}\nabla V(x_{k})}.
3809 \end{equation}
3810
3811 The Polak-Ribiere variant~\cite{PolakRibiere} of the conjugate
3812 gradient ($\gamma_{k}$) is defined as%
3813 \begin{equation}
3814 \gamma_{k}=\frac{[\nabla V(x_{k+1})-\nabla V(x)]^{T}\nabla V(x_{k+1})}{\nabla
3815 V(x_{k})^{T}\nabla V(x_{k})}%
3816 \end{equation}
3817 It is widely agreed that the Polak-Ribiere variant gives better
3818 convergence than the Fletcher-Reeves variant, so the conjugate
3819 gradient approach implemented in {\sc OpenMD} is the Polak-Ribiere
3820 variant.
3821
3822 The conjugate gradient method assumes that the conformation is close
3823 enough to a local minimum that the potential energy surface is very
3824 nearly quadratic. When the initial structure is far from the minimum,
3825 the steepest descent method can be superior to the conjugate gradient
3826 method. Hence, the steepest descent method is often used for the first
3827 10-100 steps of minimization. Another useful feature of minimization
3828 methods in {\sc OpenMD} is that a modified {\sc shake} algorithm can be
3829 applied during the minimization to constraint the bond lengths if this
3830 is required by the force field. Meta-data parameters concerning the
3831 minimizer are given in Table~\ref{table:minimizeParams}
3832
3833 \begin{longtable}[c]{ABCD}
3834 \caption{Meta-data Keywords: Energy Minimizer Parameters}
3835 \\
3836 {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
3837 \endhead
3838 \hline
3839 \endfoot
3840 {\tt minimizer} & string & selects the minimization method to be used
3841 & either {\tt CG} (conjugate gradient) or {\tt SD} (steepest
3842 descent) \\
3843 {\tt minimizerMaxIter} & steps & Sets the maximum number of iterations
3844 for the energy minimization & The default value is 200\\
3845 {\tt minimizerWriteFreq} & steps & Sets the frequency with which the {\tt .dump} and {\tt .stat} files are writtern during energy minimization & \\
3846 {\tt minimizerStepSize} & $\mbox{\AA}$ & Sets the step size for the
3847 line search & The default value is 0.01\\
3848 {\tt minimizerFTol} & $\mbox{kcal mol}^{-1}$ & Sets the energy tolerance
3849 for stopping the minimziation. & The default value is $10^{-8}$\\
3850 {\tt minimizerGTol} & $\mbox{kcal mol}^{-1}\mbox{\AA}^{-1}$ & Sets the
3851 gradient tolerance for stopping the minimization. & The default value
3852 is $10^{-8}$\\
3853 {\tt minimizerLSTol} & $\mbox{kcal mol}^{-1}$ & Sets line search
3854 tolerance for terminating each step of the minimization. & The default
3855 value is $10^{-8}$\\
3856 {\tt minimizerLSMaxIter} & steps & Sets the maximum number of
3857 iterations for each line search & The default value is 50\\
3858 \label{table:minimizeParams}
3859 \end{longtable}
3860
3861 \chapter{\label{section:anal}Analysis of Physical Properties}
3862
3863 {\sc OpenMD} includes a few utility programs which compute properties
3864 from the dump files that are generated during a molecular dynamics
3865 simulation. These programs are:
3866
3867 \begin{description}
3868 \item[{\bf Dump2XYZ}] Converts an {\sc OpenMD} dump file into a file
3869 suitable for viewing in a molecular dynamics viewer like Jmol
3870 \item[{\bf StaticProps}] Computes static properties like the pair
3871 distribution function, $g(r)$.
3872 \item[{\bf DynamicProps}] Computes time correlation functions like the
3873 velocity autocorrelation function, $\langle v(t) \cdot v(0)\rangle$,
3874 or the mean square displacement $\langle |r(t) - r(0)|^{2} \rangle$.
3875 \end{description}
3876
3877 These programs often need to operate on a subset of the data contained
3878 within a dump file. For example, if you want only the {\it oxygen-oxygen}
3879 pair distribution from a water simulation, or if you want to make a
3880 movie including only the water molecules within a 6 angstrom radius of
3881 lipid head groups, you need a way to specify your selection to these
3882 utility programs. {\sc OpenMD} has a selection syntax which allows you to
3883 specify the selection in a compact form in order to generate only the
3884 data you want. For example a common use of the StaticProps command
3885 would be:
3886
3887 {\tt StaticProps -i tp4.dump -{}-gofr -{}-sele1="select O*" -{}-sele2="select O*"}
3888
3889 This command computes the oxygen-oxygen pair distribution function,
3890 $g_{OO}(r)$, from a file named {\tt tp4.dump}. In order to understand
3891 this selection syntax and to make full use of the selection
3892 capabilities of the analysis programs, it is necessary to understand a
3893 few of the core concepts that are used to perform simulations.
3894
3895 \section{\label{section:concepts}Concepts}
3896
3897 {\sc OpenMD} manipulates both traditional atoms as well as some objects that
3898 {\it behave like atoms}. These objects can be rigid collections of
3899 atoms or atoms which have orientational degrees of freedom. Here is a
3900 diagram of the class heirarchy:
3901
3902 \begin{figure}
3903 \centering
3904 \includegraphics[width=3in]{heirarchy.pdf}
3905 \caption[Class heirarchy for StuntDoubles in {\sc OpenMD}]{ \\ The
3906 class heirarchy of StuntDoubles in {\sc OpenMD}. The selection
3907 syntax allows the user to select any of the objects that are descended
3908 from a StuntDouble.}
3909 \label{fig:heirarchy}
3910 \end{figure}
3911
3912 \begin{itemize}
3913 \item A {\bf StuntDouble} is {\it any} object that can be manipulated by the
3914 integrators and minimizers.
3915 \item An {\bf Atom} is a fundamental point-particle that can be moved around during a simulation.
3916 \item A {\bf DirectionalAtom} is an atom which has {\it orientational} as well as translational degrees of freedom.
3917 \item A {\bf RigidBody} is a collection of {\bf Atom}s or {\bf
3918 DirectionalAtom}s which behaves as a single unit.
3919 \end{itemize}
3920
3921 Every Molecule, Atom and DirectionalAtom in {\sc OpenMD} have their own names
3922 which are specified in the {\tt .md} file. In contrast, RigidBodies are
3923 denoted by their membership and index inside a particular molecule:
3924 [MoleculeName]\_RB\_[index] (the contents inside the brackets
3925 depend on the specifics of the simulation). The names of rigid bodies are
3926 generated automatically. For example, the name of the first rigid body
3927 in a DMPC molecule is DMPC\_RB\_0.
3928
3929 \section{\label{section:syntax}Syntax of the Select Command}
3930
3931 The most general form of the select command is: {\tt select {\it expression}}
3932
3933 This expression represents an arbitrary set of StuntDoubles (Atoms or
3934 RigidBodies) in {\sc OpenMD}. Expressions are composed of either name
3935 expressions, index expressions, predefined sets, user-defined
3936 expressions, comparison operators, within expressions, or logical
3937 combinations of the above expression types. Expressions can be
3938 combined using parentheses and the Boolean operators.
3939
3940 \subsection{\label{section:logical}Logical expressions}
3941
3942 The logical operators allow complex queries to be constructed out of
3943 simpler ones using the standard boolean connectives {\bf and}, {\bf
3944 or}, {\bf not}. Parentheses can be used to alter the precedence of the
3945 operators.
3946
3947 \begin{center}
3948 \begin{tabular}{|ll|}
3949 \hline
3950 {\bf logical operator} & {\bf equivalent operator} \\
3951 \hline
3952 and & ``\&'', ``\&\&'' \\
3953 or & ``$|$'', ``$||$'', ``,'' \\
3954 not & ``!'' \\
3955 \hline
3956 \end{tabular}
3957 \end{center}
3958
3959 \subsection{\label{section:name}Name expressions}
3960
3961 \begin{center}
3962 \begin{tabular}{|llp{3in}|}
3963 \hline
3964 {\bf type of expression} & {\bf examples} & {\bf translation of
3965 examples} \\
3966 \hline
3967 expression without ``.'' & select DMPC & select all StuntDoubles
3968 belonging to all DMPC molecules \\
3969 & select C* & select all atoms which have atom types beginning with C
3970 \\
3971 & select DMPC\_RB\_* & select all RigidBodies in DMPC molecules (but
3972 only select the rigid bodies, and not the atoms belonging to them). \\
3973 \hline
3974 expression has one ``.'' & select TIP3P.O\_TIP3P & select the O\_TIP3P
3975 atoms belonging to TIP3P molecules \\
3976 & select DMPC\_RB\_O.PO4 & select the PO4 atoms belonging to
3977 the first
3978 RigidBody in each DMPC molecule \\
3979 & select DMPC.20 & select the twentieth StuntDouble in each DMPC
3980 molecule \\
3981 \hline
3982 expression has two ``.''s & select DMPC.DMPC\_RB\_?.* &
3983 select all atoms
3984 belonging to all rigid bodies within all DMPC molecules \\
3985 \hline
3986 \end{tabular}
3987 \end{center}
3988
3989 \subsection{\label{section:index}Index expressions}
3990
3991 \begin{center}
3992 \begin{tabular}{|lp{4in}|}
3993 \hline
3994 {\bf examples} & {\bf translation of examples} \\
3995 \hline
3996 select 20 & select all of the StuntDoubles belonging to Molecule 20 \\
3997 select 20 to 30 & select all of the StuntDoubles belonging to
3998 molecules which have global indices between 20 (inclusive) and 30
3999 (exclusive) \\
4000 \hline
4001 \end{tabular}
4002 \end{center}
4003
4004 \subsection{\label{section:predefined}Predefined sets}
4005
4006 \begin{center}
4007 \begin{tabular}{|ll|}
4008 \hline
4009 {\bf keyword} & {\bf description} \\
4010 \hline
4011 all & select all StuntDoubles \\
4012 none & select none of the StuntDoubles \\
4013 \hline
4014 \end{tabular}
4015 \end{center}
4016
4017 \subsection{\label{section:userdefined}User-defined expressions}
4018
4019 Users can define arbitrary terms to represent groups of StuntDoubles,
4020 and then use the define terms in select commands. The general form for
4021 the define command is: {\bf define {\it term expression}}
4022
4023 Once defined, the user can specify such terms in boolean expressions
4024
4025 {\tt define SSDWATER SSD or SSD1 or SSDRF}
4026
4027 {\tt select SSDWATER}
4028
4029 \subsection{\label{section:comparison}Comparison expressions}
4030
4031 StuntDoubles can be selected by using comparision operators on their
4032 properties. The general form for the comparison command is: a property
4033 name, followed by a comparision operator and then a number.
4034
4035 \begin{center}
4036 \begin{tabular}{|l|l|}
4037 \hline
4038 {\bf property} & mass, charge \\
4039 {\bf comparison operator} & ``$>$'', ``$<$'', ``$=$'', ``$>=$'',
4040 ``$<=$'', ``$!=$'' \\
4041 \hline
4042 \end{tabular}
4043 \end{center}
4044
4045 For example, the phrase {\tt select mass > 16.0 and charge < -2}
4046 would select StuntDoubles which have mass greater than 16.0 and charges
4047 less than -2.
4048
4049 \subsection{\label{section:within}Within expressions}
4050
4051 The ``within'' keyword allows the user to select all StuntDoubles
4052 within the specified distance (in Angstroms) from a selection,
4053 including the selected atom itself. The general form for within
4054 selection is: {\tt select within(distance, expression)}
4055
4056 For example, the phrase {\tt select within(2.5, PO4 or NC4)} would
4057 select all StuntDoubles which are within 2.5 angstroms of PO4 or NC4
4058 atoms.
4059
4060 \section{\label{section:tools}Tools which use the selection command}
4061
4062 \subsection{\label{section:Dump2XYZ}Dump2XYZ}
4063
4064 Dump2XYZ can transform an {\sc OpenMD} dump file into a xyz file which can
4065 be opened by other molecular dynamics viewers such as Jmol and
4066 VMD. The options available for Dump2XYZ are as follows:
4067
4068
4069 \begin{longtable}[c]{|EFG|}
4070 \caption{Dump2XYZ Command-line Options}
4071 \\ \hline
4072 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
4073 \endhead
4074 \hline
4075 \endfoot
4076 -h & {\tt -{}-help} & Print help and exit \\
4077 -V & {\tt -{}-version} & Print version and exit \\
4078 -i & {\tt -{}-input=filename} & input dump file \\
4079 -o & {\tt -{}-output=filename} & output file name \\
4080 -n & {\tt -{}-frame=INT} & print every n frame (default=`1') \\
4081 -w & {\tt -{}-water} & skip the the waters (default=off) \\
4082 -m & {\tt -{}-periodicBox} & map to the periodic box (default=off)\\
4083 -z & {\tt -{}-zconstraint} & replace the atom types of zconstraint molecules (default=off) \\
4084 -r & {\tt -{}-rigidbody} & add a pseudo COM atom to rigidbody (default=off) \\
4085 -t & {\tt -{}-watertype} & replace the atom type of water model (default=on) \\
4086 -b & {\tt -{}-basetype} & using base atom type
4087 (default=off) \\
4088 -v& {\tt -{}-velocities} & Print velocities in xyz file (default=off)\\
4089 -f& {\tt -{}-forces} & Print forces xyz file (default=off)\\
4090 -u& {\tt -{}-vectors} & Print vectors (dipoles, etc) in xyz file
4091 (default=off)\\
4092 -c& {\tt -{}-charges} & Print charges in xyz file (default=off)\\
4093 -e& {\tt -{}-efield} & Print electric field vector in xyz file
4094 (default=off)\\
4095 & {\tt -{}-repeatX=INT} & The number of images to repeat in the x direction (default=`0') \\
4096 & {\tt -{}-repeatY=INT} & The number of images to repeat in the y direction (default=`0') \\
4097 & {\tt -{}-repeatZ=INT} & The number of images to repeat in the z direction (default=`0') \\
4098 -s & {\tt -{}-selection=selection script} & By specifying {\tt -{}-selection}=``selection command'' with Dump2XYZ, the user can select an arbitrary set of StuntDoubles to be
4099 converted. \\
4100 & {\tt -{}-originsele} & By specifying {\tt -{}-originsele}=``selection command'' with Dump2XYZ, the user can re-center the origin of the system around a specific StuntDouble \\
4101 & {\tt -{}-refsele} & In order to rotate the system, {\tt -{}-originsele} and {\tt -{}-refsele} must be given to define the new coordinate set. A StuntDouble which contains a dipole (the direction of the dipole is always (0, 0, 1) in body frame) is specified by {\tt -{}-originsele}. The new x-z plane is defined by the direction of the dipole and the StuntDouble is specified by {\tt -{}-refsele}.
4102 \end{longtable}
4103
4104
4105 \subsection{\label{section:StaticProps}StaticProps}
4106
4107 {\tt StaticProps} can compute properties which are averaged over some
4108 or all of the configurations that are contained within a dump file.
4109 The most common example of a static property that can be computed is
4110 the pair distribution function between atoms of type $A$ and other
4111 atoms of type $B$, $g_{AB}(r)$. StaticProps can also be used to
4112 compute the density distributions of other molecules in a reference
4113 frame {\it fixed to the body-fixed reference frame} of a selected atom
4114 or rigid body.
4115
4116 There are five seperate radial distribution functions availiable in
4117 {\sc OpenMD}. Since every radial distrbution function invlove the calculation
4118 between pairs of bodies, {\tt -{}-sele1} and {\tt -{}-sele2} must be specified to tell
4119 StaticProps which bodies to include in the calculation.
4120
4121 \begin{description}
4122 \item[{\tt -{}-gofr}] Computes the pair distribution function,
4123 \begin{equation*}
4124 g_{AB}(r) = \frac{1}{\rho_B}\frac{1}{N_A} \langle \sum_{i \in A}
4125 \sum_{j \in B} \delta(r - r_{ij}) \rangle
4126 \end{equation*}
4127 \item[{\tt -{}-r\_theta}] Computes the angle-dependent pair distribution
4128 function. The angle is defined by the intermolecular vector $\vec{r}$ and
4129 $z$-axis of DirectionalAtom A,
4130 \begin{equation*}
4131 g_{AB}(r, \cos \theta) = \frac{1}{\rho_B}\frac{1}{N_A} \langle \sum_{i \in A}
4132 \sum_{j \in B} \delta(r - r_{ij}) \delta(\cos \theta_{ij} - \cos \theta)\rangle
4133 \end{equation*}
4134 \item[{\tt -{}-r\_omega}] Computes the angle-dependent pair distribution
4135 function. The angle is defined by the $z$-axes of the two
4136 DirectionalAtoms A and B.
4137 \begin{equation*}
4138 g_{AB}(r, \cos \omega) = \frac{1}{\rho_B}\frac{1}{N_A} \langle \sum_{i \in A}
4139 \sum_{j \in B} \delta(r - r_{ij}) \delta(\cos \omega_{ij} - \cos \omega)\rangle
4140 \end{equation*}
4141 \item[{\tt -{}-theta\_omega}] Computes the pair distribution in the angular
4142 space $\theta, \omega$ defined by the two angles mentioned above.
4143 \begin{equation*}
4144 g_{AB}(\cos\theta, \cos \omega) = \frac{1}{\rho_B}\frac{1}{N_A} \langle \sum_{i \in A}
4145 \sum_{j \in B} \langle \delta(\cos \theta_{ij} - \cos \theta)
4146 \delta(\cos \omega_{ij} - \cos \omega)\rangle
4147 \end{equation*}
4148 \item[{\tt -{}-gxyz}] Calculates the density distribution of particles of type
4149 B in the body frame of particle A. Therefore, {\tt -{}-originsele} and
4150 {\tt -{}-refsele} must be given to define A's internal coordinate set as
4151 the reference frame for the calculation.
4152 \end{description}
4153
4154 The vectors (and angles) associated with these angular pair
4155 distribution functions are most easily seen in the figure below:
4156
4157 \begin{figure}
4158 \centering
4159 \includegraphics[width=3in]{definition.pdf}
4160 \caption[Definitions of the angles between directional objects]{ \\ Any
4161 two directional objects (DirectionalAtoms and RigidBodies) have a set
4162 of two angles ($\theta$, and $\omega$) between the z-axes of their
4163 body-fixed frames.}
4164 \label{fig:gofr}
4165 \end{figure}
4166
4167 The options available for {\tt StaticProps} are as follows:
4168 \begin{longtable}[c]{|EFG|}
4169 \caption{StaticProps Command-line Options}
4170 \\ \hline
4171 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
4172 \endhead
4173 \hline
4174 \endfoot
4175 -h& {\tt -{}-help} & Print help and exit \\
4176 -V& {\tt -{}-version} & Print version and exit \\
4177 -i& {\tt -{}-input=filename} & input dump file \\
4178 -o& {\tt -{}-output=filename} & output file name \\
4179 -n& {\tt -{}-step=INT} & process every n frame (default=`1') \\
4180 -r& {\tt -{}-nrbins=INT} & number of bins for distance (default=`100') \\
4181 -a& {\tt -{}-nanglebins=INT} & number of bins for cos(angle) (default= `50') \\
4182 -l& {\tt -{}-length=DOUBLE} & maximum length (Defaults to 1/2 smallest length of first frame) \\
4183 & {\tt -{}-sele1=selection script} & select the first StuntDouble set \\
4184 & {\tt -{}-sele2=selection script} & select the second StuntDouble set \\
4185 & {\tt -{}-sele3=selection script} & select the third StuntDouble set \\
4186 & {\tt -{}-refsele=selection script} & select reference (can only
4187 be used with {\tt -{}-gxyz}) \\
4188 & {\tt -{}-comsele=selection script}
4189 & select stunt doubles for center-of-mass
4190 reference point\\
4191 & {\tt -{}-seleoffset=INT} & global index offset for a second object (used
4192 to define a vector between sites in molecule)\\
4193
4194 & {\tt -{}-molname=STRING} & molecule name \\
4195 & {\tt -{}-begin=INT} & begin internal index \\
4196 & {\tt -{}-end=INT} & end internal index \\
4197 & {\tt -{}-radius=DOUBLE} & nanoparticle radius\\
4198 \hline
4199 \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
4200 \hline
4201 & {\tt -{}-bo} & bond order parameter ({\tt -{}-rcut} must be specified) \\
4202 & {\tt -{}-bor} & bond order parameter as a function of
4203 radius ({\tt -{}-rcut} must be specified) \\
4204 & {\tt -{}-bad} & $N(\theta)$ bond angle density within ({\tt -{}-rcut} must be specified) \\
4205 & {\tt -{}-count} & count of molecules matching selection
4206 criteria (and associated statistics) \\
4207 -g& {\tt -{}-gofr} & $g(r)$ \\
4208 & {\tt -{}-gofz} & $g(z)$ \\
4209 & {\tt -{}-r\_theta} & $g(r, \cos(\theta))$ \\
4210 & {\tt -{}-r\_omega} & $g(r, \cos(\omega))$ \\
4211 & {\tt -{}-r\_z} & $g(r, z)$ \\
4212 & {\tt -{}-theta\_omega} & $g(\cos(\theta), \cos(\omega))$ \\
4213 & {\tt -{}-gxyz} & $g(x, y, z)$ \\
4214 & {\tt -{}-twodgofr} & 2D $g(r)$ (Slab width {\tt -{}-dz} must be specified)\\
4215 -p& {\tt -{}-p2} & $P_2$ order parameter ({\tt -{}-sele1} must be specified, {\tt -{}-sele2} is optional) \\
4216 & {\tt -{}-rp2} & Ripple order parameter ({\tt -{}-sele1} and {\tt -{}-sele2} must be specified) \\
4217 & {\tt -{}-scd} & $S_{CD}$ order parameter(either {\tt -{}-sele1}, {\tt -{}-sele2}, {\tt -{}-sele3} are specified or {\tt -{}-molname}, {\tt -{}-begin}, {\tt -{}-end} are specified) \\
4218 -d& {\tt -{}-density} & density plot \\
4219 & {\tt -{}-slab\_density} & slab density \\
4220 & {\tt -{}-p\_angle} & $p(\cos(\theta))$ ($\theta$
4221 is the angle between molecular axis and radial vector from origin\\
4222 & {\tt -{}-hxy} & Calculates the undulation spectrum, $h(x,y)$, of an interface \\
4223 & {\tt -{}-rho\_r} & $\rho(r)$\\
4224 & {\tt -{}-angle\_r} & $\theta(r)$ (spatially resolves the
4225 angle between the molecular axis and the radial vector from the
4226 origin)\\
4227 & {\tt -{}-hullvol} & hull volume of nanoparticle\\
4228 & {\tt -{}-rodlength} & length of nanorod\\
4229 -Q& {\tt -{}-tet\_param} & tetrahedrality order parameter ($Q$)\\
4230 & {\tt -{}-tet\_param\_z} & spatially-resolved tetrahedrality order
4231 parameter $Q(z)$\\
4232 & {\tt -{}-rnemdz} & slab-resolved RNEMD statistics (temperature,
4233 density, velocity)\\
4234 & {\tt -{}-rnemdr} & shell-resolved RNEMD statistics (temperature,
4235 density, angular velocity)
4236 \end{longtable}
4237
4238 \subsection{\label{section:DynamicProps}DynamicProps}
4239
4240 {\tt DynamicProps} computes time correlation functions from the
4241 configurations stored in a dump file. Typical examples of time
4242 correlation functions are the mean square displacement and the
4243 velocity autocorrelation functions. Once again, the selection syntax
4244 can be used to specify the StuntDoubles that will be used for the
4245 calculation. A general time correlation function can be thought of
4246 as:
4247 \begin{equation}
4248 C_{AB}(t) = \langle \vec{u}_A(t) \cdot \vec{v}_B(0) \rangle
4249 \end{equation}
4250 where $\vec{u}_A(t)$ is a vector property associated with an atom of
4251 type $A$ at time $t$, and $\vec{v}_B(t^{\prime})$ is a different vector
4252 property associated with an atom of type $B$ at a different time
4253 $t^{\prime}$. In most autocorrelation functions, the vector properties
4254 ($\vec{v}$ and $\vec{u}$) and the types of atoms ($A$ and $B$) are
4255 identical, and the three calculations built in to {\tt DynamicProps}
4256 make these assumptions. It is possible, however, to make simple
4257 modifications to the {\tt DynamicProps} code to allow the use of {\it
4258 cross} time correlation functions (i.e. with different vectors). The
4259 ability to use two selection scripts to select different types of
4260 atoms is already present in the code.
4261
4262 The options available for DynamicProps are as follows:
4263 \begin{longtable}[c]{|EFG|}
4264 \caption{DynamicProps Command-line Options}
4265 \\ \hline
4266 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
4267 \endhead
4268 \hline
4269 \endfoot
4270 -h& {\tt -{}-help} & Print help and exit \\
4271 -V& {\tt -{}-version} & Print version and exit \\
4272 -i& {\tt -{}-input=filename} & input dump file \\
4273 -o& {\tt -{}-output=filename} & output file name \\
4274 & {\tt -{}-sele1=selection script} & select first StuntDouble set \\
4275 & {\tt -{}-sele2=selection script} & select second StuntDouble set (if sele2 is not set, use script from sele1) \\
4276 & {\tt -{}-order=INT} & Lengendre Polynomial Order\\
4277 -z& {\tt -{}-nzbins=INT} & Number of $z$ bins (default=`100`)\\
4278 -m& {\tt -{}-memory=memory specification}
4279 &Available memory
4280 (default=`2G`)\\
4281 \hline
4282 \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
4283 \hline
4284 -s& {\tt -{}-selecorr} & selection correlation function \\
4285 -r& {\tt -{}-rcorr} & compute mean squared displacement \\
4286 -v& {\tt -{}-vcorr} & velocity autocorrelation function \\
4287 -d& {\tt -{}-dcorr} & dipole correlation function \\
4288 -l& {\tt -{}-lcorr} & Lengendre correlation function \\
4289 & {\tt -{}-lcorrZ} & Lengendre correlation function binned by $z$ \\
4290 & {\tt -{}-cohZ} & Lengendre correlation function for OH bond vectors binned by $z$\\
4291 -M& {\tt -{}-sdcorr} & System dipole correlation function\\
4292 & {\tt -{}-r\_rcorr} & Radial mean squared displacement\\
4293 & {\tt -{}-thetacorr} & Angular mean squared displacement\\
4294 & {\tt -{}-drcorr} & Directional mean squared displacement for particles with unit vectors\\
4295 & {\tt -{}-helfandEcorr} & Helfand moment for thermal conductvity\\
4296 -p& {\tt -{}-momentum} & Helfand momentum for viscosity\\
4297 & {\tt -{}-stresscorr} & Stress tensor correlation function
4298 \end{longtable}
4299
4300 \chapter{\label{section:PreparingInput} Preparing Input Configurations}
4301
4302 {\sc OpenMD} version 4 comes with a few utility programs to aid in
4303 setting up initial configuration and meta-data files. Usually, a user
4304 is interested in either importing a structure from some other format
4305 (usually XYZ or PDB), or in building an initial configuration in some
4306 perfect crystalline lattice. The programs bundled with {\sc OpenMD}
4307 which import coordinate files are {\tt atom2md}, {\tt xyz2md}, and
4308 {\tt pdb2md}. The programs which generate perfect crystals are called
4309 {\tt SimpleBuilder} and {\tt RandomBuilder}
4310
4311 \section{\label{section:atom2md}atom2md, xyz2md, and pdb2md}
4312
4313 {\tt atom2md}, {\tt xyz2md}, and {\tt pdb2md} attempt to construct
4314 {\tt .md} files from a single file containing only atomic coordinate
4315 information. To do this task, they make reasonable guesses about
4316 bonding from the distance between atoms in the coordinate, and attempt
4317 to identify other terms in the potential energy from the topology of
4318 the graph of discovered bonds. This procedure is not perfect, and the
4319 user should check the discovered bonding topology that is contained in
4320 the {\tt $<$MetaData$>$} block in the file that is generated.
4321
4322 Typically, the user would run:
4323
4324 {\tt atom2md $<$input spec$>$ [Options]}
4325
4326 Here {\tt $<$input spec$>$} can be used to specify the type of file being
4327 used for configuration input. I.e. using {\tt -ipdb} specifies that the
4328 input file contains coordinate information in the PDB format.
4329
4330 The options available for atom2md are as follows:
4331 \begin{longtable}[c]{|HI|}
4332 \caption{atom2md Command-line Options}
4333 \\ \hline
4334 {\bf option} & {\bf behavior} \\ \hline
4335 \endhead
4336 \hline
4337 \endfoot
4338 -f \# & Start import at molecule \# specified \\
4339 -l \# & End import at molecule \# specified \\
4340 -t & All input files describe a single molecule \\
4341 -e & Continue with next object after error, if possible \\
4342 -z & Compress the output with gzip \\
4343 -H & Outputs this help text \\
4344 -Hxxx & (xxx is file format ID e.g. -Hpdb) gives format info \\
4345 -Hall & Outputs details of all formats \\
4346 -V & Outputs version number \\
4347 \hline
4348 \multicolumn{2}{|l|}{The following file formats are recognized:}\\
4349 \hline
4350 ent & Protein Data Bank format \\
4351 in & {\sc OpenMD} cartesian coordinates format \\
4352 pdb & Protein Data Bank format \\
4353 prep & Amber Prep format \\
4354 xyz & XYZ cartesian coordinates format \\
4355 \hline
4356 \multicolumn{2}{|l|}{More specific info and options are available
4357 using -H$<$format-type$>$, e.g. -Hpdb}
4358 \end{longtable}
4359
4360 The specific programs {\tt xyz2md} and {\tt pdb2md} are identical
4361 to {\tt atom2md}, but they use a specific input format and do not
4362 expect the the input specifier on the command line.
4363
4364
4365 \section{\label{section:SimpleBuilder}SimpleBuilder}
4366
4367 {\tt SimpleBuilder} creates simple lattice structures. It requires an
4368 initial, but skeletal {\sc OpenMD} file to specify the components that are to
4369 be placed on the lattice. The total number of placed molecules will
4370 be shown at the top of the configuration file that is generated, and
4371 that number may not match the original meta-data file, so a new
4372 meta-data file is also generated which matches the lattice structure.
4373
4374 The options available for SimpleBuilder are as follows:
4375 \begin{longtable}[c]{|EFG|}
4376 \caption{SimpleBuilder Command-line Options}
4377 \\ \hline
4378 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
4379 \endhead
4380 \hline
4381 \endfoot
4382 -h& {\tt -{}-help} & Print help and exit\\
4383 -V& {\tt -{}-version} & Print version and exit\\
4384 -o& {\tt -{}-output=STRING} & Output file name\\
4385 & {\tt -{}-density=DOUBLE} & density ($\mathrm{g~cm}^{-3}$)\\
4386 & {\tt -{}-nx=INT} & number of unit cells in x\\
4387 & {\tt -{}-ny=INT} & number of unit cells in y\\
4388 & {\tt -{}-nz=INT} & number of unit cells in z
4389 \end{longtable}
4390
4391 \section{\label{section:icosahedralBuilder}icosahedralBuilder}
4392
4393 {\tt icosahedralBuilder} creates single-component geometric solids
4394 that can be useful in simulating nanostructures. Like the other
4395 builders, it requires an initial, but skeletal {\sc OpenMD} file to
4396 specify the component that is to be placed on the lattice. The total
4397 number of placed molecules will be shown at the top of the
4398 configuration file that is generated, and that number may not match
4399 the original meta-data file, so a new meta-data file is also generated
4400 which matches the lattice structure.
4401
4402 The options available for icosahedralBuilder are as follows:
4403 \begin{longtable}[c]{|EFG|}
4404 \caption{icosahedralBuilder Command-line Options}
4405 \\ \hline
4406 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
4407 \endhead
4408 \hline
4409 \endfoot
4410 -h& {\tt -{}-help} & Print help and exit\\
4411 -V& {\tt -{}-version} & Print version and exit\\
4412 -o& {\tt -{}-output=STRING} & Output file name\\
4413 -n& {\tt -{}-shells=INT} & Nanoparticle shells\\
4414 -d& {\tt -{}-latticeConstant=DOUBLE} & Lattice spacing in Angstroms for cubic lattice.\\
4415 -c& {\tt -{}-columnAtoms=INT} & Number of atoms along central
4416 column (Decahedron only)\\
4417 -t& {\tt -{}-twinAtoms=INT} & Number of atoms along twin
4418 boundary (Decahedron only) \\
4419 -p& {\tt -{}-truncatedPlanes=INT} & Number of truncated planes (Curling-stone Decahedron only)\\
4420 \hline
4421 \multicolumn{3}{|l|}{One option from the following group of options is required:} \\
4422 \hline
4423 & {\tt -{}-ico} & Create an Icosahedral cluster \\
4424 & {\tt -{}-deca} & Create a regualar Decahedral cluster\\
4425 & {\tt -{}-ino} & Create an Ino Decahedral cluster\\
4426 & {\tt -{}-marks} & Create a Marks Decahedral cluster\\
4427 & {\tt -{}-stone} & Create a Curling-stone Decahedral cluster
4428 \end{longtable}
4429
4430
4431 \section{\label{section:Hydro}Hydro}
4432 {\tt Hydro} generates resistance tensor ({\tt .diff}) files which are
4433 required when using the Langevin integrator using complex rigid
4434 bodies. {\tt Hydro} supports two approximate models: the {\tt
4435 BeadModel} and {\tt RoughShell}. Additionally, {\tt Hydro} can
4436 generate resistance tensor files using analytic solutions for simple
4437 shapes. To generate a {\tt }.diff file, a meta-data file is needed as
4438 the input file. Since the resistance tensor depends on these
4439 quantities, the {\tt viscosity} of the solvent and the temperature
4440 ({\tt targetTemp}) of the system must be defined in meta-data file. If
4441 the approximate model in use is the {\tt RoughShell} model the {\tt
4442 beadSize} (the diameter of the small beads used to approximate the
4443 surface of the body) must also be specified.
4444
4445 The options available for Hydro are as follows:
4446 \begin{longtable}[c]{|EFG|}
4447 \caption{Hydro Command-line Options}
4448 \\ \hline
4449 {\bf option} & {\bf verbose option} & {\bf behavior} \\ \hline
4450 \endhead
4451 \hline
4452 \endfoot
4453 -h& {\tt -{}-help} & Print help and exit\\
4454 -V& {\tt -{}-version} & Print version and exit\\
4455 -i& {\tt -{}-input=filename} & input MetaData (md) file\\
4456 -o& {\tt -{}-output=STRING} & Output file name\\
4457 & {\tt -{}-model=STRING} & hydrodynamics model (supports both
4458 {\tt RoughShell} and {\tt BeadModel})\\
4459 -b& {\tt -{}-beads} & generate the beads only,
4460 hydrodynamic calculations will not be performed (default=off)\\
4461 \end{longtable}
4462
4463
4464
4465
4466
4467 \chapter{\label{section:parallelization} Parallel Simulation Implementation}
4468
4469 Although processor power is continually improving, it is still
4470 unreasonable to simulate systems of more than 10,000 atoms on a single
4471 processor. To facilitate study of larger system sizes or smaller
4472 systems for longer time scales, parallel methods were developed to
4473 allow multiple CPU's to share the simulation workload. Three general
4474 categories of parallel decomposition methods have been developed:
4475 these are the atomic,\cite{Fox88} spatial~\cite{plimpton95} and
4476 force~\cite{Paradyn} decomposition methods.
4477
4478 Algorithmically simplest of the three methods is atomic decomposition,
4479 where $N$ particles in a simulation are split among $P$ processors for
4480 the duration of the simulation. Computational cost scales as an
4481 optimal $\mathcal{O}(N/P)$ for atomic decomposition. Unfortunately, all
4482 processors must communicate positions and forces with all other
4483 processors at every force evaluation, leading the communication costs
4484 to scale as an unfavorable $\mathcal{O}(N)$, \emph{independent of the
4485 number of processors}. This communication bottleneck led to the
4486 development of spatial and force decomposition methods, in which
4487 communication among processors scales much more favorably. Spatial or
4488 domain decomposition divides the physical spatial domain into 3D boxes
4489 in which each processor is responsible for calculation of forces and
4490 positions of particles located in its box. Particles are reassigned to
4491 different processors as they move through simulation space. To
4492 calculate forces on a given particle, a processor must simply know the
4493 positions of particles within some cutoff radius located on nearby
4494 processors rather than the positions of particles on all
4495 processors. Both communication between processors and computation
4496 scale as $\mathcal{O}(N/P)$ in the spatial method. However, spatial
4497 decomposition adds algorithmic complexity to the simulation code and
4498 is not very efficient for small $N$, since the overall communication
4499 scales as the surface to volume ratio $\mathcal{O}(N/P)^{2/3}$ in
4500 three dimensions.
4501
4502 The parallelization method used in {\sc OpenMD} is the force
4503 decomposition method.\cite{hendrickson:95} Force decomposition assigns
4504 particles to processors based on a block decomposition of the force
4505 matrix. Processors are split into an optimally square grid forming row
4506 and column processor groups. Forces are calculated on particles in a
4507 given row by particles located in that processor's column
4508 assignment. One deviation from the algorithm described by Hendrickson
4509 {\it et al.} is the use of column ordering based on the row indexes
4510 preventing the need for a transpose operation necessitating a second
4511 communication step when gathering the final force components. Force
4512 decomposition is less complex to implement than the spatial method but
4513 still scales computationally as $\mathcal{O}(N/P)$ and scales as
4514 $\mathcal{O}(N/\sqrt{P})$ in communication cost. Plimpton has also
4515 found that force decompositions scale more favorably than spatial
4516 decompositions for systems up to 10,000 atoms and favorably compete
4517 with spatial methods up to 100,000 atoms.\cite{plimpton95}
4518
4519 \chapter{\label{section:conclusion}Conclusion}
4520
4521 We have presented a new parallel simulation program called {\sc
4522 OpenMD}. This program offers some novel capabilities, but mostly makes
4523 available a library of modern object-oriented code for the scientific
4524 community to use freely. Notably, {\sc OpenMD} can handle symplectic
4525 integration of objects (atoms and rigid bodies) which have
4526 orientational degrees of freedom. It can also work with transition
4527 metal force fields and point-dipoles. It is capable of scaling across
4528 multiple processors through the use of force based decomposition. It
4529 also implements several advanced integrators allowing the end user
4530 control over temperature and pressure. In addition, it is capable of
4531 integrating constrained dynamics through both the {\sc rattle}
4532 algorithm and the $z$-constraint method.
4533
4534 We encourage other researchers to download and apply this program to
4535 their own research problems. By making the code available, we hope to
4536 encourage other researchers to contribute their own code and make it a
4537 more powerful package for everyone in the molecular dynamics community
4538 to use. All source code for {\sc OpenMD} is available for download at
4539 {\tt http://openmd.net}.
4540
4541 \chapter{Acknowledgments}
4542
4543 Development of {\sc OpenMD} was funded by a New Faculty Award from the
4544 Camille and Henry Dreyfus Foundation and by the National Science
4545 Foundation under grant CHE-0134881. Computation time was provided by
4546 the Notre Dame Bunch-of-Boxes (B.o.B) computer cluster under NSF grant
4547 DMR-0079647.
4548
4549
4550 \bibliographystyle{aip}
4551 \bibliography{openmdDoc}
4552
4553 \end{document}