You are on page 1of 37

Lecture notes on MMM

Chapter 3:Interatomic Potential


3.1 Introduction to interatomic potentials
In Molecular Dynamics (MD) and Monte Carlo (MC) simulation we must have some rules, which governs the interactions between the atoms. In classical simulation these rules are expressed in terms of potential functions. Interatomic potential describes how the atoms interact with each other. For example, in case of ionic solids the main source of cohesion is Columbic attraction force. Ions with the opposite charge attract each other. In the absence of any repulsive force all the atoms will collapse into one point. But this does not happen in real case so there must be some repulsive force, which prevents the atoms to collapse into one point. There are two types of repulsive forces in ionic solids. One is due to Columbic interaction. Ions with the same charge repulse ease other. Also when the ions comes very close to each other a strong repulsive force due to Paulis exclusion principle acts which is a very strong function of distance between the ions. There is one more kind of interaction between the ions is van der Waals interaction. Which is the weakest interaction among all. Similarly in case of metals the main source of cohesion is free electrons. In case of metallic solids it is assumed that there is a pool of free electrons and positive ions are submerged in the pool. So more the density of free electrons stronger will be the attractive force. Similar to the ionic case a strong repulsive force, due to Paulis exclusion principle, acts when the atoms comes very close to each other. The potential function U(r1, r2, , rN) describes how the potential energy of a system of N atoms depends on the coordinates of the atoms, r1, r2, , rN. In classical MD or MC simulation electrons comes nowhere in the calculations. It is assumed the electrons adjust to new atomic positions much faster than the motion of the atomic nuclei (BornOppenheimer approximation). The behavior of the electrons is approximated in the potential itself.

39

Lecture notes on MMM

3.2 How to obtain the potential function for a particular system? 3.2.1 Empirical potential function: A functional form is assumed for the
potential function and then we fit the parameters to reproduce a set of experimental data like lattice parameter, elastic constants, thermal expansion coefficient etc. This gives empirical potential functions (e.g. Lennard-Jones, Morse, Born-Mayer). These potentials have no direct physical basis but still widely used in many types of problems because of their simplicity, computationally less expensive and reasonable accuracy.

3.2.2 Semi-empirical Potentials: The electronic wave function can be calculated


for fixed atomic positions. But for a system consist of many atoms this type of calculation is very difficult. Different approximations are used and analytic semiempirical potentials are derived from quantum-mechanical arguments (e.g. Embedded Atom Method (EAM) by Foiles, Baskes, and Daw, Glue Model by Ercolessi et al., bondorder potentials by Tersoff and Brenner, etc.). These are also called many body potential because the potential depends on the density of surrounding atoms. These potentials are more complex and computationally more expensive but provide good description of different types of materials like metals and ceramics.

3.2.3 Potentials from Ab-initio calculations: Direct electronic-structure


(quantum-mechanics-based) calculations of forces can be performed during so-called abinitio MD simulation (e.g., Carr-Parrinello method using plane-wave psuedopotentials). Potentials obtained from ab-initio method are most accurate because these are obtained from electronic calculation using first principle and number of assumptions or experimental parameters used is negligible. For more detailed and elaborated analysis these types of potentials are used.

3.3 The Born-Oppenheimer approximation


In the MD and MC methods potential functions are used to describe the interaction among the atoms. But in actual case atoms consist of a nucleus and electrons around it and electrons play a vital role in defining the interactions and bonds between the atoms. In the potential functions interaction of electrons with nuclei are not considered. Is the

40

Lecture notes on MMM use of the potential function is justified. Hamiltonian of the real material is defined by the presence of nuclei and electrons and can be written as follows:
2 Zi Z je 2 p Pi2 Zi e 2 1 1 e2 1 H= + + + 2 ij R i R j 2 r r 2 i R i r i 2M i 2m

3.3.1

where Pi, Mi, Ri and Zi are momentum, mass, coordinates and atomic number of the nucleus i and p, m, r and e are momentum, mass, coordinates and charge on electron . A Schrdinger equation H=E should be solve to get the total wavefunction (Ri, r), which tells everything about the system. But this is impossible for any system of practical use. In 1923 Born and Oppenheimer shown that the electrons (me=5.510-4 amu) are much lighter than nuclei and are moving much faster. So it can be safely assumed that the nucleus is fixed with respect to electrons and the total wavefunction is factorized as: (Ri, r) = (Ri) (r; Ri) 3.3.2 where (Ri) describe the nuclei, and (r; Ri) depends parametrically on Ri and describes electrons. The problem can be reformulated in terms of two separate Schrdinger equations: Hel (r;Ri) = U(Ri) (r;Ri) Hi (Ri) = E (Ri) Where 3.3.3 3.3.4

H el =

2 Zi Z j p Z e2 1 1 e2 + + i 2 m 2 ij R i R j 2 r r i R i ri

3.3.5

and
Hi =
i

Pi + U(R i ) 2M i

3.3.6

the equation 3.3.3 for the electronic problem gives eigenvalue of the energy U(Ri) that depends parametrically on the coordinates of the nuclei, Ri. After determining U(Ri) we put it in equation 3.3.4, which describe the motion of nuclei. Equation 3.3.4 does not include any electronic degrees of freedom, all electronic effects are incorporated in U(Ri) that is called interatomic potential. Schrdinger equation is replaced with Newtonian equation in classical MD simulation. This replacement is justified for most of the cases except for lightest atoms.

41

Lecture notes on MMM

3.4 Characteristics of potential


If we look into the literature will find different kinds of potential available for simulation of different materials. Many things govern our choice of potential. Firstly, what type of materials we are going to simulate? Second, what will be the size of our simulation domain? Thirdly, what type of accuracy we want for our simulation. Fourthly, what types of computational resources are available for simulation? Finally, up to what time we have to simulate the problem (in molecular dynamics simulations). Typical time of these problems vary form hundreds of femto-second (1x10-15 second) to few microsecond. Potentials can be appropriate or inappropriate for a given problem. characteristics should be considered while selecting a potential. Following

1. Accuracy potential is able to reproduce properties of interest as closely as possible.

High accuracy is typically required in Computational Chemistry. Computational domain is typically very small in this case.
2. Transferability potential can be used to study a variety of properties for which it

