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 SVN or Git 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 are below for SVN and Git.

If you are on an Ubuntu Linux box, you can download a pre-built executable via a personal package archive (PPA). 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.

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.

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.

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 

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

There have been ~133,750 downloads of LAMMPS from Sept 2004 thru Dec 2012.

LAMMPS molecular dynamics package:

LAMMPS --- Current C++ version source tarball, GPL license, ~41 Mb (includes all subsequent bug fixes and new features described on this page)
LAMMPS Windows serial executable --- C++ version (1 July 2012), 12.0 Mb (includes all subsequent bug fixes and new features described on this page up to 1 July 2012), includes an FFT library (can run PPPM), built with all packages except: gpu xtc kim meam reax 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 (1 July 2012), 12.0 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.icms.temple.edu/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.

Note that once you have done an "svn update", 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 package-update    # since some changed files may be in package dirs
make foo               # for your machine 

just as described on this page, as if a patch had been installed. If you have trouble with your build, you may need to also use the "make purge" command which will remove deprecated files from the src directory when the original file in a package directory was renamed or removed.

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

http://git.icms.temple.edu/lammps-ro.git 

Once Git is installed on your box the clone command to create a local copy of LAMMPS is

git clone http://git.icms.temple.edu/lammps-ro.git 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 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.

Note that once you have done an "git pull", 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 package-update    # since some changed files may be in package dirs
make foo               # for your machine 

just as described on this page, as if a patch had been installed. If you have trouble with your build, you may need to also use the "make purge" command which will remove deprecated files from the src directory when the original file in a package directory was renamed or removed.

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.

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.


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.


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