3. Build LAMMPS — LAMMPS documentation

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

# 3. Build LAMMPS

LAMMPS is built as a library and an executable from source code using a build environment generated by CMake (Unix Makefiles, Ninja, Xcode, Visual Studio, KDevelop, CodeBlocks and more depending on the platform). Using CMake is the preferred way to build LAMMPS. In addition, LAMMPS can be compiled using the legacy build system based on traditional makefiles for use with GNU make (which may require manual editing). Support for the legacy build system is slowly being phased out and may not be available for all optional features.

As an alternative, you can download a package with pre-built executables or automated build trees, as described in the Install section of the manual.

- 3.1. Build LAMMPS with CMake
- 3.2. Build LAMMPS with make
- 3.3. Link LAMMPS as a library to another code
- 3.4. Basic build options
- 3.5. Optional build settings
- 3.6. Include packages in build
- 3.7. Packages with extra build options
- 3.8. Build the LAMMPS documentation
- 3.9. Notes for building LAMMPS on Windows
- 3.10. Notes for saving disk space when building LAMMPS from source
- 3.11. Development build options