## Non-equilibrium fluctuation theorems


Statistical physics is a powerful framework to deduce general statements about the dynamics at or near equilibrium. However, for a long time, it was believed that no general statements can be made about far from equilibrium dynamics. This changed in the early 2000s with the discovery of non-equilibrium fluctuation theorems. We discuss the two best-known theorems, the Crooks and Jarzynski theorems. 

We have seen: In the thermodynamic limit, the work done on a system during an isothermal process always exceeds the change in free energy, $W\geq\Delta F.$ 

Jarzynski showed that this statement can be generalized to the equality 

$$
\langle e^{-\beta W}\rangle= e^{-\beta \Delta F} \qquad\text{(Jarzynski 1998)}
$$

To interpret this equation, we need to clarify the transformation process: Consider a system with an external control parameter, $\lambda$, such as the volume of a container or the length of a polymer. We assume at time $0$, the system is equilibrated with $\lambda=\lambda_i$. Then the system is driven out of equilbrium following a particular finite time protocol $\Lambda=\{\lambda(t)\}$ until the final value $\lambda(T)=\lambda_f$ is reached. The total work $W$ done on the system during this process will be a random variable. It is different each time we rerun this process. The average on the left hand side is an average over many realizations of the above transformation. 



The free energy difference $\Delta F$ on the right hand side is the difference between the free energy of the system for the initial and final parameters, i.e.,

$$
\Delta F = F(T, \lambda_f)-F(T, \lambda_i)
$$

Note that if the transformation protocol $\Lambda$ is short, the system will go through a dynamics very far from equilibrium and be at a state far from equilibrium at time $T$. Yet, the Jarzynski equation relates the ensuing work to the equilibrium quantity $\Delta F$, which is why this equation was so surprising.

In the original publication, Jarzynksi derived his equation from Hamiltonian dynamics. We will take a different route, and show that the coarse-grained stochastic dynamics of a microscopically reversible equations of motions satisfies Crook's theorem, from which the Jarzynski theorem follows easily.

#### Time reversibility
The crux of the Crooks theorem is that microscopic laws are time reversible. In a stochastic description of the dynamcis, this implies that, in equilibrium, $A \rightarrow B$ occur at the same rate as $B \rightarrow A$ transitions. Or in terms of probabilities, we must have the detailed balance condition,

$$
p(A \rightarrow B)=p(B \rightarrow A) \qquad \text{(detailed balance)}
$$

implying

$$
p(A \rightarrow B \mid A) \cdot p(A)=p(B \rightarrow A \mid B) p(B) 
$$

or

$$
\frac{p(A \rightarrow B \mid A)}{p(B \rightarrow A \mid B)} = \frac{p(B)}{p(A)}=e^{-\beta (E_B-E_A)}= e^{-\beta (Q+W)}\;,
$$ (detailed-balance) 

where we used the fact that, in equilibrium, the likelihood ratio of two states is given by the boltzmann factor. As we transform the system from one state to the other, the energy change is generated by a combination of heat from the reservoir into the system and work done by an external force.

#### A concrete setup

To be specific, let's imagine the system consists of a polymer connected to an ideal spin. $x(t)$ represents the (high-dimensional) configuration of the polymer and  $\lambda(t)$ is the end-to-end distance from the open ends of polymer and spring. The reservoir is the surrounding fluid.

Suppose we are interested in stretching the polymer from initial length $\lambda_i$ to final length $\lambda_f$ in the finite time $T$. Our goal is to measure $\Delta F=F(\lambda_f, T)-F(\lambda_i,T)$.


```{image} figures/crooks-polymer.jpg
:alt: polymer
:class: bg-primary mb-1
:width: 400px
:align: center
```


Let's assume we discretize our stochastic dynamics into $N$ time steps and let the control parameter jump change discontinuously at the end of each time step (see bottom right in figure).

It is clear that, if our time steps are sufficiently small, we should be able to discretize the $\lambda(t)$ dynamics into such a piecewise constant function. The advantage of this discretization is twofold: 

(1) it ensures that the external force does not perform any work in the time intervals between $t$ and $t+1$ where $\lambda(t)=\lambda_{t,t+1}=$ const. 

Thus, 

$$
\frac{P\left(x_{t}^{+} \rightarrow x_{t+1}^{-} \mid \lambda_{t, t+1}, x_{t}^{+}\right)}{P\left(x_{t+1}^{-} \rightarrow x_{t}^{+} \mid \lambda_{t, t+1}, x_{t+1}^{-}\right)}=e^{-\beta Q_{t, t+1}}
$$ (conditional-probabilities-ratio)

where $Q_{t, 1+1}$ is the heat added to the system in the time interval $(t, t+1)$. The equality follows from equation {eq}`detailed-balance` and $W=0$.

