ES98D · Course contents

9. Collective coordinates and free-energy differences

A system can spend almost all its simulation time in one basin even when another basin carries appreciable equilibrium probability. The obstacle is not the definition of the Boltzmann measure; it is the scarcity of trajectories connecting the relevant regions. To describe the obstacle, we often replace a configuration with a few collective coordinates. To overcome it, we modify sampling and then account for that modification.

The central distinction is between an energy evaluated at one configuration and a free energy that counts many configurations together. We encountered it in the first chapter's competition between energy and multiplicity. Here it becomes a computational tool.

9.1 A collective coordinate retains a question, not a full state

A collective variable is a map s:RdN→Rms:\mathbb R^{dN}\to\mathbb R^m, usually with m≪dNm\ll dN, chosen to distinguish structures or processes of interest. Examples include coordination numbers, bond-order parameters, torsional angles and distances. A Ramachandran plot uses two backbone dihedral angles to describe molecular conformations.

Many configurations share the same value of ss. A good coordinate separates relevant basins and exposes important slow transitions; it need not determine the microscopic state or make the reduced dynamics Markovian. A hidden slow coordinate can remain trapped even while the displayed coordinate moves freely.

At equilibrium the marginal density of z=s(r)z=s(r) is

ps(z)=1Z∫e−βU(r)δ(z−s(r))dr.p_s(z)=\frac1Z\int e^{-\beta U(r)}\delta(z-s(r))dr.

Equivalently one may keep the momentum integral and state-counting factors in a constrained partition function Q(z)Q(z). They change only a zz-independent constant when the kinetic degrees of freedom factorise. Define the potential of mean force, or coordinate-dependent free energy, by

Fs(z)=−β−1log⁡ps(z)+C.F_s(z)=-\beta^{-1}\log p_s(z)+C.

This is defined relative to a coordinate measure such as dzdz. Under a one-to-one reparameterisation y=f(z)y=f(z),

py(y)=ps(z)∣det⁡dzdy∣,Fy(y)=Fs(z)−β−1log⁡∣det⁡dzdy∣+C′.p_y(y)=p_s(z)\left|\det\frac{dz}{dy}\right|, \qquad F_y(y)=F_s(z)-\beta^{-1}\log\left|\det\frac{dz}{dy}\right|+C'.

For a radial distance in three dimensions, a shell contributes a factor proportional to r2r^2. A raw distance histogram and a radial density with that geometric factor divided out therefore yield different free-energy curves. The delta integral contains the appropriate coarea/Jacobian weighting; it is not an unweighted average over a level surface.

As a discrete example, compare a basin with one configuration of energy zero and a basin with four configurations of energy Δ\Delta. Their equilibrium free-energy difference is

FB−FA=Δ−kBTlog⁡4.F_B-F_A=\Delta-k_BT\log4.

The fourfold basin can win despite its higher energy. This exactly recovers the first chapter's level probabilities. No single minimum-energy configuration can supply the missing multiplicity.

The free energy counts states

One configuration versus four

A: one state, energy 0B: four states, energy log 2

Every B microstate is individually less probable than A.

Combine energy and multiplicity

β(FB − FA) = log 2 − log 4= −log 2pB / pA = 2pB = 2/3

B is favoured as a basin because four compatible states outweigh the energy penalty.

The same one-versus-four level example as Chapter 1. Dimensionless quantities use kBT as the energy unit, with βΔ = log 2. ↗

A barrier in FsF_s can indicate a sampling obstruction if the coordinate resolves the slow mechanism. A projected barrier alone does not determine a physical transition rate; dynamics, diffusivity and unresolved coordinates also matter.

Two valleys have equal minimum potential energy. Why can one contain more equilibrium probability? Scan their transverse widths.

See the states hidden behind a free-energy curve
A transverse coordinate has width
energy U(x,y)xhidden yscan x = -0.96; width w = 0.52
Integrating it changes the landscape
energy / free energy + constantretained coordinate x-1.71.705solid: F; dashed: V

∫e⁻ᵁ⁄ᵀdy ∝ w(x)e⁻ⱽ⁽ˣ⁾⁄ᵀ; F = V−T log w

x = -0.96; transverse width 0.52; potential floor 0.01, free energy 0.53 + constant.

Paused. Play the sequence, step through it, or drag the position slider.

Analytic model U = (x²−1)² + y²/[2w(x)²], x in [−2,2], y on the real line, w = 0.35 + 0.65(x+2)/4. The displayed surface truncates y to ±2w for clarity; F = U(x,0)−T log w + constant integrates all y exactly.

The wire surface is U(x,y); a moving cross-section exposes how much room is available at each x. Compare the potential floor with the free energy after the hidden y coordinate has been integrated out. ↗

9.2 Change the measure, then undo the change

Add a bias B(s(r))B(s(r)) to the potential. The biased marginal is

