pymatgen

Analyzes and manipulates crystal structures and materials data via pymatgen core classes and common file formats.

15|2|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/rubensliv/k-dense-ai --skill pymatgen-rubensliv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen
Source: https://github.com/rubensliv/k-dense-ai/tree/main/scientific-skills/pymatgen
Command: npx skills add https://github.com/rubensliv/k-dense-ai --skill pymatgen-rubensliv

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 a robust, programmable toolkit to analyze, transform, and manage crystal structures and materials data, reducing manual, error-prone workflows.

Core Features & Use Cases

  • Structure creation, manipulation, and analysis for crystals and molecules.
  • File format I/O across CIF, POSCAR, XYZ, PDB, JSON, YAML, and more with automatic format detection.
  • Symmetry analysis, phase diagram construction, and Materials Project data access via the mp-api.
  • High-throughput workflow support and integration with common materials science tools.

Quick Start

Read a CIF file and write it as POSCAR using pymatgen's standard I/O utilities.

Frequently Asked Questions about pymatgen

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

FAQPage Schema
How do I convert a CIF file to POSCAR format for crystal structure analysis?

To convert a CIF file to POSCAR format, you can use pymatgen's standard I/O utilities to read the CIF structure and write it out as a POSCAR file. This automatic format detection simplifies transforming crystal structures for further analysis.

What is the best way to access Materials Project data for high-throughput discovery?

The best way to access Materials Project data is by using the mp-api MPRester interface provided. It allows programmatic retrieval of materials data, enabling efficient high-throughput discovery workflows directly within your analysis environment.

Does pymatgen support building phase diagrams from computed materials data?

Yes, pymatgen supports phase diagram construction from computed materials data. You can import phase diagram modules to analyze thermodynamic stability and reaction pathways, turning raw materials data into actionable structural insights.

Can I perform symmetry analysis on crystal structures using Python?

You can perform symmetry analysis on crystal structures using Python by applying pymatgen's core classes. These tools analyze molecular and crystalline symmetry, reducing manual, error-prone workflows in structure manipulation and characterization.

What file formats are supported for reading and writing molecular and crystal structures?

Supported file formats for structure I/O include CIF, POSCAR, XYZ, PDB, JSON, and YAML. The toolkit features automatic format detection, allowing seamless reading and writing across these diverse file types for materials data management.