Vous êtes sur la page 1sur 26

MOLECULAR DYNAMICS

Molecular dynamics (MD) calculations are dynamic studies of many-body systems in


which 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 nonequilibrium state to a final equilibrium state, investigation of the changes of the
system 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 conditions
The initial construction of the block of particles proceeds as described in the section
dealing with General Aspects of computer modeling. Non-periodic, periodic or semiperiodic boundary conditions can be used.
Initialization
Assignment of initial conditions for the equations of motion.
This may be done in two different ways:

(i)

Coordinates and velocities of the particles are given at the beginning, chosen as
time = 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 starting
configuration 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 particle
coordinates 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 time
step used in the numerical integration of equations of motion, is crucial. The most
appropriate choice of t is such that it assures the stability of the solution and at the
same 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 i , where v i is the velocity of
i

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

d 2 ri!
!
mi
2 = Fi
dt

(! = 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,
2

Energy

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.

Total energy
Potential energy
Kinetic energy

Time
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 volume are 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 method
for numerical evaluation of the second derivative, equation (MD1) can be written as
2

( )!

d ri t
dt 2

("t )

1
$ ri t + "t # 2ri t + ri t # "t & =
%
' m Fi t
i

()

and therefore

ri ( t + !t ) = 2ri ( t ) " ri (t " !t ) +

( !t )2

()

(MD2)

(MD3.1)
F (t )
mi i
This is the basic recursion formula for the MD simulation, which then proceeds as
follows:
3

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 = Jt. as

( ) (

ri (J + 1)!t = 2ri J!t " ri (J " 1)!t

( !t)
+

mi

()

Fi 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:

()

()

()

()

ri t + !t = ri t + v i t

( !t)
!t +

2m i

()

Fi t

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 , we

( )

evaluate the force acting on each particle, Fi (J!t ) . Positions ri ((J + 1)!t ) at the time
step J+1 are then evaluated as

( !t ) F ( J !t )
ri ((J + 1)!t ) = ri ( J !t ) + v i ( J !t ) !t +
2m i
2

(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).

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


and using equation (MD4) we obtain

( )

( )

2ri (J +1)!t = 2ri J!t + 2!tv i J!t

( !t )
+

( !t)
+
mi

mi

()

Fi t

()

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 predicted values of the
p
p
p
positions of the particles, ri , velocities, vi , and accelerations, a i in the J+1 time
step as

1 2
1
!t a i ( J!t) + !t 3 b i ( J!t )
2
6
1
v pi ((J + 1)!t ) = v i ( J!t) + !ta i (J!t ) + !t 2 b i (J!t )
2
p
a i ((J + 1)!t ) = a i ( J!t) + !tb i ( J!t)
rip ((J + 1)!t ) = ri ( J!t) + !tv i ( J!t ) +

(MD7.1)

where ri , vi and a i are the positions, velocities and accelerations in the step J; b i is
the time derivative of the acceleration in the step J. In the predictor step we take

b i ((J + 1)!t ) = b i ( J!t )


p

(MD7.2)

Equation of motion is now introduced by evaluating the accelerations in accordance


with the forces:
1
(MD8)
a i ( J!t) =
F (J!t )
mi i
Hence, the 'correct' acceleration at the step J+1 can be evaluated using (MD8) as
a i (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 i ((J + 1)!t )


p

(MD9)

The corrector step is then introduced that determines the values of ri , v i ,a i and b i in
the step (J+1) as follows:

ri ( (J + 1)!t ) = rip ((J + 1)!t ) + c 0 !a i ((J + 1)!t )


v i ( (J + 1)!t ) = v pi ((J + 1)!t ) + c1 !a i ((J + 1)!t )

(MD10)

a i ( (J + 1)!t ) = a pi ((J + 1)!t ) + c 2 !a i ((J + 1)!t )


b i ((J + 1)!t ) = b pi ((J + 1)!t ) + c 3 !a i ((J + 1)!t )

The coefficients c 0 ,c1 ,c 2 and c 3 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)
2)
3)

Calculation must be fast and require as little memory as possible.


The time step t should be as long as possible but the solution must remain
stable. This means: Solution follows the classical trajectory along which
the energy and momentum are conserved - the procedure is thus stable.
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

