pymatgen

Create, convert, and analyze crystal structures with pymatgen workflows.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill pymatgen-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/shushuzn/Rairos/tree/main/skills/pymatgen
Command: npx skills add https://github.com/shushuzn/Rairos --skill pymatgen-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill turns raw crystal, molecule, and electronic-structure files into actionable materials-analysis outputs, including structure manipulation, symmetry analysis, phase stability insights, and electronic/property characterization.

Core Features & Use Cases

  • Crystal and molecular structure modeling: Create and transform structures (supercells, substitutions, primitive/conventional cells) using consistent core classes.
  • Format conversion at scale: Read and write many common materials-science file formats to support computational pipelines and data sharing.
  • Property analysis for computational materials: Perform symmetry and coordination analysis, construct phase diagrams from Materials Project entries, and analyze band structure and DOS from VASP outputs.
  • Materials Project database integration: Query structures, band structures, DOS, and computed entries via MP API for screening and stability studies.
  • Surface and interface workflows: Generate slabs and study adsorption/termination-relevant structures, plus coherent interface construction.
  • Practical workflow scripts and references: Use bundled scripts for converting, analyzing, and generating phase diagrams with clear CLI-style workflows.

Quick Start

Run the structure analyzer script on your POSCAR file and export results to JSON by typing: python scripts/structure_analyzer.py POSCAR --symmetry --neighbors --export json --output analysis.json.

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 extract symmetry information from a POSCAR file?

You can analyze crystal structures by running the bundled structure analyzer script on your POSCAR file to extract symmetry and coordination data, then export the results to JSON for downstream computational pipelines.

How do I construct phase diagrams using Materials Project entries?

You can construct phase diagrams by querying computed entries via the Materials Project API using mp-api, then passing those entries to pymatgen's phase diagram builder to evaluate thermodynamic stability and identify stable phases.

Can I analyze band structure and density of states from VASP outputs?

Yes, you can parse and analyze electronic structure properties including band structure and density of states (DOS) directly from VASP output files to characterize electronic behavior of materials.

Do I need a specific Python environment to run pymatgen workflows?

Yes, you need a pymatgen-compatible Python environment with Python 3.10 or higher and pymatgen version 2023.x or above installed, plus the optional mp-api package if you plan to query the Materials Project database.

What file formats can I convert between for materials science computational pipelines?

The Skill reads and writes many common materials-science file formats, enabling format conversion at scale to support data sharing and integration across different computational chemistry and materials science tools.

How do I generate surface slabs and find adsorption sites for interface studies?

You can generate surface slabs and discover adsorption-relevant sites using pymatgen's surface and interface workflows, which also support coherent interface construction for studying termination structures.