Code

LAMMPS

The general-purpose classical molecular dynamics code.

openmaterials.ai / codes / LAMMPS

LAMMPS: parallel classical molecular dynamics for short-range forces

A classical molecular dynamics code for short-range forces. Its reference paper, Plimpton 1995, sets out atom, force and spatial decompositions tested up to 10^8 atoms.

What it is and how it works

Spatial decomposition

Each processor owns a region of the box and its atoms, swaps boundary atoms with six neighbours and hands atoms over as they cross. Cost scales as N/P, with 90 percent parallel efficiency on big systems (Plimpton 1995).

Three decompositions

Atom decomposition is simplest and load balances itself. Force decomposition scales as N over the square root of P. Spatial decomposition reaches N/P (Plimpton 1995).

Neighbor lists and bins

Verlet lists hold neighbors within rc plus a skin and are reused for several steps. Binning in cells of side rc limits the search to 27 bins (Plimpton 1995).

Potentials in the application papers

Henry 2008 and Wei 2011 ran AIREBO for polyethylene and carbon. Mortazavi 2021 ran trained moment tensor potentials for MoSi2N4 sheets.

Equilibrium and nonequilibrium transport

Henry 2008 integrates the heat flux autocorrelation of a 10 ns NVE run. Wei 2011 swaps hot and cold atom velocities every 25 fs and fits the gradient.

Message passing on any parallel machine

The algorithms need only distributed memory and message passing. Plimpton 1995 ran them on the nCUBE 2, Intel iPSC/860 and Paragon and Cray T3D.

What people do with it

Single polyethylene chains

LAMMPS runs use a 0.25 fs step for 10 ns. Green-Kubo integrals diverge for domains longer than 40 unit cells. Modal analysis shows that chains longer than 40 nm can exceed 100 W/m/K. Henry 2008

Graphene and nanoribbons under strain

Reverse nonequilibrium dynamics with AIREBO give 77.3 W/m/K for 10-ZGNR and 74.7 W/m/K for 19-AGNR. A square sheet drops from 102.07 to 54.45 W/m/K under 0.10 tensile strain. Wei 2011

Piezoelectric MoSi2N4 monolayers

LAMMPS relaxes strained 80 by 80 Angstrom sheets with moment tensor potentials. A charge-dipole model gives a piezoelectric coefficient of 2.293 nC/m for MoSi2N4 and 0.890 nC/m for MoSi2P4. Mortazavi 2021

How it is used

  1. Build the structure

    Minimum-energy positions, or strained and twisted cells relaxed by conjugate gradient.

  2. Choose the potential

    AIREBO for carbon and polyethylene, trained moment tensor potentials for MoSi2N4.

  3. Equilibrate

    Nose-Hoover at 300 K for 200 ps, or 100 ps before a microcanonical run.

  4. Measure

    Record the heat flux at equilibrium, or swap hot and cold velocities and bin temperatures.

  5. Post-process

    Integrate the flux autocorrelation, or divide the flux by the fitted gradient, for kappa.

What LAMMPS is, how it works and what it is used for, from the papers listed as sources. Every number links to its paper.Poster pageDownload the poster (PNG, 1920 x 1080)

What LAMMPS is

LAMMPS is a classical molecular dynamics code for solids, liquids, polymers and soft matter. It ships a large library of interatomic potentials and runs in parallel on CPUs and GPUs. For thermal transport it provides the heat flux, Green-Kubo and nonequilibrium methods. On the map it serves trajectories, correlation functions and the transport quantities built from them.

In more detail

Algorithms

Classical molecular dynamics integrates Newton's equations for N point masses. For short-range models the forces come from pairs and triplets within a cutoff rc, so the work per step scales as N (Plimpton 1995). The code finds neighbors with Verlet lists built inside an extended radius rs = rc + delta and reused for several steps, or by binning atoms into cells of side rc and checking 27 bins. The fastest serial codes combine both and count each pair once through Newton's third law. Plimpton's three parallel algorithms assign each processor a fixed set of atoms, a fixed block of the force matrix, or a fixed spatial region, and the spatial algorithm scales optimally for large systems.

Numerics and scale

