Skip to content

Commit 05fc208

Browse files
author
JIMonroe
committed
Modifications to integrators section, broke into subsections.
1 parent c930c6e commit 05fc208

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

paper/basic_training.tex

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ \subsubsection{Key concepts}
176176

177177
Classical molecular models typically consist of point particles carrying mass and electric charge, as well as potentially additional interactions such as van der Waals interactions and bonded interactions of various types.
178178
Sometimes it is much more efficient to freeze the internal degrees of freedoms and treat the molecule as a rigid body where the particles do not change their relative orientation as the whole body moves; this is commonly done, for example, for rigid models of the water molecule.
179-
Due to the high frequency of the O-H vibrations, accurately treating water classically would require a very small time step, so for computational efficiency water is often instead treated as a rigid body.
179+
Due to the high frequency of the O-H vibrations, accurately treating water classically would require a very small timestep, so for computational efficiency water is often instead treated as a rigid body.
180180
Keeping specified objects rigid in a simulation involves applying holonomic constraints, where the rigidity is defined by imposing a minimal set of fixed bond lengths and angles through iterative procedures during the numerical integration of the equation of motion (see Section~\ref{sec:integrators} for more on constraints and integrators).
181181
It is important to understand the concept of point particles, rigid bodies and constraints.
182182

@@ -584,11 +584,11 @@ \subsection{Main steps of a molecular dynamics simulation}
584584
Potentially the worst possible outcome is if the prepared system is not what you intended (e.g. it contains incorrect molecules or protonation states) but is chemically valid and well described by your force field and thus proceeds without error through the remaining steps --- and in fact this is a frequent outcome of problems in system preparation.
585585
It should not be assumed that if a system can proceed in a well-behaved manner through the other steps, it was necessarily prepared correctly; considerable care should be taken here.
586586

587-
The purpose of minimization, or relaxation, is to find a local energy minimum of the starting structure so that the molecular dynamics simulation does not immediately "blow up" (i.e. the forces on any one atom are not so large that the atoms move an unreasonable distance in a single time step).
587+
The purpose of minimization, or relaxation, is to find a local energy minimum of the starting structure so that the molecular dynamics simulation does not immediately "blow up" (i.e. the forces on any one atom are not so large that the atoms move an unreasonable distance in a single timestep).
588588
This involves standard minimization algorithms such as steepest descent.
589589
For a more involved discussion of minimization algorithms utilized in molecular simulation, see \citet{LeachBook}, sections 5.1-5.7.
590590

591-
At the end of energy minimization, it is important to achieve a system configuration with small enough forces that the desired time step will allow numerical integration of the equations of motion without overly large displacements (see \citet{LeachBook}, section 7.3.4).
591+
At the end of energy minimization, it is important to achieve a system configuration with small enough forces that the desired timestep will allow numerical integration of the equations of motion without overly large displacements (see \citet{LeachBook}, section 7.3.4).
592592
Such a configuration is a suitable starting point for molecular dynamics techniques.
593593
However, this only represents a static set of positions, while the propagation of dynamics also requires a set of starting velocities.
594594
These may be assigned in a variety of ways, but are usually randomly assigned to atoms such that the correct Maxwell-Boltzmann distribution at the desired temperature is achieved.
@@ -598,7 +598,7 @@ \subsection{Main steps of a molecular dynamics simulation}
598598
For this reason, it is advised that a thermostatted simulation is performed prior to a desired production simulation, even if the production simulation will ultimately be done in the NVE ensemble.
599599
Once the kinetic and potential energies fluctuate around constant values, the thermostat may be removed (if an NVE simulation is desired) and a snapshot selected that is simultaneously as close to the average kinetic and potential energies as possible.
600600
This snapshot, containing both positions and velocities may be used to then start an NVE simulation that will correspond to a temperature close to that which is desired.
601-
This is necessary due to the fact that only the average temperature is obtained through coupling to a thermostat (see Section~\ref{sec:thermostats}), and the temperature fluctuates with the kinetic energy at each time step.
601+
This is necessary due to the fact that only the average temperature is obtained through coupling to a thermostat (see Section~\ref{sec:thermostats}), and the temperature fluctuates with the kinetic energy at each timestep.
602602

