Track the formation, growth, splitting, merging and lifetime of molecular clusters in molecular dynamics trajectories (GROMACS, LAMMPS and any other format MDAnalysis reads).
Documentation: https://emanuelmancio.github.io/MolClusters/
⚠️ Results from v0.6.0 or earlier? Those versions have errors in dipoles, volumes, densities and, in some cases, cluster membership, fixed in v0.7.0. See Known issues in earlier versions for which results are affected and how to correct them.
MolClusters needs Python 3.12 or newer, and is published on PyPI:
uv tool install molclusters # the molclusters command, in an environment of its own # or pip install molclusters # into your current environment, e.g. to use it from Python
Releases are also published as an OCI container image, ghcr.io/emanuelmancio/molclusters,
for Docker, Podman, Apptainer and Singularity (see
Installation).
The latest development version installs from this repository with
pip install git+https://github.com/EmanuelMancio/MolClusters@dev.
It depends on MDAnalysis, NetworkX, NumPy, pandas, Pydantic and a few others, installed automatically.
molclusters traj.xtc topol.tpr config.yml --output-dir results
The user guide covers the
configuration file, the output files and using MolClusters from Python; molclusters -h
lists the command-line options.
Bug reports and pull requests are welcome; for major changes, please open an issue first to discuss what you would like to change. See CONTRIBUTING.md and the developer guide for the development setup and conventions.
If you use MolClusters in your research, please cite it. Every release is archived on Zenodo with its own DOI: cite the version you used, listed on the Zenodo record, or 10.5281/zenodo.23023320 for MolClusters as a whole (it resolves to the latest version). CITATION.cff has the details, and GitHub's "Cite this repository" button formats them.
If you can, please also cite the work MolClusters builds on: MDAnalysis (Michaud-Agrawal et al., J. Comput. Chem. 2011; Gowers et al., SciPy 2016), and, depending on the features you use, the method papers listed in the documentation.
MolClusters is free software, licensed under the GNU LGPL v3 or any later version; see LICENSE and, for the GNU GPL v3 it builds on, COPYING. You can use it as a library from software under any license; changes to MolClusters itself that you distribute must stay under the LGPL. Every file's license is declared per the REUSE specification.
This package was written by Emanuel Fernandes Dias Mancio (ORCID, Lattes), with the important contribution of Prof. Kaline Coutinho (ORCID, Web of Science, Lattes) who supervised the work and gave suggestions to its improvement.
We thank the Brazilian funding agencies CAPES, CNPq and FAPESP for the fellowships and approved research projects. This work was done under FAPESP fellowships for Emanuel Fernandes Dias Mancio (grants: #2022/01284-1, #2025/15166-9), listed in the FAPESP research database.