Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Molecular Dynamics
Basics (4.1, 4.2, 4.3)
Liouville formulation (4.3.3)
Multiple timesteps (15.3)
Molecular Dynamics
• Theory:
2
d r
Fm 2
dt
• Compute the forces on the particles
• Solve the equations of motion
• Sample after some timesteps
2
3
4
5
6
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
7
Periodic boundary conditions
8
Lennard Jones potentials
•The Lennard-Jones potential
12
6

 
  
LJ
u r   4      
 r  
 r 
•The truncated Lennard-Jones potential
u LJ r  r  rc
ur   
r  rc
 0
•The truncated and shifted Lennard-Jones potential
u LJ r   u LJ rc  r  rc
ur   
0
r  rc

9
Phase diagrams of Lennard Jones
fluids
10
Saving cpu time
Cell list
Verlet-list
11
Equations of motion
t 2
t 3
&
r t  t   r t   v t t 
f t  
r&&t    t 4
2m
3!
 
t 2
t 3
&
r t  t   r t   v t t 
f t  
r&&t    t 4
2m
3!
t 2
r t  t   r t  t   2r t  
f t    t 4
m
 
 
Verlet algorithm
t 2
r t  t   2r t   r t  t  
f t 
m
Velocity Verlet algorithm
t 2
r t  t   r t   v t t 
f t 
2m
t
v t  t   v t  
 f t  t   f t 
2m
12
r  0 , p  0
r  0 , p 0 ,
N
Lyaponov instability
N
N
1
, p j  0    , pi  0   
, p N 0

  1010
13

Liouville formulation
N
f p ,r
N

f  r f  p f
r
p


iL  r  p
r
p
df
 iLf
dt
Solution
Depends implicitly on t
Beware: this solution
Liouville
operatoruseless as
is equally
the differential
equation!
f t   exp iLt  f  0
14


iL  iLr  iL p  r&  p&
r
p
f t   exp iLr t  f 0 


 exp  r&0 t  f 0 

r 


 exp  p&0 t  f 0 

p 
n
&
p
0
t






Taylor
expansion

f
0

f 0 



n
n
n! r
n!
p
n 0
n 0
N
N
N
N
&
&
 f p 0 , r 0   r 0 t   f p 0   p 0 t  ,r 0 

r&0t 
 
Let us look at them
f t   exp
iL p t f 0
separately
n

n

Shift of coordinates
r 0   r 0   r&0 t
n
 

Shift of momenta
p 0   p 0   p&0 t
15
iLr  r 0   r 0   r&0 t
iL p  p 0   p 0   p&0 t
 t ,re te e e
f p
N
 0,r 0

Trotter identity
e
f p 0,r 0
 e  e  e 
e
 lim
e e
f p 0 ,r 0 

e
 e e e
N noncommuting
iLt  operators!
N
We have
A B
f p
A B
A B
iLr t iL p t
P 
A 2P B / P
iLr t
iL p t
N
N
N
A 2P P
N
N
A 2P B / P A 2P P
A B
B iLr t
t
A iL p t

t 

Pt 2 P
PP
P
P
iL
iL
t
2
f p N t , r N t   e p eiLr t e p  f p N 0 , r N 0 






16

iL t
e p

iL t 2  iL t  iL t 2 

e
e
e
iLr t  r  r  r&t
&
iLp t  p  p  pt
p
r
p
N


t
2


N
N
N
f p 0 , r 0   f   p 0   p&0  , r 0 
2




P

N
N
N




t
t
t







Velocity
iLr t 
N Verlet! 
e
f   p 0   p&0  , r 0   f   p 0   p&0  ,  r 0   t&
r   
 2  
2
2

 

 1 
N2
Nt t 




r
t


t

r
t

v
F
(
t
)

t

t
iL p t 2 
 t   

 

mr      ....................
e
f   p 0   p&0  ,  r 0  2t&
 2  
2
 

t

