Get AI summaries of any video or article — Sign up free

Canonical sampling through velocity rescaling

Giovanni Bussi, Davide Donadio, Michele Parrinello
The Journal of Chemical Physics·2007·Physics and Astronomy·17,808 citations
9 min read

Read the full paper at DOI or on arxiv

TL;DR

The paper proposes a stochastic velocity-rescaling thermostat that samples the canonical NVT ensemble by rescaling velocities using a random factor derived from an auxiliary kinetic-energy stochastic process.

Briefing

This paper addresses a central problem in molecular dynamics (MD): how to generate trajectories that sample the canonical (constant number of particles, volume, and temperature; NVT) distribution efficiently and accurately, while retaining good numerical stability and (ideally) preserving dynamical properties. The authors focus on thermostats—algorithms that control temperature by modifying particle velocities—and ask whether a simple, velocity-based stochastic scheme can be constructed that (i) samples the correct canonical ensemble, (ii) admits a conserved-like diagnostic quantity to assess sampling accuracy under finite time steps, and (iii) performs well across a range of thermostat parameters without excessive tuning.

The significance is twofold. First, many widely used thermostats (e.g., Berendsen, Nosé-Hoover) either do not correspond to a well-defined ensemble in general or can suffer from ergodicity issues, meaning that time averages may not match ensemble averages for certain systems. Second, even when a thermostat is formally correct, finite integration time steps introduce errors; without a robust diagnostic, it is difficult to know whether the simulation is truly sampling the intended distribution. The authors position their method as an extension of velocity-rescaling ideas: rather than deterministically forcing the kinetic energy to a target value (as in Berendsen-like schemes) or randomly reassigning individual particle velocities (as in Andersen), they rescale all particle velocities by a single random factor chosen so that the kinetic energy follows the correct canonical distribution.

Methodologically, the paper develops two related thermostat formulations. The simplest version (Section II A) rescales all particle velocities by a factor , where is the instantaneous kinetic energy and is drawn from the canonical equilibrium distribution for kinetic energy. For a system with degrees of freedom and inverse temperature , the target distribution is proportional to . Between rescaling events, the system evolves under Hamilton’s equations using an ergodic microcanonical dynamics assumption. Because Hamiltonian evolution preserves the microcanonical measure and the rescaling step is constructed to preserve the canonical distribution, the combined process samples the canonical ensemble (with a caveat that the center-of-mass momentum and angular momentum slices are preserved; the authors argue this effect is negligible for their purposes).

The authors then introduce a smoother, more general scheme (Section II B) to reduce fast fluctuations induced by frequent full rescaling. The key idea is to evolve the kinetic energy through an auxiliary stochastic differential equation over a time interval corresponding to one MD time step, and then apply a rescaling consistent with the updated kinetic energy. The auxiliary dynamics is defined so that the kinetic energy marginal remains canonical. The most general one-dimensional Fokker–Planck form with zero-current stationary solution is given, leading to a stochastic differential equation for . They choose a specific diffusion function , introducing a thermostat relaxation time . This yields the explicit auxiliary dynamics where is a Wiener noise increment. In the limit , the stochastic evolution thermalizes instantly and the method reduces to the simpler stochastic velocity-rescaling thermostat. In the limit , Hamiltonian dynamics is recovered. The algorithm is designed to preserve bond constraints automatically when a single global scaling factor is applied to all velocities, and it conserves total linear momentum (and angular momentum for non-periodic systems).

A major methodological contribution is the introduction of an “effective energy” used to diagnose sampling accuracy under finite time steps. For discrete-time dynamics targeting a distribution , they define weights based on the ratio of transition probabilities for forward and momentum-reversed moves. For canonical targets , this leads to an effective energy . In their thermostat, the velocity-rescaling step is constructed to satisfy detailed balance exactly (when the auxiliary kinetic-energy equation is solved exactly), so changes in arise primarily from the Hamiltonian integration step. Therefore, if the integrator is accurate, should remain nearly constant, analogous to energy conservation in NVE simulations. This diagnostic also supports reweighting or hybrid Monte Carlo correction strategies.

For numerical evaluation, the authors test the method on Lennard-Jones and water models in both solid and liquid phases. Lennard-Jones: 256 atoms in a cubic box, using an argon parameterization; simulations in fcc solid at 20 K and liquid at 120 K. Water: TIP4P with rigid molecules, particle-mesh Ewald for electrostatics; simulations in cells of 360 molecules for ice Ih and liquid water. They compute energy fluctuations (kinetic and potential) over 1 ns trajectories for a range of values spanning three orders of magnitude, and they compare to Nosé–Hoover and Berendsen thermostats. They also assess dynamical properties: vibrational density of states for hydrogen atoms in ice Ih via Fourier transform of velocity autocorrelation, and self-diffusion coefficient for liquid water via Einstein’s relation from mean-square displacement.

Key findings are reported with specific quantitative comparisons. For the time-step diagnostic, they show that for Lennard-Jones at 120 K with ps, using fs yields good conservation of with fluctuations around kJ/mol, while the root-mean-square fluctuations in the conventional energy are on the order of kJ/mol. When the time step is increased to fs, exhibits a systematic drift, indicating inaccurate sampling even though the thermostat keeps the simulation stable (in contrast to NVE where the system can “explode”).

