The LAMMPS website has very detailed introduction of how to install LAMMPS.
It is important to check whether the command you want is built-in or needs other packages.
For example, atom_style full
is not included in LAMMPS by default.
If you want that, MOLECULE package needs to be installed.
This can be done via -D PKG_MOLECULE=on
while building LAMMPS.
You can see how many commands are available by lmp -h
.
Here, I have attached an example of the installation of LAMMPS (29 Sep 2021 - Update 3).
tar -xf stable_29Sep2021_update3.tar.gz cd lammps-stable_29Sep2021_update3 mkdir build-intel-2018-2 cd build-intel-2018-2 module load cmake/3.19.0 module load intel/2018.2.199 module load mpich/3.2 module load fftw/3.3.8 cmake ../cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx make -j 8
The full log is given in grendel_29Sep2021_update3.txt
atom_style full
pair_style lj/cut/coul/long 11.0 11.0
kspace_style pppm 0.0001
The Optimized Potentials for Liquid Simulations (OPLS) force field is targeted at organic liquids. There are two types of OPLS depending on hwo each atom is represented. For example, propanol (CH$_3$CH$_2$CH$_2$OH) has 5 interactive sites in a united-atom (UA) model instead of 12 in an all-atom (AA) reprentation. The energy expression of OPLS-AA is $$ \begin{aligned} E _ \text{total} &= E _ \text{bond} + E _ \text{angle} + E _ \text{torsion} + E _ \text{non-bonded} \\ E _ \text{bond} &= \sum _ \text{bonds} K _ r (r - r _ {eq})^2 \\ E _ \text{angle} &= \sum _ \text{angles} K _ \theta (\theta - \theta _ {eq})^2 \\ E _ \text{torsion} &= \sum _ \text{dihedrals} \end{aligned} $$