was not fit. It is the most important characteristic of potential for empirical potential. Empirical potential is fit using one set of parameters obtained from different experiments. Transferability requires that the same potential must be able to reproduce other set of parameters, which were not used to fit the potential.
3. Computational speed - calculations are fast with simple potentials. Most of empirical

potentials have simple form hence they are used extensively in different types of problems. Computational speed is often critical in Materials Science where processes have a collective character and big systems should be simulated for long times.

3.5 Pair potentials vs. many-body potentials


The total energy of a system of N atoms with interaction described by an empirical potential can be expanded in a many-body expansion:
U( r1 , r2 , , rN ) = U1 ( ri ) + U 2 ( ri , rj ) + U 2 ( ri , rj , rk ) +
i i j >i i j > i k> j

3.5.1

where, 1. U1 one-body term, due to an external field or boundary conditions (wall of a container). 42

Lecture notes on MMM

2. U2 two-body term, or pair potential. The interaction of any pair of atoms depends only on their spacing and is not effected by the presence of other atoms. 3. U3 three-body term arises when the interaction of a pair of atoms is modified by the presence of a third atom. Based on this expansion, we can loosely separate potentials into two classes:
1. Pair potentials (only U2 is present) and 2. Many-body potentials (U3 and higher terms are included).

In most of materials interaction of two atoms is affected by the presence of its neighbors. In many body potentials we accounted the presence of its neighbors in the calculations while in case of two body potentials we treat the interaction between the two atoms or ions independently. Pair potentials are used for simulation of ionic solids and ideal gas. Pair potential are computationally less expensive hence it is also used for other materials like metals for simulating the general class effect with reasonable accuracy. MBP are computationally more expensive but describes the materials like metals more elaborately. We will also consider examples of many-potentials in which multi-body effects are included implicitly, through an environment dependence of two-body terms

3.6 Short review of potentials used in MD and MC


Pair Potentials (hard spheres, Lennard-Jones, Morse) can be used :

1. for inert gases, intermolecular van der Waals interaction in organic materials; 2. for investigation of general classes of effects (material non-specific). The total potential energy of the system of N atoms interacting via pair potential is: U( r1 , r2 , , rN ) = U 2 (rij ) where rij = rj ri 3.6.1
i j>i

Commonly used examples of pair potentials:

3.6.1 Hard/soft spheres potential It is the simplest potential without any


cohesive interaction i.e. there is no attractive force present. A very strong repulsive force act when the spacing between the two atoms reaches below certain cutoff distance. It is useful in theoretical investigations of some idealized problems. But it is difficult to handle singularity in simulation. So we use a soft sphere model in which the transformation of potential is gradual. Still it is not a realistic model for real materials. We have very limited use of these potentials for real problems. 43

Lecture notes on MMM


U(rij ) = 0 for rij r0 hard sphere potential for rij > r0
n

3.6.2

rij U(rij ) = r 0

- soft sphere potential

3.6.3

3.6.2 Ionic potential In ionic solids the main source of cohesion is Coulomb
interaction of charges attraction.

U(rij ) =

qiq j rij

3.6.4

These are very strong forces and have long range of influence i.e. the force dies out very slowly. As we will see later that we can not use simply a cutoff radius and determine the sum of total energy of forces as in case of other potentials. We have to give some special treatment to obtain the summation of the potential. Ions like O-- have a tendency to polarize and form dipoles in presence of electric field. These dipoles also play an important role in cohesive energy of the system. So the columbic potential is often added to other functional forms to account polarization.

3.6.3 Lennard-Jones potential From computational point of view this potential


is very efficient. It describes the van der Waals interaction in inert gases and molecular systems very accurately. Lennard-Jones potential can also be used to study the solid and liquids. It is often used to model general effects (drop collision with surface, study of the behavior of crack in fracture mechanics problems etc.) with very large system rather than properties of a specific material. 12 6 U(rij ) = 4 r r ij ij 3.6.5

3.6.4 Morse potential It is similar to Lennard-Jones but is a more bonding-type


potential and is more suitable for cases when attractive interaction comes from the formation of a chemical bond. This potential can be used for materials, which we encounter in daily life like metals. It is proposed by P. M. Morse, Phys. Rev. 34, 57, 1930. It was a popular potential for simulation of metals that have fcc and hcp structures. A fit for many metals is given by Girifalco and Weizer, Phys. Rev. 114, 687, 1959.
44

Lecture notes on MMM

- (rij - r0 ) - 2 (rij - r0 ) U(rij ) = e 2e

3.6.6

3.6.5 6-exp (Buckingham) potential exp term (Born-Mayer) provides a better


description of strong repulsion due to the overlap of the closed shell electron clouds, which is important in simulation of bombardment by energetic atoms or ions, etc. U(rij ) = A e -rij R BM B rij6 3.6.7

repulsion. Most of the potentials like Columbic potential and EAM potential (which is a many body potential) use exp potential to describe the strong repulsive

3.7 Lennard Jones potential


3.7.1 Introduction
The expression for Lennard Jones potential can be given by the following equation. 12 6 U(rij ) = 4 r r ij ij 3.7.1

where rij is the distance between the atoms under consideration and and are material specific constants. Values of constants and are determined by fitting the potential for particular material. The potential is plotted below which describes different zones of the potential like dipole-dipole attraction, equilibrium and Pauli repulsion. X-axis shows the distance between the two atoms while y-axis represent the potential energy.

45

Lecture notes on MMM

0.05
Pauli Repulsion

0.04

0.03

Potential Energy

0.02

0.01
Dipole-dipole attraction

-0.01
Equilibrium

-0.02

10

distance between two atoms r


Figure 1 plot of Lennard-Jones pair potential for Ar

