LAMMPS is a classical molecular dynamics code that models an ensemble of particles in a liquid, solid, or gaseous state. It can model atomic, polymeric, biological, metallic, granular, and coarse-grained systems using a variety of force fields and boundary conditions.
LAMMPS has potentials for soft materials (biomolecules, polymers) and solid-state materials (metals, semiconductors) 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.

Usage on LRZ HPC Systems

Available Versions at LRZ

In order to run a LAMMPS job, please first load the appropriate environment module. See the module page for more information on modules.

module load lammps/20180629-impi 


You can execute LAMMPS on your input file in.mystuff either in serial mode
lmp < in.mystuff

or in parallel mode

srun -n 16 lmp -i in.mystuff

(16 MPI tasks will be used in the above example). The pair potentials are available in LAMMPS_BASE/potentials; you can copy/link them from there or reference the full path name in your input file.

Batch Jobs

Please consult the batch documents of the Linux Cluster and the SuperMUCNG, respectively, for how to set up a batch run. These documents also contain example script which you can easily adapt for running a LAMMPS batch job.

Linux-Cluster with SLURM

SuperMUC-NG with SLURM

#SBATCH -o <pwd>/lammps.out
#SBATCH -D /home/cluster/<group>/<user>/mydir
#SBATCH -J <job_name>
#SBATCH --get-user-env
#SBATCH --clusters=cm2_tiny
#SBATCH --ntasks=28
#SBATCH --mail-type=end
#SBATCH --mail-user=<email_address>@<domain>
#SBATCH --export=NONE
#SBATCH --time=8:00:00

module load slurm_setup
module load lammps/20180629-impi

lip lmp -i /<pwd>/input

#SBATCH -o %x.%j.out
#SBATCH -e %x.%j.err
#SBATCH -D pwd
#SBATCH --mail-type=END
#SBATCH --time=08:00:00
#SBATCH --partition=test
#SBATCH --nodes=2
#SBATCH --export=NONE
#SBATCH --get-user-env
#SBATCH --mail-user=<email_address>@<domain>
#SBATCH --account=<project id>
#SBATCH -J <job name>

module load slurm_setup
module load libjpeg-turbo/1.5.90
module load lammps/20180629-impi

mpiexec -n 16 lmp -i /<pwd>/input


The environment variable LAMMPS_DOC points at the HTML base documentation page if the lammps environment module is loaded.


If you have any questions or problems with the LAMMPS installations on LRZ platforms please contact the LRZ support team.