molecular dynamics simulation_nneomaaimsessay

41
Molecular Dynamics Simulation by Nneoma Ogbonna Supervisor: Kristian M¨ uller-Nedebock African Institute for Mathematical Sciences Muizenberg, South Africa. May, 2004.

Upload: alikaya12002

Post on 04-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 1/41

Molecular Dynamics Simulation

by

Nneoma Ogbonna

Supervisor: Kristian Muller-Nedebock

African Institute for Mathematical Sciences

Muizenberg, South Africa.

May, 2004.

Page 2: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 2/41

Abstract

Molecular Dynamics simulation is a technique for computing equilibrium and dynamic properties

of a classical many-body system. Newton’s equations of motion are solved numerically, and

macroscopic properties of the system are measured by applying statistical mechanics principles.

In this essay, we will discuss the key ingredients in carrying out a molecular dynamics simulation.

This includes the potentials used to model intermolecular interactions, the integration algorithms

and the boundary conditions that are implemented. We will also discuss the Ewald summation,

a technique for handling long-range interactions. We will present the results of simulations

performed for a Lennard-Jones potential, and interpret the results in the context of a real gas.

AMS classification codes: 68U20, 70E55, 82B80.

Page 3: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 3/41

Dedicated to my Parents 

Page 4: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 4/41

ACKNOWLEDGMENTSI would like to express my sincere gratitude to the African Institute for Mathematical Sciences

(AIMS) for giving me this opportunity to do a post-graduate diploma in mathematics. I espe-

cially thank Prof. Neil Turok for his foresight in founding this Institute, and for his motivation.

I am also grateful to all AIMS staff for their help during my studies. I would like to thank Dr.

Mike Pickles for helpful guidance.

I would like to thank my supervisor, Dr. Kristian Muller-Nedebock, for sparking my interest

in this topic and for his constant support and guidance.

ii

Page 5: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 5/41

Contents

1 Introduction 2

2 Important considerations 4

2.1 Intermolecular Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 Short-range/Long-range Interactions . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.4 Equations of Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.5 Reduced Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Computer Simulation 16

3.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2 Computing Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.3 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.4 Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 Long Range Interactions 27

4.1 Ewald Summation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5 Conclusion 34

Bibliography 36

1

Page 6: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 6/41

CHAPTER 1

Introduction

Computer simulation is a tool for studying macroscopic systems by implementing microscopic

models. The microscopic model is specified in terms of molecular structure and intermolecular

interactions. Results from computer simulations are compared with analytical predictions and

experimental data to test the accuracy of the model. So computer simulations provide a good

test for theory. Moreover, they are used to test complex models that cannot be worked out

analytically. They are also used to study systems that are not accessible experimentally, and

they help one to understand experiments on a microscopic level. Computer simulations are used

to predict the properties of materials [1]. These predictions are subject to limitations imposed

by the computer (such as computer memory, speed and precision).

Molecular dynamics merges computer simulation with statistical mechanics to compute equi-librium and transport properties of a classical  many-body system. Equilibrium properties in-

clude the energy, temperature and pressure of a system. Transport properties include the dif-

fusion coefficient, shear viscosity and thermal conductivity of a system. Molecular dynamics

simulations take place in three steps. First, we specify the initial positions and momenta of 

the particles. The particles interact through a potential. So the implemented potential deter-

mines the extent to which our simulation results represent the system of interest. Second, we

evolve the system according to Newton’s law: F i = miai. Visually, the particles move around

in the simulation box, tracing out trajectories in space. Third we measure physical quantities

as functions of particle positions and momenta. Statistical mechanics is applied to interpret

these instantaneous measurements in terms of equilibrium properties. In statistical mechanics,

a macroscopic property of a system is an average of that property over all possible quantum

states. This is referred to as an ensemble1 average. The ergodic hypothesis states that the

time-averaged properties of a real system are equal to its ensemble averages. So by taking the

1An ensemble can be regarded as an imaginary collection of a large number of systems in different quantum

states, with common macroscopic attributes like temperature and pressure.

2

Page 7: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 7/41

average of measurements in a molecular dynamics simulation, we can obtain the macroscopic

properties of the system. Transport properties can also be computed from the data because

the complete trajectories are available. They are defined in terms of time-dependent correlation

functions at the atomic level [2, ch.5].

In this essay we will apply molecular dynamics to study some properties of a Lennard-Jones

fluid. The Lennard-Jones fluid is an important model used to study liquids and gases. The

results obtained from the simulations are interpreted in the context of a real gas. One must

bear in mind that though molecular dynamics aims to study macroscopic systems, only a finite

number of particles, from a few hundred to a few million, can be simulated on a computer.

Real systems contain O(1023) particles (Avogadro’s number). Periodic boundary conditions

are often implemented in simulations to mimic the infinite bulk surrounding the sample. This

and other considerations in setting up a molecular dynamics simulation, such as the integration

algorithms and some models of particle interactions, are discussed in Chapter 2. In Chapter

3, results of computer simulations performed on the Lennard-Jones model are presented. We

will compare these results to the well known physical properties of gases. The Lennard-Jones

fluid only models a class of interactions called the short-range interactions. In Chapter 4, we

discuss another class of interactions, the long-range interactions, and a technique for handling

them known as the Ewald summation.

Molecular dynamics simulations have a wide range of applications [3]. They are used to study

liquids [4], biomolecules (such as proteins and nucleic acids), crystal defects, phase transitions

and polymers. Specialized molecular dynamics software are available, for example CHARMM,

AMBER (for biomolecules), VMD (for biomolecules), and GROMOS.

3

Page 8: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 8/41

CHAPTER 2

Important considerations

2.1 Intermolecular Interactions

Intermolecular interactions are modelled by a potential. This potential is a function of the po-

sitions of the nuclei. The potential energy due to non-bonded interactions1 between N  particles

can be divided into terms that depend on individual atoms, pairs, triplets and so on:

U (rN ) =

i

φ1(ri) +

i

 j>i

φ2(ri, r j) +

i

 j>i

k>j

φ3(ri, r j , rk) + . . . (2.1)

where rN  = (r1, r2, . . . , rN ) stands for the complete set of 3N  particle coordinates. Here, φ1(ri)

represents the effect of an external field (including the container walls), φ2(ri, r j) represents

pairwise interactions and φ3(ri, r j, rk) three-body interactions. Most work considers only pair-

wise interactions, since their contribution is the most significant. Pair potential depends only on

