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.