1!
A = lim(! " #) $ A(t)dt
!0
and in molecular dynamics calculations this corresponds to
6

(MD11.1)

A=

1 M
A(J"t)
M!
J=1

(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 the
average 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 ,....,rN ) , where r1 , r2 ,...., rN are 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
! = (r! ,r! ,....,r! ) . The energy of the system (kinetic plus
dimensional vector X
1 2
N
! and depends, in general, on both positions and velocities of
potential) is H(X, X)
! define a 6N dimensional space, called the
particles. Positions X and velocities X
! .
phase space of the system studied, and we denote vectors in this space Q ! (X, X)
If F(Q) is the distribution function1 in the phase space, i. e. the probability that the
! , then the
particles are in the phase space at a point defined by the vector Q ! (X, X)
average value of a physical quantity A, evaluated within the statistical physics
approach, is

A =Z

!1

"

A(Q)F(Q)dQ

(MD12.1)

F(Q)dQ

(MD12.2)

Phase space

where

Z=

Phase space

is the so called partition function; the integration extends over the whole phase
!.
space and dQ = dX dX
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 B T) , where T is the temperature
and k B the Boltzmann constant.
7

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. Average
quantities 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 when

!v

= 0.

Following the equipartition theorem, the average kinetic energy of a three


dimensional system of particles with no internal degrees of freedom is

1 N
3
m i v 2i = Nk B T ,
!
2 i=1
2

(MD14)

where N is the total number of particles in the system, mi the mass of the particle i
2
and v i the average of the square of the velocity of this particle. In general, if there
!
are ! degrees of freedom per particle Kinetic energy = Nk B T . (See derivation in
2
the Appendix). The situation when ! > 3 may arise, for example, when considering
molecules with internal rotational and vibrational degrees of freedom. For a twodimensional 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 energy structure as in molecular statics calculations, we need to
8

deal with the situation corresponding to 0K when all the velocities are zero. This can
be 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 velocities
again 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 N
3
2
(MD15)
m i < v i >= k B T
!
2N i=1
2
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
9

(within the precision required). We then evaluate the average kinetic energy
1 N
2
mi < v i > and scale velocities (in the three-dimensional case) by the factor
!
2 i=1
1/ 2

#
&
%
(
3Nk BT (
%
!=% N
(
% m i < v 2i > (
%$ i=1
'(

"

(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
v inew = ! " v old
and carried out again for a sufficient number of steps. We then repeat
i
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 sufficient
number 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 during
calculations 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
10

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=

!p

, where pi is given by equation (G34) or (G36) when employing a pair

i=1

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 coordinates of 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 new
dynamical variable and the block of atoms is allowed to expand and/or shrink
automatically 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 ! dV $ 2
M# &
2 " dt %

(MD17)

The potential energy of the block associated with the volume V is

(p e ! p)V

(MD18)
N

where p e is the imposed external pressure (usually zero) and p = ! p i is the current
i=1

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 the
final result must not depend on M.
As the volume changes the distances between the particles change. In particular, the
volume V and positions ri can be linked such that any length will scale with L = V1/3
(in three dimensions, in two dimensions, when the volume is really area, L = V1/2 ).
Hence, we introduce new scaled, dimensionless, position vectors
11

! i = ri / L

(MD19)

Andersen proposed the following Lagrangian in order to generate equations of


motion for ! i and V
2

" d! %
1 N
1 " dV %
L = ( m i $ L i ' ) E p (L!1 , L! 2 ,...,L! N , V) + M $
) (pe ) p)V (MD20)
2 i=1 # dt &
2 # dt '&
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
method2 the equations of motion (in the vectorial form) are

(
" d! % +
d * L2 m i $ i ' # dt & -,
*)
= .grad! E p = LFi
(MD21)
i
dt
where i = 1,2, .., N and Fi is the force acting on atom i given as !grad" E p . After
i
1/3

differentiation and use of the relationship L= V , equations of motion for the


particles are
d2!i
Fi
2 # d! i & dV
=
"
(MD22)
%
(
dt2
m i V 1/3 3V $ dt ' dt
Using the Lagrangian (MD20) the equation of motion for the volume V is

d 2V
M 2 = p ! pe
dt
N

where p is the instantaneous pressure equal to

(MD23)

!p ,
i

where p are the atomic level

i=1

pressures given by equation (G34).


2

! 1 ,..., !! " ) = E # E
In the Lagrangian mechanics the Lagrangian is L( !1 ,..., ! " , !
kin

pot

and it is a

! " . 3N equations of motion for


function of generalized coordinates ! i and generalized velocities !
the generalized coordinates !i of the corresponding system of N particles are then

d $ !L '

!L

& # ) * # = 0
dt % !"
( !" i
i
12

Equations of motion (MD22) and (MD23) are then solved for both ! i and 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)

( )

2m i V1/ 3 J"t

( )

Fi J"t

( )
( )
"t
! (J"t ) + ( ) ( p (J"t ) # p )
V ((J + 1)"t ) = V (J"t ) + "t V
2M
! J"t
V
2
1
!
# "t ! i J"t
3
V J"t

( ) ( )

(MD24)

! are then calculated analogously, following


The corresponding rates !! i and V
equation (MD6), as
! (J +1)"t & "t # F (J +1)"t
# "t V
Fi J"t &
i
!! i (J + 1)"t %1+
(= %
+
(
1/3
1/3
3
2
V
(J
+1)"t
m
V
(J
+
1)"t
m
V
J"t
%$
('
%$ i
('
i
! J"t &
# "t V
!
(
+ ! i J"t %1 )
(MD25)
3
V
J"t
%$
('
! (J + 1)"t = V
! J"t + "t # p (J + 1)"t + p J"t ) 2p &
V
e'
2M $
!,
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

(
(

)
)

( )

( )

( )
( )

( )
( )

) ( )

! (J + 1)!t is already known. In order to resolve


(MD25) this can only be done if V
this inconsistency we introduce approximate velocities

"! !i (J + 1)#t =

( )

" i (J + 1)#t $ " i J#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

13

converges to the value for which p = p e then V! ! 0 and all the terms containing M in
the 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 h with elements a "! , as
shown in Fig. 2. The volume of this block is ! = a 1 " (a 2 # a 3 ) . We then introduce a
. .

a3
a2

a1

Fig. 2. Parallelepiped defined by three vectors a ! (=1, 2, 3).


scaling of the position vectors of the particles, ri , by defining them as linear
combinations of vectors a !
3

ri = " a ! #
!=1

!
i

3
% $
(
$ !
r
=
a
#
'& i " ! i *) and in the matrix form ri = h # i

(MD27)

!=1

where h is the matrix with elements a "! . This introduces the scaled vectors of particle

positions ! i with components ! "i . Since we want to achieve that the cell varies in
14

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 N
1
T
T!
(MD28)
L = " m i !! i G!! i # E p (r1 ,r2 , ...,rN , V) + MTr(h! h)
2 i=1
2

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

mi

( ) =F "m

d h!! i

dt

(h )

T "1

M!!
h=!" #

T
h! h!! i

(MD29)
(MD30)

The instantaneous stress tensor ! = " ! i , where ! i are the atomic level stresses
i=1

given by equation (G33). The matrix ! = (a 2 " a 3 , a 3 " a1 ,a1 " 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 I is the unit matrix, and. hT h = 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.

15

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 quantities
are 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

A
Fluctuations

<A>
time
Fig. 3. Schematic picture of fluctuations of a quantity A

16

(MD31)

Following (MD11) and using the ergodic theorem


!

1
1 M
A = lim ( ! " # ) $ A2 (t)dt = & A2 (J %t)
!0
M J =1

(MD32)

where t is the time step, M the total number of MD steps and the total time of the
MD run (after equilibration). A is given by equation (11.2).

Physical quantities obtainable from fluctuations

" !E %
Specific heat at constant volume: C V = $ ' .
# !T & V
E is the energy of the system and it is identical with the Hamiltonian given by
equation (G2), i. e. it includes both the kinetic and potential energy. It follows from
the theory of fluctuations and statistical mechanics that C V is related to the
fluctuation of the energy3
2
E2 ! E
(MD33)
CV =
k B T2

If 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 T )dQ


" exp ( ! E k T ) dQ
B

where the integration is over the whole phase space of the system. Differentiation of E with
respect to the temperature T yields
* E 2 exp (( E k T) dQ " Eexp ( ( E k T ) dQ % 2 "! E %
1
)
B
B
,)
($
' /
$# !T '& = k T2
exp
(
E
k
T
dQ
exp
(
E
k
T
dQ & /
)
(
)
, ) (
#
)
V
B
B
B
+
.
which corresponds to

"! E %
1
2
$
' =
E ( E
2 [
# !T & V k B T
17

When evaluating C V using the fluctuations of energy the 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.

" !H %
Specific heat at constant pressure: C p = $ ' .
# !T & p
H=E + pV is the enthalpy of the system and C p is related to its fluctuations

Cp =

H2 ! H

(MD34)

kBT 2

When evaluating C p using the fluctuations of enthalpy the corresponding MD


calculation must be done at constant temperature, pressure and number of
particles.
Importantly, both C V and C p can be evaluated according to their definitions,
" !H %
" !E %
' if we determine by a molecular dynamics calculation
C V = $ ' and C p = $
# !T & p
# !T & V
that employs the microcanonical ensemble the temperature dependence of the energy,
E, or the enthalpy, H, respectively. These quantities can then be differentiated with
respect to the temperature. These calculations have to be done at constant volume
when evaluating C V and at constant pressure when evaluating C p . 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 =

V2 " V
V kBT

(MD35)

When evaluating !T using the fluctuations of volume the corresponding MD


calculation must be done at constant temperature, pressure and number of
particles.
18

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


Obviously, if A and B are independent quantities then
!A!B = 0. Following (MD11.2)

!A!B =

(MD36)

AB = A B

1 M
$ 1 M
'$ 1 M
'
A(J!t)B(J!t)
#
A(J!t)
"
& "
) & " B(J!t) )
M J =1
% M J= 1
( % M J= 1
(

and

(MD37)

where M is the total number of MD steps and t the time step.

Physical quantities obtainable from time-independent correlations


# "p &
The thermal pressure coefficient: ! V = % (
$ "T ' V
is determined by the time-independent correlation between the potential energy, E p ,
and the pressure, p, using the relation
!E p !p = k B T 2 (" V # $k B )
(MD38)
where ! = N V is the density (J. S. Rowlinson: Liquids and liquid mixtures,
Butterworth: London, 1969). When evaluating ! V using this correlation relation the
corresponding MD calculation must be done at constant volume, temperature and
number of particles.

1 # "V &
% (
V $ "T ' p
is determined by the time-independent correlation between the volume, V, and the
enthalpy, H
2
!V!H = k B T V" p
(MD39)
Isobaric thermal expansion coefficient: ! p =

When evaluating ! p using this correlation relation the 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),
! V and " p obey the following relationship: ! p = " T # V

19

Tensor of elastic moduli


The tensor of elastic moduli C !"#$ relates the applied stress, ! "# , and the induced
a

a
strain, ! "# , in a linearly elastic material, i. e the Hooke's law ! "# =

' C "#$%& a$%

$ ,%=1

applies. This tensor may be determined from the time-independent correlation of the
stress tensor components
%
(MD40.1)
C !"#$ =
&' !" &' #$
k BT
where the stress tensor ! "# is given by (G15). Since in equilibrium ! "# = 0
%
(MD40.2)
C !"#$ =
& &
k B T !" #$
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
!

1
B(t 2 )A( t1 ) = lim ! " # % A(t1 + t $ )B(t 2 + t$ )dt $
!0

(MD41)

In the thermodynamic equilibrium, the correlation may depend only on the difference
of the times: t 2 ! t 1 . Therefore, setting t1 = 0 and writing t instead of t2, the timedependent correlation function is
!
1
(MD42.1)
B(t)A(0) = lim ! " # % A(t $ )B(t + t$ )dt $
!0

20

and in the framework of MD calculations


1 M
B(t)A(0) = " A(J!t)B(t + J!t)
M J =1

(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

1!
(MD44.1)
A(t)A(0) = lim( ! " # ) $ A(t + t' )A(t' )dt'
!0
and in the framework of MD calculations
1 M
(MD44.2)
A(t)A(0) = " A(t + J!t)A(J!t)
M J =1
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) = A 2

(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
21

lim(t ! ") A(t)A(0) = A

(MD45.2)

The autocorrelation function A(t)A(0) therefore varies between these two extreme
2
values and practically reaches A after the correlation or relaxation time defined as
#

! cor = 2

$ ( A(t)A(0)

" A

A2 " A

) dt
(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
2
time, ! cor , as a time when the autocorrelation function approaches closely A . In
this case the area of the right-angled triangle marked by bold lines,
1

(A

! A

)"

cor

, is very close to that delineated by the autocorrelation function

and the two sides of the same triangle. This area is given by the integral
" cor

#
0

A(t)A(0) ! A

) dt .

Since we assume that for time ! cor the autocorrelation function is very close to A ,
"

this integral is practically equal to

# ( A(t)A(0)

! A

) dt .

Equating this integral to

the area of the right-angled triangle marked by bold lines, leads to the formula
(MD46) for the correlation time.
2

A
Autocorrelation

Time

!cor

Fig. 4. Schematic behavior of the autocorrelation function and evaluation of the


relaxation (correlation) time.
22

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(! " ! )
= "#(! " ! )
dt
dissipation

(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 "
(MD49)
! = 2 # !( t)! (0) dt
! 0
If !(t ) = d"(t) dt then the corresponding 'Einstein relation' is associated with
(MD49) that follows by integration by parts
2
1 1
1
(MD50)
! =
lim
"
#
$
B(")
%
B(0)
2 !2
"

) (

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
4

M. 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).
23

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-diffusion
coefficient, D, is related to the mobility, v , associated with the velocity of the
particles, according to the relation D = v k B T / m, where m is the mass of the
particles. Hence, if we identify with the vector of the velocity, v, then

v =

1
v2

$"

0 ! =1

v ! (t)v ! (0) dt

(MD51.1)

and the self-diffusion coefficient is

D=

k BT
v2 m

$"

0 ! =1

1# 3
1#
v ! (t) v! (0) dt = $ " v ! (t )v ! (0) dt = $ v(t)iv(0) dt (MD51.2)
3 0 ! =1
30

since according to the equipartition theorem v = 3k B T / m .


relation (MD50) gives
1
[r(!) $ r(0) ]2
D = lim(! " # )
6!
2

Furthermore, the
(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

This tensor is determined by the integral of the time dependent autocorrelation of the
stress tensor components
&o (
(MD53)
! "#$% =
' (t)' $% (0) dt
k B T )0 "#
where the stress tensor ! "# is given by equation (G15); ! o is the average volume per
particle.

24

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:
"o &
(MD54.1)
!s =
# (t )# $% (0) dt
k B T '0 $%
where ! "# ( ! " # ) is a shear component of the stress tensor given by (G15).
(ii) The bulk viscosity determined by the autocorrelation of the hydrostatic
pressure:

"o #
!V =
p(t)p (0) dt .
k B T $0

(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.

25

APPENDIX - EQUIPARTITION THEOREM

The kinetic energy per degree of freedom is

Edf = 1 mv 2
kin
2

and when the Boltzmann distribution

applies then the average kinetic energy per degree of freedom is


(

Edf =

)0 12 mv
(

kin

2 exp " ! mv 2
$#

"

)0 exp $#! mv

2k BT %' dv
&

where kB is the Boltzmann constant.

2k BT %' dv
&

We make the following substitution

mv 2 2k BT = x 2 ! v = x 2k BT m
and thus
&

Edf = k BT
kin

)x

exp "$!x 2 %' dx =


#
&

)
0

'0 x

exp "# !x 2 $% dx

&

'0 exp "#!x

2$

dx

exp "$ !x 2 %'


*
#
&
x + xexp "$ !x 2 %' . dx = !x
#
&
2
,
/

+ 1 ) exp "$!x 2 %' dx


2
#
&
0

when integrating by parts.


Hence the average kinetic energy per degree of freedom is

Edf = k BT .
kin

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

26

Vous aimerez peut-être aussi