This module uses the same alanine dipeptide pilot as the recording interval lab in MD-T, and this time it asks about the error. The model in the bridge and all the statistics are computed in your browser right now; the angles, RMSD and 3D frames come from this project's pilot (5 independent runs × 10 ns, GROMACS 2026.3).
MD-U · Sampling and uncertainty

What is the αR fraction, and how sure are we? Autocorrelation, effective sample size and independent runs

An MD run produces thousands of frames, and each frame looks like a measurement. But consecutive frames are very similar: in one frame the molecule is almost where it was in the previous one. In this lab you will ask a simple question of this project's alanine dipeptide pilot: what fraction of the time does the molecule spend in the αR region? Then you will move on to the really hard question: how far can you trust that number?

Discoveries: 0 / 4
Experimental bridge

What is n? The number of frames and the number of independent measurements are not the same

Three wells prepared from the same lysate are not three biological replicates: all three come from the same cells. The 600 frames of a cell migration video taken at one frame per second are not 600 independent measurements either: a cell hardly changes direction within a second. When observations that are linked in time or space are treated as if they were independent, this is called pseudoreplication; the error bar comes out narrower than it really is (Lazic 2010, BMC Neurosci 11:5).

The small model below measures the speed of a cell for 10 minutes. The speed changes slowly: it takes about 30 seconds to "forget" a value. Choose the frame interval; the same experiment is repeated 20 times. The mean of each experiment is drawn with a 95% error bar computed on the assumption that "every frame is independent". The true mean is known (dashed line): how many of the error bars catch it?

Error bar
Frames per experiment, N
Error bar, mean half-width (95%)
True scatter of the 20 means (SD)
Error bars that catch the true mean
Long-run capture (1,000 experiments)

Model: the speed is a mean-reverting random process (Ornstein-Uhlenbeck; correlation time 30 s, mean 1.0 µm/min, standard deviation 0.4 µm/min), generated anew in the browser for every experiment. The numbers belong to a teaching model, not to a real migration experiment. 95% error bar: mean ± t · s / √N; t is taken with N − 1 degrees of freedom (2.776 for N = 5; it approaches 1.96 as N grows). The corrected bar is further multiplied by √g; in this model g = (1 + ρ) / (1 − ρ), ρ = e^(−Δt / 30 s). The long-run row is computed from the same model with 1,000 experiments from a fixed seed.

1 · Workshop

Two-level RMSD, wandering angles

Alanine dipeptide is a small molecule of 22 atoms; all of its flexibility lies in two angles: φ and ψ. In this project five independent runs were performed in water, 10 ns each, one frame per ps. The states were written down and frozen before the runs: αL (φ ≥ 0), αR (φ < 0 and −120 ≤ ψ < 50) and the rest, β/PPII. RMSD is the distance of each frame from the minimized starting structure; that structure lies in the β/PPII region (φ = −88°, ψ = 129°). Choose a run and a time window: what does the RMSD say, and what do the angles say?

Run
Window length
RMSD in the window (median / largest)
RMSD median by state (αR / β / αL)
State changes in the window
αR / β / αL fraction in the window
αR fraction, whole run (with this boundary)
Boundaries written in advance
ψ = 50° (main), 30° and 70° (sensitivity)

αRβ/PPIIαLRMSD (heavy atoms, to the minimized structure)
Open

What can RMSD not see?

In a window, compare the level the RMSD is at with how many times the state changes in the same window.

Move the window at least once, or change its length.
2 · Bench

Consecutive frames are not independent: the effective sample size

Ask every frame one question: "is it in αR?" The answer is 1 or 0, and you get a barcode of 10,000 frames. The mean of the barcode is the αR fraction. If the frames were independent, its error would be √(p(1 − p) / N). But the barcode is made of long stripes: once the molecule enters αR, it stays there for tens of picoseconds. Measure this memory in two ways: autocorrelation (how much does a frame resemble the frame k frames later?) and block averaging (group the frames into blocks and look at how much the block means scatter). Both look for the same number: the statistical inefficiency g, that is, how many frames make one independent measurement.

Run
State
Number of frames, N
Fraction, p
Number of visits
g (block averaging, at this block size)
g (autocorrelation, Sokal)
Effective sample size, N / g
Error: every frame independent
Error: corrected, √g times

