LAMMPS WWW Site

Download LAMMPS

There are several ways to get the LAMMPS software.


All versions of LAMMPS are distributed under the terms of the GNU Public license. The earlier Fortran versions are no longer under active development.

To determine what version of LAMMPS you already have, or to stay up-to-date as features or bug-fixes are made to LAMMPS, see this page and the description below about applying patches.

You can download older versions of LAMMPS, by going to this page and selecting the version you want, based on the date in the tarball file name. Not every version is available, because LAMMPS is updated frequently, and we have limited space on our WWW server.

Older parallel MD codes (ParaDyn, LJ) and the Python-based Pizza.py package, which provides pre- and post-processing and viz tools for LAMMPS, are available for download from this page.


Download a tarball

Select the code you want, click the "Download Now" button, and your browser should download a gzipped tar file. Unpack it with the following commands, and look for a README to get you started.

tar -xzvf file.tar.gz 

There have been ~285,500 downloads of LAMMPS from Sept 2004 thru Dec 2017.

LAMMPS molecular dynamics package:

LAMMPS --- Stable version (13 Mar 2018) - Recent C++ version source tarball, GPL license, ~124 Mb. Includes all bug fixes and new features described on this page, up to the date of the most recent stable release.
LAMMPS --- Development version - Most current C++ version source tarball, GPL license, ~124 Mb. Includes all bug fixes and new features described on this page.
LAMMPS 2001 --- older f90 version source tarball, GPL license, 1.1 Mb, last updated 17 Jan 2005
LAMMPS 99 --- older f77 version source tarball, GPL license, 840 Kb

No package


Git checkout and update

You must have Git installed on your system to communicate with the public Git server for LAMMPS.

IMPORTANT NOTE: As of Oct 2016, the official home of public LAMMPS development is on GitHub at https://github.com/lammps/lammps. This Git repository is kept synchronized with the internal SVN server at Sandia. The previously advertised LAMMPS git repositories on git.lammps.org and bitbucket.org are now deprecated, may not be up-to-date, and may go away at any time.

You can follow LAMMPS development on 3 different Git branches:

To access the Git repositories on your box, use the clone command to create a local copy of the LAMMPS repository with a command like:

git clone -b unstable https://github.com/lammps/lammps.git mylammps 

where "mylammps" is the name of the directory you wish to create on your machine and "unstable" is one of the 3 branches listed above. (Note that you actually download all 3 branches; you can switch between them at any time using "git checkout ".)

Once the command completes, your directory will contain the same files as if you unpacked a current LAMMPS tarball, with two exceptions:

1) No LAMMPS packages are initially installed in the src dir (a few packages are installed by default in the tarball src dir).

2) The HTML documentation files are not included.

You can install whichever packages you wish before building LAMMPS; type "make package" from the src dir to see the options, and this section of the manual for a discussion of packages. The current HTML documentation can be fetched from the web site by typing "make fetch" in the doc directory. Or it can be generated from the content provided in doc/src by typing "make html" from the the doc directory.

After initial cloning, as bug fixes and new features are added to LAMMPS, as listed on this page, you can stay up-to-date by typing the following Git commands from within the "mylammps" directory:

git checkout unstable      # not needed if you always stay in this branch
git pull 

Or:

git checkout stable
git pull 

Or:

git checkout master
git pull 

Doing a "pull" will not change any files you have added to the LAMMPS directory structure. It will also not change any existing LAMMPS files you have edited, unless those files have changed in the repository. In that case, Git will attempt to merge the new repository file with your version of the file and tell you if there are any conflicts. See the Git documentation for details.

If you want to access a particular previous release version of LAMMPS, you can instead "checkout" any version with a published tag. See the output of "git tag -l" for the list of tags. The Git command to do this is as follows.

git checkout tagID 

Stable versions and what tagID to use for a particular stable version are discussed on this page. Note that this command will print some warnings, because in order to get back to the latest revision and to be able to update with "git pull" again, you first will need to first type "git checkout unstable" (or check out any other desired branch).

Once you have updated your local files with a "git pull" (or "git checkout"), you still need to re-build LAMMPS if any source files have changed. To do this, you should cd to the src directory and type:

make purge             # remove any deprecated src files
make package-update    # sync package files with src files
make foo               # re-build for your machine (mpi, serial, etc) 

just as described below, after a patch has been installed.

IMPORTANT NOTE: If you wish to edit/change a src file that is from a package, you should edit the version of the file inside the package sub-directory with src, then re-install the package. The version in the src dir is merely a copy and will be wiped out if you type "make package-update".

