monte carlo simulation wednesday, 9/11/2002 stochastic simulations consider particle interactions....

13
Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. •Ensemble sampling •Markov Chain •Metropolis Sampling

Upload: robert-thomasson

Post on 31-Mar-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Monte Carlo Simulation

Wednesday, 9/11/2002

Stochastic simulations consider particle interactions.

•Ensemble sampling•Markov Chain•Metropolis Sampling

Page 2: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Deterministic vs. Stochastic

F = m a

Random Walk

Newton’s equation of motion

Page 3: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Brownian motionn = 200s = .02

x = rand(n,1)-0.5;y = rand(n,1)-0.5;

h = plot(x,y,'.');axis([-2 2 -2 2])axis squaregrid offset(h,'EraseMode','xor','MarkerSize',18)

while 1drawnowx = x + s*randn(n,1);y = y + s*randn(n,1);set(h,'XData',x,'YData',y)

end

Animations

Page 4: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Lennard-Jones Potential

φ(rij )=4εσrij

⎝ ⎜

⎠ ⎟ 12

−σrij

⎝ ⎜

⎠ ⎟

6⎡

⎣ ⎢

⎦ ⎥

potential force

Page 5: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Measuring elastic constants

Page 6: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Replace the time average with ensemble average

An ensemble is a collection of systems.The probability for a system in state s is Ps.

E =1T

Etdt0

T

E = EsPss

If you average the velocity of one molecule of the air in your room, as it collides from one molecule to the next, that average comes out the same as for all molecules in the room at one instant.

Page 7: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Thought experiment

Let’s pretend that our universe really is replicated over and over -- that our world is just one realization along with all the others.

We're formed in a thousand undramatic day-by-day choices.

Parallel universes ensembles

Page 8: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Canonical Ensemble

Fixed number of atoms, system energy, and system volume.

Z= exp(−Es kBT)s

Pss

∑ =1

Q

Ps =1Z

exp(−Es kBT)

Partition function

Page 9: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Finite number of microstates

A = AsPss

∑ =1Z

Asexp(−Es kBT)s

A m =1Z

Asexp(−Es kBT)s=1

m

Importance sampling

Page 10: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Metropolis Sampling I1. Current configuration: C(n)

2. Generate a trial configuration by selecting an atom at random and move it.

3. Calculate the change in energy for the trial configuration, U.

Page 11: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Metropolis Sampling IIIf U < 0, accept the move, so that the trial configuration becomes the (n+1) configuration, C(n+1).

If U >= 0, generate a random number r between 0 and 1;If r <= exp( -U/kBT ), accept the move, C(n+1) = C(t);If r > exp( -U/kBT ), reject the trial move. C(n+1) = C(n).

A sequence of configurations can be generated by using the above steps repeatedly.

Properties from the system can be obtained by simply averaging the properties of a large number of these configurations.

Page 12: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Markov ChainA sequence X1, X2, …, of random variable is called Markov if, for any n,

i.e., if the conditional distribution F of Xn assuming Xn-1, Xn-2, …, X1 equals the conditional distribution F of Xn assuming of onlyXn-1.

Page 13: Monte Carlo Simulation Wednesday, 9/11/2002 Stochastic simulations consider particle interactions. Ensemble sampling Markov Chain Metropolis Sampling

Markov Process

Dart hit-or-missRandom Walk (RW)Self-Avoiding Walk (SAW)Growing Self-Avoiding Walk (GSAW)

Diffusion Limited Aggregation

http://apricot.polyu.edu.hk/~lam/dla/dla.html