pymatgen

Create, transform, and analyze crystal structures and materials data programmatically.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/Hung-3008/agusta --skill pymatgen-hung-3008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/Hung-3008/agusta/tree/main/.agents/skills/pymatgen
Command: npx skills add https://github.com/Hung-3008/agusta --skill pymatgen-hung-3008

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Pymatgen provides programmable tools to create, transform, and analyze crystal structures and materials data, enabling researchers to implement reproducible workflows.

Core Features & Use Cases

  • Structure creation and manipulation, file format conversions, symmetry analysis, phase diagrams, electronic structure analysis, surfaces, and Materials Project API interactions.
  • Use cases include high-throughput structure screening, converting between CIF/POSCAR/XYZ, and building phase diagrams from computed entries.
  • Example: automatically generate a set of doped structures and prepare corresponding VASP inputs for HT screening.

Quick Start

Load a crystal structure file with Structure.from_file and start a basic pymatgen analysis workflow.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I convert between CIF and POSCAR crystal structure files for VASP calculations?

Pymatgen provides programmable tools to convert crystal structure files between CIF, POSCAR, and XYZ formats. You load the structure using Structure.from_file and export it to your target format for reproducible VASP inputs and high-throughput screening.

What is the best way to build phase diagrams from computed entries?

Building phase diagrams from computed entries is supported by programmable materials analysis tools. You process the entries directly to visualize thermodynamic stability across different compositional phases and enable reproducible analyses.

Can I automate generating doped structures for high-throughput screening?

Automating doped structure generation for high-throughput screening is fully supported. The toolkit allows you to programmatically create and transform crystal structures, then prepare corresponding VASP inputs for reproducible automated workflows.

Does this materials analysis toolkit require the mp-api dependency to interact with the Materials Project?

Interacting with the Materials Project API requires the optional mp-api dependency. Core crystal structure manipulation, symmetry analysis, and file conversion rely on the base pymatgen and pyyaml dependencies, while mp-api extends functionality.

How do I perform symmetry analysis on a loaded crystal structure?

To perform symmetry analysis, load your crystal structure file using Structure.from_file to start a basic pymatgen workflow. This programmatically identifies space groups and symmetry operations within your materials data for reproducible analyses.

What Python version is required for reproducible materials data workflows?

Reproducible materials data workflows require Python 3.10 or higher. This environment satisfies the dependencies needed for script-driven workflows, ensuring stable structure generation, electronic structure analysis, and phase diagram processing.