Monte Carlo Simulation Methods

Download Report

Transcript Monte Carlo Simulation Methods

Monte Carlo Simulation Methods
QNVT
QNVT
1

N!h3N
 H(p N ,r N ) 
 dp dr exp kT 
N
N
N
H(p ,r )  
N
N
i 1
pi
2
 V(r )
N
2m
2

 N
1
p
 V (r N ) 
N

dr exp
3N  dp exp


N!h
 kT 

 2mkT
2
3N


p
N
 dp exp 2mkT 2mkT 2
3N
2
QNVT
1 2mkT
  2 
N!
h 
QNVT
V 2mkT

N!  h 2 
N
N

V(r
) 
N
dr
exp



 kT 

3N
2
- ideal gas
QNVT 
ZNVT
 V(r N ) 
  dr exp
 kT 

N
N
V
N!3N

h 


2mkT
2
1/ 2
QNVT  Q
ideal
NVT
excess
NVT
ex ce ss
NVT
.Q
A  kT ln QNVT
Q
A A
ideal
1
 V(r N ) 
N
 N  dr exp
V
 kT 

A
ex ce ss
Calculating properties by integration
V (r )   dr V (r )  (r )
N
N
N
N
 (r ) 
N
N
 V (r ) / kT
e
Z
N tri al
 V (r
i
V (r ) 
N
 V (r N ) 
Z   dr exp
 kT 

N
N
)expVi (r N )/ kT
i1
N tri al
N
exp
V
(r
) / kT


i
i 1
Theoretical background to Metropolis
Markov chain of events:
- the outcome of each trial depends only on the preceding trial
- each trial belongs to a finite set of possible outcomes
mn - probability of moving from state m to n
=(1, 2,…. m, n,…N) - probability that the system is in a particular
state
(2)= (1).  (3)= (2). = (1). . 
limit=limN (1) N - limiting (equilibrium) distribution
mn - probability to choose the two states m,n between which the move
is to be made (stochastic matrix).
mn = mn. pmn - where p is the probability to accept the move
mn = mn if n > m
mn = mn. (n/m) if n < m and if n=m
In practice if the energy of the n state is lower the move is accepted, if
not a random number between 0 and 1 is compared to the Boltzmann
factor exp(-∆V(rN)/kT). If the Boltzmann factor is greater then the
Random number the move is accepted.
Implementation
xne w  x ol d  (2  1)rmax
yne w  yol d  (2  1)rmax
zne w  zol d  (2  1)rmax
rand(0,1)≤ exp(-∆V(rN)/kT)
Random number generators
Linear congruential method
[1]  seed
[i]  mod{([i  1]* a  b),m}