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.
2.1 How do I get a copy of LAMMPS?
3.1 I ran LAMMPS, but nothing prints to the screen.
4.1 What am I allowed to do with LAMMPS and its source code?
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.
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
2.2 Will LAMMPS run on my machine?LAMMPS is very portable. It should build on any platform with a C++ compiler. The GNU g++ compiler or commercial compilers work fine. I have built LAMMPS for several parallel and desktop machines, which all run Unix or Linux variants, and for a Mac (OS X).
The Build doc pages have information about making LAMMPS.
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 Microsoft C++ compiler such as Visual Studio using tools that users have provided. See the src/WINDOWS/README.txt file for details.
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++. 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.
2.6 Is the current LAMMPS (C++) as fast as the old ones (F90, F77)?Good question. In general, yes. Although there is a bit of variation across machines and compilers, I have rarely seen a difference of more than 5-10% in performance between the current LAMMPS version (C++) and the older versions (F90, F77). Sometimes the C++ version is a bit faster; sometimes a bit slower. This is not surprising since the C++ routines that do the serious computations in LAMMPS are written in a simple C-like style, using data structures that are nearly equivalent to Fortran arrays. This was done to try and avoid any performance hits.
For metals simulations with EAM potentials, LAMMPS is faster than a predecessor parallel MD code ParaDyn. This is because the force computation and neighbor list building is implemented in a different way, and hence the one-processor timing is 2-4x faster.
LAMMPS reads commands from standard input, so if all you see is the LAMMPS version number, it is probably waiting for input. You could type in commands but that would be tedious. You need to put commands in a text file or input script like in.lj and run LAMMPS like this:
lmp_linux < 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.
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 on the bug and new feature page with a BACKWARD COMPATIBILITY note.
LAMMPS is an open-source code licensed under the GNU Public License (GPL), so you can do anything you wish with it, so long as any code you distribute (LAMMPS itself, a modified version of LAMMPS, your own code that contains portions of LAMMPS) remains open-source. Distributed code should also retain the GPL license notice and copyright information that appears in LAMMPS source files.
The open source philosophy is discussed on this 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 it to me 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.