# 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.

Repository: https://github.com/materialsproject/pymatgen
Canonical: https://ross.abutalabs.com/products/pymatgen
Homepage: https://pymatgen.org
Language: Python
License: NOASSERTION
License Family: other
Topics: materials, science, materials-science, materials-informatics, python
Last push: 2026-08-18T04:31:44+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 82, longevity 100
- inputs: {"age_days": 5428, "days_push": 15, "days_rel": 121, "gap_med": 10.0, "n_releases_24m": 27}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1944, forks 965 (observed 2026-08-28T04:05:57.631673+00:00)

## What it is
Pymatgen (Python Materials Genomics) is a robust open-source Python library for materials analysis, defining core classes for crystal structures, molecules, and compositions with extensive file I/O for electronic structure codes like VASP, ABINIT, and Gaussian. It provides powerful analysis tools including phase diagrams, Pourbaix diagrams, band structure analysis, and integrates with the Materials Project REST API.

## Use cases
- parse and write VASP, CIF, and Gaussian input/output files for crystal structures
- generate phase diagrams and Pourbaix diagrams from thermodynamic data
- analyze band structures and density of states from DFT calculations
- build and manipulate crystal structure and molecule objects in Python
- query the Materials Project database for materials data
- analyze diffusion and reaction pathways in materials
- study surfaces, interfaces, defects, and elasticity of materials

## When to choose
- you need a mature, widely-adopted toolkit for computational materials science in Python
- you work with electronic structure codes like VASP or ABINIT and need robust file I/O
- you want to build materials informatics workflows on top of Materials Project data
- you need crystal structure manipulation, symmetry analysis, or structure transformations

## When to avoid
- you only need core structure objects and want a lighter install - use pymatgen-core instead
- your work is purely molecular simulation without periodic structures - ASE or RDKit may fit better
- you need a GUI for structure visualization - pymatgen is primarily a programmatic library

## Facets
- artifact type: library
- maturity: stable
- function: data-science, simulation, parser, cli, sdk, math, data-visualization
- domain: chemistry, data-science, developer-tools, files
- platform: python, cli, cross-platform
- tags: materials-science, materials-informatics, crystallography, computational-chemistry, vasp, electronic-structure, phase-diagrams, crystal-structures, materials-project, algorithms

## Member repositories
- materialsproject/pymatgen (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:57.631673+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:08:00.557181+00:00, confidence not recorded.
  - readme: https://github.com/materialsproject/pymatgen (fetched 2026-08-28T04:05:57.631673+00:00, sha 8a46123eece0)
  - homepage: https://pymatgen.org (fetched 2026-08-29T10:47:07.231077+00:00, sha f815e8937d95)
  - site_page: https://pymatgen.org/installation.html (fetched 2026-08-29T10:47:07.241565+00:00, sha 6d7715c396fd)
  - site_page: https://pymatgen.org/installation (fetched 2026-08-29T10:47:07.248537+00:00, sha 6d7715c396fd)
  - site_page: https://pymatgen.org/pymatgen.html (fetched 2026-08-29T10:47:07.244565+00:00, sha 61e8648fd0f4)
  - site_page: https://pymatgen.org/pymatgen (fetched 2026-08-29T10:47:07.246611+00:00, sha 61e8648fd0f4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
