Attention
Following the recent operating system upgrade, software listings and module load commands now reflect the upgraded system. Some examples and notices are still being updated and may contain outdated guidance.
LAMMPS
Guidance last updated: 13 October 2026
LAMMPS is a classical molecular dynamics code with a focus on materials modelling. It’s an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator.
LAMMPS has potentials for solid-state materials (metals, semiconductors) and soft matter (biomolecules, polymers) and coarse-grained or mesoscopic systems. It can be used to model atoms or, more generically, as a parallel particle simulator at the atomic, meso, or continuum scale.
LAMMPS runs on single processors or in parallel using message-passing techniques and a spatial-decomposition of the simulation domain. Many of its models have versions that provide accelerated performance on CPUs, GPUs, and Intel Xeon Phis. The code is designed to be easy to modify or extend with new functionality.
Documentation: https://docs.lammps.org/Manual.html
Interactive Usage
After connecting to Stanage (see Establishing a SSH connection), start an interactive session with the following command:
srun --pty bash -i
You can load a specific version with the following command:
module load LAMMPS/22Jul2025_update4-foss-2025b-kokkos
module load LAMMPS/22Jul2025_update4-foss-2025b-kokkos-CUDA-12.9.1
module load LAMMPS/22Jul2025_update4-foss-2025b-kokkos-CUDA-12.9.1
Serial (one core) Batch usage
Load the example CPU module and copy the supplied input file:
module load LAMMPS/22Jul2025_update4-foss-2025b-kokkos
cp "$EBROOTLAMMPS/examples/indent/in.indent" .
The following example batch submission script, batch.sh, runs this input with one CPU:
#!/bin/bash
#SBATCH --job-name=lmp-indent
#SBATCH --mail-user=a.person@sheffield.ac.uk
#SBATCH --mail-type=FAIL
#SBATCH --time=00:01:00
#SBATCH --mem=1G
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --output=output-%j.log
#SBATCH --error=error-%j.log
module load LAMMPS/22Jul2025_update4-foss-2025b-kokkos
export OMP_NUM_THREADS=1
srun --export=ALL lmp -in in.indent
Submit your job to the SLURM scheduler:
sbatch batch.sh
LAMMPS writes progress to output-<JOB_ID>.log and log.lammps.
Parallel (multi core using MPI) Batch usage
The following example batch submission script, mpi_batch.sh, runs the same in.indent input with four MPI tasks:
#!/bin/bash
#SBATCH --job-name=mpi-lmp-indent
#SBATCH --mail-user=a.person@sheffield.ac.uk
#SBATCH --mail-type=FAIL
#SBATCH --time=00:01:00
#SBATCH --mem=1G
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=1
#SBATCH --output=mpi-output-%j.log
#SBATCH --error=mpi-error-%j.log
module load LAMMPS/22Jul2025_update4-foss-2025b-kokkos
export OMP_NUM_THREADS="$SLURM_CPUS_PER_TASK"
srun --export=ALL lmp -in in.indent
This example requests four MPI tasks in total, with one CPU and one OpenMP thread per task. Slurm can allocate the tasks on one or more nodes.
Submit your job to the SLURM scheduler:
sbatch mpi_batch.sh
LAMMPS writes progress to mpi-output-<JOB_ID>.log and log.lammps.
Installation notes
LAMMPS was installed using Easybuild, build details can be found in $EBROOTLAMMPS/easybuild with a given module loaded.