Ensembles, pressure, and trustworthy averages
Prerequisites: Hamiltonian dynamics; elementary statistical mechanics
1. A target distribution, not just a temperature
NVE fixes particle number, volume and energy. Canonical NVT targets \(e^{-\beta H}\), \(\beta=1/(k_BT)\); a thermostat must preserve this distribution, not merely its mean temperature. NPT allows volume fluctuations. Ergodicity is an assumption: a trapped trajectory need not represent equilibrium.
2. Count independent thermal modes
Subtract independent constraints and removed center-of-mass motion consistently. Streaming velocity is not thermal motion. Equipartition is classical; instantaneous kinetic temperature fluctuates and quantum high-frequency vibrations need not obey it.
3. Derive canonical pressure by scaling coordinates
For an unconstrained 3D canonical system with differentiable pair potential, set \(r_i=V^{1/3}s_i\) in its partition integral. The Jacobian contributes \(V^N\). Differentiating \(\ln Z\) gives an ideal term and a potential derivative. Define \(r_{ij}=r_i-r_j\) and \(F_{ij}\) as force on \(i\) from \(j\); repulsion has positive virial.
4. Use the estimator consistently
The instantaneous mechanical ideal term is \(2K/(3V)\). In periodic boxes use image-consistent pair separations; blindly summing wrapped positions times total forces is unsafe. Constraints, many-body forces, long-range and explicit-volume terms need their own contributions. The partition derivation above specifically assumed an unconstrained system.
Teaching schematic drawn from the equations or algorithm steps in this lesson; not measured data.
Worked degrees-of-freedom example
Three 3D particles without internal constraints, after removing center-of-mass momentum, have \(f=6\) and \(\langle K\rangle=3k_BT\). Using \(f=9\) underestimates temperature by one third at the same kinetic energy. Do not blindly substitute this constrained finite-system bookkeeping into the unconstrained partition derivation.
Convergence and check yourself
Separately halve timestep, increase box size, tighten force/constraint tolerances, compare independent initial states, discard equilibration and estimate correlated errors. In NVE inspect drift as well as fluctuations. Stable energy does not prove structural equilibration or force-field accuracy. Can a thermostat hide integration heating?
Answer and reasoning
Yes, by removing extra energy while masking its cause.
References and further reading
Derivations and numerical examples here are original teaching constructions, not copied passages or reported research data.