Top Banner
epartm entofChem ical Engine Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)
24

Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Dec 18, 2015

Download

Documents

Patrick Wilkins
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering

Molecular Dynamics

Basics (4.1, 4.2, 4.3)

Liouville formulation (4.3.3)

Multiple timesteps (15.3)

Page 2: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering2

Molecular Dynamics

• Theory:

• Compute the forces on the particles• Solve the equations of motion• Sample after some timesteps

2

2

dt

dm

rF

Page 3: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering3

Page 4: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering4

Page 5: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering5

Page 6: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering6

Page 7: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering7

Molecular Dynamics• Initialization

– Total momentum should be zero (no external forces)– Temperature rescaling to desired temperature– Particles start on a lattice

• Force calculations– Periodic boundary conditions– Order NxN algorithm,– Order N: neighbor lists, linked cell– Truncation and shift of the potential

• Integrating the equations of motion– Velocity Verlet– Kinetic energy

Page 8: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering8

Periodic boundary conditions

Page 9: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering9

Lennard Jones potentials

612

4rr

ru LJ

c

cLJ

rr

rrruru

0

c

ccLJLJ

rr

rrrururu

0

•The truncated and shifted Lennard-Jones potential

•The truncated Lennard-Jones potential

•The Lennard-Jones potential

Page 10: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering10

Phase diagrams of Lennard Jones fluids

Page 11: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering11

Saving cpu time

Cell list Verlet-list

Page 12: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering12

Equations of motion 4

32

!32tt

tt

m

tttttt

rfvrr

42

2 ttm

tttttt

frrr

tm

tttttt frrr

2

2

Verlet algorithm

Velocity Verlet algorithm

tttm

tttt

tm

tttttt

ffvv

fvrr

2

2

2

432

!32tt

tt

m

tttttt

rfvrr

Page 13: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering13

Lyaponov instability 1

10

0 , 0

0 , 0 , , 0 , 0 , 0

10

N N

Nj i N

r p

r p p p p

Page 14: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering14

NNf rp ,

pp

rr

ff

f

iL

r pr p

exp i 0f t Lt f

Liouville formulationDepends implicitly on t

Liouville operatordi

d

fLf

t

Solution

Beware: this solution is equally useless as

the differential equation!

Page 15: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering15

pp

rr

pr LLL iii

0iexp ftLtf r

00exp ft

r

r

0!

0

0

fn

t

nn

nn

r

r

NN tf 00,0 rrp

0iexp ftLtf p

00exp ft

p

p

0!

0

0

fn

t

nn

nn

p

p

0,00 NNtf rpp

Shift of coordinates Shift of momenta

t000 rrr t000 ppp

Taylor expansion

Let us look at them separately

Page 16: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering16

0,0, 2ii2i NNPtLtLtLNN feeettf prp rprp

0,0, i NNLtNN fettf rprp

tLr 000i rrr tLp 000i ppp

0,0ii NNtLtL fe pr rp 0,0ii NNtLtL fee pr rp

We have noncommuting operators!

Trotter identityBABA eee

PPAPBPAP

BA eeee 2/2lim

PPAPBPABA eeee 2/2

P

tL

P

A pi

P

tL

P

B ri

P

tt

Page 17: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering17

i rL t t r r r

i pL t t p p p

0,02

00,02i NN

NNtL tffe p rpprp

NN

NN

tL tt

tf

tfe r

20,0

200,0

20i rrpprpp

NN

NNtL

ttt

ttf

tt

tfe p

20,

20

20

....................2

0,02

02i

rrppp

rrpp

)0(2

00200

02

00

2

Frrrrr

pppp

m

tttt

tt

Velocity Verlet!

)()(2

)(2

1 2

tttm

tttt

ttm

ttttt

FFvv

Fvrr

i 2 i 2ip pr

PL t L tL te e e

Page 18: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering18

i 2 i 2ip prL t L tL te e e

Velocity Verlet:

i 2: 2

2pL t t

e t t t t t tm

v v f

i 2:

2 2pL t t t

e t t tm

v v f

i : 2rL te t t t t t t r r vvx=vx+delt*fx/2

x=x+delt*vxCall force(fx)

vx=vx+delt*fx/2

Call force(fx)

Do while (t<tmax)

enddo

Page 19: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering19

Liouville FormulationVelocity Verlet algorithm:

)(2

22

tm

tttttt

tttt

ttt

Frrr

pppp

Three subsequent coordinate transformations in either r or p of which the Jacobian is one: Area preserving

Other Trotter decompositions are possible!

1

102

1det

22

1

r

rF

rr

rFpp

tJ

tt

tttt

11

01det

2

22

2

mtJ

ttm

tttt

tttt

prr

pp

1

102

1det

22

3

r

rF

rr

rFpp

tJ

tt

tt

tttt

Page 20: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering20

Multiple time steps• What to use for stiff potentials:

– Fixed bond-length: constraints (Shake)– Very small time step

Page 21: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering21

Multiple Time steps

v

F

rv

m

LLL pr iii

longshort FFF

v

F

m

L shortshorti

v

F

m

L longlongi

longshort iii LLLp

Trotter expansion: 2ii2ii longshortlongshortlong eeee tLtLLtLtLLL

rr Introduce: δt=Δt/n

2in2ii2i2ii longshortshortlongshortlong eeeeee tLtLtLtLtLtLLLrr

Page 22: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering22

mtFvrfvrftL 200,0)0(,0e long2i long

2in2ii2i2ii longshortshortlongshortlong eeeeee tLtLtLtLtLtLLLrr

long long

short short

i 2 2

i 2 2

i r

L t v v F t m

L t v v F t m

L t r r v t

Now n times:

mtFvrftLtLtL r 200,0eee long

n2ii2i shortshort

First

Page 23: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering23

Longi 2

long:2 2

pL t t te t t t

m

v v f

Shorti 2

Short:2 2 2 2

pL t t t t te t t t t t

m

v v f

Shorti 2

Short:2 2 2 2

pL t t t t te t t t

m

v v f

i : 2 2rL te t t t t t t t r r v

vx=vx+ddelt*fx_short/2

x=x+ddelt*vxCall force_short(fx_short)

vx=vx+ddelt*fx_short/2

Call force(fx_long,f_short)

Do ddt=1,n

enddo

vx=vx+delt*fx_long/2

long long

short short

i 2 2

i 2 2

i r

L t v v F t m

L t v v F t m

L t r r v t

long longshort shortni 2 i 2i 2 i 2ie e e e er

L t L tL t L tL t

long long

short short

i 2 2

i 2 2

i r

L t v v F t m

L t v v F t m

L t r r v t

long longshort shortni 2 i 2i 2 i 2ie e e e er

L t L tL t L tL t

Page 24: Molecular Dynamics Basics (4.1, 4.2, 4.3) Liouville formulation (4.3.3) Multiple timesteps (15.3)

Department of Chemical Engineering24