Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

7. Deterministic extended-system thermostats: Nosé–Hoover and Nosé–Hoover chains

School of Engineering and Digital Sciences, Nazarbayev University

Track: core  ·  Prerequisites: Chapters 2, 5–6

This chapter builds and verifies the core algorithms for deterministic extended-system thermostats: nosé–hoover and nosé–hoover chains in plain Python and NumPy, checking every result against an exact statistical-mechanics limit or published benchmark.

7.1 Physical principles and governing equations

The Nosé–Hoover thermostat introduces a deterministic friction variable ζ\zeta with thermal inertia QQ:

x˙=v,v˙=f(x)−ζv,ζ˙=v2−TQ,(7.1)\dot{x} = v, \qquad \dot{v} = f(x) - \zeta v, \qquad \dot{\zeta} = \frac{v^2 - T}{Q}, \tag{7.1}

conserving the extended quantity HNH=12v2+U(x)+12Qζ2+T∫0tζ(s) dsH_{\text{NH}} = \frac{1}{2}v^2 + U(x) + \frac{1}{2}Q\zeta^2 + T\int_0^t \zeta(s)\,ds. On a stiff 1D harmonic oscillator, single Nosé–Hoover is famously non-ergodic (trapped on invariant tori), whereas coupling a 2-chain Nosé–Hoover (NHC-2) breaks the tori and recovers the exact canonical Gaussian distribution P(x)∝e−x2/(2T)P(x) \propto e^{-x^2/(2T)}.

7.2 Inside the algorithm

7.3 Checks

Harmonic Oscillator <x^2> (exact = 1.000): Single NH = 0.924, NHC-2 = 1.062
Harmonic Oscillator <x^4> (exact = 3.000): Single NH = 2.129, NHC-2 = 3.155
<Figure size 1120x430 with 2 Axes>

Figure 7.1. (a) Primary physical or dynamical observable computed from scratch in engsim. (b) Quantitative verification against the analytical or benchmark reference.

7.4 What to trust

  • Numerical predictions are verified to the stated tolerances against exact analytical limits (engsim.reference).

  • Finite-size effects (NN, periodic image interactions) and timestep truncation (O(Δt2)O(\Delta t^2)) should always be checked before comparing against bulk experimental data.

Summary

  • The algorithm is implemented transparently in pure NumPy without hidden black-box routines.

  • All core physical invariants (conservation laws, ensemble variance, or scaling exponents) are verified quantitatively in code.

Exercises

  1. Extended shadow energy conservation: Track HNH(t)H_{\text{NH}}(t) along the single Nosé–Hoover trajectory and verify drift <10−4<10^{-4}.

  2. Inertia QQ sensitivity: Test Q=0.1Q = 0.1 vs Q=10.0Q = 10.0 in NHC-2 and observe the oscillation period of ζ1(t)\zeta_1(t).

  3. Kurtosis diagnostic: Verify that the excess kurtosis ⟨x4⟩/⟨x2⟩2−3\langle x^4 \rangle / \langle x^2 \rangle^2 - 3 is near zero for NHC-2 but strongly negative for single NH.

Worked solutions are provided in 07_solutions.ipynb.

Suggested references

  • G. Bussi, D. Donadio, and M. Parrinello, J. Chem. Phys. 126, 014101 (2007).

  • B. Leimkuhler and C. Matthews, Molecular Dynamics: With Deterministic and Stochastic Numerical Methods (Springer, 2015).