Regarding ensemble correctness via energy fluctuations, the authors plot square fluctuations of kinetic energy and potential energy , normalized by the ideal-gas kinetic-energy fluctuation . For Lennard-Jones, they find that their thermostat reproduces the correct canonical fluctuation behavior across the full range for both liquid and solid. In contrast, Berendsen’s thermostat shows strong dependence on : as , it approaches the isokinetic ensemble, causing kinetic-energy fluctuations to vanish while configurational fluctuations approach the canonical limit. Nosé–Hoover matches their thermostat for the liquid over a wide range but fails for the solid when ps due to ergodicity problems (leading to poor sampling). For water and ice, they report that Nosé–Hoover becomes inefficient for ice when ps and for water when ps, whereas their thermostat remains fairly independent of .

For dynamical properties, they show that the vibrational density of states of ice Ih is preserved when using their thermostat. For ps, there is no shift of the main peak frequencies relative to NVE, and intensity changes are within numerical errors. With very small ps, the low-frequency translational broad peak is slightly affected, but no fictitious peaks appear.

They quantify diffusion in liquid water (TIP4P) at 300 K. Table I reports self-diffusion coefficients (in units of ) for different : ps gives , ps gives , ps gives , and ps gives . The NVE reference value is . The authors conclude that their thermostat yields diffusion consistent with NVE and literature, with only marginal deviation at very small .

Limitations include the authors’ reliance on an ergodicity assumption for Hamiltonian dynamics in the microcanonical ensemble; if ergodicity fails, canonical sampling may not hold. They also acknowledge (and partially neglect) that rescaling does not change center-of-mass momentum and, for non-periodic systems, angular momentum, so the algorithm samples a slice of the canonical ensemble unless those degrees of freedom are already appropriately distributed. Additionally, the effective-energy diagnostic depends on using the exact propagator for the auxiliary kinetic-energy equation; if the auxiliary dynamics is not solved exactly, detailed balance and the diagnostic’s interpretation could degrade. Finally, as with any MD thermostat, extreme parameter choices (very small ) can perturb dynamics.

Practically, the results matter for anyone running MD simulations where correct canonical sampling and reliable numerical integration are required—especially for small systems, systems with slow modes, or solids where ergodicity problems are common. The method is presented as easy to implement (global velocity rescaling with a stochastic factor), stable, and largely insensitive to the thermostat parameter . The effective energy provides a concrete way to assess whether finite time-step errors are compromising ensemble fidelity, and it can guide time-step selection or enable reweighting/hybrid Monte Carlo corrections.

Overall, the paper’s core contribution is a thermostat that combines the simplicity of velocity rescaling with a theoretically justified stochastic kinetic-energy evolution that samples the canonical ensemble, plus a conserved-like diagnostic quantity to quantify integration-induced ensemble errors. The authors show that their velocity-rescaling thermostat samples the canonical NVT ensemble while remaining robust across thermostat parameters and offering an effective-energy measure of sampling accuracy.

Cornell Notes

The paper introduces a stochastic velocity-rescaling thermostat that samples the canonical (NVT) distribution by rescaling all particle velocities using a random factor derived from an auxiliary stochastic evolution of the kinetic energy. The authors prove canonical sampling under an ergodicity assumption and propose an “effective energy” quantity that remains nearly constant when the integrator is accurate, enabling diagnostics of finite time-step sampling errors.

What is the main research question of the paper?

Can a velocity-rescaling thermostat be constructed that samples the canonical NVT ensemble correctly, is easy to implement, and provides a diagnostic for finite time-step sampling errors?

Why does the paper focus on velocity-rescaling rather than other thermostats?

Velocity-rescaling is simple and preserves constraints and momentum when a single global scaling factor is used; the authors extend it with stochastic kinetic-energy control to enforce the correct canonical distribution.

What is the simplest version of the algorithm?

At rescaling events, multiply all velocities by , where is drawn from the canonical kinetic-energy distribution , and evolve with Hamilton’s equations between rescalings.

How does the smoother (general) thermostat reduce velocity fluctuations?

Instead of drawing at every step, it evolves the kinetic energy over one MD time step using an auxiliary stochastic differential equation with relaxation time , then rescales velocities to match the updated .

What auxiliary stochastic dynamics is used for kinetic energy?

They choose , yielding , which preserves the canonical kinetic-energy distribution.

Under what conditions is canonical sampling guaranteed?

Under the assumption that Hamiltonian evolution is ergodic in the microcanonical ensemble; the rescaling step is constructed to preserve the canonical distribution.

What is the “effective energy” and how is it used?

It is defined from forward/reverse transition probabilities (momentum-reversed conjugate states) as . With an accurate integrator and exact auxiliary propagator, remains nearly constant; drift indicates ensemble/sampling error from finite time steps.

What did the authors observe when increasing the Lennard-Jones time step?

