Skip to content
LESSON NOTES · 02

2. Canonical weights and thermodynamic estimators

Position in the course: Lesson 2 of 10. Complete the preceding derivation and use the explained exercises to check understanding.

Prerequisites: Probability; derivatives of logarithms

Learning goal: explain the mathematical steps, reproduce the analytical examples, and state the conditions under which the conclusions hold.

1. The bath explains the weight

Imagine an isolated total system with energy \(E_{\mathrm{tot}}\). A small subsystem configuration \(x\) has energy \(E(x)\), leaving bath energy \(E_{\mathrm{tot}}-E(x)\). Equal probability of total microstates makes the subsystem probability proportional to the number of compatible bath states \(\Omega_B\). With \(S_B=k_B\ln\Omega_B\) and \(\partial S_B/\partial E_B=1/T\), Taylor expansion gives

\[ \ln\Omega_B(E_{\mathrm{tot}}-E)=\ln\Omega_B(E_{\mathrm{tot}})-\frac{E}{k_BT}+O(E^2/C_BT^2k_B). \]

Thus \(\pi(x)=e^{-\beta E(x)}/Z\), where \(\beta=1/(k_BT)\) and \(Z=\sum_xe^{-\beta E(x)}\). The large bath, weak coupling, and equilibrium assumptions matter. A driven nonequilibrium system is not canonical merely because someone assigns a temperature.

2. Integrate out momenta, not coordinates

For classical \(H(R,P)=\sum_iP_i^2/(2m_i)+U(R)\), a coordinate observable has expectation proportional to \(\int dR\,A(R)e^{-\beta U(R)}\): the identical Gaussian momentum integrals cancel between numerator and denominator. The configurational density is therefore \(\pi(R)\propto e^{-\beta U(R)}\). Constraints can alter the measure, and quantum nuclei do not generally follow this classical reduction. Monte Carlo moves sample configurations; they do not reproduce Newtonian time unless a separately justified kinetic construction is used.

3. Derive energy and heat capacity

Differentiating \(Z\) yields \(\partial_\beta Z=-\sum_xE(x)e^{-\beta E(x)}=-Z\langle E\rangle\). Differentiate again and use the quotient rule:

\[ \langle E\rangle=-\partial_\beta\ln Z,\qquad \partial_\beta\langle E\rangle=-\langle E^2\rangle+\langle E\rangle^2. \]

Because \(d\beta/dT=-1/(k_BT^2)\), the canonical heat capacity is \(C_V=\operatorname{Var}(E)/(k_BT^2)\) for a temperature-independent Hamiltonian at fixed volume. If momenta were integrated out, their classical contribution must be restored when reporting the full heat capacity. Sample \(E\) and \(E^2\) on the same chain and propagate their covariance; independent-error formulas for this nonlinear estimator are inappropriate.

4. Worked two-level system

For energies zero and \(\varepsilon\), with excited degeneracy \(g\), \(Z=1+ge^{-\beta\varepsilon}\). Let \(p=ge^{-\beta\varepsilon}/Z\). Then \(\langle E\rangle=\varepsilon p\) and \(\operatorname{Var}(E)=\varepsilon^2p(1-p)\). At \(g=1\) and \(\beta\varepsilon=\ln3\), \(p=1/4\), giving mean \(\varepsilon/4\) and variance \(3\varepsilon^2/16\). These are exact algebraic values, not simulation measurements. Degeneracy counts distinct states; omitting it changes thermodynamics even when the energies are correct.

Thermodynamic derivatives must specify what is held fixed. The derived heat capacity is \(C_V\), not \(C_P\); enthalpy and volume fluctuations enter an isothermal–isobaric calculation. The Ising field here has energy units. Copying an estimator without its units and ensemble can yield a plausible number for a different property. Use dimensional checks at each stage of a derivation.

5. Misconceptions, limits, and exercises

The most probable individual state need not dominate an entire macroscopic region: entropy counts how many states that region contains. Low-temperature sampling can remain trapped behind barriers despite correct Boltzmann weights. Sampling accuracy cannot repair an inaccurate potential energy function.

Exercise: Explain why the partition function need not be evaluated in a canonical Metropolis move.

Solution

The ratio \(\pi(y)/\pi(x)=e^{-\beta(E_y-E_x)}\) cancels the common \(Z\). Absolute free energy is different: normalization matters and requires additional methods.

Exercise: If the excited level has \(g=3\) at \(\beta\varepsilon=\ln3\), what is \(p\)?

Solution

The excited manifold weight is \(3(1/3)=1\), equal to the ground weight. Hence \(p=1/2\), rather than \(1/4\). Counting microstates is indispensable.

Canonical weights and thermodynamic estimators

Original teaching schematic of the mathematics or algorithm; it is not simulation or experimental data.

6. Sources and connections

Related theory: Molecular dynamics · Quantum Monte Carlo

Software connection: CP2K · Quantum ESPRESSO

These software courses provide related background on energies, orbitals, or convergence management; they do not imply that the Monte Carlo or QMC examples on this page were executed there.

Molecular dynamics · Quantum Monte Carlo · RASPA3


Previous lesson · Course overview · Next lesson