NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4512 most downloaded on PyPI
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).
Last release 12 days ago
23 Sep 2026
Release timing varies
gaps range from 9 days to 6 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
9 versions withdrawn
withdrawn after publishing
15 years old
414 releases · first in 2011
Backwards incompatible*: pymatgen.SETTINGS have been moved to pymatgen.settings.SETTINGS. In general, this should not lead to many breakages since mos…
Add a new interface to OPTIMADE-compliant APIs in pymatgen.ext.optimade (@mkhorton, #2066)
all_cg.txt, in packageOne column per quarter.
* Misc bug fixes.
Nothing published for this version
Patch release to restore CompositionError to preserve backwards compatibility.
CompositionError to preserve backwards compatibility.Addition of new job types to Q-Chem IO (@espottesmith, #2055), note metal_edge_extender has been moved into local_env for this change
metal_edge_extender has been moved into local_env for this changeEnd of 2020 release with minor bug fixes for cli scripts.
New IsayevNN nearest-neighbor algorithm (@utf, #2011)
Site insertion algorithm based on charge density (@jmmshn, #1997)
Bug fix for PhononBandStructureSymmLine. (@gpetretto)
Bug fix for neutron diffraction get_plot.
Nothing published for this version
Cube parsing and Cube integration to Bader (@nwinner, #1967)
Specie to Species, Specie will be retained for backwards compatibility (@shyuep, #1963)A supplemental update, v2020.10.9.01, was pushed to add back the Specie and DummySpecie root-level convenience imports, to preserve backwards compatibility.
Fix for deprecation warning in MPRester (@rkingsbury, #1951)
New GibbsComputedStructureEntry (@mattmcdermott, #1921)
Change neighbor-finding algorithm extension to C instead of C++ for better cross-platform robustness (@chc273)
Add validation and extrapolation for stitching XAS (@yimingcheng)
Bug fix for boltztrap2 spin support. (@fraricci)
EwaldSummation is now MSONable (@lbluque).
Bug fix: serialization of slabs (@utf)
Make Slabs properly serializable in as_dict. Fixes #1892.
New: Support for parsing WAVECARS with spin-orbit coupling (@mturiansky, #1861)
Improved SQS caller. (@rwoodsrobinson)
New high-symmetry k-path algorithm (@munrojm, @kt-latimer)
Added angle_tolerance to CifWriter.
New MonteCarloRattleTransformation and phonopy integration (@utf)
Plugin architecture for pymatgen.
New connectivity analysis in Chemenv (@davidwaroquiers)
Improvements to reaction calculator (@mattmcdermott)
* Respect KSPACING in INCAR. * Bug fixes.
Add option to VaspInputSet to write output with POTCAR.spec
Major refactoring of ABINIT IO to remove workflow-based packages (@gmatteo)
1. Fix compile args.
Faster get_all_neighbors based on @chc273's improvements. get_all_neighbors now returns a Site-like object with nn_distance, image and index attribute
IRSpectra class (@henriquemiranda)
Updates to annotation, docstrings, etc. Linting service now provided on Github Actions as well as CircleCI.
Massive updates to type annotations, especially for core classes.
Supplemental release to address missing incar_parameters.json
New fast Pourbaix algorithm (@montoyjh)
This release is missing an incar_parameters.json file, please install the supplemental v2019.9.8 release.
pycodestyle now enforced, except on tests. Developers should install
Update DOSCAR from lobster (@JaGEO)
More type hint annotations (@shyuep)
Add CubicSupercellTransformation and PerturbedSupercellsTransformation (@rees-c, @utf)
Improvements to grain boundary transformations and Rester (@Tinaatucsd)
New interface class (@sivonxay, @kylebystrom, @shyamd)
Linear scaling get_all_neighbors. Tested to be faster for > 100 atoms (@chc273).
New VASP Input Set "from previous" interface (@utf)
Numerous updates and improvements to defect classes (@dbroberg)
Small speeds to Structure.get_all_neighbors.
Improvements to MimimumDistanceNN (@jmmshn)
Bug fixes for OrderDisorderComparator (@utf), custom k-points in MPNonSCFSet (@dyllamt), battery app (@jmmshn), MPSOCSet (@mkhorton), more
Streamlined Site, PeriodicSite, Molecule and Structure code by abandoning immutability for Site and PeriodicSite.
Streamlined Site, PeriodicSite, Molecule and Structure code by abandoning immutability for Site and PeriodicSite.
VaspInput class now supports a run_vasp method, which can be used to code runnable python scripts for running simple calculations (custodian still recommended for more complex calculations.). For example, the following is a kpoint convergence script that can be submitted in a queue
from pymatgen import MPRester
from pymatgen.io.vasp.sets import MPRelaxSet
VASP_CMD = ["mpirun", "-machinefile", "$PBS_NODEFILE", "-np", "16", "vasp"]
def main():
mpr = MPRester()
structure = mpr.get_structures("Li2O")[0]
for k_dens in [100, 200, 400, 800]:
vis = MPRelaxSet(structure,
user_kpoints_settings={"reciprocal_density": k_dens})
vi = vis.get_vasp_input()
kpoints = vi["KPOINTS"].kpts[0][0]
d = f"Li2O_kpoints_{kpoints}"
# Directly run vasp.
vi.run_vasp(d, vasp_cmd=VASP_CMD)
# Use the final structure as the new initial structure to speed up calculations.
structure = Vasprun(f"{d}/vasprun.xml").final_structure
if __name__ == "__main__":
main()
Many pymatgen from_file methods now support pathlib.Path as well as strings.
Misc bug fixes.
Type hints now available for core classes.
New EntrySet class for easy manipulation of entries to grab subsets,
New Trajectory class for MD simulations (@sivonxay)
Improvements to local environment code (@utf)
Pymatgen is now Py3 ONLY. If you need Py27 support, please use versions < 2019.1.1.
Support for IUPAC ordering of elements in Composition formulae (@utf)
PMG_MAPI_ENDPOINT environment variable added to support different endpoints for the Materials Project REST interface (@mkhorton)MPRester.query now supports bulk queries for large scale requests. (@dwinston)
Ionic radius based CrystalNN (@computron)
Your coding agent can read these notes before it upgrades. Set up the MCP server →