Basics · LAMMPS · VASP · 5 min read

How does molecular dynamics move atoms?

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

Short answer

At each time step, a molecular dynamics program uses the forces on the atoms to update their velocities and positions by a small step in time, then computes the forces again at the new positions and repeats. LAMMPS's standard recipe updates each velocity in two half steps, one with the old forces and one with the new, around a full step for the positions.

What does "moving the atoms" mean?

Newton's second law says how a force changes motion: the acceleration of an atom is the force on it divided by its mass. If you knew the forces at every instant you could follow the atoms exactly. A computer cannot do that; it can only take steps. So a molecular dynamics program picks a short time step, written Δt, and asks: given where the atoms are now, how fast they are moving and what forces they feel, where will they be a moment later?

The rule that answers that question is the integrator (it integrates the equations of motion forward in time). Both VASP and LAMMPS describe MD in these terms: the VASP wiki says the positions of the ions are updated with a classical equation of motion, NSW steps of length POTIM; the LAMMPS manual says LAMMPS integrates Newton's equations of motion for a collection of interacting particles.

How does one time step work?

LAMMPS's standard integrator is the velocity form of the Störmer-Verlet algorithm, usually called velocity Verlet; it is what run_style verlet (the default) and fix nve use. The manual's description of how one time step runs gives its order. For each atom, with position x, velocity v, mass m and force F:

  1. Half a step for the velocity, with the force from the start of the step: v(t + Δt/2) = v(t) + (Δt / 2m) · F(t)
  2. A whole step for the position, with that half-updated velocity: x(t + Δt) = x(t) + Δt · v(t + Δt/2)
  3. New forces at the new positions: F(t + Δt). This is the expensive part, where the potential (or, in VASP, the electrons) is evaluated.
  4. The other half step for the velocity, with the new force: v(t + Δt) = v(t + Δt/2) + (Δt / 2m) · F(t + Δt)

Then the next step begins with step 1, reusing the force from step 3. Each step therefore needs one force calculation. Because the first half step needs a force, the manual notes that the forces are computed once before the first time step.

Why this recipe and not a simpler one?

The obvious recipe, moving each atom with its current velocity and then updating the velocity with its current force, is the explicit Euler method. The recipe above costs the same single force calculation per step but treats the two halves of the step symmetrically. The LAMMPS and VASP documentation do not compare the two recipes; what they do say is how to test the result in practice: in a run with no thermostat (NVE), the LAMMPS manual says fix nve produces a trajectory consistent with constant energy, and the VASP wiki says to reduce the time step and retest if the total energy drifts strongly in NVE.

How big can the step be?

The step has to be short compared with the fastest motion in the system, the VASP wiki says, small enough to resolve the fastest ionic motion; light atoms such as hydrogen and stiff bonds need smaller steps. In LAMMPS the default depends on the units: 1 fs in real units, 0.001 ps (also 1 fs) in metal units. How to choose it for your system is in How do I choose a time step?

What does it look like in practice?

In LAMMPS, velocity Verlet is what runs unless you choose otherwise:

LAMMPS input
units      metal
timestep   0.001        # 1 fs in metal units
fix        1 all nve    # velocity Verlet, constant energy
run        10000

The thermostatted fixes (fix nvt, fix npt) carry out the same velocity-Verlet half steps and full step, the manual's description of a time step says, with their own changes to the velocities or the box added. In VASP the integrator comes with the thermostat you pick with MDALGO; the wiki says MDALGO selects the thermostat and the integration scheme together.

What do people mix up?

The mix-upWhat is true
"The integrator decides how accurate the forces are."The integrator only moves atoms; the forces come from the potential or the electronic structure. A bad potential gives a smooth but wrong trajectory.
"A smaller step is always better."It is more faithful, but every step costs one force calculation; halving the step doubles the cost of the same simulated time.
"Constant energy means nothing is happening."In NVE the total energy is held while kinetic and potential energy trade back and forth every step.

Which value should I use?