The benchmark is a Lennard-Jones liquid at reduced density 0.8442 and temperature 0.72 with cutoff 2.5 sigma, 55 neighbors per atom, neighbor lists rebuilt every 20 steps and a leapfrog step of 0.00462 reduced units (Plimpton 1995). Systems from 500 to 100,000,000 atoms ran on the nCUBE 2, Intel iPSC/860 and Paragon and Cray T3D. The 100 million atom case nearly filled the 30 GB of a 1904-processor Paragon and ran at 6.97 Gflops. On 1840 dual-processor Paragon nodes the assembler-optimized spatial code was 415 times faster than one Cray Y-MP processor and 165 times faster than one C90 processor. The largest runs on the nCUBE 2, Paragon and T3D were about 90 percent parallel efficient.

Runs in the application papers

Henry 2008 runs single polyethylene chains with AIREBO under periodic boundaries, with a 0.25 fs step for 10 ns in the microcanonical ensemble after 100 ps of equilibration. The conductivity is the Green-Kubo integral of the heat flux autocorrelation along the backbone, with the volume set by an 18 square Angstrom cross section. Wei 2011 holds ribbons at 300 K with a Nose-Hoover thermostat for 200 ps, then exchanges the velocities of the hottest and coldest atoms every 25 fs under NVE with a 0.5 fs step. Mortazavi 2021 relaxes strained 80 by 80 Angstrom sheets under NVT with moment tensor potentials.

Validation

The application papers carry their own checks. Wei 2011 reproduces the conductivity of a 49.26 nm (10,10) carbon nanotube at 302.29 W/m/K against 301.47 W/m/K from an earlier study under the same conditions. In Henry 2008 the fitted modal limit of a polyethylene chain approaches 350 W/m/K and agrees with the convergent Green-Kubo runs. It exceeds the 55 W/m/K inferred from an earlier nonequilibrium study whose boundary scattering would have hidden nonattenuating modes. Plimpton 1995 compares its parallel timings to the fastest reported vectorized Cray Y-MP and C90 code on the same benchmark.

What it computes on the map

12 quantities, drawn by tier with the data flow between them. Dashed boxes are intermediate quantities. Select one for its formula and the other codes that compute it.

Open the full mapShare this submap
Embed this submap
<iframe src="https://openmaterials.ai/m/c56731602651/c000000001fc000092?embed=1" title="LAMMPS on the OpenMaterials map" width="100%" height="480" loading="lazy" style="border:1px solid #EBEBEB;border-radius:6px"></iframe>

Each quantity with the interface the representation records.

Releases on record

Versions on record for this code, with the license read from the release itself.

VersionReleasedLicense
2025.7.22.5.02026-08-08GPL-2.0-only
2025.7.22.4.02026-04-16GPL-2.0-only

References

The code

The papers that describe the code; cite them when you use it.

  1. S. Plimpton, Fast Parallel Algorithms for Short-Range Molecular Dynamics, Journal of Computational Physics, 1995. doi.org/10.1006/jcph.1995.1039
  2. A. P. Thompson, H. M. Aktulga, R. Berger et al., LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales, Computer Physics Communications, 2022. doi.org/10.1016/j.cpc.2021.108171

Applications

Highly cited studies that cite the code, with a few picked by hand.

  1. A. Henry, G. Chen, High Thermal Conductivity of Single Polyethylene Chains Using Molecular Dynamics Simulations, Physical Review Letters, 2008. doi.org/10.1103/PhysRevLett.101.235502
  2. N. Wei, L. Xu, H. Q. Wang et al., Strain engineering of thermal conductivity in graphene sheets and nanoribbons: a demonstration of magic flexibility, Nanotechnology, 2011. doi.org/10.1088/0957-4484/22/10/105705
  3. V. Singh, T. L. Bougher, A. Weathers et al., High thermal conductivity of chain-oriented amorphous polythiophene, Nature Nanotechnology, 2014. doi.org/10.1038/nnano.2014.44
  4. B. Mortazavi, B. Javvaji, F. Shojaei et al., Exceptional piezoelectricity, high thermal conductivity and stiffness and promising photocatalysis in two-dimensional MoSi2N4 family confirmed by first-principles, Nano Energy, 2021. doi.org/10.1016/j.nanoen.2020.105716

How to cite

A. P. Thompson, H. M. Aktulga, R. Berger, et al., LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales, Comput. Phys. Commun. 271, 108171 (2022)

doi.org/10.1016/j.cpc.2021.108171