LAMMPS website

LAMMPS FAQ (Frequently Asked Questions)

This is a simple FAQ for the LAMMPS molecular dynamics package. It mainly points to pages within the LAMMPS documentation or pages of the LAMMPS website.


1.1 What is LAMMPS?
1.2 What can LAMMPS do?
1.3 What can't LAMMPS do?
1.4 What other MD codes are out there?
1.5 How do I plot or visualize LAMMPS output?
1.6 What is the connection between LAMMPS and Pizza.py?

2.1 How do I get a copy of LAMMPS? 2.2 Will LAMMPS run on my machine? 2.3 Can LAMMPS be built for MS Windows? 2.4 Do I need any other packages to run LAMMPS? 2.5 What about older versions of LAMMPS?

3.1 I ran LAMMPS, but nothing prints to the screen.
3.2 LAMMPS doesn't get the same answer when run on different numbers of processors or on different machines.
3.3 I wish LAMMPS had feature X.
3.4 I found a bug in LAMMPS.
3.5 My scripts from older versions of LAMMPS don't run anymore.

4.1 What am I allowed to do with LAMMPS and its source code?
4.2 What if I modify or enhance LAMMPS?
4.3 What if I write a paper using LAMMPS results?

1.1 What is LAMMPS?

LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel Simulator. It's a classical molecular dynamics (MD) code. As the name implies, it's designed to run well on parallel machines, but it also runs fine on single-processor desktop machines.

1.2 What can LAMMPS do?

Here is a list of features

1.3 What can't LAMMPS do?

Here is a list of non-features

1.4 What other MD codes are out there?

See this page for a list of other freely-available molecular dynamics codes that may be well-suited to the problems you want to model.

1.5 How do I plot or visualize LAMMPS output?

LAMMPS itself does not do post-processing or visualization. However it's output can be directly used by several post-processing and viz tools that are distributed with the LAMMPS package in the tools directory. LAMMPS output can be processed by the Pizza.py toolkit in various ways to produce plots and pictures and animations. And LAMMPS output can be converted into formats for input into a variety of other visualization packages. The Howto viz doc page discusses visualization options.

1.6 What is the connection between LAMMPS and Pizza.py?

Pizza.py is a separate package from LAMMPS which provides tools for doing setup, analysis, plotting, and visualization for LAMMPS and other simulation codes. Pizza.py is written in Python and is available for download from GitHub or this page.


2.1 How do I get a copy of LAMMPS?

LAMMPS is an open-source code. A gzipped tar file of LAMMPS source, documentation, auxiliary tools, and example inputs/outputs can be downloaded from this page or from GitHub

2.2 Will LAMMPS run on my machine?

LAMMPS is very portable. It should build on any platform with a modern C++ compiler. Depending on the LAMMPS version and included features, a compiler conforming to the C++11 or C++17 standard is required. The GNU g++ compiler, Clang compiler or commercial compilers work fine. LAMMPS has been successfully built on Linux, macOS, Windows, FreeBSD, and Solaris.

The Build doc pages have information about compiling LAMMPS from source. LAMMPS is also available as precompiled packages for Linux distributions, though Conda, or through automated build tools like Homebrew or Spack.

2.3 Can LAMMPS be built for MS Windows?

Yes. There are executables available for Windows on the LAMMPS download site. The source code can also be built for a Windows machine. Either for cygwin (see src/MAKE/Makefile.cygwin) or using a Linux-to-Windows cross-compiler or Microsoft Visual Studio can be used. The Notes for building LAMMPS on Windows manual page has more information.

2.4 Do I need any other packages to run LAMMPS?

If you want to run LAMMPS in parallel across multiple compute nodes, you need to have MPI installed on your machine. Commonly used Open Source implmentations are MPICH and OpenMPI.

2.5 What about older versions of LAMMPS?

The current LAMMPS is written in C++11. Older versions of LAMMPS were written in F90 (LAMMPS 2001) and F77 (LAMMPS 99). A summary of their features is listed here. The Fortran versions do not have all the features of the C++ version, nor is any further development planned for them, other than bug fixes. But if you prefer working in Fortran, the older versions are available from the download page.


3.1 I ran LAMMPS, but nothing prints to the screen.

LAMMPS reads commands from standard input, so if all you see is the LAMMPS version number, it is probably waiting for input. You need to put commands in a text file or input script like in.lj and run LAMMPS like this:

lmp_linux -in in.lj 

This is explained in the Run doc pages.

3.2 LAMMPS doesn't get the same answer when run on different numbers of processors or on different machines.

In theory you should get identical answers on any number of processors and on any machine. In practice, numerical round-off can cause slight differences and eventual divergence of molecular dynamics phase space trajectories. This is discussed in more detail on the Errors common doc page.

3.3 I wish LAMMPS had feature X.

LAMMPS is designed to be easy to modify and extend. The Modify doc pages explain how to go about adding your own new capabilities.

Finally, you can send mail to the developers with your idea or submit a Feature Request Issue on GitHub

3.4 I found a bug in LAMMPS.

See the Errors bugs doc page for information about how to report bugs.

3.5 My scripts from older versions of LAMMPS don't run anymore.

As new features are added we occasionally change the syntax of commands, so that an old version may no longer work. You should get an error, not a silent bad result. These kinds of changes are documented in the Release Notes on GitHub and on the bug and new feature page with a BACKWARD COMPATIBILITY note. Also, changed or removed commands and packages are documented in the LAMMPS manual here


4.1 What am I allowed to do with LAMMPS and its source code?

LAMMPS is an open-source code licensed under the GNU Public License version 2.0 (GPLv2), so you can do anything you wish with it, unless you want to re-distribute it. Any code you distribute (LAMMPS itself, a modified version of LAMMPS, your own added code that contains portions of LAMMPS) must remain open-source under the GPL. Distributing a version with modified or added source code should should clearly indicate that, best by changing the name. It must also retain the GPL license notice and copyright information that appears in LAMMPS source files.

The open source philosophy and our interpretation of it is discussed on this manual page.

4.2 What if I modify or enhance LAMMPS?

You're free to do so and, in fact, encouraged to do so. As this page discusses, if your enhancement is of general utility, you can send submit it as a pull request on GitHub for inclusion in future versions of the code.

4.3 What if I write a paper using LAMMPS results?

Please cite the paper that describes LAMMPS and include a pointer to the LAMMPS website. Details are explained on this page.

If your paper has an interesting image or movie associated with the simulations, you can send it to the developers and we can post it on the LAMMPS website on the Pictures or Movies pages.