Algorithm Search⌘K

Theoremadvanced

Jarzynski equality

Also called Jarzynski relation.

The average of exp(-W/kT) over nonequilibrium processes that drive a system from state A to B equals exp(-dF/kT), linking work and free energy.

Statement

Setting. A system has states zz in a space Γ\Gamma with a reference measure dzdz (phase space volume, or counting measure for a discrete system), and an energy Hλ(z)H_\lambda(z) that depends on a control parameter λ\lambda. For each λ\lambda the partition function Zλ=∫e−βHλ(z) dzZ_\lambda = \int e^{-\beta H_\lambda(z)}\,dz is finite and positive, the canonical density is πλ=e−βHλ/Zλ\pi_\lambda = e^{-\beta H_\lambda} / Z_\lambda, and the free energy is Fλ=−β−1ln⁡ZλF_\lambda = -\beta^{-1} \ln Z_\lambda, with β=1/(kBT)\beta = 1/(k_B T).

A protocol is a sequence λ0,λ1,…,λn\lambda_0, \lambda_1, \dots, \lambda_n. The process starts with z0∼πλ0z_0 \sim \pi_{\lambda_0}. For i=1,…,ni = 1, \dots, n it first switches the parameter from λi−1\lambda_{i-1} to λi\lambda_i at the fixed state zi−1z_{i-1}, which costs the work Hλi(zi−1)−Hλi−1(zi−1)H_{\lambda_i}(z_{i-1}) - H_{\lambda_{i-1}}(z_{i-1}), and then moves the state by a Markov kernel, zi∼Ki(zi−1,⋅)z_i \sim K_i(z_{i-1}, \cdot), that keeps πλi\pi_{\lambda_i} invariant: ∫πλi(z)Ki(z,dz′)=πλi(z′) dz′\int \pi_{\lambda_i}(z) K_i(z, dz') = \pi_{\lambda_i}(z')\,dz'. The total work is

W=∑i=1n(Hλi(zi−1)−Hλi−1(zi−1)).W = \sum_{i=1}^{n} \bigl(H_{\lambda_i}(z_{i-1}) - H_{\lambda_{i-1}}(z_{i-1})\bigr).

The kernels need not satisfy detailed balance, and the system need not be anywhere near equilibrium during the process.

Theorem (Jarzynski 1997; Crooks 1998). For every protocol and every such choice of kernels,

⟨e−βW⟩=e−β(Fλn−Fλ0),\bigl\langle e^{-\beta W} \bigr\rangle = e^{-\beta (F_{\lambda_n} - F_{\lambda_0})},

where the average is over the process.

Theorem (the Hamiltonian case). Let Γ=R2d\Gamma = \mathbb R^{2d} with Lebesgue measure, let λ(t)\lambda(t), 0≤t≤τ0 \le t \le \tau, be continuously differentiable, and let z(t)z(t) follow Hamilton's equations for Hλ(t)H_{\lambda(t)} from z(0)∼πλ(0)z(0) \sim \pi_{\lambda(0)}, with a flow map Φ\Phi from z(0)z(0) to z(τ)z(\tau) that is defined everywhere. The work is W=∫0τλ˙ ∂λHλ(t)(z(t)) dt=Hλ(τ)(z(τ))−Hλ(0)(z(0))W = \int_0^\tau \dot\lambda\, \partial_\lambda H_{\lambda(t)}(z(t))\,dt = H_{\lambda(\tau)}(z(\tau)) - H_{\lambda(0)}(z(0)). Then ⟨e−βW⟩=e−β(Fλ(τ)−Fλ(0))\langle e^{-\beta W} \rangle = e^{-\beta (F_{\lambda(\tau)} - F_{\lambda(0)})}.

The free energy difference ΔF\Delta F is an equilibrium quantity, yet the left side is an average over processes of any speed. A process of zero steps after one instantaneous switch is free energy perturbation; an infinitely slow process gives thermodynamic integration (Consequence 3).

In plain words