vt  t   v t  
F (t )  F (Nt  t )
N
t
t
t
  

 
2
m
f p 0   p&0   p&t  , r 0   t&
r


2
2

t
p 0   p 0    p&0   p&t 
2


   
2  
t 2
r 0   r 0   t&
r t 2   r 0   t&
r 0  
F(0)
2m
17
Velocity Verlet:
iLp t 2 iLr t 
e
e
iLp t 2
e
Call force(fx)
Do while (t<tmax)
e
iLp t 2
 iLr t 
e
e
t
 t 
: v  t    v t  
f t 
2
2m

vx=vx+delt*fx/2
: r  t  t   r  t   tv  t  t 2 
iLp t 2
x=x+delt*vx
Call force(fx)
t
: v  t  t   v  t  t 2  
f  t  t 
2m
vx=vx+delt*fx/2
enddo
18
Liouville Formulation
Velocity Verlet algorithm:
t
p t   p t  t 
2
t 2
r t  t   r t   tr t  
F(t )
2m
pt  t   pt  
Three subsequent coordinate transformations in either r or p of
which the Jacobian is one: Area preserving
t
t
pt  t 2   pt   Fr  pt  t 2   pt  t 2 




p
t


t

p
t


t
2

Fr t 
2
2
t
r t  t   r t   pt  t 2
r t   r t 
r t   r t 
m
t Fr 
t Fr 
1
J1  det
2
0
r
1
1
1
0
J 2  det
1
t m 1
J 3  det
1
0
2
r
1
1
Other Trotter decompositions are possible!
19
Multiple time steps
• What to use for stiff potentials:
– Fixed bond-length: constraints (Shake)
– Very small time step
20
F  Fshort  Flong
 F 
iL  iLr  iL p  v 
r m v
iL p  iLshort  iLlong
iLshort
Fshort 

m v
Trotter expansion:


i Llong Lshort Lr t
e
Multiple
Time steps
Flong 
iLlong 
m v
iLlongt 2 i  Lshort Lr t iLlongt 2
e
e
e
Introduce: δt=Δt/n

e
  eiLlong t 2 eiLshort  t 2 eiLr t eiLshort  t 2 n eiLlong t 2


i Llong  Lshort  Lr t
21

e
  eiLlong t 2 eiLshort  t 2 eiLr t eiLshort  t 2 n eiLlong t 2


i Llong  Lshort  Lr t
iLlong t 2  v  v  Flong t 2m
iLshort  t 2  v  v  Fshort  t 2m
iLr t  r  r  v t
First
e
iLlong t 2
f  r 0 , v(0)   f  r 0 , v 0   Flong 0 t 2m 
Now n times:
 e
iLshort  t 2 iLr  t iLshort  t 2
e
e
 f  r 0 ,v 0   Flong 0 t 2m 
n
22
e
t
 t 
: v  t    v t  
flong  t 
2 
2m

 iLpLong t 2
iLlong t 2
iLshort  t 2 iLr  t iLshort  t 2
e
Call force(fx_long,f_short)
e
vx=vx+delt*fx_long/2
Do ddt=1,n
e
iLpShort t 2

e
e
n
 e
iLlong t 2
iLlong t 2  v  v  Flong t 2m
iLshort  t 2  v  v  Fshort  t 2m
 t  t 
 t   t
: v  t     v  t iLr t  r frShort
 vtt
2 2
2  2m


vx=vx+ddelt*fx_short/2
 iLr t 
e
: r  t   t   r  t    tv  t  t 2   t 2 
x=x+ddelt*vx
iLlong t 2
iLshort  t 2 iLr  t iLshort  t
Call force_short(fx_short)

e
e
e e
e
iLpShort
n
iLlong t 2

e


 t 2
 t

 t  t   t
: v  t    t   ivLlong
t t 2 v
 vF
fShort
t 2mt 
long 

2 2  2m

iLshort  t 2  v  v  Fshort  t 2m
vx=vx+ddelt*fx_short/2
23
enddo
iLr t  r  r  v t
2

2
24
Related documents