---
title: "Why the deepest potential well need not be the most populated"
description: "Calculate the populations of wide and narrow wells and see how a projected free energy includes the hidden direction’s entropy."
canonical_url: "https://sandboxphysics.com/stories/free-energy/boltzmann-and-projection/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/free-energy/boltzmann-and-projection/"
last_modified: "2026-10-28"
---

[Free energy and rare events](https://sandboxphysics.com/stories/free-energy/)

L1 · Chapter 1

# Why the deepest potential well need not be the most populated

Sandbox Physics · 2026-10-28

A frequently visited region needs both favorable energy and room for many configurations. A deep narrow valley can lose to a shallower broad one. Free energy combines these contributions. Compressing a two-coordinate motion into one curve keeps the statistical influence of the coordinate that disappears from view.

## Before you begin

High-school algebra, probability and logarithms. Read an integral as a sum over small cells. Probability density, marginal distributions and collective variables are introduced here.

- Calculate equilibrium probabilities and explain why a free-energy curve depends on the chosen coordinate.
- Use a conditional distribution to detect distinct configurations hidden by a smooth projection.

## Assign a weight to each configuration

Picture a thermally agitated bead wandering across two valleys. A sequence of photographs shows which locations occur most often. At equilibrium, a small cell of low energy usually appears more frequently. Finding the population of an entire valley requires adding the probabilities of all its cells.

The configuration coordinates $x,y$ increase to the right and upward. They may represent scaled molecular deformations. The potential energy is $U(x,y)$, the temperature is $T$, and $\beta=1/(k_{\mathrm B}T)$, with Boltzmann constant $k_{\mathrm B}$. A probability density becomes a probability after multiplication by a small area. The partition function $Z$ normalizes the total probability.

$$
p(x,y)=\frac{e^{-\beta U(x,y)}}{Z},\qquad Z=\int_{\Omega}e^{-\beta U(x,y)}\,dx\,dy
$$

A Boltzmann factor weights equal configuration-space volume elements. A whole well contributes all the elements it contains.

Source: PLUMED Masterclass 21.2 · Michael R. Shirts and John D. Chodera

## Two boxes are enough to see entropy

Worked example: box A contains two distinguishable configurations of zero energy. Box B contains eight, each higher by $k_{\mathrm B}T\ln 2$. Box A has total weight two. Each configuration in B has weight one half, giving total weight four. The higher-energy box therefore has probability two thirds.

For $g$ equal-energy configurations the entropy is $S=k_{\mathrm B}\ln g$. Free energy $F=E-TS$ compares the total weights. Here B has free energy lower than A by $k_{\mathrm B}T\ln 2$. The negative difference reflects its greater population.

The width of a continuous valley plays the same role as the number of discrete configurations. Width means volume in configuration space. Entropy depends on actual configuration-space volume; line thickness is a drawing choice.

Original discrete schematic. Two low-energy configurations have total weight two; eight configurations at half weight each have total weight four. Circle count represents distinguishable configurations, not particle number.

Original discrete example, calculated directly from state counts and Boltzmann factors.

| Box | Configurations | Weight per configuration | Population |
| --- | --- | --- | --- |
| A | 2 | 1 | $1/3$ |
| B | 8 | $1/2$ | $2/3$ |

## Add a whole slice when projecting

A camera reporting only $x$ combines every possible $y$ at that coordinate. This sum gives the marginal density $p_x(x)$. Its negative logarithm, multiplied by thermal energy, defines the projected free energy $F_x(x)$. An arbitrary constant $C$ sets the vertical zero.

Suppose locally $U(x,y)=V(x)+\kappa(x)y^2/2$ and the transverse domain is wide enough to extend the integral over the real line. A Gaussian integral gives $F_x(x)=V(x)+(k_{\mathrm B}T/2)\ln\kappa(x)+C$. A stiffer, narrower cross-section raises the free energy. The minimum-energy curve $V(x)$ omits this contribution. A finite box instead requires its actual integration limits.

$$
p_x(x)=\int p(x,y)\,dy,\qquad F_x(x)=-k_{\mathrm B}T\ln p_x(x)+C
$$

The integral includes all transverse equilibrium weight. Following only the lowest-energy point loses the width of the slice.

$$
p(y\mid x)=\frac{e^{-\beta U(x,y)}}{\int e^{-\beta U(x,y')}\,dy'}
$$

The conditional distribution asks where the bead may lie in the hidden direction after its horizontal coordinate is known.

## A different coordinate asks a different question

Rotate the viewing direction through angle $\theta$ and define $s=x\cos\theta+y\sin\theta$. A collective variable summarizes configurations with a few numbers. Each value here labels a slanted slice. One direction separates two valleys; another can stack them on top of each other. A flatter projected curve may then conceal a slow crossing.

Even a monotone change of scale matters. If $z=h(s)$, conservation of probability gives $p_z(z)=p_s(s)/|h\prime(s)|$. State the coordinate measure before comparing pointwise barriers. Integrated probabilities of corresponding regions survive this relabeling.

$$
F_z(h(s))=F_s(s)+k_{\mathrm B}T\ln|h'(s)|+C
$$

The Jacobian compensates for the stretched scale. A projected free energy describes occupancy in a specified coordinate; a speed also needs dynamics.

## The two-coordinate landscape used along the course

Our numerical examples use the reflecting square $\Omega=[-1.8,1.8]^2$. Coordinates, energy and time are dimensionless, with default thermal energy one. Parameters $a,b$ set two double-well barriers, $c$ couples the coordinates and $d$ tilts the landscape. Defaults are $a=b=3$, $c=1.5$ and $d=0$. This teaching model can be integrated independently.

A reference curve sums Boltzmann weights over a two-dimensional grid. A trajectory estimate uses the positions actually visited by the bead. Their agreement tests the selected projected occupancy. Hidden conditional distributions require another check.

$$
U(x,y)=a(x^2-1)^2+b(y^2-1)^2+cxy+dx
$$

Horizontal axes describe configurations and height represents potential energy. The model is not calibrated to a particular molecule.

## Try the reasoning in an experiment

### [Predict a direction that separates the valleys](https://sandboxphysics.com/labs/projected-free-energy/)

1. Inspect the two-dimensional landscape. Predict a direction that places distinct configurations at the same projected position, explain your choice, then rotate the projection.
2. Compare the free-energy and minimum-energy curves. Select a slice and use its conditional distribution to explain their difference.
3. Change only the coupling. Decide whether the original projection still separates the valleys, using both the landscape and conditional distribution.

## Exercises and explanations

1. Raise every configuration in box B to $k_{\mathrm B}T\ln 4$. What is its population?

   Read the explanation

   Its weight per configuration becomes one quarter. Eight contributions give total weight two, equal to A. Both boxes have probability one half: the energy penalty exactly balances the number of configurations.

2. A projected free-energy curve has one well. Does this exclude slow transitions in the full system? Propose a check.

   Read the explanation

   Distinct valleys can overlap in projection. Examine the conditional distribution of the hidden coordinate at fixed projected position. Separated peaks call for a measurement of their exchange time. Rotating the projection gives another test.

[Next: How much independent information is in ten thousand frames](https://sandboxphysics.com/stories/free-energy/trajectories-and-correlation/)

## Sources and reproduced scope

Worked examples and schematic figures are original teaching material. The numerical research slice compares specified estimator equations on our seeded two-coordinate records with independent quadrature and PyMBAR. The final chapter reads Figure 1 of the MBAR paper and states which experimental data remain outside that calculation.

[Model definitions, scripts and numerical records](https://github.com/yangzichao/sandboxphysics/tree/main/docs/frontier/fr15)

1. [PLUMED Masterclass 21.2, Statistical errors in MD (documentation v2.9)](https://www.plumed.org/doc-v2.9/user-doc/html/masterclass-21-2.html)

   Background and Exercises 2, 7–9: marginal probabilities, correlated samples, blocks and bootstrap. The tutorial reports PLUMED 2.7.0 for its original exercises. Our examples use an independently defined two-coordinate model.

2. [Michael R. Shirts and John D. Chodera, Statistically optimal analysis of samples from multiple equilibrium states, J. Chem. Phys. 129, 124105 (2008)](https://arxiv.org/abs/0801.1426v3)

   Frozen arXiv v3: Sections II–IV, Eqs. (9), (11)–(14), Section V and Figure 1, Appendices A–C. We implement the equilibrium estimating equations on our synthetic model. Figure 1 is read as an experimental example; its DNA-hairpin traces and plotted values are not reproduced.
