• Download 27May2021 Patch
wget https://download.lammps.org/tars/lammps-27May2021.tar.gz
tar -zxvf lammps-27May2021.tar.gz
module load intel/17.5.239 mpi/intel/2017.5.239 gcc/7.4.0
export CC=`which gcc`
export CXX=`which g++`

cd lammps
mkdir build; cd build
# configuration reading CMake scripts from ../cmake
cmake -D PKG_KSPACE=yes -D PKG_USER-CONP2=yes ../cmake
# compilation (or type "make")
#cmake --build .
make -j 4

If you want to install new package,

cmake -D PKG_<CUSTOM>=yes ../cmake
make -j 4

If you just edit the code,

make -j 4