Back to Skills

pymatgen

Comprehensive guidance for using pymatgen (Python Materials Genomics) for computationalmaterials science. Covers structure creation and manipulation, file I/O (CIF, POSCAR, XYZ),symmetry analysis, Materials Project API integration, phase diagrams, electronic structureanalysis, and DFT input generation. Use when working with crystal structures, materialsproperties, computational chemistry calculations, or materials databases. Triggers include'pymatgen', 'crystal structure', 'Materials Project', '

15stars2forksUpdated 3/3/2026

Security Assessment

Safe(100/100)
Security Score100/100

About pymatgen

Pymatgen (Python Materials Genomics) is a comprehensive library for computational materials science. It provides tools for the creation, manipulation, and analysis of crystal structures, as well as for integration with materials databases and computational chemistry tools. The library supports a variety of file formats (e.g., CIF, POSCAR, XYZ) for structure import/export and enables analysis of symmetry, space groups, electronic structures, and more. Pymatgen is particularly useful for researchers and engineers working in fields like materials science, computational chemistry, and physics, where crystal structure analysis and property calculations are essential.

FAQ

How do I create a crystal structure using pymatgen?

You can create structures from scratch using pymatgen's Element, Lattice, and Structure classes. Refer to 'references/core-objects.md' for detailed guidance on structure creation.

What file formats does pymatgen support for input and output?

Pymatgen supports a variety of formats including CIF, POSCAR, and XYZ for input and output. It can auto-detect formats when reading structure files.

Can pymatgen be used for electronic structure analysis?

Yes, pymatgen allows for parsing and visualizing band structures and density of states (DOS), as well as analyzing outputs from computational tools like VASP.

Does pymatgen integrate with the Materials Project?

Yes, pymatgen has integration with the Materials Project API, enabling users to retrieve structures and properties directly from the Materials Project database.

Is there support for creating supercells or slabs in pymatgen?

Yes, pymatgen provides functionality to manipulate structures, including creating supercells, slabs, and applying symmetry operations. These tasks are covered in 'references/transformations.md'.

All Files

2 files
SKILL.md10.3 KB
View
README.md9.5 KB
View

Install pymatgen

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

jkitchin/skillz