LAMMPS
LAMMPS provides empirical potential functions for atoms in the periodic table, enabling molecular dynamics simulations corresponding to real systems, such as calculating the lattice constant of aluminum or the density of water, yielding results consistent with experiments. It also offers various model potential functions for coarse-grained simulations, such as simulating the properties of polymer chains based on particle-spring models. As a utility package, LAMMPS employs many mature optimization algorithms. For example, it uses Verlet lists and cell lists to optimize the scanning of neighboring particles in short-range interaction calculations.
1. Script Template
submit.sh
#!/bin/bash
#SBATCH --nodes=1 # Number of nodes
#SBATCH --ntasks-per-node=56 # Number of cores per node
#SBATCH --ntasks=56 # Total number of cores
#SBATCH --partition=g1_share # Queue partition; must specify the correct partition
#SBATCH --job-name=hello # Job name
#SBATCH --output=hello.%j.out # Normal log output (%j parameter value is jobId)
#SBATCH --error=hello.%j.err # Error log output (%j parameter value is jobId)
##############################################
# Software Envrironment #
##############################################
unset I_MPI_PMI_LIBRARY # Unset default MPI library, use Intel's built-in
export I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=0 # Parameter modification required for Intel multi-node jobs
module load intel/2022 intelmpi/2022 # Load Intel environment
module load lammps # Load software (refer to module usage instructions to select the specific version)
##############################################
# Run job #
##############################################
ulimit -s unlimited
ulimit -l unlimited
mpirun lmp_mpi -i in.lj.txt # Replace in.lj.txt with the actual input file
2. Errors encountered during example runs
## Error details as follows
ERROR- Unrecognized par style meam/c' is part of the USER-MEAMC package
which is not enabled in his LAMMPS bmary last command' patrstyle meam/c
## Job terminates after submission. Cause: LAMMPS installation is missing the USER-MEAMC package. Recommended to switch to a different LAMMPS version or contact technical support for installation.