LAMMPS from scratch

Understand how LAMMPS works: run it in your browser, read its engine, change its code and check every change with a hand calculation.

S

Start here

Run LAMMPS in your browser, change one line, and check the result by hand.

  1. Run LAMMPS, change it, check it by hand
B

How LAMMPS is organized

One small core plus hundreds of interchangeable styles.

  1. A tour of the source tree
  2. The conductor: the LAMMPS class
  3. Styles: the plug-in design
  4. The families of styles
  5. Packages
  6. How atoms are stored
  7. Running in parallel
  8. Finding your way in the code
C

The main engine: one timestep

The loop every LAMMPS run goes through, traced for two atoms by hand.

  1. From run 250 to the loop
  2. The loop, line by line
  3. Hooks and fix masks
  4. One timestep for two atoms, by hand
  5. Energy and virial bookkeeping
  6. Setup, multiple runs and rerun
  7. The other loops: RESPA and minimize
  8. The timing table
D

Modules and their algorithms

Each module read in the code, then reproduced by hand.

  1. Units and constants
  2. Domain and periodic boundaries
  3. Neighbour lists
  4. Communication between processors
  5. Pair style lj/cut
  6. Mixing rules and special bonds
  7. Coulomb and Ewald
  8. Bonds, angles and dihedrals
  9. The integrator: fix nve
  10. Thermostats
  11. Barostats
  12. Thermo output: temperature and pressure
  13. Constraints: SHAKE and RATTLE
  14. Minimization
  15. Computes for analysis
  16. Time averaging and correlations
  17. Groups, regions and variables
  18. Dumps, restarts and output
E

Change the code, check by hand

Predict, change, rebuild, run, compare to the digit.

  1. Hello from inside the engine
  2. Clone a pair style
  3. Change the formula (Mie potential)
  4. Add a parameter (soft core)
  5. A broken integrator on purpose
  6. Write a thermostat
  7. Write a compute
  8. Watch the neighbour list decide
  9. A new bond style
  10. Same style, no rebuild: a plugin
  11. Test it like the developers
  12. Check from Python
F

Useful extras

Not needed to run simulations, but worth knowing.

  1. Python and the library interface
  2. Plugins
  3. Unit tests and regression
  4. Debugging
  5. Performance
  6. Restarts and system surgery
  7. Rerun and post-processing
  8. Multi-replica methods
  9. Machine-learning potentials
  10. Reproducibility
  11. Tools and contributing