What is LAMMPS (briefly)?
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. More Information on the software, do take a look at https://www.lammps.org/
Where to Download?
You can download the latest stable from Download LAMMPS
Step 1: Ensure Prerequisites are present
- You may want to use HPCX which has optimised OpenMPI. Do take a look at Installing and using Mellanox HPC-X Software Toolkit
- You will need FFTW. Compiling FFTW-3.3.10 with OpenMPI on Rocky Linux 8
Step 2: Download and build LAMMPS
For more information, do take a look at https://docs.lammps.org/Install_tarball.html
$ tar -zxvf lammps-stable.tar.gz
$ cd lammps-2Aug203
$ mkdir build
$ touch setup.sh
$ vim setup.sh
Inside the setup.sh
cmake -C ../cmake/presets/most.cmake ../cmake \
-D CMAKE_INSTALL_PREFIX=/usr/local/lammps-2Aug2023 \
-D BUILD_MPI=on \
-D BUILD_SHARED_LIBS=yes \
-D FFT=FFTW3 \
-D FFTW3_INCLUDE_DIRS=${FFTW_INC} \
-D FFTW3_LIBRARIES=${FFTW_LIB}/libfftw3_mpi.a
Notes:
The -C ../cmake/presets/most.cmake command adds the packages that don’t need extra libraries.
Make and Compile……
$ make -j 16
$ make install
References: