ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mattDisertation/oopse.tex
Revision: 1045
Committed: Tue Feb 10 20:52:03 2004 UTC (20 years, 4 months ago) by mmeineke
Content type: application/x-tex
File size: 47900 byte(s)
Log Message:
added a lipid figure. started converting oopse.tex

File Contents

# User Rev Content
1 mmeineke 1045 \chapter{\label{chapt:oopse}OOPSE: AN OPEN SOURCE OBJECT-ORIENTED PARALLEL SIMULATION ENGINE FOR MOLECULAR DYNAMICS}
2 mmeineke 1044
3    
4    
5 mmeineke 1045 %% \begin{abstract}
6     %% We detail the capabilities of a new open-source parallel simulation
7     %% package ({\sc oopse}) that can perform molecular dynamics simulations
8     %% on atom types that are missing from other popular packages. In
9     %% particular, {\sc oopse} is capable of performing orientational
10     %% dynamics on dipolar systems, and it can handle simulations of metallic
11     %% systems using the embedded atom method ({\sc eam}).
12     %% \end{abstract}
13 mmeineke 1044
14 mmeineke 1045 \lstset{language=C,frame=TB,basicstyle=\small,basicstyle=\ttfamily, %
15     xleftmargin=0.5in, xrightmargin=0.5in,captionpos=b, %
16     abovecaptionskip=0.5cm, belowcaptionskip=0.5cm}
17 mmeineke 1044 \section{\label{sec:intro}Introduction}
18    
19     \begin{itemize}
20    
21     \item Need for package / Niche to fill
22    
23     \item Design Goal
24    
25     \item Open Source
26    
27     \item Discussion of Paper Layout
28    
29     \end{itemize}
30    
31     \section{\label{sec:empiricalEnergy}The Empirical Energy Functions}
32    
33     \subsection{\label{sec:atomsMolecules}Atoms, Molecules and Rigid Bodies}
34    
35     The basic unit of an {\sc oopse} simulation is the atom. The
36     parameters describing the atom are generalized to make the atom as
37     flexible a representation as possible. They may represent specific
38     atoms of an element, or be used for collections of atoms such as
39     methyl and carbonyl groups. The atoms are also capable of having
40     directional components associated with them (\emph{e.g.}~permanent
41     dipoles). Charges on atoms are not currently supported by {\sc oopse}.
42    
43 mmeineke 1045 \begin{lstlisting}[float,caption={[Specifier for molecules and atoms] A sample specification of the simple Ar molecule},label=sch:AtmMole]
44 mmeineke 1044 molecule{
45     name = "Ar";
46     nAtoms = 1;
47     atom[0]{
48     type="Ar";
49     position( 0.0, 0.0, 0.0 );
50     }
51     }
52     \end{lstlisting}
53    
54 mmeineke 1045
55 mmeineke 1044 Atoms can be collected into secondary srtructures such as rigid bodies
56     or molecules. The molecule is a way for {\sc oopse} to keep track of
57     the atoms in a simulation in logical manner. Molecular units store the
58     identities of all the atoms associated with themselves, and are
59     responsible for the evaluation of their own internal interactions
60     (\emph{i.e.}~bonds, bends, and torsions). Scheme \ref{sch:AtmMole}
61     shws how one creates a molecule in the \texttt{.mdl} files. The
62     position of the atoms given in the declaration are relative to the
63     origin of the molecule, and is used when creating a system containing
64     the molecule.
65    
66     As stated previously, one of the features that sets {\sc oopse} apart
67     from most of the current molecular simulation packages is the ability
68     to handle rigid body dynamics. Rigid bodies are non-spherical
69     particles or collections of particles that have a constant internal
70     potential and move collectively.\cite{Goldstein01} They are not
71     included in most simulation packages because of the requirement to
72     propagate the orientational degrees of freedom. Until recently,
73     integrators which propagate orientational motion have been lacking.
74    
75     Moving a rigid body involves determination of both the force and
76     torque applied by the surroundings, which directly affect the
77     translational and rotational motion in turn. In order to accumulate
78     the total force on a rigid body, the external forces and torques must
79     first be calculated for all the internal particles. The total force on
80     the rigid body is simply the sum of these external forces.
81     Accumulation of the total torque on the rigid body is more complex
82     than the force in that it is the torque applied on the center of mass
83     that dictates rotational motion. The torque on rigid body {\it i} is
84     \begin{equation}
85     \boldsymbol{\tau}_i=
86     \sum_{a}(\mathbf{r}_{ia}-\mathbf{r}_i)\times \mathbf{f}_{ia}
87     + \boldsymbol{\tau}_{ia},
88     \label{eq:torqueAccumulate}
89     \end{equation}
90     where $\boldsymbol{\tau}_i$ and $\mathbf{r}_i$ are the torque on and
91     position of the center of mass respectively, while $\mathbf{f}_{ia}$,
92     $\mathbf{r}_{ia}$, and $\boldsymbol{\tau}_{ia}$ are the force on,
93     position of, and torque on the component particles of the rigid body.
94    
95     The summation of the total torque is done in the body fixed axis of
96     the rigid body. In order to move between the space fixed and body
97     fixed coordinate axes, parameters describing the orientation must be
98     maintained for each rigid body. At a minimum, the rotation matrix
99     (\textbf{A}) can be described by the three Euler angles ($\phi,
100     \theta,$ and $\psi$), where the elements of \textbf{A} are composed of
101     trigonometric operations involving $\phi, \theta,$ and
102     $\psi$.\cite{Goldstein01} In order to avoid numerical instabilities
103     inherent in using the Euler angles, the four parameter ``quaternion''
104     scheme is often used. The elements of \textbf{A} can be expressed as
105     arithmetic operations involving the four quaternions ($q_0, q_1, q_2,$
106     and $q_3$).\cite{allen87:csl} Use of quaternions also leads to
107     performance enhancements, particularly for very small
108     systems.\cite{Evans77}
109    
110     {\sc oopse} utilizes a relatively new scheme that propagates the
111     entire nine parameter rotation matrix internally. Further discussion
112     on this choice can be found in Sec.~\ref{sec:integrate}. An example
113     definition of a riged body can be seen in Scheme
114     \ref{sch:rigidBody}. The positions in the atom definitions are the
115     placements of the atoms relative to the origin of the rigid body,
116     which itself has a position relative to the origin of the molecule.
117    
118 mmeineke 1045 \begin{lstlisting}[float,caption={[Defining rigid bodies]A sample definition of a rigid body},label={sch:rigidBody}]
119 mmeineke 1044 molecule{
120     name = "TIP3P_water";
121     nRigidBodies = 1;
122     rigidBody[0]{
123     nAtoms = 3;
124     atom[0]{
125     type = "O_TIP3P";
126     position( 0.0, 0.0, -0.06556 );
127     }
128     atom[1]{
129     type = "H_TIP3P";
130     position( 0.0, 0.75695, 0.52032 );
131     }
132     atom[2]{
133     type = "H_TIP3P";
134     position( 0.0, -0.75695, 0.52032 );
135     }
136     position( 0.0, 0.0, 0.0 );
137     orientation( 0.0, 0.0, 1.0 );
138     }
139     }
140     \end{lstlisting}
141    
142     \subsection{\label{sec:LJPot}The Lennard Jones Potential}
143    
144     The most basic force field implemented in {\sc oopse} is the
145     Lennard-Jones potential, which mimics the van der Waals interaction at
146     long distances, and uses an empirical repulsion at short
147     distances. The Lennard-Jones potential is given by:
148     \begin{equation}
149     V_{\text{LJ}}(r_{ij}) =
150     4\epsilon_{ij} \biggl[
151     \biggl(\frac{\sigma_{ij}}{r_{ij}}\biggr)^{12}
152     - \biggl(\frac{\sigma_{ij}}{r_{ij}}\biggr)^{6}
153     \biggr]
154     \label{eq:lennardJonesPot}
155     \end{equation}
156     Where $r_{ij}$ is the distance between particles $i$ and $j$,
157     $\sigma_{ij}$ scales the length of the interaction, and
158     $\epsilon_{ij}$ scales the well depth of the potential. Scheme
159     \ref{sch:LJFF} gives and example partial \texttt{.bass} file that
160     shows a system of 108 Ar particles simulated with the Lennard-Jones
161     force field.
162    
163 mmeineke 1045 \begin{lstlisting}[float,caption={[Invocation of the Lennard-Jones force field] A sample system using the Lennard-Jones force field.},label={sch:LJFF}]
164 mmeineke 1044
165     /*
166     * The Ar molecule is specified
167     * external to the.bass file
168     */
169    
170     #include "argon.mdl"
171    
172     nComponents = 1;
173     component{
174     type = "Ar";
175     nMol = 108;
176     }
177    
178     /*
179     * The initial configuration is generated
180     * before the simulation is invoked.
181     */
182    
183     initialConfig = "./argon.init";
184    
185     forceField = "LJ";
186     \end{lstlisting}
187    
188     Because this potential is calculated between all pairs, the force
189     evaluation can become computationally expensive for large systems. To
190     keep the pair evaluations to a manageable number, {\sc oopse} employs
191     a cut-off radius.\cite{allen87:csl} The cutoff radius is set to be
192     $2.5\sigma_{ii}$, where $\sigma_{ii}$ is the largest Lennard-Jones
193     length parameter present in the simulation. Truncating the calculation
194     at $r_{\text{cut}}$ introduces a discontinuity into the potential
195     energy. To offset this discontinuity, the energy value at
196     $r_{\text{cut}}$ is subtracted from the potential. This causes the
197     potential to go to zero smoothly at the cut-off radius.
198    
199     Interactions between dissimilar particles requires the generation of
200     cross term parameters for $\sigma$ and $\epsilon$. These are
201     calculated through the Lorentz-Berthelot mixing
202     rules:\cite{allen87:csl}
203     \begin{equation}
204     \sigma_{ij} = \frac{1}{2}[\sigma_{ii} + \sigma_{jj}]
205     \label{eq:sigmaMix}
206     \end{equation}
207     and
208     \begin{equation}
209     \epsilon_{ij} = \sqrt{\epsilon_{ii} \epsilon_{jj}}
210     \label{eq:epsilonMix}
211     \end{equation}
212    
213    
214    
215     \subsection{\label{sec:DUFF}Dipolar Unified-Atom Force Field}
216    
217     The dipolar unified-atom force field ({\sc duff}) was developed to
218     simulate lipid bilayers. The simulations require a model capable of
219     forming bilayers, while still being sufficiently computationally
220     efficient to allow large systems ($\approx$100's of phospholipids,
221     $\approx$1000's of waters) to be simulated for long times
222     ($\approx$10's of nanoseconds).
223    
224     With this goal in mind, {\sc duff} has no point
225     charges. Charge-neutral distributions were replaced with dipoles,
226     while most atoms and groups of atoms were reduced to Lennard-Jones
227     interaction sites. This simplification cuts the length scale of long
228     range interactions from $\frac{1}{r}$ to $\frac{1}{r^3}$, allowing us
229     to avoid the computationally expensive Ewald sum. Instead, we can use
230     neighbor-lists, reaction field, and cutoff radii for the dipolar
231     interactions.
232    
233     As an example, lipid head-groups in {\sc duff} are represented as
234     point dipole interaction sites. By placing a dipole of 20.6~Debye at
235     the head group center of mass, our model mimics the head group of
236     phosphatidylcholine.\cite{Cevc87} Additionally, a large Lennard-Jones
237     site is located at the pseudoatom's center of mass. The model is
238     illustrated by the dark grey atom in Fig.~\ref{fig:lipidModel}. The
239     water model we use to complement the dipoles of the lipids is our
240     reparameterization of the soft sticky dipole (SSD) model of Ichiye
241     \emph{et al.}\cite{liu96:new_model}
242    
243     \begin{figure}
244 mmeineke 1045 \centering
245     \includegraphics[width=\linewidth]{lipidModel.eps}
246 mmeineke 1044 \caption{A representation of the lipid model. $\phi$ is the torsion angle, $\theta$ %
247     is the bend angle, $\mu$ is the dipole moment of the head group, and n
248     is the chain length.}
249 mmeineke 1045 \label{oopseFig:lipidModel}
250 mmeineke 1044 \end{figure}
251    
252     We have used a set of scalable parameters to model the alkyl groups
253     with Lennard-Jones sites. For this, we have borrowed parameters from
254     the TraPPE force field of Siepmann
255     \emph{et al}.\cite{Siepmann1998} TraPPE is a unified-atom
256     representation of n-alkanes, which is parametrized against phase
257     equilibria using Gibbs ensemble Monte Carlo simulation
258     techniques.\cite{Siepmann1998} One of the advantages of TraPPE is that
259     it generalizes the types of atoms in an alkyl chain to keep the number
260     of pseudoatoms to a minimum; the parameters for an atom such as
261     $\text{CH}_2$ do not change depending on what species are bonded to
262     it.
263    
264     TraPPE also constrains all bonds to be of fixed length. Typically,
265     bond vibrations are the fastest motions in a molecular dynamic
266     simulation. Small time steps between force evaluations must be used to
267     ensure adequate sampling of the bond potential to ensure conservation
268     of energy. By constraining the bond lengths, larger time steps may be
269     used when integrating the equations of motion. A simulation using {\sc
270     duff} is illustrated in Scheme \ref{sch:DUFF}.
271    
272 mmeineke 1045 \begin{lstlisting}[float,caption={[Invocation of {\sc duff}]Sample \texttt{.bass} file showing a simulation utilizing {\sc duff}},label={sch:DUFF}]
273 mmeineke 1044
274     #include "water.mdl"
275     #include "lipid.mdl"
276    
277     nComponents = 2;
278     component{
279     type = "simpleLipid_16";
280     nMol = 60;
281     }
282    
283     component{
284     type = "SSD_water";
285     nMol = 1936;
286     }
287    
288     initialConfig = "bilayer.init";
289    
290     forceField = "DUFF";
291    
292     \end{lstlisting}
293    
294     \subsubsection{\label{subSec:energyFunctions}{\sc duff} Energy Functions}
295    
296     The total potential energy function in {\sc duff} is
297     \begin{equation}
298     V = \sum^{N}_{I=1} V^{I}_{\text{Internal}}
299     + \sum^{N}_{I=1} \sum_{J>I} V^{IJ}_{\text{Cross}}
300     \label{eq:totalPotential}
301     \end{equation}
302     Where $V^{I}_{\text{Internal}}$ is the internal potential of molecule $I$:
303     \begin{equation}
304     V^{I}_{\text{Internal}} =
305     \sum_{\theta_{ijk} \in I} V_{\text{bend}}(\theta_{ijk})
306     + \sum_{\phi_{ijkl} \in I} V_{\text{torsion}}(\phi_{ijkl})
307     + \sum_{i \in I} \sum_{(j>i+4) \in I}
308     \biggl[ V_{\text{LJ}}(r_{ij}) + V_{\text{dipole}}
309     (\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},\boldsymbol{\Omega}_{j})
310     \biggr]
311     \label{eq:internalPotential}
312     \end{equation}
313     Here $V_{\text{bend}}$ is the bend potential for all 1, 3 bonded pairs
314     within the molecule $I$, and $V_{\text{torsion}}$ is the torsion potential
315     for all 1, 4 bonded pairs. The pairwise portions of the internal
316     potential are excluded for pairs that are closer than three bonds,
317     i.e.~atom pairs farther away than a torsion are included in the
318     pair-wise loop.
319    
320    
321     The bend potential of a molecule is represented by the following function:
322     \begin{equation}
323     V_{\text{bend}}(\theta_{ijk}) = k_{\theta}( \theta_{ijk} - \theta_0 )^2 \label{eq:bendPot}
324     \end{equation}
325     Where $\theta_{ijk}$ is the angle defined by atoms $i$, $j$, and $k$
326     (see Fig.~\ref{fig:lipidModel}), $\theta_0$ is the equilibrium
327     bond angle, and $k_{\theta}$ is the force constant which determines the
328     strength of the harmonic bend. The parameters for $k_{\theta}$ and
329     $\theta_0$ are borrowed from those in TraPPE.\cite{Siepmann1998}
330    
331     The torsion potential and parameters are also borrowed from TraPPE. It is
332     of the form:
333     \begin{equation}
334     V_{\text{torsion}}(\phi) = c_1[1 + \cos \phi]
335     + c_2[1 + \cos(2\phi)]
336     + c_3[1 + \cos(3\phi)]
337     \label{eq:origTorsionPot}
338     \end{equation}
339     Here $\phi$ is the angle defined by four bonded neighbors $i$,
340     $j$, $k$, and $l$ (again, see Fig.~\ref{fig:lipidModel}). For
341     computational efficiency, the torsion potential has been recast after
342     the method of CHARMM,\cite{charmm1983} in which the angle series is
343     converted to a power series of the form:
344     \begin{equation}
345     V_{\text{torsion}}(\phi) =
346     k_3 \cos^3 \phi + k_2 \cos^2 \phi + k_1 \cos \phi + k_0
347     \label{eq:torsionPot}
348     \end{equation}
349     Where:
350     \begin{align*}
351     k_0 &= c_1 + c_3 \\
352     k_1 &= c_1 - 3c_3 \\
353     k_2 &= 2 c_2 \\
354     k_3 &= 4c_3
355     \end{align*}
356     By recasting the potential as a power series, repeated trigonometric
357     evaluations are avoided during the calculation of the potential energy.
358    
359    
360     The cross potential between molecules $I$ and $J$, $V^{IJ}_{\text{Cross}}$, is
361     as follows:
362     \begin{equation}
363     V^{IJ}_{\text{Cross}} =
364     \sum_{i \in I} \sum_{j \in J}
365     \biggl[ V_{\text{LJ}}(r_{ij}) + V_{\text{dipole}}
366     (\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},\boldsymbol{\Omega}_{j})
367     + V_{\text{sticky}}
368     (\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},\boldsymbol{\Omega}_{j})
369     \biggr]
370     \label{eq:crossPotentail}
371     \end{equation}
372     Where $V_{\text{LJ}}$ is the Lennard Jones potential,
373     $V_{\text{dipole}}$ is the dipole dipole potential, and
374     $V_{\text{sticky}}$ is the sticky potential defined by the SSD model
375     (Sec.~\ref{sec:SSD}). Note that not all atom types include all
376     interactions.
377    
378     The dipole-dipole potential has the following form:
379     \begin{equation}
380     V_{\text{dipole}}(\mathbf{r}_{ij},\boldsymbol{\Omega}_{i},
381     \boldsymbol{\Omega}_{j}) = \frac{|\mu_i||\mu_j|}{4\pi\epsilon_{0}r_{ij}^{3}} \biggl[
382     \boldsymbol{\hat{u}}_{i} \cdot \boldsymbol{\hat{u}}_{j}
383     -
384     \frac{3(\boldsymbol{\hat{u}}_i \cdot \mathbf{r}_{ij}) %
385     (\boldsymbol{\hat{u}}_j \cdot \mathbf{r}_{ij}) }
386     {r^{2}_{ij}} \biggr]
387     \label{eq:dipolePot}
388     \end{equation}
389     Here $\mathbf{r}_{ij}$ is the vector starting at atom $i$ pointing
390     towards $j$, and $\boldsymbol{\Omega}_i$ and $\boldsymbol{\Omega}_j$
391     are the orientational degrees of freedom for atoms $i$ and $j$
392     respectively. $|\mu_i|$ is the magnitude of the dipole moment of atom
393     $i$, $\boldsymbol{\hat{u}}_i$ is the standard unit orientation
394     vector of $\boldsymbol{\Omega}_i$, and $\boldsymbol{\hat{r}}_{ij}$ is
395     the unit vector pointing along $\mathbf{r}_{ij}$.
396    
397    
398     \subsubsection{\label{sec:SSD}The {\sc duff} Water Models: SSD/E and SSD/RF}
399    
400     In the interest of computational efficiency, the default solvent used
401     by {\sc oopse} is the extended Soft Sticky Dipole (SSD/E) water
402     model.\cite{Gezelter04} The original SSD was developed by Ichiye
403     \emph{et al.}\cite{liu96:new_model} as a modified form of the hard-sphere
404     water model proposed by Bratko, Blum, and
405     Luzar.\cite{Bratko85,Bratko95} It consists of a single point dipole
406     with a Lennard-Jones core and a sticky potential that directs the
407     particles to assume the proper hydrogen bond orientation in the first
408     solvation shell. Thus, the interaction between two SSD water molecules
409     \emph{i} and \emph{j} is given by the potential
410     \begin{equation}
411     V_{ij} =
412     V_{ij}^{LJ} (r_{ij})\ + V_{ij}^{dp}
413     (\mathbf{r}_{ij},\boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j)\ +
414     V_{ij}^{sp}
415     (\mathbf{r}_{ij},\boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j),
416     \label{eq:ssdPot}
417     \end{equation}
418     where the $\mathbf{r}_{ij}$ is the position vector between molecules
419     \emph{i} and \emph{j} with magnitude equal to the distance $r_{ij}$, and
420     $\boldsymbol{\Omega}_i$ and $\boldsymbol{\Omega}_j$ represent the
421     orientations of the respective molecules. The Lennard-Jones and dipole
422     parts of the potential are given by equations \ref{eq:lennardJonesPot}
423     and \ref{eq:dipolePot} respectively. The sticky part is described by
424     the following,
425     \begin{equation}
426     u_{ij}^{sp}(\mathbf{r}_{ij},\boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j)=
427     \frac{\nu_0}{2}[s(r_{ij})w(\mathbf{r}_{ij},
428     \boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j) +
429     s^\prime(r_{ij})w^\prime(\mathbf{r}_{ij},
430     \boldsymbol{\Omega}_i,\boldsymbol{\Omega}_j)]\ ,
431     \label{eq:stickyPot}
432     \end{equation}
433     where $\nu_0$ is a strength parameter for the sticky potential, and
434     $s$ and $s^\prime$ are cubic switching functions which turn off the
435     sticky interaction beyond the first solvation shell. The $w$ function
436     can be thought of as an attractive potential with tetrahedral
437     geometry:
438     \begin{equation}
439     w({\bf r}_{ij},{\bf \Omega}_i,{\bf \Omega}_j)=
440     \sin\theta_{ij}\sin2\theta_{ij}\cos2\phi_{ij},
441     \label{eq:stickyW}
442     \end{equation}
443     while the $w^\prime$ function counters the normal aligned and
444     anti-aligned structures favored by point dipoles:
445     \begin{equation}
446     w^\prime({\bf r}_{ij},{\bf \Omega}_i,{\bf \Omega}_j)=
447     (\cos\theta_{ij}-0.6)^2(\cos\theta_{ij}+0.8)^2-w^0,
448     \label{eq:stickyWprime}
449     \end{equation}
450     It should be noted that $w$ is proportional to the sum of the $Y_3^2$
451     and $Y_3^{-2}$ spherical harmonics (a linear combination which
452     enhances the tetrahedral geometry for hydrogen bonded structures),
453     while $w^\prime$ is a purely empirical function. A more detailed
454     description of the functional parts and variables in this potential
455     can be found in the original SSD
456     articles.\cite{liu96:new_model,liu96:monte_carlo,chandra99:ssd_md,Ichiye03}
457    
458     Since SSD is a single-point {\it dipolar} model, the force
459     calculations are simplified significantly relative to the standard
460     {\it charged} multi-point models. In the original Monte Carlo
461     simulations using this model, Ichiye {\it et al.} reported that using
462     SSD decreased computer time by a factor of 6-7 compared to other
463     models.\cite{liu96:new_model} What is most impressive is that these savings
464     did not come at the expense of accurate depiction of the liquid state
465     properties. Indeed, SSD maintains reasonable agreement with the Soper
466     diffraction data for the structural features of liquid
467     water.\cite{Soper86,liu96:new_model} Additionally, the dynamical properties
468     exhibited by SSD agree with experiment better than those of more
469     computationally expensive models (like TIP3P and
470     SPC/E).\cite{chandra99:ssd_md} The combination of speed and accurate depiction
471     of solvent properties makes SSD a very attractive model for the
472     simulation of large scale biochemical simulations.
473    
474     Recent constant pressure simulations revealed issues in the original
475     SSD model that led to lower than expected densities at all target
476     pressures.\cite{Ichiye03,Gezelter04} The default model in {\sc oopse}
477     is therefore SSD/E, a density corrected derivative of SSD that
478     exhibits improved liquid structure and transport behavior. If the use
479     of a reaction field long-range interaction correction is desired, it
480     is recommended that the parameters be modified to those of the SSD/RF
481     model. Solvent parameters can be easily modified in an accompanying
482     {\sc BASS} file as illustrated in the scheme below. A table of the
483     parameter values and the drawbacks and benefits of the different
484     density corrected SSD models can be found in reference
485     \ref{Gezelter04}.
486    
487 mmeineke 1045 \begin{lstlisting}[float,caption={[A simulation of {\sc ssd} water]An example file showing a simulation including {\sc ssd} water.},label={sch:ssd}]
488 mmeineke 1044
489     #include "water.mdl"
490    
491     nComponents = 1;
492     component{
493     type = "SSD_water";
494     nMol = 864;
495     }
496    
497     initialConfig = "liquidWater.init";
498    
499     forceField = "DUFF";
500    
501     /*
502     * The reactionField flag toggles reaction
503     * field corrections.
504     */
505    
506     reactionField = false; // defaults to false
507     dielectric = 80.0; // dielectric for reaction field
508    
509     /*
510     * The following two flags set the cutoff
511     * radius for the electrostatic forces
512     * as well as the skin thickness of the switching
513     * function.
514     */
515    
516     electrostaticCutoffRadius = 9.2;
517     electrostaticSkinThickness = 1.38;
518    
519     \end{lstlisting}
520    
521    
522     \subsection{\label{sec:eam}Embedded Atom Method}
523    
524     Several other molecular dynamics packages\cite{dynamo86} exist which have the
525     capacity to simulate metallic systems, including some that have
526     parallel computational abilities\cite{plimpton93}. Potentials that
527     describe bonding transition metal
528     systems\cite{Finnis84,Ercolessi88,Chen90,Qi99,Ercolessi02} have a
529     attractive interaction which models ``Embedding''
530     a positively charged metal ion in the electron density due to the
531     free valance ``sea'' of electrons created by the surrounding atoms in
532     the system. A mostly repulsive pairwise part of the potential
533     describes the interaction of the positively charged metal core ions
534     with one another. A particular potential description called the
535     Embedded Atom Method\cite{Daw84,FBD86,johnson89,Lu97}({\sc eam}) that has
536     particularly wide adoption has been selected for inclusion in {\sc oopse}. A
537     good review of {\sc eam} and other metallic potential formulations was done
538     by Voter.\cite{voter}
539    
540     The {\sc eam} potential has the form:
541     \begin{eqnarray}
542     V & = & \sum_{i} F_{i}\left[\rho_{i}\right] + \sum_{i} \sum_{j \neq i}
543     \phi_{ij}({\bf r}_{ij}) \\
544     \rho_{i} & = & \sum_{j \neq i} f_{j}({\bf r}_{ij})
545     \end{eqnarray}S
546    
547     where $F_{i} $ is the embedding function that equates the energy required to embed a
548     positively-charged core ion $i$ into a linear superposition of
549     spherically averaged atomic electron densities given by
550     $\rho_{i}$. $\phi_{ij}$ is a primarily repulsive pairwise interaction
551     between atoms $i$ and $j$. In the original formulation of
552     {\sc eam} cite{Daw84}, $\phi_{ij}$ was an entirely repulsive term, however
553     in later refinements to EAM have shown that non-uniqueness between $F$
554     and $\phi$ allow for more general forms for $\phi$.\cite{Daw89}
555     There is a cutoff distance, $r_{cut}$, which limits the
556     summations in the {\sc eam} equation to the few dozen atoms
557     surrounding atom $i$ for both the density $\rho$ and pairwise $\phi$
558     interactions. Foiles et al. fit EAM potentials for fcc metals Cu, Ag, Au, Ni, Pd, Pt and alloys of these metals\cite{FDB86}. These potential fits are in the DYNAMO 86 format and are included with {\sc oopse}.
559    
560    
561     \subsection{\label{Sec:pbc}Periodic Boundary Conditions}
562    
563     \newcommand{\roundme}{\operatorname{round}}
564    
565     \textit{Periodic boundary conditions} are widely used to simulate truly
566     macroscopic systems with a relatively small number of particles. The
567     simulation box is replicated throughout space to form an infinite lattice.
568     During the simulation, when a particle moves in the primary cell, its image in
569     other boxes move in exactly the same direction with exactly the same
570     orientation.Thus, as a particle leaves the primary cell, one of its images
571     will enter through the opposite face.If the simulation box is large enough to
572     avoid \textquotedblleft feeling\textquotedblright\ the symmetries of the
573     periodic lattice, surface effects can be ignored. Cubic, orthorhombic and
574     parallelepiped are the available periodic cells In OOPSE. We use a matrix to
575     describe the property of the simulation box. Therefore, both the size and
576     shape of the simulation box can be changed during the simulation. The
577     transformation from box space vector $\mathbf{s}$ to its corresponding real
578     space vector $\mathbf{r}$ is defined by
579     \begin{equation}
580     \mathbf{r}=\underline{\mathbf{H}}\cdot\mathbf{s}%
581     \end{equation}
582    
583    
584     where $H=(h_{x},h_{y},h_{z})$ is a transformation matrix made up of the three
585     box axis vectors. $h_{x},h_{y}$ and $h_{z}$ represent the three sides of the
586     simulation box respectively.
587    
588     To find the minimum image of a vector $\mathbf{r}$, we convert the real vector
589     to its corresponding vector in box space first, \bigskip%
590     \begin{equation}
591     \mathbf{s}=\underline{\mathbf{H}}^{-1}\cdot\mathbf{r}%
592     \end{equation}
593     And then, each element of $\mathbf{s}$ is wrapped to lie between -0.5 to 0.5,
594     \begin{equation}
595     s_{i}^{\prime}=s_{i}-\roundme(s_{i})
596     \end{equation}
597     where
598    
599     %
600    
601     \begin{equation}
602     \roundme(x)=\left\{
603     \begin{array}{cc}%
604 mmeineke 1045 \lfloor{x+0.5}\rfloor & \text{if \ }x\geqslant 0 \\
605 mmeineke 1044 \lceil{x-0.5}\rceil & \text{otherwise}%
606     \end{array}
607     \right.
608     \end{equation}
609    
610    
611     For example, $\roundme(3.6)=4$,$\roundme(3.1)=3$, $\roundme(-3.6)=-4$, $\roundme(-3.1)=-3$.
612    
613     Finally, we obtain the minimum image coordinates $\mathbf{r}^{\prime}$ by
614     transforming back to real space,%
615    
616     \begin{equation}
617     \mathbf{r}^{\prime}=\underline{\mathbf{H}}^{-1}\cdot\mathbf{s}^{\prime}%
618     \end{equation}
619    
620    
621     \section{Input and Output Files}
622    
623     \subsection{{\sc bass} and Model Files}
624    
625     Every {\sc oopse} simuation begins with a {\sc bass} file. {\sc bass}
626     (\underline{B}izarre \underline{A}tom \underline{S}imulation
627     \underline{S}yntax) is a script syntax that is parsed by {\sc oopse} at
628     runtime. The {\sc bass} file allows for the user to completely describe the
629     system they are to simulate, as well as tailor {\sc oopse}'s behavior during
630     the simulation. {\sc bass} files are denoted with the extension
631     \texttt{.bass}, an example file is shown in
632     Fig.~\ref{fig:bassExample}.
633    
634     \begin{figure}
635     \centering
636     \framebox[\linewidth]{\rule{0cm}{0.75\linewidth}I'm a {\sc bass} file!}
637     \caption{Here is an example \texttt{.bass} file}
638     \label{fig:bassExample}
639     \end{figure}
640    
641     Within the \texttt{.bass} file it is neccassary to provide a complete
642     description of the molecule before it is actually placed in the
643     simulation. The {\sc bass} syntax was originally developed with this goal in
644     mind, and allows for the specification of all the atoms in a molecular
645     prototype, as well as any bonds, bends, or torsions. These
646     descriptions can become lengthy for complex molecules, and it would be
647     inconvient to duplicate the simulation at the begining of each {\sc bass}
648     script. Addressing this issue {\sc bass} allows for the inclusion of model
649     files at the top of a \texttt{.bass} file. These model files, denoted
650     with the \texttt{.mdl} extension, allow the user to describe a
651     molecular prototype once, then simply include it into each simulation
652     containing that molecule.
653    
654     \subsection{\label{subSec:coordFiles}Coordinate Files}
655    
656     The standard format for storage of a systems coordinates is a modified
657     xyz-file syntax, the exact details of which can be seen in
658     App.~\ref{appCoordFormat}. As all bonding and molecular information is
659     stored in the \texttt{.bass} and \texttt{.mdl} files, the coordinate
660     files are simply the complete set of coordinates for each atom at a
661     given simulation time.
662    
663     There are three major files used by {\sc oopse} written in the coordinate
664     format, they are as follows: the initialization file, the simulation
665     trajectory file, and the final coordinates of the simulation. The
666     initialization file is neccassary for {\sc oopse} to start the simulation
667     with the proper coordinates. It is typically denoted with the
668     extension \texttt{.init}. The trajectory file is created at the
669     beginning of the simulation, and is used to store snapshots of the
670     simulation at regular intervals. The first frame is a duplication of
671     the \texttt{.init} file, and each subsequent frame is appended to the
672     file at an interval specified in the \texttt{.bass} file. The
673     trajectory file is given the extension \texttt{.dump}. The final
674     coordinate file is the end of run or \texttt{.eor} file. The
675     \texttt{.eor} file stores the final configuration of teh system for a
676     given simulation. The file is updated at the same time as the
677     \texttt{.dump} file. However, it only contains the most recent
678     frame. In this way, an \texttt{.eor} file may be used as the
679     initialization file to a second simulation in order to continue or
680     recover the previous simulation.
681    
682     \subsection{Generation of Initial Coordinates}
683    
684     As was stated in Sec.~\ref{subSec:coordFiles}, an initialization file
685     is needed to provide the starting coordinates for a simulation. The
686     {\sc oopse} package provides a program called \texttt{sysBuilder} to aid in
687     the creation of the \texttt{.init} file. \texttt{sysBuilder} is {\sc bass}
688     aware, and will recognize arguments and parameters in the
689     \texttt{.bass} file that would otherwise be ignored by the
690     simulation. The program itself is under contiunual development, and is
691     offered here as a helper tool only.
692    
693     \subsection{The Statistics File}
694    
695     The last output file generated by {\sc oopse} is the statistics file. This
696     file records such statistical quantities as the instantaneous
697     temperature, volume, pressure, etc. It is written out with the
698     frequency specified in the \texttt{.bass} file. The file allows the
699     user to observe the system variables as a function od simulation time
700     while the simulation is in progress. One useful function the
701     statistics file serves is to monitor the conserved quantity of a given
702     simulation ensemble, this allows the user to observe the stability of
703     the integrator. The statistics file is denoted with the \texttt{.stat}
704     file extension.
705    
706     \section{\label{sec:mechanics}Mechanics}
707    
708     \subsection{\label{integrate}Integrating the Equations of Motion: the Symplectic Step Integrator}
709    
710     Integration of the equations of motion was carried out using the
711     symplectic splitting method proposed by Dullweber \emph{et
712     al.}.\cite{Dullweber1997} The reason for this integrator selection
713     deals with poor energy conservation of rigid body systems using
714     quaternions. While quaternions work well for orientational motion in
715     alternate ensembles, the microcanonical ensemble has a constant energy
716     requirement that is quite sensitive to errors in the equations of
717     motion. The original implementation of this code utilized quaternions
718     for rotational motion propagation; however, a detailed investigation
719     showed that they resulted in a steady drift in the total energy,
720     something that has been observed by others.\cite{Laird97}
721    
722     The key difference in the integration method proposed by Dullweber
723     \emph{et al.} is that the entire rotation matrix is propagated from
724     one time step to the next. In the past, this would not have been as
725     feasible a option, being that the rotation matrix for a single body is
726     nine elements long as opposed to 3 or 4 elements for Euler angles and
727     quaternions respectively. System memory has become much less of an
728     issue in recent times, and this has resulted in substantial benefits
729     in energy conservation. There is still the issue of 5 or 6 additional
730     elements for describing the orientation of each particle, which will
731     increase dump files substantially. Simply translating the rotation
732     matrix into its component Euler angles or quaternions for storage
733     purposes relieves this burden.
734    
735     The symplectic splitting method allows for Verlet style integration of
736     both linear and angular motion of rigid bodies. In the integration
737     method, the orientational propagation involves a sequence of matrix
738     evaluations to update the rotation matrix.\cite{Dullweber1997} These
739     matrix rotations end up being more costly computationally than the
740     simpler arithmetic quaternion propagation. With the same time step, a
741     1000 SSD particle simulation shows an average 7\% increase in
742     computation time using the symplectic step method in place of
743     quaternions. This cost is more than justified when comparing the
744     energy conservation of the two methods as illustrated in figure
745     \ref{timestep}.
746    
747     \begin{figure}
748 mmeineke 1045 \centering
749     \includegraphics[width=\linewidth]{timeStep.eps}
750 mmeineke 1044 \caption{Energy conservation using quaternion based integration versus
751     the symplectic step method proposed by Dullweber \emph{et al.} with
752     increasing time step. For each time step, the dotted line is total
753     energy using the symplectic step integrator, and the solid line comes
754     from the quaternion integrator. The larger time step plots are shifted
755     up from the true energy baseline for clarity.}
756     \label{timestep}
757     \end{figure}
758    
759     In figure \ref{timestep}, the resulting energy drift at various time
760     steps for both the symplectic step and quaternion integration schemes
761     is compared. All of the 1000 SSD particle simulations started with the
762     same configuration, and the only difference was the method for
763     handling rotational motion. At time steps of 0.1 and 0.5 fs, both
764     methods for propagating particle rotation conserve energy fairly well,
765     with the quaternion method showing a slight energy drift over time in
766     the 0.5 fs time step simulation. At time steps of 1 and 2 fs, the
767     energy conservation benefits of the symplectic step method are clearly
768     demonstrated. Thus, while maintaining the same degree of energy
769     conservation, one can take considerably longer time steps, leading to
770     an overall reduction in computation time.
771    
772     Energy drift in these SSD particle simulations was unnoticeable for
773     time steps up to three femtoseconds. A slight energy drift on the
774     order of 0.012 kcal/mol per nanosecond was observed at a time step of
775     four femtoseconds, and as expected, this drift increases dramatically
776     with increasing time step. To insure accuracy in the constant energy
777     simulations, time steps were set at 2 fs and kept at this value for
778     constant pressure simulations as well.
779    
780    
781     \subsection{\label{sec:extended}Extended Systems for other Ensembles}
782    
783    
784     {\sc oopse} implements a
785    
786    
787     \subsubsection{\label{sec:noseHooverThermo}Nose-Hoover Thermostatting}
788    
789     To mimic the effects of being in a constant temperature ({\sc nvt})
790     ensemble, {\sc oopse} uses the Nose-Hoover extended system
791     approach.\cite{Hoover85} In this method, the equations of motion for
792     the particle positions and velocities are
793     \begin{eqnarray}
794     \dot{{\bf r}} & = & {\bf v} \\
795     \dot{{\bf v}} & = & \frac{{\bf f}}{m} - \chi {\bf v}
796     \label{eq:nosehoovereom}
797     \end{eqnarray}
798    
799     $\chi$ is an ``extra'' variable included in the extended system, and
800     it is propagated using the first order equation of motion
801     \begin{equation}
802     \dot{\chi} = \frac{1}{\tau_{T}} \left( \frac{T}{T_{target}} - 1 \right)
803     \label{eq:nosehooverext}
804     \end{equation}
805     where $T_{target}$ is the target temperature for the simulation, and
806     $\tau_{T}$ is a time constant for the thermostat.
807    
808     To select the Nose-Hoover {\sc nvt} ensemble, the {\tt ensemble = NVT;}
809     command would be used in the simulation's {\sc bass} file. There is
810     some subtlety in choosing values for $\tau_{T}$, and it is usually set
811     to values of a few ps. Within a {\sc bass} file, $\tau_{T}$ could be
812     set to 1 ps using the {\tt tauThermostat = 1000; } command.
813    
814    
815     \subsection{\label{Sec:zcons}Z-Constraint Method}
816    
817     Based on fluctuatin-dissipation theorem,\bigskip\ force auto-correlation
818     method was developed to investigate the dynamics of ions inside the ion
819     channels.\cite{Roux91} Time-dependent friction coefficient can be calculated
820     from the deviation of the instaneous force from its mean force.
821    
822     %
823    
824     \begin{equation}
825     \xi(z,t)=\langle\delta F(z,t)\delta F(z,0)\rangle/k_{B}T
826     \end{equation}
827    
828    
829     where%
830     \begin{equation}
831     \delta F(z,t)=F(z,t)-\langle F(z,t)\rangle
832     \end{equation}
833    
834    
835     If the time-dependent friction decay rapidly, static friction coefficient can
836     be approximated by%
837    
838     \begin{equation}
839     \xi^{static}(z)=\int_{0}^{\infty}\langle\delta F(z,t)\delta F(z,0)\rangle dt
840     \end{equation}
841    
842    
843     Hence, diffusion constant can be estimated by
844     \begin{equation}
845     D(z)=\frac{k_{B}T}{\xi^{static}(z)}=\frac{(k_{B}T)^{2}}{\int_{0}^{\infty
846     }\langle\delta F(z,t)\delta F(z,0)\rangle dt}%
847     \end{equation}
848    
849    
850     \bigskip Z-Constraint method, which fixed the z coordinates of the molecules
851     with respect to the center of the mass of the system, was proposed to obtain
852     the forces required in force auto-correlation method.\cite{Marrink94} However,
853     simply resetting the coordinate will move the center of the mass of the whole
854     system. To avoid this problem, a new method was used at {\sc oopse}. Instead of
855     resetting the coordinate, we reset the forces of z-constraint molecules as
856     well as subtract the total constraint forces from the rest of the system after
857     force calculation at each time step.
858     \begin{verbatim}
859     $F_{\alpha i}=0$
860     $V_{\alpha i}=V_{\alpha i}-\frac{\sum\limits_{i}M_{_{\alpha i}}V_{\alpha i}}{\sum\limits_{i}M_{_{\alpha i}}}$
861     $F_{\alpha i}=F_{\alpha i}-\frac{M_{_{\alpha i}}}{\sum\limits_{\alpha}\sum\limits_{i}M_{_{\alpha i}}}\sum\limits_{\beta}F_{\beta}$
862     $V_{\alpha i}=V_{\alpha i}-\frac{\sum\limits_{\alpha}\sum\limits_{i}M_{_{\alpha i}}V_{\alpha i}}{\sum\limits_{\alpha}\sum\limits_{i}M_{_{\alpha i}}}$
863     \end{verbatim}
864    
865     At the very beginning of the simulation, the molecules may not be at its
866     constraint position. To move the z-constraint molecule to the specified
867     position, a simple harmonic potential is used%
868    
869     \begin{equation}
870     U(t)=\frac{1}{2}k_{Harmonic}(z(t)-z_{cons})^{2}%
871     \end{equation}
872     where $k_{Harmonic}$\bigskip\ is the harmonic force constant, $z(t)$ is
873     current z coordinate of the center of mass of the z-constraint molecule, and
874     $z_{cons}$ is the restraint position. Therefore, the harmonic force operated
875     on the z-constraint molecule at time $t$ can be calculated by%
876     \begin{equation}
877     F_{z_{Harmonic}}(t)=-\frac{\partial U(t)}{\partial z(t)}=-k_{Harmonic}%
878     (z(t)-z_{cons})
879     \end{equation}
880     Worthy of mention, other kinds of potential functions can also be used to
881     drive the z-constraint molecule.
882    
883     \section{\label{sec:analysis}Trajectory Analysis}
884    
885     \subsection{\label{subSec:staticProps}Static Property Analysis}
886    
887     The static properties of the trajectories are analyzed with the
888     program \texttt{staticProps}. The code is capable of calculating the following
889     pair correlations between species A and B:
890     \begin{itemize}
891     \item $g_{\text{AB}}(r)$: Eq.~\ref{eq:gofr}
892     \item $g_{\text{AB}}(r, \cos \theta)$: Eq.~\ref{eq:gofrCosTheta}
893     \item $g_{\text{AB}}(r, \cos \omega)$: Eq.~\ref{eq:gofrCosOmega}
894     \item $g_{\text{AB}}(x, y, z)$: Eq.~\ref{eq:gofrXYZ}
895     \item $\langle \cos \omega \rangle_{\text{AB}}(r)$:
896     Eq.~\ref{eq:cosOmegaOfR}
897     \end{itemize}
898    
899     The first pair correlation, $g_{\text{AB}}(r)$, is defined as follows:
900     \begin{equation}
901     g_{\text{AB}}(r) = \frac{V}{N_{\text{A}}N_{\text{B}}}\langle %%
902     \sum_{i \in \text{A}} \sum_{j \in \text{B}} %%
903     \delta( r - |\mathbf{r}_{ij}|) \rangle \label{eq:gofr}
904     \end{equation}
905     Where $\mathbf{r}_{ij}$ is the vector
906     \begin{equation*}
907     \mathbf{r}_{ij} = \mathbf{r}_j - \mathbf{r}_i \notag
908     \end{equation*}
909     and $\frac{V}{N_{\text{A}}N_{\text{B}}}$ normalizes the average over
910     the expected pair density at a given $r$.
911    
912     The next two pair correlations, $g_{\text{AB}}(r, \cos \theta)$ and
913     $g_{\text{AB}}(r, \cos \omega)$, are similar in that they are both two
914     dimensional histograms. Both use $r$ for the primary axis then a
915     $\cos$ for the secondary axis ($\cos \theta$ for
916     Eq.~\ref{eq:gofrCosTheta} and $\cos \omega$ for
917     Eq.~\ref{eq:gofrCosOmega}). This allows for the investigator to
918     correlate alignment on directional entities. $g_{\text{AB}}(r, \cos
919     \theta)$ is defined as follows:
920     \begin{equation}
921     g_{\text{AB}}(r, \cos \theta) = \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
922     \sum_{i \in \text{A}} \sum_{j \in \text{B}}
923     \delta( \cos \theta - \cos \theta_{ij})
924     \delta( r - |\mathbf{r}_{ij}|) \rangle
925     \label{eq:gofrCosTheta}
926     \end{equation}
927     Where
928     \begin{equation*}
929     \cos \theta_{ij} = \mathbf{\hat{i}} \cdot \mathbf{\hat{r}}_{ij}
930     \end{equation*}
931     Here $\mathbf{\hat{i}}$ is the unit directional vector of species $i$
932     and $\mathbf{\hat{r}}_{ij}$ is the unit vector associated with vector
933     $\mathbf{r}_{ij}$.
934    
935     The second two dimensional histogram is of the form:
936     \begin{equation}
937     g_{\text{AB}}(r, \cos \omega) =
938     \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
939     \sum_{i \in \text{A}} \sum_{j \in \text{B}}
940     \delta( \cos \omega - \cos \omega_{ij})
941     \delta( r - |\mathbf{r}_{ij}|) \rangle \label{eq:gofrCosOmega}
942     \end{equation}
943     Here
944     \begin{equation*}
945     \cos \omega_{ij} = \mathbf{\hat{i}} \cdot \mathbf{\hat{j}}
946     \end{equation*}
947     Again, $\mathbf{\hat{i}}$ and $\mathbf{\hat{j}}$ are the unit
948     directional vectors of species $i$ and $j$.
949    
950     The static analysis code is also cable of calculating a three
951     dimensional pair correlation of the form:
952     \begin{equation}\label{eq:gofrXYZ}
953     g_{\text{AB}}(x, y, z) =
954     \frac{V}{N_{\text{A}}N_{\text{B}}}\langle
955     \sum_{i \in \text{A}} \sum_{j \in \text{B}}
956     \delta( x - x_{ij})
957     \delta( y - y_{ij})
958     \delta( z - z_{ij}) \rangle
959     \end{equation}
960     Where $x_{ij}$, $y_{ij}$, and $z_{ij}$ are the $x$, $y$, and $z$
961     components respectively of vector $\mathbf{r}_{ij}$.
962    
963     The final pair correlation is similar to
964     Eq.~\ref{eq:gofrCosOmega}. $\langle \cos \omega
965     \rangle_{\text{AB}}(r)$ is calculated in the following way:
966     \begin{equation}\label{eq:cosOmegaOfR}
967     \langle \cos \omega \rangle_{\text{AB}}(r) =
968     \langle \sum_{i \in \text{A}} \sum_{j \in \text{B}}
969     (\cos \omega_{ij}) \delta( r - |\mathbf{r}_{ij}|) \rangle
970     \end{equation}
971     Here $\cos \omega_{ij}$ is defined in the same way as in
972     Eq.~\ref{eq:gofrCosOmega}. This equation is a single dimensional pair
973     correlation that gives the average correlation of two directional
974     entities as a function of their distance from each other.
975    
976     All static properties are calculated on a frame by frame basis. The
977     trajectory is read a single frame at a time, and the appropriate
978     calculations are done on each frame. Once one frame is finished, the
979     next frame is read in, and a running average of the property being
980     calculated is accumulated in each frame. The program allows for the
981     user to specify more than one property be calculated in single run,
982     preventing the need to read a file multiple times.
983    
984     \subsection{\label{dynamicProps}Dynamic Property Analysis}
985    
986     The dynamic properties of a trajectory are calculated with the program
987     \texttt{dynamicProps}. The program will calculate the following properties:
988     \begin{gather}
989     \langle | \mathbf{r}(t) - \mathbf{r}(0) |^2 \rangle \label{eq:rms}\\
990     \langle \mathbf{v}(t) \cdot \mathbf{v}(0) \rangle \label{eq:velCorr} \\
991     \langle \mathbf{j}(t) \cdot \mathbf{j}(0) \rangle \label{eq:angularVelCorr}
992     \end{gather}
993    
994     Eq.~\ref{eq:rms} is the root mean square displacement
995     function. Eq.~\ref{eq:velCorr} and Eq.~\ref{eq:angularVelCorr} are the
996     velocity and angular velocity correlation functions respectively. The
997     latter is only applicable to directional species in the simulation.
998    
999     The \texttt{dynamicProps} program handles he file in a manner different from
1000     \texttt{staticProps}. As the properties calculated by this program are time
1001     dependent, multiple frames must be read in simultaneously by the
1002     program. For small trajectories this is no problem, and the entire
1003     trajectory is read into memory. However, for long trajectories of
1004     large systems, the files can be quite large. In order to accommodate
1005     large files, \texttt{dynamicProps} adopts a scheme whereby two blocks of memory
1006     are allocated to read in several frames each.
1007    
1008     In this two block scheme, the correlation functions are first
1009     calculated within each memory block, then the cross correlations
1010     between the frames contained within the two blocks are
1011     calculated. Once completed, the memory blocks are incremented, and the
1012     process is repeated. A diagram illustrating the process is shown in
1013     Fig.~\ref{fig:dynamicPropsMemory}. As was the case with \texttt{staticProps},
1014     multiple properties may be calculated in a single run to avoid
1015     multiple reads on the same file.
1016    
1017     \begin{figure}
1018 mmeineke 1045 \centering
1019     \includegraphics[width=\linewidth]{dynamicPropsMem.eps}
1020 mmeineke 1044 \caption{This diagram illustrates the dynamic memory allocation 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.}
1021     \label{fig:dynamicPropsMemory}
1022     \end{figure}
1023    
1024     \section{\label{sec:ProgramDesign}Program Design}
1025    
1026     \subsection{\label{sec:architecture} OOPSE Architecture}
1027    
1028     The core of OOPSE is divided into two main object libraries: {\texttt
1029     libBASS} and {\texttt libmdtools}. {\texttt libBASS} is the library
1030     developed around the parseing engine and {\texttt libmdtools} is the
1031     software library developed around the simulation engine.
1032    
1033    
1034    
1035     \subsection{\label{sec:programLang} Programming Languages }
1036    
1037     \subsection{\label{sec:parallelization} Parallelization of OOPSE}
1038    
1039     Although processor power is doubling roughly every 18 months according
1040     to the famous Moore's Law\cite{moore}, it is still unreasonable to
1041     simulate systems of more then a 1000 atoms on a single processor. To
1042     facilitate study of larger system sizes or smaller systems on long
1043     time scales in a reasonable period of time, parallel methods were
1044     developed allowing multiple CPU's to share the simulation
1045     workload. Three general categories of parallel decomposition method's
1046     have been developed including atomic, spatial and force decomposition
1047     methods.
1048    
1049     Algorithmically simplest of the three method's is atomic decomposition
1050     where N particles in a simulation are split among P processors for the
1051     duration of the simulation. Computational cost scales as an optimal
1052     $O(N/P)$ for atomic decomposition. Unfortunately all processors must
1053     communicate positions and forces with all other processors leading
1054     communication to scale as an unfavorable $O(N)$ independent of the
1055     number of processors. This communication bottleneck led to the
1056     development of spatial and force decomposition methods in which
1057     communication among processors scales much more favorably. Spatial or
1058     domain decomposition divides the physical spatial domain into 3D boxes
1059     in which each processor is responsible for calculation of forces and
1060     positions of particles located in its box. Particles are reassigned to
1061     different processors as they move through simulation space. To
1062     calculate forces on a given particle, a processor must know the
1063     positions of particles within some cutoff radius located on nearby
1064     processors instead of the positions of particles on all
1065     processors. Both communication between processors and computation
1066     scale as $O(N/P)$ in the spatial method. However, spatial
1067     decomposition adds algorithmic complexity to the simulation code and
1068     is not very efficient for small N since the overall communication
1069     scales as the surface to volume ratio $(N/P)^{2/3}$ in three
1070     dimensions.
1071    
1072     Force decomposition assigns particles to processors based on a block
1073     decomposition of the force matrix. Processors are split into a
1074     optimally square grid forming row and column processor groups. Forces
1075     are calculated on particles in a given row by particles located in
1076     that processors column assignment. Force decomposition is less complex
1077     to implement then the spatial method but still scales computationally
1078     as $O(N/P)$ and scales as $(N/\sqrt{p})$ in communication
1079     cost. Plimpton also found that force decompositions scales more
1080     favorably then spatial decomposition up to 10,000 atoms and favorably
1081     competes with spatial methods for up to 100,000 atoms.
1082    
1083     \subsection{\label{sec:memory}Memory Allocation in Analysis}
1084    
1085     \subsection{\label{sec:documentation}Documentation}
1086    
1087     \subsection{\label{openSource}Open Source and Distribution License}
1088    
1089    
1090     \section{\label{sec:conclusion}Conclusion}
1091    
1092     \begin{itemize}
1093    
1094     \item Restate capabilities
1095    
1096     \item recap major structure / design choices
1097    
1098     \begin{itemize}
1099    
1100     \item parallel
1101     \item symplectic integration
1102     \item languages
1103    
1104     \end{itemize}
1105    
1106     \item How well does it meet the primary goal
1107    
1108     \end{itemize}