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

Comparing trunk/oopsePaper/oopsePaper.tex (file contents):
Revision 1121 by mmeineke, Mon Apr 19 21:00:24 2004 UTC vs.
Revision 1428 by gezelter, Wed Jul 28 19:46:08 2004 UTC

# Line 2 | Line 2
2   \usepackage{amsmath}
3   \usepackage{amssymb}
4   \usepackage{endfloat}
5 %\usepackage{berkeley}
5   \usepackage{listings}
6 + \usepackage{berkeley}
7   \usepackage{graphicx}
8   \usepackage[ref]{overcite}
9   \usepackage{setspace}
# Line 18 | Line 18
18   \renewcommand\citemid{\ } % no comma in optional reference note
19  
20   \begin{document}
21 < \lstset{language=C,float,frame=tblr,frameround=tttt}
21 > \lstset{language=C,frame=TB,basicstyle=\small,basicstyle=\ttfamily, %
22 >        xleftmargin=0.5in, xrightmargin=0.5in,captionpos=b, %
23 >        abovecaptionskip=0.5cm, belowcaptionskip=0.5cm}
24   \renewcommand{\lstlistingname}{Scheme}
25   \title{{\sc oopse}: An Open Source Object-Oriented Parallel Simulation
26   Engine for Molecular Dynamics}
27  
28 < \author{Matthew A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher J. Fennell and J. Daniel Gezelter\\
28 > \author{Matthew A. Meineke, Charles F. Vardeman II, Teng Lin,\\
29 > Christopher J. Fennell and J. Daniel Gezelter\\
30   Department of Chemistry and Biochemistry\\
31   University of Notre Dame\\
32   Notre Dame, Indiana 46556}
# Line 32 | Line 35 | We detail the capabilities of a new open-source parall
35   \maketitle
36  
37   \begin{abstract}
38 < We detail the capabilities of a new open-source parallel simulation
39 < package ({\sc oopse}) that can perform molecular dynamics simulations
40 < on atom types that are missing from other popular packages.  In
41 < particular, {\sc oopse} is capable of performing orientational
42 < dynamics on dipolar systems, and it can handle simulations of metallic
43 < systems using the embedded atom method ({\sc eam}).
38 > {\sc oopse} is a new molecular dynamics simulation program which is
39 > capable of efficiently integrating equations of motion for atom types
40 > with orientational degrees of freedom (e.g. ``sticky'' atoms and point
41 > dipoles).  Transition metals can also be simulated using the embedded
42 > atom method ({\sc eam}) potential included in the code.  Parallel
43 > simulations are carried out using the force-based decomposition
44 > method.  Simulations are specified using a very simple C-based
45 > meta-data language.  A number of advanced integrators are included,
46 > and the base integrator for orientational dynamics provides
47 > substantial improvements over older quaternion-base schemes.  All
48 > source code is available under a very permissive (BSD-style) Open
49 > Source license.
50   \end{abstract}
51  
52   \section{\label{sec:intro}Introduction}
53  
54 < When choosing to simulate a chemical system with molecular dynamics,
55 < there are a variety of options available. For simple systems, one
56 < might consider writing one's own programming code. However, as systems
57 < grow larger and more complex, building and maintaining code for the
58 < simulations becomes a time consuming task. In such cases it is usually
59 < more convenient for a researcher to turn to pre-existing simulation
60 < packages. These packages, such as {\sc amber}\cite{pearlman:1995} and
61 < {\sc charmm}\cite{Brooks83}, provide powerful tools for researchers to
62 < conduct simulations of their systems without spending their time
63 < developing a code base to conduct their research. This then frees them
64 < to perhaps explore experimental analogues to their models.
54 > There are a number of excellent molecular dynamics packages available
55 > to the chemical physics
56 > community.\cite{Brooks83,MacKerell98,pearlman:1995,Gromacs,Gromacs3,DL_POLY,Tinker,Paradyn}
57 > All of these packages are stable, polished programs which solve many
58 > problems of interest.  Most are now capable of performing molecular
59 > dynamics simulations on parallel computers.  Some have source code
60 > which is freely available to the entire scientific community.  Few,
61 > however, are capable of efficiently integrating the equations of
62 > motion for atom types with orientational degrees of freedom
63 > (e.g. point dipoles, and ``sticky'' atoms).  And only one of the
64 > programs referenced can handle transition metal force fields like the
65 > Embedded Atom Method ({\sc eam}).  The direction our research program
66 > has taken us now involves the use of atoms with orientational degrees
67 > of freedom and transition metals.  Since these simulation methods may
68 > be of some use to other researchers, we have decided to release our
69 > program to the scientific community with a permissive open source
70 > license.
71  
72 < Despite their utility, problems with these packages arise when
73 < researchers try to develop techniques or energetic models that the
74 < code was not originally designed to simulate. Examples of techniques
75 < and energetics not commonly implemented include; dipole-dipole
76 < interactions, rigid body dynamics, and metallic potentials. When faced
77 < with these obstacles, a researcher must either develop their own code
78 < or license and extend one of the commercial packages. What we have
79 < elected to do is develop a body of simulation code capable of
80 < implementing the types of models upon which our research is based.
72 > This paper communicates the algorithmic details of our program, which
73 > we have been calling the Open source Object-oriented Parallel
74 > Simulation Engine (i.e. {\sc oopse}).  We have structured this paper
75 > to first discuss the underlying concepts in this simulation package
76 > (Sec. \ref{oopseSec:IOfiles}).  The empirical energy functions
77 > implemented are discussed in Sec.~\ref{oopseSec:empiricalEnergy}.
78 > Sec.~\ref{oopseSec:mechanics} describes the various Molecular Dynamics
79 > algorithms {\sc oopse} implements in the integration of Hamilton's
80 > equations of motion.  Program design considerations for parallel
81 > computing are presented in
82 > Sec.~\ref{oopseSec:parallelization}. Concluding remarks are presented
83 > in Sec.~\ref{oopseSec:conclusion}.
84  
85 < In developing {\sc oopse}, we have adhered to the precepts of Open
68 < Source development, and are releasing our source code with a
69 < permissive license. It is our intent that by doing so, other
70 < researchers might benefit from our work, and add their own
71 < contributions to the package. The license under which {\sc oopse} is
72 < distributed allows any researcher to download and modify the source
73 < code for their own use. In this way further development of {\sc oopse}
74 < is not limited to only the models of interest to ourselves, but also
75 < those of the community of scientists who contribute back to the
76 < project.
85 > \section{\label{oopseSec:IOfiles}Concepts \& Files}
86  
87 < We have structured this chapter to first discuss the empirical energy
88 < functions that {\sc oopse } implements in
89 < Sec.~\ref{oopseSec:empiricalEnergy}. Following that is a discussion of
90 < the various input and output files associated with the package
91 < (Sec.~\ref{oopseSec:IOfiles}). Sec.~\ref{oopseSec:mechanics}
92 < elucidates the various Molecular Dynamics algorithms {\sc oopse}
84 < implements in the integration of the Newtonian equations of
85 < motion. Basic analysis of the trajectories obtained from the
86 < simulation is discussed in Sec.~\ref{oopseSec:props}. Program design
87 < considerations are presented in Sec.~\ref{oopseSec:design}. And
88 < lastly, Sec.~\ref{oopseSec:conclusion} concludes the chapter.
87 > A simulation in {\sc oopse} is built using a few fundamental
88 > conceptual building blocks most of which are chemically intuitive.
89 > The basic unit of a simulation is an {\tt atom}.  The parameters
90 > describing an {\tt atom} have been generalized to make it as flexible
91 > as possible; this means that in addition to translational degrees of
92 > freedom, {\tt Atoms} may also have {\it orientational} degrees of freedom.
93  
94 < \section{\label{oopseSec:empiricalEnergy}The Empirical Energy Functions}
94 > The fundamental (static) properties of {\tt atoms} are defined by the
95 > {\tt forceField} chosen for the simulation.  The atomic properties
96 > specified by a {\tt forceField} might include (but are not limited to)
97 > charge, $\sigma$ and $\epsilon$ values for Lennard-Jones interactions,
98 > the strength of the dipole moment ($\mu$), the mass, and the moments
99 > of inertia.  Other more complicated properties of atoms might also be
100 > specified by the {\tt forceField}.
101  
102 < \subsection{\label{oopseSec:atomsMolecules}Atoms, Molecules and Rigid Bodies}
102 > {\tt Atoms} can be grouped together in many ways.  A {\tt rigidBody}
103 > contains atoms that exert no forces on one another and which move as a
104 > single rigid unit.  A {\tt cutoffGroup} may contain atoms which
105 > function together as a (rigid {\it or} non-rigid) unit for potential
106 > energy calculations,
107 > \begin{equation}
108 > V_{ab} = s(r_{ab}) \sum_{i \in a} \sum_{j \in b} V_{ij}(r_{ij})
109 > \end{equation}
110 > Here, $a$ and $b$ are two {\tt cutoffGroups} containing multiple atoms
111 > ($a = \left\{i\right\}$ and $b = \left\{j\right\}$).  $s(r_{ab})$ is a
112 > generalized switching function which insures that the atoms in the two
113 > {\tt cutoffGroups} are treated identically as the two groups enter or
114 > leave an interaction region.
115  
116 < The basic unit of an {\sc oopse} simulation is the atom. The
117 < parameters describing the atom are generalized to make the atom as
118 < flexible a representation as possible. They may represent specific
119 < atoms of an element, or be used for collections of atoms such as
98 < methyl and carbonyl groups. The atoms are also capable of having
99 < directional components associated with them (\emph{e.g.}~permanent
100 < dipoles). Charges, permanent dipoles, and Lennard-Jones parameters for
101 < a given atom type are set in the force field parameter files.
116 > {\tt Atoms} may also be grouped in more traditional ways into {\tt
117 > bonds}, {\tt bends}, and {\tt torsions}.  These groupings allow the
118 > correct choice of interaction parameters for short-range interactions
119 > to be chosen from the definitions in the {\tt forceField}.
120  
121 < \begin{lstlisting}[float,caption={[Specifier for molecules and atoms] A sample specification of an Ar molecule},label=sch:AtmMole]
121 > All of these groups of {\tt atoms} are brought together in the {\tt
122 > molecule}, which is the fundamental structure for setting up and {\sc
123 > oopse} simulation.  {\tt Molecules} contain lists of {\tt atoms}
124 > followed by listings of the other atomic groupings ({\tt bonds}, {\tt
125 > bends}, {\tt torsions}, {\tt rigidBodies}, and {\tt cutoffGroups})
126 > which relate the atoms to one another.
127 >
128 > Simulations often involve heterogeneous collections of molecules.  To
129 > specify a mixture of {\tt molecule} types, {\sc oopse} uses {\tt
130 > components}.  Even simulations containing only one type of molecule
131 > must specify a single {\tt component}.
132 >
133 > Starting a simulation requires two types of information: {\it
134 > meta-data}, which describes the types of objects present in the
135 > simulation, and {\it configuration} information, which describes the
136 > initial state of these objects.  The meta-data is given to {\sc oopse}
137 > using a C-based syntax that is parsed at the beginning of the
138 > simulation.  Configuration information is specified using an extended
139 > XYZ file format.  Both the meta-data and configuration file formats
140 > are described in the following sections.
141 >
142 > \subsection{Meta-data Files}
143 >
144 > {\sc oopse} uses a C-based script syntax to parse the meta-data files
145 > at run time.  These files allow the user to completely describe the
146 > system they wish to simulate, as well as tailor {\sc oopse}'s behavior
147 > during the simulation.  Meta-data files are typically denoted with the
148 > extension {\tt .md} (which can stand for Meta-Data or Molecular
149 > Dynamics or Molecule Definition depending on the user's mood). An
150 > example meta-data file is shown in Scheme~\ref{sch:mdExample}.
151 >
152 > \begin{lstlisting}[float,caption={[An example of a complete meta-data
153 > file] An example showing a complete meta-data
154 > file.},label={sch:mdExample}]
155 >
156   molecule{
157    name = "Ar";
158    nAtoms = 1;
# Line 109 | Line 161 | molecule{
161      position( 0.0, 0.0, 0.0 );
162    }
163   }
164 +
165 + nComponents = 1;
166 + component{
167 +  type = "Ar";
168 +  nMol = 108;
169 + }
170 +
171 + initialConfig = "./argon.in";
172 +
173 + forceField = "LJ";
174 + ensemble = "NVE"; // specify the simulation ensemble
175 + dt = 1.0;         // the time step for integration
176 + runTime = 1e3;    // the total simulation run time
177 + sampleTime = 100; // trajectory file frequency
178 + statusTime = 50;  // statistics file frequency
179 +
180   \end{lstlisting}
181  
182 + Within the meta-data file it is necessary to provide a complete
183 + description of the molecule before it is actually placed in the
184 + simulation. {\sc oopse}'s meta-data syntax was originally developed
185 + with this goal in mind, and allows for the use of {\it include files}
186 + to specify all atoms in a molecular prototype, as well as any bonds,
187 + bends, or torsions.  Include files allow the user to describe a
188 + molecular prototype once, then simply include it into each simulation
189 + containing that molecule. Returning to the example in
190 + Scheme~\ref{sch:mdExample}, the include file's contents would be
191 + Scheme~\ref{sch:mdIncludeExample}, and the new meta-data file would
192 + become Scheme~\ref{sch:mdExPrime}.
193  
194 < Atoms can be collected into secondary structures such as rigid bodies
195 < or molecules. The molecule is a way for {\sc oopse} to keep track of
117 < the atoms in a simulation in logical manner. Molecular units store the
118 < identities of all the atoms and rigid bodies associated with
119 < themselves, and are responsible for the evaluation of their own
120 < internal interactions (\emph{i.e.}~bonds, bends, and torsions). Scheme
121 < \ref{sch:AtmMole} shows how one creates a molecule in a ``model'' or
122 < \texttt{.mdl} file. The position of the atoms given in the
123 < declaration are relative to the origin of the molecule, and is used
124 < when creating a system containing the molecule.
194 > \begin{lstlisting}[float,caption={An example molecule definition in an
195 > include file.},label={sch:mdIncludeExample}]
196  
197 < As stated previously, one of the features that sets {\sc oopse} apart
198 < from most of the current molecular simulation packages is the ability
199 < to handle rigid body dynamics. Rigid bodies are non-spherical
200 < particles or collections of particles that have a constant internal
197 > molecule{
198 >  name = "Ar";
199 >  nAtoms = 1;
200 >  atom[0]{
201 >    type="Ar";
202 >    position( 0.0, 0.0, 0.0 );
203 >  }
204 > }
205 >
206 > \end{lstlisting}
207 >
208 > \begin{lstlisting}[float,caption={Revised meta-data example.},label={sch:mdExPrime}]
209 >
210 > #include "argon.md"
211 >
212 > nComponents = 1;
213 > component{
214 >  type = "Ar";
215 >  nMol = 108;
216 > }
217 >
218 > initialConfig = "./argon.in";
219 >
220 > forceField = "LJ";
221 > ensemble = "NVE";
222 > dt = 1.0;
223 > runTime = 1e3;
224 > sampleTime = 100;
225 > statusTime = 50;
226 >
227 > \end{lstlisting}
228 >
229 > \subsection{\label{oopseSec:atomsMolecules}Atoms, Molecules, and other
230 > ways of grouping atoms}
231 >
232 > As mentioned above, the fundamental unit for an {\sc oopse} simulation
233 > is the {\tt atom}.  Atoms can be collected into secondary structures
234 > such as {\tt rigidBodies}, {\tt cutoffGroups}, or {\tt molecules}. The
235 > {\tt molecule} is a way for {\sc oopse} to keep track of the atoms in
236 > a simulation in logical manner. Molecular units store the identities
237 > of all the atoms and rigid bodies associated with themselves, and they
238 > are responsible for the evaluation of their own internal interactions
239 > (\emph{i.e.}~bonds, bends, and torsions). Scheme
240 > \ref{sch:mdIncludeExample} shows how one creates a molecule in an
241 > included meta-data file. The positions of the atoms given in the
242 > declaration are relative to the origin of the molecule, and the origin
243 > is used when creating a system containing the molecule.
244 >
245 > One of the features that sets {\sc oopse} apart from most of the
246 > current molecular simulation packages is the ability to handle rigid
247 > body dynamics. Rigid bodies are non-spherical particles or collections
248 > of particles (e.g. $\mbox{C}_{60}$) that have a constant internal
249   potential and move collectively.\cite{Goldstein01} They are not
250   included in most simulation packages because of the algorithmic
251 < complexity involved in propagating orientational degrees of
252 < freedom. Until recently, integrators which propagate orientational
253 < motion have been much worse than those available for translational
254 < motion.
251 > complexity involved in propagating orientational degrees of freedom.
252 > Integrators which propagate orientational motion with an acceptable
253 > level of energy conservation for molecular dynamics are relatively
254 > new inventions.  
255  
256   Moving a rigid body involves determination of both the force and
257   torque applied by the surroundings, which directly affect the
# Line 142 | Line 261 | the rigid body. The torque on rigid body $i$ is
261   the rigid body is simply the sum of these external forces.
262   Accumulation of the total torque on the rigid body is more complex
263   than the force because the torque is applied to the center of mass of
264 < the rigid body. The torque on rigid body $i$ is
264 > the rigid body. The space-fixed torque on rigid body $i$ is
265   \begin{equation}
266   \boldsymbol{\tau}_i=
267          \sum_{a}\biggl[(\mathbf{r}_{ia}-\mathbf{r}_i)\times \mathbf{f}_{ia}
# Line 169 | Line 288 | systems.\cite{Evans77}
288   performance enhancements, particularly for very small
289   systems.\cite{Evans77}
290  
291 < {\sc oopse} utilizes a relatively new scheme that propagates the
292 < entire nine parameter rotation matrix. Further discussion
293 < on this choice can be found in Sec.~\ref{oopseSec:integrate}. An example
294 < definition of a rigid body can be seen in Scheme
295 < \ref{sch:rigidBody}. The positions in the atom definitions are the
296 < placements of the atoms relative to the origin of the rigid body,
178 < which itself has a position relative to the origin of the molecule.
291 > Rather than use one of the previously stated methods, {\sc oopse}
292 > utilizes a relatively new scheme that propagates the entire nine
293 > parameter rotation matrix. Further discussion on this choice can be
294 > found in Sec.~\ref{oopseSec:integrate}. An example definition of a
295 > rigid body can be seen in Scheme
296 > \ref{sch:rigidBody}.
297  
298 < \begin{lstlisting}[float,caption={[Defining rigid bodies]A sample definition of a rigid body},label={sch:rigidBody}]
298 > \begin{lstlisting}[float,caption={[Defining rigid bodies]A sample
299 > definition of a molecule containing a rigid body and a cutoff
300 > group},label={sch:rigidBody}]
301   molecule{
302    name = "TIP3P";
303    nAtoms = 3;
# Line 199 | Line 319 | molecule{
319      nMembers = 3;
320      members(0, 1, 2);
321    }
322 +
323 +  nCutoffGroups = 1;
324 +  cutoffGroup[0]{
325 +    nMembers = 3;
326 +    members(0, 1, 2);
327 +  }
328   }
329   \end{lstlisting}
330  
331 + \subsection{\label{sec:miscConcepts}Creating a Metadata File}
332 +
333 + The actual creation of a metadata file requires several key
334 + components. The first part of the file needs to be the declaration of
335 + all of the molecule prototypes used in the simulation. This is
336 + typically done through included meta-data files. Only the molecules
337 + actually present in the simulation need to be declared; however, {\sc
338 + oopse} allows for the declaration of more molecules than are
339 + needed. This gives the user the ability to build up a library of
340 + commonly used molecules into a single include file.
341 +
342 + Once all prototypes are declared, the ordering of the rest of the
343 + script is less stringent.  The molecular composition of the simulation
344 + is specified with {\tt component} statements. Each different type of
345 + molecule present in the simulation is considered a separate
346 + component. The number of components must be declared before the first
347 + component block statement (an example is shown in
348 + Sch.~\ref{sch:mdExPrime}).  The component blocks tell {\sc oopse} the
349 + number of molecules that will be in the simulation, and the order in
350 + which the components blocks are declared sets the ordering of the real
351 + atoms in the configuration file as well as in the output files. The
352 + remainder of the script then sets the various simulation parameters
353 + for the system of interest.
354 +
355 + The required set of parameters that must be present in all simulations
356 + is given in Table~\ref{table:reqParams}.  Since the user can use {\sc
357 + oopse} to perform energy minimizations as well as molecular dynamics
358 + simulations, one of the {\tt minimizer} or {\tt ensemble} keywords
359 + must be present.  The {\tt ensemble} keyword is responsible for
360 + selecting the integration method used for the calculation of the
361 + equations of motion. An in depth discussion of the various methods
362 + available in {\sc oopse} can be found in
363 + Sec.~\ref{oopseSec:mechanics}.  The {\tt minimizer} keyword selects
364 + which minimization method to use, and more details on the choices of
365 + minimizer parameters can be found in
366 + Sec.~\ref{oopseSec:minimizer}. The {\tt forceField} statement is
367 + important for the selection of which forces will be used in the course
368 + of the simulation. {\sc oopse} supports several force fields, as
369 + outlined in Sec.~\ref{oopseSec:empiricalEnergy}. The force fields are
370 + interchangeable between simulations, with the only requirement being
371 + that all atoms needed by the simulation are defined within the
372 + selected force field.
373 +
374 + For molecular dynamics simulations, the time step between force
375 + evaluations is set with the {\tt dt} parameter, and {\tt runTime} will
376 + set the time length of the simulation. Note, that {\tt runTime} is an
377 + absolute time, meaning if the simulation is started at t = 10.0~ns
378 + with a {\tt runTime} of 25.0~ns, the simulation will only run for an
379 + additional 15.0~ns.  
380 +
381 + For energy minimizations, it is not necessary to specify {\tt dt} or
382 + {\tt runTime}.
383 +
384 + The final required parameter is the {\tt initialConfig}
385 + statement. This will set the initial coordinates for the system, as
386 + well as the initial time if the {\tt useInitalTime} flag is set to
387 + {\tt true}. The format of the file specified in {\tt initialConfig},
388 + is given in Sec.~\ref{oopseSec:coordFiles}. Additional parameters are
389 + summarized in Table~\ref{table:genParams}.
390 +
391 + It is important to note the fundamental units in all files which are
392 + read and written by {\sc oopse}.  Energies are in $\mbox{kcal
393 + mol}^{-1}$, distances are in $\mbox{\AA}$, times are in $\mbox{fs}$,
394 + translational velocities are in $\mbox{\AA fs}^{-1}$, and masses are
395 + in $\mbox{amu}$.  Orientational degrees of freedom are described using
396 + quaternions (unitless, but $q_w^2 + q_x^2 + q_y^2 + q_z^2 = 1$),
397 + body-fixed angular momenta ($\mbox{amu \AA}^{2} \mbox{radians
398 + fs}^{-1}$), and body-fixed moments of inertia ($\mbox{amu \AA}^{2}$).
399 +
400 + \begin{table}
401 + \caption{Meta-data Keywords: Required Parameters}
402 + \label{table:reqParams}
403 + \begin{center}
404 + % Note when adding or removing columns, the \hsize numbers must add up to the total number
405 + % of columns.
406 + \begin{tabularx}{\linewidth}%
407 +  {>{\setlength{\hsize}{1.00\hsize}}X%
408 +  >{\setlength{\hsize}{0.4\hsize}}X%
409 +  >{\setlength{\hsize}{1.2\hsize}}X%
410 +  >{\setlength{\hsize}{1.4\hsize}}X}
411 +
412 + {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
413 +
414 + {\tt forceField} & string & Sets the force field. & Possible force fields are "DUFF", "LJ", and "EAM". \\
415 + {\tt nComponents} & integer & Sets the number of components. & Needs to appear before the first {\tt Component} block. \\
416 + {\tt initialConfig} & string & Sets the file containing the initial configuration. & Can point to any file containing the configuration in the correct order. \\
417 + {\tt minimizer}& string & Chooses a minimizer & Possible minimizers
418 + are "SD" and "CG". Either {\tt ensemble} or {\tt minimizer} must be specified. \\
419 + {\tt ensemble} & string & Sets the ensemble. & Possible ensembles are
420 + "NVE", "NVT", "NPTi", "NPTf", and "NPTxyz".  Either {\tt ensemble}
421 + or {\tt minimizer} must be specified. \\
422 + {\tt dt} & fs & Sets the time step. & Selection of {\tt dt} should be
423 + small enough to sample the fastest motion of the simulation. (required
424 + for molecular dynamics simulations)\\
425 + {\tt runTime} & fs & Sets the time at which the simulation should
426 + end. & This is an absolute time, and will end the simulation when the
427 + current time meets or exceeds the {\tt runTime}. (required for
428 + molecular dynamics simulations)\\
429 +
430 + \end{tabularx}
431 + \end{center}
432 + \end{table}
433 +
434 + \begin{table}
435 + \caption{Meta-data Keywords: General Parameters}
436 + \label{table:genParams}
437 + \begin{center}
438 + % Note when adding or removing columns, the \hsize numbers must add up to the total number
439 + % of columns.
440 + \begin{tabularx}{\linewidth}%
441 +  {>{\setlength{\hsize}{1.00\hsize}}X%
442 +  >{\setlength{\hsize}{0.4\hsize}}X%
443 +  >{\setlength{\hsize}{1.2\hsize}}X%
444 +  >{\setlength{\hsize}{1.4\hsize}}X}
445 +
446 + {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
447 +
448 + {\tt finalConfig} & string & Sets the name of the final
449 + output file. & Useful when stringing simulations together. Defaults to
450 + the root name of the initial meta-data file but with an {\tt .eor}
451 + extension. \\
452 + {\tt useInitialTime} & logical & Sets whether the initial time is taken from the {\tt .in} file. & Useful when recovering a simulation from a crashed processor. Default is false. \\
453 + {\tt sampleTime} & fs & Sets the frequency at which the {\tt .dump} file is written. & Default sets the frequency to the {\tt runTime}. \\
454 + {\tt statusTime} & fs & Sets the frequency at which the {\tt .stat} file is written. & Defaults set the frequency to the {\tt sampleTime}. \\
455 + {\tt cutoffRadius} & $\mbox{\AA}$ & Manually sets the cutoffRadius & Defaults to
456 + $15\mbox{\AA}$ for systems containing charges or dipoles or to $2.5
457 + \sigma_{L}$, where $\sigma_{L}$ is the largest LJ $\sigma$ in the
458 + simulation. \\
459 + {\tt switchingRadius} & $\mbox{\AA}$  & Manually sets the inner radius for the switching function. & Defaults to 95~\% of the {\tt cutoffRadius}. \\
460 + {\tt useReactionField} & logical & Turns the reaction field correction on/off. & Default is "false". \\
461 + {\tt dielectric} & unitless & Sets the dielectric constant for reaction field. & If {\tt useReactionField} is true, then {\tt dielectric} must be set. \\
462 + {\tt usePeriodicBoundaryConditions} & & & \\
463 +        & logical & Turns periodic boundary conditions on/off. & Default is "true". \\
464 + {\tt seed } & integer & Sets the seed value for the random number
465 + generator. & The seed needs to be at least 9 digits long. The default
466 + is to take the seed from the CPU clock. \\
467 + {\tt forceFieldVariant} & string & Sets the name of the variant of the
468 + force field.  ({\sc eam} has three variants: {\tt u3}, {\tt u6}, and
469 + {\tt VC}.
470 +
471 + \end{tabularx}
472 + \end{center}
473 + \end{table}
474 +
475 +
476 + \subsection{\label{oopseSec:coordFiles}Coordinate Files}
477 +
478 + The standard format for storage of a systems coordinates is a modified
479 + xyz-file syntax, the exact details of which can be seen in
480 + Scheme~\ref{sch:dumpFormat}. As all bonding and molecular information
481 + is stored in the meta-data files, the coordinate files contain only
482 + the coordinates of the objects which move independently during the
483 + simulation.  It is important to note that {\it not all atoms} are
484 + capable of independent motion.  Atoms which are part of rigid bodies
485 + are not ``integrable objects'' in the equations of motion; the rigid
486 + bodies themselves are the integrable objects.  Therefore, the
487 + coordinate file contains coordinates of all the {\tt
488 + integrableObjects} in the system.  For systems without rigid bodies,
489 + this is simply the coordinates of all the atoms.
490 +
491 + It is important to note that although the simulation propagates the
492 + complete rotation matrix, directional entities are written out using
493 + quaternions to save space in the output files.  All objects (atoms,
494 + orientational atoms, and rigid bodies) are given quaternions and
495 + angular momenta in coordinate files which are output by OOPSE, but it
496 + is not necessary for the user to specify the quaternions or angular
497 + momenta for atoms without orientational degrees of freedom.
498 +
499 + \begin{lstlisting}[float,caption={[The format of the coordinate
500 + files] An example of the format of the coordinate files. The fist line
501 + is the number of {\tt integrableObjects} (freely-moving atoms and
502 + rigid bodies). The second line begins with the time stamp followed by
503 + the three $\mathsf{H}$ column vectors. It is important to note that
504 + for extended system ensembles, additional information pertinent to the
505 + integrators may be stored on this line as well. The next lines are the
506 + coordinates for all integrable objects in the system.  The name of the
507 + integrable object is followed by position, velocity, quaternions, and
508 + lastly, body fixed angular momentum.},label=sch:dumpFormat]
509 +
510 + nIntegrable
511 + time; Hxx Hyx Hzx; Hxy Hyy Hzy; Hxz Hyz Hzz;
512 + Name1 x y z vx vy vz qw qx qy qz jx jy jz
513 + Name2 x y z vx vy vz qw qx qy qz jx jy jz
514 + etc...
515 +
516 + \end{lstlisting}
517 +
518 + The {\tt name} field for atoms is simply the atom type as specified in
519 + the meta-data file.  The {\tt name} field for a rigid body is
520 + specified as {\tt MOLTYPE\_RB\_N}, to specify that this is {\tt
521 + rigidBody} N in a molecule of type MOLTYPE.  In simulations with rigid
522 + body models of water, a sample coordinate line might be:
523 +
524 + \begin{tt}
525 + TIP3P\_RB\_0  x y z vx vy vz qw qx qy qz jx jy jz
526 + \end{tt}
527 +
528 + which tells the program that the rigid body representing a TIP3P
529 + molecule (rigid body \# 0) is listed on that line.
530 +
531 + There are three files used by {\sc oopse} which are written in the
532 + coordinate format.  They are: the initial coordinate file
533 + (\texttt{.in}), the simulation trajectory file (\texttt{.dump}), and
534 + the final coordinates or ``end-of-run'' for the simulation
535 + (\texttt{.eor}). The initial coordinate file is necessary for {\sc
536 + oopse} to start the simulation with the proper coordinates, and this
537 + file must be generated by the user before the simulation run. The
538 + trajectory (or ``dump'') file is updated during simulation and is used
539 + to store snapshots of the coordinates at regular intervals. The first
540 + frame is a duplication of the
541 + \texttt{.in} file, and each subsequent frame is appended to the file
542 + at an interval specified in the meta-data file with the
543 + \texttt{sampleTime} flag. The final coordinate file is the
544 + ``end-of-run'' file.  The \texttt{.eor} file stores the final
545 + configuration of the system for a given simulation. The file is
546 + updated at the same time as the \texttt{.dump} file, but it only
547 + contains the most recent frame. In this way, an \texttt{.eor} file may
548 + be used to initialize a second simulation should it be necessary to
549 + recover from a crash or power outage.
550 +
551 + \subsection{\label{oopseSec:initCoords}Generation of Initial Coordinates}
552 +
553 + As was stated in Sec.~\ref{oopseSec:coordFiles}, an initial coordinate
554 + file is needed to provide the starting coordinates for a simulation.
555 + Since each simulation is different, system creation is left to the end
556 + user; however, we have included a few sample programs which make some
557 + specialized structures.  The {\tt .in} file must list the integrable
558 + objects in the correct order.  The ordering of the integrable objects
559 + relies on the ordering of molecules within the meta-data file. {\sc
560 + oopse} expects the order to comply with the following guidelines:
561 + \begin{enumerate}
562 + \item All of the molecules of the first declared component are given
563 + before proceeding to the molecules of the second component, and so on
564 + for all subsequently declared components.
565 + \item The ordering of the atoms for each molecule follows the order
566 + declared in the molecule's declaration within the model file.
567 + \item Only atoms which are not members of a {\tt rigidBody} are
568 + included
569 + \item Rigid Body coordinates for a molecule are listed immediately
570 + after the the other atoms in a molecule.  Some molecules may be
571 + entirely rigid, in which case, only the rigid body coordinates are
572 + given.
573 + \end{enumerate}
574 + An example is given in the meta-data file in Scheme~\ref{sch:initEx1}
575 + which results in the {\tt .in} file shown in Scheme~\ref{sch:initEx2}.
576 +
577 + \begin{lstlisting}[float,caption={Example declaration of the
578 + $\text{I}_2$ molecule and the HCl molecule. The two molecules are then
579 + included into a simulation.}, label=sch:initEx1]
580 +
581 + molecule{
582 +  name = "I2";
583 +  nAtoms = 2;
584 +  atom[0]{
585 +    type = "I";
586 +  }
587 +  atom[1]{
588 +    type = "I";
589 +  }
590 +  nBonds = 1;
591 +  bond[0]{
592 +    members( 0, 1);
593 +  }
594 + }
595 +
596 + molecule{
597 +  name = "HCl"
598 +  nAtoms = 2;
599 +  atom[0]{
600 +    type = "H";
601 +  }
602 +  atom[1]{
603 +    type = "Cl";
604 +  }
605 +  nBonds = 1;
606 +  bond[0]{
607 +    members( 0, 1);
608 +  }
609 + }
610 +
611 + nComponents = 2;
612 + component{
613 +  type = "HCl";
614 +  nMol = 4;
615 + }
616 + component{
617 +  type = "I2";
618 +  nMol = 1;
619 + }
620 +
621 + initialConfig = "mixture.in";
622 +
623 + \end{lstlisting}
624 +
625 + \begin{lstlisting}[float,caption={The contents of the {\tt
626 + mixture.in} file matching the declarations in
627 + Scheme~\ref{sch:initEx1}. Note that even though $\text{I}_2$ is
628 + declared before HCl, the {\tt .in} file follows the order {\it in
629 + which the components were included}.},label=sch:initEx2]
630 +
631 + 10
632 + 0.0;  10.0  0.0  0.0;  0.0  10.0  0.0;  0.0  0.0  10.0;
633 + H  ...
634 + Cl ...
635 + H  ...
636 + Cl ...
637 + H  ...
638 + Cl ...
639 + H  ...
640 + Cl ...
641 + I  ...
642 + I  ...
643 +
644 + \end{lstlisting}
645 +
646 +
647 + \subsection{The Statistics File}
648 +
649 + The last output file generated by {\sc oopse} is the statistics
650 + file. This file records such statistical quantities as the
651 + instantaneous temperature (in $K$), volume (in $\mbox{\AA}^{3}$),
652 + pressure (in $\mbox{atm}$), etc. It is written out with the frequency
653 + specified in the meta-data file with the
654 + \texttt{statusTime} keyword. The file allows the user to observe the
655 + system variables as a function of simulation time while the simulation
656 + is in progress. One useful function the statistics file serves is to
657 + monitor the conserved quantity of a given simulation ensemble,
658 + allowing the user to gauge the stability of the integrator. The
659 + statistics file is denoted with the \texttt{.stat} file extension.
660 +
661 + \section{\label{oopseSec:empiricalEnergy}The Empirical Energy
662 + Functions}
663 +
664 + Like many simulation packages, {\sc oopse} splits the potential energy
665 + into the short-ranged (bonded) portion and a long-range (non-bonded)
666 + potential,
667 + \begin{equation}
668 + V = V_{\mathrm{short-range}} + V_{\mathrm{long-range}}.
669 + \end{equation}
670 + The short-ranged portion includes explicit bonds, bends and torsions,
671 + which have been defined in the meta-data file for the molecules which
672 + present in the simulation.  The functional forms and parameters for
673 + these interactions are defined by the force field which is chosen.
674 +
675 + Calculating long-range (non-bonded) potential involves a sum over all
676 + pairs of atoms (except for those atoms which are involved in a bond,
677 + bend, or torsion with each other).  If done poorly, calculating the
678 + the long-range interactions for $N$ atoms would involve $N^2$
679 + evaluations of atomic distance.  To reduce the number of distance
680 + evaluations between pairs of atoms, {\sc oopse} uses a switched cutoff
681 + with Verlet neighbor lists.\cite{allen87:csl} It is well known that
682 + neutral groups which contain charges will exhibit pathological forces
683 + unless the cutoff is applied to the neutral groups evenly instead of
684 + to the individual atoms.\cite{leach01:mm} {\sc oopse} allows users to
685 + specify cutoff groups which may contain an arbitrary number of atoms
686 + in the molecule.  Atoms in a cutoff group are treated as a single unit
687 + for the evaluation of the switching function:
688 + \begin{equation}
689 + V_{\mathrm{long-range}} = \sum_{a} \sum_{b>a} s(r_{ab}) \sum_{i \in a} \sum_{j \in b} V_{ij}(r_{ij}),
690 + \end{equation}
691 + where $r_{ab}$ is the distance between the centers of mass of the two
692 + cutoff groups ($a$ and $b$).
693 +
694 + The sums over $a$ and $b$ are over the cutoffGroups that are present
695 + in the simulation.  Atoms which are not explicitly defined as members
696 + of a {\tt cutoffGroup} are treated as a group consisting of only one
697 + atom.  The switching function, $s(r)$ is the standard cubic switching
698 + function,
699 + \begin{equation}
700 + S(r) =
701 +        \begin{cases}
702 +        1 & \text{if $r \le r_{\text{sw}}$},\\
703 +        \frac{(r_{\text{cut}} + 2r - 3r_{\text{sw}})(r_{\text{cut}} - r)^2}
704 +        {(r_{\text{cut}} - r_{\text{sw}})^2}
705 +        & \text{if $r_{\text{sw}} < r \le r_{\text{cut}}$}, \\
706 +        0 & \text{if $r > r_{\text{cut}}$.}
707 +        \end{cases}
708 + \label{eq:dipoleSwitching}
709 + \end{equation}
710 + Here, $r_{\text{sw}}$ is the {\tt switchingRadius}, or the distance
711 + beyond which interactions are reduced, and $r_{\text{cut}}$ is the
712 + {\tt cutoffRadius}, or the distance at which interactions are
713 + truncated.
714 +
715 + Users of {\sc oopse} do not need to specify the {\tt cutoffRadius} or
716 + {\tt switchingRadius}.  In simulations containing only Lennard-Jones
717 + atoms, the cutoff radius has a default value of $2.5\sigma_{ii}$,
718 + where $\sigma_{ii}$ is the largest Lennard-Jones length parameter
719 + present in the simulation.  In simulations containing charged or
720 + dipolar atoms, the default cutoff Radius is $15 \mbox{\AA}$.  
721 +
722 + The {\tt switchingRadius} is set to a default value of 95\% of the
723 + {\tt cutoffRadius}.  In the special case of a simulation containing
724 + {\it only} Lennard-Jones atoms, the default switching radius takes the
725 + same value as the cutoff radius, and {\sc oopse} will use a shifted
726 + potential to remove discontinuities in the potential at the cutoff.
727 + Both radii may be specified in the meta-data file.
728 +
729 + Force fields can easily be added to {\sc oopse}, although it comes
730 + with a few simple examples (Lennard-Jones, {\sc duff}, {\sc water},
731 + and {\sc eam}) which are explained in the following sections.
732 +
733   \subsection{\label{sec:LJPot}The Lennard Jones Force Field}
734  
735   The most basic force field implemented in {\sc oopse} is the
736 < Lennard-Jones force field, which mimics the van der Waals interaction at
737 < long distances, and uses an empirical repulsion at short
736 > Lennard-Jones force field, which mimics the van der Waals interaction
737 > at long distances and uses an empirical repulsion at short
738   distances. The Lennard-Jones potential is given by:
739   \begin{equation}
740   V_{\text{LJ}}(r_{ij}) =
# Line 219 | Line 747 | $\epsilon_{ij}$ scales the well depth of the potential
747   where $r_{ij}$ is the distance between particles $i$ and $j$,
748   $\sigma_{ij}$ scales the length of the interaction, and
749   $\epsilon_{ij}$ scales the well depth of the potential. Scheme
750 < \ref{sch:LJFF} gives an example \texttt{.bass} file that
750 > \ref{sch:LJFF} gives an example meta-data file that
751   sets up a system of 108 Ar particles to be simulated using the
752   Lennard-Jones force field.
753  
754 < \begin{lstlisting}[float,caption={[Invocation of the Lennard-Jones force field] A sample system using the Lennard-Jones force field.},label={sch:LJFF}]
754 > \begin{lstlisting}[float,caption={[Invocation of the Lennard-Jones
755 > force field] A sample meta-data file for a small Lennard-Jones
756 > simulation.},label={sch:LJFF}]
757  
758 < #include "argon.mdl"
758 > #include "argon.md"
759  
760   nComponents = 1;
761   component{
# Line 233 | Line 763 | initialConfig = "./argon.init";
763    nMol = 108;
764   }
765  
766 < initialConfig = "./argon.init";
766 > initialConfig = "./argon.in";
767  
768   forceField = "LJ";
769   \end{lstlisting}
770  
241 Because this potential is calculated between all pairs, the force
242 evaluation can become computationally expensive for large systems. To
243 keep the pair evaluations to a manageable number, {\sc oopse} employs
244 a cut-off radius.\cite{allen87:csl} The cutoff radius can either be
245 specified in the \texttt{.bass} file, or left as its default value of
246 $2.5\sigma_{ii}$, where $\sigma_{ii}$ is the largest Lennard-Jones
247 length parameter present in the simulation. Truncating the calculation
248 at $r_{\text{cut}}$ introduces a discontinuity into the potential
249 energy and the force. To offset this discontinuity in the potential,
250 the energy value at $r_{\text{cut}}$ is subtracted from the
251 potential. This causes the potential to go to zero smoothly at the
252 cut-off radius, and preserves conservation of energy in integrating
253 the equations of motion. There still remains a discontinuity in the derivative (the forces), however, this does not significantly affect the dynamics.
254
771   Interactions between dissimilar particles requires the generation of
772 < cross term parameters for $\sigma$ and $\epsilon$. These are
773 < calculated through the Lorentz-Berthelot mixing
772 > cross term parameters for $\sigma$ and $\epsilon$. These parameters
773 > are determined using the Lorentz-Berthelot mixing
774   rules:\cite{allen87:csl}
775   \begin{equation}
776   \sigma_{ij} = \frac{1}{2}[\sigma_{ii} + \sigma_{jj}],
# Line 269 | Line 785 | simulate lipid bilayers. The simulations require a mod
785   \subsection{\label{oopseSec:DUFF}Dipolar Unified-Atom Force Field}
786  
787   The dipolar unified-atom force field ({\sc duff}) was developed to
788 < simulate lipid bilayers. The simulations require a model capable of
789 < forming bilayers, while still being sufficiently computationally
790 < efficient to allow large systems ($\sim$100's of phospholipids,
791 < $\sim$1000's of waters) to be simulated for long times
792 < ($\sim$10's of nanoseconds).
788 > simulate lipid bilayers. These types of simulations require a model
789 > capable of forming bilayers, while still being sufficiently
790 > computationally efficient to allow large systems ($\sim$100's of
791 > phospholipids, $\sim$1000's of waters) to be simulated for long times
792 > ($\sim$10's of nanoseconds). With this goal in mind, {\sc duff} has no
793 > point charges. Charge-neutral distributions are replaced with dipoles,
794 > while most atoms and groups of atoms are reduced to Lennard-Jones
795 > interaction sites. This simplification reduces the length scale of
796 > long range interactions from $\frac{1}{r}$ to $\frac{1}{r^3}$,
797 > removing the need for the computationally expensive Ewald
798 > sum. Instead, Verlet neighbor-lists and cutoff radii are used for the
799 > dipolar interactions, and, if desired, a reaction field may be added
800 > to mimic longer range interactions.
801  
278 With this goal in mind, {\sc duff} has no point
279 charges. Charge-neutral distributions were replaced with dipoles,
280 while most atoms and groups of atoms were reduced to Lennard-Jones
281 interaction sites. This simplification cuts the length scale of long
282 range interactions from $\frac{1}{r}$ to $\frac{1}{r^3}$, and allows
283 us to avoid the computationally expensive Ewald sum. Instead, we can
284 use neighbor-lists and cutoff radii for the dipolar interactions, or
285 include a reaction field to mimic larger range interactions.
286
802   As an example, lipid head-groups in {\sc duff} are represented as
803 < point dipole interaction sites. By placing a dipole at the head
804 < group's center of mass, our model mimics the charge separation found
805 < in common phospholipid head groups such as
806 < phosphatidylcholine.\cite{Cevc87} Additionally, a large Lennard-Jones
807 < site is located at the pseudoatom's center of mass. The model is
808 < illustrated by the red atom in Fig.~\ref{oopseFig:lipidModel}. The
809 < water model we use to complement the dipoles of the lipids is our
810 < reparameterization of the soft sticky dipole (SSD) model of Ichiye
803 > point dipole interaction sites.  Placing a dipole at the head group's
804 > center of mass mimics the charge separation found in common
805 > phospholipid head groups such as phosphatidylcholine.\cite{Cevc87}
806 > Additionally, a large Lennard-Jones site is located at the
807 > pseudoatom's center of mass. The model is illustrated by the red atom
808 > in Fig.~\ref{oopseFig:lipidModel}. The water model we use to
809 > complement the dipoles of the lipids is a
810 > reparameterization\cite{fennell04} of the soft sticky dipole (SSD)
811 > model of Ichiye
812   \emph{et al.}\cite{liu96:new_model}
813  
814   \begin{figure}
815   \centering
816 < \includegraphics[width=\linewidth]{twoChainFig.pdf}
817 < \caption[A representation of a lipid model in {\sc duff}]{A representation of the lipid model. $\phi$ is the torsion angle, $\theta$ %
818 < is the bend angle, and $\mu$ is the dipole moment of the head group.}
816 > \includegraphics[width=\linewidth]{lipidModel.eps}
817 > \caption[A representation of a lipid model in {\sc duff}]{A
818 > representation of the lipid model. $\phi$ is the torsion angle,
819 > $\theta$ is the bend angle, and $\mu$ is the dipole moment of the head
820 > group.}
821   \label{oopseFig:lipidModel}
822   \end{figure}
823  
824 < We have used a set of scalable parameters to model the alkyl groups
825 < with Lennard-Jones sites. For this, we have borrowed parameters from
826 < the TraPPE force field of Siepmann
827 < \emph{et al}.\cite{Siepmann1998} TraPPE is a unified-atom
828 < representation of n-alkanes, which is parametrized against phase
829 < equilibria using Gibbs ensemble Monte Carlo simulation
830 < techniques.\cite{Siepmann1998} One of the advantages of TraPPE is that
831 < it generalizes the types of atoms in an alkyl chain to keep the number
832 < of pseudoatoms to a minimum; the parameters for a unified atom such as
833 < $\text{CH}_2$ do not change depending on what species are bonded to
316 < it.
824 > A set of scalable parameters has been used to model the alkyl groups
825 > with Lennard-Jones sites. For this, parameters from the TraPPE force
826 > field of Siepmann \emph{et al.}\cite{Siepmann1998} have been
827 > utilized. TraPPE is a unified-atom representation of n-alkanes which
828 > is parametrized against phase equilibria using Gibbs ensemble Monte
829 > Carlo simulation techniques.\cite{Siepmann1998} One of the advantages
830 > of TraPPE is that it generalizes the types of atoms in an alkyl chain
831 > to keep the number of pseudoatoms to a minimum; thus, the parameters
832 > for a unified atom such as $\text{CH}_2$ do not change depending on
833 > what species are bonded to it.
834  
835 < TraPPE also constrains all bonds to be of fixed length. Typically,
836 < bond vibrations are the fastest motions in a molecular dynamic
837 < simulation. Small time steps between force evaluations must be used to
838 < ensure adequate energy conservation in the bond degrees of freedom. By
839 < constraining the bond lengths, larger time steps may be used when
840 < integrating the equations of motion. A simulation using {\sc duff} is
841 < illustrated in Scheme \ref{sch:DUFF}.
835 > As is required by TraPPE, {\sc duff} also constrains all bonds to be
836 > of fixed length. Typically, bond vibrations are the fastest motions in
837 > a molecular dynamic simulation.  With these vibrations present, small
838 > time steps between force evaluations must be used to ensure adequate
839 > energy conservation in the bond degrees of freedom. By constraining
840 > the bond lengths, larger time steps may be used when integrating the
841 > equations of motion. A simulation using {\sc duff} is illustrated in
842 > Scheme \ref{sch:DUFF}.
843  
844 < \begin{lstlisting}[float,caption={[Invocation of {\sc duff}]A portion of a \texttt{.bass} file showing a simulation utilizing {\sc duff}},label={sch:DUFF}]
844 > \begin{lstlisting}[float,caption={[Invocation of {\sc duff}]A portion
845 > of a meta-data file showing a simulation utilizing {\sc
846 > duff}},label={sch:DUFF}]  
847  
848 < #include "water.mdl"
849 < #include "lipid.mdl"
848 > #include "water.md"
849 > #include "lipid.md"
850  
851   nComponents = 2;
852   component{
# Line 339 | Line 859 | initialConfig = "bilayer.init";
859    nMol = 1936;
860   }
861  
862 < initialConfig = "bilayer.init";
862 > initialConfig = "bilayer.in";
863  
864   forceField = "DUFF";
865  
866   \end{lstlisting}
867  
868 < \subsection{\label{oopseSec:energyFunctions}{\sc duff} Energy Functions}
868 > \subsubsection{\label{oopseSec:energyFunctions}{\sc duff} Energy Functions}
869  
870   The total potential energy function in {\sc duff} is
871   \begin{equation}
# Line 365 | Line 885 | within the molecule $I$, and $V_{\text{torsion}}$ is t
885   \label{eq:internalPotential}
886   \end{equation}
887   Here $V_{\text{bend}}$ is the bend potential for all 1, 3 bonded pairs
888 < within the molecule $I$, and $V_{\text{torsion}}$ is the torsion potential
889 < for all 1, 4 bonded pairs. The pairwise portions of the internal
890 < potential are excluded for atom pairs that are involved in the same bond, bend, or torsion. All other atom pairs within the molecule are subject to the LJ pair potential.
888 > within the molecule $I$, and $V_{\text{torsion}}$ is the torsion
889 > potential for all 1, 4 bonded pairs.  The pairwise portions of the
890 > non-bonded interactions are excluded for atom pairs that are involved
891 > in the smae bond, bend, or torsion. All other atom pairs within a
892 > molecule are subject to the LJ pair potential.
893  
372
894   The bend potential of a molecule is represented by the following function:
895   \begin{equation}
896 < V_{\text{bend}}(\theta_{ijk}) = k_{\theta}( \theta_{ijk} - \theta_0 )^2, \label{eq:bendPot}
896 > V_{\text{bend}}(\theta_{ijk}) = k_{\theta}( \theta_{ijk} - \theta_0
897 > )^2, \label{eq:bendPot}
898   \end{equation}
899   where $\theta_{ijk}$ is the angle defined by atoms $i$, $j$, and $k$
900   (see Fig.~\ref{oopseFig:lipidModel}), $\theta_0$ is the equilibrium
# Line 412 | Line 934 | evaluations are avoided during the calculation of the
934   k_3 &= 4c_3.
935   \end{align*}
936   By recasting the potential as a power series, repeated trigonometric
937 < evaluations are avoided during the calculation of the potential energy.
937 > evaluations are avoided during the calculation of the potential
938 > energy.
939  
940  
941 < The cross potential between molecules $I$ and $J$, $V^{IJ}_{\text{Cross}}$, is
942 < as follows:
941 > The cross potential between molecules $I$ and $J$,
942 > $V^{IJ}_{\text{Cross}}$, is as follows:
943   \begin{equation}
944   V^{IJ}_{\text{Cross}} =
945          \sum_{i \in I} \sum_{j \in J}
# Line 446 | Line 969 | respectively. $|\mu_i|$ is the magnitude of the dipole
969   Here $\mathbf{r}_{ij}$ is the vector starting at atom $i$ pointing
970   towards $j$, and $\boldsymbol{\Omega}_i$ and $\boldsymbol{\Omega}_j$
971   are the orientational degrees of freedom for atoms $i$ and $j$
972 < respectively. $|\mu_i|$ is the magnitude of the dipole moment of atom
973 < $i$, $\boldsymbol{\hat{u}}_i$ is the standard unit orientation vector
974 < of $\boldsymbol{\Omega}_i$, and $\boldsymbol{\hat{r}}_{ij}$ is the
975 < unit vector pointing along $\mathbf{r}_{ij}$
972 > respectively. The magnitude of the dipole moment of atom $i$ is
973 > $|\mu_i|$, $\boldsymbol{\hat{u}}_i$ is the standard unit orientation
974 > vector of $\boldsymbol{\Omega}_i$, and $\boldsymbol{\hat{r}}_{ij}$ is
975 > the unit vector pointing along $\mathbf{r}_{ij}$
976   ($\boldsymbol{\hat{r}}_{ij}=\mathbf{r}_{ij}/|\mathbf{r}_{ij}|$).
977  
978 < To improve computational efficiency of the dipole-dipole interactions,
979 < {\sc oopse} employs an electrostatic cutoff radius. This parameter can
457 < be set in the \texttt{.bass} file, and controls the length scale over
458 < which dipole interactions are felt. To compensate for the
459 < discontinuity in the potential and the forces at the cutoff radius, we
460 < have implemented a switching function to smoothly scale the
461 < dipole-dipole interaction at the cutoff.
462 < \begin{equation}
463 < S(r_{ij}) =
464 <        \begin{cases}
465 <        1 & \text{if $r_{ij} \le r_t$},\\
466 <        \frac{(r_{\text{cut}} + 2r_{ij} - 3r_t)(r_{\text{cut}} - r_{ij})^2}
467 <        {(r_{\text{cut}} - r_t)^2}
468 <        & \text{if $r_t < r_{ij} \le r_{\text{cut}}$}, \\
469 <        0 & \text{if $r_{ij} > r_{\text{cut}}$.}
470 <        \end{cases}
471 < \label{eq:dipoleSwitching}
472 < \end{equation}
473 < Here $S(r_{ij})$ scales the potential at a given $r_{ij}$, and $r_t$
474 < is the taper radius some given thickness less than the electrostatic
475 < cutoff. The switching thickness can be set in the \texttt{.bass} file.
978 > \subsubsection{\label{oopseSec:SSD}The {\sc duff} Water Models: SSD/E
979 > and SSD/RF}
980  
477 \subsection{\label{oopseSec:SSD}The {\sc duff} Water Models: SSD/E and SSD/RF}
478
981   In the interest of computational efficiency, the default solvent used
982   by {\sc oopse} is the extended Soft Sticky Dipole (SSD/E) water
983   model.\cite{fennell04} The original SSD was developed by Ichiye
# Line 534 | Line 1036 | Since SSD/E is a single-point {\it dipolar} model, the
1036   can be found in the original SSD
1037   articles.\cite{liu96:new_model,liu96:monte_carlo,chandra99:ssd_md,Ichiye03}
1038  
1039 + \begin{figure}
1040 + \centering
1041 + \includegraphics[width=\linewidth]{waterAngle.eps}
1042 + \caption[Coordinate definition for the SSD/E water model]{Coordinates
1043 + for the interaction between two SSD/E water molecules.  $\theta_{ij}$
1044 + is the angle that $r_{ij}$ makes with the $\hat{z}$ vector in the
1045 + body-fixed frame for molecule $i$.  The $\hat{z}$ vector bisects the
1046 + HOH angle in each water molecule. }
1047 + \label{oopseFig:ssd}
1048 + \end{figure}
1049 +
1050 +
1051   Since SSD/E is a single-point {\it dipolar} model, the force
1052   calculations are simplified significantly relative to the standard
1053   {\it charged} multi-point models. In the original Monte Carlo
1054   simulations using this model, Ichiye {\it et al.} reported that using
1055   SSD decreased computer time by a factor of 6-7 compared to other
1056 < models.\cite{liu96:new_model} What is most impressive is that these savings
1057 < did not come at the expense of accurate depiction of the liquid state
1058 < properties.  Indeed, SSD/E maintains reasonable agreement with the Head-Gordon
1059 < diffraction data for the structural features of liquid
1060 < water.\cite{hura00,liu96:new_model} Additionally, the dynamical properties
1061 < exhibited by SSD/E agree with experiment better than those of more
1062 < computationally expensive models (like TIP3P and
1063 < SPC/E).\cite{chandra99:ssd_md} The combination of speed and accurate depiction
1064 < of solvent properties makes SSD/E a very attractive model for the
1065 < simulation of large scale biochemical simulations.
1056 > models.\cite{liu96:new_model} What is most impressive is that these
1057 > savings did not come at the expense of accurate depiction of the
1058 > liquid state properties.  Indeed, SSD/E maintains reasonable agreement
1059 > with the Head-Gordon diffraction data for the structural features of
1060 > liquid water.\cite{hura00,liu96:new_model} Additionally, the dynamical
1061 > properties exhibited by SSD/E agree with experiment better than those
1062 > of more computationally expensive models (like TIP3P and
1063 > SPC/E).\cite{chandra99:ssd_md} The combination of speed and accurate
1064 > depiction of solvent properties makes SSD/E a very attractive model
1065 > for the simulation of large scale biochemical simulations.
1066  
1067   Recent constant pressure simulations revealed issues in the original
1068   SSD model that led to lower than expected densities at all target
# Line 557 | Line 1071 | model (an SSD variant  parameterized for reaction fiel
1071   exhibits improved liquid structure and transport behavior. If the use
1072   of a reaction field long-range interaction correction is desired, it
1073   is recommended that the parameters be modified to those of the SSD/RF
1074 < model (an SSD variant  parameterized for reaction field). Solvent parameters can be easily modified in an accompanying
1075 < \texttt{.bass} file as illustrated in the scheme below. A table of the
1076 < parameter values and the drawbacks and benefits of the different
1077 < density corrected SSD models can be found in
1078 < reference~\cite{fennell04}.
565 <
566 < \begin{lstlisting}[float,caption={[A simulation of {\sc ssd} water]A portion of a \texttt{.bass} file showing a simulation including {\sc ssd} water.},label={sch:ssd}]
567 <
568 < #include "water.mdl"
1074 > model (an SSD variant parameterized for reaction field). These solvent
1075 > parameters are listed and can be easily modified in the {\sc duff}
1076 > force field file ({\tt DUFF.frc}).  A table of the parameter values
1077 > and the drawbacks and benefits of the different density corrected SSD
1078 > models can be found in reference~\citen{fennell04}.
1079  
570 nComponents = 1;
571 component{
572  type = "SSD_water";
573  nMol = 864;
574 }
575
576 initialConfig = "liquidWater.init";
577
578 forceField = "DUFF";
579
580 /*
581 * The following two flags set the cutoff
582 * radius for the electrostatic forces
583 * as well as the skin thickness of the switching
584 * function.
585 */
586
587 electrostaticCutoffRadius  = 9.2;
588 electrostaticSkinThickness = 1.38;
589
590 \end{lstlisting}
591
592
1080   \subsection{\label{oopseSec:eam}Embedded Atom Method}
1081  
1082 < There are Molecular Dynamics packages which have the
1083 < capacity to simulate metallic systems, including some that have
1084 < parallel computational abilities\cite{plimpton93}. Potentials that
1085 < describe bonding transition metal
1086 < systems\cite{Finnis84,Ercolessi88,Chen90,Qi99,Ercolessi02} have an
600 < attractive interaction which models  ``Embedding''
601 < a positively charged metal ion in the electron density due to the
1082 > {\sc oopse} implements a potential that describes bonding in
1083 > transition metal
1084 > systems.~\cite{Finnis84,Ercolessi88,Chen90,Qi99,Ercolessi02} This
1085 > potential has an attractive interaction which models ``Embedding'' a
1086 > positively charged pseudo-atom core in the electron density due to the
1087   free valance ``sea'' of electrons created by the surrounding atoms in
1088 < the system. A mostly-repulsive pairwise part of the potential
1089 < describes the interaction of the positively charged metal core ions
1090 < with one another. A particular potential description called the
1091 < Embedded Atom Method\cite{Daw84,FBD86,johnson89,Lu97}({\sc eam}) that has
1092 < particularly wide adoption has been selected for inclusion in {\sc oopse}. A
1093 < good review of {\sc eam} and other metallic potential formulations was written
1094 < by Voter.\cite{voter}
1088 > the system.  A pairwise part of the potential (which is primarily
1089 > repulsive) describes the interaction of the positively charged metal
1090 > core ions with one another.  The Embedded Atom Method ({\sc
1091 > eam})~\cite{Daw84,FBD86,johnson89,Lu97} has been widely adopted in the
1092 > materials science community and has been included in {\sc oopse}. A
1093 > good review of {\sc eam} and other formulations of metallic potentials
1094 > was given by Voter.\cite{Voter:95}
1095  
1096   The {\sc eam} potential has the form:
1097 < \begin{eqnarray}
1098 < V & = & \sum_{i} F_{i}\left[\rho_{i}\right] + \sum_{i} \sum_{j \neq i}
1099 < \phi_{ij}({\bf r}_{ij}),  \\
1100 < \rho_{i}  & = & \sum_{j \neq i} f_{j}({\bf r}_{ij}),
1101 < \end{eqnarray}
617 < where $F_{i} $ is the embedding function that equates the energy
1097 > \begin{equation}
1098 > V  =  \sum_{i} F_{i}\left[\rho_{i}\right] + \sum_{i} \sum_{j \neq i}
1099 > \phi_{ij}({\bf r}_{ij})
1100 > \end{equation}
1101 > where $F_{i} $ is an embedding functional that approximates the energy
1102   required to embed a positively-charged core ion $i$ into a linear
1103   superposition of spherically averaged atomic electron densities given
1104 < by $\rho_{i}$.  $\phi_{ij}$ is a primarily repulsive pairwise
621 < interaction between atoms $i$ and $j$. In the original formulation of
622 < {\sc eam}\cite{Daw84}, $\phi_{ij}$ was an entirely repulsive term,
623 < however in later refinements to {\sc eam} have shown that non-uniqueness
624 < between $F$ and $\phi$ allow for more general forms for
625 < $\phi$.\cite{Daw89} There is a cutoff distance, $r_{cut}$, which
626 < limits the summations in the {\sc eam} equation to the few dozen atoms
627 < surrounding atom $i$ for both the density $\rho$ and pairwise $\phi$
628 < interactions. Foiles \emph{et al}.~fit {\sc eam} potentials for the fcc
629 < metals Cu, Ag, Au, Ni, Pd, Pt and alloys of these metals.\cite{FBD86}
630 < These fits are included in {\sc oopse}.
631 <
632 < \subsection{\label{oopseSec:pbc}Periodic Boundary Conditions}
633 <
634 < \newcommand{\roundme}{\operatorname{round}}
635 <
636 < \textit{Periodic boundary conditions} are widely used to simulate bulk properties with a relatively small number of particles. The
637 < simulation box is replicated throughout space to form an infinite
638 < lattice.  During the simulation, when a particle moves in the primary
639 < cell, its image in other cells move in exactly the same direction with
640 < exactly the same orientation. Thus, as a particle leaves the primary
641 < cell, one of its images will enter through the opposite face. If the
642 < simulation box is large enough to avoid ``feeling'' the symmetries of
643 < the periodic lattice, surface effects can be ignored. The available
644 < periodic cells in OOPSE are cubic, orthorhombic and parallelepiped. We
645 < use a $3 \times 3$ matrix, $\mathsf{H}$, to describe the shape and
646 < size of the simulation box. $\mathsf{H}$ is defined:
1104 > by $\rho_{i}$,
1105   \begin{equation}
1106 < \mathsf{H} = ( \mathbf{h}_x, \mathbf{h}_y, \mathbf{h}_z ),
1106 > \rho_{i}   =  \sum_{j \neq i} f_{j}({\bf r}_{ij}),
1107   \end{equation}
1108 < where $\mathbf{h}_{\alpha}$ is the column vector of the $\alpha$ axis of the
1109 < box.  During the course of the simulation both the size and shape of
1110 < the box can be changed to allow volume fluctuations when constraining
1111 < the pressure.
1108 > Since the density at site $i$ ($\rho_i$) must be computed before the
1109 > embedding functional can be evaluated, {\sc eam} and the related
1110 > transition metal potentials require two loops through the atom pairs
1111 > to compute the inter-atomic forces.
1112  
1113 < A real space vector, $\mathbf{r}$ can be transformed in to a box space
1114 < vector, $\mathbf{s}$, and back through the following transformations:
1115 < \begin{align}
1116 < \mathbf{s} &= \mathsf{H}^{-1} \mathbf{r}, \\
1117 < \mathbf{r} &= \mathsf{H} \mathbf{s}.
1118 < \end{align}
1119 < The vector $\mathbf{s}$ is now a vector expressed as the number of box
1120 < lengths in the $\mathbf{h}_x$, $\mathbf{h}_y$, and $\mathbf{h}_z$
1121 < directions. To find the minimum image of a vector $\mathbf{r}$, we
1122 < first convert it to its corresponding vector in box space, and then,
1123 < cast each element to lie in the range $[-0.5,0.5]$:
666 < \begin{equation}
667 < s_{i}^{\prime}=s_{i}-\roundme(s_{i}),
668 < \end{equation}
669 < where $s_i$ is the $i$th element of $\mathbf{s}$, and
670 < $\roundme(s_i)$ is given by
671 < \begin{equation}
672 < \roundme(x) =
673 <        \begin{cases}
674 <        \lfloor x+0.5 \rfloor & \text{if $x \ge 0$,} \\
675 <        \lceil x-0.5 \rceil & \text{if $x < 0$.}
676 <        \end{cases}
677 < \end{equation}
678 < Here $\lfloor x \rfloor$ is the floor operator, and gives the largest
679 < integer value that is not greater than $x$, and $\lceil x \rceil$ is
680 < the ceiling operator, and gives the smallest integer that is not less
681 < than $x$.  For example, $\roundme(3.6)=4$, $\roundme(3.1)=3$,
682 < $\roundme(-3.6)=-4$, $\roundme(-3.1)=-3$.
1113 > The pairwise portion of the potential, $\phi_{ij}$, is a primarily
1114 > repulsive interaction between atoms $i$ and $j$. In the original
1115 > formulation of {\sc eam}\cite{Daw84}, $\phi_{ij}$ was an entirely
1116 > repulsive term; however later refinements to {\sc eam} allowed for
1117 > more general forms for $\phi$.\cite{Daw89} The effective cutoff
1118 > distance, $r_{{\text cut}}$ is the distance at which the values of
1119 > $f(r)$ and $\phi(r)$ drop to zero for all atoms present in the
1120 > simulation.  In practice, this distance is fairly small, limiting the
1121 > summations in the {\sc eam} equation to the few dozen atoms
1122 > surrounding atom $i$ for both the density $\rho$ and pairwise $\phi$
1123 > interactions.
1124  
1125 < Finally, we obtain the minimum image coordinates $\mathbf{r}^{\prime}$ by
1126 < transforming back to real space,
1127 < \begin{equation}
1128 < \mathbf{r}^{\prime}=\mathsf{H}^{-1}\mathbf{s}^{\prime}.%
1129 < \end{equation}
1130 < In this way, particles are allowed to diffuse freely in $\mathbf{r}$,
1131 < but their minimum images, $\mathbf{r}^{\prime}$ are used to compute
1132 < the inter-atomic forces.
1125 > In computing forces for alloys, mixing rules as outlined by
1126 > Johnson~\cite{johnson89} are used to compute the heterogenous pair
1127 > potential,
1128 > \begin{eqnarray}
1129 > \label{eq:johnson}
1130 > \phi_{ab}(r)=\frac{1}{2}\left(
1131 > \frac{f_{b}(r)}{f_{a}(r)}\phi_{aa}(r)+
1132 > \frac{f_{a}(r)}{f_{b}(r)}\phi_{bb}(r)
1133 > \right).
1134 > \end{eqnarray}
1135 > No mixing rule is needed for the densities, since the density at site
1136 > $i$ is simply the linear sum of density contributions of all the other
1137 > atoms.
1138  
1139 + The {\sc eam} force field illustrates an additional feature of {\sc
1140 + oopse}.  Foiles, Baskes and Daw fit {\sc eam} potentials for Cu, Ag,
1141 + Au, Ni, Pd, Pt and alloys of these metals.\cite{FBD86} These fits are
1142 + included in {\sc oopse} as the {\tt u3} variant of the {\sc eam} force
1143 + field.  Voter and Chen reparamaterized a set of {\sc eam} functions
1144 + which do a better job of predicting melting points.\cite{Voter:87}
1145 + These functions are included in {\sc oopse} as the {\tt VC} variant of
1146 + the {\sc eam} force field.  An additional set of functions (the
1147 + ``Universal 6'' functions) are included in {\sc oopse} as the {\tt u6}
1148 + variant of {\sc eam}.  For example, to specify the Voter-Chen variant
1149 + of the {\sc eam} force field, the user would add the {\tt
1150 + forceFieldVariant = "VC";} line to the meta-data file.
1151  
1152 < \section{\label{oopseSec:IOfiles}Input and Output Files}
1152 > The potential files used by the {\sc eam} force field are in the
1153 > standard {\tt funcfl} format, which is the format utilized by a number
1154 > of other codes (e.g. ParaDyn~\cite{Paradyn}, {\sc dynamo 86}).  It
1155 > should be noted that the energy units in these files are in eV, not
1156 > $\mbox{kcal mol}^{-1}$ as in the rest of the {\sc oopse} force field
1157 > files.  
1158  
1159 < \subsection{{\sc bass} and Model Files}
1159 > \subsection{\label{oopseSec:pbc}Periodic Boundary Conditions}
1160  
1161 < Every {\sc oopse} simulation begins with a Bizarre Atom Simulation
699 < Syntax ({\sc bass}) file. {\sc bass} is a script syntax that is parsed
700 < by {\sc oopse} at runtime. The {\sc bass} file allows for the user to
701 < completely describe the system they wish to simulate, as well as tailor
702 < {\sc oopse}'s behavior during the simulation. {\sc bass} files are
703 < denoted with the extension
704 < \texttt{.bass}, an example file is shown in
705 < Scheme~\ref{sch:bassExample}.
1161 > \newcommand{\roundme}{\operatorname{round}}
1162  
1163 < \begin{lstlisting}[float,caption={[An example of a complete {\sc bass} file] An example showing a complete {\sc bass} file.},label={sch:bassExample}]
1164 <
1165 < molecule{
1166 <  name = "Ar";
1167 <  nAtoms = 1;
1168 <  atom[0]{
1169 <    type="Ar";
1170 <    position( 0.0, 0.0, 0.0 );
1171 <  }
1172 < }
1173 <
1174 < nComponents = 1;
1175 < component{
1176 <  type = "Ar";
1177 <  nMol = 108;
1178 < }
1179 <
1180 < initialConfig = "./argon.init";
1181 <
1182 < forceField = "LJ";
727 < ensemble = "NVE"; // specify the simulation ensemble
728 < dt = 1.0;         // the time step for integration
729 < runTime = 1e3;    // the total simulation run time
730 < sampleTime = 100; // trajectory file frequency
731 < statusTime = 50;  // statistics file frequency
732 <
733 < \end{lstlisting}
734 <
735 < Within the \texttt{.bass} file it is necessary to provide a complete
736 < description of the molecule before it is actually placed in the
737 < simulation. The {\sc bass} syntax was originally developed with this
738 < goal in mind, and allows for the specification of all the atoms in a
739 < molecular prototype, as well as any bonds, bends, or torsions. These
740 < descriptions can become lengthy for complex molecules, and it would be
741 < inconvenient to duplicate the simulation at the beginning of each {\sc
742 < bass} script. Addressing this issue {\sc bass} allows for the
743 < inclusion of model files at the top of a \texttt{.bass} file. These
744 < model files, denoted with the \texttt{.mdl} extension, allow the user
745 < to describe a molecular prototype once, then simply include it into
746 < each simulation containing that molecule. Returning to the example in
747 < Scheme~\ref{sch:bassExample}, the \texttt{.mdl} file's contents would
748 < be Scheme~\ref{sch:mdlExample}, and the new \texttt{.bass} file would
749 < become Scheme~\ref{sch:bassExPrime}.
750 <
751 < \begin{lstlisting}[float,caption={An example \texttt{.mdl} file.},label={sch:mdlExample}]
752 <
753 < molecule{
754 <  name = "Ar";
755 <  nAtoms = 1;
756 <  atom[0]{
757 <    type="Ar";
758 <    position( 0.0, 0.0, 0.0 );
759 <  }
760 < }
761 <
762 < \end{lstlisting}
763 <
764 < \begin{lstlisting}[float,caption={Revised {\sc bass} example.},label={sch:bassExPrime}]
765 <
766 < #include "argon.mdl"
767 <
768 < nComponents = 1;
769 < component{
770 <  type = "Ar";
771 <  nMol = 108;
772 < }
773 <
774 < initialConfig = "./argon.init";
775 <
776 < forceField = "LJ";
777 < ensemble = "NVE";
778 < dt = 1.0;
779 < runTime = 1e3;
780 < sampleTime = 100;
781 < statusTime = 50;
782 <
783 < \end{lstlisting}
784 <
785 < \subsection{\label{oopseSec:coordFiles}Coordinate Files}
786 <
787 < The standard format for storage of a systems coordinates is a modified
788 < xyz-file syntax, the exact details of which can be seen in
789 < Scheme~\ref{sch:dumpFormat}. As all bonding and molecular information
790 < is stored in the \texttt{.bass} and \texttt{.mdl} files, the
791 < coordinate files are simply the complete set of coordinates for each
792 < atom at a given simulation time. One important note, although the
793 < simulation propagates the complete rotation matrix, directional
794 < entities are written out using quanternions, to save space in the
795 < output files.
796 <
797 < \begin{lstlisting}[float,caption={[The format of the coordinate files]Shows the format of the coordinate files. The fist line is the number of atoms. The second line begins with the time stamp followed by the three $\mathsf{H}$ column vectors. It is important to note, that for extended system ensembles, additional information pertinent to the integrators may be stored on this line as well. The next lines are the atomic coordinates for all atoms in the system. First is the name followed by position, velocity, quanternions, and lastly angular velocities.},label=sch:dumpFormat]
798 <
799 < nAtoms
800 < time; Hxx Hyx Hzx; Hxy Hyy Hzy; Hxz Hyz Hzz;
801 < Name1 x y z vx vy vz q0 q1 q2 q3 jx jy jz
802 < Name2 x y z vx vy vz q0 q1 q2 q3 jx jy jz
803 < etc...
804 <
805 < \end{lstlisting}
1163 > \textit{Periodic boundary conditions} are widely used to simulate bulk
1164 > properties with a relatively small number of particles. In this method
1165 > the simulation box is replicated throughout space to form an infinite
1166 > lattice.  During the simulation, when a particle moves in the primary
1167 > cell, its image in other cells move in exactly the same direction with
1168 > exactly the same orientation. Thus, as a particle leaves the primary
1169 > cell, one of its images will enter through the opposite face. If the
1170 > simulation box is large enough to avoid ``feeling'' the symmetries of
1171 > the periodic lattice, surface effects can be ignored. The available
1172 > periodic cells in {\sc oopse} are cubic, orthorhombic and
1173 > parallelepiped.  {\sc oopse} use a $3 \times 3$ matrix, $\mathsf{H}$,
1174 > to describe the shape and size of the simulation box. $\mathsf{H}$ is
1175 > defined:
1176 > \begin{equation}
1177 > \mathsf{H} = ( \mathbf{h}_x, \mathbf{h}_y, \mathbf{h}_z ),
1178 > \end{equation}
1179 > where $\mathbf{h}_{\alpha}$ is the column vector of the $\alpha$ axis of the
1180 > box.  During the course of the simulation both the size and shape of
1181 > the box can be changed to allow volume fluctuations when constraining
1182 > the pressure.
1183  
1184 <
1185 < There are three major files used by {\sc oopse} written in the
1186 < coordinate format, they are as follows: the initialization file
1187 < (\texttt{.init}), the simulation trajectory file (\texttt{.dump}), and
1188 < the final coordinates of the simulation. The initialization file is
1189 < necessary for {\sc oopse} to start the simulation with the proper
1190 < coordinates, and is generated before the simulation run. The
1191 < trajectory file is created at the beginning of the simulation, and is
1192 < used to store snapshots of the simulation at regular intervals. The
1193 < first frame is a duplication of the
1194 < \texttt{.init} file, and each subsequent frame is appended to the file
1195 < at an interval specified in the \texttt{.bass} file with the
1196 < \texttt{sampleTime} flag. The final coordinate file is the end of run file. The
1197 < \texttt{.eor} file stores the final configuration of the system for a
1198 < given simulation. The file is updated at the same time as the
1199 < \texttt{.dump} file, however, it only contains the most recent
1200 < frame. In this way, an \texttt{.eor} file may be used as the
1201 < initialization file to a second simulation in order to continue a
1202 < simulation or recover one from a processor that has crashed during the
1203 < course of the run.
1204 <
1205 < \subsection{\label{oopseSec:initCoords}Generation of Initial Coordinates}
1184 > A real space vector, $\mathbf{r}$ can be transformed in to a box space
1185 > vector, $\mathbf{s}$, and back through the following transformations:
1186 > \begin{align}
1187 > \mathbf{s} &= \mathsf{H}^{-1} \mathbf{r}, \\
1188 > \mathbf{r} &= \mathsf{H} \mathbf{s}.
1189 > \end{align}
1190 > The vector $\mathbf{s}$ is now a vector expressed as the number of box
1191 > lengths in the $\mathbf{h}_x$, $\mathbf{h}_y$, and $\mathbf{h}_z$
1192 > directions. To find the minimum image of a vector $\mathbf{r}$, {\sc
1193 > oopse} first converts it to its corresponding vector in box space, and
1194 > then casts each element to lie in the range $[-0.5,0.5]$:
1195 > \begin{equation}
1196 > s_{i}^{\prime}=s_{i}-\roundme(s_{i}),
1197 > \end{equation}
1198 > where $s_i$ is the $i$th element of $\mathbf{s}$, and
1199 > $\roundme(s_i)$ is given by
1200 > \begin{equation}
1201 > \roundme(x) =
1202 >        \begin{cases}
1203 >        \lfloor x+0.5 \rfloor & \text{if $x \ge 0$,} \\
1204 >        \lceil x-0.5 \rceil & \text{if $x < 0$.}
1205 >        \end{cases}
1206 > \end{equation}
1207 > Here $\lfloor x \rfloor$ is the floor operator, and gives the largest
1208 > integer value that is not greater than $x$, and $\lceil x \rceil$ is
1209 > the ceiling operator, and gives the smallest integer that is not less
1210 > than $x$.
1211  
1212 < As was stated in Sec.~\ref{oopseSec:coordFiles}, an initialization
1213 < file is needed to provide the starting coordinates for a
1214 < simulation. The {\sc oopse} package provides several system building
1215 < programs to aid in the creation of the \texttt{.init}
1216 < file. The programs use {\sc bass}, and will recognize
1217 < arguments and parameters in the \texttt{.bass} file that would
1218 < otherwise be ignored by the simulation.
1212 > Finally, the minimum image coordinates $\mathbf{r}^{\prime}$ are
1213 > obtained by transforming back to real space,
1214 > \begin{equation}
1215 > \mathbf{r}^{\prime}=\mathsf{H}^{-1}\mathbf{s}^{\prime}.%
1216 > \end{equation}
1217 > In this way, particles are allowed to diffuse freely in $\mathbf{r}$,
1218 > but their minimum images, or $\mathbf{r}^{\prime}$, are used to compute
1219 > the inter-atomic forces.
1220  
838 \subsection{The Statistics File}
1221  
840 The last output file generated by {\sc oopse} is the statistics
841 file. This file records such statistical quantities as the
842 instantaneous temperature, volume, pressure, etc. It is written out
843 with the frequency specified in the \texttt{.bass} file with the
844 \texttt{statusTime} keyword. The file allows the user to observe the
845 system variables as a function of simulation time while the simulation
846 is in progress. One useful function the statistics file serves is to
847 monitor the conserved quantity of a given simulation ensemble, this
848 allows the user to observe the stability of the integrator. The
849 statistics file is denoted with the \texttt{.stat} file extension.
1222  
1223   \section{\label{oopseSec:mechanics}Mechanics}
1224  
# Line 864 | Line 1236 | motion for $\phi$ and $\psi$,\cite{allen87:csl} leadin
1236   Previous integration methods for orientational motion have problems
1237   that are avoided in the DLM method.  Direct propagation of the Euler
1238   angles has a known $1/\sin\theta$ divergence in the equations of
1239 < motion for $\phi$ and $\psi$,\cite{allen87:csl} leading to
1240 < numerical instabilities any time one of the directional atoms or rigid
1241 < bodies has an orientation near $\theta=0$ or $\theta=\pi$.  More
1242 < modern quaternion-based integration methods have relatively poor
1243 < energy conservation.  While quaternions work well for orientational
1244 < motion in other ensembles, the microcanonical ensemble has a
1245 < constant energy requirement that is quite sensitive to errors in the
1246 < equations of motion.  An earlier implementation of {\sc oopse}
1247 < utilized quaternions for propagation of rotational motion; however, a
1248 < detailed investigation showed that they resulted in a steady drift in
877 < the total energy, something that has been observed by
878 < Laird {\it et al.}\cite{Laird97}      
1239 > motion for $\phi$ and $\psi$,\cite{allen87:csl} leading to numerical
1240 > instabilities any time one of the directional atoms or rigid bodies
1241 > has an orientation near $\theta=0$ or $\theta=\pi$.  Quaternion-based
1242 > integration methods work well for propagating orientational motion;
1243 > however, energy conservation concerns arise when using the
1244 > microcanonical (NVE) ensemble.  An earlier implementation of {\sc
1245 > oopse} utilized quaternions for propagation of rotational motion;
1246 > however, a detailed investigation showed that they resulted in a
1247 > steady drift in the total energy, something that has been observed by
1248 > Laird {\it et al.}\cite{Laird97}
1249  
1250   The key difference in the integration method proposed by Dullweber
1251   \emph{et al.} is that the entire $3 \times 3$ rotation matrix is
# Line 949 | Line 1319 | is equivalent to the more familiar body-fixed forms,
1319   represented by ${\bf j}$.  This equation of motion for angular momenta
1320   is equivalent to the more familiar body-fixed forms,
1321   \begin{eqnarray}
1322 < \dot{j_{x}} & = & \tau^b_x(t)  +
1323 < \left(\overleftrightarrow{\mathsf{I}}_{yy} - \overleftrightarrow{\mathsf{I}}_{zz} \right) j_y j_z, \\
1324 < \dot{j_{y}} & = & \tau^b_y(t) +
1325 < \left(\overleftrightarrow{\mathsf{I}}_{zz} - \overleftrightarrow{\mathsf{I}}_{xx} \right) j_z j_x,\\
1326 < \dot{j_{z}} & = & \tau^b_z(t) +
1327 < \left(\overleftrightarrow{\mathsf{I}}_{xx} - \overleftrightarrow{\mathsf{I}}_{yy} \right) j_x j_y,
1322 > \dot{j_{x}} & = & \tau^b_x(t)  -
1323 > \left(\overleftrightarrow{\mathsf{I}}_{yy}^{-1} - \overleftrightarrow{\mathsf{I}}_{zz}^{-1} \right) j_y j_z, \\
1324 > \dot{j_{y}} & = & \tau^b_y(t) -
1325 > \left(\overleftrightarrow{\mathsf{I}}_{zz}^{-1} - \overleftrightarrow{\mathsf{I}}_{xx}^{-1} \right) j_z j_x,\\
1326 > \dot{j_{z}} & = & \tau^b_z(t) -
1327 > \left(\overleftrightarrow{\mathsf{I}}_{xx}^{-1} - \overleftrightarrow{\mathsf{I}}_{yy}^{-1} \right) j_x j_y,
1328   \end{eqnarray}
1329   which utilize the body-fixed torques, ${\bf \tau}^b$. Torques are
1330   most easily derived in the space-fixed frame,
# Line 1076 | Line 1446 | Fig.~\ref{timestep}.
1446  
1447   \begin{figure}
1448   \centering
1449 < \includegraphics[width=\linewidth]{timeStep.pdf}
1449 > \includegraphics[width=\linewidth]{timeStep.eps}
1450   \caption[Energy conservation for quaternion versus DLM dynamics]{Energy conservation using quaternion based integration versus
1451   the method proposed by Dullweber \emph{et al.} with increasing time
1452   step. For each time step, the dotted line is total energy using the
# Line 1104 | Line 1474 | and that is the time step for integrating the equation
1474  
1475   \begin{center}
1476   \begin{tabular}{llll}
1477 < {\bf variable} & {\bf {\tt .bass} keyword} & {\bf units} & {\bf
1477 > {\bf variable} & {\bf Meta-data keyword} & {\bf units} & {\bf
1478   default value} \\  
1479   $h$ & {\tt dt = 2.0;} & fs & none
1480   \end{tabular}
# Line 1114 | Line 1484 | integrator can selected with the {\tt ensemble} keywor
1484  
1485   {\sc oopse} implements a number of extended system integrators for
1486   sampling from other ensembles relevant to chemical physics.  The
1487 < integrator can selected with the {\tt ensemble} keyword in the
1488 < {\tt .bass} file:
1487 > integrator can be selected with the {\tt ensemble} keyword in the
1488 > meta-data file:
1489  
1490   \begin{center}
1491   \begin{tabular}{lll}
1492 < {\bf Integrator} & {\bf Ensemble} & {\bf {\tt .bass} line} \\
1492 > {\bf Integrator} & {\bf Ensemble} & {\bf Meta-data instruction} \\
1493   NVE & microcanonical & {\tt ensemble = NVE; } \\
1494   NVT & canonical & {\tt ensemble = NVT; } \\
1495   NPTi & isobaric-isothermal & {\tt ensemble = NPTi;} \\
# Line 1134 | Line 1504 | system, and has been shown to sample the canonical dis
1504   The relatively well-known Nos\'e-Hoover thermostat\cite{Hoover85} is
1505   implemented in {\sc oopse}'s NVT integrator.  This method couples an
1506   extra degree of freedom (the thermostat) to the kinetic energy of the
1507 < system, and has been shown to sample the canonical distribution in the
1508 < system degrees of freedom while conserving a quantity that is, to
1507 > system and it has been shown to sample the canonical distribution in
1508 > the system degrees of freedom while conserving a quantity that is, to
1509   within a constant, the Helmholtz free energy.\cite{melchionna93}
1510  
1511   NPT algorithms attempt to maintain constant pressure in the system by
# Line 1159 | Line 1529 | variables.
1529  
1530   \begin{center}
1531   \begin{tabular}{llll}
1532 < {\bf variable} & {\bf {\tt .bass} keyword} & {\bf units} & {\bf
1532 > {\bf variable} & {\bf Meta-data instruction} & {\bf units} & {\bf
1533   default value} \\  
1534   $T_{\mathrm{target}}$ & {\tt targetTemperature = 300;} &  K & none \\
1535   $P_{\mathrm{target}}$ & {\tt targetPressure = 1;} & atm & none \\
# Line 1217 | Line 1587 | $\tau_T$ or $T_{\mathrm{target}}$ in a simulation, one
1587   In eq.(\ref{eq:nosehooverext}), $\tau_T$ is the time constant for
1588   relaxation of the temperature to the target value.  To set values for
1589   $\tau_T$ or $T_{\mathrm{target}}$ in a simulation, one would use the
1590 < {\tt tauThermostat} and {\tt targetTemperature} keywords in the {\tt
1591 < .bass} file.  The units for {\tt tauThermostat} are fs, and the units
1592 < for the {\tt targetTemperature} are degrees K.   The integration of
1593 < the equations of motion is carried out in a velocity-Verlet style 2
1590 > {\tt tauThermostat} and {\tt targetTemperature} keywords in the
1591 > meta-data file.  The units for {\tt tauThermostat} are fs, and the
1592 > units for the {\tt targetTemperature} are degrees K.   The integration
1593 > of the equations of motion is carried out in a velocity-Verlet style 2
1594   part algorithm:
1595  
1596   {\tt moveA:}
# Line 1282 | Line 1652 | Since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are requir
1652          \chi(t + h) \right) .
1653   \end{align*}
1654  
1655 < Since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required to caclculate
1655 > Since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required to calculate
1656   $T(t + h)$ as well as $\chi(t + h)$, they indirectly depend on their
1657   own values at time $t + h$.  {\tt moveB} is therefore done in an
1658   iterative fashion until $\chi(t + h)$ becomes self-consistent.  The
# Line 1310 | Line 1680 | To carry out isobaric-isothermal ensemble calculations
1680   \subsection{\label{sec:NPTi}Constant-pressure integration with
1681   isotropic box deformations (NPTi)}
1682  
1683 < To carry out isobaric-isothermal ensemble calculations {\sc oopse}
1683 > To carry out isobaric-isothermal ensemble calculations, {\sc oopse}
1684   implements the Melchionna modifications to the Nos\'e-Hoover-Andersen
1685 < equations of motion,\cite{melchionna93}
1685 > equations of motion.\cite{melchionna93} The equations of motion are
1686 > the same as NVT with the following exceptions:
1687  
1688   \begin{eqnarray}
1689   \dot{{\bf r}} & = & {\bf v} + \eta \left( {\bf r} - {\bf R}_0 \right), \\
1690   \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\eta + \chi) {\bf v}, \\
1320 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
1321 \mbox{ skew}\left(\overleftrightarrow{I}^{-1} \cdot {\bf j}\right),\\
1322 \dot{{\bf j}} & = & {\bf j} \times \left( \overleftrightarrow{I}^{-1}
1323 \cdot {\bf j} \right) - \mbox{ rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
1324 V}{\partial \mathsf{A}} \right) - \chi {\bf j}, \\
1325 \dot{\chi} & = & \frac{1}{\tau_{T}^2} \left(
1326 \frac{T}{T_{\mathrm{target}}} - 1 \right) ,\\
1691   \dot{\eta} & = & \frac{1}{\tau_{B}^2 f k_B T_{\mathrm{target}}} V \left( P -
1692   P_{\mathrm{target}} \right), \\
1693   \dot{\mathcal{V}} & = & 3 \mathcal{V} \eta .
# Line 1350 | Line 1714 | outer} product of the velocities denoted by the $\otim
1714   \overleftrightarrow{\mathsf{W}}(t).
1715   \end{equation}
1716   The kinetic contribution to the pressure tensor utilizes the {\it
1717 < outer} product of the velocities denoted by the $\otimes$ symbol.  The
1717 > outer} product of the velocities, denoted by the $\otimes$ symbol.  The
1718   stress tensor is calculated from another outer product of the
1719   inter-atomic separation vectors (${\bf r}_{ij} = {\bf r}_j - {\bf
1720   r}_i$) with the forces between the same two atoms,
# Line 1358 | Line 1722 | The instantaneous pressure is then simply obtained fro
1722   \overleftrightarrow{\mathsf{W}}(t) = \sum_{i} \sum_{j>i} {\bf r}_{ij}(t)
1723   \otimes {\bf f}_{ij}(t).
1724   \end{equation}
1725 + In systems containing cutoff groups, the stress tensor is computed
1726 + between the centers-of-mass of the cutoff groups:
1727 + \begin{equation}
1728 + \overleftrightarrow{\mathsf{W}}(t) = \sum_{a} \sum_{b} {\bf r}_{ab}(t)
1729 + \otimes {\bf f}_{ab}(t).
1730 + \end{equation}
1731 + where ${\bf r}_{ab}$ is the distance between the centers of mass, and
1732 + \begin{equation}
1733 + {\bf f}_{ab} = s(r_{ab}) \sum_{i \in a} \sum_{j \in b} {\bf f}_{ij} +
1734 + s\prime(r_{ab}) \frac{{\bf r}_{ab}}{|r_{ab}|} \sum_{i \in a} \sum_{j
1735 + \in b} V_{ij}({\bf r}_{ij}).
1736 + \end{equation}
1737 +
1738   The instantaneous pressure is then simply obtained from the trace of
1739 < the Pressure tensor,
1739 > the pressure tensor,
1740   \begin{equation}
1741   P(t) = \frac{1}{3} \mathrm{Tr} \left( \overleftrightarrow{\mathsf{P}}(t).
1742   \right)
# Line 1368 | Line 1745 | $\tau_B$ or $P_{\mathrm{target}}$ in a simulation, one
1745   In eq.(\ref{eq:melchionna1}), $\tau_B$ is the time constant for
1746   relaxation of the pressure to the target value.  To set values for
1747   $\tau_B$ or $P_{\mathrm{target}}$ in a simulation, one would use the
1748 < {\tt tauBarostat} and {\tt targetPressure} keywords in the {\tt .bass}
1748 > {\tt tauBarostat} and {\tt targetPressure} keywords in the meta-data
1749   file.  The units for {\tt tauBarostat} are fs, and the units for the
1750   {\tt targetPressure} are atmospheres.  Like in the NVT integrator, the
1751   integration of the equations of motion is carried out in a
1752 < velocity-Verlet style 2 part algorithm:
1752 > velocity-Verlet style 2 part algorithm with only the following differences:
1753  
1754   {\tt moveA:}
1755   \begin{align*}
1379 T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
1380 %
1756   P(t) &\leftarrow \left\{{\bf r}(t)\right\}, \left\{{\bf v}(t)\right\} ,\\
1757   %
1758   {\bf v}\left(t + h / 2\right)  &\leftarrow {\bf v}(t)
1759          + \frac{h}{2} \left( \frac{{\bf f}(t)}{m} - {\bf v}(t)
1760          \left(\chi(t) + \eta(t) \right) \right), \\
1761   %
1387 {\bf j}\left(t + h / 2 \right)  &\leftarrow {\bf j}(t)
1388        + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
1389        \chi(t) \right), \\
1390 %
1391 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left(h *
1392        {\bf j}(t + h / 2) \overleftrightarrow{\mathsf{I}}^{-1}
1393        \right) ,\\
1394 %
1395 \chi\left(t + h / 2 \right) &\leftarrow \chi(t) +
1396        \frac{h}{2 \tau_T^2} \left( \frac{T(t)}{T_{\mathrm{target}}} - 1
1397        \right) ,\\
1398 %
1762   \eta(t + h / 2) &\leftarrow \eta(t) + \frac{h
1763          \mathcal{V}(t)}{2 N k_B T(t) \tau_B^2} \left( P(t)
1764          - P_{\mathrm{target}} \right), \\
# Line 1409 | Line 1772 | Most of these equations are identical to their counter
1772          \mathsf{H}(t).
1773   \end{align*}
1774  
1775 < Most of these equations are identical to their counterparts in the NVT
1413 < integrator, but the propagation of positions to time $t + h$
1775 > The propagation of positions to time $t + h$
1776   depends on the positions at the same time.  {\sc oopse} carries out
1777   this step iteratively (with a limit of 5 passes through the iterative
1778   loop).  Also, the simulation box $\mathsf{H}$ is scaled uniformly for
# Line 1419 | Line 1781 | the box by
1781   h / 2$.  Reshaping the box uniformly also scales the volume of
1782   the box by
1783   \begin{equation}
1784 < \mathcal{V}(t + h) \leftarrow e^{ - 3 h \eta(t + h /2)}.
1784 > \mathcal{V}(t + h) \leftarrow e^{ - 3 h \eta(t + h /2)} \times
1785   \mathcal{V}(t)
1786   \end{equation}
1787  
# Line 1430 | Line 1792 | T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
1792  
1793   {\tt moveB:}
1794   \begin{align*}
1433 T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
1434        \left\{{\bf j}(t + h)\right\} ,\\
1435 %
1795   P(t + h) &\leftarrow  \left\{{\bf r}(t + h)\right\},
1796          \left\{{\bf v}(t + h)\right\}, \\
1797   %
1439 \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
1440        2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+h)}
1441        {T_{\mathrm{target}}} - 1 \right), \\
1442 %
1798   \eta(t + h) &\leftarrow \eta(t + h / 2) +
1799          \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
1800          \tau_B^2} \left( P(t + h) - P_{\mathrm{target}} \right), \\
# Line 1456 | Line 1811 | to caclculate $T(t + h)$, $P(t + h)$, $\chi(t + h)$, a
1811   \end{align*}
1812  
1813   Once again, since ${\bf v}(t + h)$ and ${\bf j}(t + h)$ are required
1814 < to caclculate $T(t + h)$, $P(t + h)$, $\chi(t + h)$, and $\eta(t +
1814 > to calculate $T(t + h)$, $P(t + h)$, $\chi(t + h)$, and $\eta(t +
1815   h)$, they indirectly depend on their own values at time $t + h$.  {\tt
1816   moveB} is therefore done in an iterative fashion until $\chi(t + h)$
1817   and $\eta(t + h)$ become self-consistent.  The relative tolerance for
# Line 1496 | Line 1851 | the box shape.  The equations of motion for this metho
1851   {\it shape} as well as in the volume of the box.  This method utilizes
1852   the full $3 \times 3$ pressure tensor and introduces a tensor of
1853   extended variables ($\overleftrightarrow{\eta}$) to control changes to
1854 < the box shape.  The equations of motion for this method are
1854 > the box shape.  The equations of motion for this method differ from
1855 > those of NPTi as follows:
1856   \begin{eqnarray}
1857   \dot{{\bf r}} & = & {\bf v} + \overleftrightarrow{\eta} \cdot \left( {\bf r} - {\bf R}_0 \right), \\
1858   \dot{{\bf v}} & = & \frac{{\bf f}}{m} - (\overleftrightarrow{\eta} +
1859   \chi \cdot \mathsf{1}) {\bf v}, \\
1504 \dot{\mathsf{A}} & = & \mathsf{A} \cdot
1505 \mbox{ skew}\left(\overleftrightarrow{I}^{-1} \cdot {\bf j}\right) ,\\
1506 \dot{{\bf j}} & = & {\bf j} \times \left( \overleftrightarrow{I}^{-1}
1507 \cdot {\bf j} \right) - \mbox{ rot}\left(\mathsf{A}^{T} \cdot \frac{\partial
1508 V}{\partial \mathsf{A}} \right) - \chi {\bf j} ,\\
1509 \dot{\chi} & = & \frac{1}{\tau_{T}^2} \left(
1510 \frac{T}{T_{\mathrm{target}}} - 1 \right) ,\\
1860   \dot{\overleftrightarrow{\eta}} & = & \frac{1}{\tau_{B}^2 f k_B
1861   T_{\mathrm{target}}} V \left( \overleftrightarrow{\mathsf{P}} - P_{\mathrm{target}}\mathsf{1} \right) ,\\
1862   \dot{\mathsf{H}} & = &  \overleftrightarrow{\eta} \cdot \mathsf{H} .
# Line 1523 | Line 1872 | T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\b
1872  
1873   {\tt moveA:}
1874   \begin{align*}
1526 T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\bf j}(t)\right\} ,\\
1527 %
1875   \overleftrightarrow{\mathsf{P}}(t) &\leftarrow \left\{{\bf r}(t)\right\},
1876          \left\{{\bf v}(t)\right\} ,\\
1877   %
# Line 1533 | Line 1880 | T(t) &\leftarrow \left\{{\bf v}(t)\right\}, \left\{{\b
1880          \left(\chi(t)\mathsf{1} + \overleftrightarrow{\eta}(t) \right) \cdot
1881          {\bf v}(t) \right), \\
1882   %
1536 {\bf j}\left(t + h / 2 \right)  &\leftarrow {\bf j}(t)
1537        + \frac{h}{2} \left( {\bf \tau}^b(t) - {\bf j}(t)
1538        \chi(t) \right), \\
1539 %
1540 \mathsf{A}(t + h) &\leftarrow \mathrm{rotate}\left(h *
1541        {\bf j}(t + h / 2) \overleftrightarrow{\mathsf{I}}^{-1}
1542        \right), \\
1543 %
1544 \chi\left(t + h / 2 \right) &\leftarrow \chi(t) +
1545        \frac{h}{2 \tau_T^2} \left( \frac{T(t)}{T_{\mathrm{target}}}
1546        - 1 \right), \\
1547 %
1883   \overleftrightarrow{\eta}(t + h / 2) &\leftarrow
1884          \overleftrightarrow{\eta}(t) + \frac{h \mathcal{V}(t)}{2 N k_B
1885          T(t) \tau_B^2} \left( \overleftrightarrow{\mathsf{P}}(t)
# Line 1566 | Line 1901 | T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
1901  
1902   {\tt moveB:}
1903   \begin{align*}
1569 T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
1570        \left\{{\bf j}(t + h)\right\}, \\
1571 %
1904   \overleftrightarrow{\mathsf{P}}(t + h) &\leftarrow \left\{{\bf r}
1905          (t + h)\right\}, \left\{{\bf v}(t
1906          + h)\right\}, \left\{{\bf f}(t + h)\right\} ,\\
1907   %
1576 \chi\left(t + h \right) &\leftarrow \chi\left(t + h /
1577        2 \right) + \frac{h}{2 \tau_T^2} \left( \frac{T(t+
1578        h)}{T_{\mathrm{target}}} - 1 \right), \\
1579 %
1908   \overleftrightarrow{\eta}(t + h) &\leftarrow
1909          \overleftrightarrow{\eta}(t + h / 2) +
1910          \frac{h \mathcal{V}(t + h)}{2 N k_B T(t + h)
# Line 1588 | Line 1916 | T(t + h) &\leftarrow \left\{{\bf v}(t + h)\right\},
1916          \frac{{\bf f}(t + h)}{m} -
1917          (\chi(t + h)\mathsf{1} + \overleftrightarrow{\eta}(t
1918          + h)) \right) \cdot {\bf v}(t + h), \\
1591 %
1592 {\bf j}\left(t + h \right)  &\leftarrow {\bf j}\left(t
1593        + h / 2 \right) + \frac{h}{2} \left( {\bf \tau}^b(t
1594        + h) - {\bf j}(t + h) \chi(t + h) \right) .
1919   \end{align*}
1920  
1921   The iterative schemes for both {\tt moveA} and {\tt moveB} are
# Line 1609 | Line 1933 | elongated and sheared geometries which become smaller
1933   This integrator must be used with care, particularly in liquid
1934   simulations.  Liquids have very small restoring forces in the
1935   off-diagonal directions, and the simulation box can very quickly form
1936 < elongated and sheared geometries which become smaller than the
1937 < electrostatic or Lennard-Jones cutoff radii.  The NPTf integrator
1938 < finds most use in simulating crystals or liquid crystals which assume
1615 < non-orthorhombic geometries.
1936 > elongated and sheared geometries which become smaller than the cutoff
1937 > radius.  The NPTf integrator finds most use in simulating crystals or
1938 > liquid crystals which assume non-orthorhombic geometries.
1939  
1940   \subsection{\label{nptxyz}Constant pressure in 3 axes (NPTxyz)}
1941  
# Line 1635 | Line 1958 | simulations).
1958   orientational anisotropy in the system (i.e. in lipid bilayer
1959   simulations).
1960  
1961 < \subsection{\label{oopseSec:rattle}The {\sc rattle} Method for Bond
1961 > \subsection{\label{sec:constraints}Constraint Methods}
1962 >
1963 > \subsubsection{\label{oopseSec:rattle}The {\sc rattle} Method for Bond
1964          Constraints}
1965  
1966   In order to satisfy the constraints of fixed bond lengths within {\sc
1967   oopse}, we have implemented the {\sc rattle} algorithm of
1968 < Andersen.\cite{andersen83} The algorithm is a velocity verlet
1969 < formulation of the {\sc shake} method\cite{ryckaert77} of iteratively
1970 < solving the Lagrange multipliers of constraint. The system of Lagrange
1971 < multipliers allows one to reformulate the equations of motion with
1972 < explicit constraint forces.\cite{fowles99:lagrange}
1968 > Andersen.\cite{andersen83} {\sc rattle} is a velocity-Verlet
1969 > formulation of the {\sc shake} method\cite{ryckaert77} for iteratively
1970 > solving the Lagrange multipliers which maintain the holonomic
1971 > constraints.  Both methods are covered in depth in the
1972 > literature,\cite{leach01:mm,allen87:csl} and a detailed description of
1973 > this method would be redundant.
1974  
1975 < Consider a system described by coordinates $q_1$ and $q_2$ subject to an
1650 < equation of constraint:
1651 < \begin{equation}
1652 < \sigma(q_1, q_2,t) = 0
1653 < \label{oopseEq:lm1}
1654 < \end{equation}
1655 < The Lagrange formulation of the equations of motion can be written:
1656 < \begin{equation}
1657 < \delta\int_{t_1}^{t_2}L\, dt =
1658 <        \int_{t_1}^{t_2} \sum_i \biggl [ \frac{\partial L}{\partial q_i}
1659 <        - \frac{d}{dt}\biggl(\frac{\partial L}{\partial \dot{q}_i}
1660 <        \biggr ) \biggr] \delta q_i \, dt = 0.
1661 < \label{oopseEq:lm2}
1662 < \end{equation}
1663 < Here, $\delta q_i$ is not independent for each $q$, as $q_1$ and $q_2$
1664 < are linked by $\sigma$. However, $\sigma$ is fixed at any given
1665 < instant of time, giving:
1666 < \begin{align}
1667 < \delta\sigma &= \biggl( \frac{\partial\sigma}{\partial q_1} \delta q_1 %
1668 <        + \frac{\partial\sigma}{\partial q_2} \delta q_2 \biggr) = 0 ,\\
1669 < %
1670 < \frac{\partial\sigma}{\partial q_1} \delta q_1 &= %
1671 <        - \frac{\partial\sigma}{\partial q_2} \delta q_2, \\
1672 < %
1673 < \delta q_2 &= - \biggl(\frac{\partial\sigma}{\partial q_1} \bigg / %
1674 <        \frac{\partial\sigma}{\partial q_2} \biggr) \delta q_1.
1675 < \end{align}
1676 < Substituted back into Eq.~\ref{oopseEq:lm2},
1677 < \begin{equation}
1678 < \int_{t_1}^{t_2}\biggl [ \biggl(\frac{\partial L}{\partial q_1}
1679 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_1}
1680 <        \biggr)
1681 <        - \biggl( \frac{\partial L}{\partial q_1}
1682 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_1}
1683 <        \biggr) \biggl(\frac{\partial\sigma}{\partial q_1} \bigg / %
1684 <        \frac{\partial\sigma}{\partial q_2} \biggr)\biggr] \delta q_1 \, dt = 0.
1685 < \label{oopseEq:lm3}
1686 < \end{equation}
1687 < Leading to,
1688 < \begin{equation}
1689 < \frac{\biggl(\frac{\partial L}{\partial q_1}
1690 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_1}
1691 <        \biggr)}{\frac{\partial\sigma}{\partial q_1}} =
1692 < \frac{\biggl(\frac{\partial L}{\partial q_2}
1693 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_2}
1694 <        \biggr)}{\frac{\partial\sigma}{\partial q_2}}.
1695 < \label{oopseEq:lm4}
1696 < \end{equation}
1697 < This relation can only be statisfied, if both are equal to a single
1698 < function $-\lambda(t)$,
1699 < \begin{align}
1700 < \frac{\biggl(\frac{\partial L}{\partial q_1}
1701 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_1}
1702 <        \biggr)}{\frac{\partial\sigma}{\partial q_1}} &= -\lambda(t), \\
1703 < %
1704 < \frac{\partial L}{\partial q_1}
1705 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_1} &=
1706 <         -\lambda(t)\,\frac{\partial\sigma}{\partial q_1} ,\\
1707 < %
1708 < \frac{\partial L}{\partial q_1}
1709 <        - \frac{d}{dt}\,\frac{\partial L}{\partial \dot{q}_1}
1710 <         + \mathcal{G}_i &= 0,
1711 < \end{align}
1712 < where $\mathcal{G}_i$, the force of constraint on $i$, is:
1713 < \begin{equation}
1714 < \mathcal{G}_i = \lambda(t)\,\frac{\partial\sigma}{\partial q_1}.
1715 < \label{oopseEq:lm5}
1716 < \end{equation}
1975 > \subsubsection{\label{oopseSec:zcons}The Z-Constraint Method}
1976  
1977 < In a simulation, this would involve the solution of a set of $(m + n)$
1978 < number of equations. Where $m$ is the number of constraints, and $n$
1720 < is the number of constrained coordinates. In practice, this is not
1721 < done, as the matrix inversion necessary to solve the system of
1722 < equations would be very time consuming to solve. Additionally, the
1723 < numerical error in the solution of the set of $\lambda$'s would be
1724 < compounded by the error inherent in propagating by the Velocity Verlet
1725 < algorithm ($\Delta t^4$). The Verlet propagation error is negligible
1726 < in an unconstrained system, as one is interested in the statistics of
1727 < the run, and not that the run be numerically exact to the ``true''
1728 < integration. This relates back to the ergodic hypothesis that a time
1729 < integral of a valid trajectory will still give the correct ensemble
1730 < average. However, in the case of constraints, if the equations of
1731 < motion leave the ``true'' trajectory, they are departing from the
1732 < constrained surface. The method that is used, is to iteratively solve
1733 < for $\lambda(t)$ at each time step.
1734 <
1735 < In {\sc rattle} the equations of motion are modified subject to the
1736 < following two constraints:
1737 < \begin{align}
1738 < \sigma_{ij}[\mathbf{r}(t)] \equiv
1739 <        [ \mathbf{r}_i(t) - \mathbf{r}_j(t)]^2  - d_{ij}^2 &= 0 %
1740 <        \label{oopseEq:c1}, \\
1741 < %
1742 < [\mathbf{\dot{r}}_i(t) - \mathbf{\dot{r}}_j(t)] \cdot
1743 <        [\mathbf{r}_i(t) - \mathbf{r}_j(t)] &= 0 .\label{oopseEq:c2}
1744 < \end{align}
1745 < Eq.~\ref{oopseEq:c1} is the set of bond constraints, where $d_{ij}$ is
1746 < the constrained distance between atom $i$ and
1747 < $j$. Eq.~\ref{oopseEq:c2} constrains the velocities of $i$ and $j$ to
1748 < be perpendicular to the bond vector, so that the bond can neither grow
1749 < nor shrink. The constrained dynamics equations become:
1750 < \begin{equation}
1751 < m_i \mathbf{\ddot{r}}_i = \mathbf{F}_i + \mathbf{\mathcal{G}}_i,
1752 < \label{oopseEq:r1}
1753 < \end{equation}
1754 < where,$\mathbf{\mathcal{G}}_i$ are the forces of constraint on $i$,
1755 < and are defined:
1756 < \begin{equation}
1757 < \mathbf{\mathcal{G}}_i = - \sum_j \lambda_{ij}(t)\,\nabla \sigma_{ij}.
1758 < \label{oopseEq:r2}
1759 < \end{equation}
1760 <
1761 < In Velocity Verlet, if $\Delta t = h$, the propagation can be written:
1762 < \begin{align}
1763 < \mathbf{r}_i(t+h) &=
1764 <        \mathbf{r}_i(t) + h\mathbf{\dot{r}}(t) +
1765 <        \frac{h^2}{2m_i}\,\Bigl[ \mathbf{F}_i(t) +
1766 <        \mathbf{\mathcal{G}}_{Ri}(t) \Bigr] \label{oopseEq:vv1}, \\
1767 < %
1768 < \mathbf{\dot{r}}_i(t+h) &=
1769 <        \mathbf{\dot{r}}_i(t) + \frac{h}{2m_i}
1770 <        \Bigl[ \mathbf{F}_i(t) + \mathbf{\mathcal{G}}_{Ri}(t) +
1771 <        \mathbf{F}_i(t+h) + \mathbf{\mathcal{G}}_{Vi}(t+h) \Bigr] ,%
1772 <        \label{oopseEq:vv2}
1773 < \end{align}
1774 < where:
1775 < \begin{align}
1776 < \mathbf{\mathcal{G}}_{Ri}(t) &=
1777 <        -2 \sum_j \lambda_{Rij}(t) \mathbf{r}_{ij}(t) ,\\
1778 < %
1779 < \mathbf{\mathcal{G}}_{Vi}(t+h) &=
1780 <        -2 \sum_j \lambda_{Vij}(t+h) \mathbf{r}(t+h).
1781 < \end{align}
1782 < Next, define:
1783 < \begin{align}
1784 < g_{ij} &= h \lambda_{Rij}(t) ,\\
1785 < k_{ij} &= h \lambda_{Vij}(t+h), \\
1786 < \mathbf{q}_i &= \mathbf{\dot{r}}_i(t) + \frac{h}{2m_i} \mathbf{F}_i(t)
1787 <        - \frac{1}{m_i}\sum_j g_{ij}\mathbf{r}_{ij}(t).
1788 < \end{align}
1789 < Using these definitions, Eq.~\ref{oopseEq:vv1} and \ref{oopseEq:vv2}
1790 < can be rewritten as,
1791 < \begin{align}
1792 < \mathbf{r}_i(t+h) &= \mathbf{r}_i(t) + h \mathbf{q}_i ,\\
1793 < %
1794 < \mathbf{\dot{r}}(t+h) &= \mathbf{q}_i + \frac{h}{2m_i}\mathbf{F}_i(t+h)
1795 <        -\frac{1}{m_i}\sum_j k_{ij} \mathbf{r}_{ij}(t+h).
1796 < \end{align}
1797 <
1798 < To integrate the equations of motion, the {\sc rattle} algorithm first
1799 < solves for $\mathbf{r}(t+h)$. Let,
1800 < \begin{equation}
1801 < \mathbf{q}_i = \mathbf{\dot{r}}(t) + \frac{h}{2m_i}\mathbf{F}_i(t).
1802 < \end{equation}
1803 < Here $\mathbf{q}_i$ corresponds to an initial unconstrained move. Next
1804 < pick a constraint $j$, and let,
1805 < \begin{equation}
1806 < \mathbf{s} = \mathbf{r}_i(t) + h\mathbf{q}_i(t)
1807 <        - \mathbf{r}_j(t) + h\mathbf{q}_j(t).
1808 < \label{oopseEq:ra1}
1809 < \end{equation}
1810 < If
1811 < \begin{equation}
1812 < \Big| |\mathbf{s}|^2 - d_{ij}^2 \Big| > \text{tolerance},
1813 < \end{equation}
1814 < then the constraint is unsatisfied, and corrections are made to the
1815 < positions. First we define a test corrected configuration as,
1816 < \begin{align}
1817 < \mathbf{r}_i^T(t+h) = \mathbf{r}_i(t) + h\biggl[\mathbf{q}_i -
1818 <        g_{ij}\,\frac{\mathbf{r}_{ij}(t)}{m_i} \biggr] ,\\
1819 < %
1820 < \mathbf{r}_j^T(t+h) = \mathbf{r}_j(t) + h\biggl[\mathbf{q}_j +
1821 <        g_{ij}\,\frac{\mathbf{r}_{ij}(t)}{m_j} \biggr].
1822 < \end{align}
1823 < And we chose $g_{ij}$ such that, $|\mathbf{r}_i^T - \mathbf{r}_j^T|^2
1824 < = d_{ij}^2$. Solving the quadratic for $g_{ij}$ we obtain the
1825 < approximation,
1826 < \begin{equation}
1827 < g_{ij} = \frac{(s^2 - d^2)}{2h[\mathbf{s}\cdot\mathbf{r}_{ij}(t)]
1828 <        (\frac{1}{m_i} + \frac{1}{m_j})}.
1829 < \end{equation}
1830 < Although not an exact solution for $g_{ij}$, as this is an iterative
1831 < scheme overall, the eventual solution will converge. With a trial
1832 < $g_{ij}$, the new $\mathbf{q}$'s become,
1833 < \begin{align}
1834 < \mathbf{q}_i &= \mathbf{q}^{\text{old}}_i - g_{ij}\,
1835 <        \frac{\mathbf{r}_{ij}(t)}{m_i} ,\\
1836 < %
1837 < \mathbf{q}_j &= \mathbf{q}^{\text{old}}_j + g_{ij}\,
1838 <        \frac{\mathbf{r}_{ij}(t)}{m_j} .
1839 < \end{align}
1840 < The whole algorithm is then repeated from Eq.~\ref{oopseEq:ra1} until
1841 < all constraints are satisfied.
1842 <
1843 < The second step of {\sc rattle}, is to then update the velocities. The
1844 < step starts with,
1845 < \begin{equation}
1846 < \mathbf{\dot{r}}_i(t+h) = \mathbf{q}_i + \frac{h}{2m_i}\mathbf{F}_i(t+h).
1847 < \end{equation}
1848 < Next we pick a constraint $j$, and calculate the dot product $\ell$.
1849 < \begin{equation}
1850 < \ell = \mathbf{r}_{ij}(t+h) \cdot \mathbf{\dot{r}}_{ij}(t+h).
1851 < \label{oopseEq:rv1}
1852 < \end{equation}
1853 < Here if constraint Eq.~\ref{oopseEq:c2} holds, $\ell$ should be
1854 < zero. Therefore if $\ell$ is greater than some tolerance, then
1855 < corrections are made to the $i$ and $j$ velocities.
1856 < \begin{align}
1857 < \mathbf{\dot{r}}_i^T &= \mathbf{\dot{r}}_i(t+h) - k_{ij}
1858 <        \frac{\mathbf{\dot{r}}_{ij}(t+h)}{m_i}, \\
1859 < %
1860 < \mathbf{\dot{r}}_j^T &= \mathbf{\dot{r}}_j(t+h) + k_{ij}
1861 <        \frac{\mathbf{\dot{r}}_{ij}(t+h)}{m_j}.
1862 < \end{align}
1863 < Like in the previous step, we select a value for $k_{ij}$ such that
1864 < $\ell$ is zero.
1865 < \begin{equation}
1866 < k_{ij} = \frac{\ell}{d^2_{ij}(\frac{1}{m_i} + \frac{1}{m_j})}.
1867 < \end{equation}
1868 < The test velocities, $\mathbf{\dot{r}}^T_i$ and
1869 < $\mathbf{\dot{r}}^T_j$, then replace their respective velocities, and
1870 < the algorithm is iterated from Eq.~\ref{oopseEq:rv1} until all
1871 < constraints are satisfied.
1872 <
1873 <
1874 < \subsection{\label{oopseSec:zcons}Z-Constraint Method}
1875 <
1876 < Based on the fluctuation-dissipation theorem, a force auto-correlation
1877 < method was developed by Roux and Karplus to investigate the dynamics
1977 > A force auto-correlation method based on the fluctuation-dissipation
1978 > theorem was developed by Roux and Karplus to investigate the dynamics
1979   of ions inside ion channels.\cite{Roux91} The time-dependent friction
1980   coefficient can be calculated from the deviation of the instantaneous
1981 < force from its mean force.
1981 > force from its mean value:
1982   \begin{equation}
1983   \xi(z,t)=\langle\delta F(z,t)\delta F(z,0)\rangle/k_{B}T,
1984   \end{equation}
# Line 1886 | Line 1987 | where%
1987   \delta F(z,t)=F(z,t)-\langle F(z,t)\rangle.
1988   \end{equation}
1989  
1889
1990   If the time-dependent friction decays rapidly, the static friction
1991   coefficient can be approximated by
1992   \begin{equation}
1993   \xi_{\text{static}}(z)=\int_{0}^{\infty}\langle\delta F(z,t)\delta F(z,0)\rangle dt.
1994   \end{equation}
1995 < Allowing diffusion constant to then be calculated through the
1995 >
1996 > This allows the diffusion constant to then be calculated through the
1997   Einstein relation:\cite{Marrink94}
1998   \begin{equation}
1999   D(z)=\frac{k_{B}T}{\xi_{\text{static}}(z)}=\frac{(k_{B}T)^{2}}{\int_{0}^{\infty
2000   }\langle\delta F(z,t)\delta F(z,0)\rangle dt}.%
2001   \end{equation}
2002  
2003 < The Z-Constraint method, which fixes the z coordinates of the
2004 < molecules with respect to the center of the mass of the system, has
2005 < been a method suggested to obtain the forces required for the force
2006 < auto-correlation calculation.\cite{Marrink94} However, simply resetting the
2007 < coordinate will move the center of the mass of the whole system. To
2008 < avoid this problem, a new method was used in {\sc oopse}. Instead of
2009 < resetting the coordinate, we reset the forces of z-constrained
2010 < molecules as well as subtract the total constraint forces from the
2011 < rest of the system after the force calculation at each time step.
2003 > The Z-Constraint method, which fixes the $z$ coordinates of a few
2004 > ``tagged'' molecules with respect to the center of the mass of the
2005 > system is a technique that was proposed to obtain the forces required
2006 > for the force auto-correlation calculation.\cite{Marrink94} However,
2007 > simply resetting the coordinate will move the center of the mass of
2008 > the whole system. To avoid this problem, we have developed a new
2009 > method that is utilized in {\sc oopse}. Instead of resetting the
2010 > coordinates, we reset the forces of $z$-constrained molecules and
2011 > subtract the total constraint forces from the rest of the system after
2012 > the force calculation at each time step.
2013  
2014 < After the force calculation, define $G_\alpha$ as
2014 > After the force calculation, the total force on molecule $\alpha$,
2015   \begin{equation}
2016   G_{\alpha} = \sum_i F_{\alpha i},
2017   \label{oopseEq:zc1}
2018   \end{equation}
2019 < where $F_{\alpha i}$ is the force in the z direction of atom $i$ in
2020 < z-constrained molecule $\alpha$. The forces of the z constrained
2021 < molecule are then set to:
2019 > where $F_{\alpha i}$ is the force in the $z$ direction on atom $i$ in
2020 > $z$-constrained molecule $\alpha$. The forces on the atoms in the
2021 > $z$-constrained molecule are then adjusted to remove the total force
2022 > on molecule $\alpha$:
2023   \begin{equation}
2024   F_{\alpha i} = F_{\alpha i} -
2025          \frac{m_{\alpha i} G_{\alpha}}{\sum_i m_{\alpha i}}.
2026   \end{equation}
2027 < Here, $m_{\alpha i}$ is the mass of atom $i$ in the z-constrained
2028 < molecule. Having rescaled the forces, the velocities must also be
2029 < rescaled to subtract out any center of mass velocity in the z
2030 < direction.
2027 > Here, $m_{\alpha i}$ is the mass of atom $i$ in the $z$-constrained
2028 > molecule.  After the forces have been adjusted, the velocities must
2029 > also be modified to subtract out molecule $\alpha$'s center-of-mass
2030 > velocity in the $z$ direction.
2031   \begin{equation}
2032   v_{\alpha i} = v_{\alpha i} -
2033          \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}},
2034   \end{equation}
2035   where $v_{\alpha i}$ is the velocity of atom $i$ in the z direction.
2036 < Lastly, all of the accumulated z constrained forces must be subtracted
2037 < from the system to keep the system center of mass from drifting.
2036 > Lastly, all of the accumulated constraint forces must be subtracted
2037 > from the rest of the unconstrained system to keep the system center of
2038 > mass of the entire system from drifting.
2039   \begin{equation}
2040   F_{\beta i} = F_{\beta i} - \frac{m_{\beta i} \sum_{\alpha} G_{\alpha}}
2041          {\sum_{\beta}\sum_i m_{\beta i}},
2042   \end{equation}
2043 < where $\beta$ are all of the unconstrained molecules in the
2043 > where $\beta$ denotes all {\it unconstrained} molecules in the
2044   system. Similarly, the velocities of the unconstrained molecules must
2045 < also be scaled.
2045 > also be scaled:
2046   \begin{equation}
2047 < v_{\beta i} = v_{\beta i} + \sum_{\alpha}
2048 <        \frac{\sum_i m_{\alpha i} v_{\alpha i}}{\sum_i m_{\alpha i}}.
2047 > v_{\beta i} = v_{\beta i} + \sum_{\alpha} \frac{\sum_i m_{\alpha i}
2048 > v_{\alpha i}}{\sum_i m_{\alpha i}}.
2049   \end{equation}
2050  
2051 < At the very beginning of the simulation, the molecules may not be at their
2052 < constrained positions. To move a z-constrained molecule to its specified
2053 < position, a simple harmonic potential is used
2051 > This method will pin down the centers-of-mass of all of the
2052 > $z$-constrained molecules, and will also keep the entire system fixed
2053 > at the original system center-of-mass location.
2054 >
2055 > At the very beginning of the simulation, the molecules may not be at
2056 > their desired positions. To steer a $z$-constrained molecule to its
2057 > specified position, a simple harmonic potential is used:
2058   \begin{equation}
2059   U(t)=\frac{1}{2}k_{\text{Harmonic}}(z(t)-z_{\text{cons}})^{2},%
2060   \end{equation}
2061 < where $k_{\text{Harmonic}}$ is the harmonic force constant, $z(t)$ is the
2062 < current $z$ coordinate of the center of mass of the constrained molecule, and
2063 < $z_{\text{cons}}$ is the constrained position. The harmonic force operating
2064 < on the z-constrained molecule at time $t$ can be calculated by
2061 > where $k_{\text{Harmonic}}$ is an harmonic force constant, $z(t)$ is
2062 > the current $z$ coordinate of the center of mass of the constrained
2063 > molecule, and $z_{\text{cons}}$ is the desired constraint
2064 > position. The harmonic force operating on the $z$-constrained molecule
2065 > at time $t$ can be calculated by
2066   \begin{equation}
2067   F_{z_{\text{Harmonic}}}(t)=-\frac{\partial U(t)}{\partial z(t)}=
2068          -k_{\text{Harmonic}}(z(t)-z_{\text{cons}}).
2069   \end{equation}
2070  
2071 < \section{\label{oopseSec:props}Trajectory Analysis}
2071 > The user may also specify the use of a constant velocity method
2072 > (steered molecular dynamics) to move the molecules to their desired
2073 > initial positions.
2074  
2075 < \subsection{\label{oopseSec:staticProps}Static Property Analysis}
2075 > To use of the $z$-constraint method in an {\sc oopse} simulation, the
2076 > molecules must be specified using the {\tt nZconstraints} keyword in
2077 > the meta-data file.  The other parameters for modifying the behavior
2078 > of the $z$-constraint method are listed in table~\ref{table:zconParams}.
2079  
1966 The static properties of the trajectories are analyzed with the
1967 program \texttt{staticProps}. The code is capable of calculating a
1968 number of pair correlations between species A and B. Some of which
1969 only apply to directional entities. The summary of pair correlations
1970 can be found in Table~\ref{oopseTb:gofrs}
1971
2080   \begin{table}
2081 < \caption{THE DIFFERENT PAIR CORRELATIONS IN \texttt{staticProps}}
2082 < \label{oopseTb:gofrs}
2081 > \caption{The Global Keywords: Z-Constraint Parameters}
2082 > \label{table:zconParams}
2083   \begin{center}
2084 < \begin{tabular}{|l|c|c|}
2085 < \hline
2086 < Name      & Equation & Directional Atom \\ \hline
2087 < $g_{\text{AB}}(r)$              & Eq.~\ref{eq:gofr}         & neither \\ \hline
2088 < $g_{\text{AB}}(r, \cos \theta)$ & Eq.~\ref{eq:gofrCosTheta} & A \\ \hline
2089 < $g_{\text{AB}}(r, \cos \omega)$ & Eq.~\ref{eq:gofrCosOmega} & both \\ \hline
2090 < $g_{\text{AB}}(x, y, z)$        & Eq.~\ref{eq:gofrXYZ}      & neither \\ \hline
1983 < $\langle \cos \omega \rangle_{\text{AB}}(r)$ & Eq.~\ref{eq:cosOmegaOfR} &%
1984 <        both \\ \hline
1985 < \end{tabular}
1986 < \begin{minipage}{\linewidth}
1987 < \centering
1988 < \vspace{2mm}
1989 < The third column specifies which atom, if any, need be a directional entity.
1990 < \end{minipage}
1991 < \end{center}
1992 < \end{table}
2084 > % Note when adding or removing columns, the \hsize numbers must add up to the total number
2085 > % of columns.
2086 > \begin{tabularx}{\linewidth}%
2087 >  {>{\setlength{\hsize}{1.00\hsize}}X%
2088 >  >{\setlength{\hsize}{0.4\hsize}}X%
2089 >  >{\setlength{\hsize}{1.2\hsize}}X%
2090 >  >{\setlength{\hsize}{1.4\hsize}}X}
2091  
2092 < The first pair correlation, $g_{\text{AB}}(r)$, is defined as follows:
1995 < \begin{equation}
1996 < g_{\text{AB}}(r) = \frac{V}{N_{\text{A}}N_{\text{B}}}\langle %%
1997 <        \sum_{i \in \text{A}} \sum_{j \in \text{B}} %%
1998 <        \delta( r - |\mathbf{r}_{ij}|) \rangle, \label{eq:gofr}
1999 < \end{equation}
2000 < where $\mathbf{r}_{ij}$ is the vector
2001 < \begin{equation*}
2002 < \mathbf{r}_{ij} = \mathbf{r}_j - \mathbf{r}_i, \notag
2003 < \end{equation*}
2004 < and $\frac{V}{N_{\text{A}}N_{\text{B}}}$ normalizes the average over
2005 < the expected pair density at a given $r$.
2092 > {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
2093  
2094 < The next two pair correlations, $g_{\text{AB}}(r, \cos \theta)$ and
2095 < $g_{\text{AB}}(r, \cos \omega)$, are similar in that they are both two
2096 < dimensional histograms. Both use $r$ for the primary axis then a
2097 < $\cos$ for the secondary axis ($\cos \theta$ for
2098 < Eq.~\ref{eq:gofrCosTheta} and $\cos \omega$ for
2099 < Eq.~\ref{eq:gofrCosOmega}). This allows for the investigator to
2100 < correlate alignment on directional entities. $g_{\text{AB}}(r, \cos
2101 < \theta)$ is defined as follows:
2102 < \begin{equation}
2103 < g_{\text{AB}}(r, \cos \theta) = \frac{V}{N_{\text{A}}N_{\text{B}}}\langle  
2104 < \sum_{i \in \text{A}} \sum_{j \in \text{B}}  
2105 < \delta( \cos \theta - \cos \theta_{ij})
2106 < \delta( r - |\mathbf{r}_{ij}|) \rangle.
2020 < \label{eq:gofrCosTheta}
2021 < \end{equation}
2022 < Here
2023 < \begin{equation*}
2024 < \cos \theta_{ij} = \mathbf{\hat{i}} \cdot \mathbf{\hat{r}}_{ij},
2025 < \end{equation*}
2026 < where $\mathbf{\hat{i}}$ is the unit directional vector of species $i$
2027 < and $\mathbf{\hat{r}}_{ij}$ is the unit vector associated with vector
2028 < $\mathbf{r}_{ij}$.
2094 > {\tt nZconstraints} & integer &  The number of zconstraint molecules& If using zconstraint method, {\tt nZconstraints} must be set \\
2095 > {\tt zconsTime} & fs & Sets the frequency at which the {\tt .fz} file is written &  \\
2096 > {\tt zconsForcePolicy} & string & The strategy of subtracting
2097 > zconstraint force from the unconstrained molecules & Possible
2098 > strategies are {\tt BYMASS} and {\tt BYNUMBER}. Default
2099 > strategy is set to {\tt BYMASS}\\
2100 > {\tt zconsGap} & $\mbox{\AA}$ & Set the distance between two adjacent
2101 > constraint positions& Used mainly in moving molecules through a simulation \\
2102 > {\tt zconsFixtime} & fs & Sets how long the zconstraint molecule is
2103 > fixed & {\tt zconsFixtime} must be set if {\tt zconsGap} is set\\
2104 > {\tt zconsUsingSMD} &logical & Flag for using Steered Molecular
2105 > Dynamics or Harmonic Forces to move the molecule  & Harmonic Forces are
2106 > used by default\\
2107  
2108 < The second two dimensional histogram is of the form:
2109 < \begin{equation}
2110 < g_{\text{AB}}(r, \cos \omega) =
2033 <        \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
2034 <        \sum_{i \in \text{A}} \sum_{j \in \text{B}}
2035 <        \delta( \cos \omega - \cos \omega_{ij})
2036 <        \delta( r - |\mathbf{r}_{ij}|) \rangle. \label{eq:gofrCosOmega}
2037 < \end{equation}
2038 < Here
2039 < \begin{equation*}
2040 < \cos \omega_{ij} = \mathbf{\hat{i}} \cdot \mathbf{\hat{j}}.
2041 < \end{equation*}
2042 < Again, $\mathbf{\hat{i}}$ and $\mathbf{\hat{j}}$ are the unit
2043 < directional vectors of species $i$ and $j$.
2108 > \end{tabularx}
2109 > \end{center}
2110 > \end{table}
2111  
2045 The static analysis code is also cable of calculating a three
2046 dimensional pair correlation of the form:
2047 \begin{equation}\label{eq:gofrXYZ}
2048 g_{\text{AB}}(x, y, z) =
2049        \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
2050        \sum_{i \in \text{A}} \sum_{j \in \text{B}}
2051        \delta( x - x_{ij})
2052        \delta( y - y_{ij})
2053        \delta( z - z_{ij}) \rangle,
2054 \end{equation}
2055 where $x_{ij}$, $y_{ij}$, and $z_{ij}$ are the $x$, $y$, and $z$
2056 components respectively of vector $\mathbf{r}_{ij}$.
2112  
2113 < The final pair correlation is similar to
2059 < Eq.~\ref{eq:gofrCosOmega}. $\langle \cos \omega
2060 < \rangle_{\text{AB}}(r)$ is calculated in the following way:
2061 < \begin{equation}\label{eq:cosOmegaOfR}
2062 < \langle \cos \omega \rangle_{\text{AB}}(r)  =
2063 <        \langle \sum_{i \in \text{A}} \sum_{j \in \text{B}}
2064 <        (\cos \omega_{ij}) \delta( r - |\mathbf{r}_{ij}|) \rangle.
2065 < \end{equation}
2066 < Here $\cos \omega_{ij}$ is defined in the same way as in
2067 < Eq.~\ref{eq:gofrCosOmega}. This equation is a single dimensional pair
2068 < correlation that gives the average correlation of two directional
2069 < entities as a function of their distance from each other.
2113 > \section{\label{oopseSec:minimizer}Energy Minimization}
2114  
2115 < \subsection{\label{dynamicProps}Dynamic Property Analysis}
2115 > As one of the basic procedures of molecular modeling, energy
2116 > minimization is used to identify local configurations that are stable
2117 > points on the potential energy surface. There is a vast literature on
2118 > energy minimization algorithms have been developed to search for the
2119 > global energy minimum as well as to find local structures which are
2120 > stable fixed points on the surface.  We have included two simple
2121 > minimization algorithms: steepest descent, ({\sc sd}) and conjugate
2122 > gradient ({\sc cg}) to help users find reasonable local minima from
2123 > their initial configurations.
2124  
2125 < The dynamic properties of a trajectory are calculated with the program
2126 < \texttt{dynamicProps}. The program calculates the following properties:
2127 < \begin{gather}
2128 < \langle | \mathbf{r}(t) - \mathbf{r}(0) |^2 \rangle, \label{eq:rms}\\
2077 < \langle \mathbf{v}(t) \cdot \mathbf{v}(0) \rangle, \label{eq:velCorr} \\
2078 < \langle \mathbf{j}(t) \cdot \mathbf{j}(0) \rangle. \label{eq:angularVelCorr}
2079 < \end{gather}
2125 > Since {\sc oopse} handles atoms and rigid bodies which have
2126 > orientational coordinates as well as translational coordinates, there
2127 > is some subtlety to the choice of parameters for minimization
2128 > algorithms.
2129  
2130 < Eq.~\ref{eq:rms} is the root mean square displacement function. Which
2131 < allows one to observe the average displacement of an atom as a
2132 < function of time. The quantity is useful when calculating diffusion
2133 < coefficients because of the Einstein Relation, which is valid at long
2134 < times.\cite{allen87:csl}
2130 > Given a coordinate set $x_{k}$ and a search direction $d_{k}$, a line
2131 > search algorithm is performed along $d_{k}$ to produce
2132 > $x_{k+1}=x_{k}+$ $\lambda _{k}d_{k}$.
2133 >
2134 > In the steepest descent ({\sc sd}) algorithm,%
2135   \begin{equation}
2136 < 2tD = \langle | \mathbf{r}(t) - \mathbf{r}(0) |^2 \rangle.
2088 < \label{oopseEq:einstein}
2136 > d_{k}=-\nabla V(x_{k})
2137   \end{equation}
2138 <
2139 < Eq.~\ref{eq:velCorr} and \ref{eq:angularVelCorr} are the translational
2140 < velocity and angular velocity correlation functions respectively. The
2141 < latter is only applicable to directional species in the
2142 < simulation. The velocity autocorrelation functions are useful when
2143 < determining vibrational information about the system of interest.
2138 > The gradient and the direction of next step are always orthogonal.
2139 > This may cause oscillatory behavior in narrow valleys.  To overcome
2140 > this problem, the Fletcher-Reeves variant~\cite{FletcherReeves} of the
2141 > conjugate gradient ({\sc cg}) algorithm is used to generate $d_{k+1}$
2142 > via simple recursion:
2143 > \begin{align}
2144 > d_{k+1}  &  =-\nabla V(x_{k+1})+\gamma_{k}d_{k}\\
2145 > \gamma_{k}  &  =\frac{\nabla V(x_{k+1})^{T}\nabla V(x_{k+1})}{\nabla
2146 > V(x_{k})^{T}\nabla V(x_{k})}%
2147 > \end{align}
2148  
2149 < \section{\label{oopseSec:design}Program Design}
2149 > The Polak-Ribiere variant~\cite{PolakRibiere} of the conjugate
2150 > gradient ($\gamma_{k}$) is defined as%
2151 > \begin{equation}
2152 > \gamma_{k}=\frac{[\nabla V(x_{k+1})-\nabla V(x)]^{T}\nabla V(x_{k+1})}{\nabla
2153 > V(x_{k})^{T}\nabla V(x_{k})}%
2154 > \end{equation}
2155  
2156 < \subsection{\label{sec:architecture} {\sc oopse} Architecture}
2156 > The conjugate gradient method assumes that the conformation is close
2157 > enough to a local minimum that the potential energy surface is very
2158 > nearly quadratic.  When the initial structure is far from the minimum,
2159 > the steepest descent method can be superior to the conjugate gradient
2160 > method. Hence, the steepest descent method is often used for the first
2161 > 10-100 steps of minimization. Another useful feature of minimization
2162 > methods in {\sc oopse} is that a modified {\sc shake} algorithm can be
2163 > applied during the minimization to constraint the bond lengths if this
2164 > is required by the force field. Meta-data parameters concerning the
2165 > minimizer are given in Table~\ref{table:minimizeParams}
2166  
2167 < The core of OOPSE is divided into two main object libraries:
2168 < \texttt{libBASS} and \texttt{libmdtools}. \texttt{libBASS} is the
2169 < library developed around the parsing engine and \texttt{libmdtools}
2170 < is the software library developed around the simulation engine. These
2171 < two libraries are designed to encompass all the basic functions and
2172 < tools that {\sc oopse} provides. Utility programs, such as the
2173 < property analyzers, need only link against the software libraries to
2174 < gain access to parsing, force evaluation, and input / output
2175 < routines.
2167 > \begin{table}
2168 > \caption{The Global Keywords: Energy Minimizer Parameters}
2169 > \label{table:minimizeParams}
2170 > \begin{center}
2171 > % Note when adding or removing columns, the \hsize numbers must add up to the total number
2172 > % of columns.
2173 > \begin{tabularx}{\linewidth}%
2174 >  {>{\setlength{\hsize}{1.2\hsize}}X%
2175 >  >{\setlength{\hsize}{0.6\hsize}}X%
2176 >  >{\setlength{\hsize}{1.1\hsize}}X%
2177 >  >{\setlength{\hsize}{1.1\hsize}}X}
2178  
2179 < Contained in \texttt{libBASS} are all the routines associated with
2112 < reading and parsing the \texttt{.bass} input files. Given a
2113 < \texttt{.bass} file, \texttt{libBASS} will open it and any associated
2114 < \texttt{.mdl} files; then create structures in memory that are
2115 < templates of all the molecules specified in the input files. In
2116 < addition, any simulation parameters set in the \texttt{.bass} file
2117 < will be placed in a structure for later query by the controlling
2118 < program.
2179 > {\bf keyword} & {\bf units} & {\bf use} & {\bf remarks} \\ \hline
2180  
2181 < Located in \texttt{libmdtools} are all other routines necessary to a
2182 < Molecular Dynamics simulation. The library uses the main data
2183 < structures returned by \texttt{libBASS} to initialize the various
2184 < parts of the simulation: the atom structures and positions, the force
2185 < field, the integrator, \emph{et cetera}. After initialization, the
2186 < library can be used to perform a variety of tasks: integrate a
2187 < Molecular Dynamics trajectory, query phase space information from a
2188 < specific frame of a completed trajectory, or even recalculate force or
2189 < energetic information about specific frames from a completed
2190 < trajectory.
2181 > {\tt minimizer} & string &  selects the minimization method to be used
2182 > & either {\tt CG} (conjugate gradient) or {\tt SD} (steepest
2183 > descent) \\
2184 > {\tt minimizerMaxIter} & steps & Sets the maximum iteration number in the energy minimization & Default value is 200\\
2185 > {\tt minimizerWriteFreq} & steps & Sets the frequency at which the {\tt .dump} and {\tt .stat} files are writtern during energy minimization & \\
2186 > {\tt minimizerStepSize} & $\mbox{\AA}$ &  Set the step size of line search & Default value is 0.01\\
2187 > {\tt minimizerFTol} & $\mbox{kcal mol}^{-1}$  & Sets energy tolerance  & Default value is $10^{-8}$\\
2188 > {\tt minimizerGTol} & $\mbox{kcal mol}^{-1}\mbox{\AA}^{-1}$ & Sets gradient tolerance & Default value is $10^{-8}$\\
2189 > {\tt minimizerLSTol} &  $\mbox{kcal mol}^{-1}$ & Sets line search tolerance & Default value is $10^{-8}$\\
2190 > {\tt minimizerLSMaxIter} & steps &  Sets the maximum iteration of line searching & Default value is 50\\
2191  
2192 < With these core libraries in place, several programs have been
2193 < developed to utilize the routines provided by \texttt{libBASS} and
2194 < \texttt{libmdtools}. The main program of the package is \texttt{oopse}
2134 < and the corresponding parallel version \texttt{oopse\_MPI}. These two
2135 < programs will take the \texttt{.bass} file, and create (and integrate)
2136 < the simulation specified in the script. The two analysis programs
2137 < \texttt{staticProps} and \texttt{dynamicProps} utilize the core
2138 < libraries to initialize and read in trajectories from previously
2139 < completed simulations, in addition to the ability to use functionality
2140 < from \texttt{libmdtools} to recalculate forces and energies at key
2141 < frames in the trajectories. Lastly, the family of system building
2142 < programs (Sec.~\ref{oopseSec:initCoords}) also use the libraries to
2143 < store and output the system configurations they create.
2192 > \end{tabularx}
2193 > \end{center}
2194 > \end{table}
2195  
2196 < \subsection{\label{oopseSec:parallelization} Parallelization of {\sc oopse}}
2196 > \section{\label{oopseSec:parallelization} Parallel Simulation Implementation}
2197  
2198 < Although processor power is continually growing roughly following
2199 < Moore's Law, it is still unreasonable to simulate systems of more then
2200 < a 1000 atoms on a single processor. To facilitate study of larger
2201 < system sizes or smaller systems on long time scales in a reasonable
2202 < period of time, parallel methods were developed allowing multiple
2203 < CPU's to share the simulation workload. Three general categories of
2204 < parallel decomposition methods have been developed including atomic,
2205 < spatial and force decomposition methods.
2198 > Although processor power is continually improving, it is still
2199 > unreasonable to simulate systems of more then a 1000 atoms on a single
2200 > processor. To facilitate study of larger system sizes or smaller
2201 > systems for longer time scales, parallel methods were developed to
2202 > allow multiple CPU's to share the simulation workload. Three general
2203 > categories of parallel decomposition methods have been developed:
2204 > these are the atomic,\cite{Fox88} spatial~\cite{plimpton95} and
2205 > force~\cite{Paradyn} decomposition methods.
2206  
2207 < Algorithmically simplest of the three methods is atomic decomposition
2208 < where N particles in a simulation are split among P processors for the
2209 < duration of the simulation. Computational cost scales as an optimal
2210 < $\mathcal{O}(N/P)$ for atomic decomposition. Unfortunately all
2207 > Algorithmically simplest of the three methods is atomic decomposition,
2208 > where $N$ particles in a simulation are split among $P$ processors for
2209 > the duration of the simulation. Computational cost scales as an
2210 > optimal $\mathcal{O}(N/P)$ for atomic decomposition. Unfortunately all
2211   processors must communicate positions and forces with all other
2212 < processors at every force evaluation, leading communication costs to
2213 < scale as an unfavorable $\mathcal{O}(N)$, \emph{independent of the
2212 > processors at every force evaluation, leading the communication costs
2213 > to scale as an unfavorable $\mathcal{O}(N)$, \emph{independent of the
2214   number of processors}. This communication bottleneck led to the
2215 < development of spatial and force decomposition methods in which
2215 > development of spatial and force decomposition methods, in which
2216   communication among processors scales much more favorably. Spatial or
2217   domain decomposition divides the physical spatial domain into 3D boxes
2218   in which each processor is responsible for calculation of forces and
2219   positions of particles located in its box. Particles are reassigned to
2220   different processors as they move through simulation space. To
2221 < calculate forces on a given particle, a processor must know the
2221 > calculate forces on a given particle, a processor must simply know the
2222   positions of particles within some cutoff radius located on nearby
2223 < processors instead of the positions of particles on all
2223 > processors rather than the positions of particles on all
2224   processors. Both communication between processors and computation
2225   scale as $\mathcal{O}(N/P)$ in the spatial method. However, spatial
2226   decomposition adds algorithmic complexity to the simulation code and
2227 < is not very efficient for small N since the overall communication
2227 > is not very efficient for small $N$, since the overall communication
2228   scales as the surface to volume ratio $\mathcal{O}(N/P)^{2/3}$ in
2229   three dimensions.
2230  
# Line 2182 | Line 2233 | given row by particles located in that processors colu
2233   processors based on a block decomposition of the force
2234   matrix. Processors are split into an optimally square grid forming row
2235   and column processor groups. Forces are calculated on particles in a
2236 < given row by particles located in that processors column
2236 > given row by particles located in that processor's column
2237   assignment. Force decomposition is less complex to implement than the
2238   spatial method but still scales computationally as $\mathcal{O}(N/P)$
2239   and scales as $\mathcal{O}(N/\sqrt{P})$ in communication
# Line 2191 | Line 2242 | atoms.\cite{plimpton95}
2242   and favorably compete with spatial methods up to 100,000
2243   atoms.\cite{plimpton95}
2244  
2194 \subsection{\label{oopseSec:memAlloc}Memory Issues in Trajectory Analysis}
2195
2196 For large simulations, the trajectory files can sometimes reach sizes
2197 in excess of several gigabytes. In order to effectively analyze that
2198 amount of data, two memory management schemes have been devised for
2199 \texttt{staticProps} and for \texttt{dynamicProps}. The first scheme,
2200 developed for \texttt{staticProps}, is the simplest. As each frame's
2201 statistics are calculated independent of each other, memory is
2202 allocated for each frame, then freed once correlation calculations are
2203 complete for the snapshot. To prevent multiple passes through a
2204 potentially large file, \texttt{staticProps} is capable of calculating
2205 all requested correlations per frame with only a single pair loop in
2206 each frame and a single read of the file.
2207
2208 The second, more advanced memory scheme, is used by
2209 \texttt{dynamicProps}. Here, the program must have multiple frames in
2210 memory to calculate time dependent correlations. In order to prevent a
2211 situation where the program runs out of memory due to large
2212 trajectories, the user is able to specify that the trajectory be read
2213 in blocks. The number of frames in each block is specified by the
2214 user, and upon reading a block of the trajectory,
2215 \texttt{dynamicProps} will calculate all of the time correlation frame
2216 pairs within the block. After in-block correlations are complete, a
2217 second block of the trajectory is read, and the cross correlations are
2218 calculated between the two blocks. This second block is then freed and
2219 then incremented and the process repeated until the end of the
2220 trajectory. Once the end is reached, the first block is freed then
2221 incremented, and the again the internal time correlations are
2222 calculated. The algorithm with the second block is then repeated with
2223 the new origin block, until all frame pairs have been correlated in
2224 time. This process is illustrated in
2225 Fig.~\ref{oopseFig:dynamicPropsMemory}.
2226
2227 %\begin{figure}
2228 %\centering
2229 %\includegraphics[width=\linewidth]{dynamicPropsMem.eps}
2230 %\caption[A representation of the block correlations in \texttt{dynamicProps}]{This diagram illustrates the memory management used by \texttt{dynamicProps}, which follows the scheme: $\sum^{N_{\text{memory blocks}}}_{i=1}[ \operatorname{self}(i) + \sum^{N_{\text{memory blocks}}}_{j>i} \operatorname{cross}(i,j)]$. The shaded region represents the self correlation of the memory block, and the open blocks are read one at a time and the cross correlations between blocks are calculated.}
2231 %\label{oopseFig:dynamicPropsMemory}
2232 %\end{figure}
2233
2245   \section{\label{oopseSec:conclusion}Conclusion}
2246  
2247 < We have presented the design and implementation of our open source
2248 < simulation package {\sc oopse}. The package offers novel capabilities
2249 < to the field of Molecular Dynamics simulation packages in the form of
2250 < dipolar force fields, and symplectic integration of rigid body
2251 < dynamics. It is capable of scaling across multiple processors through
2252 < the use of force based decomposition using MPI. It also implements
2253 < several advanced integrators allowing the end user control over
2254 < temperature and pressure. In addition, it is capable of integrating
2255 < constrained dynamics through both the {\sc rattle} algorithm and the
2256 < z-constraint method.
2247 > We have presented a new open source parallel simulation program {\sc
2248 > oopse}. This program offers some novel capabilities, but mostly makes
2249 > available a library of modern object-oriented code for the scientific
2250 > community to use freely.  Notably, {\sc oopse} can handle symplectic
2251 > integration of objects (atoms and rigid bodies) which have
2252 > orientational degrees of freedom.  It can also work with transition
2253 > metal force fields and point-dipoles. It is capable of scaling across
2254 > multiple processors through the use of force based decomposition. It
2255 > also implements several advanced integrators allowing the end user
2256 > control over temperature and pressure. In addition, it is capable of
2257 > integrating constrained dynamics through both the {\sc rattle}
2258 > algorithm and the $z$-constraint method.
2259  
2260 < These features are all brought together in a single open-source
2261 < program. This allows researchers to not only benefit from
2262 < {\sc oopse}, but also contribute to {\sc oopse}'s development as
2263 < well.
2260 > We encourage other researchers to download and apply this program to
2261 > their own research problems.  By making the code available, we hope to
2262 > encourage other researchers to contribute their own code and make it a
2263 > more powerful package for everyone in the molecular dynamics community
2264 > to use.  All source code for {\sc oopse} is available for download at
2265 > {\tt http://oopse.org}.
2266  
2252
2267   \newpage
2268   \section{Acknowledgments}
2255 The authors would like to thank espresso for fueling this work, and
2256 would also like to send a special acknowledgement to single malt
2257 scotch for its wonderful calming effects and its ability to make the
2258 troubles of the world float away.
2269  
2270 + Development of {\sc oopse} was funded by a New Faculty Award from the
2271 + Camille and Henry Dreyfus Foundation and by the National Science
2272 + Foundation under grant CHE-0134881. Computation time was provided by
2273 + the Notre Dame Bunch-of-Boxes (B.o.B) computer cluster under NSF grant
2274 + DMR-0079647.
2275 +
2276   \bibliographystyle{achemso}
2277   \bibliography{oopsePaper}
2278  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines