pymatgen

Create, transform, and analyze crystalline structures with pymatgen.

52|6|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ovachiever/droid-tings --skill pymatgen-ovachiever
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/ovachiever/droid-tings/tree/main/skills/pymatgen
Command: npx skills add https://github.com/ovachiever/droid-tings --skill pymatgen-ovachiever

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymatgen, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Pymatgen is a comprehensive materials-analysis library for creating, transforming, and analyzing crystal structures, files formats, and materials data, enabling streamlined materials research workflows.

Core Features & Use Cases

  • Structure creation, manipulation, and I/O across 100+ formats
  • Phase diagrams, Pourbaix, and thermodynamics analyses
  • Structure analysis, symmetry, and local environment tools
  • Supports integration with Materials Project data

Quick Start

Basic structure creation and CIF/POSCAR I/O in minutes.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I read and convert between crystal structure file formats like CIF and POSCAR?

Pymatgen automatically detects and converts between 100+ structure formats including CIF, POSCAR, and XYZ. Load a structure with `Structure.from_file()`, then save it in your target format using `.to()` method, enabling seamless format interoperability for materials workflows.

Can I analyze crystal symmetry and local coordination environments in structures?

Yes. Pymatgen provides symmetry analysis tools and local environment analyzers that identify coordination polyhedra, nearest neighbors, and symmetry operations within crystal structures, supporting detailed structural characterization and high-throughput screening.

What's the best way to compute phase diagrams and thermodynamic properties?

Pymatgen includes phase diagram and Pourbaix diagram generators that consume thermodynamic data to construct equilibrium diagrams. Integrate with Materials Project data for pre-computed entries, enabling rapid thermodynamic analysis without manual calculations.

How do I generate surfaces and interfaces from bulk crystal structures?

Pymatgen's surface generation tools create slabs and interfaces from bulk structures by specifying Miller indices and vacuum thickness. These generated surfaces support catalysis, adsorption, and interface studies in computational materials research.

Can I programmatically access Materials Project data within my workflow?

Yes. Pymatgen integrates directly with the Materials Project API, allowing you to query and retrieve pre-computed structure, thermodynamic, and property data, then manipulate it locally for batch analysis and high-throughput pipelines.

Does pymatgen support batch processing of multiple structures in scripts?

Pymatgen is fully scriptable and designed for batch workflows. Load multiple structure files, apply transformations, compute properties, and export results programmatically, enabling integration into high-throughput computational pipelines and automation.