The definitions were frozen before the runs (PROTOCOL_2026-09-26.md). Block averaging: B = 2^k frames, at least 16 blocks; g_B = B · s²(block means) / σ²(frames). Autocorrelation: τ_int(M) = ½ + Σρ(k), stopping at the first M with M ≥ 5 · τ_int; g = 2 τ_int. The page computes these numbers right now; they are identical to the project's Python analysis (analysis.py). For the method see Grossfield et al. 2018, Living J Comput Mol Sci 1:5067.

Open

How many measurements are 10,000 frames worth?

For αR or β, increase the block size to its largest value: does g_B settle on a flat level?

Raise the block size to 512 frames.
Open

When can no error bar be built?

Look at a state that is visited very rarely.

Choose αL in a run where αL was entered at most twice.
3 · Notebook

Five runs: measuring the error bar from the runs themselves

Estimating g from a single run rests on a model, and g itself is uncertain: across the five runs it came out between 91 and 228 frames for αR. A sturdier way is to use the runs as measurements independent of each other: each run gives a fraction, and the scatter of the fractions gives the error. Choose the window length and the runs to use; each of your trials is written into the notebook below.

State
Window length (from the start of each run)
Runs used (at least 2)
Mean across runs
95% interval (t, n − 1 degrees of freedom)
Total simulated time

TrialStateWindowNumber of runsTotalMean95% interval

The protocol wrote the 95% interval in advance only for the 10 ns fractions of five runs (t = 2.776). Fewer runs and shorter windows are a teaching extension of this lab; the t value is taken according to the number of runs (2: 12.706; 3: 4.303; 4: 3.182; 5: 2.776). Short windows are taken from the start of each run, and because all runs started from the same minimized structure, they are closer to the start. The error bar of a single run is ±1.96 · the corrected error (g, Sokal).

Open

The same 10 ns: one run or five short runs?

Write two schemes that total 10 ns into the notebook and compare them.

Write 5 runs × 2 ns for αR into the notebook; the error bars of the single 10 ns runs are drawn at the 10 ns window.
4 · Back to the protein

How many replicas does each of this project's results rest on?

In alanine dipeptide the memory of αR lasted 46 to 114 ps; in a 10 ns run 126 to 206 state changes were counted, and the error bar was still wide. In a protein, the interesting motions are often much slower than this. The table below reads this book's own runs with the same eye.

ResultRuns it rests onWhat we know about the uncertainty
Alanine dipeptide, αR fraction (this page)5 independent runs × 10 ns0.254; 95% interval 0.179 to 0.329. For αL the interval includes zero (−0.008 to 0.026).
Ubiquitin, crystal B against MD fluctuation (MD-PDB)1 run × 2 nsr 0.86 between the two halves of the run; r 0.59 with crystal B for residues 1 to 72. A single run; no between-run error was measured.
Ubiquitin, time step grid (MD-DT)24 runs × 20 ps, one seed per settingNo replicas for the small differences between settings; the page calls this "the result of this short experiment".
Alanine dipeptide, production (5 × 200 ns)Written in the protocolThis scenario has not been computed.

In practice: along with the value of the result, write down the number of independent runs it rests on and how the error was computed. Runs started from the same starting structure, with only the velocity seed changed, were counted as "independent" on this page; this does not replace starting from different starting structures. Source: Grossfield et al. 2018 (Living J Comput Mol Sci 1:5067).

5 · Test yourself

Six questions

Previous steps: MD-T · Energy, forces and numerical motion (recording interval, the same pilot) and MD-DT · The time step in a protein (a single-seed grid).

Model and data: the speed model in the bridge is a teaching model computed in the browser. The angles (gmx angle, 1 ps), RMSD (heavy atoms, to the minimized structure) and 3D frames (one every 40 ps) come from this project's alanine dipeptide pilot: AMBER99SB-ILDN, TIP3P, 300 K, 1 bar, 2 fs, GROMACS 2026.3; the only difference between the runs is the velocity and thermostat seeds. Starting structure: mdshare ALA2 (Freie Universität Berlin, CC BY 4.0). Pilot runs are not evidence of equilibrium or of populations.

Terms in this module

The definition of each term and the other modules where it appears are in the glossary.