pymatgen

Manage and analyze molecular structures and materials data with Python.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill pymatgen-generalreasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/crystallographic-wyckoff-position-analysis/environment/skills/pymatgen
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill pymatgen-generalreasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pymatgen provides a comprehensive, Python-based toolkit for analyzing, transforming, and managing crystal structures and materials data, enabling researchers to load, convert, and analyze structures across multiple formats in a streamlined workflow.

Core Features & Use Cases

  • Create, manipulate, and convert crystal structures (CIF, POSCAR, XYZ, etc.) and molecular data.
  • Analyze symmetry, space groups, and coordination environments; generate conventional/primitive cells.
  • Build phase diagrams, thermodynamic analyses, and explore electronic structures (band structure, DOS).
  • Access Materials Project data programmatically and drive high-throughput materials workflows.

Quick Start

Load a CIF structure and generate a phase diagram for a Li-Fe-O system.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I convert and analyze crystal structures from a CIF file in Python?

You can load and convert crystal structures from CIF files using this Python toolkit, which supports transforming structural data and analyzing symmetry or space groups across multiple formats like POSCAR and XYZ.

What is the best way to generate a phase diagram for a specific chemical system?

Generating a phase diagram for chemical systems like Li-Fe-O is supported by this toolkit, allowing you to build phase diagrams and perform thermodynamic analyses directly within your Python workflow.

Can I extract and analyze electronic structure data such as band structure and DOS?

Yes, analyzing electronic structure data is supported, allowing you to process and visualize band structures and density of states (DOS) to understand the electronic properties of your materials.

Does this materials analysis toolkit require a connection to the Materials Project database?

No, connecting to the Materials Project database is optional; the toolkit independently handles structural transformations, symmetry analysis, and local file processing, but offers integration for high-throughput workflows.

How do I perform symmetry analysis and generate conventional or primitive cells?

Symmetry analysis is handled natively by the toolkit, enabling you to determine space groups, identify coordination environments, and generate conventional or primitive cells from your input structures.