the magnitude of pair separation rij = |ri − r j|. The potential energy is then written in terms

of the pair potential as

U (rN ) =

i

 j>i

φ(rij) . (2.2)

The system under investigation determines the potential function implemented. The elec-

trostatic potential

φ(r) =q 1

4πε0r(2.3)

models ionic interactions. Here, q 1 is the electric charge on ion 1 and ε0 is the permittivity of 

free space. The Lennard-Jones 12-6 potential (Fig. 2.1)

φLJ(r) = 4

σ

r

12 −σ

r

6

(2.4)

is typically used to model interactions between non-polar molecules. Here, σ represents the

effective diameter of the spherical particles and measures the attractive interaction. The

1Non-bonded interactions are interactions between particles that are not linked by covalent bonds.

4

Page 9: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 9/41

potential combines a short-range repulsive force (the 1/r12 term) with a long-range attractive

force (the 1/r6 term). The repulsion arises from two effects. First, the penetration of one

electron shell by another; the nuclear charges are no longer completely screened, and therefore

repel one another. Second, Pauli’s exclusion principle, which states that two electrons of the

same energy cannot occupy the same element of space. So when electron shells overlap, the

energy of one must be increased, and this is equivalent to a force of repulsion [5, ch.1]. The

attraction comes from van der Waals dispersion forces due to fluctuating dipoles. The 1 /r 6 term

is consistent with the leading term of the 1/r expansion of dispersion energy. The 1/r12 term

has no theoretical justification; it is chosen on a practical basis (for easy computation) [6, ch.2].

The Lennard-Jones potential is simple and useful for understanding the properties of diverse

systems (gases, liquids, clusters, polycrystalline materials [9]).

-1.5

-1

-0.5

0

0.5

1

1.5

-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

∆ε

σ

Lennard-Jones Potential

-1.5

-1

-0.5

0

0.5

1

1.5

-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

∆ε

σ

Lennard-Jones Potential

Figure 2.1: Lennard-Jones Potential. σ = 1,

= 1

-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

        f        (      r        )

r

1/r6 term

1/r12 term

force

-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

        f        (      r        )

r

1/r6 term

1/r12 term

force

Figure 2.2: Lennard-Jones force. σ = 1, =

1

Other idealised pair potentials are valuable for comparison with theory and investigating

general properties of a system. The hard sphere potential (Fig. 2.3) treats atoms as impenetrable

hard spheres.

φ(r) =

∞ r ≤ σ

0 r > σ(2.5)

σ is the hard sphere diameter. The square-well potential (Fig. 2.4)

φ(r) =

∞ r ≤ σ

− σ < r ≤ λσ

0 r > λσ

(2.6)

5

Page 10: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 10/41

is a simple potential for studying liquids. Here, λ is some multiple of the hard sphere diameter,

and is the well-depth.

     u      (     r      )

r

σ

     u      (     r      )

r

σ

Figure 2.3: Hard Sphere Potential.

      u        (      r        )

r

well depth∆ε

σ

λσ

      u        (      r        )

r

well depth∆ε

σ

λσ

      u        (      r        )

r

well depth∆ε

σ

λσ

      u        (      r        )

r

well depth∆ε

σ

λσ

Figure 2.4: Square-well Potential.

The intermolecular force is the gradient of the potential with respect to particle displace-

ments.

Fi = − j=i

∂φ(rij )∂rij(2.7)

The Lennard-Jones force for σ = 1, = 1 is shown in Fig. 2.2.

2.2 Boundary Conditions

Although molecular dynamics aims to provide information about physical systems, only a small

sample is simulated in practice. A physical system contains many moles of particles, and so is

impossible to simulate exactly.

The choice of boundary conditions (for example free, periodic or hard) affects the properties

of the sample system. The ratio of surface molecules to the total number of molecules is more in

the sample than in reality. These surface molecules experience different forces from molecules in

the bulk. Periodic boundary conditions are implemented to mimic the infinite bulk surrounding

the sample, and so remove surface effects. We assume here that the system is surrounded by an

infinite number of identical copies, and that the particles in the simulation box move in unison

with their images. Particles near the boundary of the simulation box interact with periodic

6

Page 11: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 11/41

images across the boundary. The choice of the boundary is arbitrary; any space-filling convex

shape can be used.

Periodic boundary conditions inhibit the occurrence of long wavelength fluctuations. The

longest wave-length that fits into the simulation box is one for which λ = L where L is the length

of the box. So periodic boundary conditions are not suitable when long wavelengths play an

important role, for example continuous phase transitions [4, p.25][1, p.35]. Periodic boundary

conditions are used in the presence of an external potential only if this potential has the same

periodicity as the simulation box [4, p.26].

2.3 Short-range/Long-range Interactions

From now on, we assume that the simulation box is a cube of length L. The total potential

energy of the particles in any one periodic box is

U (r) =1

2

i,j,n

φ(|rij + nL|) (2.8)

where the vector n = (nx

, ny

, nz

), nx

, ny

, nz

are integers, extends the interactions to the periodic

boxes surrounding the simulation box in a spherical manner, and the prime over the sum indicates

that the sum does not include i = j when n = 0. Intermolecular interactions can be divided

into short-range and long-range interactions.

2.3.1 Short-range Interactions

The use of periodic boundary conditions solves the problem of surface molecules, but it poses

another potential difficulty. If there are N  particles in a simulation box, we are faced with com-

puting not only the interactions between these particles, but also interactions between each par-

ticle in the simulation box and the potentially infinite array of periodic images. For short-range

interactions, we assume that the potential energy of a particle is dominated by its interaction

with particles that are closer than a cut-off distance rc, and so the potential is truncated at that

cut-off. The error that arises from this approximation can be made arbitrarily small by choosing

a sufficiently large rc. The often used truncation methods are:

• Minimum image convention : Only interactions between a particle and the closest

periodic image of its neighbours is considered. The potential is in effect cut off at 12 L. This

7

Page 12: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 12/41

truncation introduces a discontinuity in the potential function if the box is too small. The

force is undefined at the cut-off, and energy is no longer conserved. Also, the potential energy

calculation involves 12 N (N − 1) terms. This calculation becomes cumbersome as the number of 

particles is increased.

• Simple truncation : Here, we choose the cut-off radius so that rc < 12 L (Fig. 2.5).

The potential energy becomes:

U (r) =

U (r) r ≤ rc

0 r > rc