IMPORTANT NOTE: The GitHub servers support both the "git://" and "https://" access protocols for anonymous read-only access. If you have a correspondingly configured GitHub account, you may also use SSH with "git@github.com:/lammps/lammps.git".

The LAMMPS GitHub project is managed by Christoph Junghans (LANL, junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at gmail.com) and Richard Berger (Temple U, richard.berger at temple.edu).


SVN checkout and update

You must have the Subversion (SVN) client software installed on your system to communicate with the public SVN server for LAMMPS.

IMPORTANT NOTE: As of Oct 2016, SVN support is now implemented via a git-to-subversion interface service on GitHub and no longer through a mirror of the internal SVN repository at Sandia.

You can follow LAMMPS development on 3 different SVN branches:

The corresponding command lines to do an initial checkout are as follows. (Note that unlike Git, you must perform a separate checkout into a unique directory for each of the 3 branches.)

svn checkout https://github.com/lammps/lammps.git/branches/unstable mylammps 

Or:

svn checkout https://github.com/lammps/lammps.git/branches/stable mylammps 

Or:

svn checkout https://github.com/lammps/lammps.git/trunk mylammps 

where "mylammps" is the name of the directory you wish to create on your machine.

Once the command completes, your directory will contain the same files as if you unpacked a current LAMMPS tarball, with two exceptions:

1) No LAMMPS packages are initially installed in the src dir (a few packages are installed by default in the tarball src dir).

2) The HTML documentation files are not included.

You can install whichever packages you wish before building LAMMPS; type "make package" from the src dir to see the options, and this section of the manual for a discussion of packages. The current HTML documentation can be fetched from the web site by typing "make fetch" in the doc directory. Or it can be generated from the content provided in doc/src by typing "make html" from the the doc directory.

After initial checkout, as bug fixes and new features are added to LAMMPS, as listed on this page, you can stay up-to-date by typing the following SVN commands from within the "mylammps" directory:

svn update 

You can also check if there are any updates by typing:

svn -qu status 

Doing an "update" will not change any files you have added to the LAMMPS directory structure. It will also not change any existing LAMMPS files you have edited, unless those files have changed in the repository. In that case, SVN will attempt to merge the new repository file with your version of the file and tell you if there are any conflicts. See the SVN documentation for details.

Please refer to the subversion client support help pages on GitHub if you want to use advanced features like accessing particular previous release versions via tags.

Once you have updated your local files with an "svn update" (or "svn co"), you still need to re-build LAMMPS if any source files have changed. To do this, you should cd to the src directory and type:

make purge             # remove any deprecated src files
make package-update    # sync package files with src files
make foo               # re-build for your machine (mpi, serial, etc) 

just as described below, after a patch has been installed.

IMPORTANT NOTE: If you wish to edit/change a src file that is from a package, you should edit the version of the file inside the package sub-directory with src, then re-install the package. The version in the src dir is merely a copy and will be wiped out if you type "make package-update".

The LAMMPS GitHub project is managed by Christoph Junghans (LANL, junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at gmail.com) and Richard Berger (Temple U, richard.berger at temple.edu).


Pre-built Ubuntu Linux executables

A pre-built LAMMPS executable suitable for running on the latest Ubuntu Linux versions, can be downloaded as a Debian package. This allows you to install LAMMPS with a single command, and stay up-to-date with the current version of LAMMPS by simply updating your operating system.

To install the appropriate personal-package archive (PPA), do the following once:

sudo add-apt-repository ppa:gladky-anton/lammps
sudo apt-get update 

To install LAMMPS do the following once:

sudo apt-get install lammps-daily 

This downloads an executable named "lammps-daily" to your box, which can then be used in the usual way to run input scripts:

lammps-daily < in.lj 

To update LAMMPS to the most current version, do the following:

sudo apt-get update 

which will also update other packages on your system.

To get a copy of the current documentation and examples:

sudo apt-get install lammps-daily-doc 

which will download the doc files in /usr/share/doc/lammps-daily-doc/doc and example problems in /usr/share/doc/lammps-doc/examples.

Note that you may still wish to download the tarball to get potential files and auxiliary tools.

To un-install LAMMPS, do the following:

sudo apt-get remove lammps-daily 

Note that the lammps-daily executable is built with the following sequence of make commands, as if you had done the same with the unpacked tarball files in the src directory:

make yes-all; make no-lib; make openmpi

Thus it builds with FFTW3 and OpenMPI.

Thanks to Anton Gladky (gladky.anton at gmail.com) for setting up this Ubuntu package capability.


Pre-built binary RPMs for Fedora/RedHat/CentOS/openSUSE

