Algorithm Search⌘K

Definitioncore

Microcanonical ensemble

Also called NVE ensemble.

The uniform distribution over states of fixed particle number, volume and energy. Hamiltonian molecular dynamics, if ergodic, samples it with the total momentum also fixed.

The microcanonical ensemble is the probability distribution of an isolated system with a fixed number of particles NN, a fixed volume VV and a fixed energy EE: every state on the energy surface H=EH = E has the same weight. It is the ensemble of classical mechanics without a heat bath, and plain molecular dynamics, which conserves the energy, samples it if the motion is ergodic. Molecular dynamics in a periodic box also conserves the total momentum, so the ensemble it samples is the microcanonical ensemble at fixed total momentum, often written NVEP. The canonical ensemble at fixed temperature is the other ensemble used most, and a thermostat is needed to sample it.

Definition

Let Γ=(q1,…,qN,p1,…,pN)\Gamma = (q_1, \ldots, q_N, p_1, \ldots, p_N) be a point of phase space and H(Γ)=∑i∣pi∣2/(2mi)+U(q1,…,qN)H(\Gamma) = \sum_i |p_i|^2 / (2m_i) + U(q_1, \ldots, q_N) the Hamiltonian, with the positions in the volume VV. The microcanonical ensemble at (N,V,E)(N, V, E) is the probability density

ρNVE(Γ)=δ(H(Γ)−E)Ω(N,V,E),Ω(N,V,E)=1N! hP3N∫δ(H(Γ)−E) dΓ,\rho_{NVE}(\Gamma) = \frac{\delta(H(\Gamma) - E)}{\Omega(N, V, E)}, \qquad \Omega(N, V, E) = \frac{1}{N!\, h_P^{3N}} \int \delta(H(\Gamma) - E)\, d\Gamma ,

where hPh_P is Planck's constant, which only fixes the units of Ω\Omega, and N!N! counts the exchanges of identical particles. The average of an observable AA is ⟨A⟩NVE=∫A ρNVE dΓ\langle A \rangle_{NVE} = \int A\, \rho_{NVE}\, d\Gamma. The entropy is S=kBln⁡ΩS = k_B \ln \Omega, and the temperature follows from 1/T=∂S/∂E1/T = \partial S / \partial E at fixed NN and VV.

Two remarks make the definition exact:

  • "Uniform" is in the measure δ(H−E) dΓ\delta(H - E)\, d\Gamma. Per unit of area on the surface H=EH = E, the weight is proportional to 1/∣∇H∣1 / |\nabla H|, so the parts of the surface where HH changes slowly get more weight. Some books use the thin shell E≤H≤E+ΔEE \le H \le E + \Delta E instead, which is the same in the limit ΔE→0\Delta E \to 0.
  • It is stationary. By Liouville's theorem the Hamiltonian flow keeps phase-space volume, and it keeps HH, so any density that is a function of HH alone, ρNVE\rho_{NVE} among them, does not change in time (a theorem).

The ensemble of molecular dynamics. If UU does not change when all atoms are moved by the same vector, as with periodic boundary conditions, the total momentum P=∑ipiP = \sum_i p_i is also conserved. A trajectory then stays on the set H=EH = E, P=P0P = P_0, and the best it can sample is

ρNVEP(Γ)∝δ(H(Γ)−E) δ(P(Γ)−P0).\rho_{NVEP}(\Gamma) \propto \delta(H(\Gamma) - E)\, \delta(P(\Gamma) - P_0) .

The usual choice is P0=0P_0 = 0. With periodic boundaries the box breaks the rotation symmetry, so the angular momentum is not conserved and gives no third constraint. Three degrees of freedom are fixed by the momentum, so the kinetic temperature is

T=2⟨K⟩Nf kB,Nf=3N−3.T = \frac{2 \langle K \rangle}{N_f\, k_B}, \qquad N_f = 3N - 3 .

For an isolated molecule in free space, where the angular momentum is also conserved and set to zero, Nf=3N−6N_f = 3N - 6.

Ergodicity. Molecular dynamics gives time averages along one trajectory. These equal the ensemble averages above only if the motion is ergodic on its constant-energy and constant-momentum surface: almost every trajectory spends in each region of that surface a fraction of its time equal to the weight of the region. This is the ergodic hypothesis. It is an assumption for most systems of interest, not a theorem, and it fails for some, as the examples show.

The integrator. A symplectic integrator such as velocity Verlet with step hh does not keep HH exactly. It keeps a nearby shadow Hamiltonian H~=H+O(h2)\tilde H = H + O(h^2) for very long times, so HH fluctuates by O(h2)O(h^2) and does not drift. A simulation is checked by monitoring HH: a drift means a too large step or a force that is not the gradient of a smooth UU, for example a force that jumps at a cutoff.

Examples and non-examples

One harmonic oscillator. Take H=p2/(2m)+kx2/2H = p^2/(2m) + k x^2 / 2 at energy EE, with amplitude A=2E/kA = \sqrt{2E/k}. The energy surface is an ellipse. Integrating δ(H−E)\delta(H - E) over pp gives the density of xx:

P(x)=1πA2−x2,−A<x<A,P(x) = \frac{1}{\pi \sqrt{A^2 - x^2}}, \qquad -A < x < A,