(2.9)

This method reduces the number of terms involved in calculating the interactions, but like

the minimum image convention, it is discontinuous at the cut-off radius, and so does not conserve

energy.

• Truncated and shifted : The potential is truncated and shifted so that it goes to zero

smoothly at the cut off radius (Fig. 2.6).

U (r) =

U (r) − U (rc) r ≤ rc

0 r > rc

(2.10)

The intermolecular forces are always finite. A further correction, the shifted-force potential,

corrects for the discontinuity of the force at r = rc [4, p.146].

-1

-0.5

0

0.5

1

0.8 1 1.2 1.4 1.6 1.8 2 2.2

      u        (      r        )

r

rc=2

-1

-0.5

0

0.5

1

0.8 1 1.2 1.4 1.6 1.8 2 2.2

      u        (      r        )

r

rc=2

Figure 2.5: Simple Truncation of the

Lennard-Jones potential at rc = 2.

-1

-0.8

-0.6

-0.4

-0.2

0

1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6

r

Lennard-Jones PotentialTruncated and Shifted

-1

-0.8

-0.6

-0.4

-0.2

0

1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6

r

Lennard-Jones PotentialTruncated and Shifted

Figure 2.6: Truncated and Shifted Lennard-

Jones potential at rc = 2.5.

Since a short-range potential is truncated at rc, the measurements in a simulation ignore the

8

Page 13: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 13/41

tail correction of the potential for r > rc. It may be useful to correct the measurements for this

tail. The correction to the potential energy for the Lennard-Jones potential is [4, p.64]

U ∗r>rc =8

3r∗3c

N πρ∗

1

3r∗3c

− 1

where U ∗, r∗c and ρ∗ are the potential energy, cut-off radius and the density in reduced units 2,

respectively.

2.3.2 Long-range Interactions

A long-range force is defined as a force which falls off no faster than r−d, where d is the di-

mensionality of the system [7, p.132]. Coulomb interactions (∝ r−1, see Fig. 2.7) and dipolar

interactions (∝ r−3) are examples of long-range interactions for d = 3. The potential energy can

be written in the form

U (r) =i<j

φc(rij) +N ρ

2

 ∞rc

dr φ(r)4πr2 (2.11)

where φc is the truncated potential function, ρ is the average number density of the particles and

N  is the number of particles in the simulation box. The tail correction diverges if  φ(r) decays

no faster than r−3. Techniques for handling long-range interactions include Ewald summation,

the reaction field method, the particle-particle/particle mesh method and the fast multipole

method. These are discussed in Chapter 4.

-1.5

-1

-0.5

0

0.5

1

1.5

-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

      u        (      r        *        )

r*

Coulomb PotentialLennard-Jones Potential

-1.5

-1

-0.5

0

0.5

1

1.5

-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

      u        (      r        *        )

r*

Coulomb PotentialLennard-Jones Potential

Figure 2.7: The Coulomb potential and the Lennard-Jones potential versus intermolecular sep-

aration.

2See section 2.5.

9

Page 14: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 14/41

2.4 Equations of MotionThe classical equations of motion can be written as

ri = pi/mi; pi = Fi (2.12)

These differential equations can be solved approximately using finite difference methods. The

finite difference methods are subject to truncation errors and round-off errors. Truncation errors

arise because the algorithm is based on a truncated Taylor series expansion. Round-off errors

arise from the actual implementation of the algorithm, for example the precision of computer

arithmetic.

The finite difference algorithms can be classified as predictor and predictor-corrector algo-

rithms [7, p.215]. In predictor methods, the molecular coordinates are updated from results that

are either calculated in the current step or that are known from previous steps. The Verlet algo-

rithm and the leap-frog algorithm are examples of predictor algorithms. The Verlet algorithm

is derived from Taylor expansions for the position:

r(t + ∆t) = r(t) + v(t)∆t + 12

a(t)∆t2 + 16

a(t)∆t3 + O(∆t4)

r(t − ∆t) = r(t) − v(t)∆t +1

2a(t)∆t2 − 1

6a(t)∆t3 + O(∆t4).

Adding these we get the Verlet algorithm:

r(t + ∆t) = 2r(t) − r(t − ∆t) + a(t)∆t2 + O(∆t4). (2.13)

The truncation error is O(∆t4). The velocity of the particles is given by:

v(t) = r(t + ∆t) − r(t − ∆t)2∆t

+ O(∆t2). (2.14)

The velocity Verlet algorithm, a variant of the Verlet algorithm, computes positions at time

t + ∆t using only positions at time t and their time derivatives. So we do not have to store the

positions from two previous time-steps. The equations are:

r(t + ∆t) = r(t) + v(t)∆t +1

2a(t)∆t2 (2.15)

v(t + ∆t) = v(t) +a(t + ∆t) + a(t)

2

∆t (2.16)

10

Page 15: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 15/41

Predictor-corrector algorithms consist of three steps. First, we predict positions, velocities

and accelerations from the results of previous time steps. Second, we compute new accelerations

from the predicted positions. Third, we use these new accelerations to correct the predicted

positions and their time derivatives. The Gear algorithm is an example [1, 7, 4].

Conservation of energy is an important criterion in the choice of an integration algorithm.

The potential energy U  and the kinetic energy K  fluctuate about fixed values such that the

total energy E  = K + U  remains constant. We can show that the total energy does not change

in time if Newton’s equations are integrated exactly:

E  = K + U 

=1

2

N i=1

mid

dt(x2

i + y2i + z2

i ) +N 

i=1

dxi

dt

∂U 

∂xi+

dyi

dt

∂U 

∂yi+

dzi

dt

∂U 

∂zi

=1

2

N i=1

2mi(xixi + yiyi + zizi) +N 

i=1

xi

∂U 

∂xi+ yi

∂U 

∂yi+ zi

∂U 

∂zi

=N 

i=1

miri . ri +N 

i=1

ri .∂U 

∂ ri

=

N i=1

ri . (miri − Fi)

= 0.

Higher order algorithms (such as the predictor-corrector algorithms) tend to conserve energy

well over short periods, but suffer overall energy drift for long periods. Verlet-style algorithms

have moderate short-term energy conservation, but little long-term energy drift [1, p.73].

The particle trajectories are sensitive to small perturbations in the initial conditions, and

to the precision and rounding method used for the floating point arithmetic. Trajectories that

are initially close will diverge exponentially with time. Since the integration algorithms are not

