Release a particle in the harmonic well . Newton's equation makes it oscillate; adding drag makes it settle at zero. Neither motion, by itself, describes the nonzero equilibrium width of a warm particle. To obtain that width while dissipating energy, we must model fluctuations as well as friction.
This chapter constructs that balance and then asks what survives a finite numerical timestep. The same distinction between an exact invariant measure and its numerical approximation will recur in Monte Carlo.
3.1 The degrees of freedom we eliminated return as noise
For a smooth potential, isolated classical motion satisfies
Coupling to an unresolved fluid motivates a drag force , where has units mass/time. Many rapidly decorrelating bath impulses are approximated by Gaussian white noise. This is a coarse-grained Markov approximation: a bath with important memory can require coloured noise and a memory-dependent friction instead.
A -dimensional Wiener process has independent Gaussian increments with covariance . Its derivative is not an ordinary function. The Langevin SDE is
Formally the random force has mean zero and component covariance
Why this amplitude? Set the conservative force to zero and apply Itô's formula to one component . If the random-force amplitude is , then
At equilibrium, equipartition demands . Thus . The fluctuation–dissipation relation is a constraint imposed by the target thermal distribution, not an independent knob for making trajectories look random.
For a confining smooth potential, this SDE preserves the full canonical position–velocity measure. Whether it converges to that measure additionally depends on the domain, regularity and accessibility; the word “Langevin” alone is not an ergodicity proof.
3.2 Eliminate velocity only after identifying its timescale
A free velocity relaxes on the time . If this is short compared with the timescales on which positions and forces change, observations made after that transient can be described by the constant-friction overdamped limit
This is a limiting model, not a pointwise assertion that a white-noise acceleration is small. Its mobility is and its diffusion coefficient is . With , each component has mean-square displacement . Spatially varying mobility needs additional care, including a thermal drift in the Itô formulation; we use constant mobility here.
The original viva answer used while defining . That factor is incorrect. It reverses the temperature dependence and fails the stationary-distribution check below.
3.3 The probability current checks the model
For the overdamped process, a density obeys the Fokker–Planck equation
Substitute . Since , the drift and diffusive currents cancel pointwise: . With periodic or reflecting boundaries, or sufficient decay at infinity, this gives a stationary probability measure. Normalisability and boundary conditions are essential; a free particle on all of has no normalisable uniform equilibrium.
For the harmonic well the stationary law is Gaussian,
Increasing friction slows relaxation but does not change this width. Increasing temperature broadens the distribution. Compare these effects in the exact formulas represented below; the curves are equilibrium laws, not finite simulated histograms.
Cooling narrows equilibrium
Temperature changes the equilibrium spread: variance is 1/(βk).
Friction slows relaxation
Friction changes the clock: decay time is γ/k, while the equilibrium width stays fixed.
In fact at stationarity. Equilibrium spread and relaxation rate are different properties of the same model. An algorithm can preserve one while changing the other.
Release an ensemble at the same point in a harmonic well. What does the average do, and what does an individual path do instead?
X′ = e⁻ΔᵗX + √[T(1 − e⁻²Δᵗ)] ξ
Time 1.62; exact mean 0.40; exact transient variance 0.58.
Paused. Play the sequence, step through it, or drag the position slider.
Exact sampled OU transition with k = γ = 1 and Δt = 0.075. The cloud has 32 paths and is not a precision density estimator. Joining sampled positions is visual interpolation, not Euler integration. The position scale is fixed during playback and adapts when temperature changes.
3.4 Numerical trajectories introduce a second approximation
For smooth isolated dynamics, velocity Verlet uses
It is second-order, time-reversible and symplectic for the smooth Hamiltonian problem, with typically bounded oscillatory energy error in a resolved stable regime. It does not conserve the exact Hamiltonian at every step. For a harmonic mode of frequency , stability requires ; accurate trajectories need a smaller step. The fastest mode, rather than the slow process of scientific interest, constrains the timestep.
For overdamped motion, Euler–Maruyama gives
The harmonic case exposes its bias without a simulation. Setting , the stationary variance solves , hence
A stable discretisation can therefore sample the wrong width. Reducing the step checks this bias; a Metropolis correction can instead restore the target measure at the cost of changing the process. For underdamped Langevin dynamics, splitting the deterministic force, drift and Ornstein–Uhlenbeck velocity update gives useful integrators; simply appending arbitrary noise to Verlet is not an accuracy argument.
Does a numerical oscillator trace the exact phase-space circle? Follow the orbit and its energy at the same time.
Hₙ = (xₙ² + vₙ²)/2; H₀ = 1/2
Time 10.50; H = 0.4731; energy error -0.0269.
Paused. Play the sequence, step through it, or drag the position slider.
Harmonic oscillator, x₀ = 1, v₀ = 0, m = k = 1. All selectable steps satisfy Δt < 2. Lines connect discrete states for readability; 120 updates are shown, so elapsed physical time changes with Δt.
3.5 Preserving a distribution does not guarantee exploration
A thermostat exchanges energy to target NVT. Langevin friction and noise give one construction. A deterministic Nosé–Hoover thermostat introduces a bath variable , for example through and , with thermal degrees of freedom and thermostat mass . Suitable extended dynamics admit a canonical physical marginal, but simple systems can be nonergodic. Thermostat chains add coupled variables to improve exploration without a universal guarantee.
A barostat additionally evolves the volume or cell to target pressure; it must be constructed with the intended NPT measure. Neither resetting velocities to a fixed kinetic energy every step nor rescaling a box arbitrarily produces the correct ensemble fluctuations. For a transport measurement, coupling choices also affect physical dynamics, even when equilibrium position averages look right.
3.6 A finite box with bulk ambitions
Periodic boundaries reduce exposed surfaces by identifying opposite faces. In a cubic cell of side , wrap positions modulo . For short-range pair interactions, the minimum-image displacement subtracts componentwise. Using a spherical cutoff avoids including two images of the same particle in this simple construction. General cells require the corresponding geometric analysis.
Truncation changes the interaction model. A shifted potential, below , makes the energy continuous but generally leaves a force jump. A force-shifted version
with zero beyond, makes both energy and force continuous. Switching functions give other smooth approximations. Tail corrections rely on assumptions about distant correlations and cannot replace a proper long-range treatment of Coulomb interactions.
Avoid repeating the same pair search
A neighbour list stores pairs within , where is a skin distance. If every particle has moved by less than since the list was built, no pair initially outside the list can have entered the interaction cutoff: relative separation can shrink by at most . Rebuild before that bound fails, using displacements that account for periodic wrapping.
Cell-based searches and bounded local density can make short-range force evaluation approximately linear in . The gain depends on locality and list maintenance; it is not obtained by storing an incomplete list. This is an implementation invariant with a direct geometric proof.
3.7 One initial microstate must become representative
For a solid, start from a lattice compatible with the intended crystal, such as fcc, bcc, hcp or diamond cubic. A liquid can be prepared by melting an ordered structure or placing particles randomly subject to excluded-volume constraints. Dilute gases admit simpler random placements. Severe overlaps in a repulsive model create enormous forces and can destabilise the first step.
The original source describes a 64-atom diamond-cubic silicon supercell heated to 5000 K and equilibrated at 2000 K. Its underlying data and force-field slides are unavailable here. The example illustrates a preparation protocol, not a temperature recommendation transferable to every silicon potential.
For canonical unconstrained velocities, draw each component independently from . To impose zero total momentum, subtract the centre-of-mass velocity . This samples a constrained kinetic distribution and removes degrees of freedom. Holonomic constraints remove further degrees of freedom. Temperature estimates use with the appropriate .
Setting velocities to zero describes a cold start, while rescaling them to an exact kinetic energy fixes a quantity that should fluctuate in an unconstrained canonical ensemble. Either can be a preparation step, followed by equilibration; neither is the same as an equilibrium Maxwell draw.
Initial structure can select a metastable basin. Even a mathematically ergodic process may need far longer than the available runtime to leave it. Compare independent starts, monitor slow observables and distinguish preparation from production data. Discarding a fixed number of frames is not proof of equilibration. Monte Carlo will change the sampling dynamics, but it inherits this finite-time problem.
Exercises
- Derive the stationary harmonic variance from Itô's formula and compare it with the Euler–Maruyama result.
- Hold and fixed and double . Which quantities in the harmonic figure change?
- Prove the neighbour-skin criterion using the triangle inequality. Why is a displacement measured only between wrapped coordinates insufficient?