pymatgen
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
Profile →npx skills add majiayu000/claude-skill-registry --skill pymatgen --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Pymatgen is a Python library for materials analysis. It enables creating and manipulating crystal structures and molecules, analyzing symmetry and coordination, computing phase diagrams and thermodynamic properties, examining electronic structure (band structures, DOS), generating surfaces and interfaces, and accessing the Materials Project database programmatically. It also supports conversion between file formats and setting up high-throughput computational workflows.
How it works
- Provides core classes and methods to read structures from files (Structure.from_file), create structures from scratch, transform structures (e.g., SupercellTransformation, SubstitutionTransformation, PrimitiveCellTransformation), and write outputs in various formats (struct.to(filename="...")).
- Integrates with Materials Project via MPRester for retrieving structures, entries, and band structures; requires MP_API_KEY to be set.
- Offers file format conversion via Structure.from_file and struct.to for multiple formats; includes a scripts/structure_converter.py utility for batch conversions.
- Supports structure analysis (SpacegroupAnalyzer for symmetry, CrystalNN for coordination) and advanced analyses (diffraction patterns, elastic properties, magnetic ordering).
- Includes modules for electronic structure analysis (Vasprun, BSPlotter, DosPlotter) and for surface/interface analysis (SlabGenerator, WulffShape, AdsorbateSiteFinder).
- Contains workflows for phase diagrams (PhaseDiagram, PDPlotter) and materials project workflows (MPRelaxSet, MPStaticSet, MPNonSCFSet) for VASP and other codes.
When to use it
- When working with crystal structures or molecular systems in materials science
- When converting between structure file formats (CIF, POSCAR, XYZ, etc.)
- When analyzing symmetry, space groups, or coordination environments
- When computing phase diagrams or assessing thermodynamic stability
- When analyzing electronic structure data (band gaps, DOS, band structures)
- When generating surfaces, slabs, or studying interfaces
- When accessing the Materials Project database programmatically
- When setting up high-throughput computational workflows
- When analyzing diffusion, magnetism, or mechanical properties
- When working with VASP, Gaussian, Quantum ESPRESSO, or other computational codes
What it can touch
- Uses tools like mp_api.client.MPRester, Vasprun, BSPlotter, DosPlotter, XRDCalculator, SlabGenerator, WulffShape, AdsorbateSiteFinder, and various pymatgen.io.* classes.
- Includes scripts/structure_converter.py, scripts/structure_analyzer.py, and scripts/phase_diagram_generator.py for operations.
Caveats
- License is MIT; references Materials Project API access via environment variable MP_API_KEY as described in the quick-start.
- Some features require API keys or external software integrations (e.g., VASP, Gaussian, Quantum ESPRESSO) for full workflow execution.
# Pymatgen - Python Materials Genomics ## Overview Pymatgen is a comprehensive Python library for materials analysis that powers the Materials Project. Create, analyze, and manipulate crystal structures and molecules, compute phase diagrams and thermodynamic properties, analyze electronic structure (band structures, DOS), generate surfaces and interfaces, and access Materials Project's database of computed materials. Supports 100+ file formats from various computational codes. ## When to Use This Skill This skill should be used when: - Working with crystal structures or molecular systems in materials science - Converting between structure file formats (CIF, POSCAR, XYZ, etc.) - Analyzing symmetry, space groups, or coordination environments - Computing phase diagrams or assessing thermodynamic stability - Analyzing electronic structure data (band gaps, DOS, band structures) - Generating surfaces, slabs, or studying interfaces - Accessing the Materials Project database programmatically - Setting up high-throughput computational workflows - Analyzing diffusion, magnetism, or mechanical properties - Working with VASP, Gaussian, Quantum ESPRESSO, or other computational codes ## Quick St
- Overview
- When to Use This Skill
- Quick Start Guide
- Installation
- Basic Structure Operations
- Materials Project Integration
- Core Capabilities
- 1. Structure Creation and Manipulation
- 2. File Format Conversion
- 3. Structure Analysis and Symmetry
- 4. Phase Diagrams and Thermodynamics
- 5. Electronic Structure Analysis
- 6. Surface and Interface Analysis
- 7. Materials Project Database Access
Core pymatgen uv pip install pymatgen With Materials Project API access uv pip install pymatgen mp-api Optional dependencies for extended functionality uv pip install pymatgen[analysis] # Additional analysis tools uv pip install pymatgen[vis] # Visualization tools Set up API key export MP_API_KEY="your_api_key_here" Single file conversion
What does the pymatgen skill do?
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill pymatgen --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.