Basics · LAMMPS · 5 min read
What is LAMMPS?
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
LAMMPS is a free, open-source classical molecular dynamics program: it moves particles (usually atoms) step by step under forces given by an interatomic potential, a formula for how they push and pull on each other. Because it does not solve for the electrons, it can follow far more atoms for far longer than a code such as VASP, which works out the electrons at every step.
What does LAMMPS do?
The LAMMPS manual calls it a classical molecular dynamics code that models collections of particles in a liquid, solid or gas. In the most general sense, it integrates Newton's equations of motion for a collection of interacting particles: it works out the force on every particle, moves each one a short time forward, and repeats.
Classical is the key word. The forces come from an interatomic potential (also called a force field): a formula, with parameters fitted beforehand, that gives the energy and forces from the positions of the atoms. LAMMPS does not solve for the electrons, which is what makes it fast enough for large systems: the manual describes systems from a few particles up to billions.
The particles need not be atoms. The manual lists atomic, polymeric, biological, solid-state (metals, ceramics, oxides), granular, coarse-grained and macroscopic systems, in 2d or 3d.
How does it run so large?
- Neighbor lists. Most of LAMMPS's interactions are short-ranged, so each atom only feels atoms within a cutoff distance. LAMMPS keeps a list of each atom's nearby atoms and only computes forces between them.
- Spatial decomposition. On a parallel computer, the simulation box is split into regions of equal cost, one per processor. Each processor moves the atoms in its region and shares the atoms near its edges ("ghost" atoms) with its neighbors. This is why LAMMPS is designed for clusters and supercomputers, though it also runs on a laptop.
- Accelerators. Parts of LAMMPS can also use OpenMP threads and GPUs.
LAMMPS is written in C++, is free and open source under the GNU General Public License version 2, and can also be driven from Python or other languages through its library interface.
What does it look like in practice?
You write an input script, a text file of commands, and run it:
mpirun -np 4 lmp -in in.meltLAMMPS reads the script one line at a time and acts on each command as it comes, rather than reading the whole file first. The commands fall into three groups: global settings (units, timestep, thermo), the styles used during a run (pair_style, fix, dump), and commands that do something now (read_data, run, minimize).
| File | What it is |
|---|---|
The input script (in.*) | The commands, in order. |
| A data file | The atoms, their types, the box, and bonds if there are any, read with read_data. |
| A potential file | The parameters of many interatomic potentials, named in pair_coeff. |
log.lammps | Everything LAMMPS prints: the setup, the memory it needs, the thermo lines (temperature, energy, pressure every N steps), and at the end the timing summary that begins Loop time of. |
| Dump files | Snapshots of the atoms (positions, and anything else you ask for) every N steps: the trajectory. |
| Restart files | A binary snapshot to continue a run from. |
The units are your choice, with the units command, and they change the meaning of every number. In metal units, for example, time is in picoseconds and the default time step is 0.001 ps (1 fs); in real units the default is 1.0 fs.
What do people mix up?
| The mix-up | What is true |
|---|---|
| "LAMMPS calculates the chemistry from scratch." | It computes forces from the potential you give it. The physics of the run is only as good as that potential for your system. |
| "LAMMPS and VASP are interchangeable." | VASP gets the forces from the electrons at every step, which the VASP wiki says is often too expensive for long runs; LAMMPS gets them from a potential, so it reaches far larger systems and longer times, and the result rests on the potential. |
| "The order of the script does not matter." | Often it does not, but each command takes effect when it is read: a timestep placed between two run commands changes only the second run. |
| "0.001 is a small time step." | Only in some units: it is 1 fs in metal units, but would be a different time in others. Always read a number together with the units line. |
Which value should I use?
- Which potential: How do I choose an interatomic potential?
- The time step: How do I choose a time step?
- Getting LAMMPS on your cluster: How do I install or load LAMMPS?
- Long runs and restarts: How do I keep long LAMMPS runs safe?
Verlet writes and explains LAMMPS input scripts and reads their logs and dumps; everything on this page works without it.