For ps, fs keeps fluctuations small (~0.3 kJ/mol), while fs produces systematic drift in , signaling inaccurate sampling even though the thermostat keeps the run stable.

How does the thermostat perform on energy fluctuations compared to other thermostats?

For Lennard-Jones and for TIP4P water/ice, their thermostat reproduces canonical kinetic and configurational energy fluctuations across the full range, while Berendsen depends strongly on and Nosé–Hoover shows ergodicity failures (e.g., Lennard-Jones solid for ps; ice for ps; water for ps).

Does the thermostat distort dynamics such as diffusion or vibrational spectra?

For ice Ih, the vibrational density of states matches NVE for ps with no peak frequency shift; for water diffusion at 300 K, values across –2 ps are consistent with NVE (NVE: ).

Review Questions

  1. Explain how the auxiliary stochastic differential equation for kinetic energy is constructed to preserve the canonical distribution.

  2. What is the role of the effective energy , and why does it remain nearly constant when the integrator is accurate?

  3. Compare the behavior of Berendsen, Nosé–Hoover, and the proposed thermostat as varies, especially regarding energy fluctuations and ergodicity.

  4. Why does the algorithm preserve constraints and momentum, and what ensemble slice issue does this create?

Key Points

  1. 1

    The paper proposes a stochastic velocity-rescaling thermostat that samples the canonical NVT ensemble by rescaling velocities using a random factor derived from an auxiliary kinetic-energy stochastic process.

  2. 2

    Canonical sampling is proved (under an ergodicity assumption for Hamiltonian dynamics) and the method preserves momentum and constraints because all velocities are scaled by one global factor.

  3. 3

    A central diagnostic contribution is the effective energy , which should remain nearly constant when finite time-step errors are small; drift in indicates sampling inaccuracies.

  4. 4

    Numerical tests on Lennard-Jones and TIP4P water/ice show that energy fluctuations match canonical expectations across a wide range of thermostat relaxation times , unlike Berendsen (strong dependence) and Nosé–Hoover (ergodicity failures in solids/ice at larger ).

  5. 5

    Dynamical properties are largely preserved: vibrational spectra of ice Ih match NVE for ps, and water diffusion coefficients remain consistent with NVE for ps.

  6. 6

    The method is designed to be stable and largely parameter-insensitive, making it practical for MD where correct ensemble sampling and reliable time-step choice are critical.

Highlights

For Lennard-Jones at 120 K with ps, fs gives effective-energy fluctuations of about kJ/mol, while fs produces a systematic drift in , indicating inaccurate sampling.
In Lennard-Jones solids, Nosé–Hoover shows poor sampling for ps, whereas the proposed thermostat remains correct over the full range.
For ice Ih, the vibrational density of states shows no shift of main peak frequencies relative to NVE for ps, and no fictitious peaks appear.
Water diffusion at 300 K is consistent with NVE: ranges from to (in ) for –2 ps, compared to NVE .

Topics

  • Molecular dynamics
  • Statistical mechanics
  • Thermostats and ensemble sampling
  • Stochastic differential equations
  • Ergodicity and non-equilibrium dynamics
  • Numerical integration error diagnostics
  • Computational chemistry and physics
  • Free-energy/ensemble reweighting and hybrid Monte Carlo

Mentioned

  • DL POLY
  • Velocity Verlet integrator
  • Particle mesh Ewald (PME)
  • TIP4P water model
  • Lennard-Jones potential
  • Einstein relation (for diffusion)
  • Giovanni Bussi
  • Davide Donadio
  • Michele Parrinello
  • H. C. Andersen
  • T. Schneider
  • E. Stoll
  • D. M. Heyes
  • S. Nosé
  • W. G. Hoover
  • G. J. Martyna
  • M. L. Klein
  • M. Tuckerman
  • D. J. Evans
  • G. P. Morriss
  • H. J. C. Berendsen
  • C. W. Gardiner
  • T. Soddemann
  • B. Dünweg
  • K. Kremer
  • S. Duane
  • A. D. Kennedy
  • B. J. Pendleton
  • D. Roweth
  • W. H. Press
  • S. A. Teukolsky
  • W. T. Vetterling
  • B. P. Flannery
  • W. H. Wong
  • F. Liang
  • S. Sugita
  • Y. Okamoto
  • V. I. Manousiouthakis
  • M. W. Deem
  • W. C. Swope
  • P. H. Berens
  • K. R. Wilson
  • H. Risken
  • W. Smith
  • T. R. Forester
  • D. van der Spoel
  • P. J. van Maaren
  • H. J. C. Berendsen
  • D. York
  • L. Pedersen
  • W. L. Jorgensen
  • J. Chandrasekhar
  • J. F. Madura
  • R. W. Impey
  • NVE - Microcanonical ensemble (constant number of particles, volume, energy)
  • NVT - Canonical ensemble (constant number of particles, volume, temperature)
  • MD - Molecular dynamics
  • RCT - Randomized controlled trial (not applicable here)
  • Fokker-Planck - Equation describing time evolution of probability distributions under stochastic dynamics
  • PME - Particle mesh Ewald
  • TIP4P - A common rigid water model with four interaction sites