When the spacing between the atoms is very large a week dipole-dipole attraction acts between them. As the spacing between the atoms decreases the attractive force increases. The term ~1/rij6, dominating at large distance, constitute the attractive part and describes the cohesion to the system. A 1/r6 attraction describes van der Waals dispersion forces (dipole-dipole interactions due to fluctuating dipoles). These are rather weak interactions, which however are responsible for bonding in closed-shell systems, such as inert gases. A strong repulsive force due to overlapping of close shell electrons counteracts the attractive force before reach the equilibrium position. At equilibrium position resultant force between the atoms is zero and potential energy is minimum at this position. If the spacing between the atoms further decreases the repulsive force increases very rapidly. The term ~1/rij12 represents the repulsion between atoms when they are brought close to each other. Its physical origin is related to the Pauli principle: when the electronic clouds surrounding the atoms starts to overlap, the energy of the system increases abruptly. The exponent 12 was chosen on a practical basis: Lennard-Jones potential is particularly easy to compute. In fact, on physical grounds an exponential behavior would be more appropriate. Exponential term for repulsion (Born-Mayer potential) is typically used in simulations where high-energy inter-atomic collisions are involved. 46

Lecture notes on MMM

3.7.2 Application of L-J potential:


1. The potential provides a good description of van der Waals interaction in inert gases and molecular systems (Ar, Kr, CH4, O2, H2, C2H4, etc.). Parameters are given in [J. Chem. Phys. 104 8627 (1996)]. Parameters for inert gases can be also found in AshcroftMermin textbook. For example, Ar ( = 0.0104 eV, = 3.40 ) Ne ( = 0.0031 eV, = 2.74 ) Kr ( = 0.0140 eV, = 3.65 ) Xe ( = 0.020 eV, = 3.98 ). 2. The main reason for popularity of Lennard-Jones potential is that it is used in simulations when the objective is to model a general class of effects and the only requirement is to have a physically reasonable potential. Many studies on Lennard-Jones solids, liquids, surfaces, and clusters have been performed. It is the potential of choice in studies when the focus is on fundamental issues, rather than on properties of a specific material.

3.7.3 Derivation of the force for pair potential


In MD simulation we need forces that are acting on the atoms. The forces are given by the gradient of the potential energy surface (the force on atom i is a vector pointing in the direction of the steepest decent of the potential energy):
Fi = r U( r1 , r2 , , rN )
i

3.7.2

ri operates on the position ri of atom i. Any change in the total potential energy that results from a displacement of atom i contributes to the force acting on atom i. For a pair potential:

U( r1 , r2 ,

, rN ) = U 2 (rij )
i j> i

3.7.3

Where rij = ri r j = ( xi x j ) 2 + ( y i y j ) 2 + ( z i z j ) 2 The force on atom i is:

47

Lecture notes on MMM


Fi = r U( r1 , r2 ,, rN ) = U(rij ) i ri j i r r dU(rij ) rij ij + z ij +y U(rij ) = x +z +y = x x i y i z i z i y i j i j i x i drij

3.7.4

ri rj dU(rij ) x ij y z dU(rij ) ij + z ij = f ij = = x +y dr r dr r r r j i j i j i ij ij ij ij ij ij for Lennard-Jones Potential: U (rij ) = 4 r ij


d (rij ) drij Fi = 24
j i

3.7.5

r ij

12

3.7.6

12 6 = 4 12 +6 7 rij rij 1 2 r ij
6

6 (ri r j )
rij8

3.7.7

3.7.4 Potential cut-off


The potential functions like L-J have an infinite range of interaction i.e. whatever is the value of r there is a corresponding value of potential. However as we increase value of r after a certain value of r value of potential energy corresponding to this r is so small that we can ignore the value for a practical problem. In practice a cutoff radius Rc is established and interactions between atoms separated by more than Rc are ignored. There are two reasons for this: 1. If we dont take a cutoff radius then the number of pair interactions grows as N2. Example: Consider system of 3000 atoms. If we dont tank a cutoff radius then the total number of interactions (for force evaluation) in the simulation will be N2/2 = 45 lakhs. While using a cutoff of 8-10 A we can reduce a number of interacting neighbors for each atom to ~50 and we will have to evaluate force only ~50N = 150 thousand times for the simulation. So with the introduction of a cutoff radius we can reduce the computational requirement many times.

48

Lecture notes on MMM

2. The size of the system that can be simulated is finite. As we will see later with the help of the finite size of the domain we evaluate the properties of the bulk materials using periodic boundary conditions. And we will also see that these periodic boundary conditions will require a cutoff radius. But this introduction of cutoff radius also introduces some errors in the calculation as explained below.
0.05
Pauli Repulsion

0.04

0.03

Potential Energy

0.02

0.01
Jump in potential

0
Cutoff Radius Dipole-dipole attraction Equilibrium

-0.01

-0.02

10

distance between two atoms r


Figure 2 Plot of Lennard-Jones potential for Ar with the introduction of the cutoff radius

A simple truncation of the potential creates a jump in the potential at the cutoff distance. This can spoil the energy conservation (i.e. energy of the system will not be remain constant) or lead to unphysical behavior in simulations of the effects where contribution of far-away molecules is important (surface tension, stacking faults, etc.). To avoid this potential can be shifted to get potential energy zero at cutoff distance.
U (rij ) U ( Rc ) U (rij ) = 0

rij Rc rij > Rc

3.7.8

In the sifted potential value of potential at cutoff radius is subtracted from the potential when the distance rij is less than or equal to cutoff radius and its value is zero when the

49

Lecture notes on MMM

distance rij is greater than cutoff radius. This arrangement smooth out the problem of variation of energy.
0.05
Pauli Repulsion

0.04

0.03

original potential shifted potential

Potential Energy

0.02

0.01
Shiftd potential

0
origional potential Dipole-dipole attraction Equilibrium

-0.01

-0.02

10

distance between two atoms r

But for shifted potentials forces, which are derivative of potential energy, can have a jump at the cutoff. To avoid this, a smooth transition function that brings potential to zero can be added.
U (rij ) = 4 rij + 6 r R ij c
12 6

rij 3 R R c c
12 6

R 7 c
2

4 R c

12

cut -off function by S.D. stoddard and J.Ford Phys.Rev.A 8,1504, 1973.

3.7.9

with cutoff function


U ( Rc ) = 0 and

dU (rij ) drij rij = Rc

=0

3.7.10

In any case, physical quantities (cohesive energy, total pressure etc.) are affected by the truncation and most modern potentials for real materials are designed with a cutoff radius in mind, and go to zero at Rc together with several first derivatives of the potential function.

50

Lecture notes on MMM

3.7.5 Limitations of pair potentials


