skillfed

pymatgen

Python Materials Genomics is a robust materials analysis code that defines core object representations for structures

pymatgen v2026.5.4 929.4K downloads/30d#4,705 on PyPI1,942
Permissive license MIT Active released

What it is and what it does

Pymatgen is a materials analysis library that provides object-oriented representations of crystalline structures, molecules, and sites, along with tools for reading and writing computational chemistry file formats (VASP, ABINIT, Gaussian, CIF, XYZ, and others). It is used by thousands of researchers and underpins the Materials Project, a large-scale materials database and analysis platform.

The library includes analysis capabilities for phase diagrams, Pourbaix diagrams, diffusion analysis, reaction pathways, and electronic structure properties like density of states and band structure. It integrates with the Materials Project REST API and is optimized for coordinate manipulations using NumPy and SciPy vectorization. The codebase is actively maintained by the Materialyze Lab, the ABINIT group, and other research teams, with continuous integration testing and a growing ecosystem of community add-ons.

Use it for:

  • Parse and manipulate crystal structures from VASP, ABINIT, or Gaussian output files for post-processing analysis
  • Generate phase diagrams and Pourbaix diagrams for thermodynamic stability assessment
  • Analyze electronic structure data including band structures and density of states
  • Query and download structures and properties from the Materials Project database
  • Automate high-throughput computational materials workflows with standardized structure handling

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Pymatgen provides Python classes and analysis tools for materials science workflows, including structure representation, file I/O for computational chemistry formats (VASP, ABINIT, Gaussian, CIF), phase diagrams, electronic structure analysis, and integration with the Materials Project REST API.

Yes. Pymatgen is a mature, actively maintained library with no known vulnerabilities, low install friction, and broad adoption in computational materials science. The MIT license imposes no restrictions. Install it if you work with crystal structures, computational chemistry outputs, or materials databases; skip it if your work does not involve materials analysis.

Install

pymatgen on PyPI

pip

pip install pymatgen

uv

uv add pymatgen

poetry

poetry add pymatgen

Installing pymatgen

Before you install

Low install friction with a single runtime dependency (pymatgen-core). Active maintenance with last commit 2026-08-13 and continuous integration via GitHub Actions. Used by thousands of researchers and powers the Materials Project analysis pipeline.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both academic and commercial projects. No copyleft obligations.

Quickstart

pip install pymatgen

from pymatgen.core import Structure
struct = Structure.from_file('structure.cif')

Requires Python 3.11 or later. Some functionality (e.g., POTCAR generation) requires additional setup beyond the base install.

Verify before relying

  • Specific performance characteristics for large structure datasets or high-throughput workflows
  • Completeness of Materials Project REST API integration and any rate-limiting behavior
  • Availability and maturity of the add-on ecosystem mentioned in the description

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pymatgen-core
Maintenance actively maintained — 102 days since the last release
Last repo commit
First released
Downloads 929,373/month — #4,705 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pymatgen-2026.5.4-py3-none-any.whl

Keywords: ABINIT, VASP, analysis, crystal, diagrams, electronic, gaussian, materials, nwchem, phase, project, qchem, science, structure

Development Status :: 4 - BetaIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: ChemistryTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: PhysicsTopic :: Software Development :: Libraries :: Python Modules

Tags

materials structure analysis pythonVASP ABINIT file parsingphase diagram generationcrystal structure manipulationelectronic structure DOS band structurecomputational materials sciencematerials project integration
materials-sciencecomputational-chemistrycrystal-structures

More Python Modules packages