pymatgen Materials Analysis
A rigorous skill for validating, converting, and symmetry-analyzing crystal structures with current pymatgen APIs, plus offline phase diagrams and bounded Materials Project queries.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Safely ingests CIF/POSCAR/XYZ/JSON structures while capturing every parser warning, reporting units, occupancies, oxidation states, periodicity, and coordinate mode.
- Sweeps
symprecandangle_tolerancegrids to produce a space-group sensitivity report instead of tuning tolerances until a preferred answer appears. - Plans representation loss before format conversion (selective dynamics, site properties, disorder) and only ever writes to a new path.
- Builds strict, offline convex-hull phase diagrams from schema-validated computed energies; parses VASP
vasprun.xmland writes/reads Q-Chem jobs. - Keeps Materials Project access dry-run by default;
--executeallows one bounded summary query with recorded provenance, license, and citations.
Who it's for
- DFT practitioners, computational materials graduate students, and materials data engineers.
- Anyone who needs auditable provenance and parameters for publication-grade structure analysis.
- Teams that want careful, quota-respectful Materials Project usage rather than bulk scraping.
Examples
- "Check whether this CIF triggers partial-occupancy or site-merging warnings" → runs
composition_structure_validator.py structure structure.cifand reports warnings plus minimum interatomic distances. - "How tolerance-sensitive is this structure's space group?" →
symmetry_sensitivity_report.py structure.cif --symprec 0.001,0.01,0.1 --angle-tolerance 1,5. - "Find on-hull phases in Li-Fe-O" → review the
mp_query.py --chemsys Li-Fe-Odry-run plan, then approve--executewith an explicit output file.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/pymatgen/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/pymatgen folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pymatgen/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/pymatgen ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Install Python 3.11+ and uv.
- Clone the repo:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/pymatgen ~/.claude/skills/ - In your project folder, pin dependencies:
uv init --python 3.11, thenuv add "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4", thenuv sync --frozen. - Restart Claude Code and ask something like "use the pymatgen skill to validate this CIF file".
- Only if you need Materials Project data, export
MP_API_KEYin your shell or secret manager — never pass the key as a CLI argument.
View source on GitHub ↗License: MIT