Where to start

The examples directoryis the real manual

The reference documentation tells you what each command accepts. The examples tell you which commands go together, which is the harder question.

One directory per idea

melt, micelle, crack, flow. Each is a small, complete script that runs without editing.

They are regression tests

The examples are run against every release, so a script that fails is a build problem, not your problem.

Meant to be copied

Nobody writes an input script from nothing. Starting from the nearest example is the normal workflow.

Five worth reading

Each one teachesa different half of LAMMPS

These cover the range: a molecular liquid, a polymer, a colloid, a crystal defect, and a transport coefficient.

Water, with TIP3PBonds, angles, Lennard-Jones and long-range Coulomb in one script. The template for any molecular liquid.
A polymer chainFENE bonds in reduced units. Teaches radius of gyration and end-to-end distance as observables.
Nanoparticle aggregationLennard-Jones colloids under a Langevin thermostat, clustering over time. Cheap, and visually obvious.
Dislocations in a metalEAM aluminium under applied shear. Where stress-strain curves and mechanical properties come from.
Thermal conductivityGreen-Kubo over a heat-flux autocorrelation, with a Tersoff potential. Long runs, and a real transport number.
A worked one

Shearinga metal

Dislocation motion under applied shear is the example that most materials work eventually descends from.

in.shear
units       metal
atom_style  atomic
lattice     fcc 4.05
region      box block 0 20 0 20 0 20
create_box  1 box
create_atoms 1 box

pair_style  eam
pair_coeff  * * Al_u3.eam

minimize    1.0e-6 1.0e-8 1000 10000

velocity    all create 300.0 8123 mom yes rot no
fix         1 all nvt temp 300.0 300.0 0.1
run         10000
unfix       1

fix         2 all nve
fix         3 all deform 1 xy erate 0.001 units box remap x
thermo_style custom step temp pxy pe
thermo      100
run         50000

Minimise first, so the lattice is not fighting its own construction. Equilibrate at temperature, so the deformation happens to a thermalised solid rather than a static one. Only then apply fix deform, and record stress against strain while it runs. Skipping either of the first two stages is the usual reason a stress-strain curve comes out with the wrong shape.

Turning one into yours

Change one thingat a time

An example that runs is a working baseline, and a working baseline is worth more than a clever rewrite.

UnchangedFirst runkeep the output as a baseline
One changeThenso a break has one cause
Small boxWhile iteratingminutes per attempt, not hours

Run it unmodified first and keep the output. Then swap the potential, or the lattice, or the ensemble — one change, then run again and compare. When something breaks you will know exactly what caused it, which is not true of the alternative. Shrink the box and the step count while you are doing this, so each iteration costs minutes rather than machine hours.

The status

LAMMPS isbeing built

The image and its definition are being verified. When they are done, it deploys by name like the rest.

Read it, then run itPrepaid and by the hour, on a machine that is yours about a minute after you ask.