LAMMPS
New1. Overview
LAMMPS is an open-source classical molecular dynamics code with a focus on materials modelling, distributed under the GNU General Public License 2.0 and developed at Sandia National Laboratories with contributions from a wide contributor base. It began in the mid-1990s as a large-scale parallel code born of a US Department of Energy cooperative research agreement, and the current C++ version has been open source since 2004. The name expands to Large-scale Atomic/Molecular Massively Parallel Simulator.
What distinguishes LAMMPS is not any single capability but the breadth of the model space it opens. It provides potentials for solid-state materials such as metals and semiconductors, for soft matter including biomolecules and polymers, and for coarse-grained or mesoscopic systems; it runs as a parallel particle simulator at the atomic, meso or continuum scale; and it is designed so that a user can add a new potential without touching the engine core. That extensibility is why LAMMPS became the default platform for custom potential work, and why a substantial share of the machine-learned potential ecosystem was first built against it.
For physics AI this guide matters at a specific junction. LAMMPS now hosts several distinct machine-learning potential paths - the unified ML-IAP interface with its mliap model styles, the ML-RUNNER package for RuNNer neural-network potentials, the MBX package for many-body data-driven potentials, the ML-PACE and ML-SNAP packages, and the QMMM-XTB package for QM/MM coupling - while also serving as the production engine into which externally trained models are deployed. Understanding which path suits a given problem is the practical decision this guide supports.
After reading you should be able to answer: how LAMMPS differs from a domain-specialised biomolecular engine, what the ML-IAP model/descriptor separation buys you, and where the performance ceiling sits on modern hardware. The physics simulation primer covers the underlying physics, and the physics-foundation-models collection surveys the learned-potential landscape that LAMMPS plugs into. All version and capability statements were checked against the project documentation, release notes and package manuals on 11 November 2026, and Section 9 labels which claims are the project's own description.
2. How It Works
LAMMPS integrates Newton's equations with a spatial-decomposition parallel model: the simulation box is divided into subdomains, one per MPI rank, and neighbouring atoms are exchanged through ghost layers so that each rank can evaluate forces on its own atoms without a global data exchange. Several pair styles provide optimised variants of this scheme - half and full neighbour lists with different rebuild criteria, and multi-partition variants such as the Verlet and multiple-partition approaches - and the choice affects both accuracy and cost, so it is a parameter to set deliberately rather than by default.
The engine is organised as a set of interchangeable styles: pair styles define the interaction, fix styles impose constraints or drive the dynamics, compute styles evaluate quantities on the fly, and dumps write output. A simulation input script is a sequence of commands assembling these pieces, which is what makes LAMMPS scriptable in a way that general-purpose codes are not, and also what makes its learning curve steep. New functionality is usually added as a new style rather than by modifying existing code, and the PLUGIN package allows styles to be loaded at runtime without recompiling.
Performance portability is handled by the KOKKOS package, which provides a single source implementation compiled for CPU, CUDA, HIP and SYCL back ends. The 2025 release extended this with mixed and single precision support, and the 2026 release more than doubled the number of Kokkos styles while adding around a hundred new styles to the OPENMP package. A second GPU path exists in the GPU package, which places pair calculations on the GPU while leaving the rest of the computation on the host; the documented guidance is that the Kokkos package is generally faster once each GPU carries enough atoms, and that mixing unported styles into a Kokkos run forces data copies back to the host with a visible penalty.
Long-range interactions are handled by solvers such as PPPM and the newly added FFT-based ESP solver, with FFT-library support expanded in 2024 to include heFFTe and vendor FFTs. Beyond atomistic simulation, LAMMPS carries packages for coarse-grained and mesoscopic models, continuum and peridynamics methods, and user-defined coupling to external codes.
3. Scope and Assumptions
LAMMPS assumes you can express your system as particles with types, and that the physics you need can be written as a pair style, a fix or an external callback. That assumption is the source of both its strength and its cost: nearly anything is possible, but nothing is provided ready-made for a specific application the way a domain-specialised tool provides a complete workflow.
The main scoping decision is the level of theory. LAMMPS is a classical engine. It implements EAM, MEAM, Tersoff, Stillinger-Weber, ReaxFF and many other potentials directly, but it does not perform electronic-structure calculations; density functional theory codes such as VASP or Quantum ESPRESSO occupy a different layer, and DFT-in-MD with machine-learned potentials is the standard way to reach quantum accuracy at molecular dynamics throughput.
The extensibility assumption has practical requirements. A custom pair style means writing and compiling C++ against the LAMMPS API, which is documented in the Programmer's Guide but carries a real learning cost. The Python interface (fix python, pair python) lowers the barrier for prototyping and for driving simulations from a script, at the cost of Python-level performance in the inner loop.
The build system has tightened. From the 30 September 2026 stable release, LAMMPS requires a C++17-compatible compiler and CMake 3.20 or later, and the Kokkos package requires C++20. The traditional GNU make build is now limited to packages that need no extra steps in the lib folder, and LAMMPS-GUI has moved to its own repository. Packages such as LEPTON and MACHDYN no longer support the traditional make build.
Accuracy assumptions are worth stating. The Kokkos package can be built in double, mixed or single precision, and the documentation is explicit that reduced precision requires careful verification that the simulation is stable and that energy is sufficiently conserved, and that lower precision works best for homogeneous bulk systems where error cancellation is favourable. Reduced precision in a heterogeneous system with interfaces, defects or strong gradients is a different proposition entirely.
The licensing assumption is simple but consequential: GPL 2.0. For research and internal use this is unproblematic, and for commercial distribution it requires attention to how the code is incorporated, in contrast with permissively licensed alternatives.
4. Getting Started
Start from the curated tutorial series published in the Living Journal of Computational Molecular Science, which runs from beginner to advanced lessons, and from the examples shipped with the distribution. A first simulation should be small and diagnostic: a Lennard-Jones or EAM system of a few thousand atoms, a short run, and a check that the energy is conserved and the temperature fluctuates around the target. The error-reporting system was overhauled in the 2025 release, and messages now point at the offending input line and link to the relevant manual page, which makes the first failures considerably easier to diagnose.
Second, decide the accelerator path before writing physics. If you are on NVIDIA hardware, choose between the GPU package and the Kokkos package deliberately: the GPU package moves pair calculations only, while Kokkos ports the compute-heavy styles including neighbour list construction and bonded terms. Building with the preset files under cmake/presets/ covers most common package combinations, and re-running CMake in the same build directory preserves prior settings.
Third, if the target is a learned potential, choose the package by how the model is structured. If the model is a descriptor-based linear or quadratic model, use ML-IAP or ML-SNAP; if it is an equivariant message-passing network, ML-PACE or the ML-RUNNER package are the relevant paths; if the potential is many-body and data-driven, the MBX package is the newer option. The ML-IAP interface separates model from descriptor, so a given descriptor can be paired with several model forms, and the unified keyword allows a Python model to combine both roles.
Fourth, establish the verification discipline before scaling. Compare against a reference implementation or a published benchmark on the same system, verify energy conservation over the run, and check that results do not change materially when the timestep or the neighbour list skin is reduced. For machine-learned potentials, additionally check the prediction against held-out reference configurations, since the classical engine's correctness does not transfer to the model's correctness.
For multi-node work, plan the I/O explicitly. The experience from billion-atom runs shows that output writing, not computation, is what breaks at the largest scales, and that model initialisation across thousands of ranks is a measurable fraction of total runtime.
5. Comparison with Alternatives
The primary comparison is with GROMACS, and the two occupy different halves of the molecular dynamics space. GROMACS, from Groningen University, concentrates on biomolecules with the AMBER, CHARMM and GROMOS force fields, a complete preprocessing toolchain and an inner loop optimised for that class of system; LAMMPS, from Sandia, spans materials and soft matter, supports EAM and reactive potentials, custom user-defined potentials and multi-scale coupling, and takes a script as its input. The practical division is that biomolecular systems and free-energy work sit in GROMACS' territory while metals, ceramics, reactive chemistry and custom potentials sit in LAMMPS'.
Against machine-learned potential engines, LAMMPS' position is as the deployment substrate. Frameworks such as DeePMD-kit, NequIP, Allegro, MACE and SevenNet own the training workflow, the architecture and often the architecture-specific optimisations, and most of them now expose LAMMPS pair styles or plugin interfaces so their trained models can run in production. LAMMPS provides the integrator, the neighbour list, the parallel decomposition and the accelerator portability, and consumes the model rather than training it. The distinction is worth keeping sharp: the model quality question belongs to the training framework, the simulation correctness question belongs to LAMMPS.
Against other simulation frameworks in physics AI, JAX-Fluids and JAX-CFD take the differentiable route, rewriting the solver so gradients can flow through it, whereas LAMMPS is a classical engine into which a differentiable surrogate or a learned potential is inserted. Taichi offers a programmable-simulation abstraction oriented at MPM and differentiable kernels, and NVIDIA Warp provides a kernel-authoring layer for accelerated simulation. These are different bets: extensibility and production maturity here, versus automatic differentiability or programmable kernels there.
A fourth comparison is with commercial simulation suites. Package with a full GUI and integrated workflow analysis can be more convenient for a mixed team, but the open-source route gives source access, modification rights and no licence cost, which for a research or engineering organisation running many long simulations is usually the decisive factor.
6. Benchmarks and Evidence
LAMMPS has unusually strong public benchmark evidence, because it has been used for flagship exascale runs. The best-documented figure is the Summit billion-atom carbon study: a 20-billion-atom simulation using the machine-learned SNAP potential on the full Summit machine with 27,900 GPUs, reaching a peak computing rate of 50.0 PFLOPS, which is 24.9 percent of theoretical peak, with strong-scaling parallel efficiency better than 97 percent and a peak rate of 6.21 million atom-steps per node per second. The 24-hour, 4,650-node production run sampled one nanosecond of physical time and observed the high-pressure BC8 phase of carbon at 12 Mbar and 5,000 K - a physical finding, not merely a throughput number. The reported comparison states this peak is 22.9 times the previous record for quantum-accurate MD.
A 2025 systematics paper evaluated LAMMPS-Kokkos across three exascale systems and several generations of NVIDIA GPUs, using Lennard-Jones, SNAP and ReaxFF benchmarks and covering NVIDIA V100, A100 and H100 alongside AMD MI250X and MI300A and Intel hardware. Its finding is that overall relative performance is dominated by single-GPU performance, with network effects secondary - a result that redirects hardware planning towards per-GPU efficiency rather than interconnect bandwidth. The same work documents the practical trap that mixing unported fix or compute styles into a Kokkos run forces data copies back to the host and incurs a visible penalty.
The counterweight is that I/O, not arithmetic, becomes the binding constraint at the largest scales. A Sierra evaluation of LAMMPS/Kokkos/HIPPYNN scaling to roughly 8,192 GPUs and a one-billion-atom system reports excellent weak scaling with peak throughput above 10^10 atom-steps per second and near-unit parallel efficiency up to about 1,000 GPUs. The same study reports that writing a single trajectory frame of about 40 GB took four minutes, with write time scaling linearly with system size rather than remaining flat, which caused the 2,048-node run to fail during the output phase. It also notes that instantiating the learned-potential network across thousands of ranks took long enough to require the first 750 steps to be excluded from the reported timing.
The pattern across these studies is consistent and is the useful takeaway: LAMMPS' compute scaling is excellent and well characterised, while output volume and initialisation cost are the practical ceilings.
7. Role in Physics-AI Workflows
LAMMPS plays three roles in physics-AI work, and they are worth separating because they carry different obligations.
The first is as the deployment engine for learned potentials. A model trained with DeePMD-kit, NequIP, MACE, Allegro or SevenNet runs inside LAMMPS through a dedicated pair style or plugin, and this is the step where a training-fidelity claim becomes a simulation result. The obligation that falls on LAMMPS is simulation correctness: neighbour lists, integration, conservation and parallel decomposition. The obligation on the training framework is model fidelity: accuracy on held-out configurations and behaviour under extrapolation.
The second is as a data generator. Learning a potential requires reference configurations spanning the relevant space, and a classical engine's flexibility makes it a convenient generator for ab initio data, for exploration of phase space, and for the baseline runs against which a learned model is judged.
The third is as a coupled component. LAMMPS carries packages for external code coupling and for QM/MM through libxtb, so a workflow can combine a classical engine with an electronic-structure method or with another simulator, and the PLUMED package brings enhanced sampling into the same script. This matters in physics AI because many practical deliverables are hybrid: a learned potential for one region, a classical treatment for another, and sampling machinery on top.
The cost of the standard workflow deserves stating too. A production LAMMPS run with a learned potential is a substantial engineering effort - build configuration, parallel decomposition, output management, validation against reference - which is why the site keeps a dedicated comparison in the classical-solver cost-boundary guide and why Performance Engineering exists as a collection in its own right.
8. Limitations and Failure Modes
The first limitation is the cost of generality. Nothing is provided ready-made, and a custom potential means writing and compiling C++. A team whose problem is a standard biomolecular free-energy calculation will spend more effort in LAMMPS than in GROMACS, and the reverse holds for a novel material potential.
The second is precision. The Kokkos package offers mixed and single precision, and the documentation is explicit that reduced precision must be validated, with homogeneous bulk systems the favourable case. A heterogeneous system with interfaces, defects or thermal gradients can produce trajectories that drift under reduced precision, and such drift is easy to mistake for physics.
The third is the incomplete-port trap. A Kokkos run whose script includes a fix or compute that has not been ported silently falls back to host execution for that part, forcing data copies and producing a performance profile that does not match the benchmarks. The symptom is a slowdown rather than a wrong answer, but it invalidates the measurement.
The fourth class is scale-related and, as Section 6 documents, is dominated by I/O. At billion-atom scale, a single trajectory frame can take minutes to write, write time often scales linearly with system size, and the parallel I/O package does not always deliver the expected speedup. Initialisation of a learned potential across thousands of ranks is a second non-trivial cost. The result is that runs can fail during output rather than during computation, which wastes an allocation that may be scarce.
The fifth is model extrapolation. When a learned potential is applied outside its training domain, the simulation does not crash; it produces trajectories that are confidently wrong. LAMMPS offers no protection against this, and the protection must come from the validation protocol upstream.
Finally, there is a licensing boundary. GPL 2.0 is a meaningful constraint for embedding LAMMPS in a commercial product, and it is a factor to evaluate early rather than late.
9. Version and Source Notes
As of 11 November 2026, the current stable release is the one dated 30 September 2026, tagged stable_30Sep2026, which follows the 22 July 2025 stable release and adds roughly 7,400 commits. Build requirements for that release are a C++17-compatible compiler with CMake 3.20 or later, and C++20 for the Kokkos package; the bundled Kokkos version moved to 5.2, requiring GCC 10.4 or newer and NVCC 12.2 or newer, where the previous release carried 4.6.2 with GCC 8.2 and CUDA 11.0.
Verifiable changes in the 30 September 2026 release include: splitting the GRAPHICS package out into a native visualisation toolkit, with dump image and dump movie moving into it and gaining transparency, depth cueing, outlines and specular highlights; six new packages, FENIX for online process recovery, GRANSURF for granular surfaces from meshes, MBX for many-body data-driven potentials, ML-RUNNER for RuNNer neural-network potentials and QMMM-XTB for QM/MM coupling through libxtb; a new FFT-based long-range solver named ESP; Gibbs-ensemble Monte Carlo via fix gemc; BAOAB and ILVES integrators; superellipsoid granular particles; the oxDNA3 model; more than doubling the number of Kokkos styles and adding around a hundred to the OPENMP package; single and mixed precision support in Kokkos; and hash-table-based neighbour list binning that avoids crashes and excessive memory for very dilute or highly polydisperse systems.
The 2025 release required a C++17 compiler and introduced the APIP adaptive-precision interatomic potential package, the MDR granular contact model, JSON molecule files, hybrid Monte Carlo via fix hmc, bosonic path-integral MD, fix neighbor/swap for hybrid MD/kMC sampling, the extxyz dump style, Grimme-D3 dispersion, and an overhauled error-reporting system. The 2024 release added general triclinic box support, the ML-UF3 and RHEO packages, and expanded FFT-library support. Notable retirements: the ATC, POEMS and AWPMD packages in 2025, and the ML-RANN package with pair_style agni in 2026.
On provenance: the 30 September 2026 release notes record that this is the first stable release where the effect of AI coding agents is visible, with nearly twice as many commits as between the previous two releases, applied predominantly to porting styles to the Kokkos and OPENMP packages, adding tests, fixing long-standing bugs and performing code review. Documentation in that release adds Programmer's Guide pages on writing bond, compute and OPENMP styles and on using AI coding agents. The performance figures quoted in Section 6 come from the Summit SC21 technical paper, the 2025 LAMMPS-Kokkos exascale systematics paper, and the Sierra HIPPYNN timing study. Version-specific caveats worth noting: the 30 September 2026 release corrected platform-dependent results on ARM64 Linux and on platforms enabling fused multiply-add by default, so results may differ in the last digits between the two versions.
10. References
- LAMMPS project website and documentation, lammps.org, overview of potentials, packages and the accelerator packages.
- LAMMPS stable release 30 September 2026 notes, GitHub, build requirements, new packages, the GRAPHICS split and precision support.
- LAMMPS history and release highlights by year, lammps.org/bug.html, from the CRADA origins through the 2026 release.
- LAMMPS Build_extras documentation, KOKKOS package options covering precision, array layout, unified memory and the debug random-number generator.
- LAMMPS ML-IAP documentation, pair_style mliap and compute mliap, model/descriptor separation across sna, so3 and ace descriptors.
- LAMMPS machine learning and interoperability ecosystem page, lammps.org/ecosystem/ml-interop, covering DeePMD-kit, NequIP, Allegro, MACE, SevenNet and CHGNet.
- Nguyen Cong et al., billion-atom molecular dynamics of carbon at extreme conditions, SC21 technical paper, Summit scaling and the 50 PFLOPS result.
- LAMMPS-Kokkos performance-portable molecular dynamics across exascale architectures, arXiv 2508.13523, 2025.
- LAMMPS/Kokkos/HIPPYNN Sierra timings study, billion-atom weak scaling with the parallel I/O bottleneck analysis.
- LAMMPS Programmer's Guide and reference manual, documentation for writing bond, compute and OPENMP styles and for custom pair styles.