Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

pymatgen Materials Analysis

Analyze, validate, convert, and transform crystal structures and computed materials data with reproducible, provenance-preserving pymatgen workflows.

Data & AnalyticsAdvanced33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

Guides work with current pymatgen APIs (pymatgen 2026.5.4 / pymatgen-core 2026.7.16) in a way that keeps every result auditable.

  • Structure & composition validation: parses CIF/POSCAR and reports occupancies, disorder, oxidation-state decoration, minimum interatomic distances, and every parser warning instead of silently accepting fixes.
  • Symmetry sensitivity: sweeps symprec and angle_tolerance grids so space-group assignments come with their tolerance context.
  • Format conversion: produces a representation-loss plan first, writes only to a new path, and round-trip-checks the properties you care about.
  • Local phase diagrams: builds convex hulls offline from a strict JSON schema that requires total energies from one compatible correction scheme.
  • VASP / Q-Chem I/O: parses band structures and DOS selectively from vasprun.xml while forcing convergence, k-path, and Fermi-level checks.
  • Materials Project queries: dry-run planning by default; --execute allows exactly one bounded query with explicit fields, filters, and result caps.
  • Artifact manifests: checksums, versions, and sources for full provenance.

Who it's for

  • Materials and chemistry researchers validating DFT-derived numbers before publication
  • Graduate students building crystal-structure cleanup or conversion pipelines
  • Labs consuming Materials Project data who must respect CC BY attribution and citations
  • Anyone running computational workflows where reproducibility (pinned versions, provenance) matters

Examples

  1. "Can I trust this CIF?"composition_structure_validator.py structure.cif surfaces partial occupancies, site-merging warnings, and suspiciously close atom pairs in one pass.
  2. "My space group disagrees with the paper"symmetry_sensitivity_report.py structure.cif --symprec 0.001,0.01,0.1 explains the gap between the Materials Project convention (0.1 Å) and pymatgen's 0.01 Å default.
  3. "Is my Li-Fe-O structure on the hull?" — collect same-scheme total energies into JSON and run phase_diagram_generator.py entries.json --analyze Li2O for hull distance and decomposition products.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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 /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/pymatgen ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Make sure Claude Code is installed and you can open a terminal.
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r scientific-agent-skills/skills/pymatgen ~/.claude/skills/
  5. Install Python 3.11+ and uv, then from the skill folder run uv venv --python 3.11 .venv-pymatgen followed by uv pip install --python .venv-pymatgen/bin/python "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4".
  6. (Optional) For Materials Project access, export the key only as a shell variable: export MP_API_KEY=your_key. Never pass it as a CLI argument or commit it to a file.
  7. Restart Claude Code and ask something like "validate this CIF file" to trigger the skill.
  8. Sanity-check the tooling with python scripts/composition_structure_validator.py --help.