ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/openmdDocs/openmdDoc.tex
Revision: 4104
Committed: Mon Apr 28 21:06:04 2014 UTC (11 years ago) by gezelter
Content type: application/x-tex
File size: 219581 byte(s)
Log Message:
latest edits

File Contents

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