603603
Similarly, equilibration in the NPT ensemble is necessary before production in the NVT if an average density consistent with a specific pressure is desired.
604604
In this case, the system may be scaled to the desired average volume before the production simulation.
@@ -624,7 +624,7 @@ \subsection{Main steps of a molecular dynamics simulation}
624624
}
625625
\label{eqworkflow}
626626
\end{figure}
627-
\todo[inline, color={yellow!20}]{DLM: Caption needs updating to make clear why you would choose different options here, especially the two different NVT options.}
627+
\todo[inline, color={yellow!20}]{DLM: Caption needs updating to make clear why you would choose different options here, especially the two different NVT options. JIM: Better?}
628628

629629
Once equilibration is complete, production data may be collected.
630630
The production simulation is that from which specific properties of the system of interest will be calculated.
@@ -677,7 +677,7 @@ \subsubsection{Popular Thermostats}
677677
\item \textbf{Simple Velocity Rescaling}
678678

679679
The simple velocity rescaling thermostat is one of the easiest thermostats to implement, however, this thermostat is also one of the most non-physical thermostats as well.
680-
This thermostat relies on rescaling the momenta of the particles every $N$ time steps based on their ratio of the instantaneous temperature to the target temperature\cite{thermostatAlgorithms2005}.
680+
This thermostat relies on rescaling the momenta of the particles every $N$ timesteps based on their ratio of the instantaneous temperature to the target temperature\cite{thermostatAlgorithms2005}.
681681
This leads to multiple issues when trying to sample data using this thermostat.
682682
First, this method is not reversible, there lacks a way for the particles to have knowledge of their previous thermal history.
683683
This makes any dynamical value impossible to measure (diffusion for example).
@@ -889,14 +889,16 @@ \subsubsection{Summary}
889889
\subsection{Integrators}
890890
\label{sec:integrators}
891891

892-
\todo[inline, color={yellow!20}]{DLM: Need to decide on ``time step'' versus ``timestep'' and change everywhere in whole paper; right now we use both.}
893-
894892
For systems consisting of more than three interacting bodies with no constrained degrees of freedom, there is no analytical solution to the equations of motion.
895893
Instead, we must approximate the dynamics in a discrete manner.
896894
This is usually termed numerical integration of the equations of motion.
897895
Algorithms to perform this integration take many forms and are usually called integrators.
898896
Here, we explain the need for integrators, discuss key criteria like energy conservation, and highlight a number of commonly used integrators.
899897

898+
\subsubsection{Desireable integrator properties}
899+
900+
So-called ``good'' integrators contain certain features that are appealing for molecule simulations.
901+
We start with the most obvious feature, which is that the integrator induces little error in the dynamics.
900902
Since integration is fundamentally about taking discrete steps to approximate continuous dynamics, this discretization process introduces errors (as can be observed by comparison to analytically soluble problems, like the harmonic oscillator).
901903
These errors are termed discretization errors, whereas additional errors called truncation errors are also accumulated through loss of precision during computer calculations.
902904
As will be discussed shortly, there are many strategies for avoiding discretization errors.
@@ -908,7 +910,7 @@ \subsection{Integrators}
908910
Luckily, this issue may be avoided simply by guaranteeing that the integrator is reversible~\cite{Frenkel:2001:}.
909911
More details may be found in ~\citet{Tuckerman:1992:}, but basically if the mathematical operator representing the integrator preserves phase space volume, it also satisfies the definition of reversibility: if the operator is applied to propagate forward by $\Delta t$, the starting condition may be recovered by in turn applying the operator to the result using $- \Delta t$ as the timestep.
910912

911-
Energy conservation is imperative in simulating the microcanonical (NVE) ensemble.
913+
Energy conservation is also a desirable integrator property and is imperative in simulating the microcanonical (NVE) ensemble.
912914
This is a much trickier property to examine, and varies with different integrators.
913915
For instance, some classes of integrators better-preserve energy over short times, while others better-preserve energy at long times.
914916
The latter is generally preferred, though it may necessitate other sacrifices such as greater energy fluctuations away from the desired, exact system energy.
@@ -933,14 +935,22 @@ \subsection{Integrators}
933935
This has the added benefit of also reducing truncation error, which is proportional to the number of timesteps taken.
934936
It is worth noting that the issue of integrator choice versus timestep is not always simple; in some cases, a ``better'' integrator might allow longer timesteps but also carry an additional computational cost that outweighs the benefits of an increased timestep.
935937

