skillfed

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.

pymatgen-core v2026.8.13 701.9K downloads/30d#5,288 on PyPI24
Permissive license MIT Active released

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-core

uv

uv add pymatgen-core

poetry

poetry add pymatgen-core

Installing 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

Development Status :: 4 - BetaIntended Audience :: Science/ResearchOperating 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

crystal structure representationmaterials science data structuresDFT code file I/Osymmetry and lattice operationscomputational materials analysisstructure matching and analysiselectronic structure data classes
materials-sciencecrystallographycomputational-chemistry

More Python Modules packages