Guide · VASP · LAMMPS · 13 min read
What time step should I use for molecular dynamics?
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
Small enough to follow the fastest vibration in your system, which is set by the lightest atom and the stiffest bond. In VASP, the wiki's rule of thumb is POTIM no more than 0.7 fs with hydrogen and 1.5 fs with oxygen, while up to 3 fs may work for heavy elements such as silicon. In LAMMPS, timestep is in the time unit of your units style (picoseconds for metal, femtoseconds for real). Confirm any step with a short constant-energy (NVE) run whose total energy does not drift.
What is the time step?
Molecular dynamics (MD) moves atoms through time. At every step, the code works out the force on each atom, then moves every atom a little along its velocity and updates the velocity from the force. The time step is how much simulated time passes between one force calculation and the next.
The scheme that does this is called an integrator. Both codes use closely related integrators: LAMMPS's fix nve uses velocity Verlet, and VASP uses velocity Verlet or the closely related leap-frog scheme depending on the thermostat you pick with MDALGO (the VASP wiki's Time-propagation algorithms page has the table). All of them assume that the force barely changes during one step. The time step has to be short enough for that to be true.
In VASP the time step is the INCAR tag POTIM, in femtoseconds (fs; 1 fs is 10⁻¹⁵ s). In LAMMPS it is the timestep command, in whatever time unit your units style uses.
Why does the time step matter?
Too long a step breaks the physics. The integrator overshoots: an atom moves so far in one step that it lands somewhere the force has changed a lot, and it picks up energy that came from nowhere. In a run with no thermostat the total energy then drifts. Far enough, atoms fly apart. The LAMMPS manual says it plainly: the time step "needs to be small enough for stable numeric integration of the trajectory".
Too short a step wastes the allocation. The cost of a run is the number of force calculations. Simulated time is steps × time step, so halving the step doubles the cost of the same picoseconds. In ab initio MD (VASP computing the forces from DFT at every step) each step is expensive, which is why people push the step as long as it will safely go.
The code will not catch a bad choice for you. The LAMMPS manual lists "choosing too big a timestep" among the physics mistakes it "cannot figure out". VASP only insists that a step exists: with IBRION = 0 (molecular dynamics) and no POTIM, the wiki says VASP "crashes immediately after having started".
Why do light atoms need a smaller step?
The time step has to resolve the fastest motion in the system. The VASP wiki puts it as "small enough to resolve the fastest ionic motion". How fast an atom moves back and forth depends on two things the LAMMPS manual names: the steepness of the potential (how stiff the bond is) and the atom's mass. A light atom on a stiff bond vibrates fastest.
Hydrogen is the lightest atom there is, and bonds such as O–H and C–H are stiff, so a system with hydrogen has the fastest vibrations you will meet. Stretches such as O–H are among the fastest vibrations in any system, and the step has to cut each cycle into many slices. That is why hydrogen sets the step for the whole cell, the same way the hardest element sets the cutoff energy.
The VASP wiki makes the same point in its general advice: "Systems containing hydrogen bonds or stiff bonds usually require smaller timesteps than heavy, weakly bound systems."
What time step should I start with?
These are starting points to test with the energy check below, never the answer.
In VASP (POTIM, fs). The wiki gives a rule of thumb in its best practices for machine-learned force fields, for the molecular dynamics that produces their training data from DFT: the time step "should not exceed 0.7 fs and 1.5 fs for hydrogen and oxygen-containing compounds, respectively", while "a time step of 3 fs may work well for heavy elements (Si)". Its own example inputs for ordinary MD use POTIM = 1.0.
| Lightest atom in your cell | POTIM | Where it comes from |
|---|---|---|
| Hydrogen | At most 0.7 fs; the wiki's water example warns that below 0.5 fs may be needed | The wiki's best-practices page |
| Oxygen (no hydrogen) | At most 1.5 fs | The wiki's best-practices page |
| Heavy elements only, such as silicon | 3 fs "may work well"; 1 fs is the wiki's example value | The wiki's best-practices and MD pages |
In LAMMPS (timestep, in time units). The manual gives no value per element. It gives a default for each units style, which is what LAMMPS uses if your script has no timestep line:
units style | Time unit | Default timestep |
|---|---|---|
metal | picoseconds (ps) | 0.001 ps, which is 1 fs |
real | femtoseconds (fs) | 1.0 fs |
lj (reduced units) | τ, the Lennard-Jones time unit | 0.005 τ |
electron | femtoseconds | 0.001 fs |
si, cgs | seconds | 1.0e-8 s |
micro | microseconds | 2.0 µs |
nano | nanoseconds | 0.00045 ns |
The default is a place to start, not a safety guarantee. The LAMMPS manual gives no value per element, and neither documentation says whether the VASP wiki's ceilings for hydrogen and oxygen carry over to a classical potential; the selector below borrows them as a first guess, and the energy check below decides.
Choose yours:
| Your code | Lightest atom | Start testing at | Why |
|---|---|---|---|
| VASP | Hydrogen | 0.5 fs (no more than 0.7) | The wiki's rule of thumb caps the step at 0.7 fs with hydrogen, and its water example warns that steps below 0.5 fs may be needed unless hydrogen is made heavier with POMASS. Start at 0.5 and check energy conservation. |
| VASP | Oxygen, no hydrogen | 1 fs (no more than 1.5) | Under the wiki's 1.5 fs ceiling for oxygen-containing compounds, at the value its example inputs use. Lengthen it only if a constant-energy test stays flat. |
| VASP | Heavy only (such as Si) | 1 fs; up to 3 fs may work | The wiki's example value is 1 fs, and it says 3 fs may work well for heavy elements such as silicon. Lengthen the step in a constant-energy test and keep the longest one whose energy does not drift. |
| LAMMPS, units metal | Hydrogen | 0.0005 ps (0.5 fs) | In metal units the step is in picoseconds, so 0.5 fs is 0.0005. The LAMMPS manual gives no value per element, so this borrows the VASP wiki's ceiling for hydrogen as a first guess; the energy check decides. |
| LAMMPS, units metal | Oxygen, no hydrogen | 0.001 ps (1 fs) | The metal default, under the VASP wiki's 1.5 fs ceiling for oxygen. The LAMMPS manual gives no value per element; the energy check decides. |
| LAMMPS, units metal | Heavy only (such as Si) | 0.001 ps (1 fs) | The metal default. The LAMMPS manual gives no value per element, so test any longer step with the energy check first. |
| LAMMPS, units real | Hydrogen | 0.5 fs | In real units the step is in femtoseconds. Half the default, following the VASP wiki's ceiling for hydrogen; constraining bonds with fix shake, which the manual says typically enables a longer step, is one way past it. The LAMMPS manual gives no value per element, so this borrows the VASP wiki's ceiling as a first guess; the energy check decides. |
| LAMMPS, units real | Oxygen, no hydrogen | 1.0 fs | The real default, under the VASP wiki's 1.5 fs ceiling for oxygen. The LAMMPS manual gives no value per element; the energy check decides. |
| LAMMPS, units real | Heavy only (such as Si) | 1.0 fs | The real default. The LAMMPS manual gives no value per element, so test any longer step with the energy check first. |
What it depends on:
- The lightest atom and the stiffest bond. Hydrogen, and stiff bonds in general, need the shortest steps.
- The temperature. Run the energy check at the temperature you will simulate; a test made at a lower temperature may not carry over.
- The start. A strained structure or two atoms placed too close produce huge forces in the first steps; the LAMMPS manual suggests minimizing first, or easing in with a smaller step and switching to "more aggressive settings" once the system has settled.
- What forces the atoms. DFT forces that are not well converged, or a potential used outside what it was made for, can spoil the energy even at a short step.
How do I check my time step is small enough?
Run a short constant-energy test. In a run with no thermostat, the microcanonical or NVE ensemble (constant number of atoms N, volume V and energy E), the total energy must stay constant apart from small fluctuations. Any steady drift is the integrator's error, so it measures the time step directly. The VASP wiki's advice: "begin with NVT and then validate the timestep and force quality in NVE".
In VASP, start from an equilibrated structure (copy CONTCAR to POSCAR, which keeps the velocities) and switch the thermostat off. The wiki's CONTCAR page warns that continuing in a different ensemble needs the file's predictor-corrector block removed, or the run crashes. The wiki's simplest way to NVE is the Andersen thermostat with no collisions:
IBRION = 0 # molecular dynamics
MDALGO = 1 # Andersen thermostat ...
ANDERSEN_PROB = 0.0 # ... with no collisions: NVE
ISIF = 2 # fixed cell
ISYM = 0 # no symmetry in MD
TEBEG = 300 # only used if POSCAR has no velocities
NSW = 1000 # steps
POTIM = 1.0 # the step under test, in fsEach MD step writes one line to OSZICAR with T= (the temperature) and E= (the total energy of the whole system, kinetic energy included). The wiki says to monitor E: in NVE it "should not show a systematic drift". List them with:
grep "T=" OSZICARIn LAMMPS, run the same structure under fix nve and print the total energy:
fix 1 all nve
thermo_style custom step temp pe ke etotal press
thermo 100
timestep 0.001
run 10000etotal is potential plus kinetic energy and should stay flat under fix nve. With units metal or real, thermo output is not divided by the number of atoms (thermo_modify norm defaults to no there), so divide by the atom count before you compare systems of different size.
Compare two steps. Run the test at your step and at half of it. If the drift shrinks a lot, the step was the cause, and the shorter step, or one between them, is safer. If the drift barely changes, the step is not the problem: in VASP, tighten the electronic convergence (the wiki's next move after reducing POTIM); in LAMMPS, look at the potential and the starting structure. How much drift is acceptable depends on what you will measure: neither the VASP wiki nor the LAMMPS manual gives a number, so judge the drift against the size of the effect you are after.
In a thermostatted run, use the right energy. A thermostat adds and removes energy, so etotal is not conserved there. LAMMPS's econserve adds back what the thermostat took, and the manual says it "should remain constant over time" in NVT, NPH and NPT runs. In VASP, E in OSZICAR includes the Nosé thermostat's energy, and the wiki says it should not drift in NVE or in deterministic thermostats such as Nosé-Hoover; with stochastic thermostats (Andersen, Langevin, CSVR) it is not strictly conserved, so look only for unexplained long-term drift.
What goes wrong with the time step?
| Mistake | What you would see | What to do |
|---|---|---|
No POTIM with IBRION = 0 in VASP | VASP stops right after starting; the wiki says it "crashes immediately". | Set POTIM in fs. |
A LAMMPS step in the wrong unit, such as timestep 1 with units metal | That is 1 ps, a thousand times the default: a step far too long, with the symptoms in the row below. | Write the step in your style's unit: 1 fs is 0.001 in metal, 1.0 in real. |
timestep placed before units | units sets the time step to its style's default, so your value is overwritten. | Put units at the very beginning of the script, where the manual says it typically goes, and timestep after it. |
| Too long a step | Total energy that drifts in NVE, a temperature that runs away from the thermostat's target, atoms with unrealistically large displacements, an erratic electronic loop in VASP; "Lost atoms" or NaN values in LAMMPS. | Halve the step and rerun the NVE test. |
| A step that suits heavy atoms in a cell with hydrogen | Hydrogen atoms move too far per step and the energy is not conserved. | Size the step for the lightest atom: at most 0.7 fs in VASP by the wiki's rule. |
Judging conservation from etotal in a thermostatted run | An energy that wanders though nothing is wrong. | Watch econserve in LAMMPS; in VASP, judge E against the thermostat you chose. |
| Changing the step between runs you will compare | Small, unexplained differences between runs that should agree. | Keep one step for a study, as you would one cutoff. |
Going further: how do people use a longer step?
Make hydrogen heavier. VASP reads each species' mass from the POTCAR, and the POMASS tag overrides it (all species, in POTCAR order); VASP then prints "WARNING: mass on POTCAR and INCAR are incompatible." The wiki's water example sets hydrogen's mass to 8 so that it can use POTIM = 1.5. The wiki also warns that this "changes the physical dynamics and should be avoided when mass-dependent observables are the target", such as how fast hydrogen diffuses or vibrates. LAMMPS sets masses with its own mass command or in the data file.
Freeze the fastest bonds. In LAMMPS, fix shake (or fix rattle) holds chosen bonds and angles at fixed lengths, which "typically enables a longer timestep".
Use more than one step. run_style respa is a multi-timescale integrator: the manual's example computes bond forces eight times, angles four times and pair forces twice for every one evaluation of the long-range forces. timestep then sets the outermost, longest step.
Adapt the step to a violent moment. fix dt/reset shortens the step so that no atom moves more than a set distance per step, which the manual suggests for starts with overlapping atoms and for impact simulations that set off a damage cascade. The step then changes during the run, so simulated time is no longer steps × timestep.
Keep the thermostat in step. The thermostat's response time is counted in time steps, so it moves when the step does. In LAMMPS, the manual's good choice for fix nvt's damping is "around 100 timesteps" ($(100.0*dt)), and for a barostat around 1000. In VASP, SMASS = 0 chooses a Nosé mass that corresponds to a period of 40 time steps.
Try it
Try it: find the wrong time step
Each script below was meant to run at the step in its first line, and one line gets it wrong. The first three are LAMMPS input scripts, the last a VASP INCAR. Choose the line you think it is. The answers come from the LAMMPS units and timestep pages and the VASP wiki.
Script 1.
# aim: a 1 fs step
units metal
atom_style atomic
read_data copper.data
timestep 1.0The problem is line 5, timestep 1.0: The timestep value is in the time unit of the units style. For units metal, time is in picoseconds, so timestep 1.0 is 1 ps, a thousand times the step intended. timestep 0.001, which is also the default that units metal sets.
Script 2.
# aim: a 1 fs step
units real
atom_style full
read_data water.data
timestep 0.001The problem is line 5, timestep 0.001: For units real, time is in femtoseconds, so timestep 0.001 is 0.001 fs, a thousandth of the step intended. The run would cover a thousand times less time than planned. timestep 1.0, which is also the default that units real sets.
Script 3.
# aim: a 0.5 fs step
timestep 0.0005
units metal
atom_style atomic
read_data copper.dataThe problem is line 2, timestep 0.0005: The units page: the units command also sets the time step to its style's default, 0.001 ps for metal. Given before units, timestep 0.0005 is replaced by that default, and the run steps at 1 fs. Move timestep 0.0005 below units metal.
Script 4.
# aim: 2 ps of dynamics at a 0.5 fs step
IBRION = 0
POTIM = 0.5
NSW = 2000The problem is line 4, NSW = 2000: With IBRION = 0 VASP runs molecular dynamics: NSW time steps of length POTIM, and POTIM is in fs. 2000 × 0.5 fs is 1 ps, half the time intended. NSW = 4000.
Set up shows POTIM and LAMMPS's timestep as "Time step", each with its explanation and, for LAMMPS, in the unit your units style uses. Before you submit, pre-flight checks your time step and tells you how much simulated time your steps add up to.