Error · LAMMPS · 5 min read
ERROR on proc P: Non-numeric atom coords - simulation unstable
ERROR on proc 0: Non-numeric atom coords - simulation unstable
For more information see https://docs.lammps.org/err0006 (src/domain.cpp:783)The processor number is an example. The wording is the one the LAMMPS source code writes in the stable release of 30 Sep 2026; the second line points to the manual's own page on this error, and the file and line at its end change between versions. The stable release of 29 Aug 2024 prints the same first line, followed by a Last command: line instead of the pointer to the manual.
A related message, ERROR: Non-numeric pressure - simulation unstable, comes from the fixes that control pressure (fix npt, fix nph and fix box/relax) and points to the same page of the manual, whose heading also names box dimensions.
If the processor is not 0, LAMMPS writes the message only to its screen output, not to log.lammps (the source code gives the other processors no log file). In a batch job, the screen output goes to the job's output file, slurm-<jobid>.out unless the script names another.
Checked against the docs · LAMMPS stable release 30 Sep 2026, Update 1 and SLURM 26.05 · Last checked 12 November 2026 · Spot a mistake? Tell us
Short answer
An atom's position became NaN or infinite, usually because forces overflowed at a close contact or a bad geometry. If it happens on the first step, look for overlapping atoms; then minimize before the dynamics, ease in with a thermostat before any barostat, and check the potential and its units.
What does this error mean?
At least one atom's coordinates are no longer numbers: they are NaN ("not a number") or Inf (infinite). The manual explains how this happens: some potentials overflow, or divide by zero, at close contacts or in bad geometries, and the forces they return can no longer be represented as numbers. On most machines the program carries on, but there is no way to recover, and the NaN or Inf values propagate.
LAMMPS checks every atom's coordinates each time it rebuilds its neighbor lists, and when some commands change the atoms (the source code says so in its comment on the check), so the error is raised at such a check, not necessarily on the step where the numbers went bad.
What usually causes it?
The manual names overly aggressive simulation settings, or a problem with the system's geometry or the potential:
- Overlapping atoms. If NaN or Inf appears on the first step, this is the most common cause. Atoms sitting almost on top of each other cannot be seen in a picture of the structure, and they can also overlap across a periodic boundary when the box is too small (for example, a box set from the atoms' minimum and maximum positions with no padding).
- Equilibration. The error is more likely while the system is still settling.
- A barostat from the start. It is more likely when a Nose-Hoover (or other) barostat is used directly.
- The wrong
unitsfor the potential, which the manual lists as a frequent cause of many problems; a potential file from a paper or a database may lack theUNITS:tag that lets LAMMPS check it. - Single precision. Single-precision numbers overflow much sooner, which matters with the GPU, KOKKOS or INTEL packages.
What should I try, in order?
- Find when it fails. If it is on the first step, test for overlapping atoms: add
delete_atoms overlap 0.1 all alland see how many atoms it deletes; any at all means close contacts (the manual's own test). Then fix the structure, or keep the deletion if that is acceptable for your system. - Minimize before the dynamics. A
minimizebefore the firstrunremoves the worst forces. The manual adds that a second or even a third minimization after a few equilibration steps of MD can help. - Thermostat first, barostat later. Run with only a thermostat (for example
fix nvt) until the potential energy has stabilized, then switch on pressure control. - Start soft. "Soft-core" potentials, or the repulsive-only
softpair style, are less prone to this and can be used at the beginning of a simulation, depending on their settings. - Check the units against the potential. Make sure the
unitscommand matches what the potential was made for (the manual says most potential files usemetal; ReaxFF files usereal), and convert anypair_coeffparameters taken from a paper or another code with care. - On GPUs or with the KOKKOS or INTEL packages, run in double precision first, and switch to mixed or single precision once the system has relaxed.
For the time step and the other ways dynamics fail, see Lost atoms and Choose a time step.
In Verlet, Monitor shows the latest lines of the job log while the job runs and the whole log under Job log, so the message and the thermo output before it are in one place, and Explain this error in the Inspector shows you the exact text it would send before you send it. A script you edit by hand under Set up → Calculation → Script is written to in.lammps exactly as it stands, so an extra minimize you add stays in; everything on this page works without it.