LAMMPS WWW Site

Download LAMMPS

There are several ways to get the LAMMPS software.

You can follow the download instructions on this page to grab a tarball, and then follow the instructions in Section Getting Started of the LAMMPS manual to use "make" and build an executable for any machine.

If you have Subversion (SVN) or Git installed on your machine, you can use checkout and update commands to get the LAMMPS files once and then stay current. You then build LAMMPS as you would with the tarball. Further instructions on this for SVN and Git are below.

If you are on a Linux box, you can download a pre-built executable. For Ubuntu it is a personal package archive (PPA). For Fedora/RedHat/CentOS/openSUSE it is a binary RPM. The executable includes all LAMMPS packages that do not use additional libraries from the lib directory (e.g. MEAM, GPU, USER-CUDA, etc) and is kept up-to-date daily. Further instructions on this are below for Ubuntu and RPMs

OS X users can use the popular package manager Homebrew to install LAMMPS, the Python module, and additional files and resources (i.e. potential files, tools, etc). Further instructions on this are below for OS X with Homebrew.

Windows users can download a serial or parallel executable below in the Download section. Note that these versions are only updated infrequently. Instead, we recommend you download installer packages for 32-bit or 64-bit executables as described below in the Windows installer section. These versions are updated continuously, similar to the developement version of LAMMPS, with new bug fixes and features.


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 filename. 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.

gunzip file.tar.gz
tar xvf file.tar 

There have been ~166,300 downloads of LAMMPS from Sept 2004 thru Dec 2013.

LAMMPS molecular dynamics package:

LAMMPS --- Stable version (1 Feb 2014) - Recent C++ version source tarball, GPL license, ~55 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, ~55 Mb. Includes all bug fixes and new features described on this page.
LAMMPS Windows serial executable --- C++ version (12 April 2013), 14.0 Mb (includes all subsequent bug fixes and new features described on this page up to 12 April 2013), includes an FFT library (can run PPPM), built with all packages except: gpu xtc kim meam reax voronoi user-atc user-cuda user-reaxc user-awpmd user-misc user-omp. NOTE: This download is just an executable file; if you want doc files, example scripts, auxiliary tools, etc, you need to also download the C++ tarball.
LAMMPS Windows parallel executable --- C++ version (12 April 2013), 14 Mb, includes everything that the above serial executable has included, plus includes MPI (can be run on multiple processors). Use of this LAMMPS Windows executable requires MPICH2 as a pre-requisite. To use it, you'll need to also download and install MPICH2 for Windows. NOTE: This download is just an executable file; if you want doc files, example scripts, auxiliary tools, etc, you need to also download the C++ tarball.
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


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.

Once SVN is installed, the following command will do an initial check-out of LAMMPS from an SVN server at Temple University, setup by Axel Kohlmeyer.

svn co svn://svn.lammps.org/lammps-ro/trunk mylammps 

where "mylammps" is the name of the directory you wish to create on your machine. Once the command completes, that directory should contain exactly the same files as if you unpacked the current LAMMPS tarball. The one EXCEPTION is that no LAMMPS packages are initially installed in the SVN src dir (a few packages are installed by default in the tarball src dir). Of course, you can install whichever ones you want 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.

Note that you never need to do another svn check-out unless you want to start from scratch.

Thereafter, 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 command 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.

IMPORTANT NOTE: If you don't want to stay continuously up-to-date with the developmental version of LAMMPS, you can update only occasionally to the most recent stable version. The SVN commands to do this are one of the following. The first updates your currently checked out version to revision N. The second does a new checkout of revision N.

svn update -r N
svn svn co -r N svn://svn.lammps.org/lammps-ro/trunk mylammps 

Stable versions and what revision number N to use for a particular stable version are discussed on this page.

Note that 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 

just as described below, as if a patch had 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-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".

The SVN repository at Temple is a mirror of the master SVN repository for LAMMPS at Sandia. The mirroring occurs once per day, in the middle of the night.

IMPORTANT NOTE: The Temple SVN repository supports only the "svn://" access protocol for anonymous read-only access. It does NOT support the "http://" or "https://" access protocols.

Many thanks to Axel Kohlmeyer (Temple U, akohlmey atgmail.com) and Bill Goldman (Sandia) for setting up this SVN capability.


Git checkout and update

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

The Git server is a mirror of the SVN server. Both are at Temple University, and were setup by Axel Kohlmeyer. Its URL is one of the following:

git://git.lammps.org/lammps-ro.git
http://git.icms.temple.edu/lammps-ro.git (slow, use only if git:// does not work) 

Secondary mirrors of this repository are on GitHub and Bitbucket at:

https://github.com/lammps/lammps
https://bitbucket.org/akohlmey/lammps 

The secondary mirrors are particularly recommended for hosting development of add-on features to LAMMPS, as they can be forked inside the respective source code hosting service.

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

git clone git://git.lammps.org/lammps-ro.git mylammps 

where "mylammps" is the name of the directory you wish to create on your machine and using any of the aforementioned URLs or the URL of your fork. Once the command completes, that directory should contain exactly the same files as if you unpacked the current LAMMPS tarball. The one EXCEPTION is that no LAMMPS packages are initially installed in the Git src dir (a few packages are installed by default in the tarball src dir). Of course, you can install whichever ones you want 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.

Thereafter, 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 command from within the "mylammps" directory:

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.

IMPORTANT NOTE: If you don't want to stay continuously up-to-date with the developmental version of LAMMPS, you can instead check out the most recent stable version into your current LAMMPS checkout directory. 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 do "git checkout master".

Note that 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 

just as described below, as if a patch had 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-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: The Temple Git repository supports both the "git://" and "http://" access protocols for anonymous read-only access. It does NOT support the "https://" access protocol. The HTTP access protocol will be slow for the initial check-out, so the git protocol is recommended; "https://" is available through the GitHub and Bitbucket secondary mirrors

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


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-CUDA.

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. Insstalling 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 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-CUDA, 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 reinstall 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 packages for 32-bit and 64-bit

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

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

There are 32-bit and 64-bit versions available, with and without MPI for parallel or serial execution. The LAMMPS binaries contain all optional packages included in the source distribution except: KIM, REAX, and USER-CUDA.

The site also has instructions on how to run LAMMPS under Windows, once it is installed.

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).