1. Presence of other atoms affects the strength of bond between two atoms. It is called many body effects and also known as environment dependence of bonds. Many body effects are important in real materials. Pair potentials do not have environmental
dependence (e.g. atom in the bulk is too similar to the atom on the surface or near a

defect site). In reality, the strength of the individual bonds should decrease as the local environment becomes too crowded due to the Paulis principle, but pair potentials do not depend on the environment and cannot account for this decrease. Thus modeling of real materials cannot be done accurately using only pair potentials. 2. Most of the ceramic materials have covalent bond. In covalent bonds the two or more atoms share the valence electrons to complete their outer shell. And this sharing in turn give rise to the directional nature of the bond i.e. the bond angle between the atoms remains constant. Pair potentials do not account for directional nature of the bond. In the same fashion covalent contributions (d orbitals) of the transition metals cannot be described using pair potential. Pair potentials work better for metals in which cohesion is provided by s and p electrons. 3. Energy required to remove an atom from its equilibrium position and thus form a vacancy is called vacancy formation energy. The vacancy formation energy, Ev, is significantly overestimated by pair potentials. Pair potential gives the estimation of Ev equal to the cohesive energy per atom in the system Ec. In reality vacancy formation energy is less then the cohesive energy per atom as in case of Cu Ev = 0.33 Ec and for Au Ev = 0.25 Ec. 4. The ratio between the cohesive energy and the melting temperature, Tm, is underestimated by as much as 2-3 times. Metals have some extra cohesion that is less effective than pair potential in keeping the system in the crystalline state. 5. For cubic crystals (bcc, fcc) there exist a relation between the elastic constants (C12 = C44), which is known as Cauchy relation. Ionic materials follow Cauchy relation, but

51

Lecture notes on MMM metals show significant deviation from the Cauchy relation. Pair potentials do not describe the deviations from the Cauchy relation for elastic constants in cubic crystals in case of metals. (C12 = C44 or G = 3/5 B)

3.7.6 Relationship between pair potential and elastic constants The bonding energy density of the system of N atoms interacting via pair potential is:
Eb = 1 2N a

U(r )
ji ij

3.7.11

where a is the average volume per atom. In equilibrium, when the force acting on any particle is zero, the structure must be stable with respect to the application of a small homogeneous strain tensor . Then the displacement vector for each interatomic distance, rij is uij = aij where aij is undeformed value of rij (uij = rij - aij). The elastic energy is expanded into a Taylor series with respect to small displacements:
1 Eb = 2 N a U(rij ) 1 2U(rij ) u ij uij + uij + U(rij ) 0 + 2 rij rij rij j i 0 0

3.7.12

where the evaluation is at the undeformed values of rij and summation is implied by repeated indices. Using uij = aij we can rewrite this equation as

1 Eb ( ) = Eb (0) + A + C + 2 where A = 1 2 N a

3.7.13

j i

U (rij ) rij
0

a ij

3.7.14

is tensor of internal stress. First invariant of this tensor (Axx + Ayy + Azz) is the pressure. In equilibrium A = 0, and C for pair potential 1 = 2 N a 2U (rij )
ij ij
0

r r
j i

a ij a ij

3.7.15

52

Lecture notes on MMM U (rij ) rij 2U (rij ) rij rij


C rij dU (rij ) rij drij

3.7.16

rij rij d 2U (rij ) 1 dU (rij ) dU (rij ) + 1 = 2 2 rij rij d rij rij d rij d rij

3.7.17

1 = 2 N a

1 2 j i rij

d 2U (rij ) 1 dU (rij ) 1 dU (rij ) + a a a a a ij a ij ij ij ij ij d r2 rij d rij rij d rij ij

3.7.18

C is symmetric with respect to all changes of indices and using Voigt notation (C11 = C1111, C12 = C1122, C44 = C2323, C66 = C1212 etc.) we have Cauchy relation C12/C44=1 satisfied. The Cauchy relation is often satisfied for van der Waals solids and ionic crystals. It is never valid for metals (e.g. C12/C44 is 1.5 for Cu, 1.9 for Ag, 3.7 for Au). This means that for van der Waals and ionic solids the total energy may be reasonably well described by the pair potential approximation. But for metals pair interaction may be used to represent only part of the total energy.

53

Lecture notes on MMM

3.8 Embedded-atom and related methods for metallic systems


As we discussed above, pair potentials cannot provide an adequate description of metallic systems. An alternative simple but rather realistic approach to the description of bonding in metallic systems is based on the concept of local density that is considered as the key variable. This allows one to account for the dependence of the strength of individual bonds on the local environment, which is especially important for simulation of surfaces and defects. In metals the main source of cohesion is free electrons. Many methods that have been proposed since early 1980s have different names (e.g. embedded-atom method - EAM, effective medium theory, Finnis-Sinclair potential, the glue model, corrected effective medium potential - CEM, etc.) and are based on different physical arguments (e.g. tight-binding model, effective-medium theory), but result in a similar expression for the total energy of the system of N atoms:
Etot = Ei
i

Ei = Fi ( i ) +

1 ij (rij ) 2 j i

i = f j (rij )
j i

3.8.1

Interpretation and functional form of F, f, and depend on a particular method. From the point of view of effective medium theory or the embedded-atom method, the energy of the atom i is determined by the local electron density at the position of the atom and the function f describes the contribution to the electronic density at the site of the atom i from all atoms j. The sum over function f is therefore a measure of local electron density i. The embedding energy F is the energy associated with placing an atom in the electron environment described by . The pair-potential term describes two-body contribution. The general form of the potential can be considered as a generalization of the basic idea

54

Lecture notes on MMM

of the Density Functional Theory the local electron density can be used to calculate the energy. In addition to having different physical interpretations, the different methods differ in the way function are determined. Some authors derive functions and parameters from first principles calculations, others guess the functions and fit parameters to experimental data Results are usually rather similar. The main advantage of these methods over pair potentials is the ability to describe the variation of the bond strength with coordination. Increase of coordination decreases the strength of each of the individual bonds and increases the bond length.
1 + ij (rij ) Ei = Fi f ( r ) j ij 2 j i j i 3.8.2

