pymatgen-materials

Analyze crystal structures and retrieve Materials Project properties with pymatgen.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill pymatgen-materials
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen-materials
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/02-chemistry/pymatgen-materials
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill pymatgen-materials

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps researchers rapidly analyze crystal structures and compute science-ready results by combining structure manipulation, symmetry analysis, and Materials Project property lookups.

Core Features & Use Cases

  • Crystal structure manipulation: Load crystals from CIF/POSCAR/XYZ, build supercells, apply substitutions, and transform structures.
  • Materials Project API queries: Retrieve band gap, DOS-related info, formation energy, and stability metrics like e_above_hull.
  • Phase diagrams and symmetry analysis: Construct phase diagrams for stability in composition space and determine space-group symmetry with conventional/primitive cells.
  • When to use: Comparing candidate polymorphs, screening materials for stability, and preparing inputs for downstream DFT workflows using pymatgen objects and MP-derived data.

Quick Start

Use this skill to analyze the stability and symmetry of a Materials Project candidate by querying its properties and generating a phase-diagram-ready workflow for crystal structures.

Frequently Asked Questions about pymatgen-materials

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

FAQPage Schema
How do I retrieve band gap and formation energy from Materials Project for crystal structure analysis?

To retrieve band gap and formation energy for crystal structure analysis, query the Materials Project API using MPRester. This requires a valid MP_API_KEY to fetch electronic-structure summaries and stability metrics for inorganic materials.

How do I construct a phase diagram to assess material stability in a composition space?

To assess material stability in a composition space, construct a phase diagram using pymatgen's PhaseDiagram functionality. This evaluates the e_above_hull metric to determine whether candidate polymorphs are thermodynamically stable.

Can I parse CIF and POSCAR files to detect space group symmetry?

Yes, you can parse CIF, POSCAR, and XYZ files to detect space group symmetry. The SpacegroupAnalyzer tool determines conventional and primitive cells from loaded crystal structures for downstream materials-science screening.

Do I need an MP_API_KEY to compute formation energy and e_above_hull metrics?

Yes, an MP_API_KEY is required to compute formation energy and e_above_hull metrics. The mp-api dependency utilizes this key within MPRester to authenticate and retrieve stability data from the Materials Project database.

What is the best way to prepare crystal structures for downstream DFT workflows?

The best way to prepare crystal structures for downstream DFT workflows is by applying structural transformations in pymatgen. You can build supercells, apply substitutions, and generate phase-diagram-ready objects to screen candidate materials.