Converge

Is your simulation converged, and are your error bars honest? Find where equilibration ends, measure correlation, and get error bars that hold up.

Check a simulation in seconds

Drop in a gmx energy file or any time series. Converge works out how much of the run to discard, how many truly independent samples you have, and whether the average is still drifting. Or start with an example:

Why Converge?

Consecutive simulation frames are correlated, the start of a run is rarely equilibrated, and slow drifts hide in noisy data. The naive standard error ignores all three. On correlated test data it covered the true mean only 38% of the time, although it claims 95%. Converge's intervals covered it 94.8% of the time.

The same algorithms are in the Python package (pip install git+https://github.com/siba-p/converge), and the web app and the package give identical numbers.

Method

Autocorrelation time (Sokal window M≥5 τint(M)M \geq 5\,\tau_{\mathrm{int}}(M)) and statistical inefficiency

τint=12+∑t=1Mρ(t),g=2τint,Neff=Ng\tau_{\mathrm{int}} = \tfrac{1}{2} + \sum_{t=1}^{M} \rho(t), \qquad g = 2\tau_{\mathrm{int}}, \qquad N_{\mathrm{eff}} = \frac{N}{g}

Standard error of the production mean

SEM=σxgN\mathrm{SEM} = \sigma_x \sqrt{\frac{g}{N}}

Equilibration: discard the start that leaves the most independent samples (Chodera)

t0∗=arg⁡max⁡t0  N−t0g(t0)t_0^{*} = \arg\max_{t_0} \; \frac{N - t_0}{g(t_0)}

Block averaging (Flyvbjerg–Petersen), plateau of

SEMb=Var⁡(xˉb)nb−1\mathrm{SEM}_b = \sqrt{\frac{\operatorname{Var}(\bar x_b)}{n_b - 1}}

Run length for a target error

Tneeded=T(SEMSEMtarget)2T_{\mathrm{needed}} = T \left(\frac{\mathrm{SEM}}{\mathrm{SEM}_{\mathrm{target}}}\right)^{2}
  1. J. D. Chodera, J. Chem. Theory Comput. 12, 1799 (2016).
  2. H. Flyvbjerg & H. G. Petersen, J. Chem. Phys. 91, 461 (1989).
  3. A. D. Sokal, Monte Carlo Methods in Statistical Mechanics (1997).
  4. K. P. White Jr., Simulation 69, 323 (1997) (MSER).