pymatgen

Create, analyze, and convert crystal structures with pymatgen.

33.0k|3.2k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill pymatgen-k-dense-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/pymatgen
Command: npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill pymatgen-k-dense-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 programmable toolkit for materials analysis, enabling researchers to create, analyze, and convert crystal structures, access phase diagrams, electronic structure data, and materials databases programmatically.

Core Features & Use Cases

  • Structure creation, manipulation, and file I/O across 100+ formats (CIF, POSCAR, XYZ, etc.).
  • Phase-diagram and thermodynamics analysis using Materials Project data.
  • Electronic structure analysis and workflow integration for high-throughput research.
  • Reference workflows and scripting support to automate materials discovery pipelines.

Quick Start

Create a simple Structure from CIF and print its space group.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I programmatically analyze and convert crystal structures from CIF files?▼

To analyze crystal structures programmatically, this Skill provides scripts for creating, manipulating, and converting structural files. It supports 100+ formats including CIF, POSCAR, and XYZ for file I/O and analysis directly in Python.

What is the best way to build phase diagrams using Materials Project data?▼

Building phase diagrams is achieved through programmable access to thermodynamics analysis tools. The Skill integrates with Materials Project data via the optional mp-api dependency to construct and analyze phase diagrams for materials research.

Do I need Python 3.10 or higher to run pymatgen workflows?▼

Yes, Python 3.10 or higher is required to run these materials analysis workflows. The environment must also include the pymatgen and optional mp-api dependencies to execute structure creation and high-throughput data integration tasks.

Can I automate high-throughput electronic structure analysis for materials discovery?▼

Yes, you can automate high-throughput electronic structure analysis. The Skill provides reference workflows and scripting support to automate materials discovery pipelines, integrating electronic structure data into high-throughput research workflows.

Does this Skill support surface structure generation and analysis?▼

Yes, surface structure analysis and transformation is supported. The Skill gives programmable access to build, analyze, and transform materials structures including surfaces, electronic structures, and crystal structures for research.