LAMMPS Potential

LAMMPS Potential#

Changed in version 2.0: Instructions now reflect using the cmake and meson build system.

Setup#

In order to use LAMMPS, reviewed recently in Thompson et al. [LMP_TAB+22], as a potential you must first build the serial library version of LAMMPS. This can be done by following the instructions in the lammps documentation.

For most cases executing these commands from the LAMMPS src folder should work:

cmake -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D BUILD_MPI=no -D BUILD_SHARED_LIBS=yes ../cmake
make
make install

If the same environment is used as eon, as described in the installation instructions then integration is via:

meson reconfigure bbdir -Dwith_lammps=True
meson install -C bbdir

Note

With this setup, there is no need to explicitly let eON know about other libraries, since they are all installed together in the environment.

For backwards compatibility, we also support copying in liblammps.so into potentials/LAMMPS/liblammps.so.

Usage#

After setting the potential to lammps in the configuration file you need to place a LAMMPS input file in the potfiles directory in your simulation. This file should be named in.lammps and it needs to specify what potential LAMMPS should use. Here is an example in.lammps file that uses the morse potential::

pair_style morse 9.5 #morse potential with 9.5 Angstrom cutoff
pair_coeff * * 0.7102 1.6047 2.797 #specify parameters
pair_modify shift yes #shift the potential to be zero at the cutoff

References#

[LMP_TAB+22]

Aidan P. Thompson, H. Metin Aktulga, Richard Berger, Dan S. Bolintineanu, W. Michael Brown, Paul S. Crozier, Pieter J. In 'T Veld, Axel Kohlmeyer, Stan G. Moore, Trung Dac Nguyen, Ray Shan, Mark J. Stevens, Julien Tranchida, Christian Trott, and Steven J. Plimpton. LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Computer Physics Communications, 271:108171, February 2022. doi:10.1016/j.cpc.2021.108171.