LAMMPS or Large-scale Atomic/Molecular Massively Parallel Simulator, is a program intended for materials modeling using molecular dynamics. The program is capable of running simulations for solid-state materials such as metals or semi-conductors, soft matter like biological materials and polymers as well as coarse-grained and mesoscopic systems. LAMMPS is also capable of performing parallel particle simulations at several different scales including the atomic scale, mesoscale and continuum scale. There are two options for running LAMMPS, Serial and Parallel. The Parallel version runs using message-passing and can run with GNU OpenMPI or the GNU MVAPICH2 compilers at the RCC HPC Cluster.
Running LAMMPS Examples on RCC Systems
LAMMPS examples are available only on login nodes. If you would like to run the examples, first copy all or selected examples directories to your home directory with the command,
cp -r /opt/hpc/gnu/lammps/examples .
Example - Serial Job
We will use the
body example here and copy it to the home directory first as,
cp -r /opt/hpc/gnu/lammps/examples/body .
Following SLURM submit script will run this example using one CPU core.
#!/bin/bash #SBATCH -J "lammps" #SBATCH -n 1 #SBATCH -p genacc_q #SBATCH -t 00:10:00 lmp_g++ < in.body
Example - Parallel Job
We will use the same
body example here.
Following submit script will use 4 processes to run this example.
#!/bin/bash #SBATCH -J "lammps" #SBATCH -n 4 #SBATCH -p genacc_q #SBATCH -t 00:10:00 module load gnu-openmpi mpirun lmp_g++ < in.body
Note that if you want to use the 'SELF' option of jump in a parallel job, you have to change the way you feed the input file to your LAMMPS binary. Therefore, the last line of the above script should be,
mpirun lmp_g++ -in in.body