pymatgen-analysis

Consolidate pymatgen.analysis tasks for phase diagrams, structure matching, and surface analyses.

16|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/Hongyu-yu/matsci-ai-skills --skill pymatgen-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen-analysis
Source: https://github.com/Hongyu-yu/matsci-ai-skills/tree/main/skills/pymatgen-analysis
Command: npx skills add https://github.com/Hongyu-yu/matsci-ai-skills --skill pymatgen-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymatgen, mp_api, numpy, matplotlib, pandas, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill consolidates a broad set of pymatgen.analysis tasks (phase diagrams, Pourbaix diagrams, chemical-potential analyses, structure matching, surfaces/interfaces, diffraction, elasticity, magnetism, and related analyses) into a single, activatable module for materials research.

Core Features & Use Cases

  • Thermodynamic diagrams: Phase diagrams, Pourbaix plots, and grand potential analyses.
  • Structure analysis: Matching, local environments, and coordination analysis.
  • Surfaces and interfaces: Slab generation, Wulff shapes, surface properties, and diffusion-related utilities.
  • Data workflows: Load MP entries, perform analyses, and visualize results with minimal context switches.
  • Use Case: A researcher quickly builds a phase diagram for a chemistry system, generates a Pourbaix diagram, and matches a structure to a known prototype in one session.

Quick Start

Clone or load the skill directory and run the included scripts to load pymatgen.analysis workflows into your AI context.

Frequently Asked Questions about pymatgen-analysis

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

FAQPage Schema
How do I generate phase diagrams and Pourbaix diagrams using pymatgen?

Generate phase diagrams and Pourbaix diagrams by loading Materials Project entries into the skill and running included scripts to visualize thermodynamic analyses using pymatgen, numpy, and matplotlib.

What is structure matching in materials science and how does pymatgen handle it?

Structure matching compares crystal structures to known prototypes. This skill consolidates pymatgen's structure matching and local environment coordination analyses into a single activatable workflow for local structures or MP data.

Can I analyze surfaces, interfaces, and Wulff shapes with pymatgen?

Yes, you can analyze surfaces and interfaces by generating slabs, calculating Wulff shapes, and evaluating surface properties. The skill integrates these pymatgen surface and interface utilities directly into your workflow.

Does this skill require mp_api to load Materials Project data for diffraction analysis?

Yes, mp_api is a required dependency for loading MP data. The skill uses it alongside pymatgen to fetch entries and perform diffraction, elasticity, and magnetism analyses reproducibly.

What's the best way to consolidate multiple pymatgen analysis tasks into one workflow?

The best way is to activate this skill to load thermodynamic, structure matching, and surface analysis capabilities together. It minimizes context switches and visualizes reproducible results using pandas and matplotlib.