i
In order to use this potential in MD simulation we need to find the forces: Fi = Etot = Ei = Fi ( i ) + F j ( j ) + ij (rij ) ri ri i ri j i j i (r r ) f j (r ) F j ( ) ij (r ) F ( ) f i (r ) j i = i + + = r r =r = r r =r r r =r rij j i ij i ij j ij
Only inter-particles distances rij are needed to calculate energy and forces the

3.8.3

calculation is nearly as simple and efficient as with pair potentials. The EAM potential can be called an environment-dependent pair potential. The lack of explicit 3-body terms makes it challenging to design potentials for metals where covalent effects are important.

55

Lecture notes on MMM

Chapter 4: Molecular Dynamics Simulations


4.1 Introduction
Molecular dynamics simulation is a technique for computing the equilibrium and transport properties of a classical many-body system. In this context, the word classical means that the nuclear motion of the constituent particles obeys the law of classical mechanics. This is an excellent approximation for a wide range of materials. Molecular dynamics simulations are in many respects very similar to real experiments. When we perform a real experiment, we proceeded as follows. We prepare a sample of the material that we wish to study. We connect this sample to a measuring instrument (e.g., a thermometer, UTM, manometer), and we measure the property of interest during a certain time interval. If our measurements are subject to statistical noise then longer we average the more accurate is our measurement becomes. In a Molecular Dynamics simulation, we follow exactly the same approach. First, we prepare a sample: we select a model system consisting of N particles and we solve Newtons equation of motion for this system until the properties of the system no longer change with time. After equilibration, we perform actual measurement. In fact, some of the most common mistake that can be made when performing a computer experiment are very similar to the mistakes that can be made in real experiments.(e.g. the sample is not prepared correctly, the measurement is too short, or we do not measure what we think.)

4.2 Molecular Dynamics: A program


The best introduction to Molecular Dynamics simulations is to consider a simple program. The program we consider is kept as simple as possible to illustrate a number of important features of Molecular Dynamics simulations. The program constructed as follows: 1. We read in the parameters that specify the condition of the run (e.g. initial temperature, number of particle, density, time step). 2. We initialize the system (i.e. we select the initial positions and velocities). 3. We compute the forces on all particles.

56

Lecture notes on MMM 4. We integrate Newtons equations of motion. This step and the previous one make up the core of the simulation. They are repeated until we have computed the time evolution of the system for the desired length of time. 5. After completion of the central loop we compute and print the averages of the measured quantities, and stop.
program md call init t = 0 do while (t .lt. tmax) call force(f, en) call integrate(f, en) t = t + delt call sample end do stop end

simple MD program initialization MD loop determine forces integrate equation of motion sample average

a flow chart for Molecular Dynamics algorithm is shown below:


Initialize coordinates, Temperature, velocity etc.

Compute force between the

Integrate the Newtons equation of motion and find new coordinate and velocities

no

System reached equilibrium

Production run Measurement of properties

57

Lecture notes on MMM

4.2.1 Initialization
Algorithm for initialization of a Molecular Dynamics program Initialization of MD program

Subroutine init sumv = 0 sumv2 = 0 do i = 1, npart x(i) = lattice_pos(i) v(i) = (ranf()-0.5) sumv = sumv + v(i) sumv2= sumv2 + v(i)**2 enddo sumv = sumv/npart sumv2 = sumv2/npart fs = sqrt(3 * temp/sumv2) do i = 1, npart v(i) = (v(i) - sumv) * fs xm(i) = x(i) v(i) * dt enddo return stop

place the particles on a lattice give random velocities velocity of center of mass kinetic energy velocity of center of mass mean square velocities scale factor of velocities set desired kinetic energy and set velocity of center of mass to zero position at previous time step

To start the simulation, one must assign positions and velocities to all the particles in the system. The particle position should be chosen compatible with the structure that we are aiming to simulate. The particle should not be placed in positions that result in an appreciable overlap of the atomic or molecular cores. In the present case, we put each particle on its lattice site and then we assign each velocity component a value that is drawn from random distribution in the interval [-0.5, 0.5]. Subsequently, the velocities are shifted such that the total momentum is zero and the velocities are scaled to adjust the mean kinetic energy to the desired value. In thermal equilibrium, the following relation should hold: 2 v = k BT / m, 4.2.1

where v is the component of the velocity of a given particle. We can use this relation to define an instantaneous temperature at time t , T(t):
2 mv ,i (t )

k BT (t )
i =1

Nf

4.2.2

58

Lecture notes on MMM The instantaneous temperature T(t) can be adjusted to match the desired temperature T by scaling all velocities with a factor (T/T(t))1/2. This initial setting of temperature is not particularly critical, as the temperature will change during equilibration. The approximate previous position can be obtained by the use of initial velocities by xm(i) = x(i) . v(i) . dt, where x is present position v is initial velocity and dt is time step for Molecular Dynamics simulation.

4.2.2 Force Calculation


The calculation of forces on every particle is the most time consuming part of Molecular Dynamics simulation. If we consider a model system with pair wise additive interactions we have to consider the contribution to the force on particle i due to all its neighbors. If we consider only interaction between a particle and the nearest image of another particle, this implies that, for a system of N particles, we must evaluate N (N -1)/2 pair distances. Algorithm for calculation of force
subroutine force (f, en) en = 0 do i = 1, npart f(i) = 0 end do do i = 1, npart 1 do j = i + 1, npart xr = x(i) x(j) xr = xr box*nint(xr/box) r2 = xr**2 if(r2.lt.rc2)then r2i = 1/r2 r6i = r2i**3 ff = 48*r2i*r6i*(r6i-0.5) f(i)= f(i) + ff * xr f(j)= f(j) - ff * xr en = en+4*r6i*(r6i-1)-ecut endif enddo enddo return

determine the force and energy set force to zero loop over all pair periodic boundary condition test cutoff Lennard-Jones potential update forces update energy

59

Lecture notes on MMM This implies that, if we use no tricks, the time needed for the evaluation of the forces scales as N2. There exist different techniques to speed up the evaluation of both short range and long-range forces in such a way that computing time scales as N, rather than N2.

4.2.3Integrating the Equations of Motion


