pymatgen-core
Python Materials Genomics is a robust materials analysis code that defines core object representations for structures and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://materialsproject.org). This repository is for pymatgen-core, which implements the core data structures and algorithms.
What it is and what it does
pymatgen-core is the foundational subset of the Pymatgen materials analysis library, split out to provide core data structures and I/O with minimal dependencies. It defines flexible object representations for elements, sites, molecules, and crystal structures, and handles input/output for many computational chemistry codes including VASP, ABINIT, Gaussian, and CIF files. It also includes core analysis tools such as symmetry detection, structure matching, bond valence calculations, and Ewald summation, plus electronic structure data classes for density of states and band structure.
The package is actively maintained as part of the Materials Project ecosystem and is used by thousands of researchers. It imports under the standard pymatgen namespace, so existing code continues to work. If you need higher-level analysis (phase diagrams, Pourbaix diagrams, diffusion analysis), install the full pymatgen package instead, which builds on top of pymatgen-core.
Use it for:
- Parse and manipulate crystal structure files from DFT calculations (VASP, ABINIT, Gaussian) for downstream analysis.
- Detect crystal symmetry and perform lattice/coordinate transformations for structure comparison and matching.
- Build materials science workflows that depend on standardized structure and electronic structure representations.
- Access foundational utilities used by the broader pymatgen ecosystem (atomate, FireWorks, pymatgen-analysis add-ons).
- Calculate bond valence sums and Ewald electrostatic energies for structure validation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pymatgen-core provides core data structures and I/O for materials science, including Element, Site, Molecule, and Structure classes with support for VASP, ABINIT, CIF, Gaussian, and other computational chemistry formats.
Yes, if you work with crystal structures or computational materials data. pymatgen-core is actively maintained, well-documented, and widely used in materials research. It has no known vulnerabilities and permissive licensing. The 18 runtime dependencies add medium install friction, but pre-built wheels for Python 3.11–3.14 across major platforms mitigate this. Install the full pymatgen package instead if you need higher-level analysis modules.
Install
pymatgen-core on PyPI
pip
pip install pymatgen-coreuv
uv add pymatgen-corepoetry
poetry add pymatgen-coreInstalling pymatgen-core
Before you install
Medium install friction due to 18 runtime dependencies including numpy, scipy, matplotlib, and pandas. Active maintenance with a release 1 day old and continuous integration via GitHub Actions. Supports Python 3.11–3.14 with pre-built wheels across macOS, Linux, and Windows.
License in practice
MIT license is permissive; you may use, modify, and distribute pymatgen-core freely in commercial and private projects, provided you retain the license notice.
Quickstart
pip install pymatgen-core
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 as documented in the pymatgen docs.
Verify before relying
- Whether the 18 runtime dependencies can be installed without compilation issues on all supported platforms.
- Performance characteristics of coordinate manipulations and periodic boundary condition handling relative to alternatives.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 18 — bibtexparser, joblib, lxml, matplotlib, monty, networkx, numpy, orjson, palettable, pandas, plotly, requests, scipy, spglib, sympy, tabulate, tqdm, uncertainties |
| Maintenance | actively maintained — 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 701,865/month — #5,288 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pymatgen_core-2026.8.13-cp311-cp311-macosx_11_0_arm64.whl; pymatgen_core-2026.8.13-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pymatgen_core-2026.8.13-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pymatgen_core-2026.8.13-cp311-cp311-win32.whl; pymatgen_core-2026.8.13-cp311-cp311-win_amd64.whl; pymatgen_core-2026.8.13-cp312-cp312-macosx_11_0_arm64.whl; pymatgen_core-2026.8.13-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pymatgen_core-2026.8.13-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pymatgen_core-2026.8.13-cp312-cp312-win32.whl; pymatgen_core-2026.8.13-cp312-cp312-win_amd64.whl; pymatgen_core-2026.8.13-cp313-cp313-macosx_11_0_arm64.whl; pymatgen_core-2026.8.13-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pymatgen_core-2026.8.13-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pymatgen_core-2026.8.13-cp313-cp313-win32.whl; pymatgen_core-2026.8.13-cp313-cp313-win_amd64.whl; pymatgen_core-2026.8.13-cp314-cp314-macosx_11_0_arm64.whl; pymatgen_core-2026.8.13-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pymatgen_core-2026.8.13-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; pymatgen_core-2026.8.13-cp314-cp314-win32.whl; pymatgen_core-2026.8.13-cp314-cp314-win_amd64.whl
Keywords: abinit, analysis, crystal, diagrams, electronic, gaussian, materials, nwchem, phase, project, qchem, science, structure, vasp
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
emmet-coreEmmet-core provides the core data models,…
permissive · top 15,000 on PyPI
mp-apiA Python client for querying and downloading…
permissive · top 15,000 on PyPI
pymatgenPymatgen provides Python classes and analysis…
permissive · top 5,000 on PyPI
pymatgen-io-validationValidates VASP electronic structure calculation…
permissive · top 15,000 on PyPI
atomate2Atomate2 provides a library of pre-built…
permissive · top 15,000 on PyPI
dpdatadpdata converts and manipulates atomistic…
copyleft · top 15,000 on PyPI
pyxtalPyXtal generates crystal structures with…
permissive · top 15,000 on PyPI
moyopyMoyopy is a Python binding for Moyo, a crystal…
permissive · top 15,000 on PyPI
spglibspglib provides Python bindings to a C library…
permissive · top 5,000 on PyPI
chgnetCHGNet is a pretrained graph neural network…
permissive · top 15,000 on PyPI