Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory...

14
Molecular-Dynamics Simulations and Density Functional Theory Part 1 - Molecular-Dynamics Simulations 1. Introduction 2. Basics of Molecular-Dynamics Simulations 3. Analyzing the Results 4. Model Potentials 5. Advanced Simulation Techniques

Transcript of Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory...

Page 1: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Molecular-Dynamics Simulations and Density Functional Theory

Part 1 - Molecular-Dynamics Simulations

1. Introduction

2. Basics of Molecular-Dynamics Simulations

3. Analyzing the Results

4. Model Potentials

5. Advanced Simulation Techniques

Page 2: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Literature

• M. P. Allen and D. J. Tildesley, Computer Simulations of Liquids (Clarendon Press, Oxford 1987).

• D. C. Rapaport, The Art of Molecular Dynamics Simulation (Cambridge University Press, Cambridge 1995).

• D. Frenkel and B. Smith, Understanding Molecular Simulations (Academic Press, San Diego 1996).

• R. Haberlandt, S. Fritzsche, G. Peinel, and K. Heinzinger, Molekulardynamik (Vieweg, Braunschweig 1995).

Page 3: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

History of Computer Simulations

World War II The first computers are independently developed by Germany and the United States during world war II for military purposes, only.

early 1950th First civil applications of computers

1953 First Monte-Carlo simulation [N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller, Equation of state calculations by fast computing machines, J. Chem. Phys. 21, 1087-1092 (1953)].

1957 Lennard-Jones potential used in a computer simulation for the first time. This is also the first application of a continuous potential in a computer simulation [W. W. Wood and F. R. Parker, Monte Carlo equation of molecules interacting with the Lennard-Jones potential. I. A supercritical isotherm at about twice the critical temperature, J. Chem. Phys. 27, 720-733 (1957)].

1957 First molecular-dynamics simulation [B. J. Alder and T. E. Wainwright, Phase Transitions for a hard sphere system, J. Chem. Phys. 27, 1208-1209 (1957)].

1985 Invention of ab-initio molecular-dynamics [R. Car and M. Parrinello, Unified Approach for Molecular-Dynamics and Density Functional Theory, Phys. Rev. Lett. 55, 2471-2474 (1985)].

Page 4: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Experiment - Computer Simulation - Theory

real system model

experimental result

exact result for model

theoretical prediction

test of approximationtest of model

model construction

experiment computer simulation approximation

comparison comparison

sample configuration

Page 5: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Representation of Numbers on Computers

min max

short -32768 32767

long (int) -2.147.483.648 2.147.483.647

long long -9.223.372.036.854.775.808 9.223.372.036.854.775.807

# bitmin

(unnorm.)min

(norm.)max ε decimals

single (float) 32 1.4 10-45 1.2 10-38 3.4 10-38 5.96 10-8 ≥5

double 64 4.9 10-324 2.2 10-308 1.8 10+308 1.11 10-16 ≥15

Floating-Point Numbers

Integer Numbers

Page 6: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Rounding Errors 1

Example 1:

a = 1.00 10+10 b = 1.00 10-7

double precision arithmetics: a + b = 1.00 10+10exact result: a + b = 1.00000000000000001 10+10

Example 2:

a = 0.645312 10-2 b = 0.336781 10+2 c = -0.336846 10+2

single precision arithmetics: (a + b) + c = -0.457764 10-4single precision arithmetics: a + (b + c) = -0.471240 10-4

exact result: a + b + c = -0.468800 10-4

Page 7: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

What are Molecular-Dynamics Simulations?

In a molecular-dynamics simulation the classical equations of motion of an N-particle system are numerically integrated.

• Particles might be, e.g.,- Atoms- Molecules- Particles of a granular material- Stars

• Possible type’s of equations of motion are, e.g.,- Newton’s- Euler’s- Lagrange I- Lagrange II- Hamilton’s

Page 8: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Simple Model System: Soft Sphere fluid

Lennard-Jones potential:

Neglecting the attractive tail leads to the soft-sphere (Weeks-Andersen-Chandler) potential:

The parameters ε and σ determine the energy and length scale of the system. They can be used to adjust the lattice constant and cohesive energy of the system. Typical values for liquid Ar are ε = 0.01 eV and σ = 3.4 Å.

VLJ = 4ε

[(r

σ

)−12

(r

σ

)−6

]

VSS =

{4ε

[(rσ

)−12

(rσ

)−6

]+ ε if r < 21/6σ

0 otherwise

Page 9: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Lennard-Jones and Soft-Sphere Potential

1 1.5 2 2.5Particle Distance

0

5

10P

oten

tial e

nerg

yLennard-JonesSoft Sphere

Page 10: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Equations of motion of the Soft-Sphere Fluid

miri = −∇iV = −

N∑

j=1

d

drVSS(rij)

rij

rij

Total energy of the N-particle system:

Newton’s equation of motion:

Etot = K + V =1

2

N∑

i=1

mir2i +

1

2

N∑

i,j=1

VSS(rij)

Page 11: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Periodic Boundary Conditions

Page 12: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Reasons for Periodic Boundary Conditions

• Periodic boundary conditions are necessary for the simulation of macroscopically large (”infinite”) systems.

• In macroscopic systems only a negligible fraction of the atoms (molecules) are close enough to the surface to experience any deviations from the bulk behavior.

• In contrast to this, in typical simulation systems containing hundreds to thousands or even some million of particles, a considerably higher fraction of atoms is located near the surface

• Assuming that the number of surface atoms scales as N2/3, there are 1014 surface particles in a system containing 1021 atoms, i.e. 1 on 107, whereas this ratio is 1 to 10 in a 1000 particle simulation. In practice the effect is even worse, since its not only the outermost particles that experience surface effects.

• Alternatives are open boundary conditions, that are frequently used in the simulation of nanostructures and fixed walls that are sometimes used for simulations with long-range interaction.

Page 13: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Consequences of Periodic Boundary Conditions

Particles might interact with other particles in different copies of the system!

Page 14: Molecular-Dynamics Simulations and Density Functional · PDF fileand Density Functional Theory ... 1985 Invention of ab-initio molecular-dynamics ... Typical values for liquid Ar are

Implementation of Periodic Boundary Conditions

a) During the calculations of the interactions (forces, potential energy) one has to find the closest distance vector between the periodic copies of a given pair of particles:

dx = x[i] - x[j] - L * floor( (1. / L) * (x[i] - x[j]) + 0.5 );dy = y[i] - y[j] - L * floor( (1. / L) * (y[i] - y[j]) + 0.5 );dz = z[i] - z[j] - L * floor( (1. / L) * (z[i] - z[j]) + 0.5 );

b) In addition to this, many MD programs keep the coordinates of the particles normalized. After each simulation step the coordinates are examined and if a particle has moved out of the main simulation box, its coordinates are adjusted. Test and adjustment can be combined to:

x[i] -= L * floor( (1. / L) * x[i] + 0.5 );y[i] -= L * floor( (1. / L) * y[i] + 0.5 );z[i] -= L * floor( (1. / L) * z[i] + 0.5 );

For simplicity, we assume a cubic or quadratic simulation box width edge-length L.