pymatgen

Analyze crystalline materials data using the pymatgen Python API.

6|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill pymatgen-pur3v4d3r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/pur3v4d3r/pur3-pkb-codebase/tree/main/.claude/skills/__scientific-skills/pymatgen
Command: npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill pymatgen-pur3v4d3r

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 comprehensive Python toolkit to manage, analyze, and transform crystalline materials data, reducing the friction of handling many file formats and complex workflows.

Core Features & Use Cases

  • Structure creation, manipulation, and analysis (Structure, Lattice, Molecule, Composition)
  • File format conversion across CIF, POSCAR/CONTCAR, XYZ, PDB, JSON/YAML, and more
  • Symmetry and space-group analysis, structure matching, and coordination environments
  • Phase diagrams, thermodynamics, and Materials Project integration for high-throughput workflows
  • Electronic structure analysis (band structure, DOS), surfaces, and interfaces
  • Integration with external tools (ASE, BoltzTraP, AiiDA) and robust I/O scripting
  • Use Case: Build and analyze a phase diagram from a set of computed entries and generate VASP inputs for a high-throughput study

Quick Start

Install pymatgen and start by loading a structure from a file with Structure.from_file('POSCAR').

Frequently Asked Questions about pymatgen

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

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

To analyze a phase diagram from computed entries, use the pymatgen toolkit to build and visualize thermodynamic stability. It provides comprehensive Python APIs to process high-throughput data and generate VASP inputs for further study.

Can I retrieve and analyze electronic structure data like band structures?

Symmetry and space-group analysis in pymatgen identifies crystal coordination environments and performs structure matching. It uses the underlying lattice and atomic positions to determine the symmetry of the crystalline material.

Does pymatgen work with the Materials Project API for high-throughput workflows?

You can integrate external tools like ASE, BoltzTraP, and AiiDA with pymatgen. The toolkit provides structure and file format conversion capabilities that bridge these frameworks, enabling end-to-end materials analysis workflows.

What is the best way to generate VASP inputs for a high-throughput study?

To start analyzing crystalline materials, install pymatgen and its mp-api dependency. You can then load a structure from a file like POSCAR using the Structure class and begin manipulating its lattice and composition.