LAMMPS¶
LAMMPS is a classical molecular dynamics code, and 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.
Policy¶
LAMMPS is available to users at HPC2N under the terms of the GPLv2 license.
Citations
Please cite LAMMPS in your scientific papers, if you used it for your results. See Citing LAMMPS in your papers for how to include acknowledgement.
Overview¶
LAMMPS is a classical molecular dynamics code with a focus on materials modeling. 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.
Usage at HPC2N¶
On HPC2N we have LAMMPS available as a module.
Loading¶
To use the LAMMPS module, add it to your environment. You can find versions with
and you can then find how to load a specific version (including prerequisites), with
Running¶
You must run LAMMPS through the batch system.
Here are some example batch scripts (for LAMMPS/29Aug2024-kokkos):
LAMMPS, MPI
#!/bin/bash
#SBATCH -A <PROJECT-ID>
# Asking for 3 hours
#SBATCH -t 03:00:00
# Number of nodes
#SBATCH -N 1
# Ask for 28 processes - suitable on a Skylake node
# See the section "Different parts of the batch system"
# for number of cores on different types of nodes
#SBATCH -n 28
# Load modules for running LAMMPS
ml GCC/13.2.0 OpenMPI/4.1.6
ml LAMMPS/29Aug2024-kokkos
# Run LAMMPS
srun lmp -in <your-file>.inp
LAMMPS, OpenMP
#!/bin/bash
#SBATCH -A <PROJECT-ID>
# Asking for 3 hours
#SBATCH -t 03:00:00
# Number of nodes
#SBATCH -N 1
# Ask for 28 cores - suitable on a Skylake node
# See the section "Different parts of the batch system"
# for number of cores on different types of nodes
#SBATCH -n 14
#SBATCH -c 2
# Load modules for running LAMMPS
ml GCC/13.2.0 OpenMPI/4.1.6
ml LAMMPS/29Aug2024-kokkos
export OMP_NUM_THREADS=2
# Run LAMMPS
srun lmp -in <your-file>.inp
Additional info¶
More information can be found