7. Thermostats, barostats and correct distributions
Position in the course: Lesson 7 of 11. Complete the preceding derivation and use the explained exercises to check understanding.
1. Mean temperature is not an ensemble
A canonical ensemble includes fluctuations of kinetic and potential energies. Rescaling velocities to exactly the same temperature every step suppresses these fluctuations and generally does not generate canonical statistics. A thermostat must preserve the desired probability density; a barostat must additionally sample the correct volume measure. Equilibrium sampling and faithful real-time dynamics are separate objectives.
Assume classical particles, a differentiable potential and constant bath temperature. Use \(\beta=1/(k_BT)\). For one Cartesian degree of freedom with momentum \(p\), Langevin dynamics adds friction and random kicks. The fluctuation-dissipation relation ties their strengths together; arbitrary noise and friction do not define the intended bath.
2. Derive a stationary Maxwell distribution
For the momentum part, use an Itô stochastic differential equation and its Fokker–Planck equation:
For \(\rho_*\propto\exp[-p^2/(2mk_BT)]\), \(\partial_p\rho_*=-p\rho_*/(mk_BT)\). Substitute into the probability current \(J=-\gamma p\rho-\gamma mk_BT\partial_p\rho\). The terms cancel, \(J=0\), so \(\rho_*\) is stationary. Adding Hamiltonian drift preserves \(e^{-\beta H}\) in the continuous-time limit. A discretization still has timestep bias and needs a suitable stochastic splitting.
3. An exact bath update as a worked example
For the friction-noise substep of duration \(h\), the exact solution is
If \(\operatorname{Var}(p)=mk_BT\), then \(\operatorname{Var}(p')=e^{-2\gamma h}mk_BT+(1-e^{-2\gamma h})mk_BT=mk_BT\). At \(\gamma h=\ln2\), half the old momentum is retained and noise variance is \(3mk_BT/4\). This is an algebraic variance check, not a sampled trajectory. Large friction accelerates momentum relaxation but can slow positional diffusion and distort velocity correlations.
4. Understand pressure and volume fluctuations
In an isotropic unconstrained NPT configurational ensemble,
because converting Cartesian positions to scaled coordinates contributes a \(V^N\) Jacobian. A barostat must account for this measure and its own extended variables. In equilibrium,
Thus a plausible mean density with suppressed volume variance is not enough. Deterministic extended-system thermostats can be nonergodic in small nearly harmonic systems; stochastic methods do not automatically equilibrate slow barriers either. For solids, distinguish isotropic volume change from full cell-shape relaxation. For interfaces, choose stress components deliberately.
5. Validation and limitations
Equilibrate volume before a fixed-volume production run if that is the scientific design. Avoid interpreting aggressively thermostatted time correlations as unperturbed dynamics. Compare coupling times, timesteps and independent initial states. Weak-coupling schemes can be useful for preparation but may not produce correct fluctuation distributions. Never use a thermostat to disguise poor NVE energy conservation; fix force and integration problems first.
6. Exercises
If Langevin noise amplitude is doubled with friction unchanged, what stationary kinetic temperature results in this simple model? Noise variance grows by four, so the stationary momentum variance and temperature grow by four. The bath relation is violated relative to the intended temperature.
Does increasing barostat speed guarantee faster equilibrium? No. Overly strong coupling can excite cell oscillations and compromise integration. Equilibration of a structural transition still requires its slow coordinates to be sampled.
7. References
Original analytic teaching illustration under the stated assumptions; no simulation data.
8. Related theory and practice
Quantum mechanics · Monte Carlo · Quantum Monte Carlo · CP2K · Quantum-Espresso