936-
The most commonly used integrators are variants of the Verlet algorithm (e.g. Velocity Verlet or Leapfrog).
937-
Detailed discussion and derivation of such integrators may be found in section 7.3 of \citet{LeachBook} and 4.3 of \citet{Frenkel:2001:}.
938-
Such integrators are not applicable, however, for simulations involving stochastic dynamics.
939-
These simulations include application of a random force to each particle, and represent discretizations of either Langevin or Brownian dynamics.
938+
\subsubsection{Deterministic integrators}
939+
940+
The most commonly used integrators are variants of the Verlet algorithm (e.g. Velocity Verlet or Leapfrog).
941+
Such integrators include terms for updating particle positions up to the order of the square of the timestep (i.e. they include forces).
942+
Inclusion of higher-order terms is favored in other families of algorithms, but generally leads to greater complexity and reduced computational efficiency at only marginal improvement in accuracy.
943+
Detailed discussion and derivation of many common integrators may be found in section 7.3 of \citet{LeachBook} and 4.3 of \citet{Frenkel:2001:}.
944+
Such integrators are not applicable, however, for simulations involving stochastic dynamics, as discussed below.
945+
946+
\subsubsection{Stochastic integrators}
947+
948+
Stochastic dynamics simulations include application of a random force to each particle, and represent discretizations of either Langevin or Brownian dynamics.
940949
A detailed description of such stochastic dynamics may be found in McQuarrie~\cite{McQuarrieStatMechBook}, Chapter 20.
941950
As detailed in section \ref{sec:thermostats}, it is common to apply temperature control through the use of Langevin dynamics.
942951
As a brief aside, this highlights the fact that the choice of integrator is often tightly coupled to the choice of thermostat and/or barostat.
943952
Different combinations may demonstrate better performance and for expanded ensemble methods it is absolutely necessary to utilize an integrator specific to the selected temperature- or pressure-control algorithm.
953+
944954
For simulating Langevin or other stochastic dynamics, the presence of random forces usually prevents the integrator from preserving phase-space volume.
945955
However, through fortuitous cancellation of error, some stochastic integration schemes may achieve preservation of \textit{part} of the full phase-space (i.e. configurations \textit{or} velocities are preserved)~\cite{Fass2018}.
946956
Though this may sound dire, in practice this is easily remedied through an appropriate choice of timestep - this just might need to be shorter or longer depending on the integration scheme.
@@ -949,8 +959,8 @@ \subsection{Integrators}
949959
If dynamics are of interest, the dependence of these properties on the integrator parameters (e.g. friction factor) should be assessed~\cite{Basconi:2013:J.Chem.TheoryComput.}.
950960
\todo[inline, color={yellow!20}]{DLM: I need to review the paragraphing here; some of these are rather long and cover a lot. }
951961

952-
\todo[inline, color={green!20}]{JIM: Happy to introduce Trotter decompositions, but is it really necessary? Also, we need to add information on constrained dynamics. Anything else? Needs more details, or just send people to citations?}
953-
\todo[inline, color={yellow!20}]{DLM: I don't think necessary to introduce, but in favor of adding citations to useful work/additional resources.}
962+
%\todo[inline, color={green!20}]{JIM: Happy to introduce Trotter decompositions, but is it really necessary? Also, we need to add information on constrained dynamics. Anything else? Needs more details, or just send people to citations?}
963+
%\todo[inline, color={yellow!20}]{DLM: I don't think necessary to introduce, but in favor of adding citations to useful work/additional resources.}
954964

955965
\subsubsection{How to choose an appropriate timestep?}
956966
\todo[inline, color={yellow!20}]{DLM: Above should be broken into subsubsections for consistency with thermostats/barostats and because a subsection with only one subsubsection doesn't make sense.}

0 commit comments

Comments
 (0)