pymatgen

Analyze crystalline materials and their properties using pymatgen.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/dotruru/claudemd --skill pymatgen-dotruru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/dotruru/claudemd/tree/main/skills/pymatgen
Command: npx skills add https://github.com/dotruru/claudemd --skill pymatgen-dotruru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymatgen, mp-api, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Pymatgen provides a comprehensive toolkit for researchers to create, analyze, and transform crystal structures, perform format conversions, analyze symmetry, build phase diagrams, study electronic structures, and access Materials Project data programmatically.

Core Features & Use Cases

  • Structure creation and manipulation: build or modify crystal structures and molecules, export to multiple formats, and perform transformations.
  • File I/O & format conversion: read/write 100+ file formats, enabling interoperability across codes and workflows.
  • Symmetry & structure analysis: determine space groups, lattice parameters, and coordination environments to simplify analyses.
  • Phase diagrams & thermodynamics: construct phase diagrams, evaluate stability, and explore decomposition pathways.
  • Electronic structure analysis: analyze band structures and DOS, and integrate with VASP and other codes.
  • Surfaces, interfaces, and high-throughput workflows: generate slabs, study surfaces, and drive large-scale computational workflows with Materials Project data.
  • Materials Project integration: programmatic access to materials data for screening and phase-space exploration.

Quick Start

Install pymatgen and optional dependencies, then run the included scripts to analyze structures, generate phase diagrams, and perform electronic-structure workflows.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I analyze crystal structures and determine their symmetry?

Crystal structure analysis determines space groups, lattice parameters, and coordination environments to simplify symmetry analysis. You can build or modify structures and automate these structural evaluations using pymatgen's Python toolkit.

Can I build phase diagrams and evaluate material thermodynamic stability?

Yes, you can construct phase diagrams to evaluate thermodynamic stability and explore decomposition pathways. Pymatgen builds these diagrams programmatically to analyze material properties and screen candidates for high-throughput workflows.

How do I convert between different file formats for electronic structure calculations?

File format conversion reads and writes over 100 formats, enabling interoperability across electronic structure codes. You can export structures to multiple formats and analyze band structures or DOS, integrating directly with VASP and other simulation codes.

Do I need Python 3.10 and mp-api to access Materials Project data?

Python 3.10 or higher and pymatgen are required, while mp-api is an optional dependency for Materials Project integration. Installing mp-api enables programmatic access to materials data for screening and phase-space exploration workflows.

What is the best way to generate slabs and study surfaces for high-throughput workflows?

Generating slabs and studying surfaces is handled by pymatgen's surface generation tools within high-throughput workflows. This approach drives large-scale computational workflows by integrating directly with Materials Project data for phase-space exploration.

Why does pymatgen require specific dependencies for materials analysis?

Pymatgen requires specific dependencies because its advanced materials analysis capabilities rely on pymatgen core libraries and mp-api for Materials Project integration. These dependencies ensure proper structure manipulation, format conversion, and electronic structure analysis workflows.