pymatgen-materials

pymatgen-materials is a skill for Claude Code, Codex from beita6969/ScienceClaw. It costs 91 tokens per session (1,645 once invoked), scanned A, original, MIT.

A Python toolkit for studying solid materials, including crystal structures, phase diagrams, electronic structure, and symmetry. It also reads and writes common computational-materials files such as CIF and VASP formats.

In plain words
What is it for?
Use it to create and modify crystals, study thermodynamic stability, analyze band structures and density of states, determine symmetry, and process structure files.
Why use it?
It brings common materials-science calculations and file handling into one programmable workflow, reducing manual conversion and analysis.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to create and modify crystals, study thermodynamic stability, analyze band structures and density of states, determine symmetry, and process structure files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/beita6969/scienceclaw/pymatgen-materials
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add beita6969/ScienceClaw --skill pymatgen-materials
Clone the repo
git clone --depth 1 https://github.com/beita6969/ScienceClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pymatgen-materials

README.md
[![agentmods](https://agentmods.dev/badge/skills/beita6969/scienceclaw/pymatgen-materials/github.svg)](https://agentmods.dev/skills/beita6969/scienceclaw/pymatgen-materials)
Your own site
<a href="https://agentmods.dev/skills/beita6969/scienceclaw/pymatgen-materials"><img src="https://agentmods.dev/badge/skills/beita6969/scienceclaw/pymatgen-materials/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pymatgen-materials

Your own site · 80×15
<a href="https://agentmods.dev/skills/beita6969/scienceclaw/pymatgen-materials"><img src="https://agentmods.dev/badge/skills/beita6969/scienceclaw/pymatgen-materials.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,645 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.01645
Opus 5 $0.00046 $0.00822
Sonnet 5 $0.00018 $0.00329
Haiku 4.5 $0.00009 $0.00164

Measured 8d ago against content hash 19b2b9016e28, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pymatgen-materials scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pymatgen-materials/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pymatgen Materials Science

Materials science analysis using pymatgen for crystal structures, phase diagrams, electronic structure, and computational materials workflows.

When to Use

  • Crystal structure creation, manipulation, and visualization
  • Phase diagram construction and thermodynamic stability analysis
  • Electronic structure (band structure, DOS) parsing and plotting
  • Symmetry analysis and space group determination
  • Reading/writing VASP, CIF, POSCAR, and other structure formats

When NOT to Use

  • Molecular chemistry or drug design (use rdkit-chemistry)
  • Protein or biomolecular structure (use biopython-bio)
  • General plotting without materials context (use matplotlib-viz)
  • Machine learning on materials data (use dedicated ML frameworks)

Crystal Structure Creation

from pymatgen.core import Structure, Lattice, Molecule

# Create from spacegroup and Wyckoff positions
structure = Structure.from_spacegroup(
    "Fm-3m", Lattice.cubic(5.43), ["Si"], [[0, 0, 0]]
)

# Create from file
structure = Structure.from_file("POSCAR")
structure = Structure.from_file("structure.cif")

# Create manually with lattice parameters
lattice = Lattice.from_parameters(a=3.84, b=3.84, c=3.84, alpha=90, beta=90, gamma=90)
structure = Structure(lattice, ["Cu", "Cu", "Cu", "Cu"],
                      [[0, 0, 0], [0.5, 0.5, 0], [0.5, 0, 0.5], [0, 0.5, 0.5]])

# Hexagonal lattice
lattice = Lattice.hexagonal(a=2.46, c=6.71)

Structure Properties and Manipulation

# Basic properties
print(structure.lattice)                      # lattice vectors
print(structure.lattice.abc)                  # a, b, c lengths
print(structure.lattice.angles)               # alpha, beta, gamma
print(structure.volume)                       # unit cell volume
print(structure.density)                      # density in g/cm^3
print(structure.composition)                  # chemical formula
print(len(structure))                         # number of sites

# Space group and symmetry
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
sga = SpacegroupAnalyzer(structure)
print(sga.get_space_group_symbol())           # e.g., "Fm-3m"
print(sga.get_space_group_number())           # e.g., 225
print(sga.get_point_group_symbol())           # e.g., "m-3m"
conventional = sga.get_conventional_standard_structure()
primitive = sga.get_primitive_standard_structure()

# Supercell and perturbation
supercell = structure.copy()
supercell.make_supercell([2, 2, 2])
structure.perturb(0.01)                       # random perturbation

# Write to file
structure.to(filename="POSCAR")
structure.to(filename="output.cif")
structure.to(fmt="poscar")                    # return as string

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 178 lines · 91 tokens per session scan A 19b2b9016e28

Subscribe to this mod's changes

pymatgen-materials is a skill published in the GitHub repository beita6969/ScienceClaw (898 stars, last pushed 3mo ago), licensed MIT. It adds 91 tokens to every session and 1,645 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…

synthetic-sciences/openscience · 76 tokens

jupyter-notebook

Iterative Python via live Jupyter kernel (hamelnb).

NousResearch/hermes-agent · 18 tokens

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

K-Dense-AI/scientific-agent-skills · 56 tokens

cobrapy

Constraint-based metabolic modeling (COBRA). FBA, FVA, gene knockouts, flux sampling, SBML models, for systems biology and metabolic engineering analysis.

K-Dense-AI/scientific-agent-skills · 38 tokens

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use…

K-Dense-AI/scientific-agent-skills · 73 tokens