Guide · VASP · LAMMPS · 12 min read

How do I know when a molecular dynamics run is equilibrated?

Checked against the docs · VASP wiki and LAMMPS stable release 30 Sep 2026 · Last checked 11 November 2026 · Spot a mistake? Tell us

Short answer

A run is equilibrated once the quantities that describe it (temperature, energy and, when the cell can change, pressure and volume) have stopped drifting and only fluctuate about steady values. Plot them against time, find where the drift ends, discard everything before that point, and take averages only from what follows. A run that is still drifting needs more steps, not a looser eye.

What does equilibrated mean?

A molecular dynamics (MD) run starts from a structure and a set of velocities that you chose: a relaxed crystal, a snapshot from another run, atoms given random velocities at your temperature. That starting point is almost never typical of the conditions you asked for. For a while, the system adjusts: energy moves between kinetic and potential, the thermostat pulls the temperature toward its target, the atoms settle into the arrangement that suits the temperature.

A run is equilibrated once that adjustment is over. From then on, the quantities that describe it no longer drift in any direction; they fluctuate about steady values. The part before is the equilibration; the part after, the production run, is what you measure from.

The distinction matters because almost everything you report from MD is an average over time. The VASP wiki's Ensemble properties page defines an observable as the average of a quantity over the trajectory, in the limit of a very long simulation. Steps from the equilibration are not samples of the conditions you asked for, so they pull the average toward where the run started.

A note on words: a relaxation that reached its tolerance is converged; dynamics that has stopped drifting is equilibrated. They are different tests of different calculations.

Why does it matter?

Averages taken too early are biased. The VASP wiki's guide to MD says equilibration and production "serve different purposes": only after the temperature, pressure, volume and local structure "have fluctuated around a steady state should the trajectory be treated as production data for calculating averages, diffusion coefficients, performing structural analyses, and determining other observables."

A short run can look settled when it is not. The wiki is explicit: "Do not interpret a very short trajectory as thermodynamic sampling." A slow drift hidden under large fluctuations only shows over a long enough window.

Each property settles at its own pace. The temperature can look steady while the volume, the pressure or the structure is still moving.

Which quantities drift and settle?

QuantityWhy it drifts at firstWhere to read it
TemperatureThe starting velocities and positions are not in balance; the thermostat pulls the temperature to its target.VASP: T= in OSZICAR. LAMMPS: temp
Potential energyAtoms move from the starting arrangement to the one the temperature favors.VASP: F= in OSZICAR, the free energy of the electrons and ions. LAMMPS: pe
PressureIt follows the structure and the temperature. In a fixed cell its average depends on the cell you started with.VASP: OUTCAR. LAMMPS: press
Volume (cell free to change, NpT)The cell grows or shrinks to the size that holds the target pressure at this temperature.LAMMPS: vol
Local structureDefects, surfaces, liquids and interfaces rearrange; this can be slower than everything above.The trajectory: XDATCAR (VASP), a dump file (LAMMPS)

Three things set how fast they settle:

  • How far the start is from equilibrium. The wiki: "If the starting structure is strongly strained, the early part of the trajectory will mainly remove these artifacts". A fixed-cell run (NVT or NVE) "cannot repair an incorrect cell volume or density" at all; the NVT page adds that the average pressure "will therefore depend on the initial lattice".
  • The thermostat and barostat settings. In LAMMPS, a Nosé-Hoover thermostat whose damping time is too large means "the temperature will take a very long time to equilibrate"; the manual's good choice for many models is about 100 time steps, and about 1000 for a barostat. In VASP's Langevin dynamics, the wiki warns that if LANGEVIN_GAMMA or LANGEVIN_GAMMA_L is too small, "temperature or pressure equilibration may be very slow", and too large a value overdamps the dynamics.
  • What else the run is doing. A temperature ramp (in VASP TEEND different from TEBEG; in LAMMPS a fix nvt whose start and stop temperatures differ) moves the target for the whole run, so there is nothing to settle to. Take averages from a stretch held at one temperature.

