LAMMPS installations at NSC

Directory list:

11Nov13 LAMMPS 11Nov13
1Feb14 LAMMPS 1Feb14
23Aug12 LAMMPS 23Aug12
31Jan14 LAMMPS 31Jan14
9Dec14 LAMMPS 9Dec14

Level of support

Tier 3 NSC will not be able to help you much with this program, either because we lack the in-house experience, or because it is a test installation. In general, these types of installations are untested, and will not be updated unless you send a request to NSC.

Please see the page describing our software support categories for more information.
You can also contact for further information.

Official homepage:

LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator. For the features of this code and applications, please visit and

LAMMPS manual and tutorials are also available from the official homepage.

Please contact NSC Support if you have any questions or problems.

Naming scheme for binaries and library packages

Name Description
lmp (or lmp_Triolith) a LAMMPS binary
liblammps.a (or liblammps_Triolith.a) a static library (or a dynamic library

How to run

Load the LAMMPS module corresponding to the version you want to use, e.g

module load lammps/23Aug12-i1214

It launches two environmental variables, i.e., the path to the executable (both lmp and lmp_Triolith work identically) and the LAMMPS library path on anew variable named LAMMPS_LIB.

Then launch the desired binary. For example,

mpirun lmp -in in.lammps

(Obsolete: As of mpprun version 1 which had in operation until the early 2014, mpprun could not accept the direct call of executable’s name, thus the full path had to be given. To enable it, we used to address another temporary variable at runtime as follows:

lmp_exec=`which lmp`

mpprun $lmp_exec -in in.lammps

In mpprun version 2 serviced from Feb. 2014, mpprun succesfully detects the executable even if only the name is specified. Thus, it is not needed anymore to address an extra variable to keep the entire path of the binary’s location.)

For linking LAMMPS as the library, you can specify LAMMPS_LIB variable at time of linking. Proposed way is to set up LDFLAGS as follows:


Example batch script

A minimum batch script for running VASP without modules looks like this:

#SBATCH -t 4:00:00
#SBATCH -J jobname
#SBATCH --exclusive
#SBATCH -A SNIC-xxx-yyy

### At mpprun version 1 (earlier than Feb. 2014)
lmp_exec=`which lmp`
mpprun $lmp_exec -in in.lammps
### At mpprun version 2 (from Feb. 2014)
mpprun lmp -in in.lammps

% Note that you should edit the jobname and the account number before submitting.


Due to frequent update of LAMMPS software, we will build specific LAMMPS versions upon request. If you need any specific version, please contact NSC Support with your requirements (LAMMPS version, compiler and MPI library).

Support for creating the movie (dump_movie) is serviced from the version of 1Feb14.