Professional Documents
Culture Documents
victor.parra
February 2021
1 Statistical mechanics
1.1 Define the partition functions.
q measures how the total number of molecules is distributed over the available
microstates. Q gives the probability of occurrence of members in a single state
i of the entire system of energy Ei
The logarithm of the partition function for any ensemble, times K, gives the
macroscopic thermodynamic potential
1
1.5 Electronic Partition Function
X E X E
qE = e−βεj = gj e−βεj
Electronic energy separations from the (degenerate) ground state are usually
very large, so for most cases at not very large temperatures: q E = g0
n2 h2
εT =
8ma2
• If 3-D container
εR
J = hcBJ(J + 1)
• B is a rotational constant that can be compute for linear and non linear
molecules
• B= h
8cIπ 2 , where the moment of Inertia can be computed as I = Σ(mi ri2 )
kΘR = hcB
2
T
qR =
σ ΘR
• σ is the number of indistinguishable orientations of the molecule
For non linear molecules: we have three moments of inertia and three
rotational constants A, B and C.
π 1/2 T 3/2
qR =
σ (ΘA ΘB ΘC )1/2
where,
h2
ΘX = , X = A, B, C
8π 2 Xk
1
εV = (n + )hν
2
• Rotational partition function
−ΘV
e 2T T
qV = −ΘV
≈
1−e T
ΘV
f
X 1
εV = ((ni + )hνi )
i
2
−ΘV
i
e 2T
q V
= Πfi qiV = Πfi −ΘV
i
1−e T
3
1.9 Mean Energies
When the molecular partition function can be factorized into contributions from
each mode, the mean energy of each mode M
M 1 ∂q
hε i = −
q ∂β V
with M = T, R, V, or E modes
X
qT =
Λ
T Λ ∂X/Λ d 1 1
hε i = − ( )V = −β 1/2 = kT
X ∂β dβ β 1/2 2
U (T ) = U (0) + E(T )
N
X
U (T ) = U (0) + (pi Ei )
i
N
X e−βEi 1 ∂Q
U (T ) = U (0) + (Ei ) = U (0) −
i
Q Q ∂β
∂(ln(Q))
U (T ) − U (0) = −
∂β V
Entropy
N
X
S(T ) = kln(W ) = k(ln(N !) − (ln(ni ))
i
’
Sterling approximation ln(N !) = N ln(N ) − N
N
!
X
S(T ) = k N lnN − (ni ln(ni )
i
4
n
i
X X
S(T ) = k (ni lnN − ni ln(ni )) = −k (ni ln
N
X
S(T ) = −kN (pi ln(pi )
−βEi
X e
S(T ) = −kN pi ln )
q
X X
pi ln e−βEi + kN
S(T ) = −kN (pi ln(q))
X
S(T ) = kN (pi βEi ) + kN ln(q)
E(T )
S(T ) = + k ln(Q)
T
U (T ) − U (0)
S(T ) = + k ln(Q)
T
U (T ) − U (0) U (T ) − U (0)
S= + klnQ = + kN lnq − klnN !
T T
Using:
• Stirling Approximation
• n = N/Na
• K = R/NA
U (T ) − U (0)
S(T ) = + nR ln(q) − nR ln(N ) + nR
T
The only mode of motion for a gas of atoms is translational
V h
q= Λ3 with Λ = (2πkmkT )1/2
3
U (T ) = U (0) + nRT
2
e5/2 V
S(T ) = nR ln
nNA λ3
∂lnQ
G = −kT ln Q + kT V
∂lnV T
5
2 Molecular Dynamics
2.1 Limitations of classical MD
1. Use of classical laws of motion:
q It is required a minimum average dis-
2πh̄2
tance between particles to be: M kB T << a
hAit = hAiensemble
φ(r) α r− 6
φ(r) α r− 1
6
2. We can use Periodic boundary condition rather than reflecting rigid
walls. When one particle abandons the unit cell trough one side of the
box, another particle with the exact same velocity re-appears through the
opposite side.
3. In computer simulations, one of these is the original simulation box,
and others are copies called images.
4. During the simulation, only the properties of the original simulation box
need to be recorded and propagated
3. Simulation parameter file: What do you want to run? (e.g. time step,
cutoffs)
7
2.8 Initial Structure
The conventional unit cell is the smallest 3D repeating unit that covers the area
of the whole lattice once and only once if translated by all the lattice vectors
∆t2
r(t + ∆t) = r(t) + v(t)∆t + a(t)
2
v(t + ∆t) = v(t) + a(t)∆t
2. Verlet Algorithm: Does not use the velocity to compute the new position.
One step forward and one step backwards
8
• Kinetic energy v(t + ∆t) and Potential energy r(t + ∆t) can not be
calculated simultaneously.
— Available in GROMACS —
3. Leap-Frog algorithm: Half-steps method. It is a variant of the Verlet
algorithm
∆t
r(t + ∆t) = r(t) + v(t + )
2
∆t f (t)
v(t + ∆t) = v(t − )+ ∆t
2 m
• Leap-Frog explicitly includes the velocity in the evolution scheme.
• Does not require difference of large numbers
f (t) 2
r(t + ∆t) = r(t) + v(t)∆t + ∆t
2m
a(t + ∆t) + a(t)
v(t + ∆t) = v(t) + ∆t
2
• Best estimate of velocities among the Verlet-like algorithm
• More function evaluations with respect to Leap-Frog
9
2.12 Temperature
Equipartition theorem links the concept of macroscopic temperature and mi-
croscopic dynamics
N
X 1 3
Ek = mi vi2 = N kb T
i
2 2
e−βE
p(E) = R
dx1 ..dxN e−βE
Isokinetic:
Berendsen:
• weak-coupling with first-order kinetics to an external heat bath with
given temperature
s
n∆t TRef
λ= 1+ −1
τ T (t − ∆t/2)
dT TRef − T
=
dt τ
2Cv ∗
tau = τ
3N kB
10
• This algorithm does not sample correctly the canonical ensemble.
If we add an additional stochastic term that ensures a correct
kinetic energy distribution, then it could work better.
r
dt 4KKref
dK = (Kref − K) ∗ + dW
τ 3N τ ∗
Andersen:
• Select a particle (randomly)
• Exchange its actual velocity by a velocity from Max wells Boltzmann
distribution at Tref
• Repeat in periodic intervals
Extended ensemble
Nose-Hoover
• The time it takes to relax with Nose-Hoover coupling is several times larger
tan τ
• It produces an oscillatory relaxation
• It is not so efficient for relaxing a system to the target temperature (in
comparison with Berendsen algorithm), but it can be used to correctly
sample a canonical ensemble
Berendsen
• weak-coupling with first-order kinetics relaxation of the pressure to-
wards a reference pressure.
• Every n steps re-scale the coordinates of each particle and the box
vectors.
11
nδt
β P R efij − Pij (t)
µij = δij −
τp
• It yields with the correct average pressure, but not exactly the exact
isobaric ensemble
• It is very useful when the initial pressure is very far from the reference
equilibrium pressure.
Extended ensemble
1. Andersen
2. Parrinello-Rahmann
d2 h
= V W−1 (hT )−1 (P − P ref )Gives the true isobaric ensemble Using Leap-frog algorithm the
dt2
2.2 Employ a barostat in order to find the correct density compatible with
the thermodynamic conditions of the system.
3. Production run.
12
2.19 Radial Distribution Function
- It can be used to characterize the phases of a substance.
1
P
g(r) = ρ4πr 2 dr (hδ(r − |ri − rj |)i
with δ(x) = 1 if x = 0
N KB T 2 Cv = hE 2 i − hEi2
Goal: Calculate the free energy difference between the reference system and
the target system characterized by Hamiltonian H1 (pN , rN )
13
3.2 Free Energy and Energy Probability Distribution
Q1
∆A = −kT ln Q0
∆A = − β1 lnhe−β∆H i0
If the number of particles is constant and the mass is also constant, the
Kinetic energy would cancels out.
∆A = − β1 lnhe−β∆U i0
It is also possible to obtain the difference in free energy based on the sam-
pling of the probability distribution of the internal energy.
1
∆A = h∆U i0 − βσ 2
2
• Direct use of the forward FEP equation can be successful only
if P0 (∆U ) is narrow function of ∆U . This does not imply that the
difference between the reference and the target states must be small.
Non-overlapping states
What if H0 − H1 >> kT ??
14
∆A = A(1) − A(0) = (A(1) − A(N )) + (A(N ) − A(N − 1)) + ... + (A(I) − A(0))
H(λi ) = H0 + λi ∆H
N
X −1
∆A = −kT lnhe−β∆λ∆U iλi
i=1
Conditions
3. If the important region of the two systems do not overlap, the important
region of the target state is not expected to be sufficiently sampled during a
simulation of the reference state. Satisfactory estimates of ∆A are unlikely
to be obtained.
15
Z Z
drN dpN e−βH
∆A = −kT ln(Q(λ)) = −kT ln
∂H(λ)
drN e−βH(λ)
R
∂A(λ) 1 ∂Q ∂λ
= −β = R
∂λ Q ∂λ drN e−βH(λ)
Z λ1
∂H(λ)
∆A = h idλ
λ0 ∂λ
Where h ∂H(λ)
∂λ iλ is the ensemble average of the derivative of H with respect to λ
Then,
A(ξ0 ) = −kT ln(Q) − kT lnhδ(ξ − ξ0 )i
Important:
1. Small changes in the free energy A(ξ) may correspond to P (ξ) changing
by an order of magnitude from its ”most-likely” value
2. Montecarlo and MD do not sample properly the region where P (ξ) drasti-
cally change from its ”most-likely” value.
16
2. The umbrella sampling is applied to a pre-defined reaction coordinate
that best describes the transition of the system from the original state to the
target state. This reaction coordinate summarizes all the degrees of freedom
into few parameters called collective variables.
17