pymatgen

Convert and analyze crystallographic and electronic-structure data with pymatgen.

Updated May 24, 2026
One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill pymatgen-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/pymatgen
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill pymatgen-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Pymatgen helps you turn raw crystallographic and electronic-structure inputs into ready-to-use structure objects and analysis outputs, saving time in materials modeling and post-processing.

Core Features & Use Cases

  • Structure I/O & Format Conversion: Read and write crystal and molecular structures across many common formats (e.g., CIF, POSCAR, XYZ) for seamless workflow handoffs.
  • Structure Symmetry & Local Environment Analysis: Determine space group symmetry and coordination environments to validate models and interpret local structure.
  • Phase Diagram & Electronic Structure Tools: Build phase diagrams and analyze band structure and DOS from computational outputs for stability and electronic property assessment.
  • Surfaces, Interfaces & Workflow Automation: Generate slabs, study adsorption sites, and prepare inputs for common electronic-structure codes (notably VASP), enabling end-to-end computational pipelines.

Quick Start

Use the pymatgen skill to analyze the structure file structure.cif by loading it, reporting its reduced formula and space group, and exporting it to POSCAR.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I convert a CIF file to POSCAR format for crystal structures?

You can convert CIF to POSCAR format using pymatgen by loading the crystallographic file, analyzing the structure, and exporting it to your desired format for computational workflow handoffs. The tool supports automated file format detection across CIF, POSCAR, and XYZ.

How do I determine space group symmetry and coordination environments from crystal structures?

Space group symmetry and coordination environments are determined using pymatgen by loading a structure file and running structure symmetry analysis. This validates computational models and interprets local structural environments for materials characterization.

Can I build phase diagrams and analyze band structure from computational outputs?

Yes, you can build phase diagrams and analyze band structure and density of states (DOS) using pymatgen. It processes computational outputs to assess thermodynamic stability and electronic properties for materials evaluation.

Does pymatgen require mp-api for Materials Project queries?

Pymatgen requires the mp-api package specifically for Materials Project queries. Core structure manipulation, file conversion, and analysis functions operate independently without this optional dependency.

Can I generate slabs and adsorption sites for VASP computational workflows?

Yes, pymatgen generates slabs, studies adsorption sites, and prepares inputs for common electronic-structure codes including VASP. This enables end-to-end computational pipelines for surface and interface modeling.

What is the best way to analyze crystallographic data for materials modeling without manual post-processing?

The best way to analyze crystallographic data is using pymatgen to convert raw inputs into analysis-ready structure objects. It automates format detection, symmetry characterization, and electronic structure evaluation for computational workflows.