After computing all forces between the particles, we integrate Newtons equations of motion. Algorithms have been designed to do this. Verlet algorithm is not only one the simplest, but also usually the best. Algorithm for integrating the equation of motion subroutine integrate(f, en) integrate equation of motion sumv = 0 sumv2 = 0 do i = 1, npart MD loop xx = 2 * x(i) xm(i) + delt**2 * f(i) Verlet algorithm vi = (xx - xm(i))/(2*delt) velocity sumv = sumv + vi velocity of center of mass sumv2 = sumv2 + vi**2 total kinetic energy xm(i) = x(i) update positions previous time step x(i) = xx update positions current time end do The Taylor series expansion of the coordinate of the particle, around time t, temp = sumv2/(3*npart) instantaneous temperature 3 etot = (en + 0.5*sumv2)/npart total energy per particle f (t ) 2 t 4.2.3 r (t + t ) = r (t ) + v(t )t + t + r + O(t 4 ), return 2m 3! end similarly, f (t ) 2 t 3 4.2.4 r (t t ) = r (t ) v(t )t + t r + O(t 4 ). 2m 3! Summing the two equations, we obtain r (t + t ) + r (t t ) = 2r (t ) + or r (t + t ) 2r (t ) r (t t ) + f (t ) 2 t 2m 4.2.5 f (t ) 2 t + O(t 4 ) 2m

The estimate of the new position contains an error that is of the order t4, where t is the time step of our Molecular Dynamics scheme. Verlet algorithm does not use the velocity

60

Lecture notes on MMM to compute new position. The velocity can be derived from the knowledge of the trajectory, using r (t + t ) r (t t ) = 2v(t )t + O(t 3 ) or v(t ) = r (t + t ) r (t t ) + O(t 2 ) 2t 4.2.6

It is possible to cast Verlet algorithm in a form that uses positions and velocities computed at equal times. This velocity Verlet algorithm looks like a Taylor series expansion for the coordinates: r (t + t ) = r (t ) + v(t )t + f (t ) 2 t . 2m 4.2.7

where the update of the velocities is given by v(t + t ) = v(t ) + f (t + t ) + f (t ) t. 2m 4.2.8

Note that, in this algorithm, we can compute the new velocities only after we have computed the new positions and, from these the new forces. Now that we have computed the new positions, we discard the positions at time (t - t). The current positions become the old positions and the new positions become the current positions. After each time step we compute the current temperature, the current potential energy and the total energy. The total energy should be conserved. This completes the introduction to Molecular Dynamics method.

4.5 Boundary Conditions


The length-scale of MD is limited a large fraction of atoms is therefore on the surface or near the surface. This is not the case with most of the physical systems. How to reproduce interaction of atoms in the MD computational cell with the surrounding materials?

4.5.1 Free boundaries (or no boundaries):


this works for a molecule, a cluster or aerosol particle in vacuum. Free boundary can also be appropriate for ultra-fast processes when the effect of boundary is not important due to the short time scale of the involved processes, e.g. fast ion/atom bombardment, etc.

61

Lecture notes on MMM

Figure 3Free boundary condtion

4.5.2 Rigid Boundaries (atoms at the boundaries are fixed). In most


cases the rigid boundaries are unphysical and introduce artifacts into the simulation results. Sometimes used in combination with other boundary conditions.

Figure 4 Rigid boundary condition

4.5.3. Periodic Boundary condition (eliminates surfaces the most popular


choice of boundary conditions) this boundary conditions are used to simulate processes

in a small part of a large system. all atoms in the computational cell (dark box) are replicated throughout the space to form an infinite lattice. That is, if atoms in the

62

Lecture notes on MMM computational cell have positions ri, the periodic boundary condition also produces mirror images of the atoms at the positions defined as

Figure 5 Periodic boundary condition

ri image = ri + l a + m b + n c , where a, b, c are vectors that correspond to the edges of the box, l, m, n are any integers from - to +. Each particle in the computational cell is interacting not only with other particles in the computational box, but also with their images in the adjacent boxes. The choice of the position of the original box (computational cell) has no effect on forces or behavior of the systems.
Limitations of periodic boundary condition:

The size of the computational cell should be larger than 2Rcut, where Rcut is the cutoff distance of the integration potential. In this case any atom i interact with only one image of any atom j. it does not interact with its own image. This condition is called minimum
image criterion

The characteristic size of any structural feature in the system of interest or the characteristic length-scale of any important effect should be smaller than the size of the computational cell. For example, low frequency parts of the phonon spectrum can be affected, stress fields of the different images of the same dislocation can interact etc. to check if there are any artifacts due to the size of the computational cell perform simulation with different sizes and check if the result converge. Calculation of distances between atoms with periodic boundary conditions:
63

Lecture notes on MMM

When the minimum image criterion is satisfied, a particle can interact only with the closest image of any other particle.

Figure 6 Minimum image criteria

The closest image may or may not belong to the computational cell. Therefore, in the code, if a particle j is beyond the range of interaction with particle i (Rij > Rcut), we have to check the closest images. For example, an algorithm for checking the closest image is:
do i = 1, N ! loop over total number of atoms do j = 1, neighbor ! loop up to number of neighbors xr = x(i) x(j) if(xr .gt. hbox) then ! half of the length of box = hbox xr = xr box ! length of box = box elseif(xr .lt. hbox) then xr = xr + box endif . ! Other calculations . end do end do

4.3 An Illustration
In this section we will look into the approach for a typical atomistic calculation problem. Suppose we want to find out total energy and resultant force on an atom in a system of Argon atoms having some initial positions with potential function for the Argon is given. To simplify the problem let us consider a two-dimensional problem by assuming that atoms can move only in x and y direction only. Also we assume free boundary for the sake of simplicity. We will use no cutoff radius in the calculation i.e. all atom will interact with all other atoms. 64

Lecture notes on MMM

Let us assume that atoms are nicely sitting on the corners of a grid having equal spacing in x and y direction. The potential energy of atom due to atom j can be obtained using the following equation. (Eq. 3.7.1) 12 6 U(rij ) = 4 r r ij ij

Figure 7 Arrangement of atoms in 2-D plane

from the above equation it is clear that if we have values of rij can determine the potential energy of atom 1 due to j. we can obtain the total potential energy of atom 1 by taking summation of all the U(r1j) over j. similarly we can determine the force due to atom j on atom using the equation below
6 1 2 Fij = 24 r rij8 ij the resultant force is the summation of the individual forces due all neighboring atoms.

