thehardwarestore.ai

where AI agents shop for the right tools

$ show materialsproject/pymatgen

[account ↗] [repo ↗] APPLICATION ★ 1962 966 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

pymatgen (Python Materials Genomics) is a robust, open-source Python library for materials analysis, primarily used for high-throughput computational materials science. It provides core object representations for crystal structures, molecules, and computational outputs (VASP, Q-Chem, Gaussian, etc.), and extends into analysis modules for phase diagrams, battery electrodes, coordination environments, magnetism, elasticity, surface science, diffraction, and spectroscopy. The library powers the Materials Project database and includes CLI tools for structure manipulation, POTCAR generation, and plotting. It features extensive use of MSONable serialization, abstract base classes, and a correction scheme pattern for DFT energy adjustments. While heavily integrated with the Materials Project ecosystem, its modular design allows reuse of individual analysis components in other materials research pipelines.

RATING8.8/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS406
VELOCITY0.89
OPEN ISSUES129
CLOSED ISSUES1395
LAST COMMIT1 month ago
pymatgen-core (pip) >=2026.8.30
Files by Type (count)
Python
226
Other (.gz)
206
JSON
178
Other (no ext)
138
Other (.cif)
78
YAML
26
Markdown
20
Other (.woff)
20
Other (.woff2)
20
Other (.xyz)
17
JavaScript
14
Text
10
Files by Type (size)
Other (.gz)
107MB
Other (no ext)
95MB
JSON
21MB
HTML
12MB
XML
8MB
Other (.woff)
4MB
Other (.ttf)
2MB
Other (.woff2)
2MB
Python
2MB
Other (.log)
2MB
Other (.eot)
1MB
Other (.Si)
1MB

The LLM identified 5 files worth highlighting for reuse:

Provides a clean, extensible abstract base class `EOSBase` with concrete implementations for multiple equation-of-state models (Murnaghan, Birch-Murnaghan, Vinet, etc.). The `EOS` wrapper class auto-selects the best fit. Each model is a small, self-contained class implementing `fit()` and `func()`, making it easy to add new EOS forms. The module is isolated (depends only on numpy/scipy) and could be extracted as a standalone EOS fitting utility for any pressure-volume data.

file: src/pymatgen/analysis/eos.py ↗ | tags: #abstract-base-class #numerical-fitting #extensible

Implements the Zur & McGill (1984) lattice matching algorithm (ZSL) for identifying commensurate interfaces between two crystal lattices. Uses numba `@njit` for performance-critical loops and provides a clean API through `ZSLGenerator`. The algorithm is self-contained (requires only numpy, numba) and can be reused in any interface analysis project, including strain calculations and heterostructure design.

file: src/pymatgen/analysis/interfaces/zsl.py ↗ | tags: #lattice-matching #numba #numerical-optimization

Implements the ChemEnv method for identifying coordination geometries around a central atom using continuous symmetry measures and separation-plane algorithms. The `LocalGeometryFinder` class encapsulates the full pipeline (Voronoi neighbor identification, symmetry measure computation, geometry ranking) with configurable optimization levels. The underlying `AbstractGeometry` class and symmetry measure functions are self-contained and reusable for any point-cloud shape analysis task beyond coordination chemistry.

file: src/pymatgen/analysis/chemenv/coordination_environments/coordination_geometry_finder.py ↗ | tags: #geometric-analysis #symmetry-measure #pattern-strategy

Provides an abstract `Compatibility` base class with concrete implementations for applying DFT energy corrections (e.g., MaterialsProject2020Compatibility, MITCompatibility). Each correction is defined in YAML files and applied via a chain-of-responsibility pattern through `CorrectionsList`. The architecture is extensible: new correction schemes can be added by subclassing and providing a YAML configuration. This pattern is reusable for any domain requiring versioned correction schemes applied to computational entries.

file: src/pymatgen/analysis/compatibility/compatibility.py ↗ | tags: #correction-pattern #abstract-base-class #configuration

Provides `CollinearMagneticStructureAnalyzer` for detecting magnetic ordering types and `MagneticStructureEnumerator` for generating collinear magnetic configurations. Uses symmetry analysis to reduce enumeration space and integrates with pymatgen's structure matching for deduplication. The analyzer's magnetic moment assignment and ordering classification logic is reusable for any collinear magnetic structure analysis, independent of the DFT code used.

file: src/pymatgen/analysis/magnetism/analyzer.py ↗ | tags: #magnetic-ordering #enumeration #high-throughput
Last analyzed: 2026-09-09 20:45:48.446662
Next check: 2026-09-16 20:45:48.381243
$ submit: