Before you start

LAMMPS tutorials is made of seven tutorials that are ordered by increasing difficulty. The first tutorial, Lennard-Jones fluid, is meant for LAMMPS absolute beginners. The complexity of the simulations is then progressively increased for Pulling on a carbon nanotube, Polymer in water, Nanosheared electrolyte, and Reactive silicon dioxide. Finally, in Water adsorption in silica and Free energy calculation, some more advanced simulation methods are used, namely grand canonical Monte Carlo simulations and a free energy method named umbrella sampling.

Required software

LAMMPS (2Aug2023)

Download and install LAMMPS version 2Aug2023 by following the instructions of the LAMMPS website [1]. Depending on your operating system (i.e. Linux, macOS, or Windows), the procedure may differ.

LAMMPS must be compiled with the following packages:

  • MANYBODY

  • MOLECULE

  • KSPACE

  • RIGID

  • REAXFF

  • EXTRA-DUMP

If you decide to use another LAMMPS version, certain commands may not work and LAMMPS will throw an error message.

VMD (optional)

To visualize the simulation, VMD version 1.9.3 will be used [2]. Some basic instructions for VMD are given here in the VMD tutorial. Feel free to use an alternative visualization software like Ovito.

Python (optional)

To perform post-mortem analysis of the data during the MDAnalysis tutorials, MDAnalysis version 2.6.1 is used together with Python version 3.11.4 [3, 4, 5].

To plot the results from the simulations, Matplotlib Pyplot version 3.5.2 is used in combination with lammps logfile, a library allowing one to read the log file produced by LAMMPS [6, 7].

Text editing software

To write and edit LAMMPS input files, a text editor is required. Any text editor will do, such as gedit, vim, or vscode.

Find the input scripts

You can access the input scripts and data files that are used in these tutorials from this Github repository. This repository also contains the full solutions to the exercises.