pymatgen

Analyze, transform, and integrate crystal structures with pymatgen workflows.

34|7|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/jkitchin/skillz --skill pymatgen-jkitchin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/jkitchin/skillz/tree/main/skills/programming/pymatgen
Command: npx skills add https://github.com/jkitchin/skillz --skill pymatgen-jkitchin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides users through pymatgen workflows for structure manipulation, symmetry, materials databases, and DFT input generation and analysis.

Core Features & Use Cases

  • Structure creation, loading, and transformation (supercells, slabs)
  • Symmetry analysis, Wyckoff sites, and coordination
  • Materials Project integration for structure retrieval and property data
  • DFT input generation (VASP, Gaussian, etc.) and output parsing
  • Electronic structure analysis (band structure, DOS, PDOS)

Quick Start

Load a CIF, analyze symmetry, and generate VASP inputs for relaxation.

Frequently Asked Questions about pymatgen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load and analyze crystal structures from CIF and POSCAR files?

Load structures from CIF, POSCAR, or XYZ files using pymatgen's Structure class, then analyze symmetry, lattice properties, and Wyckoff sites using SpacegroupAnalyzer to understand atomic arrangements and coordination environments.

Can I generate VASP input files for DFT calculations from a crystal structure?

Yes. pymatgen's MPRelaxSet and related VASP input sets automatically generate INCAR, POTCAR, KPOINTS, and POSCAR files configured for relaxation and electronic structure calculations from a Structure object.

How do I query the Materials Project database for structures and properties?

Use pymatgen's MPRester to query the Materials Project API, retrieving crystal structures, band structures, density of states, and computed properties by material ID or chemical composition for integration into workflows.

What's the best way to create supercells and surface slabs for computational studies?

Use pymatgen's transformation tools to generate supercells by scaling the lattice, create surface slabs by removing layers, and apply substitutions to modify structures for high-throughput or defect calculations.

Can I analyze electronic structure data like band structures and PDOS from DFT outputs?

Yes. pymatgen parses VASP outputs including EIGENVAL and DOSCAR files, enabling analysis of band structures, density of states, and projected DOS for understanding electronic properties and band gaps.

Do I need coding experience to work with pymatgen workflows?

pymatgen is a Python library requiring programming familiarity, but this Skill provides guided workflows that abstract core operations like structure loading, transformation, and VASP input generation into reusable patterns.