1
CL 413 Fundamentals of molecular Simulation
Chemical Engineering Department
Birla Institute of Technology Mesra, Ranchi
Monte Carlo Simulations
Molecular Simulation
2
Molecular Simulation
3
Monte Carlo Simulation
4
Metropolis Monte Carlo
5
Metropolis Monte Carlo
6
E
E1
E2
E3
E4
Metropolis Monte Carlo
7
E
E1
E2
E3
E4
Distribution of Molecular Speeds (Maxwell-Boltzmann Distribution)
8
Metropolis Monte Carlo
9
Assuming that a molecule is at an initial energy state, Ei and is supposed to be moved to final energy state Ef. What is the probability of moving from Ei to Ef?
Case I: Ef < Ei 🡪 Since the final energy is lower than or equal to the initial energy, the transition would take place.
Case II: Ef > Ei 🡪 if may appear that, since the final energy is higher than the initial energy, the transition would not take place. However, considering the energy distribution described above, there is a possibility to move from Ei to Ef.
Metropolis Monte Carlo
10
The probability is given by : p (i 🡪 f) = exp(-ΔE/kBT), where ΔE = Ef – Ei
kB= Boltzmann constant, T= temperature, K
Now, generate a random number, r and
check if r ≤ p (i 🡪 f) 🡪 move will be accepted,
Otherwise, the move will be rejected.
This technique is known as the Metropolis Monte Carlo.
Simulation Strategy
11
To simulate a system, we need to follow certain steps systematically to perform the simulation smoothly.
The steps are:
0) Understand the process/phenomena (at the macroscopic level) that are to
be simulated.
MC Simulation in various ensembles
12
Monte Carlo Moves
13
Simulation �in�canonical (NVT) ensemble
14
NVT Ensemble:
15
NVT Ensemble:
16
Steps:
17
Steps:
18
4. Get the final coordinates: xf = xi + Δx; yf = yi + Δy; zf = zi + Δz
5. Transform (xf, yf, zf) into periodic cell by applying PBC.
6A. Calculate the distance rm-j (where j = 1 to N, ≠ M between Mth and all other molecules.
6B. If all rm-j is greater than or equal to σ, then calculate Ei and Ef.
6C. Calculate p ( i -> f) = exp(-βΔE).
6D. Generate a random number, m.
6E. If m ≤ p ( I -> f) 🡺 accept the move and update the co-ordinate for the Mth molecule.
Steps:
19
6F. Else reject the move and retain the initial co-ordinate of Mth molecule.
6G. Go to step (1) to select another M and repeat the whole process.
6H. If any of rm-j is less that σ, reject the final co-ordinate and retain the initial co-ordinate of the Mth molecule and go to step (1).
Simulation in NPT ensemble
20
NPT Ensemble:
21
Steps:
22
Steps:
23
Steps:
24
g) If the move accepted, update the coordinates and go to step 4 for the next MC step.
h) If the move rejected, keep the present the coordinates, and go to step 4 for the next MC step.
Grand canonical Monte Carlo (GCMC)
25
GCMC:
26
Steps:
27
Displacement move:
28
This follows the similar formalism as we do for NVT- ensemble simulation.
Insertion move:
29
Deletion move:
30
Estimation of the chemical potential (µ)
31
Steps:
32
Steps (NVT Ensemble):
33
Steps (NVT Ensemble):
34
8. Choose another coordinate and estimate Et and repeat for say, M-times i.e., M number of trial insertion.
9. Estimate the Boltzmann factor, exp(-βEt) and sum them
🡪 sum = sum + exp(-βEt)
10. Estimate, µex = -KBT ln(sum/M)
(µ = µid + µex)
Note:
Gibbs Ensemble
35
Gibbs Ensemble Monte Carlo Simulation
36
Gibbs Ensemble Monte Carlo Simulation
37
Gibbs Ensemble Monte Carlo Simulation
38
Selection rule is as follows:
Generate a random number r ( 0 to 1).
If ( r ≤ N1/ntot)
🡪 Displace the particle in box 1.
else if ( r > N1/ntot && r ≤ (N1 + N2)/ntot)
🡪 Displace the particle in box 2.
else if ( r > (N1+N2)/ntot && r ≤ (N1 + N2 + nvol)/ntot)
🡪 Do the volume change.
else
🡪 Do the particle transfer.
Usually, nvol = 1 is used per MC step while Ntrans ~ 3% of (N1 + N2).
Implementation of moves: Initialization
39
Implementation details: Particle displacement in box 1
40
9. Else reject the move.
Volume change move
41
Steps:
42
else volume change in box 2.
3. If volume change is positive in the box 1, then the volume change will be
negative in the box 2 and vice versa.
4. Randomly choose ΔV from - ΔVmax to +ΔVmax..
5. Assume volume change in box 1:
a) V1f = V1i + ΔV and,
b) for box 2: V2f = V2i + ΔV; to keep the total volume constant.
Steps:
43
Particle Transfer move
44
Particle transfer move
45
and will be inserted into the other box.
Particle transfer move
46
Particle transfer move
47
Note:
Thank You
48
List of software for Monte Carlo Molecular Modeling
49
Key Concepts
50
Force Field
51
The extent to which a classical molecular simulation accurately predicts thermophysical properties depends on the quality of the force field used to model the interactions in the fluid.
Force Field
52
The forcefield contains the following building blocks for the calculations of energy:
Force Field
53
The forcefield contains the following building blocks for the calculations of energy:
Potential Energy Function
54