pymatgen

Automate materials analysis workflows for crystal structures and phase diagrams.

48|6|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/qinyan-ai/qinyan-academic-skills --skill pymatgen-qinyan-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/qinyan-ai/qinyan-academic-skills/tree/main/skills/10-%E6%9D%90%E6%96%99%E7%A7%91%E5%AD%A6%E4%B8%8E%E7%89%A9%E7%90%86%E8%AE%A1%E7%AE%97/pymatgen
Command: npx skills add https://github.com/qinyan-ai/qinyan-academic-skills --skill pymatgen-qinyan-ai

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, programmable toolkit to analyze crystal structures, compute phase diagrams, and interpret electronic structure data, enabling researchers to move from raw calculation outputs to insights with reproducible workflows.

Core Features & Use Cases

  • Structure handling and format conversion: read/write CIF, POSCAR, XYZ, and more, and convert between formats.
  • Structure analysis and symmetry: space-group analysis, coordination environments, and structure matching.
  • Thermodynamics and electronic structure: phase diagrams, DOS, band structure, and Materials Project integration via the mp-api.
  • Use Case: Automate a workflow to relax a structure, analyze its phase stability, and plot a band structure from a VASP calculation.

Quick Start

Install pymatgen and run the included scripts to analyze a sample structure and generate a basic phase diagram.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I convert a crystal structure between CIF and POSCAR formats?

To convert crystal structure formats, you can read CIF, POSCAR, or XYZ files and write them to your desired output format. This toolkit programmatically handles structure manipulation and format conversion for computational materials research workflows.

Can I plot a band structure and density of states from VASP calculations?

You can plot band structure and density of states (DOS) from VASP calculations using this toolkit. It enables researchers to interpret electronic structure data and move from raw calculation outputs to insights with reproducible workflows.

How do I access Materials Project database entries for materials analysis?

You can access Materials Project database entries by integrating the optional mp-api dependency. This allows you to query and retrieve crystal structures and thermodynamic data for high-throughput materials analysis workflows.

Does this toolkit support space-group analysis and structure matching?

Yes, this toolkit supports space-group analysis, coordination environment identification, and structure matching. It automates structure handling and symmetry analysis for computational materials research applications.

What's the best way to automate a high-throughput materials analysis workflow?

The best way to automate high-throughput materials analysis workflows is using this programmable toolkit. It generates reproducible workflows covering structure manipulation, database access, and electronic property computation with robust error handling.