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