Pull on a molecule, for example by stretching it with a spring, and measure the work you do. If you pull slowly, the work equals the change in free energy. If you pull fast, you waste energy as heat, and the work is larger on average.

The Jarzynski equality says that a special kind of average of the work still gives the exact free energy change, however fast you pull. You must start from equilibrium, repeat the pull many times, and average a quantity that weights each pull by how small its work was. The rare pulls that took little work matter most.

The catch is that, for fast pulls, these lucky pulls are so rare that you need very many repeats.

Proof

The Markov case. Write πi\pi_i, HiH_i, ZiZ_i for πλi\pi_{\lambda_i}, HλiH_{\lambda_i}, ZλiZ_{\lambda_i}. For k=0,…,nk = 0, \dots, n let Wk=∑i=1k(Hi−Hi−1)(zi−1)W_k = \sum_{i=1}^{k} (H_i - H_{i-1})(z_{i-1}) be the work of the first kk switches, and define the measure μk\mu_k on Γ\Gamma by

μk(A)=E[e−βWk 1{zk∈A}].\mu_k(A) = E\bigl[e^{-\beta W_k}\, \mathbf 1\{z_k \in A\}\bigr].

We show by induction that μk(dz)=(Zk/Z0) πk(z) dz\mu_k(dz) = (Z_k / Z_0)\, \pi_k(z)\,dz, that is μk(dz)=e−βHk(z) dz/Z0\mu_k(dz) = e^{-\beta H_k(z)}\,dz / Z_0.

For k=0k = 0, W0=0W_0 = 0 and z0∼π0z_0 \sim \pi_0, so μ0(dz)=π0(z) dz=e−βH0(z) dz/Z0\mu_0(dz) = \pi_0(z)\,dz = e^{-\beta H_0(z)}\,dz / Z_0.

Assume the claim for k−1k - 1. The pair (Wk−1,zk−1)(W_{k-1}, z_{k-1}) is a function of z0,…,zk−1z_0, \dots, z_{k-1}, and given these, zk∼Kk(zk−1,⋅)z_k \sim K_k(z_{k-1}, \cdot) by the Markov property. With Wk=Wk−1+(Hk−Hk−1)(zk−1)W_k = W_{k-1} + (H_k - H_{k-1})(z_{k-1}),

μk(A)=E[e−βWk−1 e−β(Hk−Hk−1)(zk−1) Kk(zk−1,A)]=∫e−β(Hk−Hk−1)(z) Kk(z,A) μk−1(dz).\mu_k(A) = E\Bigl[e^{-\beta W_{k-1}}\, e^{-\beta (H_k - H_{k-1})(z_{k-1})}\, K_k(z_{k-1}, A)\Bigr] = \int e^{-\beta (H_k - H_{k-1})(z)}\, K_k(z, A)\, \mu_{k-1}(dz).

By the induction hypothesis, μk−1(dz)=e−βHk−1(z) dz/Z0\mu_{k-1}(dz) = e^{-\beta H_{k-1}(z)}\,dz / Z_0, so

