(metropolis) monte carlo sampling in the canonical and ... · monte carlo method: importance...

39
(Metropolis) Monte Carlo sampling in the canonical and other ensembles

Upload: others

Post on 12-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

(Metropolis) Monte Carlo sampling 

in the canonical and other ensembles

Page 2: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

“Classical” statistical mechanics, ensemble average

Page 3: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

“Classical” statistical mechanics, ensemble average

Page 4: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 5: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

© D. Frenkel

Monte Carlo method

Page 6: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

© D. Frenkel

Monte Carlo method

Page 7: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method: importance sampling

I.e., generating M random values of x uniformly distributed between a and b: Highly inefficient!

Importance sampling: generating M random values of  u  uniformly distributed between 0 and 1

The benefit is in the variance:

Page 8: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 9: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 10: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 11: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 12: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 13: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method

Page 14: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

1.  Select ensemble, determine Ω

2.  Bearing in mind (detailed balance):     Ω(o) α(o→n) acc(o→n) 

= Ω(n) α(n→o) acc(n→o) 

     design α()

3.  Determine acc()

Monte Carlo method

The general recipe

Page 15: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

1. Select a particle at random, and calculate its energy

2. Give the particle a random displacementand calculate its new energy

3. Accept the move from to with probability,

Monte Carlo method

The NVT recipe

Page 16: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Periodic Boundary Conditions

Clusters ARE different from bulk Surface! In a cube of length L, one particle per unit length : [L³­(L­2)³]/L³ ~ 6L²/L³

Page 17: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Van der Waal's EoSIdeal gas EoS

What to evaluate?

Equations of state:  p = p( V , T )

Heat capacity:

Page 18: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method: detailed balance really needed?

vs

Example: Lennard­Jones fluid

(model for dispersion­forces – e.g., van der Waals – interacting systems)

Page 19: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Monte Carlo method: why recounting old configuration?

Page 20: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Phase diagram of hard spheres

Rosenbluth and Rosenbluth (1954)Wood and Jacobson (1957)

Historical (first) application: hard spheres

Fluid

Solid

Page 21: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, NPT

Page 22: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Ideal gas (M­N)

Monte Carlo, NPT

N

M

Partition function: product of the partition function of the subsystems

1

Page 23: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, NPT

Consider the limits:

For:For: βP

Page 24: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, NPT

Page 25: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, NPT

Alternative scheme, lnV instead of V:

Page 26: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, NPT

Page 27: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, NPT

Page 28: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

A zeolite in contact with a gas

A model for grand­canonical ensemble

Page 29: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

Ideal gas (M­N)

NPTMonte Carlo, grand­canonical ensemble μVT

N

M

Exchange particles

Fixing N and M

Page 30: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

Gas system in V' much larger than interacting system in V

Ideal gas:

Page 31: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

Gas system in V' much larger than interacting system in V

Ideal gas:

Page 32: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

Grand­canonical MC scheme:

Displacement:

Insertion/removal:

Page 33: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

Justification:

Page 34: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

Page 35: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTMonte Carlo, grand­canonical ensemble μVT

Page 36: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTApplication: adsorption isotherm in a zeolite

Adsorption isotherm(s) of methane in silicalite. Black symbols: experiment. Open symbols: grand­canonical MC

Page 37: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTReference states: this was nice, but what is μ?

For a system of N molecules, each having M atoms

for an atom

Page 38: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTReference states: this was nice, but what is μ?

For ideal (molecular) gas:

Page 39: (Metropolis) Monte Carlo sampling in the canonical and ... · Monte Carlo method: importance sampling I.e., generating M random values of x uniformly distributed between a and b:

NPTReference states: this was nice, but what is μ?