Error · LAMMPS · 5 min read

ERROR on proc P: Out of range atoms - cannot compute PPPM

Example
ERROR on proc 0: Out of range atoms - cannot compute PPPM
For more information see https://docs.lammps.org/err0004 (src/KSPACE/pppm.cpp:1921)

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. The same check ends cannot compute PPPMDisp or cannot compute MSM when you use those solvers.

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 moved farther than the long-range Coulomb solver's grid on its processor can reach, almost always because forces were very high (close contacts at the start, or a change of boundaries). Remove close contacts or minimize before the dynamics, then use more conservative settings: a larger neighbor skin, a shorter time step, more frequent neighbor list updates.

What does this error mean?

PPPM is one of LAMMPS's long-range solvers for Coulomb interactions, chosen with kspace_style pppm; PPPMDisp and MSM are others. It puts the atoms' charges on a grid, spreading each charge over several grid points (how many is the order setting of kspace_modify).

When LAMMPS runs on several processors, it cuts the box into subdomains, one per MPI process. Each process holds the part of the grid that covers its subdomain plus some extra room, the size of the neighbor list skin (the margin beyond the force cutoff set with neighbor). If an atom has moved so far that its charge would fall outside that room, LAMMPS cannot put it on the grid, and it stops with this error.

What usually causes it?

The manual names three conditions: atoms that move too fast, a neighbor skin that is too small, or neighbor lists that are not updated often enough. Behind them, it says, is most often a system with very high forces:

  • At the start of a simulation, typically from atoms placed too close together when the system was built.
  • When boundary conditions change.

The manual adds that the error becomes more likely the more MPI processes you use.

What should I try, in order?

The manual is clear that the best choice depends strongly on the system, and that a combination of changes is often needed.

  1. Look for close contacts. If the run stops in its first steps, revisit how the system was built. delete_atoms overlap 0.1 all all deletes one atom of each pair closer than 0.1 distance units, so that no such pair remains (the command is the manual's own example from its troubleshooting advice); keep the deletion if that is acceptable for your system, or fix the structure. The command needs a pair style whose cutoff is at least the overlap distance.
  2. Minimize before the dynamics. A minimize before the first run removes the worst forces; the manual suggests it for this error.
  3. Use more conservative settings, the three the manual lists:
    • a larger neighbor skin (neighbor; the default is 2.0 Å for metal and real units);
    • a shorter time step (timestep; see Choose a time step);
    • more frequent neighbor list updates (neigh_modify; the defaults, delay 0 every 1 check yes, are the manual's conservative choice, so put them back if you raised delay or every).
  4. Start without the long-range solver. The manual's last suggestion: use a pair style that cuts Coulomb off at a distance (for example coul/cut in place of coul/long) and no kspace_style until the system has somewhat equilibrated, then switch to the long-range solver.

If the dynamics are failing more broadly, Lost atoms covers the same causes from another angle.

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; everything on this page works without it.