6 (ri r j )

parameters for potential of Argon are = 0.0104 eV, = 3.40 Suppose we want to evaluate total energy and total force on atom 1. First we have to find the distance r1 j to determine potential energy as well as force due to atom j . The values are tabulated as follows

65

Lecture notes on MMM Atom no 1 interacts with 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 total F(rij)in xdirection 0.0 0.0 0.0 -142.4 -0.9478 0.2958e-2 0.2867e-3 0.5782e-2 0.5917e-2 0.1332e-2 0.2063e-3 0.1286e-2 0.8601e-3 0.3095e-3 0.8537e-4 -143.339 F(rij)in ydirection -142.4 0.5782e-2 0.1286e-2 0.0 -0.9478 0.5917e-2 0.8601e-3 0.0 0.2958e-2 0.1332e-2 0.3095e-3 0.0 0.2867e-3 0.2063e-3 0.8537e-4 -143.339

R1j 2.0 4.0 6.0 2.0 2.282 4.472 6.325 4.000 4.472 5.657 7.211 6.000 6.325 7.211 8.485

U(rij) 23.23 -0.9722e-2 -0.1332e-2 23.23 0.2523 -0.6482e-2 -0.9799e-3 -0.9772e-2 -0.6482e-2 -0.1869e-2 -0.4520e-3 -0.1332e-2 -0.9799e-3 -0.4520e-3 -0.1715e-3 46.679

It is clear from the table that total potential energy is positive and resultant force is not zero, which shows that atom 1 is not at equilibrium position and the rest of the atoms repels it collectively. It is also evident that the atoms beyond 4 A are pulling the atom 1 towards them i.e. an attraction force is acting between them. Also notice that energy due to these atoms is negative. Atoms situated at less than or equal to 4 A are trying to push away atom 1 i.e. repulsive force is acting and also notice that energy due to these atoms is positive.

4.4 Ensembles
Ensemble is a set of all states, which a system can acquire with keeping some macroscopic parameter constants. For example in constant energy and constant volume ensemble (NVE) is a set of all states, which the system can acquire with keeping the volume and total energy (KE + PE) constant. A typical MD simulation with periodic

66

Lecture notes on MMM boundary condition is constant energy and constant volume ensemble (NVE), which is also known as micro-canonical ensemble. Consider a many-body system with energy E that is capable of occupying every quantum state. If we take an average of some property of the system over all possible quantum states of is called an ensemble average of the property. However, this is not the way one think about the average behavior of a system. In most experiments we perform a series of measurements during a certain period of time and then determine the average of these measurements. The idea behind Molecular Dynamics is precisely that we can study the average behavior of the many-body particle system simply by computing the natural time evolution of that system numerically and averaging the quantity of interest over a sufficiently long period of time.

4.5 Computer Experiments


After formulating and implementing the Molecular Dynamics program, we wish to use it to measure the interesting properties of many body systems. These quantities can be compared with the real experiments. Simplest among these are the thermodynamic properties of the system under consideration, such as the temperature T, the pressure P, and the heat capacity Cv. As mentioned earlier, the temperature is measured by computing the average kinetic energy per degree of freedom. For a system of f degrees of freedom, the temperature T is given by
k BT =

2K
f

4.5.1

where K is kinetic energy. There are several ways to measure the pressure of a classical N-body system. The most common among these is based on the virial equation for pressure. For pair-wise interactions, we can write
P = k BT +

1 dV

f(r ).r
i< j

ij

ij

4.5.2

where d is the dimensionality of the system, and f(rij) is the force between the particles i and j at a distance rij . Expression for the heat capacity at constant volume, as obtained from the fluctuations in the kinetic energy in the microcanonical ensemble:

67

Lecture notes on MMM


2 2 3k B T 2N

K2

NVE

2
NVE

3k B 1 2C . v

4.5.3

A typical MD run output is shown in following figures. Since MD run is performed in NVE ensemble. Total energy is constant throughout the run. Kinetic energy (hence temperature), potential energy and pressure remain fluctuating in MD run.

Figure 8 plots of kinetic energy, potential energy, total energy and pressure with respect to time in a typical MD program run

68

Lecture notes on MMM

4.6 Advance topics


4.6.1 Autocorrelation Function
Let us consider a series of measurements of a quantity of a random nature at different times.

Although the value of A(t ) is changing randomly, for two measurements taken at times
t and t that are close to each other there are good chances that A(t ) and A(t ) have

similar values i.e. their values are correlated. If two measurements taken at times t and t that are far apart, there is no relationship between values of A(t ) and A(t ) i.e. their values are uncorrelated. The level of correlation plotted against time would start at some value and then decay to a low value.

69

Lecture notes on MMM

Let us shift the data by time tcorr and multiply the values in new data set to the values of the original data set. Now let us average over the whole time range and get a single number G(tcorr). If the two data sets are lined up, the peaks and troughs are aligned and we will obtain a big value from this multiply-and-integrate operation. As we increase tcorr the G(tcorr) declines to a constant value. The operation of multiplying two curves together and integrating them over the x-axis is called an overlap integral, since it gives a big value if the curves both have high and low values in the same places. The overlap integral is also called the Correlation Function G(tcorr) = <A(t0)A(t0 + tcorr)>. This is not a function of time (since we already integrated over time), this is function of the shift in time or correlation time tcorr. Decay of the correlation function is occurring on the timescale of the fluctuations of the measured quantity undergoing random fluctuations.

4.6.2 Thermal conductivity


For the macroscopic level steady state flow heat conduction, thermal conductivity is defined by Fouriers law as following,

Jc = T

4.6.1

Where J c is steady-state heat flux vector, is thermal conductivity which is a second rank tensor and T is temperature gradient. This is important to note that in general total energy flux J e includes both the conduction heat flux J c and the diffusion heat flux

J p where J p is the particle flux and is the particles chemical potential. Thus
J e = J c + J p 4.6.2

However in solids (except at very high temperatures), the contribution of diffusion to the energy flux can be neglected. Therefore the above equation becomes
Je = Jc

4.6.3

