Skip to content

Pymatgen

Pymatgen Development Team

Pymatgen is a Python materials-analysis library combining structure and file-format support with phase diagrams, electronic-structure analysis, thermodynamic calculations and database integrations.

Catalog updated ·

Overview

Pymatgen (Python Materials Genomics) is a Python library for materials analysis. It supplies reusable representations and analytical tools for workflows involving crystal structures, molecules, compositions and electronic-structure calculations. The project README describes it as the analysis code powering the Materials Project, while also supporting use in independent research workflows. It is an analysis toolkit, rather than a standalone predictive model or an autonomous research agent.

The package separates foundational functionality from higher-level analysis. Core objects—including Element, Site, Molecule, Structure, Composition and Lattice—and major electronic-structure file I/O reside in pymatgen-core. Installing pymatgen brings in that dependency and exposes the core classes through pymatgen.core, alongside additional analyses, applications and integrations. Documented input/output coverage includes VASP, ABINIT, Gaussian, CIF and XYZ. Depending on the selected module, workflows can produce phase or Pourbaix diagrams, electronic density-of-states and band-structure analyses, or thermodynamic and reaction calculations.

For researchers assembling materials workflows, Pymatgen provides a bridge between structural or calculation data and domain-specific analysis. Its external integrations include the Materials Project REST API and other materials databases; these databases remain separate resources, not data collections supplied by the library itself. End-user applications and a command-line interface supplement the Python API. The source notes that some functionality, such as POTCAR generation, requires additional setup. Projects needing only core objects and file I/O can instead depend directly on pymatgen-core; the broader package is intended for the higher-level capabilities described here.

Key Features

  • Re-exports `pymatgen-core` representations for elements, sites, molecules, structures, compositions and lattices through `pymatgen.core`.
  • Provides input/output support for VASP, ABINIT, Gaussian, CIF, XYZ and additional scientific file formats.
  • Includes phase-diagram and Pourbaix-diagram generation, reaction analysis, and analyses of local environments, surfaces, interfaces and defects.
  • Supports electronic-structure analysis of density of states and band structure.
  • Provides `pymatgen.entries` data objects for thermodynamic and reaction calculations.
  • Offers external materials-database integrations through `pymatgen.ext`, plus end-user applications and command-line tools.

Use Cases

  • Intended evaluation: read representative CIF or calculation files and assess whether their structures and compositions can be represented consistently for a materials-analysis workflow.
  • Intended evaluation: construct phase or Pourbaix diagrams from suitable thermodynamic entries to investigate a selected chemical system.
  • Intended evaluation: analyze density-of-states or band-structure data from electronic-structure calculations using documented examples.
  • Intended evaluation: combine Materials Project data access with local structure or reaction analysis, assessing the database integration separately from the analysis library.

How to Use

  1. Start with the official documentation and select a workflow: structural file handling, thermodynamic analysis, electronic-structure analysis or database integration. Identify the required inputs before choosing modules.
  2. Review the package split in the repository README. Choose pymatgen for higher-level analyses and integrations, or pymatgen-core when only core objects and file I/O are needed.
  3. Follow the documented installation guidance linked from the README and PyPI listing. Check the requirements for your selected functionality; POTCAR generation is explicitly noted as needing additional setup.
  4. Adapt a relevant example from the documentation or the README-linked matgenb notebooks to a small, representative input. Treat this as an evaluation, checking parsed structures and resulting analyses against your own expectations.
  5. Record the package release and any external data sources used. Consult GitHub releases for changes, and use the MatSci forum for questions or GitHub issues for reproducible problems.

Related resources

ALIGNN

Model

ALIGNN provides atomistic graph neural networks for materials property prediction, with training workflows, pretrained predictors and ALIGNN-FF force fields for structural optimization.

Open sourcePython

Materials Discovery

Allegro

Model

Allegro implements an E(3)-equivariant interatomic potential as a NequIP extension, with documented GPU acceleration options and a separate plugin for LAMMPS simulations.

Open sourcePython

Computational Chemistry · Materials Discovery

An ASE routing Skill in the computational-chemistry-agent-skills collection that separates workflow preparation from calculator configuration and delegates execution elsewhere.

Computational Chemistry · Materials Discovery

CGCNN

Model

CGCNN implements crystal graph convolutional neural networks for learning material properties from crystal structures, with custom-data training and prediction using pre-trained models.

Open sourcePython

Materials Discovery

ChatMOF

Agent

ChatMOF is a code-available research system that uses language-model-guided tools to retrieve MOF data, predict properties and generate structures from natural-language requests.

Open sourcePython

Materials Discovery

ChemAgent (AI4Chem) is a research framework for chemistry and materials tool use, linked to the CheMatAgent paper on tree-search planning, tool execution and ChemToolBench-based training.

Computational Chemistry · Materials Discovery

Related guides

Agents

AI Agents for Chemistry: From Chatbots to Autonomous Research

A practical guide to eight chemistry and biomedical research agents: how tools, memory, planning and multi-agent roles work, which projects fit different tasks, and how to evaluate bounded autonomy with scientific oversight.