(2) During the instantaneous jumps in $\lambda(t)$, we can assume that the configuration $x$ of the polymer does not change - only the ideal, massless spring gets stretched. Thus, the configuration before and after the jump are identical, $x^+_t=x^-_t \forall t$.  

Generalizing {eq}`conditional-probabilities-ratio`, we thus obtain


$$
\frac{P\left(X \mid \Lambda_{i}, x_{i}\right)}{P\left(\tilde{X} \mid \tilde{\Lambda}, x_{f}\right)}=e^{-\beta Q} 
$$

where


$$
& X=\left\{x_{i}, x_{1},  \ldots x_{N-1},x_{f}\right\} \\
& \tilde{X}=\left\{x_{f}, x_{N-1}, x_{N-2},\ldots,c_{i}\right\} \text { (time reversed) } \\
& \Lambda=\left\{\lambda_{i}, \ldots . \lambda_{f}\right\}\\
& \tilde \Lambda=\left\{\lambda_{f}, \ldots . \lambda_{i}\right\} \text { (time reversed) } 
$$

Now, we integrate over the equilibrium distribution of the initial conditions for the forward path and the final conditions for the backward path.

$$
\frac{P\left(X \mid \Lambda_{i} \right)}{P\left(\tilde{X} \mid \tilde{\Lambda}\right)}=
\frac{P\left(X \mid \Lambda_{i} ,x_{i}\right)}{P\left(\tilde{X} \mid \tilde{\Lambda}, x_{f}\right)}\frac{P\left(x_{i} \mid \lambda_{i}\right)}{P\left(x_{f} \mid \lambda_{j}\right)}=e^{-\beta Q} \frac{P\left(x_{i} \mid \lambda_{i}\right)}{P\left(x_{f} \mid \lambda_{j}\right)}
$$

Imposing the Boltzmann distribution, 

$$
P\left(x_{i} \mid \lambda_{i}\right)=e^{-\beta(E_{i}-F_i)}\\
P\left(x_{f} \mid \lambda_{f}\right)=e^{-\beta(E_{f}-F_f)}
$$

where $E_i=E(x_i,\lambda_i)$ and $F_i=F(\lambda_i,T)$, we obtain

$$
\frac{P\left(X \mid \Lambda_{i} \right)}{P\left(\tilde{X} \mid \tilde{\Lambda}\right)}=e^{-\beta(\underbrace{Q-\Delta E}_{-\Delta W}+\Delta F)}=e^{-\beta(\Delta F-W)}
$$


#### Crooks Fluctuation Theorem (CFT) (2000):

$$
\begin{array}{r}
P(+W \mid \Delta)=\int D X \delta(W(X)-W) P(X \mid \Lambda) \\
\stackrel{(3)}{=} \int D \tilde{X} \delta(W(X)+W) P(\tilde{X} \mid \Lambda)  e^{-\beta(\Delta F-W)} \\
=e^{-\beta(\Delta F-W) }P(-W \mid \Lambda) 
\end{array}
$$

$$
\boxed{\frac{P(+W \mid \Delta)}{P(-W \mid \Delta)}=e^{-\beta(\Delta F-W)}\qquad \text { Crooks, 2000 }}
$$ (crooks)


#### Jarzynski (1998):
From the Crooks theorem, we get the Jarzynski equation easily

$$
\begin{aligned}
& \left\langle e^{-\beta W}\right\rangle_{\Lambda}=\int d W P(+W \mid \Lambda) e^{-\beta W} \\
& \quad \stackrel{(4)}{=} \int d W P(-W \mid \tilde{\Lambda}) e^{-\beta W-\beta(\Delta F- W)} \\
& =e^{-\beta \Delta F} \int d W  P(-W \mid \tilde{\Lambda})  
\end{aligned}
$$

$$
\boxed{
\left\langle e^{-\beta W}\right\rangle_{\Lambda}=e^{-\beta \Delta F} \qquad \text { Jarzynski, 1998 }}
$$

Jensens inequality $\left\langle e^{-x}\right\rangle \geqslant e^{-\langle x\rangle}$ then implies

$$
\langle W\rangle \geq \Delta F \;,
$$

a version of the second law.

#### Testing the Crooks fluctuation theorem

In 2005, Bustamante's group at Berkeley published a test of the CFT ({cite}`collin2005verification`). They repeatedly unfolded and refolded a RNA hairpin and determined the work distributions for Unfolding, $P_U(W)$, and for refoldung, $P_R(-W)$. These two distributions deviate from one another, the more so the more rapid the unfolding protocal is, i.e., the more it is out of equilibrium. Yet, if the CFT is correct, both distributions have to cross at exactly $W=\Delta F$,
since $P_U(\Delta F)=P_R(-\Delta F)$. Indeed, that's what they found.

{biography}




