How to install LAMMPS software in Ubuntu-Linux

These are two videos of how to install LAMMPS ubuntu. Below the videos, you can see required codes to install this software. The videos are made by our Persian website shabihsazan.com.

Duration: 14 & 6 minutes respectively.
Language: Persian

Using the make command to install LAMMPS, but first, make should be installed:

bashCopy codesudo apt update
sudo apt install make
sudo apt install mpich

1- Download LAMMPS and extract it:

bashCopy codewget https://download.lammps.org/tars/lammps-27May2021.tar.gz
tar -xzvf lammps*.tar.gz

2- After the first step, navigate to the LAMMPS directory and the src subdirectory:

bashCopy codecd lam*/src

3- At this stage, you need to download and install all the necessary packages for the simulation. Below are some of the packages commonly needed for most simulations:

bashCopy codemake yes-kspace yes-rigid yes-molecule yes-manybody

Personally, instead of using the code above to install the packages, I use this code (I install all the packages first, then remove unnecessary ones):

bashCopy codemake yes-all
make no-lib
make no-ext

4- Compile:

bashCopy codemake clean-all
make mpi

5- After a successful compilation, the following executable file should be ready:

bashCopy codelmp_mpi

6- Copy the executable file to the LAMMPS input files directory and run it using the following command:

bashCopy codempirun -np 24 ./lmp_mpi -in input.in

The number 24 represents the number of cores being used.