to infinite precision, they will not trace out the true trajectories in phase space. This however

does not have serious consequences for the following reasons:

1. All measurements involve averages which conceal the sensitivity of the trajectory.

2. The trajectories follow a shadow orbit (conserve a pseudo-Hamiltonian). A shadow orbit is

an exact solution to a given set of equations that remains close to a numerically computed

solution of the same set of equations for a non-trivial duration (significantly longer than

11

Page 16: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 16/41

the exact solution would starting at the same conditions as the numerical solution) [10, 1,

p.72].

2.4.1 Liouville Formulation

Consistent with Hamiltonian dynamics, we expect the integration algorithms to be time-reversible

and area-preserving3. The predictor-corrector algorithms are not time-reversible. More impor-

tantly, most algorithms that are not time-reversible are not area-preserving [1]. The Verlet

algorithm is time-reversible and area-preserving. Although these properties are not sufficient to

guarantee the absence of long-term energy drift, they are compatible with it.

The Liouville’s theorem states that the density D of systems in the neighbourhood of some

given system in phase space remains constant in time [12]. The total time derivative of this

density can be written asdD

dt=

∂D

∂t+

i

ri .∂D

∂ ri+ pi .

∂D

∂ pi(2.17)

where r and p are the positions and momenta of the particles. According to the Liouville

theorem,dD

dt= 0. So we have

∂D

∂t= −

i

ri .∂D

∂ ri+ pi .

∂D

∂ pi= −iLD. (2.18)

iL is called the Liouville operator, which we will write compactly as

iL = r .∂ 

∂ r+ p .

∂ 

∂ p. (2.19)

The Liouville operator preserves reversibility and is symplectic (conserves volume in phase space)

[8].

We shall now derive the Verlet algorithm using the Liouville approach. The aim of this

derivation is to show that the Verlet algorithm is area-preserving. Therefore we expect the

Verlet algorithm to have long-term energy conservation properties.

Consider a dynamical variable f (rN (t), pN (t)) which depends on all the coordinates and

momenta of  N  particles in a classical many-body system. The time derivative is

f  =N 

i=1

ri .∂f 

∂ ri+ pi .

∂f 

∂ pi≡ iLf . (2.20)

3All trajectories that correspond to an energy level E  are contained in a (hyper) volume in phase space. This

volume is preserved as the system is evolved according to Hamiltonian dynamics [1].

12

Page 17: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 17/41

Formal solution to (2.20) gives

f (t) = eiLtf (0) (2.21)

where f (t) ≡ f (rN (t), pN (t)).

The exponential operator exp(iLt) is called the propagator [8]. If the Liouville operator is

split such that

iL = iLr + iL p (2.22)

then the effect of each component of the propagator, exp(iLr) and exp(iL p), corresponds to a

shift in coordinates. To show this, we insert

iLr = r .∂ 

∂ r

in (2.21):

f (t) = f (0) + iLrtf (0) +(iLrt)2

2!f (0) + . . .

= exp(r(0)t .∂ 

∂ r)f (0)

=∞

n=0

(r(0)t)n

n!.

∂ n

∂ rnf (0)

= f [(r(0) + r(0)t)N , pN (0)] . (2.23)

Similarly, the effect of exp(iL p) with iL p defined as

iL p = p .∂ 

∂ p

is a shift in momenta.

The components of the propagator do not commute.

e(iLrt+iLpt)

= eiLrt

eiLpt

. (2.24)

But we want to apply each component of the propagator, exp(iL p) and exp(iLr), to f (t) in turn.

So we can rewrite (2.24) using the Trotter Identity.

The Trotter identity is given by

e(A+B) = limM →∞

eA/2M eB/M eA/2M 

M . (2.25)

For large but finite M , we have

e(A+B) =

eA/2M eB/M eA/2M M 

eO(1/M 2) . (2.26)

13

Page 18: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 18/41

Using (2.26), we can write the propagator as

eiLt = e(iLrt+iLpt) ≈ (eiLp∆t/2eiLr∆teiLp∆t/2)M  (2.27)

where ∆t = t/M , M =number of time-steps. Application of (eiLp∆t/2eiLr∆teiLp∆t/2) M  times

advances the system approximately through t. Applying this new operator to the function

f (rN (0), pN (0)) yields:

eiLp∆t/2

f (rN 

(0), pN 

(0)) = f [rN 

(0), (p(0) +

∆t

2 p(0))N 

] (2.28)

eiLr∆tf [rN (0), (p(0) +∆t

2p(0))N ] = f [(r(0) + ∆tr(

∆t

2))N , (p(0) +

∆t

2p(0))N ] (2.29)

eiLp∆t/2f [(r(0) + ∆tr(∆t

2))N , (p(0) +

∆t

2p(0))N ] = f [(r(0) + ∆tr(

∆t

2))N , (p(0) +

∆t

2p(0) +

∆t

2p(∆t))N ] .

(2.30)

The Jacobian of the transformation from {rN (0), pN (0)} to {rN (∆t), pN (∆t)} is the product

of the Jacobian of the three transformations. Since the Jacobian of each transformation is 1,

the algorithm is area-preserving. For example for (2.28), the Jacobian is∂ p

∂ p∂ p

∂ r

∂ r∂ p

∂ r∂ r

=

1 0

0 1

= 1 (2.31)

where p = p + ∆t2 p .

If we consider the overall effect of the sequence of operations, we see that

p(0) → p(0) +∆t

2(F(0) + F(∆t)) (2.32)

r(0) → r(0) + ∆tr( ∆t2

)

= r(0) + ∆tr(0) +(∆t)2

2mF(0) . (2.33)

This is the (velocity) Verlet algorithm. Hence the Verlet algorithm is area-preserving. That

it is reversible follows from the fact that the past and future coordinates enter symmetrically in

the algorithm. From the Verlet algorithm in (2.13):

r(t + ∆t) = 2r(t)

−r(t

−∆t) + a(t)∆t2

14

Page 19: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 19/41

we see that if we replace ∆t with −∆t

r(t − ∆t) = 2r(t) − r(t + ∆t) + a(t)∆t2

we trace the trajectory in reverse.

2.5 Reduced Units

Physical quantities in molecular dynamics simulations are expressed as dimensionless or reduced

units. This places all quantities of interest around unity, so we do not work with numbers thatare very large or very small. Errors are also easier to spot since a sudden large or small number

is most probably due to an error.

