lammps
unoffical LAMMPS Molecular Dynamics Python package
What it is and what it does
lammps is an unofficial Python package that distributes pre-compiled wheels of the LAMMPS molecular dynamics engine. It allows researchers and developers to run molecular simulations directly from Python code or via command-line tools without building LAMMPS from source. The package bundles LAMMPS with most packages enabled and provides both a high-level PyLammps API for Python and a command-line interface (lmp). It supports plugin registration through entry points, allowing developers to extend functionality with custom plugins built against the same MPI version.
The package targets modern Python (3.7+) and is available for Linux (glibc >= 2.28), macOS (>= 11), and Windows. MPI support is included but requires matching the MPI version used in the wheel (MPICH on Unix-like systems, Microsoft MPI on Windows). Installation is straightforward via pip, with an optional [mpi] extra for systems without MPI pre-installed.
Use it for:
- Run molecular dynamics simulations from Python scripts without compiling LAMMPS from source
- Integrate LAMMPS simulations into larger Python workflows for materials science or chemistry research
- Develop and test custom LAMMPS plugins using the entry-point registration system
- Perform quick exploratory simulations via the PyLammps API for educational or prototyping purposes
- Deploy LAMMPS-based applications across multiple platforms using pre-built wheels
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
lammps provides pre-built Python bindings to the LAMMPS molecular dynamics simulator, enabling molecular simulations via Python API or command-line interface across Linux, macOS, and Windows.
Yes, if you need LAMMPS for molecular dynamics work and want to avoid source compilation. The package is actively maintained, has no known vulnerabilities, and provides convenient pre-built wheels across major platforms. However, verify that the GPLv2 copyleft license is compatible with your project's licensing requirements, and confirm that the wheel's MPI version (MPICH or Microsoft MPI) matches your system setup.
Install
lammps on PyPI
pip
pip install lammpsuv
uv add lammpspoetry
poetry add lammpsInstalling lammps
Before you install
Medium install friction due to pre-compiled wheels for multiple platforms (Linux x86_64/aarch64, macOS x86_64/arm64, Windows amd64), but requires glibc >= 2.28 on Linux and macOS >= 11. Repository is actively maintained with recent commits and 3017 stars.
License in practice
Distributed under GNU General Public License v2 (GPLv2), a copyleft license. Any derivative work or modification must be distributed under the same license terms, and source code must be made available to recipients.
Quickstart
pip install lammps
# or with MPI support:
# pip install lammps[mpi]
from lammps import PyLammps
lmp = PyLammps()
# Now use lmp to run LAMMPS commands
Linux requires glibc >= 2.28; macOS requires >= macOS-11. MPI support requires matching MPI version (MPICH on Linux/macOS, Microsoft MPI on Windows).
Verify before relying
- Whether MPI support (MPICH on Linux/macOS, Microsoft MPI on Windows) is required for typical use cases or optional
- Performance characteristics and simulation scale limits compared to native LAMMPS builds
- Whether the package supports all LAMMPS features or if some are disabled in the wheel distribution
Package facts
| License | GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and… (full text in the JSON record) (copyleft) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — importlib_metadata |
| Maintenance | actively maintained — 117 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 83,739/month — #14,050 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: lammps-2025.7.22.4.0-py2.py3-none-macosx_11_0_arm64.whl; lammps-2025.7.22.4.0-py2.py3-none-macosx_11_0_x86_64.whl; lammps-2025.7.22.4.0-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; lammps-2025.7.22.4.0-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; lammps-2025.7.22.4.0-py2.py3-none-win_amd64.whl
Keywords: lammps
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
openbabel-wheelProvides prebuilt Python wheels for OpenBabel,…
copyleft · top 15,000 on PyPI
OpenMMOpenMM is a Python wrapper for a C++ molecular…
permissive · top 15,000 on PyPI
pyocseAutomates simulation workflows for organic…
permissive · top 15,000 on PyPI
rdkit-pypiProvides precompiled wheels for Linux, macOS,…
permissive · top 15,000 on PyPI
dpdatadpdata converts and manipulates atomistic…
copyleft · top 15,000 on PyPI
nodejs-wheelDistributes Node.js prebuilt binaries as Python…
unclear · top 15,000 on PyPI
aseASE provides Python tools for setting up,…
copyleft · top 5,000 on PyPI
nodejs-wheel-binariesDistributes Node.js prebuilt binaries as Python…
permissive · top 5,000 on PyPI
rdkitRDKit is a chemoinformatics toolkit providing…
permissive · top 5,000 on PyPI
alchemlybalchemlyb parses molecular dynamics simulation…
permissive · top 15,000 on PyPI