Stating in other words it means that the thermal conductivity calculated here does not include the electronic contribution and no net particle flow (constituting the diffusion current) persists in the system. The contribution to thermal conduction only comes from the atomic vibrations, so called lattice thermal conductivity. Now for a classical system consisting of discrete particles, the energy density at a 70

Lecture notes on MMM location r , H (r ) can be expressed as the site energy of a particle at that location and consequently heat current can be defined as following,

Je = Jc =

d n ri H i dt i =1

4.6.4

Where ri is the position vector of ith particle H i is the total energy of the particle and

t is the time.
The total energy of a particle also known as Hamiltonian is nothing but the sum of the kinetic energy and total potential energy of the particle. Hence for pair wise interaction

H i can be written in the following form, Hi =


1 1 n mi vi2 + Vij 2 2 i =1

Where mi is the mass of the particle, vi is the velocity and Vij refers to its pair wise interaction with j th particle of the system Inserting this expression in equation 4.6.4. and carrying out the differentiation,
N 1 1 2 Jc = 2 mi vi + 2 i =1 N N 1 ( ) V r v + vi f ij rij ij i j =1, j i i =1 j i 2 N

Here f ij refers to the force of interaction between two particles labeled as i and j and can be calculated from the potential function as following,

f ij = iV (rij )
Where subscript i has been used to show that the gradient has to be taken w.r.t. particles coordinates. Following the fluctuation-dissipation theorem, the thermal conductivity tensor can be expressed in the term of heat-current correlation function,
=

i th

1 C jc (t )dt V k BT 2 0

Where V is volume of the system, k B is Boltzmann constant, T is temperature of the system and C J c (t ) = J c (t ) J c (0) is a function known as heat-current autocorrelation function where <>denotes ensemble average.

71

Lecture notes on MMM

4.6.3 Ewald summation


Unlike the metals, the nature of the Coulombic interaction is long range (1/r). For such interactions truncation of the potential is never allowed. It then becomes essential to find an efficient technique for computing the long-range part of the interactions. If the potential is truncated at a distance rc , the contribution of the tail potential u(r) can be estimated (in three dimensions) using

N dr u (r ) 4r 2 2 0 where is the average number density. This equation shows that the tail correction to the U tail =
potential energy diverges, unless the potential energy function u(r) decays faster than r3. This is why one cannot use truncation plus tail correction for Columbic and dipolar interaction. Consider a system consisting of positively and negatively charged particles. These particles are assumed to be located in a cube of with diameter L (and volume V = L3). Periodic boundary conditions are assumed. The total number of particles in the fundamental simulation box is N. It is assumed that all particles repel each other at sufficiently short distances. In addition it is also assumed that the system as a whole is electrically neutral; that is iqi = 0. The Coulomb contribution to the potential energy of this N-particle system, 1 N qi (ri ), 2 i =1

U coul =

where (ri) is the electrostatic potential at the position of ion i:

(ri ) =

1 4 0

r
j ,n

qj
+nL

ij

where the prime on the summation indicates that the sum is over all particles j, except j

= i if n = 0. The contribution to the electrostatic potential due to these point charges


decays as 1/r. If we assume that every particle i with charge qi is surrounded by a diffuse charge distribution of the opposite sign, such that the total charge of this cloud exactly cancels qi. In that case the electrostatic potential due to particle i is due exclusively to the fraction of qi that is not screened. At large distances this fraction rapidly goes to 0. How

72

Lecture notes on MMM


rapidly depends on the functional form of the screening charge distribution. In our formulation we shall assume a Gaussian distribution for the screening charge cloud.

The contribution to the electrostatic potential at a point ri due to a set of screened charges can be easily computed by direct summation, because the electrostatic point due to a screened charge is a rapidly decaying function of r. But this sum does not give the required potential energy due to point charges. Hence we must correct for the fact that we have added a screening charge cloud to every particle. This is shown schematically in Figure This compensating charge density varies smoothly in space. There is three contributions to the electrostatic potential: first of all, the one due to point charge qi, secondly, the one due to the (Gaussian) screening charge cloud with charge .qi, and finally the one due to the compensating charge cloud with charge qi. In order to exclude Coulombic self-interactions, the electrostatic potential of any of these three contributions should not be included at the position of ion i. However, it turns out that it is convenient to retain the contribution due to the compensating charge distribution and correct for the resulting spurious interaction afterward. The reason for retaining the compensating charge cloud for ion i is that the compensating charge distribution is not only a smoothly varying function, but it is also periodic. Such a function can be represented by a (rapidly converging) Fourier series, and this will turn out to be essential for the numerical

73

Lecture notes on MMM


implementation. The inclusion of a spurious self interaction between ion i and the compensating charge cloud. The compensating charge distribution surrounding an ion i is assumed to be a Gaussian with width 2/:

Gauss = qi ( ) 2 exp(r 2 )
The detail formulation for the Ewald sum can be found elsewhere. The final expression for the Ewald summation for summing up the potential energy of point charges can be given by 1 4 2 (k ) exp( k 2 4 ) U Coul = 2 2V k 0 k
( ) 2 qi2 + qi q j erfc( rij ) 1 , 2 i j rij
N i =1 1 N

where qi and qj are the charges on the ion i and j situated rij distance apart, k = (2/L)l with l = (lx, ly, lz) are the lattice vector in Fourier space. The definition of (k) is given by

(k ) qi exp(ik ri ).
i =1

As discussed in the previous subsection the Ewald sum consists of three terms. The first term in the equation is summation of the potential due to continuous background charge (compensating charge cloud) in the Fourier space, where it should be noted that this expression is defined only for k 0. This is a direct consequence of the conditional convergence of Ewald sum. It is assumed that the term with k = 0 is equal to 0. This assumption is consistent where the periodic system is embedded in a medium with infinite dielectric constant. The periodicity of the continuous charge distribution is exploited in Fourier space summation. To maintain the periodicity the spurious self-interactions (the interaction of ion qi with itself) is deliberately allowed. The second term in the equation corresponds to the correction for the spurious self-interactions. This term is a constant term and needed to evaluate only once in a run. The third term in equation is corresponds to the summation of the potential due to screened charges (point charge plus oppositely charged cloud) in the real space.

74

Lecture notes on MMM The erfc is complimentary error function which decays rapidly with rij , hence this can be summed up using small cut-off radius.

75

You might also like