pB(z)∝ps(z)e−βB(z).p_B(z)\propto p_s(z)e^{-\beta B(z)}.

Thus a known static bias can be removed:

ps(z)∝pB(z)eβB(z),⟨A⟩0=⟨AeβB(s)⟩B⟨eβB(s)⟩B.p_s(z)\propto p_B(z)e^{\beta B(z)},\qquad \langle A\rangle_0= \frac{\langle A e^{\beta B(s)}\rangle_B} {\langle e^{\beta B(s)}\rangle_B}.

The identity follows by cancelling e−βBe^{-\beta B} inside the biased integral. It requires support and adequate overlap; an enormous reweighting factor does not create observations in a region never visited.

In umbrella sampling, choose windows such as Bk(z)=κk(z−zk)2/2B_k(z)=\kappa_k(z-z_k)^2/2. Each restrains sampling near a selected coordinate value. Neighbouring windows need overlapping distributions so their unknown normalisations can be related, for example by WHAM or MBAR. Within each window, orthogonal degrees of freedom must also equilibrate. An ideal bias B=−FsB=-F_s would flatten the marginal, but FsF_s is what we are trying to discover.

Umbrellas can make a chosen barrier accessible; they do not automatically remove every barrier in the full system. Uncertainty analysis must account for within-window autocorrelation, overlap and the combined reconstruction. A biased dynamical trajectory generally does not preserve unbiased transition rates even when static equilibrium averages can be reweighted.

A restraint makes one region easier to visit. Can we recover the original distribution while its biased histogram moves across the landscape?

Move an umbrella, then remove its statistical bias
A moving window changes occupancy
biased and original densitiescollective coordinate x-1.81.804centre = -0.83
The correction restores the target
reweighted densitycollective coordinate x-1.81.804corrected curve = target

p₀(x) ∝ pᴮ(x) exp[βB(x)]

Window centre -0.83; κ = 3.00; exact quadrature reweighting restores the reference density.

Paused. Play the sequence, step through it, or drag the position slider.

Double-well potential, β = 4, harmonic bias κ(x−c)²/2. Densities and weights are computed by fixed-grid quadrature; markers are stratified biased quantiles. Exact cancellation does not establish convergence of a finite umbrella trajectory or sufficient overlap.

Sweep the umbrella centre and compare the biased density with the original dashed target. On the right, exact reweighting cancels the restraint at every frame. ↗

9.3 Let an auxiliary coordinate explore

An extended-variable construction couples an auxiliary coordinate zz with momentum pzp_z to the physical collective variable:

Hext(r,p,z,pz)=H(r,p)+∣pz∣22mz+κ2∣s(r)−z∣2.H_{\mathrm{ext}}(r,p,z,p_z) =H(r,p)+\frac{|p_z|^2}{2m_z} +\frac{\kappa}{2}|s(r)-z|^2.

At a common temperature and without extra bias, integrating zz over all of Rm\mathbb R^m gives a constant independent of rr, so the physical marginal is unchanged. Restricted domains, periodic coordinates and boundary conditions require the appropriate coupling and integration measure.

Temperature-accelerated variants thermostat the physical and auxiliary variables separately, using a hotter, slower auxiliary system to explore new regions. Time-scale separation and sufficient coupling allow a mean-force interpretation in a controlled regime. A hotter auxiliary bath is not ordinary canonical sampling of HextH_{\mathrm{ext}} at the physical temperature. The resulting exploration requires method-specific analysis before it can be interpreted as physical-temperature free energy or kinetics.

9.4 Build a bias from where the process has been

Metadynamics deposits smooth hills at visited coordinate values, for example

B(z,t)=∑tn<twnexp⁡[−∣z−s(rtn)∣22δs2].B(z,t)=\sum_{t_n<t}w_n \exp\left[-\frac{|z-s(r_{t_n})|^2}{2\delta_s^2}\right].

The hill heights wnw_n have energy units, and δs\delta_s sets a coordinate width. The source omitted the energy amplitude. Depositing positive hills discourages revisiting already explored basins and helps discover other regions. Because the bias changes with history, the simple static-bias identity cannot be applied blindly to the entire trajectory.

In well-tempered metadynamics, hill heights decrease with accumulated bias. With bias factor Γ=(T+ΔT)/T>1\Gamma=(T+\Delta T)/T>1, the ideal asymptotic relation is B(z)→−(1−1/Γ)Fs(z)+CB(z)\to-(1-1/\Gamma)F_s(z)+C under the method's sampling assumptions. The biased marginal is then proportional to e−βFs/Γe^{-\beta F_s/\Gamma} rather than exactly flat. Barducci, Bussi and Parrinello's original paper supplies the construction and convergence rationale. Finite-time estimates still need adequate coordinates, exploration and a suitable reconstruction or time-dependent reweighting procedure.

