0% found this document useful (0 votes)
1 views

lect12

The document discusses the analysis of results from molecular dynamics (MD) simulations, focusing on the calculation of various material properties such as internal energy, pressure, stress tensor, and self-diffusion coefficient. It emphasizes the importance of time averaging for obtaining statistically meaningful results and outlines methods for estimating errors in simulations. Additionally, it introduces the self-diffusion coefficient and its calculation methods, including the mean squared displacement and Green-Kubo relations.

Uploaded by

n16135051
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

lect12

The document discusses the analysis of results from molecular dynamics (MD) simulations, focusing on the calculation of various material properties such as internal energy, pressure, stress tensor, and self-diffusion coefficient. It emphasizes the importance of time averaging for obtaining statistically meaningful results and outlines methods for estimating errors in simulations. Additionally, it introduces the self-diffusion coefficient and its calculation methods, including the mean squared displacement and Green-Kubo relations.

Uploaded by

n16135051
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

2024/12/19

Result Analysis

Refer to Textbook Chapter 6 &7

Overview
 Now that we know how to set up, initialize and run an MD
program we have to ask a very serious, but as yet
neglected question: what do we actually want to do with
it?

 Generally we will want to calculate some material


properties of interest, such as, say, system energies,
stress, atomic structure, transport properties of fluids, etc.
While all the previous material allows us to set up and
simulate the systems we are interested in, they do not
give us any clues as to how to calculate the properties we
may actually be interested in. Indeed, it is this aspect of
MD that makes it such a useful and powerful tool in
science and engineering.

1
2024/12/19

Some quantities to calculate


 There are of course a number of different physical
quantities which one may be interested in.
 For a liquid, they may be liquid structure factors, transport
coefficients (eg, coefficients of diffusion, viscosity or
thermal conductivity), the properties of liquid-vapor (solid)
interfaces, etc.
 For solids, they may be crystal structure, adsorption of
molecules on surface, melting behavior, etc. We can not
consider the numerous possible quantities we could
calculate, but consider only a few of the most common
and important.
 In addition to calculating relevant quantities, we will learn
how to make sense of them in a statistically meaningful
way, and how to output the results of a simulation so that
they can be used by yourself and others.

Some quantities to calculate


(cont.)
 We will consider the following properties and their
calculation:
 Internal energy

 Pressure

 Stress tensor

 Self-diffusion coefficient

 Zero-shear viscosity coefficient

 Pair distribution function

The first three quantities pertain to all states of matter,


whereas the last two are particularly useful and relevant
for liquid state simulations.

2
2024/12/19

Energy (cont.)
 From all pairs of atoms (i, j), one calculates their
separations , and from these, simply substitute them
into potential equation. The trick is to calculate these pairs
via the neighbor list routine for computational efficiency.
This is most readily accomplished in the force routine
 However, we have only got half the solution! The energy
has contributions due to both potential and kinetic terms.
The kinetic energy should be calculated after the
momentum have been updated, i.e., after the force
routine has been called. The kinetic energy can then be
calculated, and then added to the potential energy.

Pressure (Refer to Textbook


Appendix B)
 Consider atoms occupy a cubic region of space
having volume and side . The collection of atoms
is at equilibrium with zero total linear momentum.
Imagine a planar surface of area = 2 inserted into
the system and oriented perpendicular to x-axis. The
pressure can be defined as the force per unit area
acting normal to the surface

Fx 1 d mv x 
Px  
A A dt

3
2024/12/19

Pressure
 Pressure is a momentum flux; it is the amount of
momentum that crosses a unit area of the surface in unit
time.
 In general, this flux is composed of two parts. (a) the
momentum carried by the atoms themselves as they cross
the area during , and (b) the momentum transferred as
a result of forces acting between atoms that lie on
different sides of the surface.

Momentum flux caused by


atomic motion
 The part of the pressure determined by atomic motion is
the part usually derived in kinetic theory.
 Number of atoms having velocities within of and that
cross element in +x direction during dt
=( ) ,

 The total component of momentum normal to carried by


the atoms that cross (in both directions) per unit area in
unit time is
= ∫ =∫ , =

4
2024/12/19

Momentum flux caused by


atomic motion
 Averaging over time produces

2
= =

 After repeating this procedure in the − and − directions,


