Prerequisites¶
Background knowledge¶
This set of tutorials assumes no prior knowledge of the LAMMPS software itself. To complete the tutorials, a text editor and a suitable LAMMPS executable are required. We use LAMMPS--GUI here, as it offers features that make it particularly convenient for tutorials, but other console or graphical text editors, such as GNU nano, vi/vim, Emacs, Notepad, Gedit, and Visual Studio Code can also be used. LAMMPS can be executed either directly from LAMMPS–GUI (Using LAMMPS–GUI) or from a command prompt (Command line), the latter of which requires some familiarity with executing commands from a terminal or command-line prompt.
In addition, prior knowledge of the theoretical basics of molecular simulations and statistical physics is highly beneficial. Users may refer to textbooks such as Understanding Molecular Simulation by Daan Frenkel and Berend Smit [6], as well as Computer Simulation of Liquids by Michael Allen and Dominic Tildesley [7]. To better understand the fundamental concepts behind the soft matter systems simulated in these tutorials, users can also refer to Basic Concepts for Simple and Complex Liquids by Jean-Louis Barrat and Jean-Pierre Hansen [8], as well as Theory of Simple Liquids: with Applications to Soft Matter by Jean-Pierre Hansen and Ian Ranald McDonald [9]. For more resources, the SklogWiki platform provies a wide range of information on statistical mechanics and molecular simulations.
Software/system requirements¶
The LAMMPS stable release version 29Aug2024 (update2)
and the matching LAMMPS–GUI software version 1.6.12 are required to
follow the tutorials, as they include features that were first
introduced in these versions. For Linux (x86_64 CPU), macOS (BigSur or
later), and Windows (10 and 11) you can download a precompiled LAMMPS
package from the LAMMPS release page on
GitHub. Select a package with GUI
in the
file name, which includes both, LAMMPS–GUI and the LAMMPS command-line
executable. These precompiled packages are designed to be portable, and
therefore omit support for parallel execution with MPI. Instructions
for installing LAMMPS–GUI and using its most relevant features for the
tutorials are provided in Using LAMMPS–GUI.
LAMMPS versions are generally backward compatible, meaning that older input files typically work the same with newer versions of LAMMPS. However, forward compatibility is not as strong, so input files written for a newer version may not always work with older versions. As a result, it is usually possible to follow this tutorial with more recent releases of LAMMPS–GUI and LAMMPS; older versions may require some (minor) adjustments. These tutorials will be periodically updated to ensure compatibility and benefit from new features in the latest stable version of LAMMPS.
For some tutorials, external tools are required for plotting and visualization, as the corresponding functionality in LAMMPS–GUI is limited. Suitable tools for plotting include Python with Pandas/Matplotlib [10] [11], XmGrace, Gnuplot, Microsoft Excel, or LibreOffice Calc. For visualization, suitable tools include VMD [12] and OVITO [13].
About LAMMPS–GUI¶
LAMMPS–GUI is a graphical text editor, enhanced for editing LAMMPS input files and linked to the LAMMPS library, allowing it to run LAMMPS directly. The text editor functions similarly to other graphical editors, such as Notepad or Gedit, but offers the following enhancements specifically for LAMMPS:
Wizard dialogs to set up these tutorials
Auto-completion of LAMMPS commands and options
Context-sensitive online help
Syntax highlighting for LAMMPS input files
Syntax-aware line indentation
Visualization using LAMMPS’ built-in renderer
Start and stop simulations via mouse or keyboard
Monitoring of simulation progress
Dynamic capture of LAMMPS output in a text window
Automatic plotting of thermodynamic data during runs
Capture of
dump image
outputs for animationsExport of thermodynamic data for external plotting
Inspection of binary restart files
Using LAMMPS–GUI contains basic instructions for installation and using LAMMPS–GUI with the tutorials presented here. A complete description of all LAMMPS–GUI features can be found in the LAMMPS manual (see LAMMPS--GUI).
Content and citation¶
All files and inputs required to follow the tutorials are available from a dedicated GitHub organization account, LAMMPStutorials. If you find these tutorials useful, you can cite A Set of Tutorials for the LAMMPS Simulation Package by Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer (2025) [14]. You can access the full paper on arXiv.