μk(A)=1Z0∫e−βHk(z) Kk(z,A) dz=ZkZ0∫πk(z) Kk(z,A) dz=ZkZ0∫Aπk(z′) dz′,\mu_k(A) = \frac{1}{Z_0} \int e^{-\beta H_k(z)}\, K_k(z, A)\,dz = \frac{Z_k}{Z_0} \int \pi_k(z)\, K_k(z, A)\,dz = \frac{Z_k}{Z_0} \int_A \pi_k(z')\,dz',

where the last step is the invariance of πk\pi_k under KkK_k. This is the claim for kk. All integrands are nonnegative, so the exchanges of expectation and integral are justified by Tonelli's theorem.

At k=nk = n, ⟨e−βW⟩=μn(Γ)=Zn/Z0=e−β(Fλn−Fλ0)\langle e^{-\beta W} \rangle = \mu_n(\Gamma) = Z_n / Z_0 = e^{-\beta (F_{\lambda_n} - F_{\lambda_0})}. □\square

The Hamiltonian case. Along a solution of Hamilton's equations for Hλ(t)H_{\lambda(t)}, ddtHλ(t)(z(t))=λ˙ ∂λH+∇zH⋅z˙=λ˙ ∂λH\frac{d}{dt} H_{\lambda(t)}(z(t)) = \dot\lambda\, \partial_\lambda H + \nabla_z H \cdot \dot z = \dot\lambda\, \partial_\lambda H, because ∇zH⋅J∇zH=0\nabla_z H \cdot J \nabla_z H = 0 for the antisymmetric matrix JJ of Hamilton's equations. Integrating gives the two forms of WW. Then

⟨e−βW⟩=∫e−βHλ(0)(z0)Zλ(0) e−β(Hλ(τ)(Φ(z0))−Hλ(0)(z0)) dz0=1Zλ(0)∫e−βHλ(τ)(Φ(z0)) dz0.\langle e^{-\beta W} \rangle = \int \frac{e^{-\beta H_{\lambda(0)}(z_0)}}{Z_{\lambda(0)}}\, e^{-\beta (H_{\lambda(\tau)}(\Phi(z_0)) - H_{\lambda(0)}(z_0))}\,dz_0 = \frac{1}{Z_{\lambda(0)}} \int e^{-\beta H_{\lambda(\tau)}(\Phi(z_0))}\,dz_0.

The flow of a time-dependent Hamiltonian vector field has divergence 0, so by Liouville's theorem on phase space volume Φ\Phi is a bijection that preserves Lebesgue measure. The change of variables z=Φ(z0)z = \Phi(z_0) turns the last integral into ∫e−βHλ(τ)(z) dz=Zλ(τ)\int e^{-\beta H_{\lambda(\tau)}(z)}\,dz = Z_{\lambda(\tau)}. □\square

Example 1 (an instantaneous switch of a spring). Take Hλ(x)=kλx2/2H_\lambda(x) = k_\lambda x^2 / 2 on R\mathbb R with k0=1k_0 = 1, k1=2k_1 = 2, β=1\beta = 1, and one switch with no kernel step. Then x∼N(0,1)x \sim N(0, 1) and W=x2/2W = x^2 / 2, so ⟨e−W⟩=E[e−x2/2]=1/2\langle e^{-W} \rangle = E[e^{-x^2 / 2}] = 1/\sqrt 2, and ΔF=12ln⁡2=0.3466\Delta F = \frac12 \ln 2 = 0.3466, which is −ln⁡(Z1/Z0)-\ln(Z_1 / Z_0) with Zk=2π/kZ_k = \sqrt{2\pi / k}. The mean work is ⟨W⟩=0.5>ΔF\langle W \rangle = 0.5 > \Delta F.

Example 2 (a two-level system). Two states with energies 00 and ϵλ\epsilon_\lambda, where ϵ\epsilon is switched at once from 0 to ϵ\epsilon. At the start both states have probability 12\frac12, the work is ϵ\epsilon in the upper state and 0 in the lower one, and ⟨e−βW⟩=12(1+e−βϵ)=Z1/Z0\langle e^{-\beta W} \rangle = \frac12 (1 + e^{-\beta \epsilon}) = Z_1 / Z_0 with Z0=2Z_0 = 2 and Z1=1+e−βϵZ_1 = 1 + e^{-\beta \epsilon}.

Example 3 (finite speed). For the spring of Example 1, switch kk from 1 to 2 in nn equal steps, each followed by one Metropolis step for the new kk with proposals uniform on [−1,1][-1, 1] (seed 7):

nn trajectories ⟨W⟩\langle W \rangle standard deviation of WW −ln⁡⟨e−W⟩-\ln \langle e^{-W} \rangle fraction with W<ΔFW < \Delta F
1 20000 0.5048 0.708 0.3499 0.591
10 20000 0.4235 0.475 0.3475 0.611
100 5000 0.3582 0.152 0.3476 0.567

The mean work falls towards ΔF=0.3466\Delta F = 0.3466 as the process slows down, and the exponential average gives ΔF\Delta F within about 0.003 at every speed.

Consequences

1. The second law for the mean work. By Jensen's inequality for the convex function e−βwe^{-\beta w}, e−β⟨W⟩≤⟨e−βW⟩=e−βΔFe^{-\beta \langle W \rangle} \le \langle e^{-\beta W} \rangle = e^{-\beta \Delta F}, so ⟨W⟩≥ΔF\langle W \rangle \ge \Delta F, with equality only if WW is constant with probability 1. The difference ⟨W⟩−ΔF\langle W \rangle - \Delta F is the mean dissipated work.

2. Rare violations. For every ξ>0\xi > 0, P(W≤ΔF−ξ)≤e−βξP(W \le \Delta F - \xi) \le e^{-\beta \xi}. Proof. By Markov's inequality, P(e−βW≥e−β(ΔF−ξ))≤⟨e−βW⟩ eβ(ΔF−ξ)=e−βξP(e^{-\beta W} \ge e^{-\beta (\Delta F - \xi)}) \le \langle e^{-\beta W} \rangle\, e^{\beta (\Delta F - \xi)} = e^{-\beta \xi}. Single trajectories with W<ΔFW < \Delta F are common; in Example 3 more than half of them have it. Only large violations are rare.

3. The two limits. With n=1n = 1 and no kernel step, W=H1(z0)−H0(z0)W = H_1(z_0) - H_0(z_0) and the theorem is Zwanzig's identity of free energy perturbation. At the other extreme, let λi=i/n\lambda_i = i / n on a path with sup⁡∣∂λH∣\sup |\partial_\lambda H| and sup⁡∣∂λ2H∣\sup |\partial^2_\lambda H| bounded, and let each kernel draw a fresh sample, Ki(z,⋅)=πλiK_i(z, \cdot) = \pi_{\lambda_i}. Then the terms of WW are independent, each with mean ⟨Hi−Hi−1⟩i−1=1n⟨∂λH⟩λi−1+O(n−2)\langle H_i - H_{i-1} \rangle_{i-1} = \frac1n \langle \partial_\lambda H \rangle_{\lambda_{i-1}} + O(n^{-2}) and variance O(n−2)O(n^{-2}). So E[W]→∫01⟨∂λH⟩λ dλE[W] \to \int_0^1 \langle \partial_\lambda H \rangle_\lambda\, d\lambda, the Riemann sum converging because the integrand is continuous by dominated convergence, and var(W)=O(1/n)\mathrm{var}(W) = O(1/n). The limit is Kirkwood's formula of thermodynamic integration, and W→ΔFW \to \Delta F in mean square.

4. Gaussian work. If WW is normal with mean mm and variance s2s^2, the moment generating function gives ⟨e−βW⟩=e−βm+β2s2/2\langle e^{-\beta W} \rangle = e^{-\beta m + \beta^2 s^2 / 2}, so ΔF=m−βs2/2\Delta F = m - \beta s^2 / 2. For near-equilibrium processes this is a useful estimate; in Example 3 it gives 0.254, 0.311 and 0.347 for n=1,10,100n = 1, 10, 100, good only for the slowest process, where the work is close to normal.

5. Crooks' theorem and BAR. For dynamics that are reversible in a suitable sense, Crooks (1999) proved that the forward and reverse work densities satisfy PF(W)/PR(−W)=eβ(W−ΔF)P_F(W) / P_R(-W) = e^{\beta (W - \Delta F)}; integrating over WW gives the equality. With work from both directions, the Bennett acceptance ratio equation gives the estimate of least variance.

6. Annealed importance sampling. In statistics the Markov case is the identity behind annealed importance sampling (Neal 2001), with e−βWe^{-\beta W} as the importance weight of a path.

Tightness

The start must be canonical. In Example 2, start in the lower state with probability 1. Then W=0W = 0 always and ⟨e−βW⟩=1≠12(1+e−βϵ)\langle e^{-\beta W} \rangle = 1 \ne \frac12 (1 + e^{-\beta \epsilon}). The proof uses z0∼πλ0z_0 \sim \pi_{\lambda_0} in its first step, and it does not hold for other starts. The end state need not be in equilibrium.

Each kernel must keep the current canonical density. In Example 2, switch ϵ\epsilon from 0 up to ϵ\epsilon, then apply a kernel, then switch back down to 0, so ΔF=0\Delta F = 0. The second switch costs −ϵ-\epsilon in the upper state. With the identity kernel, which keeps every density, W=0W = 0 always and the average is 1, as it should be. With a kernel that always moves the system to the lower state, which does not keep πλ1\pi_{\lambda_1}, W=ϵW = \epsilon in the upper start and 0 in the lower one, and the average is 12(1+e−βϵ)≠1\frac12 (1 + e^{-\beta\epsilon}) \ne 1.

The equality is exact, the estimator is not. The sample mean of e−βWe^{-\beta W} over NN trajectories is unbiased, but its logarithm is biased upward for ΔF\Delta F by Jensen's inequality, and its variance can be huge. The average is dominated by rare trajectories with small work, and Jarzynski (2006) estimates that the number of trajectories needed grows like eβWdise^{\beta W_{\text{dis}}} with the typical dissipated work Wdis=⟨W⟩−ΔFW_{\text{dis}} = \langle W \rangle - \Delta F. For the spring of Example 1 switched from k=2k = 2 down to k=1k = 1, W=−x2/2W = -x^2/2 with x∼N(0,12)x \sim N(0, \frac12), and ⟨e−2βW⟩=E[ex2]=∞\langle e^{-2\beta W} \rangle = E[e^{x^2}] = \infty: the equality holds, but the estimator has infinite variance.

The work must be the work done by the protocol. For a system coupled to a heat bath, WW is the energy change caused by changing λ\lambda, not the total change of energy, which also contains heat. In the Markov case this is the split into switches (work) and kernel steps (heat).

History

Jarzynski (1997) found the equality and proved it for Hamiltonian dynamics and for a system coupled to a heat bath. Crooks (1998) proved it for Markov dynamics that keep the current canonical density, as in the proof above, and in 1999 derived his fluctuation theorem for the work distributions. Liphardt, Dumont, Smith, Tinoco and Bustamante (2002) tested it by unfolding single RNA molecules with optical tweezers and recovered the equilibrium free energy from irreversible pulls. Jarzynski (2006) analysed why the exponential average converges slowly. The same identity appeared in statistics as annealed importance sampling.

References

  1. Christopher Jarzynski, Nonequilibrium equality for free energy differences, Physical Review Letters 78, 1997, 2690-2693, the equality for a system that starts in equilibrium and is driven by a time-dependent parameter, with the Hamiltonian derivation
  2. Gavin E. Crooks, Nonequilibrium measurements of free energy differences for microscopically reversible Markovian systems, Journal of Statistical Physics 90, 1998, 1481-1487, the proof of the equality for Markov dynamics in which each step keeps the canonical distribution of the current parameter
  3. Gavin E. Crooks, Entropy production fluctuation theorem and the nonequilibrium work relation for free energy differences, Physical Review E 60, 1999, 2721-2726, the fluctuation theorem relating the forward and reverse work distributions, from which the equality follows
  4. Christopher Jarzynski, Rare events and the convergence of exponentially averaged work values, Physical Review E 73, 046105, 2006, the estimate that the number of trajectories needed grows exponentially with the dissipated work
  5. Jan Liphardt, Sophie Dumont, Steven B. Smith, Ignacio Tinoco Jr. and Carlos Bustamante, Equilibrium information from nonequilibrium measurements in an experimental test of Jarzynski's equality, Science 296(5574), 2002, 1832-1835, the test of the equality by mechanically unfolding single RNA molecules with optical tweezers
  6. Tony Lelièvre, Mathias Rousset and Gabriel Stoltz, Free Energy Computations, A Mathematical Perspective, Imperial College Press, 2010, the chapter on nonequilibrium methods and the Jarzynski-Crooks identities

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)
WritingW0 stub
  • the lead paragraph