How do I check whether my run is equilibrated?

Plot each quantity against time. Equilibrium is a judgment you make by eye first, from the whole run. In VASP, the MD lines of OSZICAR give the step, the temperature and the energies:

Terminal
grep "T=" OSZICAR | awk '{print $1, $3, $7}' > md.dat

Each line of md.dat then holds the step, T and F, ready for any plotting tool. (The columns follow the wiki's example line, 29 T= 339. E= ... F= ....) In LAMMPS, print the quantities you need in the thermo output, often enough to see the trend:

Example
thermo_style  custom step temp pe etotal press vol
thermo        100

Look for where the drift ends. Before that point the curve leans one way; after it, it wanders up and down about a level. Zoom out as well as in: a drift that is small step to step can still be large over the run.

Compare two halves. Take the stretch you believe is equilibrated, split it in two, and compare the average of each half. If they agree within the fluctuations, the stretch is steady; if the second half is clearly higher or lower, the run is still drifting. This is a common check from practice; the VASP and LAMMPS docs do not describe it.

Check every quantity you will report. The wiki lists temperature, pressure, volume and local structure. A steady temperature with a volume still shrinking is not equilibrated for anything that depends on the volume.

How much of the run should I throw away?

Everything before the point where the last quantity you care about stopped drifting. There is no fixed fraction: it depends on the system, the start and the thermostat. Three habits help:

  • Discard generously. Throwing away a little production costs some statistics; keeping a little equilibration biases every average. This is a judgment from practice, not from the docs.
  • Run equilibration as its own job. Then production starts clean. In VASP, copy CONTCAR to POSCAR and continue with the same settings; the wiki notes that an MD CONTCAR also holds the velocities, which "allows the trajectory to continue smoothly instead of starting with newly randomized velocities". VASP's own averages, such as the pair-correlation function in PCDAT, are taken over blocks of KBLOCK × NBLOCK steps counted from the start of the job; in a separate production job, no block can include the equilibration.
  • In LAMMPS, start averaging after equilibration. Run the equilibration with one run command, then define the averaging fixes and run again. A fix ave/time with ave running "begins when the fix is defined", and fix ave/correlate has a start keyword which, the manual says, "can avoid adding non-equilibrated data". The manual's viscosity example has this shape:
Example
# equilibration
fix          NVT all nvt temp 300.0 300.0 $(100.0*dt)
run          50000
# production: averages start here
reset_timestep 0
fix          AVE all ave/time 10 100 1000 c_thermo_temp c_thermo_press file averages.dat
run          200000

reset_timestep 0 only renumbers the steps so production starts at 0; c_thermo_temp and c_thermo_press are the temperature and pressure computes that thermo output defines for you. The step counts here are examples.

How do block averages tell me the error bar?

Successive MD steps are not independent: the atoms at one step are almost where they were at the last. So the plain standard error of thousands of steps is far too small.

Block averaging is a widely used answer, though the VASP and LAMMPS docs do not describe the method itself. Cut the production run into equal blocks, average each block, and treat the block averages as your samples: their spread gives the uncertainty of the overall average. The blocks must be long compared with the time it takes the system to forget its state. The docs do not say how long is long enough; one approach is to make the blocks longer and longer until the estimated error stops growing.

LAMMPS does the averaging part for you: fix ave/time Nevery Nrepeat Nfreq averages Nrepeat values taken every Nevery steps and produces one average every Nfreq steps, from the steps immediately before it. With Nevery × Nrepeat = Nfreq, as in 10 100 1000 above, each output line is the average of one non-overlapping block of 1000 steps. In VASP, take blocks from your md.dat file in your own analysis.

What does autocorrelation add?

The autocorrelation function of a quantity measures how much its value now still resembles its value a time t later. It starts at 1 and decays toward 0; the time it takes to decay is the correlation time. The longer the correlation time, the fewer independent samples a run of a given length holds, which tells you how long a run must be for a given error bar. The docs do not give the exact relation, so before you quote an error bar from it, compare it with the block-averaging estimate above.

LAMMPS computes time correlations with fix ave/correlate, which correlates global values (such as the pressure-tensor components in the manual's Green-Kubo viscosity example) at a range of time separations. The same function is what you integrate for transport properties, so its decay also tells you whether your run is long enough for them.

What goes wrong when judging equilibration?

MistakeWhat you would seeWhat to do
Averaging from step 0An average pulled toward the starting state, which changes when you discard more.Discard the equilibration first; check the average no longer moves when you discard a little more.
Judging only the temperatureA steady temperature while the volume, pressure or structure is still changing.Check every quantity you will report.
Trusting a short runA curve that looks flat over a few picoseconds, and drifts over a longer window.Run longer; compare halves of a longer stretch.
Expecting a temperature ramp to equilibrateThe temperature follows the moving target and never levels off.Average only over a stretch held at one temperature.
Equilibrating at the wrong volumeAn NVT run that settles to a large, steady pressure.Equilibrate the cell first, with an NpT run or a volume relaxation, as the wiki's NVT page suggests.
A cell that keeps deforming in NpTThe box tilts or flattens and never settles, most often for liquids.The wiki warns NpT "can lead to irreversible cell deformations for liquids" unless the lattice is constrained (ICONST in VASP).
Restarting without velocitiesA second equilibration at the start of every continuation.Continue from CONTCAR (VASP), which holds the velocities after an MD run, or from a LAMMPS restart file, which holds the atoms' state.
Error bars from every step as if independentUncertainties far smaller than the run-to-run spread.Use block averages, or the correlation time.

Going further: equilibrium, ensembles and long timescales

Equilibrate in one ensemble, measure in another. NVE dynamics has no control over temperature or pressure; the wiki's NVE page says their averages depend on the starting structure and velocities, so "it is often desirable to equilibrate the system before sampling from the NVE ensemble", for example with an NVT or NpT run first. The wiki recommends NVE when the target is a dynamical observable, such as a phonon spectrum, because no thermostat modifies the velocities.

Some processes are too slow to equilibrate. Diffusion in a solid, a phase change, a slow rearrangement at an interface: a run can be steady in temperature and energy for its whole length and still not have sampled them. Steady numbers mean the run is not drifting on the timescale you watched, not that every process has had time to happen. Independent runs started from different random velocities (RANDOM_SEED in VASP, the seed of LAMMPS's velocity command) give a check that does not rely on any one trajectory; this is practice, not something the docs describe.

In Analyze → Graphs, the equilibration test tells you "equilibrated from step N" or "not equilibrated yet" and shades the stretch before it on every chart, and Monitor's glance shows the same verdict while the job runs. If you know better, mark a step on a chart as the start yourself, and the part before it is left out of the averages.

Updated
11 November 2026
Applies to
VASP 5.4 and 6.x; LAMMPS stable release 30 Sep 2026
Source check
Checked against the docs, 11 November 2026

Where can I read more?

The official pages for each file, setting and command on this page:

What was this page checked against?

Checked against the VASP wiki and LAMMPS stable release 30 Sep 2026, 11 November 2026. Every statement about VASP was read against these pages (with the date each was last edited): Molecular-dynamics calculations (6 August 2026), Ensemble properties (26 June 2026), NVE ensemble (24 October 2025), NVT ensemble (24 October 2025), NpT ensemble (24 April 2023), OSZICAR (7 March 2025), CONTCAR (18 October 2024), NBLOCK (24 October 2025) and TEEND (20 March 2025). Every statement about LAMMPS was read against the manual for the stable release (git info 30Sep2026): thermo_style, fix nh, fix ave/time, fix ave/correlate, reset_timestep, read_restart and Calculate viscosity. Every link on this page was opened.

The docs do not cover comparing the averages of two halves, discarding generously, the block-averaging method and its plateau test, how the correlation time relates to independent samples, or independent runs as a check. The page says so where each comes up, words them cautiously, and they are with an expert reviewer.