Professional Documents
Culture Documents
Lecture 9 2019 Fluctuations Sim Intro Final
Lecture 9 2019 Fluctuations Sim Intro Final
Molecular Simulation
• Model components
9.3 Announcements
• Pset 3 due Tuesday
1
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
time, and periodically recording the instantaneous energy, E(t). At each snapshot of the system,
E(t) = Ej , in other words, the system by definition will be in some microstate such that its energy
at time
R t will have a value equal to Ej . According to the ergodic hypothesis, over sufficiently long
times E(t)dt = hEi - that is, all microstates will be visited according to their Boltzmann-weighted
probabilities and we can observe the ensemble average value of E. Fluctuations by this definition
then refer to the expected temporal variation in E(t) as the system evolves in time. However,
because ergodicity establishes the equivalence of temporal measurements and ensemble averages,
we can also think of fluctuations in the energy as a measure of the variance in the energy in the
ensemble of microstates - i.e. simply a statistical quantity which reflects the distribution of energies
accessible to a system. The key point here is that temporal fluctuations in the quantity are exactly
equal to the statistical fluctuations in that quantity over long enough observation times such that
ergodicity establishes the equivalence of the temporal average and ensemble average.
Having established the definition of fluctuations, why do we care? Let us first consider fluctu-
ations of the energy in the canonical ensemble. Taking the statistical definition of fluctuations, we
can write the ensemble-average variance, h(δE)2 i, in the canonical ensemble as:
Here we have simply rewritten the ensemble-averaged square fluctuation (i.e., the ensemble-
averaged variance) in terms of ensemble averages of the energy itself. We can now use equations
from the canonical ensemble to substitute for these terms.
2
X X
h(δE)2 i = hE 2 i − hEi2 = pj Ej2 − pj Ej (9.5)
j j
2
1 X 1 X
= Ej2 e−βEj − Ej e−βEj (9.6)
Z Z
j j
2
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
e−βEj , we get
P
We next recognize that from the definition of the partition function, Z = j
∂Z
= − j Ej e−βEj . Therefore the above expression becomes:
P
∂β
!2
∂2Z
1 1 ∂Z
h(δE)2 i = − (9.7)
Z ∂β 2 N,V Z ∂β N,V
∂ 1 ∂Z
= (9.8)
∂β Z ∂β N,V
∂ ∂ ln Z
= (9.9)
∂β ∂β N,V
Note the use of the product rule to simplify the first line to the second line. We recall from
∂ ln Z
Lecture 3 that hEi = − ∂β to get:
N,V
2 ∂hEi
h(δE) i = − (9.10)
∂β N,V
∂hEi ∂T
= kB (9.11)
∂T N,V ∂T −1 N,V
2 ∂hEi
= kB T (9.12)
∂T N,V
= k B T 2 CV (9.13)
∂hEi
In the last line, we recognize that ∂T is the heat capacity at constant volume, an
N,V
experimentally measurable material constant. This relationship is remarkable - it shows that the
fluctuation (either with respect to time or with respect to the variation in the statistical ensemble)
of energy in a system at fixed N V T is related to the rate at which energy in that system changes
due to changes in the temperature. We call CV a thermodynamic response function; that is, it
shows the response of a system (i.e. change in energy) at equilibrium to a change in a parameter
(i.e. the temperature). The relation above shows that microscopic fluctuations in the energy are a
measure of the thermodynamic response of a system.
This relationship is strictly derived only at equilibrium, since everything we have done so far
in statistical mechanics is at equilibrium; it turns out that similar relationships between statistical
fluctuations and the response of a system also occur in non-equilibrium processes, leading to the
so-called fluctuation-dissipation relationship, but that is outside of the scope of this lecture.
The relationship between fluctuations and a thermodynamic response illustrates a new means
of calculating the heat capacity of the material. Without knowledge of this relationship, the
simplest way to calculate the heat capacity would be to perform multiple experiments at different
temperatures, measure the corresponding system energy, and equate CV to the slope of the resulting
line. Instead, Eq. 9.13 shows that we could take a single system at a fixed temperature and
instead measure the fluctuations of the energy over time to obtain CV in a single experiment. Such
measurements will be possible using computer simulations as we will discuss in future lectures. We
could also derive the fluctuations of other quantities, such as the density, and connect these to
other materials parameters as a general means of computing response functions from equilibrium
fluctuations.
3
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
p p
h(δE)2 i kB T 2 CV
= (9.14)
hEi hEi
√
N
≈ (9.15)
N
≈ N −1/2 (9.16)
This scaling analysis indicates that if N is a large number (e.g. on the order of 1023 particles),
then the ratio of fluctuations to the average energy approaches zero and the energy of the system
is effectively constant. Thus, in the large N limit the average energy calculated from the canonical
ensemble will be identical to the average energy of a microcanonical ensemble because energy
fluctuations are negligible - and this is exactly the limit in which classical thermodynamics is valid.
To illustrate this point in just a bit more detail, we can write the equation for the canonical
partition function by summing over all energy levels, and including the explicit degeneracy of energy
level ν:
X
Z(N, V, T ) = Ω(N, V, Eν )e−βEν (9.17)
ν
In the large N limit, we just showed that only a single value of Eν , the ensemble average value, is
meaningful, as fluctuations away from this value are unlikely. Thus, the degeneracy Ω(N, V, hEi) is
significantly larger than any other term in the summation, and we can write the partition function
instead as:
4
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
We can compare this last expression to the thermodynamic definition of the Helmholtz free
energy, F = E − T S. Therefore, we get that S = kB ln Ω(N, V, hEi), the Boltzmann entropy
used to define the microcanonical ensemble, and we see that the two ensembles make equivalent
predictions for the Helmholtz free energy. Similar measures of equivalency could be performed in
the thermodynamic limit for other ensembles as well.
There are thus four important conclusions to draw from our study of fluctuations: 1) that in
the thermodynamic limit, fluctuations are negligible, and hence we can discuss single values of
thermodynamic variables as being equivalent to ensemble averages; 2) that in the thermodynamic
limit all ensembles are equivalent, and hence we can use any ensemble that is mathematically con-
venient to relate molecular properties to macroscopic observables; 3) that microscopic fluctuations
are proportional to a response function, both in equilibrium and in non-equilibrium processes; and
4) fluctuations are measurable properties of a system that can be used to inform experimental
measurements (e.g. in light scattering).
• Kinetic theory of gases (although we will touch on this in the next unit)
If you’re interested in these topics, I am happy to point you toward relevant textbooks.
5
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
How, then, can we leverage the strength of statistical mechanics - that is, relating microscopic
features of a system to macroscopic thermodynamic properties via the partition function - if the
partition function cannot be analytically obtained? One solution is to simulate the systems of
interest to sample system configurations according to the correct underlying probability distribution
rooted in the findings from statistical mechanics. These simulations, which we will refer to as
molecular simulations to distinguish from alternative simulation methodologies that focus on
computing quantum mechanical properties, will be the focus of the next few lectures.
In this class, we will focus on two major types of simulation methods: Monte Carlo simula-
tions, abbreviated as MC simulations, and Molecular Dynamics simulations, abbreviated as
MD simulations. MC and MD simulations aim to calculate the same properties of a system, but the
two methods differ in their approach. The two methods can be compared by recalling the ergodic
hypothesis, which states that the time-average value of a system property Y over a sufficiently long
timescale τ is equivalent to the ensemble-average value of that same property (from Lecture 2):
Z τ
1 X
Y (t)dt = p i Yi (9.22)
τ 0
6
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
factors, including the length scale over which we expect interesting behavior, the importance of
thermal motions, etc. Here, we will summarize various ways to represent a physical system and
comment on examples in the literature for which they are commonly used.
• All-atom - single solutes in solution (e.g. ions in water); small proteins; nanomaterials
• United-atom - lipids; self-assembled monolayers; surfactants
• Coarse-grained - polymers; multicomponent cell membranes; liquid crystals, macromolecular
complexes
7
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
for the Langmuir isotherm and the Ising model in the Statistical Mechanics unit. A lattice model
is an inherently (highly) coarse-grained system, and is typically used for systems for which MD
simulations are inappropriate due to the difficulty in sampling a system ergodically. Due to the
discretization of lattice positions, lattice models are typically used with MC sampling since forces
may be not be easily obtained.
Beyond the MC simulations studied in this class, lattice models are often used with field-based
simulation techniques, such as self-consistent field theory, or with techniques in which the system
is treated using equations from continuum mechanics (finite element analysis) or fluid dynamics
(Lattice Boltzmann methods). These techniques are beyond the scope of this class. Examples of
systems in which lattice models may be used with MC simulations include:
Bonds in real systems emerge from quantum mechanics, and hence any simulation representation
that neglects electron degrees of freedom is an approximation to a covalent bond. Most atomic
simulations include potentials to restrict bond lengths, bond angles, and dihedral angles, with the
typical implementation of these potentials being a harmonic spring. Since the specifics of this
8
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
approach will vary significantly on a case-by-case basis we will not discuss bonded potentials in
more detail other than recognizing their existence.
" 12 6 #
σij σij
ELJ (rij ) = 4ij − (9.23)
rij rij
Here, rij is the (scalar) distance between particle i and j, ij is a characteristic interaction energy
and σij is a characteristic interaction length scale describing the approximate diameter of a particle.
The Lennard-Jones potential is broken into an attractive interaction that scales with r−6 and a
repulsive potential that scales with r−12 . The attractive potential represents three contributions
to typical van der Waals interactions that are all attractive and scale with r−6 : London dispersion
forces, which are related to interactions between instantaneous dipoles that arise from quantum
mechanical considerations; dipole-induced dipole interactions, which are related to attractions be-
tween dipoles on a molecule and induced dipoles that arise from the polarizibility of a different
molecule; and Keesom interactions, which emerge from the orientation dependence of dipole-dipole
interactions. In general, we do not attempt to divide the LJ potential into contributions from these
three distinct interactions, but rather empirically identify parameters for and σ which capture all
three effects. The repulsive potential represents Pauli exclusion, which acts to ensure that particle
wave functions do not overlap. There is no single scaling relation for Pauli exclusion other than
that it must be a strong repulsive force, so for computational convenience r−12 is chosen since the
calculated r−6 term can be simply squared.
In addition to van der Waals interactions, it is typical to associate charges (or partial charges,
to account for the unequal distribution of electrons throughout a molecule that leads to dipoles) to
atoms or particles in a system. These charges interact via a long-range Coulombic potential:
1 qi qj
Ecoulomb (rij ) = (9.24)
4π0 r rij
where 0 is the permittivity of free space, r is the relative dielectric constant (1 in vacuum, 2-4 in
oil, 80 in water), and qi is the charge on particle i. In practice, Coulombic interactions are difficult
to calculate in simulations due to periodic boundary conditions because they decay slowly and
the minimum image convention is a severe underestimate of the total magnitude of electrostatic
interactions. Instead, advanced techniques, such as Ewald summations, have been derived handle
their calculation. Such methods are outside of the scope of this discussion but are discussed in the
Frenkel and Smit textbook if you would like to review them on your own.
9
University of Wisconsin-Madison Lecture 9
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 3, 2019
Many other non-bonded interactions are possible and in common use, but these represent the
two most common functional forms used in most atomistic simulations.
10