92
Introduction into Molecular Introduction into Molecular Dynamics Dynamics Ralf Schneider, Ralf Schneider, Abha Rai, Amit Rai Sharma Abha Rai, Amit Rai Sharma Outline: Outline: 1. Basics 1. Basics 2. Potentials 2. Potentials 3. History 3. History 4. Numerics 4. Numerics 5. Analysis of MD 5. Analysis of MD runs runs (6. Physics (6. Physics extensions= extensions= 7. Numerical 7. Numerical extensions extensions

Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Embed Size (px)

Citation preview

Page 1: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Introduction into Molecular Introduction into Molecular DynamicsDynamics

Ralf Schneider, Ralf Schneider, Abha Rai, Amit Rai SharmaAbha Rai, Amit Rai SharmaOutline:Outline: 1. Basics1. Basics

2. Potentials2. Potentials3. History3. History4. Numerics4. Numerics5. Analysis of MD runs5. Analysis of MD runs(6. Physics (6. Physics

extensions=extensions=7. Numerical 7. Numerical

extensionsextensions8. Summary8. Summary

Page 2: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics1. Molecular Dynamics

Solve Newton’s equation for a molecular Solve Newton’s equation for a molecular system: system:

amF

Or equivalently solve the classical Or equivalently solve the classical

Hamiltonian equation:Hamiltonian equation:

m

H

H

Vm

H

i

ii

ii

i

i

N

i i

iii

p

pr

fr

p

rP

rp

)(2

),(1

2

Page 3: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics method

• deterministic method: state of the system at any future time can be predicted from its current state

• MD cycle for one step:1) force acting on each atom is assumed to be constant during the time interval

2) forces on the atoms are computed and combined with the current positions and velocities to generate new positions and velocities a short time ahead

Page 4: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics method

K. Nordlund

U. Helsinki

Page 5: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics method

K. Nordlund, U. Helsinki

Page 6: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics method

K. Nordlund

U. Helsinki

Page 7: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics methodRuBisCO protein simulations Paul Crozier, Sandia

Important for converting CO2 to organic forms of carbon and in the photosynthetic process.

Even though the pocket is closed, a CO2

molecule escapes, which was a surprise.

Page 8: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Molecular Dynamics method

ATP Synthase: within the mitochondria of a cell a rotary engine uses the potential difference

across the bilipid layer to power a chemical transformation of ADP into ATP

H. Wang

U. California,

Santa Cruz

Page 9: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. Motivation: Why atomistic MD simulations?

MD simulations provide a molecular level picture of structure and dynamics (biological systems!) property/structure relationships Experiments often do not provide the molecular

level information available from simulations Simulators and experimentalists can have a

synergistic relationship, leading to new insights into materials properties

Page 10: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

MD simulations allow prediction of properties for

Novel materials which have not been synthesized Existing materials whose properties are difficult to

measure or poorly understood Model validation

1. Motivation: Why atomistic MD simulations?

Page 11: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Molecular dynamics:Integration timestep - 1 femtosecondSet by fastest varying force.Accessible timescale about 10 nanoseconds.

Bond vibrations - 1 fsCollective vibrations - 1 psConformational transitions - ps or longerEnzyme catalysis - microsecond/millisecondLigand Binding - micro/millisecondProtein Folding - millisecond/second

1. Timescales

Page 12: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

1. MD dynamics1. MD dynamics

Page 13: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

We need to know

The motion of the

atoms in a molecule, x(t) and therefore,

the potential energy, V(x)

2. Molecular Dynamics: Potential

Page 14: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. Molecular Dynamics: PotentialsHow do we describe the potential energy V(x) for amolecule?Potential Energy includes terms for

Bond stretching

Angle Bending

Torsional rotation

Improper dihedrals

Page 15: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. Molecular Dynamics: Potentials

Potential energy includes terms for (contd.)

Electrostatic

Interactions

van der Waals

Interactions

Page 16: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. Molecular Interaction Types – 2. Molecular Interaction Types – Non-bonded Energy TermsNon-bonded Energy Terms

• Lennard-Jones Energy.

Coloumb Energy.

Page 17: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. Molecular Interaction Types – 2. Molecular Interaction Types – Bonded Energy TermsBonded Energy Terms

• Bond energy:

Bond Angle Energy:

Page 18: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. Molecular Interaction Types – 2. Molecular Interaction Types – Bonded Energy TermsBonded Energy Terms

• Improper Dihedral Improper Dihedral Angle Energy:Angle Energy:

Dihedral Angle Dihedral Angle Energy:Energy:

Page 19: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. Scaling

Scaling by model parameters size energy mass m

taken from Dr. D. A. Kofke’s lectures on Molecular Simulation, SUNY Buffalohttp://www.eng.buffalo.edu/~kofke/ce530/index.html

Page 20: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2. L-J: dimensionless form• Dimensions and units - scaling

Lennard-Jones potential in dimensionless form

Dimensionless properties must also be parameter independent convenient to report properties in

this form, e.g. P*(*) select model values to get actual

values of properties Equivalent to selecting unit value for

parameters

612

*

1

*

14*)(*

rrru

taken from Dr. D. A. Kofke’s lectures on Molecular Simulation, SUNY Buffalohttp://www.eng.buffalo.edu/~kofke/ce530/index.html

Page 21: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

3. Historical Perspective 3. Historical Perspective on MDon MD

Page 22: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

3. First molecular dynamics simulation (1957/59)3. First molecular dynamics simulation (1957/59)

Hard disks and spheres

(calculation of collision times)

dr

drruij

0)(

solid phase liquid phase liquid-vapour-phase

N=32: 7000 collisions / hN=500: 500 collisions / h

IBM-704:

Production run ~20000 steps N=32 6.5x105 coll. 4 days

N=500 107 coll. 2.3 years

Page 23: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

3. First MD simulation using continuous potentials (1964)3. First MD simulation using continuous potentials (1964)

CDC-3600

RDF

MSD

VACF

864 particlesTime / Step ~ 45s

Production run ~20000 steps 10 days !(standard PC [Pentium 1.2 GHz]: ½ hour)

Page 24: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

3. MD – development3. MD – development

(aus T. Schlick, „Molecular Modelling and Simulation“, 2002)

Page 25: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Verlet algorithm4. Verlet algorithm)(1)]()(2)([

21

2

2tiF

mhtirtirhtirhdt

ird

)(),(, ntiFniFntirirnhnt (1.1) /2121 mhn

iFnir

nir

nir

0ir 1 ir

(1.2) 2/)11( hnir

nir

niv

0ir

,...2,1 nniF

1nir

Let then

Starting from and all subsequent positions are determined

For the kinetic energy we need the velocities

Note: the velcoities are one step behind. Therefore:

1. Specify positions and

2. Compute the forces at timestep n:

3. Compute the positions at timestep (n+1) as in (1.1):

4. Compute velocities at timestep n as in (1.2); then increment n and goto 2.

1 ir

Page 26: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. A widely-used algorithm: Leap-4. A widely-used algorithm: Leap-frog Verletfrog Verlet

Using accelerations of the current time Using accelerations of the current time step, compute the velocities at half-time step, compute the velocities at half-time step:step:v(t+v(t+t/2) = v(t – t/2) = v(t – t/2) + a(t)t/2) + a(t)tt

t-t/2 t t+t/2 t+t t+3t/2 t+2t

v

Page 27: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Using accelerations of the current time Using accelerations of the current time step, compute the velocities at half-time step, compute the velocities at half-time step:step:v(t+v(t+t/2) = v(t – t/2) = v(t – t/2) + a(t)t/2) + a(t)tt

Then determine positions at the next Then determine positions at the next time step:time step:X(t+X(t+t) = X(t) + v(t + t) = X(t) + v(t + t/2)t/2)tt

t-t/2 t t+t/2 t+t t+3t/2 t+2t

v X

4. A widely-used algorithm: Leap-4. A widely-used algorithm: Leap-frog Verletfrog Verlet

Page 28: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Using accelerations of the current time Using accelerations of the current time step, compute the velocities at half-time step, compute the velocities at half-time step:step:v(t+v(t+t/2) = v(t – t/2) = v(t – t/2) + a(t)t/2) + a(t)tt

Then determine positions at the next Then determine positions at the next time step:time step:X(t+X(t+t) = X(t) + v(t + t) = X(t) + v(t + t/2)t/2)tt

t-t/2 t t+t/2 t+t t+3t/2 t+2t

v X

4. A widely-used algorithm: Leap-4. A widely-used algorithm: Leap-frog Verletfrog Verlet

v

Page 29: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Verlet algorithm- 4. Verlet algorithm- velocity formvelocity form

The previous algorithm is not self starting. One needs wo sets

of positions: and If one has the initial velocities use

and proceed as before.

From eq(1.1) and (1.2) we can derive:

(1.3) and

(1.4)

The velocity form of the Verlet algorithm is:

1. Specify the initial positions and velocities and

2. Compute the positions at time step via (1.3)

t

r r v

r r hv F h m

r r hv F h m

v v h F F m

r v

n n

i i i

i i i i

in

in

in

in

in

in

in

in

i i

0 1 0

1 0 0 0 2

1 2

1 1

1 1

2

2

2

1 1 2

.

/

/

( ) /

.

, ,..

.

3. Compute the velocities at time step via (1.4)

4. Increment and go back to 2.

n

n

1

Page 30: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Advantages4. Advantages

Positions and velocities are now in stepPositions and velocities are now in step=> kinetic and potential energies are in => kinetic and potential energies are in

stepstep Numerical stability is enhancedNumerical stability is enhanced

Eq (1.2) gives velocity as Eq (1.2) gives velocity as differencedifference of 2 of 2 rr’s of the same order of magnitude => ’s of the same order of magnitude => round-off round-off errorserrors

important for long runsimportant for long runs With reasonable With reasonable hh, Verlet’s algorithm , Verlet’s algorithm

conserves energyconserves energy

Page 31: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Beeman algorithm4. Beeman algorithm

Better velocities, better energy Better velocities, better energy conservationconservation

More expensive to calculateMore expensive to calculate

)(61)(

65)(

31)()(

)(261)(2

32)()()(

tttattattatvttv

ttattatttvtrttr

Page 32: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Predictor-corrector 4. Predictor-corrector algorithmsalgorithms 1. 1. Predictor.Predictor. From the positions and their time From the positions and their time

derivatives up to a certain order derivatives up to a certain order qq, all known at time , all known at time tt, , one ``predicts'' the same quantities at time by means of one ``predicts'' the same quantities at time by means of a Taylor expansion. Among these quantities are, of a Taylor expansion. Among these quantities are, of course, accelerations .course, accelerations .

2. 2. Force evaluation.Force evaluation. The force is computed taking the The force is computed taking the gradient of the potential at the predicted positions. The gradient of the potential at the predicted positions. The resulting acceleration will be in general different from resulting acceleration will be in general different from the ``predicted acceleration''. The difference between the ``predicted acceleration''. The difference between the two constitutes an ``error signal''. the two constitutes an ``error signal''.

3. 3. Corrector.Corrector. This error signal is used to ``correct'' This error signal is used to ``correct'' positions and their derivatives. All the corrections are positions and their derivatives. All the corrections are proportional to the error signal, the coefficient of proportional to the error signal, the coefficient of proportionality being a ``magic number'' determined to proportionality being a ``magic number'' determined to maximize the stability of the algorithm. maximize the stability of the algorithm.

Fifth-order Gear (requires more calculational effort and memory than Verlet, but needs only one calculation of the force per time step, wheras Verlet needs two!

Page 33: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Evaluate integration 4. Evaluate integration methodsmethods

Fast, minimal memory, easy to Fast, minimal memory, easy to programprogram

Calculation of force is time Calculation of force is time consumingconsuming

Conservation of energy and Conservation of energy and momentummomentum

Time-reversibleTime-reversible Long time step can be usedLong time step can be used

Page 34: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Choosing the time step4. Choosing the time step Too small: covering small conformation Too small: covering small conformation

spacespace

Too large: instabilityToo large: instability

Suggested time stepsSuggested time steps Translation, 10 fsTranslation, 10 fs Flexible molecules and rigid bonds, 2fsFlexible molecules and rigid bonds, 2fs Flexible molecules and bonds, 1fsFlexible molecules and bonds, 1fs

Page 35: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. How do you run a MD 4. How do you run a MD simulation?simulation?

Get the initial configurationGet the initial configuration

Assign initial velocitiesAssign initial velocities

At thermal equilibrium, the expected value of the kinetic energy of At thermal equilibrium, the expected value of the kinetic energy of the system at temperature T is:the system at temperature T is:

This can be obtained by assigning the velocity components vThis can be obtained by assigning the velocity components v ii from from a random Gaussian distributiona random Gaussian distribution

with mean 0 and standard deviation (with mean 0 and standard deviation (kkBBT/mT/mii):):

TkNvmE B

N

iiikin )3(

2

1

2

1 3

1

2

i

Bi m

Tkv 2

Page 36: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Periodic Boundary 4. Periodic Boundary ConditionsConditions

infinite system with small number infinite system with small number of particles of particles

remove surface effectsremove surface effects shaded box represents the shaded box represents the

system we are simulating, while system we are simulating, while the surrounding boxes are exact the surrounding boxes are exact copies in every detailcopies in every detail

whenever an atom leaves the whenever an atom leaves the simulation cell, it is replaced by simulation cell, it is replaced by another with exactly the same another with exactly the same velocity, entering from the velocity, entering from the opposite cell face (number of opposite cell face (number of atoms in the cell is conserved) atoms in the cell is conserved)

rrcutcut is the cutoff radius when is the cutoff radius when calculating the force between two calculating the force between two atomsatoms

Page 37: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Minimum Image4. Minimum Image Bulk system modeled via Bulk system modeled via

periodic boundary conditionperiodic boundary condition not feasible to include not feasible to include

interactions with all interactions with all imagesimages

must truncate potential at must truncate potential at half the box length (at half the box length (at most) to have all most) to have all separations treated separations treated consistentlyconsistently

Contributions from distant Contributions from distant separations may be importantseparations may be important

These two are same distance from central atom, yet:

Black atom interactsblue atom does not

Only interactions considered

Page 38: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Potential cut-offs4. Potential cut-offs

nonbondedji ij

ji

nonbondedji ij

ij

ij

ijijNB r

qq

r

R

r

RU

, 0,

612

42

Non-bonded interactions: involve all pairs of Atoms, therefore O(N2)

Bonded interactions: local, therefore O(N), where N is the number of atoms in the molecule considered)

Reducing the computing time: use of cut-off in UNB

The cutoff distance may be no greater than ½ L (L= box length)

Page 39: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Potential truncation4. Potential truncation

common approach:cut-off the at a fixed value Rcut

problem: discontinuity in energy and force possibility of large errors

Page 40: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Speed-up4. Speed-up

Tamar Schlick, “Molecular Modeling and Simulation”, Springer

Page 41: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

ji ij

jiijij

ji ij

ij

ij

ijijijijNB r

qqrS

r

R

r

RrSU

, 0,

612

42

4. Cutoff schemes for faster energy computation4. Cutoff schemes for faster energy computation

ij : weights (0< ij <1). Can be used to exclude bonded terms,

or to scale some interactions (usually 1-4)

S(r) : cut-off function.

Three types:

1) Truncation:

br

brrS

0

1)(

b

Page 42: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Cutoff schemes for faster energy computation4. Cutoff schemes for faster energy computation

2. Switching

a b

br

braryry

ar

rS

0

3)(2)(1

1

)( 2

with 22

22

)(ab

arry

3. Shifting

b

brb

rrS

22

1 1)(

brb

rrS

2

2 1)(

or

Page 43: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Verlet requires O(N) operationsForce needs O(N2) operations at each step

Most of these are outside range and hence zero

Time reduced by counting only those within range listed in a table (needs to be updated)

- Verlet (1967) suggested keeping a list of the near neighbors for a particular molecule, which is updated periodically - Between updates of the list, the program does not check through all the molecules, just those on the list, to calculate distances and minimum images, check distances against cutoff, etc.

4. Neighbor lists4. Neighbor lists

Page 44: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Bath supplies or removes heat from the system as Bath supplies or removes heat from the system as appropriateappropriate

Exponentially scale the velocities at each time Exponentially scale the velocities at each time step by the factor step by the factor ::

where where determines how strong the bath determines how strong the bath influences the systeminfluences the system

4. Simulating at constant T: 4. Simulating at constant T: the Berendsen scheme the Berendsen scheme

system

Heat bath

Berendsen et al. Molecular dynamics with coupling to an external bath. J. Chem. Phys. 81:3684 (1984)

T

Tt bath11

T: “kinetic” temperature

Page 45: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. Simulating at constant P: 4. Simulating at constant P: Berendsen schemeBerendsen scheme

Couple the system to a pressure bathCouple the system to a pressure bath

Exponentially scale the volume of the simulation Exponentially scale the volume of the simulation box at each time step by a factor box at each time step by a factor ::

where where : isothermal compressibility : isothermal compressibility PP : coupling constant : coupling constant

system

pressure bath

Berendsen et al. Molecular dynamics with coupling to an external bath. J. Chem. Phys. 81:3684 (1984)

bathP

PPt

1

N

iiikin FxE

vP

13

2where

: volumexi: position of particle iFi : force on particle i

Page 46: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

4. MD 4. MD schemescheme

Page 47: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Analysis of MD5. Analysis of MD

ConfigurationsAveragesFluctuationsTime Correlations

Page 48: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

macroscopic numbers of atoms or molecules (of the order of 1023, Avogadro's number is 6.02214199 × 1023 ): impossible to handle for MD

statistical mechanics (Boltzmann, Gibbs): a single system evolving in time is replaced by a large number of replications of the same system that are considered simultaneously

time average is replaced by an ensemble average:

5. Time averages and ensemble 5. Time averages and ensemble averagesaverages

),(),( NNNNNN rprpAdrdpA

Page 49: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Ergodic hypothesis5. Ergodic hypothesis

Classical statistical mechanics Classical statistical mechanics integrates over all of integrates over all of phase spacephase space {r,p}.{r,p}.

The The ergodic hypothesisergodic hypothesis assumes that assumes that for sufficiently for sufficiently longlong time the time the phase phase trajectorytrajectory of a closed system passes of a closed system passes arbitrarily close to every point in arbitrarily close to every point in phase space.phase space.

Thus the two averages are equal:Thus the two averages are equal:

OO

Page 50: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

r (Å)

1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0

pair

dist

ribut

ion

func

tions

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

DMEDMP

Oether-Hw

Oether-Ow

r (Å)

1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0

pair

dist

ribut

ion

func

tions

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

DMEDMP

Oether-Hw

Oether-Ow

5. Statistical Mechanics 5. Statistical Mechanics

Extracting properties from Extracting properties from simulationssimulations

static propertiesstatic properties such as such as structure, energy, structure, energy, and pressure are and pressure are obtained from obtained from pair (radial) pair (radial) distribution distribution functionsfunctions

DME-water and DMP-water solutions

Page 51: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Pair correlation 5. Pair correlation functionfunction

g(g(rr)d)drr is the probability of finding a is the probability of finding a particle in volume particle in volume dd33rr around around rr given given one at one at rr =0 =0

For isotropic system For isotropic system g(r)g(r) depends on depends on rr only only

g(r)g(r) -> 0 as r -> 0 i.e. atoms are -> 0 as r -> 0 i.e. atoms are inpenetrableinpenetrable

g(r) g(r) tends to 1 as r goes to infinitytends to 1 as r goes to infinity

gr r r r

gr d r N

jj

d

( ) ( ( )

( )

00

1 1 i s t he r ef er ence par t i cl e

Page 52: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Pair correlation 5. Pair correlation functionfunction

Page 53: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Outputs5. OutputsSimplest quantity is the :

According to the theorem we have

<1

2 where is the dimensionality

This defines our . For the V:

where , the function is defined by:

and

Kinetic Energy

Kt

mv t dt

equipartition

mvd

Nk T d

temperature Potential Energy

Vt

V r t r t dtN

V r g r d r

g r pair correlation

g r r r r N

ti

it

t t

i B

Tt

i ji j

t

t t d

jj

lim ( ' ) '

lim ( ( ' ) ( ' )) ' ( ) ( )

( )

( ) ( ( )

1 1

2

2

1

2

2

2

00

0

0

0

0

/ V is the density

Page 54: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Equilibration of 5. Equilibration of energyenergy

Page 55: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Time variation of 5. Time variation of energiesenergies

kinetic kinetic energiesenergies

potential potential energiesenergies

Page 56: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Time variation of 5. Time variation of pressurepressure

Equilibration of pressure with timeEquilibration of pressure with time

Page 57: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

5. Statistical Mechanics 5. Statistical Mechanics

Extracting properties from Extracting properties from simulationssimulations dynamic and dynamic and

transport transport properties properties are are obtained from obtained from time correlation time correlation functionsfunctions

0

100

200

300

400

500

600

0 5 10 15 20

<R

cm

2 > (

Ang

stro

m2 )

t (ns)

slope = 6 X D

Rouse time

Polybutadiene, 353 K Mw = 1600

T =

0

dt <A (t) A (0)>

= lim t <[A(t) - A(0)]2> /2t

Page 58: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

150K 900K

- Hydrogen in perfect crystal graphite

5. Outputs5. Outputs

Page 59: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

two diffusion channels

no diffusion across graphene layers (150K – 900K)

Lévy flights?

5. Outputs5. Outputs

Page 60: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Non-Arrhenius temperature dependence

5. Outputs5. Outputs

Page 61: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Bottlenecks in Molecular 7. Bottlenecks in Molecular DynamicsDynamics Long-range electrostatic interactions O(NLong-range electrostatic interactions O(N22): fast ): fast

electrostatics algorithms (each method still needs fine-electrostatics algorithms (each method still needs fine-tuning for each system!)tuning for each system!)

Ewald summationEwald summation O(N O(N 3/2 3/2 )) Ewald, 1921Ewald, 1921

Fast Multipole Fast Multipole MethodMethod

O(N)O(N) Greengard, 1987Greengard, 1987

Particle Mesh EwaldParticle Mesh Ewald O(N O(N log log N)N) Darden, 1993Darden, 1993

Multi-grid summation Multi-grid summation (dense mat-vec as a (dense mat-vec as a sum of sparse mat-sum of sparse mat-vec)vec)

O(N)O(N) Brandt Brandt et al.et al., 1990, 1990

Skeel Skeel et al.et al., 2002, 2002

Izaguirre Izaguirre et al.et al., 2003, 2003

Intrinsic different timescales, very small time step needed: Intrinsic different timescales, very small time step needed: multiple-time step methodsmultiple-time step methods

Page 62: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Ewald Sum Method7. Ewald Sum Method

Page 63: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Ewald Sum Method7. Ewald Sum Method

Page 64: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Ewald Sum Method7. Ewald Sum Method

additional corrections:

• arises from a gaussian acting on its own site (self-energy correction)

• or from a surface in vacuum

Page 65: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Particle Mesh Ewald7. Particle Mesh Ewald

Similar to Ewald method except that it uses FFTSimilar to Ewald method except that it uses FFT P3ME method has a very similar spirit with PMEP3ME method has a very similar spirit with PME

(1)(1) Assigning charges onto gridsAssigning charges onto grids(2)(2) Use Fast Fourier Transform to speed up the k-Use Fast Fourier Transform to speed up the k-

space evaluationspace evaluation(3)(3) Differentiation to determine forces on the gridsDifferentiation to determine forces on the grids(4)(4) Interpolating the forces on the grid back to Interpolating the forces on the grid back to

particlesparticles(5)(5) Calculating the real-space potential as normal Calculating the real-space potential as normal

EwaldEwald

Page 66: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Fast Multipole Method7. Fast Multipole Method Represent charge Represent charge

distributions in a distributions in a hierarchically structured hierarchically structured multipole expansionmultipole expansion

Translate distant Translate distant multipoles into local multipoles into local electric fieldelectric field

Particles interact with Particles interact with local fields to count for local fields to count for the interactions from the interactions from distant chargesdistant charges

Short-range interactions Short-range interactions are evaluated pairwise are evaluated pairwise directlydirectly

CPU: O(N)

Page 67: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Multigrid7. Multigrid

Page 68: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Multiple time step 7. Multiple time step dynamicsdynamics

Reversible reference system propagation Reversible reference system propagation algorithm (r-RESPA)algorithm (r-RESPA) Forces within a system classified into a Forces within a system classified into a

number of groups according to how rapidly number of groups according to how rapidly the force changesthe force changes

Each group has its own time step, while Each group has its own time step, while maintaining accuracy and numerical stabilitymaintaining accuracy and numerical stability

Page 69: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. Multiple Time Step 7. Multiple Time Step AlgorithmAlgorithm

N

i ii

ii

N

i ii

ii p

xFx

xp

px

xiL3

1

3

1

)(

)0()(

)0(),0()0(

tiLet

px

The Liouville Operator:

The Liouville Propagator and the state of system is given by:

Reversible Reference System Propagator Algorithm (r-RESPA)

Trotter expansion of the Liouville Propagator:

2/2/)(

21

21221 tiLntiLtiLtLLitiL eeeee

LLL

Reference System Propagator: tCorrection Propagator: t= n t

Tuckerman, Berne, Martyna, 1992

{r(t), v(t)}

{r(t+t), v(t+t)}

Page 70: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. RESPA for Biosystems7. RESPA for Biosystems

54321 LLLLLL

)()()(

)()()(

)()()(

)()()()(

)()(

5

4

3

2

1

xFxFxF

xFxFxF

xFxFxF

xFxFxFxF

xFxF

longelec

longvdw

medelec

medvdw

shortelec

shortvdw

Hbondtorsangle

bond

The Liouville Operator decomposition for biosystems:

5-stage r-RESPA decomposition for biological systems

Reference:

Correction: pxFiL

pxF

xxiL

ii

)(

)(11

0.50 fs

1.0 fs

2.0 fs

4.0 fs

8.0 fs

time step

Zhou & Berne, 1997

Page 71: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. FMM/RESPA 7. FMM/RESPA PerformancePerformance

Page 72: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. P3ME/RESPA 7. P3ME/RESPA PerformancePerformance

Page 73: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

7. P3ME/RESPA 7. P3ME/RESPA PerformancePerformance

Page 74: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

8. MD as a tool8. MD as a tool

MD is a powerful tool with different levels MD is a powerful tool with different levels of sophistication in terms of physics and of sophistication in terms of physics and numericsnumerics

EVERYTHING DEPENDS ON THE EVERYTHING DEPENDS ON THE POTENTIAL!POTENTIAL!

Time-step limitations require combinations Time-step limitations require combinations with other methods, e.g. Kinetic Monte with other methods, e.g. Kinetic Monte CarloCarlo

Page 75: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Multi-scales

sputtered and backscattered species and fluxes

Plasma-wall interaction

Moleculardynamics

Binary collisionapproximation

KineticMonte Carlo

Kineticmodel

Fluidmodel

impinging particle and energy fluxes

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 76: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

From atoms to W7-X

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 77: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Carbon deposition in divertor regions of JET and ASDEX UPGRADE

Carbon deposition in divertor regions of JET and ASDEX UPGRADE

JET JET

ASDEX UPGRADE

ASDEX UPGRADE

Achim von Keudell (IPP, Garching) V. Rohde (IPP,

Garching)

Paul Coad (JET)

Major topics: tritium codeposition

chemical erosion

Diffusion in graphite

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 78: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Diffusion in graphite

Internal Structure of GraphiteGranule sizes ~ microns

Void sizes ~ 0.1 microns

Crystallite sizes ~ 50-100 Ångstroms

Micro-void sizes ~ 5-10 Ångstroms

Multi-scale problem in space (1cm to Ångstroms) and time (pico-seconds to seconds)

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Real structure of the material needs to be included

Page 79: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

150K 900K

- Hydrogen in perfect crystal graphite

5. Outputs5. Outputs

Page 80: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

two diffusion channels

no diffusion across graphene layers (150K – 900K)

Lévy flights?

5. Outputs5. Outputs

Page 81: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Non-Arrhenius temperature dependence

5. Outputs5. Outputs

Page 82: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Microscales

Molecular Dynamics (MD)

Mesoscales

Kinetic Monte Carlo (KMC)

Macroscales

KMC and Monte Carlo Diffusion (MCD)

8. Multi-scale approach8. Multi-scale approach

Page 83: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

0 = jump attempt frequency (s-1)Em = migration energy (eV)T = trapped species temperature (K)

Assumptions:- Poisson process (assigns real time to the jumps)- jumps are not correlated

Kinetic Monte Carlo

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 84: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Multi-scale results

)s/cm(D 2

T1000 / )( 1K

Large variation in observed diffusion coefficients

standardgraphites

highly saturatedgraphite

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Diffusion in voids dominates

Strong dependence on void sizes and not void fraction

Saturated H: 0~105s-1 and step sizes ~1Å (QM?)

Diffusion coefficients without knowledge of structure are meaningless

Page 85: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Effect of voids

A: 10 % voids B: 20 % voids C: 20 % voids

Larger voids Longer jumps Higher diffusion

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 86: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

TRIM, TRIDYN: much faster than MD (simplified physics: binary collision approximation)

- very good match of physical sputtering- dynamical changes of surface composition

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Downgrading

Page 87: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2D-TRIDYN

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 88: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

2D-TRIDYN

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 89: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Extension of TRIDYN

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Bombardment of tungsten with carbon (6 keV)• steepening of surface structures(Ivan Biyzukov, IPP Garching)

Page 90: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Extension of TRIDYN

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 91: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Extension of TRIDYN

Max-Planck-Institut für Plasmaphysik, EURATOM Association

Page 92: Introduction into Molecular Dynamics Ralf Schneider, Abha Rai, Amit Rai Sharma Outline:1. Basics 2. Potentials 3. History 4. Numerics 5. Analysis of MD

Extension of TRIDYN

Max-Planck-Institut für Plasmaphysik, EURATOM Association