How to use LAMMPS


The LAMMPS module can be loaded with

ml PDCTEST/22.06
ml lammps/15Sep2022-cpeGNU-22.06

This will add the LAMMPS bin directory to your PATH, so that LAMMPS can be started with the command lmp_mpi or lmp_omp.

Below is an example batch script for a LAMMPS job:


# time allocation
# name of this job
#SBATCH -J lammps
# wall time for this job
#SBATCH -t 01:00:00
# partition for this job
#SBATCH -p s11-tst

# number of nodes
#SBATCH --nodes=2
# number of MPI processes per node
#SBATCH --ntasks-per-node=128

ml PDCTEST/22.06
ml lammps/15Sep2022-cpeGNU-22.06

# Run with the file infile as input and write to outfile
srun lmp_mpi < infile > outfile

This will run LAMMPS (lmp) with 256 cores (2 nodes), and will read the input specified in infile and write to outfile in the directory the job was submitted. Submit the batch script with the sbatch command, see also the How to run jobs.

More information

For more information, refer to the LAMMPS manual.


PDC takes no responsibility for the correctness of results produced with the binaries. Always evaluate the binaries against known results for the systems and properties you are investigating before using the binaries for production jobs.

How to build LAMMPS