Date post: | 13-Apr-2018 |
Category: |
Documents |
Upload: | kailasham-ramalingam |
View: | 246 times |
Download: | 1 times |
of 26
7/26/2019 8. Molecular Dynamics
1/26
MOLECULAR DYNAMICS
Molecular dynamics (MD) calculations are dynamic studies of many-body systems inwhich equations of motion of individual particles are solved explicitly. These
equations may be either classical or quantum mechanical. As a result, we obtain the
structural as well as dynamical properties of the system studied.
The approach taken by MD is to solve equations of motion numerically on a
computer. Thus in an MD simulation we compute trajectories of a collection of
particles (which may but need not have intrinsic degrees of freedom) in the phase
space (defined by positions and momenta or velocities of the particles).
Two types of molecular dynamics studies
1.
Studies of the thermodynamical equilibrium of a system of particles subject to
certain boundary conditions. This approach is usually adopted when studying
dependence of certain physical quantities on temperature, pressure, applied loads
etc. Examples are calculation of the dependence of the specific heat, diffusivity,
elastic moduli and other physical quantities on temperature. However, it also
includes investigation of the structure (e. g. crystal vs liquid) as a function of
temperature but not the dynamics of processes of structural transformations.
2.
Investigations of the dynamical development of a system computer
experiments. This may involve study of the development from a non-
equilibrium state to a final equilibrium state, investigation of the changes of thesystem induced by externally applied fields exerting forces on particles, studies
of the mechanisms of phase transformations induced by changes of temperature
or various external parameters. e. g. pressure.
STAGES OF MD SIMULATION
Construction of the relaxed block and boundary conditionsThe initial construction of the block of particles proceeds as described in the section
dealing with General Aspects of computer modeling. Non-periodic, periodic or semi-
periodic boundary conditions can be used.
Initialization
Assignment of initial conditions for the equations of motion.
This may be done in two different ways:
7/26/2019 8. Molecular Dynamics
2/26
2
(i) Coordinates and velocities of the particles are given at the beginning, chosen astime = 0.
(ii) Coordinates of the particles are given at the time = 0 and at a time !t.
The precise choice of initial conditions may not be crucial since, ultimately, the
system will loose memory of the initial state. However, this depends on whether
the initial state is a physically well defined state and we investigate the dynamic
development of the system from this state or whether it is only a startingconfiguration used to attain the thermodynamic equilibrium during the calculation. In
the former case we are performing a computer experiment and in the latter case we
study the thermodynamic equilibrium of a system of particles subject to certain
boundary conditions.
Equilibration
When studying the thermodynamic equilibrium the initial state is usually not an
equilibrium state in mechanical equilibrium as defined by equation (G5). Hence, the
system must be relaxed (develop in the phase space, i. e. when both particlecoordinates and velocities change) by integrating equations of motion for a number of
time steps until the system has settled to definite mean values of the kinetic and
potential energies. In this process the choice of !t, which plays the role of the timestep used in the numerical integration of equations of motion, is crucial. The mostappropriate choice of !t is such that it assures the stability of the solution and at thesame time the maximum possible speed of calculations. This can only be achieved
by trial and error and by gradually building up the experience.
In MD calculations the total vector of velocity V = v ii
! ,where v iis the velocity of
the particle I (a vector), must be permanently set equal to zero. This means that no
rigid body motion of the assembly takes place.
EQUATIONS OF MOTION AND THEIR INTEGRATION
All the molecular dynamics algorithms for the study of a classical (not quantum)
system integrate Newtons equations of motion
mid 2 r
i
!
dt2=Fi
!
(! =1,2,3; i =1,2,....,N) (MD1)
where the vector ri determines position of the particle i and Fi is the force acting on this
particle (see also equations G3 and G4). Here i numbers particles and "coordinates 1,
7/26/2019 8. Molecular Dynamics
3/26
3
2, 3 in the 3D case and 1, 2 in the 2D case). Since the energy of the system, equal to the
sum of the potential and kinetic energy, is the first integral of equations of motion, it
must remain constant during integration. If it does not it indicates that the calculation is
erroneous. However, the kinetic and potential energies vary during the integration
process and settle to certain mean values when the equilibrium has been attained. This
is shown schematically in Fig. 1.
Time
Energy
Potential energy
Total energy
Kinetic energy
Fig. 1. Total, potential and kinetic energies as functions of time in MD simulations.
Furthermore, in the integration algorithms summarized below, the total number of
particles and the total volumeare also preserved. Consequently, in these algorithms
the system is treated from the statistical mechanics point of view as a microcanonical
ensemble. However, later on we shall discuss the situation when the volume of the
system may be changing.
Verlet algorithm
Procedure employing two successive positions of the particles
At the start we specify ri t = 0( ) and ri t = !t( ) . Using the central difference methodfor numerical evaluation of the second derivative, equation (MD1) can be written as
d2ri t( )
dt2 !
1
"t( )2 ri t +"t( )#2ri t( ) + ri t# "t( )$% &' =
1
mi
Fi t( ) (MD2)
and therefore
ri t + !t( ) = 2ri t( ) " ri t " !t( ) +!t( )
2
mi
Fi t( ) (MD3.1)
This is the basic recursion formula for the MD simulation, which then proceeds as
follows:
7/26/2019 8. Molecular Dynamics
4/26
4
At the time step J, when particles are at positions ri J!t( ) , we evaluate the force
acting on each particle, Fi J!t( ) . Positions of particles at the time step J+1,
ri (J +1)!t( ) , are then found using (MD3.1) with t = J!t. as
ri ( J + 1)!t( ) =2ri J!t( )" ri (J " 1)!t( ) +
!t( )2
m iF
i t( ) (MD3.2)
Velocities v i J!t( ) at the time step J are then
v i J!t( ) =ri (J +1)!t( )" ri (J "1)!t( )
2!t (MD4)
Procedure employing positions and velocities of the particles
At the start we specify initial positions ri t = 0( ) and initial velocities v i t = 0( ) .
Integration of equation (MD1) over a short period of time !t during which the force
Fi
t( ) and the velocity vi
t( ) can be considered to be constant gives:
rit + !t( ) = r
it( )+ v
it( )!t +
!t( )2
2mi
Fit( )
Following this equation the MD simulation can then proceeds as follows: At the time
step J, when particles are at positions ri J!t( ) and have velocities vi J!t( ) , weevaluate the force acting on each particle, Fi J!t( ) . Positions ri (J +1)!t( ) at the timestep J+1 are then evaluated as
ri(J+1)!t( ) =ri J!t( )+ vi J!t( )!t+
!t( )2
2mi
FiJ!t( ) (MD5)
and velocities at the time step J+1 as
v i (J + 1)!t( ) = v i J!t( ) + !t( )2m i
Fi (J + 1)!t( ) + Fi J!t( )( ) (MD6)
In (MD6) the average of forces in the Jth and (J+1)th iterations are used rather than
the force in the (J+1)th iteration only. (If positions in the (J+1)th iteration are already
determined then the force in the (J+1)th can be evaluated).
7/26/2019 8. Molecular Dynamics
5/26
5
The two procedures are, of course, equivalent. Equation (MD3.2) can be written as
2ri (J +1)!t( ) =2ri J!t( ) + ri (J +1)!t( ) " ri (J "1)!t( )+
!t( )2
mi
Fi t( )
and using equation (MD4) we obtain
2ri (J +1)!t( )=2ri J!t( ) +2!tv i J!t( ) +
!t( )
2
mi
Fi t( )
which, when divided by 2, is the same as equation (MD5).
Predictor-corrector algorithm
Using Taylor expansion to the third order we can write the predictedvalues of the
positions of the particles, ri
p, velocities, v
i
p, and accelerations, a
i
p in the J+1 time
step as
rip(J +1)!t( ) = ri J!t( ) + !tv i J!t( ) +
1
2!t
2a i J!t( ) +
1
6!t
3b i J!t( )
v ip(J + 1)!t( ) = v i J!t( ) + !ta i J!t( )+
1
2!t
2b i J!t( )
a ip (J + 1)!t( ) = a i J!t( ) + !tb i J!t( )
(MD7.1)
where ri , vi and a i are the positions, velocities and accelerations in the step J; b i isthe time derivative of the acceleration in the step J. In the predictor step we take
b ip
(J + 1)!t( ) = b i J!t( ) (MD7.2)
Equation of motion is now introduced by evaluating the accelerations in accordance
with the forces:
a i J!t( ) =1
mi
Fi J!t( ) (MD8)
Hence, the 'correct' acceleration at the step J+1 can be evaluated using (MD8) as
ai(J + 1)!t( ) = Fi (J + 1)!t( ) / m i and the error in the predictor step is
!a i (J + 1)!t( ) = a i (J + 1)!t( ) " a ip
(J + 1)!t( ) (MD9)
7/26/2019 8. Molecular Dynamics
6/26
6
The corrector stepis then introduced that determines the values of ri,v i,a i and b i inthe step (J+1) as follows:
ri (J + 1)!t( ) =rip(J + 1)!t( ) +c0!a i (J + 1)!t( )
v i (J +1)!t( ) = v ip (J + 1)!t( ) +c1!a i (J + 1)!t( )
a i (J +1)!t( ) = a ip (J + 1)!t( ) +c2!a i (J + 1)!t( )
b i (J + 1)!t( ) = b ip (J +1)!t( ) +c3!a i (J + 1)!t( )
(MD10)
The coefficients c0 ,c1,c 2 and c3 are 'suitably' chosen such as to assure stability and
fast convergence. This is again achieved through experience when using this
algorithm.
What is the best algorithm?This cannot be decided generally since it depends on the problem. The following are
the general rules when choosing an algorithm.
1) Calculation must be fast and require as little memory as possible.
2) The time step !t should be as long as possible but the solution must remainstable. This means: Solution follows the classical trajectory along which
the energy and momentum are conserved- the procedure is thus stable.
3) Must be time reversible.
AVERAGE VALUES OF PHYSICAL QUANTITIES
When comparing MD calculations with experiments or other calculations the physical
quantities measured always correspond to values averaged over a long enough period
of time. Computation of average values of physical quantities is done by continuing
the MD relaxation along the trajectory of the system in the phase space, i. e. space of
positions and velocities of particles, for a sufficiently long time. The time average of
a quantity A is then generally defined as
A = lim(! " #)1
!A(t)
0
!
$ dt (MD11.1)
and in molecular dynamics calculations this corresponds to
7/26/2019 8. Molecular Dynamics
7/26
7
A =1
M A(J
J=1
M
! "t) (MD11.2)
where M is the total number of MD steps (after equilibration!)and !t the time step;
this means ! =M"t. This formula is exact only when M!" but in practice large
values of M are used. However, how many MD steps are needed to obtain theaverage value with a sufficient precision cannot be easily decided and most
commonly, it is again done by testing for several different lengths of time M!t .
Connection with Statistical Mechanics - Ergodic Theorem
In order to make a link with statistical mechanics we consider that the accessible
space for the system studied is the 3N dimensional space defined by the 3N
dimensional vector X = (r1,r2,....,r
N) , where r
1,r2,....,r
Nare the position vectors of the
particles. This vector describes possible spatial configuration of the system studied.Similarly, accessible velocities of all the particles are described by the 3N
dimensional vector !X = (!r1,!r2,....,!r
N) . The energy of the system (kinetic plus
potential) is H(X,!X) and depends, in general, on both positions and velocities of
particles. Positions and velocities !X define a 6N dimensional space, called the
phase spaceof the system studied, and we denote vectors in this space Q ! (X, !X) .
If ) is the distribution function1 in the phase space, i. e. the probability that the
particles are in the phase space at a point defined by the vector Q! (X, !X) , then the
average value of a physical quantity A, evaluated within the statistical physics
approach, is
A =Z!1
A(Q)F(Q)dQ
Phase space
" (MD12.1)
where
Z = F(Q)dQPhasespace
! (MD12.2)
is the so called partition function; the integration extends over the whole phase
space and dQ = dXd!X .
The ergodic theorem of the statistical mechanics links the averages over time with
averages over statistical ensembles. It states that for !" #
1 The distribution function is defined by the physics of the problem studied. An example of the
distribution function is the Boltzmann distribution exp(!H / k BT), where T is the temperature
and kB
the Boltzmann constant.
7/26/2019 8. Molecular Dynamics
8/26
8
A = A (MD13)
This means that the average over time is the same as the average over the phase space
with appropriate distribution function. When evaluating average quantities it is
always assumed that #=M!t
is 'long enough' so that (MD13) is valid. Averagequantities of interest in MD simulations are the average energy (preserved in the
microcanonical case), average kinetic and potential energies, average stresses and
pressure and any other physical quantity one may be investigating. The instantaneous
values of some of these quantities have been defined in the Chapter General aspects
of atomistic computer modeling.
Temperature
The kinetic energy of the system determines its temperature whenv
ii!
= 0.
Following the equipartition theorem, the average kinetic energy of a three
dimensional system of particles with no internal degrees of freedom is
1
2m i v i
2
i=1
N
! =3
2NkBT , (MD14)
where N is the total number of particles in the system, mi the mass of the particle i
andv
i
2
the average of the square of the velocity of this particle. In general, if there
are !degrees of freedom per particle Kinetic energy =!
2NkBT . (See derivation in
the Appendix). The situation when !> 3 may arise, for example, when considering
molecules with internal rotational and vibrational degrees of freedom. For a two-
dimensional system of particles with no internal degrees of freedom != 2.
Use of MD for structural studies not involving temperature:Molecular statics calculations using MD
The energy of the system studied, that is composed of the kinetic and potential
energy, is for the microcanonical case fixed by the starting conditions that are not
necessarily physically meaningful. Since it does not change during the relaxation
process this value of the energy is imposed on the system. If the goal is to find a
minimum potential energystructure as in molecular statics calculations, we need to
7/26/2019 8. Molecular Dynamics
9/26
9
deal with the situation corresponding to 0K when all the velocities are zero. This canbe achieved using MD by decreasing the velocities and thus the kinetic energy
gradually to zero in the following way.
We first carry out MD simulation for a number of steps until the thermodynamic
equilibrium has been attained. At this point the temperature is finite but arbitrary.
We then set the velocities to zero and continue the MD simulations. The velocitiesagain become finite. After some equilibration we again set the velocities to zero and
continue the MD simulations. This procedure is repeated until the desired precision
of zero velocities is attained. At this point the potential energy is minimized.
MOLECULAR DYNAMICS AT CONSTANT
TEMPERATURE
Quantities conserved: Temperature, T, total number of particles, N, and total
volume, V. In statistical mechanics this corresponds to the canonical ensemble
(N,V,T).
In order to achieve a constant temperature the system studied has to be conceptually
coupled to a heat bath that introduces energy variations needed to keep the
temperature fixed. The energy of the system alone is thus not conserved.
In order to keep a fixed temperature, T, in an MD calculation we must keep the
kinetic energy of the system fixed. For the case of particles with three degrees of
freedom we must achieve that
1
2Nm
i < v
i
2
i=1
N
! >=3
2kBT (MD15)
Scaling of velocities: isokinetic MD
Starting with an unrelaxed configuration, the potential energy first decreases and if
the energy is preserved the kinetic energy increases and, consequently, also the
temperature. This increase must be compensated by the removal of the kinetic
energy, leading to a decrease of the total energy.
The simplest procedure that preserves the kinetic energy involves scaling of
velocities and proceeds as follows.
MD calculation is carried out at constant temperature (microcanonical ensemble) for
a sufficient number of steps, until a thermodynamic equilibrium has been attained
7/26/2019 8. Molecular Dynamics
10/26
10
(within the precision required). We then evaluate the average kinetic energy
1
2m
i < v
i
2>
i=1
N
! and scale velocities (in the three-dimensional case) by the factor
!=
3NkBT
mi< v
i
2>
i=1
N
"
#
$
%%
%%%
&
'
((
(((
1/2
(MD16)
where T is the desired temperature. This scaling restores the chosen temperature T.The MD calculation is then restarted with velocities the magnitudes of which are
vi
new= ! "v
i
old and carried out again for a sufficient number of steps. We then repeat
the above procedure iteratively until the desired temperature is attained with required
precision, i. e. when ! " 1.
Warning: The adjustment of velocities must always be done after sufficientnumber of iterations, as close as possible to the equilibrium. If the adjustment
were done too frequently equations of motion would not be really solved.
This is the simplest approach that can be employed. More sophisticated schemes, so
called thermostats, have been developed for keeping the temperature constant
during MD simulations. Examples are Andersen thermostat and Nos-Hoover
thermostat in which the exchange of heat with a bath is explicitly included (see, for
example, Frenkel and Smit: Understanding Molecular Simulation, Academic Press,
1996). In thermostats the constant temperature of the studied system is attained via a
suitable choice of boundary conditions.
MD CALCULATIONS AT CONSTANT PRESSURE
Quantities conserved: Temperature, T, total number of particles, N, and pressure p.
This is a canonical isothermal-isobaric ensemble(N, p, T).
To keep a constant temperature, T, the kinetic energy has to be adjusted duringcalculations in the same way as described above, or using one of the thermostats.
However, in order to preserve the total pressure the volume of the system, V, must be
allowed to vary. To allow for the volume variation during MD calculations the
simplest approach is the following:
First we carry out calculation without any volume adjustment until the
thermodynamic equilibrium has been attained. If the boundaries are free the volume
7/26/2019 8. Molecular Dynamics
11/26
11
probably changed although not necessarily such that the hydrostatic pressure is zero.
If periodic boundary conditions are applied the volume, of course, remains the same.
When in equilibrium we evaluate the total hydrostatic pressure of the system:
p= pi
i=1
N
! , where pi is given by equation (G34) or (G36) when employing a pair
potential. If the pressure is positive we increase the volume and if negative we
decrease the volume. The variation of the volume can be done by appropriately
scaling the coordinatesof all the particles. We then carry out MD calculations at the
new volume and repeat the process of volume adjustment after reaching a new
equilibrium. This procedure is repeated iteratively until the hydrostatic pressure is
the imposed pressure (commonly zero) within a required precision.
However, a more sophisticated method in which the volume change is an integral part
of the MD calculations has been proposed by Andersen (H. C. Andersen, J. Chem.
Phys. 72, 2384, 1980). In this method, applicable for both periodic boundary
conditions and the block with free surfaces, we regard the volume V as a newdynamical variable and the block of atoms is allowed to expand and/or shrinkautomatically during the calculation. Since V is now a dynamical variable we have to
introduce an additional equation of motion for the volume V. For this purpose we
formally associate an 'effective mass', M, with the volume V and define, again
formally, its kinetic energy as
1
2M
dV
dt
!"
# $%
&2
(MD17)
The potential energy of the block associated with the volume V is
(p e! p)V (MD18)
where pe is the imposed external pressure (usually zero) and p= p ii=1
N
! is the current
pressure evaluated as summation of pressures at positions of individual particles,
given by equation (G34). Note that the dimension of the 'effective mass' M is not the
usual dimension of the mass and thus it is only a formally introduced quantity and thefinal result must not depend on M.
As the volume changes the distances between the particles change. In particular, the
volume V and positions rican be linked such that any length will scale with L = V
1/3
(in three dimensions, in two dimensions, when the volume is really area, L = V1/2
).
Hence, we introduce new scaled, dimensionless, position vectors
7/26/2019 8. Molecular Dynamics
12/26
12
i = r
i/ L (MD19)
Andersen proposed the following Lagrangian in order to generate equations of
motion foriand V
=
1
2m
i L
d
i
dt
"
#$%
&'
2
i=1
N
( )Ep (L1,L 2 ,...,LN ,V)+1
2M
dV
dt
"#$
%&'
2
)(pe) p)V (MD20)
First two terms are, of course, just the kinetic and potential energy of the system of
particles. The last two terms have the same form and correspond to kinetic and
potential energy associated with the volume. Following the standard Lagrangian
method2the equations of motion (in the vectorial form) are
d L2mi
di
dt
"
#$%
&'(
)**
+
,--
dt=.grad
i
Ep =LF
i (MD21)
where i = 1,2, .., N and Fi is the force acting on atom i given as !grad
i
Ep
. After
differentiation and use of the relationship L=V1/3
, equations of motion for the
particles are
d2
i
dt2
=
Fi
m iV1/3
" 2
3V
d
i
dt
#
$%
&
'(
dV
dt
(MD22)
Using the Lagrangian (MD20) the equation of motion for the volume V is
Md 2V
dt 2=p !p e (MD23)
where p is the instantaneous pressure equal to pi
i=1
N
! , where pi are the atomic level
pressures given by equation (G34).
2 In the Lagrangian mechanics the Lagrangian isL
(1
!
1
! ) E kin
#Epot and it is a
function of generalized coordinatesiand generalized velocities ! . 3N equations of motion for
the generalized coordinatesiof the corresponding system of N particles are then
d
dt
!
!"i
#
$%&
'()* !
!"i
# = 0
7/26/2019 8. Molecular Dynamics
13/26
13
Equations of motion (MD22) and (MD23) are then solved for bothiand V using a
molecular dynamics algorithm. For example, when employing the Verlet algorithm
with velocities, we regard the right sides of equations of motion as generalized forces
and obtain according to (MD5)
!i (J + 1)"t( ) =! i J"t( ) +"t !!i J"t( )+ "t( )
2
2miV1/ 3 J"t( )
Fi J"t( )
#1
3"t( )
2!!
i J"t( )
!V J"t( )V J"t( )
V (J +1)"t( ) =V J"t( ) +"t!V J"t( ) +"t( )
2
2Mp J"t( )#pe( )
(MD24)
The corresponding rates !
i and !V are then calculated analogously, following
equation (MD6), as
!
ii ( J + 1)"t( ) 1+
"t
3
!V (J +1)"t( )V (J +1)"t( )
#
$
%%
&
'
((=
"t
2
Fi (J +1)"t( )
miV1/3 (J + 1)"t( )
+
Fi J"t( )
miV1/3 J"t( )
#
$
%%
&
'
((
+!
ii J"t( ) 1)
"t
3
!V J"t( )V J"t( )
#
$
%%
&
'
((
!V (J + 1)"t( ) = !V J"t( ) +"t
2M
p (J + 1)"t( )+p J"t( ))2pe#$ &'
(MD25)
However, when calculating the pressure p (J +1)!t( ) that enters the equation for !V ,
we need to know the velocities in J+1 iteration, i. e. !
i(J + 1)"t( ) . Yet, according to
(MD25) this can only be done if !V (J +1)!t( ) is already known. In order to resolvethis inconsistency we introduce approximate velocities
!!i
(J +1)#t( ) =
i(J + 1)#t( ) $
iJ#t( )
#t (MD26)
and evaluate the pressure p (J +1)!t( ) using these velocities.
There is no rigorously defined criterion for the choice of the effective mass of the
block, M, and it has to be determined by trial and error. To keep the impact of the
choice of M insignificant this must be as small as possible. The usual procedure is to
change M during calculation so that it becomes smaller and smaller. When V
7/26/2019 8. Molecular Dynamics
14/26
14
converges to the value for which p = pethen !V! 0 and all the terms containing M inthe above equations converge to zero.
MD CALCULATIONS AT CONSTANT STRESS TENSOR
(Parrinello-Rahman algorithm)
Quantities conserved:Temperature, T,total number of particles, N, and the average
stress tensor, !"# , that includes both hydrostatic and shear components. This is a
canonical isothermal-isostress ensemble (N, !"# , T)
The procedure employed is a generalization of the previous case of constant pressure.
First we regard the block of particles as a parallelepiped (not cube) defined by three
vectors a !($=1, 2, 3) that are represented by the 3x3 matrix with elements a !"
, as
shown in Fig. 2. The volume of this block is ! = a1 " (a 2 # a3 ) . We then introduce a
scaling of the position vectors of the particles, ri , by defining them as linear
combinations of vectors a !
ri = a!
!=1
3
" i! ri$ = a!$#i!!=1
3
"%
&'(
)*and in the matrix form r
i = h
i (MD27)
where his the matrix with elements a!
" . This introduces the scaled vectors of particle
positionsiwith components ! i
". Since we want to achieve that the cell varies in
. . .
a a
Fig. 2. Parallelepiped defined by three vectors a !($=1, 2, 3).
7/26/2019 8. Molecular Dynamics
15/26
15
time during the MD calculation we regard the vectors a !, or alternatively the matrix
h , as dynamical variables and we have to introduce additional equations of motion
for them. This is attained by using the following Lagrangian proposed by Parrinello
and Rahman (Phys. Rev. Lett. 45, 2384, 1980; J. Appl. Phys. 52, 7158, 1981)
=
1
2
mi
!
i
TG
!
i( )i=1
N
" #Ep (r1,r2,...,rN ,V)+1
2
MTr( !hT !h) (MD28)
where the letter T denotes the transpose of a matrix. M is again a formally defined
'effective mass of the block'; in this formulation it actually has dimensions of the
mass.
The corresponding generalized equations of motion, which can again be solved using
one of the molecular dynamics algorithms, are
m i
d h!
i( )dt
=
Fi"
mi h
T
( )"1
!
h
T
h
!
i (MD29)
M!!h = # (MD30)
The instantaneous stress tensor = i
i=1
N
" , where i are the atomic level stresses
given by equation (G33). The matrix = (a2" a
3,a
3" a
1,a
1" a
2) describes the size
and orientation of the cell faces.
If only pressure is considered then the cell can be taken as cubic and a !"= L#!" so
that h = LI , where Iis the unit matrix, and. hTh=L2I . Taking L3= V and inserting
these quantities into equation (MD29) yields equation (MD22). However, equation
(MD30) does not lead to (MD23) since the dynamical variables and the effective
mass describing the cell have been defined differently.
7/26/2019 8. Molecular Dynamics
16/26
16
PHYSICAL INTERPRETATION OF MD CALCULATIONS
USING CONCEPTS OF STATISTICAL MECHANICS
The analyses of the atomic structures found in MD simulations can be carried out
using the same methods as those described in the section on General aspects of
computer modeling. This means we can employ various graphical methods, radial
distribution function, Voronoi polyhedra, atomic level stresses. All these quantitiesare now time dependent and therefore always their time averages have to be
evaluated. However, while MD calculations represent time variation of the system
studied, because of the ergodic theorem many quantities commonly used in the
statistical mechanics can be determined and used in calculations of physical
properties of the system
Fluctuations
In the thermodynamic equilibrium the fluctuation of a physical quantity A is defined
as the root mean square (RMS) deviation
A2! A
2
(MD31)
Fig. 3. Schematic picture of fluctuations of a quantity A
time
A
Fluctuations
7/26/2019 8. Molecular Dynamics
17/26
17
Following (MD11) and using the ergodic theorem
A = lim !"#( )1
! A
2(t)0
!
$ dt =1
M A
2(J%t)J=1
M
& (MD32)
where !t is the time step,Mthe total number of MD steps and #the total time of theMD run (after equilibration). A is given by equation (11.2).
Physical quantities obtainable from fluctuations
Specific heat at constant volume:CV =!E!T
"#$
%&'V
.
E is the energy of the system and it is identical with the Hamiltonian given byequation (G2), i. e. it includes both the kinetic and potential energy. It follows fromthe theory of fluctuations and statistical mechanics that CV is related to the
fluctuation of the energy3
CV =E2! E
2
kBT2
(MD33)
3If the distribution function f(Q) in (MD12) is the Boltzmann distribution then the average value of
the energy of the corresponding system is
E =E exp !E k
BT( )dQ"
exp !E kBT( )dQ"
where the integration is over the whole phase space of the system. Differentiation of E with
respect to the temperature T yields
! E!T
"#$
%&'
V
=1
kB
T2
E2
exp (E kBT( )dQ)exp (E k
BT( )dQ)
( Eexp (E kBT( )dQ)exp (E k
BT( )dQ)
"#$ %
&'
2
*+,,
-.//
which corresponds to
! E
!T
#$
&'V
=
1
kBT
2E
2 ( E 2[ ]
7/26/2019 8. Molecular Dynamics
18/26
18
When evaluating CV using the fluctuations of energythe corresponding MD
calculation must be done at constant temperature, number of particles and, of
course, volume. Thus (MD33) cannot be used when the calculation is done for
microcanonical ensemble when the energy of the system is fixed but temperature
changes. Similarly it cannot be used when the volume is allowed to change, for
example, when dealing with an isolated cluster with free surfaces.
Specific heat at constant pressure:C p =!H!T
"#$
%&'p
.
H=E + pV is the enthalpy of the system and C pis related to its fluctuations
C p =H2 ! H
2
kBT 2
(MD34)
When evaluating C p using the fluctuations of enthalpythe corresponding MD
calculation must be done at constant temperature, pressure and number of
particles.
Importantly, both CV and Cp can be evaluated according to their definitions,
CV =!E!T
"#$
%&'V
and C p =!H!T
"#$
%&'p
if we determine by a molecular dynamics calculation
that employs the microcanonical ensemble the temperature dependence of the energy,
E, or the enthalpy, H, respectively. These quantities can then be differentiated withrespect to the temperature. These calculations have to be done at constant volume
when evaluating CV and at constant pressure when evaluating Cp. In the latter case,
if p = 0 the enthalpy is equal to the energy E.
Isothermal compressibility:!T ="1
V
#V#p
$%&
'()T
is related to the fluctuations of the volume, V
!T =V
2 " V 2
V k B T (MD35)
When evaluating !T
using the fluctuations of volume
the corresponding MD
calculation must be done at constant temperature, pressure and number of
particles.
7/26/2019 8. Molecular Dynamics
19/26
19
Time-Independent Correlations Cross Correlations of fluctuations
If the deviation of a quantity A from its average value is !A = A" A then the time
independent correlation between two quantities A and B is defined as
!A!B = A" A
( ) B " B
( )= AB " A B
(MD36)
Obviously, if A and B are independent quantities then AB = A B and
!A!B = 0. Following (MD11.2)
!A!B =1
MA(J!t)B(J!t)
J=1
M
" # 1M
A(J!t)J=1
M
"$%&'()
1
MB(J!t)
J=1
M
"$%&'()
(MD37)
where Mis the total number of MD steps and !t the time step.
Physical quantities obtainable from time-independent correlations
The thermal pressure coefficient: !V ="p"T
#$%
&'(V
is determined by the time-independentcorrelation between the potential energy, E p ,
and the pressure, p, using the relation
!E p!p = k BT2"V # $kB( ) (MD38)
where ! = N V is the density (J. S. Rowlinson: Liquids and liquid mixtures,
Butterworth: London, 1969). When evaluating !V using this correlation relationthecorresponding MD calculation must be done at constant volume, temperature and
number of particles.
Isobaric thermal expansion coefficient: !p =1
V
"V"T
#$%
&'(p
is determined by the time-independent correlation between the volume, V, and the
enthalpy, H
!V!H = kBT2V"p (MD39)
When evaluating !p using this correlation relationthe corresponding MD calculation
must be done at constant pressure, temperature and number of particles.
It should be noted that !T, the isothermal compressibility given by (MD35),
!Vand "
pobey the following relationship: !p ="T#V
7/26/2019 8. Molecular Dynamics
20/26
20
Tensor of elastic moduli
The tensor of elastic moduli C!"#$ relates the applied stress, !"#a
, and the induced
strain, !"#a
, in a linearly elastic material, i. e the Hooke's law !"#a=
C"#$%& $%a
$,%=1
3
' applies. This tensor may be determined from the time-independent correlation of the
stress tensor components
C!"#$ =%
k BT&'!"&' #$ (MD40.1)
where the stress tensor !"# is given by (G15). Since in equilibrium !"# = 0
C!"#$ =%
k BT&!"& #$ (MD40.2)
This relationship can then be used to determine the temperature dependence of elastic
moduli in an MD calculation. However, such calculation requires extremely long
MD runs that are often unattainable.
Time Dependent Correlations
Definition of correlations
Let A(t) and B(t) be two physical quantities of the system studied, i. e. quantities
averaged over all N particles constituting the system. These quantities generally vary
with time. The question asked is whether there is any relation between the value of
the quantity A at a time t1 and the value of the quamtity B at another time t2.
Mathematically, this is expressed by the time dependent correlation function defined
as
B(t2)A(t
1) =lim ! " #( )
1
! A(t
1+ $t )B(t
2+ $t )d $t
0
!
% (MD41)
In the thermodynamic equilibrium, the correlation may depend only on the differenceof the times: t2! t 1. Therefore, setting t1= 0 and writing t instead of t2, the time-
dependent correlation function is
B(t)A(0) =lim ! " #( )1
! A( $t )B(t + $t )d $t0
!
% (MD42.1)
7/26/2019 8. Molecular Dynamics
21/26
21
and in the framework of MD calculations
B(t)A(0) =1
MA(J!t)B(t +J!t)
J=1
M
" (MD42.2)
where M is the number of steps of the MD calculation. The short time limit of the
correlation function is:
lim(t!0) B(t)A(0)[ ] = A"B (MD43.1)
Since for t!" A and B cannot be correlated because the events are very far from
each other in time, the long time limit of the correlation function is:
lim(t ! ") B(t)A(0)[ ] = A # B (MD43.2)
Hence, if the correlation function approaches the product A ! B at a time t, it
means that no correlation exists at this time.
Autocorrelations
The autocorrelation function is a special case of time-dependent correlation function
when we set A = B
A(t)A(0) =lim ! " #( )1
! A(t + t')A(t' )dt'0
!
$ (MD44.1)
and in the framework of MD calculations
A(t)A(0) =1
MA(t + J!t)A(J! t)
J=1
M
" (MD44.2)
The physical meaning of the autocorrelation is that we ask how long the system
remembers that a quantity A had some value at a given time. The short time limit
of the autocorrelation functions is:
lim(t! 0) A(t)A(0) = A2
(MD45.1)
Obviously, as t! 0 the memory is completely preserved and there is a complete
correlation between the value at t = 0 and very short time after. On the other hand,
the correlation and thus the memory are completely lost at long times when t ! " .
The long time limit of the autocorrelation functions is
7/26/2019 8. Molecular Dynamics
22/26
22
lim(t ! ") A(t)A(0) = A 2
(MD45.2)
The autocorrelation function A(t)A(0) therefore varies between these two extreme
values and practically reaches A 2
after the correlationor relaxation timedefined as
!cor =2
A(t)A(0) " A 2( )dt
0
#
$
A2 " A
2 (MD46)
The reason for this definition is explained in Fig. 4, where the autocorrelation
function is shown schematically as a function of time. We define the correlation
time, !cor
, as a time when the autocorrelation function approaches closely A 2
. In
this case the area of the right-angled triangle marked by bold lines,
12
A2
! A2
( )"cor , is very close to that delineated by the autocorrelation functionand the two sides of the same triangle. This area is given by the integral
A(t)A(0) ! A2
( )dt0
"cor
# .
Since we assume that for time !cor
the autocorrelation function is very close to A 2
,
this integral is practically equal to A(t)A(0) ! A 2( )dt
0
"
# . Equating this integral to
the area of the right-angled triangle marked by bold lines, leads to the formula
(MD46) for the correlation time.
Autocorrelation
A
2
A2
Time
cor
Fig. 4. Schematic behavior of the autocorrelation function and evaluation of the
relaxation (correlation) time.
7/26/2019 8. Molecular Dynamics
23/26
23
Physical quantities obtainable from autocorrelations
In general, the time integrals of autocorrelation functions are related to mobility
coefficients defined as follows.
Let be a time dependent physical quantity (e. g. velocity, stress, flux etc.) with the
average value . Any local deviation, i. e. fluctuation, away from will tend to
dissipate towards the average value and in the linear approximation the rate of the
dissipation will be proportional to the magnitude of this deviation. Such dissipation
process will be described by the equation (Langevin equation)
d( " )
dtdissipation
=" #( " ) (MD47)
where & is the linear dissipation coefficient associated with the physical quantity .The term !"( ! ) represents the frictional force that opposes the change of . If
dissipates from some value
then it follows by integrating equation (MD47) that
the dissipation process decays exponentially and thus
= ( " )exp("#t) + (MD48)
The mobility related with this dissipation process is then defined as ! = 1/" and
according to the Green-Kubo equation it is determined by the time integral of the
autocorrelation of as follows4
! =1
2( t) (0) dt
0
"
# (MD49)
If (t ) =d(t) dt then the corresponding 'Einstein relation' is associated with
(MD49) that follows by integration by parts
! =
1
2
1
2lim " # $( )
1
"B(") % B(0)( )
2
(MD50)
In practice, #must be much larger than the correlation time for in order to evaluate
!
with sufficient precision.
According to the fluctuation-dissipation theorem the dissipation coefficient, &,
determining the rate of dissipation of fluctuations also determines, in the linear
4M. S. Green, J. Chem. Phys. 22, 398, 1954; R. Kubo, J. Phys. Soc. Japan 12, 570, 1957; Rep.
Prog. Phys. 29, 255, 1966; R. Kubo, M. Toda and N. Hashitsume, Statistical Physics II, Springer:Berlin, 1985).
7/26/2019 8. Molecular Dynamics
24/26
24
approximation, the dissipation rate if the deviation away from is induced by some
external action.
Self-diffusion coefficient
As first shown by Einstein when studying the Brownian motion, the self-diffusioncoefficient, D, is related to the mobility,
v, associated with the velocity of the
particles, according to the relation D = vkBT / m, where m is the mass of the
particles. Hence, if we identify with the vector of the velocity, v,then
v =
1
v2v! (t)v! (0)
!=1
3
"0
#
$ dt (MD51.1)
and the self-diffusion coefficient is
D = kBTv2 m
v! (t)v! (0)!=1
3
"0
#
$ dt = 13 v! (t)v! (0)!=13
"0
#
$ dt = 13 v(t )iv(0) dt0
#
$ (MD51.2)
since according to the equipartition theorem v2= 3k BT /m . Furthermore, the
relation (MD50) gives
D =lim ! " #( ) 1
6!r(!) $ r(0)[ ]
2 (MD52)
where r is the position vector. In practical calculations !must be much larger than
the correlation time for r .
Tensor of viscosity
In a linearly viscous material the tensor of viscosity,!"#$% , relates linearly the applied
stress,!"#a
,and induced strain rate, !"# ,according to the relation !"#a
= $"#%& '%&%,&=1
3
( .
This tensor is determined by the integral of the time dependent autocorrelation of the
stress tensor components
!"#$% = &o
kBT'"# (t)' $% (0)
0
(
) dt (MD53)
where the stress tensor !"# is given by equation (G15); !o is the average volume per
particle.
7/26/2019 8. Molecular Dynamics
25/26
25
In liquids, which are by definition isotropic, there are only two components of the
viscosity:
(i) The shear viscosity determined by the autocorrelation of shear stresses:
!s ="
o
kBT#$%(t )#$%(0)
0
&
' dt (MD54.1)
where !"# (! " # ) is a shear component of the stress tensor given by (G15).
(ii) The bulk viscosity determined by the autocorrelation of the hydrostatic
pressure:
!V ="okBT
p(t)p(0)0
#
$ dt . (MD54.2)
where p is 1/3Trace of the stress tensor.
Additional literature
D. Chandler: Introduction to Modern Statistical Mechanics, 1987, Oxford: Oxford
University Press.
M. P. Allen and D. J. Tildesley: Computer Simulation of Liquids, 1987, Oxford:
Oxford University Press.
J. P. Boon and S. Yip: Molecular Hydrodynamics, 1980, New York: McGraw-Hill;
also Dover Publications, 1991.
D. Frenkel and B. Smit: Understanding Molecular Simulations, Academic Press, New
York, 1996.
7/26/2019 8. Molecular Dynamics
26/26
APPENDIX - EQUIPARTITION THEOREM
The kinetic energy per degree of freedom is Ekin
df=
1
2mv2 and when the Boltzmann distribution
applies then the average kinetic energy per degree of freedom is
Ekin
df=
12mv
2exp !mv2 2kBT"
#$%&'dv
0
(
)
exp !mv2 2kBT"
#$%&'dv
0
(
) where kBis the Boltzmann constant.
We make the following substitution
mv2 2kBT= x2 ! v = x 2k
BT m
and thus
Ekin
df= k
BT
x2exp !x2"#
$%dx
0
&
'
exp !x2"#
$%dx
0
&
'
x2exp!x2"#$
%
&'dx
0
(
) = x xexp !x2"
#$
%
&'
*+,
-./dx
0
(
) = !x
exp !x2"#$
%&'
20
(
+1
2 exp!x2"
#$
%
&'dx
0
(
)
when integrating by parts.
Hence the average kinetic energy per degree of freedom is
Ekin
df=
kBT
2.
When there are N particles each with ! degrees of freedom then the average kinetic energy of the
assembly of these N particles is
E=N!k
BT
2
This is the equipartition theorem that represents for the system of N particles the definition of the
temperature