github.com/materialsproject/pymatgen ↗
Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
Open this visualization on its own page →
Contributors
249
Lines of Code
114,718
From
2011-10-23
To
2020-12-19
About materialsproject/pymatgen
Pymatgen (Python Materials Genomics) is a robust, open-source Python library for materials analysis that powers the Materials Project. It provides classes for representing structures and molecules with support for reading and writing files from major electronic structure codes like VASP, ABINIT, Gaussian, and others. The library has been refactored so that core data objects and file I/O functionality live in a separate lean package called pymatgen-core, which pymatgen installs automatically and extends with higher-level analyses and integrations.
Beyond basic structure representation, pymatgen offers extensive analysis capabilities including phase diagrams, Pourbaix diagrams, reaction analysis, local environments, surfaces, interfaces, defects, electronic structure analyses (density of states and band structure), and calculations for properties like magnetism, piezoelectricity, and elasticity. It also provides thermodynamic and reaction calculation tools through entry and thermo data objects, REST API integration with materials databases, and command-line tools for end-users.
The project is widely used by thousands of researchers and is actively maintained by the Materialyze Lab, the ABINIT group, and contributors worldwide. It emphasizes robustness through continuous integration testing, comprehensive documentation, and performance optimization using numpy and scipy. The library is distributed under the MIT License and welcomes community contributions, with resources including official documentation, tutorials, YouTube videos, and community forums for support.