By working in reduced units, we can use a single model to study different problems. The

simulation results are scaled to appropriate physical units for each problem of interest. Also, the

equations of motion become simplified due to the absorption of parameters defining the model

into the units.

The following basic units are used for a Lennard-Jones system:

• length σ

• energy

• mass m

Using the replacements r∗ = r/σ and u∗ = u/, the Lennard-Jones potential becomes

u∗LJ (r∗) = 4

1

r

∗12

− 1

r

∗6

(2.34)

in reduced units. Other reduced quantities are time t∗ = t 

(/mσ2), pressure P ∗ = P σ3/,

temperature T ∗ = kBT /, and density ρ∗ = ρσ3.

15

Page 20: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 20/41

CHAPTER 3

Computer Simulation

The simulation results presented in this chapter are interpreted in the context of real gases. The

ideal gas law, P V  = N kBT , treats the molecules of a gas as non-interacting point particles.

In practice, it serves as an approximation for a dilute real gas, where the interactions between

molecules are few and infrequent. The equation of state of a real gas can be written as a virial 

series 

kBT =

1 +

V B(T ) +

2

C (T ) + . . .

(3.1)

where B(T ), C (T ), . . . are called the virial coefficients , and are functions of temperature. The

first discernable deviation from the ideal gas law (as the density of the gas increases) is due

to the contribution of the second virial coefficient, B(T ). Hence the second virial coefficient is

often the only correction that is considered.

The second virial coefficient is written in terms of the potential φ(r) as [13]:

B(T ) = 2π

 ∞0

(1 − e−

φ(r)kBT  )r2dr. (3.2)

This correction was included in measuring the pressure, as we shall see in Section 3.4.

The simulations were constructed as follows:

1. Initialize particle positions and momenta.

2. Compute forces on particles.

3. Integrate equation of motion.

4. Measure relevant quantities.

5. Repeat (2)–(4) for the designated period of time.

6. Compute averages.

16

Page 21: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 21/41

3.1 InitializationThe initial particle positions must be chosen so that there is no appreciable overlap of atomic

cores. The simplest way to do this is to place the particles on a lattice. For the simulations in

this chapter, the particles were placed on a simple cubic lattice. The lattice spacing was chosen

to obtain the appropriate density. The initial velocities should conform to the desired initial

Figure 3.1: Initial configuration of a simulation. Particles placed at lattice points

temperature. They may be chosen randomly from the Maxwell-Boltzmann distribution

f (v) =

m

2πkBT 

32

exp(−mv2/2kB T ). (3.3)

As a simple alternative, each velocity component may be chosen to be uniformly distributed in

a range [−vmax, +vmax]. This approach was adopted here with vmax = 0.5. Allen and Tildesley

claim in [4, p.170] that the Maxwell-Boltzmann distribution is rapidly established by molecular

collisions within 100 time steps. We see this in Fig. 3.2. I tested whether the velocities obey

the Maxwell-Boltzmann distribution at equilibrium (Section 3.4). The velocities were corrected

so that there was no overall momentum by setting the center of mass to zero. This prevents the

system from drifting in space.

17

Page 22: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 22/41

3.2 Computing ForcesThe force is the gradient of the potential (2.7). I implemented the Lennard-Jones potential

(2.4), and so the x-component of the force for the ith particle is given by

f xi(r) = −∂φLJ (r)

∂xi

= −xi

r

∂φLJ (r)

∂r

=48xi

r2 1

r12− 0.5

1

r6 (3.4)

in reduced units.

3.3 Integration

I implemented the velocity Verlet algorithm (2.15). Unlike the plain Verlet algorithm, we do not

need to store positions from two previous time-steps. The velocity Verlet algorithm calculates

the velocities more accurately than the plain Verlet algorithm [7, p.233], and is more convenient

to code. I used a time-step of ∆t = 0.005.

3.4 Measurements

Equilibrium must be established before measurements can be made. The instantaneous potential

and kinetic energy can be monitored to determine when the system reaches equilibrium. I let

the simulation run for 1000 time-steps before taking measurements. From Fig. 3.2, we see that

by 1000 time-steps, the potential and kinetic energy were fluctuating about equilibrium values.

The measurements involve time averages of a physical quantity A over the system trajectory

A =1

N i=1

Ai(t)

for N  time-steps.

The averages are subject to systematic and statistical errors. Systematic errors are associated

with numerical integration, finite size effects and interaction cut-off. Statistical errors are due

to random fluctuations in measurements. If the Ai were independent, then the variance of the

average would give a measure of its accuracy. However, the measurements are correlated [2], and

18

Page 23: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 23/41

-50

0

50

100

150

200

250

0 200 400 600 800 1000 1200 1400

time-steps

Potential energy

Kinetic energy

TOT ENERGY

(a) First 1500 time-steps

-50

0

50

100

150

200

250

20000 20500 21000 21500 22000

time-steps

TOT ENERGY

(b) After 20000 time-steps

Figure 3.2: Equilibration phase for a system at T ∗ = 2 and ρ∗ = 0.08. Potential and Kinetic

energy fluctuate about equilibrium values.

the variance must take this into consideration. A simpler method of determining the variance

is using block averaging [2]. Averages evaluated over blocks of successive values are used to

determine the variance.

The physical properties measured were:

• Energy : The total energy in each time step E  = K (t)+U (t) is conserved by Newtonian

dynamics (Fig. 3.2). In a computer simulation though, there are small fluctuations in the total

energy.

The potential energy is

U (t) =N 

i=1

 j>i

φ|ri(t) − r j(t)| (3.5)

where φ(r) is the Lennard-Jones potential. The kinetic energy is

K (t) =1

2

N i=1

mi|vi(t)|2. (3.6)

• Temperature : The instantaneous temperature is computed from the equipartition

formula

K  =3

2N kBT. (3.7)

• Pressure : The instantaneous pressure is computed from the virial equation.

19

Page 24: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 24/41

P V  = N kBT  +1

D

i=1

ri · Fi

(3.8)

where D is the dimensionality of the system. Here,

1

D

i=1

ri · Fi

(3.9)

is the virial correction to the ideal gas equation. The derivation of (3.9) from the virial theorem

is found in [13, ch.7]. In the case of pairwise interactions via a potential φ(r), (3.8) becomes

P V  = N kBT  − 1

D

i=1

rijdφ

dr

rij

. (3.10)

The particle velocities of a gas in equilibrium obey the Maxwell-Boltzmann distribution given

in (3.3). After angular integration (3.3) becomes

f (v)∝

v2 exp(−

v2/2T ) (3.11)

in reduced units. To demonstrate this principle, I ran simulations for a dilute gas (ρ∗ = 0.0011)

at T ∗ = 2.28 and T ∗ = 1 and constructed histograms for the velocities. The initial velocities

were drawn from a uniform distribution in the interval [−0.5 : 0.5]. From Figures 3.3 and

3.4, we see that the velocity distribution of the particles approach the the Maxwell-Boltzmann

distribution.

20

Page 25: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 25/41

0

0.05

0.1

0.15

0.2

0.25

0.3

0 1 2 3 4 5 6

        f        (      v        )

v

freq distr.

Maxwell distr.

(a) Initial distribution

0

0.05

0.1

0.15

0.2

0.25

0.3

0 1 2 3 4 5 6

freq distr.

Maxwell distr.

(b) After 32000 time-steps

Figure 3.3: T ∗ = 1

0

0.05

0.1

0.15

0.2

0.25

0 1 2 3 4 5 6

        f        (      v        )

v

freq distr.Maxwell distr.

(a) Initial distribution

0

0.05

0.1

0.15

0.2

0.25

0 1 2 3 4 5 6

        f        (      v        )

v

freq distr.Maxwell distr.

(b) After 6000 time-steps

Figure 3.4: T ∗ = 2.28

The graphs in Fig. 3.5 were generated by taking averages over 30 runs, where each run

lasted for 31000 time-steps. In order to allow the system to reach equilibrium before taking

measurements, data was collected after 1000 time-steps. To cool the system (consisting 64

particles), the particle velocities were rescaled by a factor of 0.4 after each run. The graphs

show that P ∗ ∝ T ∗. Fig. 3.5(a) suggests that the system undergoes a phase transition. This is

further supported by Fig. 3.5(b), which shows that the system behaves like an ideal gas when

the intermolecular forces are absent.

A phase transition occurs when the free energy becomes non-analytic. It is signalled by an

21

Page 26: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 26/41

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

      P    r    e    s    s    u    r    e

Temperature

ρ*=0.02ρ*=0.04ρ*=0.06ρ*=0.08

(a) With intermolecular forces

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

      P    r    e    s    s    u    r    e

Temperature

ρ*=0.02ρ*=0.04ρ*=0.06ρ*=0.08

(b) Without intermolecular forces

Figure 3.5: Cooling systems at constant density.

abrupt change in the thermodynamic properties of a system. The thermodynamic properties of 

a system may be expressed in terms of the free energy and its derivatives. For instance

P  = −∂F 

∂V 

T S  = −∂F 

∂T 

where P  = pressure, T  = temperature, V  = volume and F  = free energy. We do not see the

full definition of a phase transition in this simulation because a finite system is used.

In Table 3.1, we see that for low densities, the slope of graphs in Fig. 3.5(a) and Fig. 3.5(b)

are almost equal. As the density increases, the effect of the second virial coefficient becomes

more pronounced, and the differences in the slopes increase.

slope 

density  ρ∗ Fig. 3.5(a) Fig. 3.5(b)

0.02 0.019 0.02

0.04 0.034 0.04

0.06 0.049 0.06

0.08 0.06 0.08

Table 3.1: Slopes of constant density plots in Fig. 3.5(a) at high temperatures (before the kinks

appear) and in Fig. 3.5(b).

22

Page 27: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 27/41

0

0.05

0.1

0.15

0.2

0.25

0 1000 2000 3000 4000 5000 6000 7000

      P    r    e    s    s    u    r    e

Volume

T*=0.1T*=0.5T*=1

T*=1.5

(a) With intermolecular forces

0

0.05

0.1

0.15

0.2

0.25

0 1000 2000 3000 4000 5000 6000 7000

      P    r    e    s    s    u    r    e

Volume

T*=0.1T*=0.5T*=1

T*=1.5

(b) Without intermolecular forces

Figure 3.6: Plots of isotherms

The graphs in Fig. 3.6 were generated by taking averages over 40 runs, with each run

spanning 21000 time-steps. 125 particles were simulated. The volume was reduced by rescaling

the length of the box by a factor of 0.94. Particles that lay outside the box after rescaling were

replaced with the periodic image (with respect to the new box length) that was within the box.

Following this, I let the system run for 1000 time-steps before taking measurements. We see

from Fig. 3.6(a) that at high temperatures, the system behaves like an ideal gas (compare with

Fig. 3.6(b)). When the temperature is lowered, the system deviates markedly from an ideal

gas. The plot for T ∗ = 0.1 in Fig. 3.6(a) shows the pressure as fairly constant before it rises

sharply when the system is compressed further. This is consistent with the finite size of real gas

molecules, as opposed to the point mass approximation made for an ideal gas. Fig. 3.7 shows

the P-V-T surface.

23

Page 28: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 28/41

Figure 3.7: P-V-T surface

Fig. 3.8 shows a configuration of a system of density ρ∗ = 0.0011 that was cooled from atemperature of  T ∗ = 3 to T ∗ = 0.0004. The atoms vibrate about fixed positions as a result of 

their thermal energy, and give rise to the graphs in Fig. 3.9 and Fig. 3.10. This behaviour is

typical of a solid.

24

Page 29: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 29/41

Figure 3.8: Configuration of a simulation after 5000 time-steps

-2

-1.5

-1

-0.5

0

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

          E        n        e        r        g        y

time-step

Kinetic energy

Potential energy

Total Energy

Figure 3.9: Energy plot

25

Page 30: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 30/41

-1.98

-1.97

-1.96

-1.95

-1.94

-1.93

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

                   E              n              e              r              g              y

time-step

(a) Potential energy

-0.01

0

0.01

0.02

0.03

0.04

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

                   E              n              e              r              g              y

time-step

(b) Kinetic energy

Figure 3.10: Energy plots.

In this chapter, we saw that the Lennard-Jones potential was a good model for the interactions

between molecules of a real gas. The system under study behaved like an ideal gas at high

temperatures and low density. When the temperature was lowered or the density increased,

we were able to observe the effect of intermolecular forces, and at very low temperature, we

observed solid-like behaviour.

26

Page 31: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 31/41

CHAPTER 4

Long Range Interactions

In Chapter 2, a long-range potential was defined as one which decays no faster than r−d, where

