This is a simple FAQ for the LAMMPS molecular dynamics package. It mainly points to sections of the LAMMPS documentation and pages of the LAMMPS WWW Site.
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 features1.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. This section of the LAMMPS manual 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 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 page2.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).
This section of the LAMMPS documentation has information about making LAMMPS.2.3 Can LAMMPS be built for MS Windows?
I have not built it for a Windows machine, but there is no reason it shouldn't build under cygwin or using a Microsoft C++ compiler. In the src/MAKE directory, there is a Notes.windows file from Jim Ma at OSU as to how he tweaked LAMMPS to build under the Visual C++ compiler.2.4 Do I need any other packages to run LAMMPS?
If you want to run LAMMPS in parallel, you need to have MPI installed on your machine. If you want to use the particle-particle particle-mesh solver (PPPM) for long-range Coulombics, you need a FFT library, such as FFTW or a native vendor library.
Details are explained in this section of the LAMMPS documentation.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 this section of the LAMMPS documentation.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 in this_section of the LAMMPS documentation.3.3 I wish LAMMPS had feature X.
Check if it's something being worked on, on this page of the LAMMPS documentation.
LAMMPS is designed to be easy to modify and extend. Here is an explanation of 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 this section of the LAMMPS documentation for information about how to report bugs.3.5 My scripts from older versions of LAMMPS don't run anymore.
The current LAMMPS version has (nearly) all the features of previous versions, as well as many new ones. However, the name and syntax of many commands have changed and you can't read old binary restart files. Old data files can be read with a minor change or two.
Hey, I never promised backward compatibility with old input scripts. If you want to see the kind of problems that backward compatibility leads to, visit this WWW site. Seriously, this page has more details on upgrading from older versions of LAMMPS.
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 WWW Site.
Details are discussed in this section of the LAMMPS documentation.
If you send me a citation for your paper, we'll include it on the Publications page of the LAMMPS WWW Site. Ditto for a picture or movie for the Pictures or Movies pages.