How to install LAMMPS in Windows

\(\renewcommand{\AA}{\text{Å}}\)

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

https://packages.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 website also explains how to install the Windows MPI package (MPICH2 from Argonne National Labs), needed to run in parallel with MPI.

The LAMMPS binaries contain all optional packages included in the source distribution except: KIM, KOKKOS, MSCG, PYTHON, ADIOS, H5MD, NETCDF, QMMM, ML-QUIP, and VTK. The serial version also does not include the MPIIO and LATBOLTZ packages. The GPU package is compiled for OpenCL with mixed precision kernels.

The LAMMPS library is compiled as a shared library and the LAMMPS Python module is installed, so that it is possible to load LAMMPS into a Python interpreter.

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

\(\renewcommand{\AA}{\text{Å}}\)

You can download LAMMPS as an executable or as source code.

When downloading the LAMMPS source code, you also have to build LAMMPS. But you have more flexibility as to what features to include or exclude in the build. When you download and install pre-compiled LAMMPS executables, you are limited to install which version of LAMMPS is available and which features are included of these builds. If you plan to modify or extend LAMMPS, then you must build LAMMPS from the source code.

Note

If you have questions about the pre-compiled LAMMPS executables, you need to contact the people preparing those executables. The LAMMPS developers have no control over their choices of how they configure and build their packages and when they update them.

  • 2.1. Download an executable for Linux
  • 2.2. Download an executable for Mac
  • 2.3. Download an executable for Windows
  • 2.4. Download an executable for Linux or Mac via Conda
  • 2.5. Download source and documentation as a tarball
  • 2.6. Download the LAMMPS source with git

These are the files and sub-directories in the LAMMPS distribution:

README

Short description of the LAMMPS package

LICENSE

GNU General Public License (GPL)

SECURITY.md

Security Policy for the LAMMPS package

bench

benchmark problems

cmake

CMake build files

doc

documentation

examples

simple test problems

fortran

Fortran wrapper for LAMMPS

lib

additional provided or external libraries

potentials

interatomic potential files

python

Python wrappers for LAMMPS

src

source files

tools

pre- and post-processing tools

unittest

sources and inputs for testing LAMMPS

You will have all of these if you download source. You will only have some of them if you download executables, as explained on the pages listed above.

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

http://packages.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 web site also explains how to install the Windows MPI package (MPICH2 from Argonne National Labs), needed to run in parallel with MPI.

The LAMMPS binaries contain all optional packages included in the source distribution except: KIM, KOKKOS, MSCG, PYTHON, ADIOS, H5MD, NETCDF, QMMM, ML-QUIP, and VTK. The serial version also does not include the MPIIO and LATBOLTZ packages. The GPU package is compiled for OpenCL with mixed precision kernels.

The LAMMPS library is compiled as a shared library and the LAMMPS Python module is installed, so that it is possible to load LAMMPS into a Python interpreter.

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

Can LAMMPS run on Windows?

One option for compiling LAMMPS on Windows natively is to install a Bash shell, Unix shell utilities, Perl, Python, GNU make, and a GNU compiler ported to Windows. The Cygwin package provides a unix/linux interface to low-level Windows functions, so LAMMPS can be compiled on Windows.

What is LAMMPS MPI?

LAMMPS is written to use the ubiquitous MPI (Message Passing Interface) library API for distributed memory parallel computation. You need to have such a library installed for building and running LAMMPS in parallel using a domain decomposition parallelization. It is compatible with the MPI standard version 2.

What is a LAMMPS binary?

The LAMMPS binaries contain all optional packages included in the source distribution except: KIM, KOKKOS, MSCG, PYTHON, ADIOS, H5MD, NETCDF, QMMM, ML-QUIP, and VTK. The serial version also does not include the MPIIO and LATBOLTZ packages. The GPU package is compiled for OpenCL with mixed precision kernels.