pymatgen

Automate crystal structure analysis and format conversion across 100+ file formats.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill pymatgen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/scientific-pkg-pymatgen
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill pymatgen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymatgen, mp-api, and includes references (resource) components.

What problem does it solve?

Materials data tooling for crystal structures, phase diagrams, band structures, and Materials Project integration.

Core Features & Use Cases

  • Structure creation and manipulation
  • File format conversion (CIF, POSCAR, etc.)
  • Phase diagrams and thermodynamics
  • Materials Project database access

Quick Start

Install pymatgen and run a basic structure IO example (read CIF, write POSCAR).

Frequently Asked Questions about pymatgen

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

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

Crystal structure file format conversion reads input files in one format (CIF, POSCAR, XYZ, etc.) and writes them to another, automating what would otherwise require manual reformatting. Pymatgen supports 100+ formats, enabling seamless interchange between computational materials science tools.

Can I analyze crystal symmetry and coordination without writing custom code?

Symmetry analysis and coordination analysis automate the identification of crystal point groups, space groups, and atomic coordination environments. Pymatgen provides built-in methods to compute these properties directly from structure objects, eliminating manual geometric calculations.

How do I access Materials Project data and integrate it into my workflows?

Materials Project integration uses the mp-api dependency to query the Materials Project database directly within Python scripts. You retrieve structure, property, and phase-diagram data programmatically, then pass results to pymatgen for further analysis or manipulation.

What's the best way to compute phase diagrams for multi-component systems?

Phase-diagram computation takes thermodynamic data and elemental constraints, then calculates stable phases and phase boundaries. Pymatgen automates this analysis, returning equilibrium phase regions and transition lines for materials exploration.

Can I generate surfaces and interfaces from bulk crystal structures?

Surface and interface generation creates slabs and supercells from bulk structures by cleaving along crystallographic planes and stacking layers. Pymatgen automates miller-index specification, vacancies, and termination options for high-throughput surface studies.

Does pymatgen work with band-structure and DOS data from ab initio calculations?

Band-structure and electronic-structure interpretation read eigenvalue and density-of-states data from computational outputs, then parse and visualize electronic properties. Pymatgen handles multiple formats and supports downstream analysis like band-gap identification and band extrema.