LAMMPS: Pre-Built Ubuntu Executables
LAMMPS: Pre-Built Ubuntu Executables
LAMMPS: Pre-Built Ubuntu Executables
html#ubuntu
Download LAMMPS
Source tarball: You can follow the download instructions on this page
to grab a source tarball, and then follow the instructions in Section
Getting Started of the LAMMPS manual to use "make" and build an
executable for any machine.
Git or SVN: If you have Git or Subversion (SVN) 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 from
source as you would with the tarball. Both Git and SVN access is
provided by GitHub. Further instructions for Git and SVN access are
below.
Pre-built Linux executables: 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, etc) and is
kept up-to-date daily. Further instructions on this are below for Ubuntu
and RPMs.
Automated Mac build: OS X users can use the popular package
manager Homebrew to download, build, and 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.
Pre-built Windows executables: Windows users can download an
installer package from this site. Installers for different dated versions of
LAMMPS are available, either as 32-bit and 64-bit variants. The most
current installer package is updated several times per month, more
often than the "stable" version listed below as a source download. The
installer doc page also describes how to run the executables in serial or
parallel, using MPICH (which you must also install). More details are
described below in the Windows installer section.
Download a tarball
Git checkout and update
SVN checkout and update
Pre-built Ubuntu executables
Pre-built binary RPMs for Fedora/RedHat/CentOS/openSUSE
Pre-built Gentoo executable
OS X with Homebrew
Windows installer package
Applying patches
1 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
All versions of LAMMPS are distributed under the terms of the GNU Public
license. The earlier Fortran versions are no longer under active development.
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.
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.
There have been ~285,500 downloads of LAMMPS from Sept 2004 thru Dec
2017.
LAMMPS --- Stable version (16 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
Download Now
2 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
You must have Git installed on your system to communicate with the public
Git server for LAMMPS.
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:
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).
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:
3 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
Or:
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.
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:
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".
4 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
You must have the Subversion (SVN) client software installed on your system
to communicate with the public SVN server for LAMMPS.
Or:
Or:
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).
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:
5 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
svn update
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:
6 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
Note that you may still wish to download the tarball to get potential files and
auxiliary tools.
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:
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.
7 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
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.
LAMMPS is now part of Gentoo's main package tree and can be installed by
typing:
Note that in Gentoo the LAMMPS source is downloaded and the package is
built on the your machine.
for details.
Thanks to Nicolas Bock and Christoph Junghans (LANL) for setting up this
Gentoo capability.
OS X with Homebrew
After installing Homebrew, you can install LAMMPS on your system with the
following commands:
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:
8 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
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:
It is usually best to install LAMMPS with the most up to date source files,
which can be done with the "--HEAD" option:
To re-install the LAMMPS HEAD, run this command occasionally (make sure
to use the desired options).
Once LAMMPS is installed, you can test the installation with the Lennard-
Jones benchmark file:
If you have problems with the installation you can post issues to this link.
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
9 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
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.
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.
Download the patch file. You may have to shift-click in your browser to
download the file instead of display it. Patch files have names like
patch.12Dec04.
Put the patch file in your top-level LAMMPS directory, where the
LICENSE and README files are.
Apply the patch by typing the following command your top-level
LAMMPS directory, where the redirected file is the name of the patch
file.
patch -bp1 < patch.12Dec04
A list of updated files print out to the screen. The -b switch creates
backup files of your originals (e.g. src/force.cpp.orig), so you can
manually undo the patch if something goes wrong.
Type the following from the src directory, to enforce consistency
between the src and package directories. This is OK to do even if you
don't use one or more packages. If you are applying several patches, you
only need to type this once at the end.
make package-update
Re-build LAMMPS via the "make" command and you will have the bug-
fix or new feature.
10 of 11 03/08/18, 12:03 PM
https://lammps.sandia.gov/download.html#ubuntu
11 of 11 03/08/18, 12:03 PM