we can form the total convective contribution to the
pressure and thereby obtain the ideal-gas law

2 2
= + + =
3 3

Momentum flux caused by


intermolecular forces
 Kinetic theory is rarely used to obtain the pressure part
contributed from intermolecular forces.
 is the total force per unit area acting normal to the
surface , where the forces are caused by atoms on
one side of the surface interacting with atoms on the
other side. Assuming the intermolecular forces are
pairwise additive as
1
= Unit vector

Index and runs over all atoms on two sides of the


surface, instead of over all atoms.

5
2024/12/19

Momentum flux caused by


intermolecular forces
 Averaging over all possible locations of the imaginary
surface that is positioned along the x-axis, we obtain
1
=

 Label the atoms sequentially from 1 to as their x-


position increases from zero to L and divide the edge
along the x-axis into + 1 intervals of unequal widths,
Δ
Δ = − ≡ ,

Momentum flux caused by


intermolecular forces
 Use a sum over these interval Δ to approximate the
integral
1 1
= ∆ = ,

 Note that is two atoms happen to have the same -


position, then that interval Δ = 0, and so their interaction
does not contribute to a force in the ± -direction.

6
2024/12/19

Momentum flux caused by


intermolecular forces
 Examine the first few terms
 = [ + + +⋯ + ( +
+ ⋯+ + +⋯)+ ( + ⋯+
+ ⋯+ +⋯)+⋯] = [ +
+ + ⋯+ + + +
⋯+ +⋯] = ∑ ∑ ∑ ,

 ∑ , =

Momentum flux caused by


intermolecular forces
1
=

 Averaging over time


1
=

 Repeating this procedure for surfaces oriented perpendicular to the


- and -axes produces analogous expression

1
= + +
3

7
2024/12/19

Momentum flux caused by


intermolecular forces
= ∑∑
 The complete expression for the pressure
2 1
= +
3 3

 For system with periodic boundaries


2 1
= + ( − )
3 3

Atomic Stress
 The standard definition of the stress, given in most
texts on mechanics, is that it is the force per unit
area exerted upon a surface. But in which direction is
the force? The following diagram makes this more
clear.

Infinitesimal force, , across an infinitesimal surface, .

8
2024/12/19

Atomic Stress
 In above Figure, an infinitesimal surface, , in the
plane experiences an infinitesimal force across it, .
The stress experienced by thus has three components:
one directed normal to its surface (in this case, the
direction), and another two directed in the and
directions. However, there are another two surfaces to
consider, those in the and planes.
 Thus, the stress contains 9 components! It is not a vector,
but is rather a 2nd rank tensor, and may be defined by
the expression:

lim d F  n
dS 0 dS
where is the force vector on surface

Atomic Stress
 The stress tensor may thus be written as:

 Here, the indices of the components s are such


that represents the direction of the normal to the
surface (e.g., = implies that the surface is in the
plane), and is the component of force acting
across that surface.

9
2024/12/19

Atomic Stress
 In an MD simulation the calculation of the stress tensor by
calculating the forces across surfaces is usually not the
most efficient method. For homogeneous systems, this is
definitely not the way to proceed! However, for
inhomogeneous systems, it is in fact the best way.
 For homogeneous systems, one uses the so called virial
stress which calculate the configurationally part of the
stress tensor, and then add that to the kinetic part. As the
derivation of the virial stress is not trivial, we will not
consider it further. The full expression for the atomic stress
tensor of a homogeneous system of particles (ref. Irving
and Kirkwood) is given as:
1 1
= +
Ω 2

Atomic Stress
1 1
= +
Ω 2

where Ω is the atomic volume of atom a, a is the mass,


a ( a ) is the ( ) component of the velocity, ab is
the i component of the force between atoms a and b
obtainable from the derivative of the potential ( )
and ab is the j component of the direction vector from
atoms a to b as shown in Figure.
 A positive atomic stress value indicates compression
and a negative value indicates tension because of the
definition of interatomic force.

10
2024/12/19

Atomic Stress
b=1

b=2
ra1
Fa2
Fa1
ra2

Ma
α

Note that atomic stress is valid for atomic systems at


equilibrium. Systems of molecules require some modifications
to be made, as do non-equilibrium systems.

Atomic Stress
 As with the calculation of the energy, the configurational
