Skip to content

LAMMPS

LAMMPS

LAMMPS is a classical molecular dynamics (MD) code that models ensembles of particles in a liquid, solid, or gaseous state. It can model atomic, polymeric, biological, solid-state (metals, ceramics, oxides), granular, coarse-grained, or macroscopic systems using a variety of interatomic potentials (force fields) and boundary conditions. It can model 2d or 3d systems with sizes ranging from only a few particles up to billions.

LAMMPS module

LAMMPS module has to be loaded using Lmod prior to running it.

$ module load LAMMPS

Once the module has been loaded you will need to set some enviroment variables:

You can also list all available versions using Lmod's spider command:

$ module spider LAMMPS

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  LAMMPS:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Description:
      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. 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. The code is designed to be easy to modify or extend with new functionality. 

     Versions:
        LAMMPS/3Mar2020-foss-2019b-Python-3.7.4-kokkos
        LAMMPS/3Mar2020-intel-2020a-Python-3.8.2-kokkos
        LAMMPS/23Jun2022-foss-2021b-kokkos-CUDA-11.4.1
        LAMMPS/23Jun2022-foss-2021b-kokkos

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  For detailed information about a specific "LAMMPS" package (including how to load the modules) use the module's full name.
  Note that names that have a trailing (E) are extensions provided by other modules.
  For example:

     $ module spider LAMMPS/23Jun2022-foss-2021b-kokkos
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Software version

Here you can check the available versions for LAMMPS in the different clusters

LAMMPS/3Mar2020-intel-2019b-Python-3.7.4-kokkos
LAMMPS/11Aug2017-intel-2017b
LAMMPS/16Mar2018-intel-2017b
LAMMPS/23Jun2022-foss-2021b-kokkos
LAMMPS/29Mar2019-intel-2018b
LAMMPS/29Mar2019-intel-2019b-full
LAMMPS/3Mar2020-foss-2019b-Python-3.7.4-kokkos
LAMMPS/3Mar2020-intel-2020a-Python-3.8.2-kokkos
LAMMPS/23Jun2022-foss-2021b-kokkos-CUDA-11.4.1
LAMMPS/23Jun2022-foss-2021b-kokkos
LAMMPS/23Jun2022-foss-2021b-kokkos-CUDA-11.4.1
LAMMPS/23Jun2022-foss-2022a-kokkos-ml-hdnnp
LAMMPS/23Jun2022-foss-2022a-kokkos

How to run LAMMPS

Launch LAMMPS using normal nodes with MPI

Submission scripts should contain the following lines to run LAMMPS:

LAMMPS: batch script for a parallel execution on Atlas FDR
#!/bin/bash
#SBATCH --qos=regular
#SBATCH --job-name=LAMMPS_JOB
#SBATCH --mem=200gb
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=5
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err
#SBATCH --time=01:00:00

#### SLURM task using 2 Nodes with 5 Processors per Node.

module load LAMMPS/23Jun2022-foss-2021b-kokkos

mpiexec -np ${SLURM_NTASKS} lmp -in in.file

Where:

  • -np: number of processes to use.
  • in.file: Input file to use.

Launch LAMMPS using normal nodes GPUs

Submission scripts should contain the following lines to run LAMMPS:

LAMMPS: batch script for a parallel execution on Hyperion with GPUs
#!/bin/bash
#SBATCH --qos=regular
#SBATCH --job-name=LAMMPS_GPU_JOB
#SBATCH --mem=200gb
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --gres=gpu:1
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err
#SBATCH --time=01:00:00

#### SLURM task using 1 Nodes with 1 GPU.

module load LAMMPS/23Jun2022-foss-2021b-kokkos-CUDA-11.4.1

srun lmp -in in.file

Where:

  • in.file: Input file to use.