Pre-built LAMMPS executables for various Linux distributions can be downloaded as binary RPM files from this site:

http://rpm.lammps.org

There are multiple package variants supporting serial, parallel and Python wrapper versions. The LAMMPS binaries contain all optional packages included in the source distribution except: GPU, KIM, REAX, and USER-INTEL.

Installation instructions for the various versions are here:

http://rpm.lammps.org/install.html

The instructions show how to enable the repository in the respective system's package management system. Installing and updating are then straightforward and automatic.

Thanks to Axel Kohlmeyer (Temple U, akohlmey at gmail.com) for setting up this RPM capability.


Pre-built Gentoo Linux executable

LAMMPS is now part of Gentoo's main package tree and can be installed by typing:

% emerge --ask lammps 

Note that in Gentoo the LAMMPS source is downloaded and the package is built on the your machine.

Certain LAMMPS packages can be enable via USE flags, type

% equery uses lammps 

for details.

Thanks to Nicolas Bock and Christoph Junghans (LANL) for setting up this Gentoo capability.


OS X with Homebrew

LAMMPS can be downloaded, built, and configured for OS X easily with Homebrew. Only four of the LAMMPS packages are unavailable at this time because of additional needs not yet met: KIM, GPU, USER-INTEL, USER-ATC.

After installing Homebrew, you can install LAMMPS on your system with the following commands:

% brew tap homebrew/science
% brew install lammps              # serial version
% brew install lammps --with-mpi   # mpi support 

This will install the executable "lammps", a python module named "lammps", and additional resources with all the standard packages. To get the location of the additional resources type this:

% brew info lammps 

This command also tells you additional installation options available. The user-packages are available as options, just install them like this example for the USER-OMP package:

% brew install lammps --enable-user-omp 

It is usually best to install LAMMPS with the most up to date source files, which can be done with the "--HEAD" option:

% brew install lammps --HEAD 

To re-install the LAMMPS HEAD, run this command occasionally (make sure to use the desired options).

% brew install --force lammps --HEAD ${options} 

Once LAMMPS is installed, you can test the installation with the Lennard-Jones benchmark file:

% brew test lammps -v 

If you have problems with the installation you can post issues to this link.

Thanks to Derek Thomas (derekt at cello.t.u-tokyo.ac.jp) for setting up the Homebrew capability.


Windows installer package

Pre-compiled Windows installers which install LAMMPS executables on a Windows system can be downloaded from this site:

http://rpm.lammps.org/windows.html

Note that each installer package has a date in its name, which corresponds to the LAMMPS version of the same date. Installers for current and older versions of LAMMPS are available. 32-bit and 64-bit installers are available, and each installer contains both a serial and parallel executable. The installer site also explains how to install the Windows MPI package (MPICH2 from Argonne National Labs), needed to run in parallel.

The LAMMPS binaries contain all optional packages included in the source distribution except: KIM, REAX, KOKKOS, USER-INTEL, and USER-QMMM. The serial version also does not include the MPIIO and USER-LB packages. GPU support is provided for OpenCL.

The installer site also has instructions on how to run LAMMPS under Windows, once it is installed, in both serial and parallel.

When you download the installer package, you run it on your Windows machine. It will then prompt you with a dialog, where you can choose the installation directory, unpack and copy several executables, potential files, documentation pdfs, selected example files, etc. It will then update a few system settings (e.g. PATH, LAMMPS_POTENTIALS) and add an entry into the Start Menu (with references to the documentation, LAMMPS homepage and more). From that menu, there is also a link to an uninstaller that removes the files and undoes the environment manipulations.

Note that to update to a newer version of LAMMPS, you should typically uninstall the version you currently have, download a new installer, and go thru the install procedure described above. I.e. the same procedure for installing/updating most Windows programs. You can install multiple versions of LAMMPS (in different directories), but only the executable for the last-installed package will be found automatically, so this should only be done for debugging purposes.

Thanks to Axel Kohlmeyer (Temple U, akohlmey at gmail.com) for setting up this Windows capability.


Applying patches

This page describes individual new features and bug fixes for LAMMPS. Each entry gives a "patch file" and a "list of changed files". The latter tells you what files the patch modifies in case you have edited those files yourself.

IMPORTANT NOTE: If you wish to edit/change a src file that is from a package, you should edit the version of the file inside the package sub-dir of src, then re-install the package. The version in the src dir is merely a copy and will be wiped out if you type "make package-update".

IMPORTANT NOTE: In rare cases, a patch will remove or rename a file in a package directory, which then becomes deprecated if it is also in your src directory. This can cause a problem with your re-build. If this happens, type "make purge" which should remove the deprecated src file(s).