9.5 Free-energy differences from overlapping ensembles

Suppose models AA and BB have potentials UA,UBU_A,U_B on a common configuration space, at the same temperature and with the same kinetic/reference factors. Divide their partition functions:

ZBZA=∫e−βUAe−β(UB−UA)drZA=⟨e−β(UB−UA)⟩A.\frac{Z_B}{Z_A} =\frac{\int e^{-\beta U_A}e^{-\beta(U_B-U_A)}dr}{Z_A} =\left\langle e^{-\beta(U_B-U_A)}\right\rangle_A.

Taking logarithms gives the free-energy perturbation identity

FB−FA=−β−1log⁡⟨e−β(UB−UA)⟩A.F_B-F_A=-\beta^{-1}\log \left\langle e^{-\beta(U_B-U_A)}\right\rangle_A.

This exact identity is not necessarily a good finite-sample estimator. Rare configurations under AA can dominate the exponential average. Support mismatch can invalidate the ratio identity in the sampled direction, and poor overlap can make a seemingly stable estimate wrong. The logarithm adds finite-sample bias. Intermediate states or bidirectional estimators help when they create overlap; they do not eliminate the need to diagnose it.

For a continuously interpolated potential UλU_\lambda, choose the convention

Uλ=(1−λ)UA+λUB,0≤λ≤1.U_\lambda=(1-\lambda)U_A+\lambda U_B, \qquad 0\le\lambda\le1.

Differentiate Fλ=−β−1log⁡ZλF_\lambda=-\beta^{-1}\log Z_\lambda, assuming differentiation under the integral is justified:

dFλdλ=⟨∂Uλ∂λ⟩λ,FB−FA=∫01⟨UB−UA⟩λdλ.\frac{dF_\lambda}{d\lambda} =\left\langle\frac{\partial U_\lambda}{\partial\lambda}\right\rangle_\lambda, \qquad F_B-F_A=\int_0^1\langle U_B-U_A\rangle_\lambda d\lambda.

This is thermodynamic integration. The source used the opposite endpoint convention, U0=UB,U1=UAU_0=U_B,U_1=U_A, and correspondingly computed FA−FBF_A-F_B. Both are valid; silently mixing their signs is not. We use A→BA\to B consistently here.

A harmonic example checks both methods. Let UA(x)=kAx2/2U_A(x)=k_Ax^2/2, UB(x)=kBx2/2U_B(x)=k_Bx^2/2, with positive stiffnesses. Gaussian integration gives ZB/ZA=kA/kBZ_B/Z_A=\sqrt{k_A/k_B}, hence

FB−FA=12βlog⁡kBkA.F_B-F_A=\frac{1}{2\beta}\log\frac{k_B}{k_A}.

Along the linear path, kλ=(1−λ)kA+λkBk_\lambda=(1-\lambda)k_A+\lambda k_B and ⟨x2⟩λ=1/(βkλ)\langle x^2\rangle_\lambda=1/(\beta k_\lambda). Thus the TI integrand is (kB−kA)/(2βkλ)(k_B-k_A)/(2\beta k_\lambda), whose integral gives the same logarithm. Agreement is an analytic check; it does not establish convergence of a finite exponential average for a very different pair of stiffnesses.

In applications, use more integration points where the mean derivative varies rapidly, verify equilibration at every state, and monitor overlap and possible phase transitions. Einstein-crystal references for solids and tractable fluid references can connect an interacting model to a known free energy, provided constraints, indistinguishability and reference constants are treated consistently. An arbitrary fluid reference does not have a known absolute free energy merely because it is called Lennard–Jones-like.

9.6 Return to the original prediction

We began by asking where a warm particle is likely to be. The heat bath supplied a measure; interaction models supplied energies; dynamics and Monte Carlo supplied different ways to explore; covariance accounting supplied finite-run uncertainty. Cluster and event methods changed the exploration without changing the intended target. Continuum parcels changed the physical level of description. Collective coordinates finally combined many microscopic states into the free-energy description of a process.

A reliable simulation keeps all of these levels explicit. State the model, ensemble and measure; justify the sampling mechanism; test numerical approximation; establish exploration of the relevant states; and attach uncertainty to the observable actually being reported. A free-energy curve is then a quantitative conclusion with identifiable assumptions, rather than a picture of a trajectory's preferences.

Exercises

  1. Reparameterise a one-dimensional collective coordinate by y=2zy=2z. Which part of its free-energy curve changes? What if y=z3y=z^3 away from zero?
  2. Derive the static umbrella reweighting identity and identify the support assumption in the cancellation.
  3. Check the harmonic free-energy difference by both perturbation and thermodynamic integration. What happens when kB=kAk_B=k_A?
  4. Explain why an unvisited orthogonal basin can invalidate a free-energy estimate even when umbrella histograms overlap along the displayed coordinate.