the arcsine law: the oscillator is most often near its turning points. The probability of ∣x∣<A/2|x| < A/2 is 2πarcsin⁡12=13\tfrac{2}{\pi} \arcsin \tfrac{1}{2} = \tfrac{1}{3}. The trajectory x=Asin⁡(ωt)x = A \sin(\omega t) gives the same: ∣sin⁡θ∣<1/2|\sin \theta| < 1/2 on two arcs of length π/3\pi/3 each, which is 1/31/3 of the period. A system with one degree of freedom is ergodic on its energy curve, so the time average and the ensemble average agree.

Two oscillators, an ensemble but not ergodic dynamics. Take two independent oscillators with total energy E=E1+E2E = E_1 + E_2. One oscillator has a constant density of states, so in the ensemble the share E1E_1 is uniform on [0,E][0, E], with mean E/2E/2 and variance E2/12E^2/12. But each oscillator keeps its own energy along the motion, so a trajectory started with E1=0.9EE_1 = 0.9E keeps E1=0.9EE_1 = 0.9E forever, and its time average is 0.9E0.9E, not E/2E/2. The same happens with the normal modes of a harmonic crystal. The microcanonical ensemble is well defined here; molecular dynamics does not sample it.

The ideal gas and the Maxwell distribution. For NN free atoms with no momentum constraint, the momenta are uniform on the sphere ∑∣pi∣2=2mE\sum |p_i|^2 = 2mE in 3N3N dimensions. One component pp of one momentum then has density proportional to

(1−p22mE)(3N−3)/2.\left(1 - \frac{p^2}{2mE}\right)^{(3N-3)/2} .

For N=1N = 1 the exponent is 0, so each component is uniform on [−2mE,2mE][-\sqrt{2mE}, \sqrt{2mE}], which is Archimedes' result for the sphere. With E=32NkBTE = \tfrac{3}{2} N k_B T and N→∞N \to \infty, the density tends to exp⁡(−p2/(2mkBT))\exp(-p^2 / (2 m k_B T)), the Maxwell-Boltzmann distribution of the canonical ensemble.

Counting degrees of freedom. A run with N=108N = 108 atoms and zero total momentum has mean kinetic energy ⟨K⟩=160.5 ϵ\langle K \rangle = 160.5\,\epsilon. With Nf=3N−3=321N_f = 3N - 3 = 321, the reduced temperature is T∗=2⋅160.5/321=1.000T^* = 2 \cdot 160.5 / 321 = 1.000. With 3N=3243N = 324 it would be 0.9910.991, an error of about 1 percent that shrinks as 1/N1/N.

Fluctuations depend on the ensemble. In the canonical ensemble the energy fluctuates; in the microcanonical ensemble it does not, but the kinetic energy KK does. Lebowitz, Percus and Verlet showed that at fixed energy, to leading order in NN,

⟨δK2⟩NVE=32NkB2T2(1−3NkB2CV),\langle \delta K^2 \rangle_{NVE} = \frac{3}{2} N k_B^2 T^2 \left(1 - \frac{3 N k_B}{2 C_V}\right),

with CVC_V the heat capacity, so a molecular dynamics run gives CVC_V from the fluctuation of KK (a theorem). For an ideal gas, CV=32NkBC_V = \tfrac{3}{2} N k_B and the fluctuation is 0, as it must be, since then K=EK = E. Averages of local quantities, such as the pressure or the radial distribution function, agree between the two ensembles up to O(1/N)O(1/N).

Non-example: a thermostatted run. Molecular dynamics with a Nosé-Hoover thermostat or an Andersen thermostat changes the energy of the atoms on purpose and samples the canonical ensemble, not this one.

Non-example: a trajectory that does not conserve energy. With a plain truncated potential, the force is not the gradient of a continuous energy, and each crossing of the cutoff changes HH. The energy then drifts, and the run samples no fixed-energy ensemble.

  • Canonical ensemble. Fixed NN, VV and TT, with density proportional to exp⁡(−H/kBT)\exp(-H / k_B T). For large NN it is concentrated near one energy, and it is the microcanonical ensemble averaged over EE with the weight Ω(E)e−E/kBT\Omega(E) e^{-E/k_B T}.
  • Partition function. The canonical normalization ZZ is the Laplace transform of Ω(E)\Omega(E) in the energy.
  • Ergodic hypothesis. The assumption that time averages equal the ensemble averages. For Markov chains, the ergodic theorem is the analogous result, with conditions that can be checked.
  • Shadow Hamiltonian. The quantity that a symplectic integrator keeps, so a long run samples the microcanonical ensemble of H~\tilde H, close to that of HH.
  • Green-Kubo relations. Transport coefficients from time correlations, usually computed in microcanonical runs, since a thermostat changes the dynamics.

References

  1. Michael P. Allen and Dominic J. Tildesley, Computer Simulation of Liquids, second edition, Oxford University Press, 2017, Section 2.1 (sampling from ensembles), Section 2.2 (common statistical ensembles, the microcanonical density and the constant-momentum ensemble of molecular dynamics) and Section 2.5 (fluctuations)
  2. Mark E. Tuckerman, Statistical Mechanics, Theory and Molecular Simulation, Oxford University Press, 2010, Chapter 3, the microcanonical ensemble
  3. Daan Frenkel and Berend Smit, Understanding Molecular Simulation, From Algorithms to Applications, second edition, Academic Press, 2002, Chapter 2 (statistical mechanics, ensembles and the ergodic hypothesis)
  4. J. L. Lebowitz, J. K. Percus and L. Verlet, Ensemble dependence of fluctuations with application to machine computations, Physical Review 153(1), 1967, 250-254, the fluctuation of the kinetic energy at fixed total energy and its relation to the heat capacity

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/CN7RTP/text.yaml