d is the dimensionality of the system. Examples are the Coulomb and dipolar potentials which

are proportional to r−1 and r−3 (in three dimensions) respectively. As shown in Fig. 2.7, the

effect of the Coulomb force is felt for long distances (even after the Lennard-Jones force has

worn off ). In a case like this we cannot truncate the force at a cut-off radius. Instead we are

faced with the computation of interactions between a particle and all  the periodic images. This

will require a large amount of computing power, especially as the number of simulated atoms is

increased.

Some techniques have been developed to deal with this problem. They include the Ewald

summation, fast multipole methods, particle-particle/particle mesh methods, and the reactionfield method. The Ewald summation, particle-particle/particle mesh (PPPM) method and the

reaction field method all work by splitting the potential energy computation. In Ewald summa-

tion, one component is due to screened charges, and is computed in real space while the other

component is due to a compensating charge distribution and is computed in Fourier space. The

computation time of the Ewald summation is O(N 32 ). The reaction field method works by com-

puting the interaction of particles within a sphere of known cut-off radius, and the interaction

due to the surrounding medium (of known dielectric constant) beyond the sphere. The reaction

field method is an O(N ) method (especially when time saving devices like the neighbour list

are used), but has the limitation that the dielectric constant of the medium must be known

[7]. The particle-particle/particle mesh scheme calculates one component of the potential as

particle-particle short-range interactions. The remaining long-range contribution is solved on a

mesh, usually by implementing fast Fourier transforms. The PPPM is O(NlogN ) and works

well for large systems. The fast multipole method is a tree algorithm and works by grouping

particles into clusters. It is O(N ), and it works best with large systems.

The rest of this chapter examines the Ewald summation in the context of Coulomb interac-

27

Page 32: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 32/41

tions [1, 4]. Implementation of the Ewald sum using particle mesh Ewald and smooth particle

mesh Ewald methods is found in [11].

4.1 Ewald Summation

If we consider a system of  N  charged particles in a simulation box (of length L) with periodic

boundary conditions, we can write the Coulomb contribution to the potential energy as

U  =1

2

n=0

i=1

 j=1

q iq  j

|r

ij +n

L|. (4.1)

The prime indicates that the sum does not include the particle j = i when n = 0 (that is, an

ion interacts with its periodic images but not with itself). The vector n = (nx, ny, nz), where

nx, ny, nz are integers, extends the interactions to the periodic boxes surrounding the simulation

box in a spherical manner. The electrostatic potential for an ion at position i is

φ(ri) =∞

n=0

 j=1

q  j|rij + nL| (4.2)

We assume the system is electrically neutral, that is

i q i = 0.

The expression in (4.2) above converges slowly, and therefore is not evaluated directly. The

trick lies in rewriting the expression for the charge density. In (4.1), the charge density is

represented as a sum of  δ  functions.

ρ(r) =N 

v=1

q vδ (r − rv). (4.3)

Assume that each particle with charge q i is surrounded by a neutralizing charge distribution

of equal magnitude but opposite in sign (Fig. 4.1(a)). The charge cloud screens  the point charge

so that the potential due to the screened charge falls to 0 rapidly at large distances. Typically,

a Gaussian charge distribution is used. The potential due to the screened charges (now short-

ranged) constitute the real space  part of the Ewald sum. To correct the screening effect, we

introduce a cancelling charge cloud equal in magnitude to the point charge (Fig. 4.1(b)). This

cancelling charge cloud is a smoothly varying periodic function and can therefore be represented

by a rapidly converging Fourier series. The potential due to this distribution is computed as the

Fourier space  part of the Ewald sum.

28

Page 33: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 33/41

(a) Screened p oint charges (b) Cancelling charge distribution

Figure 4.1: The Ewald method of dealing with long-range interactions.

The sums above include the interaction of each ion with the surrounding charge cloud. This

self-interaction must be subtracted from the sums. The medium surrounding the periodic system

also has to be taken into consideration since the system can interact with its surroundings.

The Ewald formula for the potential energy of the system is:

U  = U rs + U fs + U med − U self  (4.4)

where U rs is the potential energy computed in real space, U fs is the potential energy computed in

Fourier space, U med is the potential energy due to the medium, and U self  is the potential energy

due to the interaction of an ion with the surrounding Gaussian charge cloud.

To obtain the components of the potential energy, we shall solve Poisson’s equation

−∇2

φ(r) = 4πρ(r) (4.5)

for the electrostatic potential. We assume that the form of the Gaussian charge distribution

surrounding an ion i is

ρ(r) = q i(α/π)32 e−αr2 . (4.6)

29

Page 34: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 34/41

4.1.1 Fourier Space Component of the Potential Energy

The charge density is given by

ρfs(r) =n

N  j=1

q  j(α/π)3/2exp[−α|r − (r j + nL)|2]. (4.7)

Poisson’s equation becomes:

−∇2φfs(r) = 4πρfs(r). (4.8)

Taking the Fourier transform :

−∇2φfs(r) = −∇2(1

k

φfs(k)eik.r); k = 2πn/L

=1

k

k2φfs(k)eik.r. (4.9)

(4.10)

So we have

1

V k

k2φfs(k)eik.r =1

V k

4πρfs(k)eik.r

k2φfs(k) = 4πρfs(k), (4.11)

where

ρfs(k) =

 V 

dr e−ik.rρfs(r)

=

 V 

dr e−ik.rn

N  j=1

q  j(α/π)3/2 exp[−α|r − (r j + nL)|2] (using 4.7)

all spacedr e−ik.r

N  j=1

q  j (α/π)3/2 exp[−α|r − r j |2]

=N 

 j=1

q  j e−ik.rj e−k2/4α. (4.12)

Hence using (4.11)

φfs(k) =4π

k2

N  j=1

q  j e−ik.rj e−k2/4α k = 0 (4.13)

30

Page 35: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 35/41

Therefore we can express the electrostatic potential as

φfs(r) =1

k=0

eik.rφfs(k)

=1

k=0

N  j=1

k2q  j eik.(r−rj) e−k2/4α, (4.14)

and from this compute the potential energy

U fs =1

2

m=1

q mφfs(ri)

=1

2V 

k=0

N m=1

N  j=1

k2q mq  j eik.(rm−rj) e−k2/4α

=1

2V 

k=0

k2|ρfs(k)|2e−k2/4α (4.15)

(4.16)

where

ρfs(k) ≡N 

m=1

