Professional Documents
Culture Documents
NC STATE UNIVERSITY
MC and Phase Equilibria: Indirect Methods
• For situations when GEMC is not suitable, an alternative is to calculate free
energies or chemical potentials for a range of state conditions → indirect
methods. The phase transitions and chemical equilibrium conditions can then be
determined by the usual thermodynamic relationships
• Question: how can we evaluate entropy-related (‘statistical’) quantities, such as
the Gibbs and Helmholtz free energies, the chemical potential and the entropy
itself, in a molecular simulation run?
– It is not possible to measure these functions directly in a simulation
– For example, the expression for A in the NVT ensemble is:
A kT ln Q N ,V , T
– Since these functions are related directly to the partition function, not to its
derivatives, they are not simple averages of functions of the phase space
coordinates of the system. To calculate Q would mean summing over all the
possible states of the system (impossible to do in a simulation)
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
• There exist several techniques for “measuring” the chemical potential of a given
species in a single MC simulation.
• In these techniques, what we measure is not the chemical potential itself, but the
excess chemical potential, defined as:
μ ex μ μ id
where μid is the chemical potential of the given species as an ideal gas under the
same conditions, N,V,T; μid can be evaluated analytically
• A simple method for measuring the excess chemical potential of a species in a
pure fluid or in a mixture is the test particle insertion method proposed by Widom
(B. Widom, J. Chem. Phys. 39, 2808 (1963); J. Phys. Chem. 86, 869 (1982))
• For a derivation of the Widom test particle equation see: C.G. Gray, K.E.
Gubbins, C.G. Joslin, “Theory of Molecular Fluids. 2. Applications”, pp. 633-36,
Oxford University Press (2011)
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
• From thermodynamics, we know that μi (the chemical potential of species i) is
defined in the canonical ensemble as:
A
i
i T ,V , N '
N
Since A kT ln Q N ,V , T
A ln Q
i i kT (2)
N i T ,V , N ' N i T ,V , N '
ln QN 1 ln QN QN 1
kT kT ln (3)
N 1 N N
Q
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
• In the following derivation, we will assume we have a one-component system with
N atoms* inside a cubic volume V of length L. The canonical partition function of
this system can be written as
(4)
but N + 1 ≈ N
for sufficiently large N
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
• But (5)
V
μ ρ kT ln 3
id
Λ N ideal gas reference state
and μ μ id μ ex at the same density & temperature
as the system under study
Therefore,
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
(6)
• We can rewrite
where test represents the additional interaction energy due to the presence of
the (N+1)th particle (the ‘test’ particle) at an arbitrary fixed point in the box
containing N particles.
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
(7)
• But 1
1
test
d s (scaled coordinates); and canonical average over the
0 configuration space of the
N-particle system
(8)
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
(9)
• Equation (9) expresses μex as an ensemble average that can be sampled by the
conventional Metropolis scheme. This equation was called by Widom the
potential distribution theorem. It is valid regardless of the type of molecule or the
presence of multi-body potential terms.
• Algorithm:
– Carry out a conventional NVT-MC simulation on the system with N particles
– At frequent intervals during the simulation, insert a ‘test’ particle in a number
of random positions and compute the interaction of the test particle with all
others. Obtain the average
over the whole run. The test particle is a ‘ghost’ particle. That is, it observes
and measures interactions with the real molecules of the system, but these
real molecules are unaware of the ‘ghost’ particle.
NC STATE UNIVERSITY
Test Particle Method
• For a pure substance: Vapor branch
Coexistence
Chemical potential
Pressure
+
L
S V
Many simulations
Liquid branch to get one point on
Constant T phase diagram!
Pressure Temperature
or Density
• Need a number of simulations to get one point on phase diagram; tedious search-
and-evaluation process
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
(10)
μ id
P kT lnΛ βP
3
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
• For the NVE ensemble, it is necessary to include the fluctuations in the kinetic
temperature (see D. Frenkel, in Molecular Dynamics Simulations of Statistical
Mechanics Systems, pp. 151-188, ed. G. Ciccotti and W. G. Hoover, Proceedings
of the 97th Int. Enrico Fermi School of Physics, North Holland, Amsterdam
(1986)):
m ex = -k T ln éë T T -3 2 exp ( -U test kT ) ùû
-3 2
NC STATE UNIVERSITY
Widom’s Test Particle Insertion Method
NC STATE UNIVERSITY
Histogram Reweighting: Free Energies from
Histograms
• In computer simulations, we can adjust our methods to sample from an
unphysical distribution to gather information about the system
• Consider a GCMC simulation, with a fluctuating number of particles. At
equilibrium, the particle number should converge to an average value and
fluctuate about the average
• Because of very low probability of traversing the intermediate density region
between liquid and vapor, the system can get “stuck” and only one phase will be
sampled.
• By introducing a “weighting function” into the Monte Carlo acceptance criteria,
we can reduce the energy barrier and sample more uniformly.
• With this weighting function, we can sample N uniformly and thus sample both
liquid and vapor phases in a single simulation
• This is clearly unphysical (imagine a sample of some substance fluctuating
between liquid and vapor densities), but can give us valuable information about
the system.
NC STATE UNIVERSITY
Free Energies from Histograms
• Adding a weighting function, η(N), to the GCMC acceptance criteria gives state
probabilities:
U N ( N )
r ,N
w
N
e
N!
3N
NC STATE UNIVERSITY
Free Energies from Histograms
• A simulation is run with a given weighting function (usually initialized as η0(N)=0
and a histogram is collected.
• After this simulation, the weighting function is updated according to
i 1 ( N ) ln f ( N ;i ) i ( N ) k
where f is the number of histogram counts and k is an arbitrary constant usually
assigned to make the minimum of the weighting function zero.
NC STATE UNIVERSITY
Free Energies from Histograms
figure taken from Chipot, Ch, and A. Pohorille. Free Energy Calculations: Theory and Applications in Chemistry and
Biology.
NC STATE UNIVERSITY
Free Energies from Histograms
• Note that the last equation is undefined for a histogram bin with zero counts. It
has been shown (G. R. Smith and A. D. Bruce, J. Phys. A 28, 6623 (1995)) that
i 1 ( N ) ln f ( N ;i ) 1 i ( N ) k
is a statistically-justified update scheme which avoids this difficulty.
• When a flat histogram is achieved, we can estimate the free energy, A(N)
A( N ) N kT ( N ) constant
• The multicanonical method often has too much statistical error for a direct
calculation of A(N). Other methods are available.
NC STATE UNIVERSITY
Thermodynamic Integration
• References: Frenkel & Smit, pp. 168-172, 241-267 (and references therein); Allen
& Tildesley, pp. 49-50 (and references therein)
• Experiments always determine a derivative of the free energy, e.g.
A P
(11)
V N ,T
A T
U
(12)
T N ,V T2
• Therefore, to compute the free energy of a system at given temperature and
density, we should find a reversible path in the V-T plane, linking the state under
consideration to a state of known free energy. Then, the change in A along that
path can be evaluated by thermodynamic integration of (11) and (12).
• There are only a few thermodynamic states for which the free energy of a
substance is known. One of them is the ideal gas phase; another is the low-
temperature harmonic crystal.
NC STATE UNIVERSITY
Thermodynamic Integration
• Let us rewrite (11) in terms of the excess Helmholtz free energy:
Aex
id
A A
V P P id
V N ,T V N ,T N ,T
Aex
P ρkT (14)
V N ,T
where ρ kT is the pressure of an ideal gas at the same density as the system
under study.
NC STATE UNIVERSITY
Thermodynamic Integration
• Therefore, to determine the Helmholtz free energy of a liquid phase with density
ρ, we can integrate (14) from an ideal gas phase (for which
Aex = 0) to the state of interest, keeping the temperature and N constant:
Aex 1
V
1
d
0 P kT dV P kT 2
NkT
NkT 0
kT
Aex A Aid
1 P kT
kT 0 2
d (15)
NkT NkT NkT
• An important condition is that the integration path in (15) should be reversible. If
the integration path crosses a first-order transition, hysteresis may occur and (15)
can no longer be used.
NC STATE UNIVERSITY
Thermodynamic Integration
• For a liquid phase at ρ and T, this problem can be avoided by performing the
integration in two steps:
– First, at a temperature TII well above the critical, use (15) to integrate along
this isotherm from the ideal gas phase to the supercritical fluid state at ρ and
TII:
Aid
ρ 1 ρ
P ρkT II
NkT II ρ 2 dρ
II
A ρ, T II II (16)
NkT kT 0
– Then, integrate (12) along a line of constant density, cooling the system from
TII to the temperature of interest T
A ρ, T A ρ, T II
U
2 dT
T
(17)
II
T T T II
T
NC STATE UNIVERSITY
Thermodynamic Integration
• It is not really necessary to go all the way to the ideal gas. One can start from a
state (ρ1, T1) for which we can compute the free energy. In practice, ρ1 should be
a sufficient low density to ensure that the free energy can be computed accurately
(e.g., by using the Widom method to determine the excess chemical potential).
Then one can determine the Helmholtz free energy of a liquid phase at density ρ2
and temperature T2 by integrating (11):
V2 ρ2
A A PV dV P dρ
NkT 2 NkT 1 2 (18)
V1
NkT V ρ1
kT ρ
Again, the integration should be done along a reversible path linking the states
(ρ1, T1) and (ρ2, T2).
NC STATE UNIVERSITY
Solid-Liquid Equilibria and Thermo Integration
• The solid-liquid phase equilibria problem requires different approaches. For a
review see, e.g., P. A. Monson and D. A. Kofke, in Advances in Chemical Physics,
ed. I. Prigogine and S. A. Rice, vol. 115, pp.113-179, Wiley, New York (2000).
Also, see Frenkel & Smit, ch. 10
• The main problem is that the solid-liquid coexistence curve itself does not end in
a critical point, and hence there exists no “natural” reversible path from the solid
to the ideal gas that does not cross a first-order phase transition.
• It is usually possible, however, to use thermodynamic integration and construct a
reversible path to other states of known free energy.
• The basic idea of one of the methods is to transform the solid under consideration
reversibly into some reference system for which the free energy can be evaluated
analytically.
• For a brief description of the reference systems used for solids, see the review
paper by Monson & Kofke.
NC STATE UNIVERSITY
Solid-Liquid Equilibria and Thermo Integration
• One of the most widely used reference systems is the non-interacting Einstein
crystal:
• Suppose we have an atomic solid system where the atoms interact with a
continuous potential (rN). We shall use thermodynamic integration to relate the
free energy of this system to that of a non-interacting Einstein crystal (J. Q.
Broughton and G. H. Gilmer, J. Chem. Phys. 79, 5095 (1983); D. Frenkel and A.
J. C. Ladd, J. Chem. Phys. 81, 3188 (1984))
NC STATE UNIVERSITY
Solid-Liquid Equilibria and Thermo Integration
• During the thermodynamic integration, we switch on the spring constants and
switch off the intermolecular interactions. To this end, we consider a potential
energy function:
(19)
where r0,i is the lattice position of atom i and (r0N) is the static contribution to the
potential energy (i.e., the potential energy of a crystal with all atoms at their lattice
positions), λ is the switching parameter and αi is the Einstein-crystal spring
constant coupling atom i to its lattice site.
• Note that for λ = 0 we recover the original interactions. For λ = 1 we have
switched off the intermolecular interactions completely (except for the constant
static term), and the system behaves like an ideal, non-interacting Einstein
crystal.
NC STATE UNIVERSITY
Solid-Liquid Equilibria and Thermo Integration
• The partition function for a system with a potential energy function that
corresponds to a value of λ between 0 and 1 is:
(20)
• The derivative of the Helmholtz free energy A(l) with respect to λ can be written
as an ensemble average:
(21)
NC STATE UNIVERSITY
Solid-Liquid Equilibria and Thermo Integration
where denotes an ensemble average for a system with a potential energy
λ
function (λ), such as (19).
• Therefore, the free energy difference between the systems with λ = 0 (original
system) and λ = 1 (non-interacting Einstein crystal) can be obtained by integrating
(21):
(22)
• The configurational free energy of the non-interacting Einstein crystal is given by:
where
d = dimensionality (23)
NC STATE UNIVERSITY
Solid-Liquid Equilibria and Thermo Integration
NC STATE UNIVERSITY
The Meso-Scale
NC STATE UNIVERSITY
Outline
• Introduction
• Interaction potentials
• Moves
• Discretization
• Applications
NC STATE UNIVERSITY
The Meso-Scale & Coarse Graining
EO EO EO OH
CR1 CR2 CR2 EO EO
NC STATE UNIVERSITY
The Meso-Scale and Coarse Graining
eEB eEA
NC STATE UNIVERSITY
Simple Lattice Model
Coordination number, Z
3D - Lattice Z=6 Z = 26
NC STATE UNIVERSITY
Simple Lattice Model
Lattice simulation: Discontinuous potential
-2 1 -2 1
-1.5 -1.5
Reduced Potential
Reduced Potential
-1 Square well -1
-0.5 -0.5
0 0
0.5 0.5
1 Long range potential 1
1.5 used by 1.5
2
0 0.5 1 1.5 2 2.5 3 Panagiotopoulos 2
0 0.5 1 1.5 2 2.5 3
Reduced distance Reduced distance
0.2
Reduced Potential
0
-0.2
-0.4 Lennard-Jones
-0.6 potential
-0.8
-1
-1.2
0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4
Reduced distance
NC STATE UNIVERSITY
Simple Lattice Model
• Effective interaction parameter: 2 Species
A lattice system containing two types of molecules with
different interaction potentials can be represented by a
single effective interaction parameter.
Therefore, N A NB N (1)
NC STATE UNIVERSITY
Simple Lattice Model
• Effective interaction parameter
E is the total energy of the system for a given configuration.
EN e N e N e
AA AA BB BB AB AB
(2)
NC STATE UNIVERSITY
Effective Interaction Parameters
NC STATE UNIVERSITY
Simulation scheme
1. A molecule (chain / solvent) is chosen
randomly.
2. The molecule is moved to a new position.
3. The energy of the new configuration is
calculated.
4. The move is accepted according to the
canonical acceptance probability,
é æ DE ö ù
Pacc = min ê1,exp ç - ÷ ú
ë è kT øû
E Enew Eold T: temperature, k: Boltzmann factor
NC STATE UNIVERSITY
Moves
Moves are employed to change the positions
of the molecules during simulation.
NC STATE UNIVERSITY
Switch
Two solvent molecules exchange positions
NC STATE UNIVERSITY
Reptation
Each segment of a chain is moved through
one lattice unit, in a snake-like motion.
NC STATE UNIVERSITY
Twist
A single segment is moved through one
lattice unit keeping the rest of the chain fixed.
NC STATE UNIVERSITY
Chain regrowth: Configurational bias
The entire chain or a part of the chain is
grown in a different part of the box.
NC STATE UNIVERSITY
Configurational Bias
NC STATE UNIVERSITY
Lattice Discretization
Particle diameter
Lattice size
NC STATE UNIVERSITY
Discretization
Comparison of discretized lattice with off-lattice simulations1:
Gas-Liquid Phase Coexistence of + 1
Lennard-Jones particles
x 2
Increasing 3
5
10
Off-lattice
line simulation
• Surfactant solutions
Surfactant / water
Surfactant / Water /oil
• Supercritical fluids
• Polymers
• Proteins
NC STATE UNIVERSITY
Applications
Larson’s model of surfactant solutions:
• Fully occupied
• Coordination number, Z = 26
NC STATE UNIVERSITY
Ron Larson, University of Michigan
NC STATE UNIVERSITY
Applications: Larson’s model
Binary system – Water/Surfactant
Simulation1 Experiment2
Ref: 1) A.D. Mackie and A.Z. Panagiotopoulos, Langmuir 13, 5022 (1997).
2) P.H. Nelson, G.C. Rutledge and T.A. Hatton, J Chem Phys 107, 10777 (1997)
3) M.A. Floriano and E. Caponetti, Langmuir 15, 3143 (1999)
4) C.M. Care and T. Dalby, Europhys Lett 45, 38 (1999)
5) A.T. Bernardes, Langmuir 12, 5763 (1996)
NC STATE UNIVERSITY
Applications: Supercritical Fluids
Model
Supercritical Fluids:
Surfactant
Surfactant in supercritical Vacancy
CO2
CO2
Vacancies to account for CO2 compressibility
Surfactants Micelles
Surfactant
Conc.
NC STATE UNIVERSITY
Applications: Supercritical Fluids
Qualitative comparison with experiment: Surfactants in supercritical CO2
Simulation1 Experiment2
-130
-132
-134
-138
-140
-142 Equilibrium
-144
-146
-148
0 100000 200000 300000 400000 500000
cycles
window
Structure obtained by
Lattice MC
Computer Schematic
T=0.9 Simulation
1 Experiment2
T=1.3
Adsorption of HT2 on H-preferred surface1 C8E4 in controlled pore glass (CPG-10, 24 nm)2
Confined PS-b-PMMA
Confined H12T12 copolymer copolymer
• Similar structures found in experiments and simulations
• Simulation also predicts other structures depending on Pattern spacing LS
Ref: 1) Q. Wang, Q. Yan, P. F. Nealey, and J. J. de Pablo, Macromolecules, 33, 4512 (2000)
2) L. Rockford, Y. Liu, P. Mansky, T. P. Russell, M. Yoon and S. G. J. Mochrie, Phys. Rev. Lett. 82, 2602(1999)
NC STATE UNIVERSITY
2-D Lattice model of the separation of water/protein mixture
Figure 1. Model protein and water. The black circles Figure 2. Phase diagram of a 20-mer homopolymer
represent protein monomers, and the lines protein calculated using the combined protein and
connecting them are covalent bonds. The white and water simulation(solid line) and the separated protein
gray circles are bulk and interfacial water molecules, in vacuo simulation (dashed line). Temperature and
respectively. The four arms on each water molecule pressure are presented in dimensionless units.
are the hydrogen bonding arms. Two examples are
shown of interfacial bonding arm pairs, which involve
at least one interfacial water molecule. Debenedetti PG et al., JPCA, 111, 12651, 2007.
NC STATE UNIVERSITY
Appendix: Configurational Bias Method
Acceptance Criteria: Derivation
Detailed balance:
Po P(o n) Pacc Pn P(n o) (7)
NC STATE UNIVERSITY
Chain regrowth: Configurational bias
Probability of change from old to new:
P(o n) P1 (n) P2 (n) .........Pl (n)
exp(u2 (n) / kT )
z exp(u1 (n) / kT )
w2 ( n )
exp(ul (n) / kT )
........... (9)
w l ( n )
exp(U ch (n) / kT )
z
W ( n)
Similarly, P(n o) z exp(U ch (o) / kT ) (10)
W ( o)
NC STATE UNIVERSITY