component should be calculated in the force loop,
whereas the kinetic component should be calculated
once the velocities are updated, and then the two
components added together.

11
2024/12/19

Srolovitz Atomic Volume


Voronoi Srolovitz

ai 
r 1
ij

2 r2
ij

4 3
Vi  ai
3

4 3
Vi  ai
3

ai 
r 1
ij

2r 2
ij

Time averaging
 To date we have concentrated on (a) setting up our MD
program, and (b) calculating certain material properties of
interest to us. We now spend a little effort in discussing how
to obtain statistically meaningful results.
 Many of the algorithms thus far described only showed how
to calculate certain physical properties, instantaneously, i.e.,
at time t. However, statistically meaningful results are only
obtained by time averaging over sufficiently long periods of
time.

12
2024/12/19

Time averaging
 Over some arbitrary sampling interval, , the time average
( ) is computed as
1 1 N 1 N
 B (t )   B (t )dt   B (it )t   B (it )
0 Nt i 1 N i 1

 Thus, clearly, all quantities we calculate must be time


averaged, within the actual simulation, to give physically
meaningful results for output.
 It is good practice to calculate totals of quantities as
they are being computed and then have a separate
averaging routine that takes the time average of the
totals.

Estimating errors
 There are a number of ways in which this may be done. First,
one may run the simulation M different times (each time
starting at a different configuration), then calculate the
mean and standard deviations, s, of all quantities you are
interested in over these M independent runs. The error in
the mean is then given by
Standard error =s/( )^0.5 (*)
1 M 2
  ( xi  x )
M i1
 An alternative (and equivalent) method would be to divide
your (long!) simulation into m blocks of t timesteps and take
averages over these blocks. One then calculates the mean of
the block averages, their standard deviation, and their
standard error by Eqn (*).

13
2024/12/19

Estimating errors
 These are the two simplest and most straightforward ways
to estimate errors. There are more sophisticated techniques,
which you may find an excellent description of in Chapter 6
of reference [1].

[1]. M.P. Allen and D.J. Tildesley, Computer Simulation of


Liquids (Oxford University Press, New York, 1987).

Self-diffusion coefficient
 Microscopic motion, such as how a molecule in a liquid
diffuses, or how an adsorbed atom on a surface migrates
from one site to another (or indeed through various
layers) is difficult to measure experimentally. However,
this motion is one of the most straightforward to
‘observe’ within an MD simulation.

 All one need do is tag any particular atom or molecule


and write out its coordinates as a time series. However,
apart from visualization, this information does not really
give one much insight into the physics of how and why
atoms or molecules move. A more quantitative measure
is required, of which the self-diffusion coefficient is one
of the most common and useful.

14
2024/12/19

Self-diffusion coefficient
 There are two routes to calculating diffusion coefficients:
via the mean squared displacement vector (originally
derived by Einstein in his paper on Brownian dynamics),
or by what is known as a ‘Green-Kubo’ relation, in which
the diffusion coefficient is related to the velocity
autocorrelation function. Both expressions are formally
equivalent. In this section we will only consider the
Einstein method; a Green-Kubo calculation will be
described in the following section on zero-shear viscosity.
 The Einstein expression for the self-diffusion coefficient
for an isotropic fluid at equilibrium is given as

1 2
2tD  r ( t )  r ( 0)
3

2 1 N M 2
r (t )  r (0)    ri (tk  t )  ri (tk )
NM i 1k 1
atom Time origin

15
2024/12/19

Self-diffusion coefficient
 The angle brackets denote a time average performed
over all possible atoms (molecules) i. In actual fact,
the self-diffusion coefficient equation is only strictly
valid in the limit of long times, i.e.

1 2
D  lim r (t )  r (0)
t  6t

 After an initial transitional time, the self-diffusion


coefficient should be proportional to the mean-
square displacement (MSD). In fact, a plot of the
MSD against t should yield a straight line, with the
slope being 6D.

Running mean-square displacement


 Running mean-square displacement is defined by
1
r 2 (t )   [ri (t )  ri (0)]
2

N i

 Can be used to determine the phase (i.e., fluid or solid)


 For a solid, r2(t) remains nearly constant, while for a
fluid it increases almost linearly with time.

16
2024/12/19

Running mean-square displacement

256 L-J atoms


<kT/>=1.087 s3=0.9

<kT/>=0.80

17

You might also like