q ieik.rm. (4.17)

4.1.2 Self-Interaction Component of the Potential Energy

The potential energy above contains a term due to the interaction of a point charge with the

surrounding Gaussian cloud. We must therefore subtract the potential energy at the origin of 

the Gaussian cloud. The extra charge distribution is

ρG(r) = q i(α/π)32 e−αr2 .

We can compute the potential due to this charge distribution from Poisson’s equation. Using

the spherical symmetry for the Gaussian charge cloud, we can write Poisson’s equation as

−1

r

∂ 2(rφG(r))

∂r2= 4πρG(r). (4.18)

31

Page 36: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 36/41

Integrating (4.18) yields

−∂ (rφG(r))

∂r=

 r

dr 4πrρG(r)

= − ∞

rdr 4πrq i(α/π)

32 e−αr2

= −2q i(α/π)12 e−αr2 (4.19)

rφG(r) = 2q i(α/π)12

 r

0dr e−αr2

= q ierf(

√ α r)

φG(r) =q ir

erf(√ 

α r). (4.20)

At the origin of the Gaussian, r = 0. Applying l’Hospital’s rule to (4.20), we obtain

φG(r = 0) = 2q i(α/π)12 . (4.21)

Hence the potential energy due to self-interaction is

U self  =

1

2

N i=1

q iφself (ri)

= (α/π)12

N i=1

q 2i . (4.22)

4.1.3 Real Space Component of the Potential Energy

Here, we want to compute the potential energy contribution from the screened point charges. The

electrostatic potential due the a screened point charge is obtained by subtracting the potential

due to the surrounding Gaussian charge cloud from the potential due to the point charge.

φrs(r) =q ir

− q ir

erf(√ 

α r)

=q ir

erfc(√ 

α r). (4.23)

The potential energy is then

U rs =1

2

i= j

q iq  jr

erfc(√ 

α r). (4.24)

32

Page 37: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 37/41

4.1.4 Potential Energy due to Interaction with the Surrounding Medium

Instantaneous dipoles occur during the simulation, giving rise to surface charges at the boundary

of the simulation sphere. The system becomes polarized, and this creates an electric field. The

medium responds with a depolarising field. The total work needed to achieve a net polarization

accounts for the potential energy due to the interaction of the system with the medium. This

contribution to the potential energy corresponds to the k = 0 term that has not been included

so far. For a system of charges, this energy is

U med =2π

(2 + 1)V 

i=1

riq i

2

, (4.25)

where is the dielectric constant. If the system is embedded in a good conductor ( → ∞),

this term vanishes.

Assuming our system is embedded in a conductor, the total electrostatic contribution to the

potential energy is

U  =1

2V 

k=0

k2|ρfs(k)|2e−k2/4α +

1

2

N i= j

q iq  jrij

erfc(√ 

α rij ) − (α/π)12

N i=1

q 2i . (4.26)

The parameter α determines the shape of the Gaussian distribution, and is chosen to maxi-

mize numerical accuracy. A typical value of  α is 5/L [2].

33

Page 38: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 38/41

Page 39: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 39/41

the force calculation [1]. The Verlet list method (Fig. 5.1) works by keeping a periodically up-

dated list of the neighbours of each particle. These neighbours are in a sphere of radius rv > rc,

where rc is the cut-off radius. Only interactions with particles within this sphere are calculated,

thus saving us from computing the distance between a particle and all the other N − 1 particles

[1, 2, 4]. In the cell list method (Fig. 5.2), the simulation box is divided into cells of length at

least equal to the cut-off radius. Each particle in a given cell interacts with only particles in the

same or neighbouring cells. The cell list method is O(N ) [1, 2].

r

r

c

v

i

Figure 5.1: Verlet list method. Particle i interacts with particles within the radius rv

i

Figure 5.2: Cell list method. Particle i interacts with particles in the 9 shaded cells.

35

Page 40: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 40/41

Bibliography

[1] D. Frenkel, B. Smit. Understanding Molecular Simulation: From Algorithms to Applica-

tions , 2nd Edition. Academic Press, London, 2002.

[2] D.C. Rapaport. The Art of Molecular Dynamics Simulation . Cambridge Univ. Press, Cam-

bridge, 1995.

[3] Furio Ercolessi. A Molecular Dynamics Primer .

http://www.fisica.uniud.it/∼ercolessi/md/md.

[4] M.P Allen, D.J. Tildesley. Computer Simulation of Liquids . Oxford Univ. Press, New York,

1987.

[5] D. Tabor. Gases, Liquids, and Solids, and other states of matter , 3rd Edition. Cambridge

Univ. Press, Cambridge, 1991.

[6] Alan J. Walton. Three Phases of Matter . Oxford Univ. Press, New York, 1983.

[7] R.J. Sardus. Molecular Simulation of Fluids: Theory, Algorithms and Object-Orientation .

Elsevier, The Netherlands, 1999.

[8] Michael P. Allen. Introduction to Molecular Dymanics Simulation . Lecture Notes, John von

Neumann Institute for Computing, Julich, NIC Series, Vol. 23, p. 1-28, 2004.

[9] A.M. Krivtsov and M. Wiercigroch. Molecular Dynamics Simulation of Mechanical Prop-

erties for Polycrytal Materials . Mater. Phys. Mech. 3 (2001) p.45-51.

[10] Wayne B. Hayes. Shadowing High-dimensional Hamiltonian Systems: the gravitational N-

body problem . Department of Computer Science, University of Toronto, Ontario, Canada.

2002.

[11] Markus Deserno, Christian Holm. How to mesh up Ewald sums (I): A theoretical and nu-

merical comparison of various particle mesh routines . J. Chem. Phys. 109, (1998) 7678.

36

Page 41: Molecular Dynamics Simulation_NneomaAimsEssay

7/30/2019 Molecular Dynamics Simulation_NneomaAimsEssay

http://slidepdf.com/reader/full/molecular-dynamics-simulationnneomaaimsessay 41/41

[12] Herbert Goldstein. Classical Mechanics , 2nd Edition. Addison-Wesley Publishing Company,

Philipines, 1980.

[13] Benjamin Widom. Statistical Mechanics: A concise introduction for chemists . Cambridge

Univ. Press, Cambridge, 2002.

[14] Khadija Elbouchefry, Djalil Ayed and Onwunta Akwum. Structure Preserving Algorithms .

http://www.aims.ac.za/internal/presentations.