1 |
\chapter{\label{chap:intro}INTRODUCTION AND BACKGROUND} |
2 |
|
3 |
In order to advance our understanding of natural chemical and physical |
4 |
processes, researchers develop explanations for events observed |
5 |
experimentally. These hypotheses, supported by a body of corroborating |
6 |
observations, can develop into accepted theories for how these |
7 |
processes occur. This validation process, as well as testing the |
8 |
limits of these theories, is essential in developing a firm foundation |
9 |
for our knowledge. Theories involving molecular scale systems cause |
10 |
particular difficulties in this process because their size and often |
11 |
fast motions make them difficult to observe experimentally. One useful |
12 |
tool for addressing these difficulties is computer simulation. |
13 |
|
14 |
In computer simulations, we can develop models from either the theory |
15 |
or experimental knowledge and then test them in a controlled |
16 |
environment. Work done in this manner allows us to further refine |
17 |
theories, more accurately represent what is happening in experimental |
18 |
observations, and even make predictions about what one will see in |
19 |
experiments. Thus, computer simulations of molecular systems act as a |
20 |
bridge between theory and experiment. |
21 |
|
22 |
Depending on the system of interest, there are a variety of different |
23 |
computational techniques that can used to test and gather information |
24 |
from the developed models. In the study of classical systems, the two |
25 |
most commonly used techniques are Monte Carlo and molecular |
26 |
dynamics. Both of these methods operate by calculating interactions |
27 |
between particles of our model systems; however, the progression of |
28 |
the simulation under the different techniques is vastly |
29 |
different. Monte Carlo operates through random configuration changes |
30 |
that that follow rules adhering to a specific statistical mechanics |
31 |
ensemble, while molecular dynamics is chiefly concerned with solving |
32 |
the classic equations of motion to move between configurations within |
33 |
an ensemble. Thermodynamic properties can be calculated from both |
34 |
techniques; but because of the random nature of Monte Carlo, only |
35 |
molecular dynamics can be used to investigate dynamical |
36 |
quantities. The research presented in the following chapters utilized |
37 |
molecular dynamics near exclusively, so we will present a general |
38 |
introduction to molecular dynamics and not Monte Carlo. There are |
39 |
several resources available for those desiring a more in-depth |
40 |
presentation of either of these |
41 |
techniques.\cite{Allen87,Frenkel02,Leach01} |
42 |
|
43 |
\section{\label{sec:MolecularDynamics}Molecular Dynamics} |
44 |
|
45 |
As stated above, in molecular dynamics we focus on evolving |
46 |
configurations of molecules over time. In order to use this as a tool |
47 |
for understanding experiments and testing theories, we want the |
48 |
configuration to evolve in a manner that mimics real molecular |
49 |
systems. To do this, we start with clarifying what we know about a |
50 |
given configuration of particles at time $t_1$, basically that each |
51 |
particle in the configuration has a position ($q$) and velocity |
52 |
($\dot{q}$). We now want to know what the configuration will be at |
53 |
time $t_2$. To find out, we need the classical equations of |
54 |
motion, and one useful formulation of them is the Lagrangian form. |
55 |
|
56 |
The Lagrangian ($L$) is a function of the positions and velocites that |
57 |
takes the form, |
58 |
\begin{equation} |
59 |
L = K - V, |
60 |
\label{eq:lagrangian} |
61 |
\end{equation} |
62 |
where $K$ is the kinetic energy and $V$ is the potential energy. We |
63 |
can use Hamilton's principle, which states that the integral of the |
64 |
Lagrangian over time has a stationary value for the correct path of |
65 |
motion, to say that the variation of the integral of the Lagrangian |
66 |
over time is zero,\cite{Tolman38} |
67 |
\begin{equation} |
68 |
\delta\int_{t_1}^{t_2}L(q,\dot{q})dt = 0. |
69 |
\end{equation} |
70 |
This can be written as a summation of integrals to give |
71 |
\begin{equation} |
72 |
\int_{t_1}^{t_2}\sum_{i=1}^{3N}\left(\frac{\partial L}{\partial q_i}\delta q_i |
73 |
+ \frac{\partial L}{\partial \dot{q}_i}\delta \dot{q}_i\right)dt = 0. |
74 |
\end{equation} |
75 |
Using fact that $\dot q$ is the derivative with respect to time of $q$ |
76 |
and integrating the second partial derivative in the parenthesis by |
77 |
parts, this equation simplifies to |
78 |
\begin{equation} |
79 |
\int_{t_1}^{t_2}\sum_{i=1}^{3N}\left( |
80 |
\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_i} |
81 |
- \frac{\partial L}{\partial q_i}\right)\delta {q}_i dt = 0, |
82 |
\end{equation} |
83 |
and the above equation is only valid for |
84 |
\begin{equation} |
85 |
\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_i} |
86 |
- \frac{\partial L}{\partial q_i} = 0\quad\quad(i=1,2,\dots,3N). |
87 |
\label{eq:formulation} |
88 |
\end{equation} |
89 |
To obtain the classical equations of motion for the particles, we can |
90 |
substitute equation (\ref{eq:lagrangian}) into the above equation with |
91 |
$m\dot{\mathbf{r}}^2/2$ for the kinetic energy, giving |
92 |
\begin{equation} |
93 |
\frac{d}{dt}(m\dot{\mathbf{r}})+\frac{dV}{d\mathbf{r}}=0, |
94 |
\end{equation} |
95 |
or more recognizably, |
96 |
\begin{equation} |
97 |
\mathbf{f} = m\mathbf{a}, |
98 |
\end{equation} |
99 |
where $\mathbf{f} = -dV/d\mathbf{r}$ and $\mathbf{a} = |
100 |
d^2\mathbf{r}/dt^2$. This Lagrangian formulation shown in equation |
101 |
(\ref{eq:formulation}) is generalized, and it can be used to determine |
102 |
equations of motion in forms outside of the typical Cartesian case |
103 |
shown here. |
104 |
|
105 |
\subsection{\label{sec:Verlet}Verlet Integration} |
106 |
|
107 |
In order to perform molecular dynamics, we need an algorithm that |
108 |
integrates the equations of motion described above. Ideal algorithms |
109 |
are both simple in implementation and highly accurate. There have been |
110 |
a large number of algorithms developed for this purpose; however, for |
111 |
reasons discussed below, we are going to focus on the Verlet class of |
112 |
integrators.\cite{Gear66,Beeman76,Berendsen86,Allen87,Verlet67,Swope82} |
113 |
|
114 |
In Verlet's original study of computer ``experiments'', he directly |
115 |
integrated the Newtonian second order differential equation of motion, |
116 |
\begin{equation} |
117 |
m\frac{d^2\mathbf{r}_i}{dt^2} = \sum_{j\ne i}\mathbf{f}(r_{ij}), |
118 |
\end{equation} |
119 |
with the following simple algorithm: |
120 |
\begin{equation} |
121 |
\mathbf{r}_i(t+\delta t) = -\mathbf{r}_i(t-\delta t) + 2\mathbf{r}_i(t) |
122 |
+ \sum_{j\ne i}\mathbf{f}(r_{ij}(t))\delta t^2, |
123 |
\label{eq:verlet} |
124 |
\end{equation} |
125 |
where $\delta t$ is the time step of integration.\cite{Verlet67} It is |
126 |
interesting to note that equation (\ref{eq:verlet}) does not include |
127 |
velocities, and this makes sense since they are not present in the |
128 |
differential equation. The velocities are necessary for the |
129 |
calculation of the kinetic energy, and they can be calculated at each |
130 |
time step with the following equation: |
131 |
\begin{equation} |
132 |
\mathbf{v}_i(t) = \frac{\mathbf{r}_i(t+\delta t)-\mathbf{r}_i(t-\delta t)} |
133 |
{2\delta t}. |
134 |
\end{equation} |
135 |
|
136 |
Like the equation of motion it solves, the Verlet algorithm has the |
137 |
beneficial property of being time-reversible, meaning that you can |
138 |
integrate the configuration forward and then backward and end up at |
139 |
the original configuration. Some other methods for integration, like |
140 |
predictor-corrector methods, lack this property in that they require |
141 |
higher order information that is discarded after integrating |
142 |
steps. Another interesting property of this algorithm is that it is |
143 |
symplectic, meaning that it preserves area in phase-space. Symplectic |
144 |
algorithms system stays in the region of phase-space dictated by the |
145 |
ensemble and enjoy greater long-time energy |
146 |
conservations.\cite{Frenkel02} |
147 |
|
148 |
While the error in the positions calculated using the Verlet algorithm |
149 |
is small ($\mathcal{O}(\delta t^4)$), the error in the velocities is |
150 |
quite a bit larger ($\mathcal{O}(\delta t^2)$).\cite{Allen87} Swope |
151 |
{\it et al.} developed a corrected for of this algorithm, the |
152 |
`velocity Verlet' algorithm, which improves the error of the velocity |
153 |
calculation and thus the energy conservation.\cite{Swope82} This |
154 |
algorithm involves a full step of the positions, |
155 |
\begin{equation} |
156 |
\mathbf{r}(t+\delta t) = \mathbf{r}(t) + \delta t\mathbf{v}(t) |
157 |
+ \frac{1}{2}\delta t^2\mathbf{a}(t), |
158 |
\end{equation} |
159 |
and a half step of the velocities, |
160 |
\begin{equation} |
161 |
\mathbf{v}\left(t+\frac{1}{2}\delta t\right) = \mathbf{v}(t) |
162 |
+ \frac{1}{2}\delta t\mathbf{a}(t). |
163 |
\end{equation} |
164 |
After calculating new forces, the velocities can be updated to a full |
165 |
step, |
166 |
\begin{equation} |
167 |
\mathbf{v}(t+\delta t) = \mathbf{v}\left(t+\frac{1}{2}\delta t\right) |
168 |
+ \frac{1}{2}\delta t\mathbf{a}(t+\delta t). |
169 |
\end{equation} |
170 |
By integrating in this manner, the error in the velocities reduces to |
171 |
$\mathcal{O}(\delta t^3)$. It should be noted that the error in the |
172 |
positions increases to $\mathcal{O}(\delta t^3)$, but the resulting |
173 |
improvement in the energies coupled with the maintained simplicity, |
174 |
time-reversibility, and symplectic nature make it an improvement over |
175 |
the original form. |
176 |
|
177 |
\subsection{\label{sec:IntroIntegrate}Rigid Body Motion} |
178 |
|
179 |
Rigid bodies are non-spherical particles or collections of particles |
180 |
(e.g. $\mbox{C}_{60}$) that have a constant internal potential and |
181 |
move collectively.\cite{Goldstein01} Discounting iterative constraint |
182 |
procedures like {\sc shake} and {\sc rattle} for approximating rigid |
183 |
bodies, they are not included in most simulation packages because of |
184 |
the algorithmic complexity involved in propagating orientational |
185 |
degrees of freedom.\cite{Ryckaert77,Andersen83,Krautler01} Integrators |
186 |
which propagate orientational motion with an acceptable level of |
187 |
energy conservation for molecular dynamics are relatively new |
188 |
inventions. |
189 |
|
190 |
Moving a rigid body involves determination of both the force and |
191 |
torque applied by the surroundings, which directly affect the |
192 |
translational and rotational motion in turn. In order to accumulate |
193 |
the total force on a rigid body, the external forces and torques must |
194 |
first be calculated for all the internal particles. The total force on |
195 |
the rigid body is simply the sum of these external forces. |
196 |
Accumulation of the total torque on the rigid body is more complex |
197 |
than the force because the torque is applied to the center of mass of |
198 |
the rigid body. The space-fixed torque on rigid body $i$ is |
199 |
\begin{equation} |
200 |
\boldsymbol{\tau}_i= |
201 |
\sum_{a}\biggl[(\mathbf{r}_{ia}-\mathbf{r}_i)\times \mathbf{f}_{ia} |
202 |
+ \boldsymbol{\tau}_{ia}\biggr], |
203 |
\label{eq:torqueAccumulate} |
204 |
\end{equation} |
205 |
where $\boldsymbol{\tau}_i$ and $\mathbf{r}_i$ are the torque on and |
206 |
position of the center of mass respectively, while $\mathbf{f}_{ia}$, |
207 |
$\mathbf{r}_{ia}$, and $\boldsymbol{\tau}_{ia}$ are the force on, |
208 |
position of, and torque on the component particles. |
209 |
|
210 |
The summation of the total torque is done in the body fixed axis. In |
211 |
order to move between the space fixed and body fixed coordinate axes, |
212 |
parameters describing the orientation must be maintained for each |
213 |
rigid body. At a minimum, the rotation matrix ($\mathsf{A}$) can be |
214 |
described by the three Euler angles ($\phi, \theta,$ and $\psi$), |
215 |
where the elements of $\mathsf{A}$ are composed of trigonometric |
216 |
operations involving $\phi, \theta,$ and $\psi$.\cite{Goldstein01} |
217 |
Direct propagation of the Euler angles has a known $1/\sin\theta$ |
218 |
divergence in the equations of motion for $\phi$ and $\psi$, leading |
219 |
to numerical instabilities any time one of the directional atoms or |
220 |
rigid bodies has an orientation near $\theta=0$ or |
221 |
$\theta=\pi$.\cite{Allen87} One of the most practical ways to avoid |
222 |
this ``gimbal point'' is to switch to another angular set defining the |
223 |
orientation of the rigid body near this point.\cite{Barojas73} This |
224 |
procedure results in additional book-keeping and increased algorithm |
225 |
complexity. In the search for more elegant alternative methods, Evans |
226 |
proposed the use of quaternions to describe and propagate |
227 |
orientational motion.\cite{Evans77} |
228 |
|
229 |
The quaternion method for integration involves a four dimensional |
230 |
representation of the orientation of a rigid |
231 |
body.\cite{Evans77,Evans77b,Allen87} Thus, the elements of |
232 |
$\mathsf{A}$ can be expressed as arithmetic operations involving the |
233 |
four quaternions ($q_w, q_x, q_y,$ and $q_z$), |
234 |
\begin{equation} |
235 |
\mathsf{A} = \left( \begin{array}{l@{\quad}l@{\quad}l} |
236 |
q_0^2+q_1^2-q_2^2-q_3^2 & 2(q_1q_2+q_0q_3) & 2(q_1q_3-q_0q_2) \\ |
237 |
2(q_1q_2-q_0q_3) & q_0^2-q_1^2+q_2^2-q_3^2 & 2(q_2q_3+q_0q_1) \\ |
238 |
2(q_1q_3+q_0q_2) & 2(q_2q_3-q_0q_1) & q_0^2-q_1^2-q_2^2+q_3^2 \\ |
239 |
\end{array}\right). |
240 |
\end{equation} |
241 |
Integration of the equations of motion involves a series of arithmetic |
242 |
operations involving the quaternions and angular momenta and leads to |
243 |
performance enhancements over Euler angles, particularly for very |
244 |
small systems.\cite{Evans77} This integration methods works well for |
245 |
propagating orientational motion in the canonical ensemble ($NVT$); |
246 |
however, energy conservation concerns arise when using the simple |
247 |
quaternion technique under the microcanonical ($NVE$) ensemble. An |
248 |
earlier implementation of {\sc oopse} utilized quaternions for |
249 |
propagation of rotational motion; however, a detailed investigation |
250 |
showed that they resulted in a steady drift in the total energy, |
251 |
something that has been observed by Kol {\it et al.} (also see |
252 |
section~\ref{sec:waterSimMethods}).\cite{Kol97} |
253 |
|
254 |
Because of the outlined issues involving integration of the |
255 |
orientational motion using both Euler angles and quaternions, we |
256 |
decided to focus on a relatively new scheme that propagates the entire |
257 |
nine parameter rotation matrix. This techniques is a velocity-Verlet |
258 |
version of the symplectic splitting method proposed by Dullweber, |
259 |
Leimkuhler and McLachlan ({\sc dlm}).\cite{Dullweber97} When there are |
260 |
no directional atoms or rigid bodies present in the simulation, this |
261 |
integrator becomes the standard velocity-Verlet integrator which is |
262 |
known to effectively sample the microcanonical ($NVE$) |
263 |
ensemble.\cite{Frenkel02} |
264 |
|
265 |
The key aspect of the integration method proposed by Dullweber |
266 |
\emph{et al.} is that the entire $3 \times 3$ rotation matrix is |
267 |
propagated from one time step to the next. In the past, this would not |
268 |
have been as feasible, since the rotation matrix for a single body has |
269 |
nine elements compared with the more memory-efficient methods (using |
270 |
three Euler angles or four quaternions). Computer memory has become |
271 |
much less costly in recent years, and this can be translated into |
272 |
substantial benefits in energy conservation. |
273 |
|
274 |
The integration of the equations of motion is carried out in a |
275 |
velocity-Verlet style two-part algorithm.\cite{Swope82} The first-part |
276 |
({\tt moveA}) consists of a half-step ($t + \delta t/2$) of the linear |
277 |
velocity (${\bf v}$) and angular momenta ({\bf j}) and a full-step ($t |
278 |
+ \delta t$) of the positions ({\bf r}) and rotation matrix, |
279 |
\begin{equation*} |
280 |
{\tt moveA} = \left\{\begin{array}{r@{\quad\leftarrow\quad}l} |
281 |
{\bf v}\left(t + \delta t / 2\right) & {\bf v}(t) |
282 |
+ \left( {\bf f}(t) / m \right)(\delta t/2), \\ |
283 |
% |
284 |
{\bf r}(t + \delta t) & {\bf r}(t) |
285 |
+ {\bf v}\left(t + \delta t / 2 \right)\delta t, \\ |
286 |
% |
287 |
{\bf j}\left(t + \delta t / 2 \right) & {\bf j}(t) |
288 |
+ \boldsymbol{\tau}^b(t)(\delta t/2), \\ |
289 |
% |
290 |
\mathsf{A}(t + \delta t) & \mathrm{rotate}\left( {\bf j} |
291 |
(t + \delta t / 2)\delta t \cdot |
292 |
\overleftrightarrow{\mathsf{I}}^{-1} \right), |
293 |
\end{array}\right. |
294 |
\end{equation*} |
295 |
where $\overleftrightarrow{\mathsf{I}}^{-1}$ is the inverse of the |
296 |
moment of inertia tensor. The $\mathrm{rotate}$ function is the |
297 |
product of rotations about the three body-fixed axes, |
298 |
\begin{equation} |
299 |
\mathrm{rotate}({\bf a}) = \mathsf{G}_x(a_x / 2) \cdot |
300 |
\mathsf{G}_y(a_y / 2) \cdot \mathsf{G}_z(a_z) \cdot \mathsf{G}_y(a_y / |
301 |
2) \cdot \mathsf{G}_x(a_x /2), |
302 |
\label{eq:dlmTrot} |
303 |
\end{equation} |
304 |
where each rotational propagator, $\mathsf{G}_\alpha(\theta)$, rotates |
305 |
both the rotation matrix ($\mathsf{A}$) and the body-fixed angular |
306 |
momentum (${\bf j}$) by an angle $\theta$ around body-fixed axis |
307 |
$\alpha$, |
308 |
\begin{equation} |
309 |
\mathsf{G}_\alpha( \theta ) = \left\{ |
310 |
\begin{array}{l@{\quad\leftarrow\quad}l} |
311 |
\mathsf{A}(t) & \mathsf{A}(0) \cdot \mathsf{R}_\alpha(\theta)^\textrm{T},\\ |
312 |
{\bf j}(t) & \mathsf{R}_\alpha(\theta) \cdot {\bf j}(0). |
313 |
\end{array} |
314 |
\right. |
315 |
\end{equation} |
316 |
$\mathsf{R}_\alpha$ is a quadratic approximation to the single-axis |
317 |
rotation matrix. For example, in the small-angle limit, the rotation |
318 |
matrix around the body-fixed x-axis can be approximated as |
319 |
\begin{equation} |
320 |
\mathsf{R}_x(\theta) \approx \left( |
321 |
\begin{array}{ccc} |
322 |
1 & 0 & 0 \\ |
323 |
0 & \frac{1-\theta^2 / 4}{1 + \theta^2 / 4} & -\frac{\theta}{1+\theta^2 / 4} \\ |
324 |
0 & \frac{\theta}{1+\theta^2 / 4} & \frac{1-\theta^2 / 4}{1 + \theta^2 / 4} |
325 |
\end{array} |
326 |
\right). |
327 |
\end{equation} |
328 |
The remaining rotations follow in a straightforward manner. As seen |
329 |
from the form of equation~(\ref{eq:dlmTrot}), the {\sc dlm} method |
330 |
uses a Trotter factorization of the orientational |
331 |
propagator.\cite{Trotter59} This has three effects: |
332 |
\begin{enumerate} |
333 |
\item the integrator is area-preserving in phase space (i.e. it is |
334 |
{\it symplectic}), |
335 |
\item the integrator is time-{\it reversible}, and |
336 |
\item the error for a single time step is of order |
337 |
$\mathcal{O}\left(\delta t^4\right)$ for time steps of length $\delta t$. |
338 |
\end{enumerate} |
339 |
|
340 |
After the initial half-step ({\tt moveA}), the forces and torques are |
341 |
evaluated for all of the particles. Once completed, the velocities can |
342 |
be advanced to complete the second-half of the two-part algorithm |
343 |
({\tt moveB}), resulting an a completed full step of both the |
344 |
positions and momenta, |
345 |
\begin{equation*} |
346 |
{\tt moveB} = \left\{\begin{array}{r@{\quad\leftarrow\quad}l} |
347 |
{\bf v}\left(t + \delta t \right) & |
348 |
{\bf v}\left(t + \delta t / 2 \right) |
349 |
+ \left({\bf f}(t + \delta t) / m \right)(\delta t/2), \\ |
350 |
% |
351 |
{\bf j}\left(t + \delta t \right) & |
352 |
{\bf j}\left(t + \delta t / 2 \right) |
353 |
+ \boldsymbol{\tau}^b(t + \delta t)(\delta t/2). |
354 |
\end{array}\right. |
355 |
\end{equation*} |
356 |
|
357 |
The matrix rotations used in the {\sc dlm} method end up being more |
358 |
costly computationally than the simpler arithmetic quaternion |
359 |
propagation. With the same time step, a 1024-molecule water simulation |
360 |
incurs approximately a 10\% increase in computation time using the |
361 |
{\sc dlm} method in place of quaternions. This cost is more than |
362 |
justified when comparing the energy conservation achieved by the two |
363 |
methods. Figure \ref{fig:quatdlm} provides a comparative analysis of |
364 |
the {\sc dlm} method versus the traditional quaternion scheme. |
365 |
|
366 |
\begin{figure} |
367 |
\centering |
368 |
\includegraphics[width=3.5in]{./figures/dlmVsQuat.pdf} |
369 |
\caption[Energy conservation analysis of the {\sc dlm} and quaternion |
370 |
integration methods]{Analysis of the energy conservation of the {\sc |
371 |
dlm} and quaternion integration methods. $\delta \mathrm{E}_1$ is the |
372 |
linear drift in energy over time and $\delta \mathrm{E}_0$ is the |
373 |
standard deviation of energy fluctuations around this drift. All |
374 |
simulations were of a 1024 SSD water system at 298 K starting from the |
375 |
same initial configuration. Note that the {\sc dlm} method provides |
376 |
more than an order-of-magnitude improvement in both the energy drift |
377 |
and the size of the energy fluctuations when compared with the |
378 |
quaternion method at any given time step. At time steps larger than 4 |
379 |
fs, the quaternion scheme resulted in rapidly rising energies which |
380 |
eventually lead to simulation failure. Using the {\sc dlm} method, |
381 |
time steps up to 8 fs can be taken before this behavior is evident.} |
382 |
\label{fig:quatdlm} |
383 |
\end{figure} |
384 |
|
385 |
In figure \ref{fig:quatdlm}, $\delta \mbox{E}_1$ is a measure of the |
386 |
linear energy drift in units of $\mbox{kcal mol}^{-1}$ per particle |
387 |
over a nanosecond of simulation time, and $\delta \mbox{E}_0$ is the |
388 |
standard deviation of the energy fluctuations in units of $\mbox{kcal |
389 |
mol}^{-1}$ per particle. In the top plot, it is apparent that the |
390 |
energy drift is reduced by a significant amount (2 to 3 orders of |
391 |
magnitude improvement at all tested time steps) by choosing the {\sc |
392 |
dlm} method over the simple non-symplectic quaternion integration |
393 |
method. In addition to this improvement in energy drift, the |
394 |
fluctuations in the total energy are also dampened by 1 to 2 orders of |
395 |
magnitude by utilizing the {\sc dlm} method. |
396 |
|
397 |
\begin{figure} |
398 |
\centering |
399 |
\includegraphics[width=\linewidth]{./figures/compCost.pdf} |
400 |
\caption[Energy drift as a function of required simulation run |
401 |
time]{Energy drift as a function of required simulation run time. |
402 |
$\delta \mathrm{E}_1$ is the linear drift in energy over time. |
403 |
Simulations were performed on a single 2.5 GHz Pentium 4 |
404 |
processor. Simulation time comparisons can be made by tracing |
405 |
horizontally from one curve to the other. For example, a simulation |
406 |
that takes 24 hours using the {\sc dlm} method will take roughly |
407 |
210 hours using the simple quaternion method if the same degree of |
408 |
energy conservation is desired.} |
409 |
\label{fig:cpuCost} |
410 |
\end{figure} |
411 |
Although the {\sc dlm} method is more computationally expensive than |
412 |
the traditional quaternion scheme for propagating of a time step, |
413 |
consideration of the computational cost for a long simulation with a |
414 |
particular level of energy conservation is in order. A plot of energy |
415 |
drift versus computational cost was generated |
416 |
(Fig.~\ref{fig:cpuCost}). This figure provides an estimate of the CPU |
417 |
time required under the two integration schemes for 1 nanosecond of |
418 |
simulation time for the model 1024-molecule system. By choosing a |
419 |
desired energy drift value it is possible to determine the CPU time |
420 |
required for both methods. If a $\delta \mbox{E}_1$ of |
421 |
0.001~kcal~mol$^{-1}$ per particle is desired, a nanosecond of |
422 |
simulation time will require ~19 hours of CPU time with the {\sc dlm} |
423 |
integrator, while the quaternion scheme will require ~154 hours of CPU |
424 |
time. This demonstrates the computational advantage of the integration |
425 |
scheme utilized in {\sc oopse}. |
426 |
|
427 |
\section{Accumulating Interactions} |
428 |
|
429 |
In the force calculation between {\tt moveA} and {\tt moveB} mentioned |
430 |
in section \ref{sec:IntroIntegrate}, we need to accumulate the |
431 |
potential and forces (and torques if the particle is a rigid body or |
432 |
multipole) on each particle from their surroundings. This can quickly |
433 |
become a cumbersome task for large systems since the number of pair |
434 |
interactions increases by $\mathcal{O}(N(N-1)/2)$ if you accumulate |
435 |
interactions between all particles in the system, note the utilization |
436 |
of Newton's third law to reduce the interaction number from |
437 |
$\mathcal{O}(N^2)$. The case of periodic boundary conditions further |
438 |
complicates matters by turning the finite system into an infinitely |
439 |
repeating one. Fortunately, we can reduce the scale of this problem by |
440 |
using spherical cutoff methods. |
441 |
|
442 |
\begin{figure} |
443 |
\centering |
444 |
\includegraphics[width=3.5in]{./figures/sphericalCut.pdf} |
445 |
\caption{When using a spherical cutoff, only particles within a chosen |
446 |
cutoff radius distance, $R_\textrm{c}$, of the central particle are |
447 |
included in the pairwise summation. This reduces a problem that scales |
448 |
by $\sim\mathcal{O}(N^2)$ to one that scales by $\sim\mathcal{O}(N)$.} |
449 |
\label{fig:sphereCut} |
450 |
\end{figure} |
451 |
With spherical cutoffs, rather than accumulating the full set of |
452 |
interactions between all particles in the simulation, we only |
453 |
explicitly consider interactions between local particles out to a |
454 |
specified cutoff radius distance, $R_\textrm{c}$, (see figure |
455 |
\ref{fig:sphereCut}). This reduces the scaling of the interaction to |
456 |
$\mathcal{O}(N\cdot\textrm{c})$, where `c' is a value that depends on |
457 |
the size of $R_\textrm{c}$ (c $\approx R_\textrm{c}^3$). Determination |
458 |
of which particles are within the cutoff is also an issue, because |
459 |
this process requires a full loop over all $N(N-1)/2$ pairs. To reduce |
460 |
the this expense, we can use neighbor lists.\cite{Verlet67,Thompson83} |
461 |
With neighbor lists, we have a second list of particles built from a |
462 |
list radius $R_\textrm{l}$, which is larger than $R_\textrm{c}$. Once |
463 |
any of the particles within $R_\textrm{l}$ move a distance of |
464 |
$R_\textrm{l}-R_\textrm{c}$ (the ``skin'' thickness), we rebuild the |
465 |
list with the full $N(N-1)/2$ loop.\cite{Verlet67} With an appropriate |
466 |
skin thickness, these updates are only performed every $\sim$20 |
467 |
time steps, significantly reducing the time spent on pair-list |
468 |
bookkeeping operations.\cite{Allen87} If these neighbor lists are |
469 |
utilized, it is important that these list updates occur |
470 |
regularly. Incorrect application of this technique leads to |
471 |
non-physical dynamics, such as the ``flying block of ice'' behavior |
472 |
for which improper neighbor list handling was identified a one of the |
473 |
possible causes.\cite{Harvey98,Sagui99} |
474 |
|
475 |
\subsection{Correcting Cutoff Discontinuities} |
476 |
\begin{figure} |
477 |
\centering |
478 |
\includegraphics[width=3.5in]{./figures/ljCutoffSquare.pdf} |
479 |
\caption{The common methods to smooth the potential discontinuity |
480 |
introduced when using a cutoff include a shifted potential, a shifted |
481 |
force, and a switching function. The shifted potential and shifted |
482 |
force both lift the whole potential so that it zeroes at |
483 |
$R_\textrm{c}$, thereby reducing the strength of the interaction. The |
484 |
(cubic) switching function only alters the potential in the switching |
485 |
region in order to smooth out the discontinuity.} |
486 |
\label{fig:ljCutoff} |
487 |
\end{figure} |
488 |
As particle move in and out of $R_\textrm{c}$, there will be sudden |
489 |
discontinuous jumps in the potential (and forces) due to their |
490 |
appearance and disappearance. In order to prevent heating and poor |
491 |
energy conservation in the simulations, this discontinuity needs to be |
492 |
smoothed out. There are several ways to modify the function so that it |
493 |
crosses $R_\textrm{c}$ in a continuous fashion, and the easiest |
494 |
methods is shifting the potential. To shift the potential, we simply |
495 |
subtract out the value we calculate at $R_\textrm{c}$ from the whole |
496 |
potential. For the shifted form of the Lennard-Jones potential is |
497 |
\begin{equation} |
498 |
V_\textrm{SLJ} = \left\{\begin{array}{l@{\quad\quad}l} |
499 |
V_\textrm{LJ}(r_{ij}) - V_\textrm{LJ}(R_\textrm{c}) & r_{ij} < R_\textrm{c}, \\ |
500 |
0 & r_{ij} \geqslant R_\textrm{c}, |
501 |
\end{array}\right. |
502 |
\end{equation} |
503 |
where |
504 |
\begin{equation} |
505 |
V_\textrm{LJ} = 4\epsilon\left[\left(\frac{\sigma}{r_{ij}}\right)^{12} - |
506 |
\left(\frac{\sigma}{r_{ij}}\right)^6\right]. |
507 |
\end{equation} |
508 |
In figure \ref{fig:ljCutoff}, the shifted form of the potential |
509 |
reaches zero at the cutoff radius at the expense of the correct |
510 |
magnitude below $R_\textrm{c}$. This correction method also does |
511 |
nothing to correct the discontinuity in the forces. We can account for |
512 |
this force discontinuity by shifting in the by applying the shifting |
513 |
in the forces rather than just the potential via |
514 |
\begin{equation} |
515 |
V_\textrm{SFLJ} = \left\{\begin{array}{l@{\quad\quad}l} |
516 |
V_\textrm{LJ}({r_{ij}}) - V_\textrm{LJ}(R_\textrm{c}) - |
517 |
\left(\frac{d V(r_{ij})}{d r_{ij}}\right)_{r_{ij}=R_\textrm{c}} |
518 |
(r_{ij} - R_\textrm{c}) & r_{ij} < R_\textrm{c}, \\ |
519 |
0 & r_{ij} \geqslant R_\textrm{c}. |
520 |
\end{array}\right. |
521 |
\end{equation} |
522 |
The forces are continuous with this potential; however, the inclusion |
523 |
of the derivative term distorts the potential even further than the |
524 |
simple shifting as shown in figure \ref{fig:ljCutoff}. The method for |
525 |
correcting the discontinuity which results in the smallest |
526 |
perturbation in both the potential and the forces is the use of a |
527 |
switching function. The cubic switching function, |
528 |
\begin{equation} |
529 |
S(r) = \left\{\begin{array}{l@{\quad\quad}l} |
530 |
1 & r_{ij} \leqslant R_\textrm{sw}, \\ |
531 |
\frac{(R_\textrm{c} + 2r_{ij} - 3R_\textrm{sw}) |
532 |
(R_\textrm{c} - r_{ij})^2}{(R_\textrm{c} - R_\textrm{sw})^3} |
533 |
& R_\textrm{sw} < r_{ij} \leqslant R_\textrm{c}, \\ |
534 |
0 & r_{ij} > R_\textrm{c}, |
535 |
\end{array}\right. |
536 |
\end{equation} |
537 |
is sufficient to smooth the potential (again, see figure |
538 |
\ref{fig:ljCutoff}) and the forces by only perturbing the potential in |
539 |
the switching region. If smooth second derivatives are required, a |
540 |
higher order polynomial switching function (i.e. fifth order |
541 |
polynomial) can be used.\cite{Andrea83,Leach01} It should be noted |
542 |
that the higher the order of the polynomial, the more abrupt the |
543 |
switching transition. |
544 |
|
545 |
\subsection{Long-Range Interaction Corrections} |
546 |
|
547 |
While a good approximation, accumulating interaction only from the |
548 |
nearby particles can lead to some issues, because the further away |
549 |
surrounding particles do still have a small effect. For instance, |
550 |
while the strength of the Lennard-Jones interaction is quite weak at |
551 |
$R_\textrm{c}$ in figure \ref{fig:ljCutoff}, we are discarding all of |
552 |
the attractive interaction that extends out to extremely long |
553 |
distances. Thus, the potential is a little too high and the pressure |
554 |
on the central particle from the surroundings is a little too low. For |
555 |
homogeneous Lennard-Jones systems, we can correct for this neglect by |
556 |
assuming a uniform density and integrating the missing part, |
557 |
\begin{equation} |
558 |
V_\textrm{full}(r_{ij}) \approx V_\textrm{c} |
559 |
+ 2\pi N\rho\int^\infty_{R_\textrm{c}}r^2V_\textrm{LJ}(r)dr, |
560 |
\end{equation} |
561 |
where $V_\textrm{c}$ is the truncated Lennard-Jones |
562 |
potential.\cite{Allen87} Like the potential, other Lennard-Jones |
563 |
properties can be corrected by integration over the relevant |
564 |
function. Note that with heterogeneous systems, this correction begins |
565 |
to break down because the density is no longer uniform. |
566 |
|
567 |
Correcting long-range electrostatic interactions is a topic of great |
568 |
importance in the field of molecular simulations. There have been |
569 |
several techniques developed to address this issue, like the Ewald |
570 |
summation and the reaction field technique. An in-depth analysis of |
571 |
this problem, as well as useful corrective techniques, is presented in |
572 |
chapter \ref{chap:electrostatics}. |
573 |
|
574 |
\subsection{Periodic Boundary Conditions} |
575 |
|
576 |
In typical molecular dynamics simulations there are no restrictions |
577 |
placed on the motion of particles outside of what the interparticle |
578 |
interactions dictate. This means that if a particle collides with |
579 |
other particles, it is free to move away from the site of the |
580 |
collision. If we consider the entire system as a collection of |
581 |
particles, they are not confined by walls of the ``simulation box'' |
582 |
and can freely move away from the other particles. With no boundary |
583 |
considerations, particles moving outside of the simulation box |
584 |
enter a vacuum. This is correct behavior for cluster simulations in a |
585 |
vacuum; however, if we want to simulate bulk or spatially infinite |
586 |
systems, we need to use periodic boundary conditions. |
587 |
|
588 |
\begin{figure} |
589 |
\centering |
590 |
\includegraphics[width=4.5in]{./figures/periodicImage.pdf} |
591 |
\caption{With periodic boundary conditions imposed, when particles |
592 |
move out of one side the simulation box, they wrap back in the |
593 |
opposite side. In this manner, a finite system of particles behaves as |
594 |
an infinite system.} |
595 |
\label{fig:periodicImage} |
596 |
\end{figure} |
597 |
In periodic boundary conditions, as a particle moves outside one wall |
598 |
of the simulation box, the coordinates are remapped such that the |
599 |
particle enters the opposing side of the box. This process is easy to |
600 |
visualize in two dimensions as shown in figure \ref{fig:periodicImage} |
601 |
and can occur in three dimensions, though it is not as easy to |
602 |
visualize. Remapping the actual coordinates of the particles can be |
603 |
problematic in that the we are restricting the distance a particle can |
604 |
move from it's point of origin to a diagonal of the simulation |
605 |
box. Thus, even though we are not confining the system with hard |
606 |
walls, we are confining the particle coordinates to a particular |
607 |
region in space. To avoid this ``soft'' confinement, it is common |
608 |
practice to allow the particle coordinates to expand in an |
609 |
unrestricted fashion while calculating interactions using a wrapped |
610 |
set of ``minimum image'' coordinates. These minimum image coordinates |
611 |
need not be stored because they are easily calculated on the fly when |
612 |
determining particle distances. |
613 |
|
614 |
\section{Calculating Properties} |
615 |
|
616 |
In order to use simulations to model experimental process and evaluate |
617 |
theories, we need to be able to extract properties from the |
618 |
results. In experiments, we can measure thermodynamic properties such |
619 |
as the pressure and free energy. In computer simulations, we can |
620 |
calculate properties from the motion and configuration of particles in |
621 |
the system and make connections between these properties and the |
622 |
experimental thermodynamic properties through statistical mechanics. |
623 |
|
624 |
The work presented in the later chapters use the canonical ($NVT$), |
625 |
isobaric-isothermal ($NPT$), and microcanonical ($NVE$) statistical |
626 |
mechanics ensembles. The different ensembles lend themselves to more |
627 |
effectively calculating specific properties. For instance, if we |
628 |
concerned ourselves with the calculation of dynamic properties, which |
629 |
are dependent upon the motion of the particles, it is better to choose |
630 |
an ensemble that does not add system motions to keep properties like |
631 |
the temperature or pressure constant. In this case, the $NVE$ ensemble |
632 |
would be the most appropriate choice. In chapter \ref{chap:ice}, we |
633 |
discuss calculating free energies, which are non-mechanical |
634 |
thermodynamic properties, and these calculations also depend on the |
635 |
chosen ensemble.\cite{Allen87} The Helmholtz free energy ($A$) depends |
636 |
on the $NVT$ partition function ($Q_{NVT}$), |
637 |
\begin{equation} |
638 |
A = -k_\textrm{B}T\ln Q_{NVT}, |
639 |
\end{equation} |
640 |
while the Gibbs free energy ($G$) depends on the $NPT$ partition |
641 |
function ($Q_{NPT}$), |
642 |
\begin{equation} |
643 |
G = -k_\textrm{B}T\ln Q_{NPT}. |
644 |
\end{equation} |
645 |
It is also useful to note that the conserved quantities of the $NVT$ |
646 |
and $NPT$ ensembles are related to the Helmholtz and Gibbs free |
647 |
energies respectively.\cite{Melchionna93} |
648 |
|
649 |
Integrating the equations of motion is a simple method to obtain a |
650 |
sequence of configurations that sample the chosen ensemble. For each |
651 |
of these configurations, we can calculate an instantaneous value for a |
652 |
chosen property like the density in the $NPT$ ensemble, where the |
653 |
volume is allowed to fluctuate. The density for the simulation is |
654 |
calculated from an average over the densities for the individual |
655 |
configurations. Being that the configurations from the integration |
656 |
process are related to one another by the time evolution of the |
657 |
interactions, this average is technically a time average. In |
658 |
calculating thermodynamic properties, we would actually prefer an |
659 |
ensemble average that is representative of all accessible states of |
660 |
the system. We can calculate thermodynamic properties from the time |
661 |
average by taking advantage of the ergodic hypothesis, which states |
662 |
that over a long period of time, the time average and the ensemble |
663 |
average are the same. |
664 |
|
665 |
In addition to the average, the fluctuations of that particular |
666 |
property can be determined via the standard deviation. Fluctuations |
667 |
are useful for measuring various thermodynamic properties in computer |
668 |
simulations. In section \ref{sec:t5peThermo}, we use fluctuations in |
669 |
propeties like the enthalpy and volume to calculate various |
670 |
thermodynamic properties, such as the constant pressure heat capacity |
671 |
and the isothermal compressibility. |
672 |
|
673 |
\section{Application of the Techniques} |
674 |
|
675 |
In the following chapters, the above techniques are all utilized in |
676 |
the study of molecular systems. There are a number of excellent |
677 |
simulation packages available, both free and commercial, which |
678 |
incorporate many of these |
679 |
methods.\cite{Brooks83,MacKerell98,Pearlman95,Berendsen95,Lindahl01,Smith96,Ponder87} |
680 |
Because of our interest in rigid body dynamics, point multipoles, and |
681 |
systems where the orientational degrees cannot be handled using the |
682 |
common constraint procedures (like {\sc shake}), the majority of the |
683 |
following work was performed using {\sc oopse}, the object-oriented |
684 |
parallel simulation engine.\cite{Meineke05} The {\sc oopse} package |
685 |
started out as a collection of separate programs written within our |
686 |
group, and has developed into one of the few parallel molecular |
687 |
dynamics packages capable of accurately integrating rigid bodies and |
688 |
point multipoles. |
689 |
|
690 |
In chapter \ref{chap:electrostatics}, we investigate correction |
691 |
techniques for proper handling of long-ranged electrostatic |
692 |
interactions. In particular we develop and evaluate some new pairwise |
693 |
methods which we have incorporated into {\sc oopse}. These techniques |
694 |
make an appearance in the later chapters, as they are applied to |
695 |
specific systems of interest, showing how it they can improve the |
696 |
quality of various molecular simulations. |
697 |
|
698 |
In chapter \ref{chap:water}, we focus on simple water models, |
699 |
specifically the single-point soft sticky dipole (SSD) family of water |
700 |
models. These single-point models are more efficient than the common |
701 |
multi-point partial charge models and, in many cases, better capture |
702 |
the dynamic properties of water. We discuss improvements to these |
703 |
models in regards to long-range electrostatic corrections and show |
704 |
that these models can work well with the techniques discussed in |
705 |
chapter \ref{chap:electrostatics}. By investigating and improving |
706 |
simple water models, we are extending the limits of computational |
707 |
efficiency for systems that heavily depend on water calculations. |
708 |
|
709 |
In chapter \ref{chap:ice}, we study a unique polymorph of ice that we |
710 |
discovered while performing water simulations with the fast simple |
711 |
water models discussed in the previous chapter. This form of ice, |
712 |
which we called ``imaginary ice'' (Ice-$i$), has a low-density |
713 |
structure which is different from any known polymorph from either |
714 |
experiment or other simulations. In this study, we perform a free |
715 |
energy analysis and see that this structure is in fact the |
716 |
thermodynamically preferred form of ice for both the single-point and |
717 |
commonly used multi-point water models under the chosen simulation |
718 |
conditions. We also consider electrostatic corrections, again |
719 |
including the techniques discussed in chapter |
720 |
\ref{chap:electrostatics}, to see how they influence the free energy |
721 |
results. This work, to some degree, addresses the appropriateness of |
722 |
using these simplistic water models outside of the conditions for |
723 |
which they were developed. |
724 |
|
725 |
In the final chapter we summarize the work presented previously. We |
726 |
also close with some final comments before the supporting information |
727 |
presented in the appendices. |