Agent skill

Mat Xrd Calculator

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Calculate the X-ray Diffraction (XRD) spectrum of a material using pymatgen.

MITAuto-check passedResearch & Science

Install Mat Xrd Calculator

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-xrd-calculator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills mat-xrd-calculator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mat-xrd-calculator .claude/skills/mat-xrd-calculator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mat-xrd-calculator
GitHub stars
176
Token cost
~599 tokens
SKILL.md length
228 words
Files
11 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Calculate the X-ray Diffraction (XRD) spectrum of a material using pymatgen.

  • Works in 2 steps: _xrd.json: Contains $2\theta$ positions,… → _PV_xrd.png: A plot of the simulated XRD…
  • Tasks that involve Physical and earth sciences
  • SKILL.md covers Requirements, Usage, Output Files and Example, plus 1 more section
  • Runs Python scripts from its folder

What it does

Mat Xrd Calculator is an agent skill from learningmatter-mit/AtomisticSkills. Calculate the X-ray Diffraction (XRD) spectrum of a material using pymatgen.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts (for example `examples/Li3PO4/Li3PO4_xrd.json`, `examples/LiFePO4/LiFePO4_xrd.json` and `examples/LiFePO4/README.md`).

It sits in Research & Science, covering Physical and earth sciences. The repository describes itself as: Integrating AtomisticSkills into Agentic IDEs (Cursor, Claude Code, Codex, Google Antigravity, Hermes Agent, etc). The licence is MIT.

When your agent uses it

  • Tasks that involve Physical and earth sciences

Example prompts

  • “/mat-xrd-calculator”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. _xrd.json: Contains $2\theta$ positions, intensities, d-spacings, and (hkl) indices.
  2. _PV_xrd.png: A plot of the simulated XRD spectrum (Pseudo-Voigt model).

What it can do on your machine

Read from SKILL.md and the folder at commit 6257444. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mat Xrd Calculator loads about 599 tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 228 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~599

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from learningmatter-mit/AtomisticSkills at commit 6257444, republished under its MIT licence (© learningmatter-mit). 228 words, ~599 tokens.

Download SKILL.mdSave it as .claude/skills/mat-xrd-calculator/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
mat-xrd-calculator
description
Calculate the X-ray Diffraction (XRD) spectrum of a material using pymatgen.
metadata.category
materials
metadata.venv
cpu

XRD Spectrum Calculation

This skill calculates the X-ray Diffraction (XRD) pattern of a crystal structure using pymatgen. It identifies diffraction peaks, their intensities, and associated (hkl) indices.

Requirements

  • Environment: cpu (commands run through venv/run cpu ...)
  • pymatgen
  • matplotlib

Usage

The primary script for this skill is calculate_xrd.py. It takes a structure file as input and generates a JSON file with the diffraction data and a plot of the intensities versus $2\theta$.

Command Line Interface
bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/calculate_xrd.py <structure_file> --output_dir <output_dir> --wavelength <wavelength>
Arguments
  • structure: Path to the input structure file (e.g., POSCAR, CIF).
  • --output_dir: (Optional) Directory to save the results. Defaults to the current directory.
  • --wavelength: (Optional) Radiation wavelength or source name (e.g., CuKa, MoKa, CrKa). Defaults to CuKa ($1.54184$ Å).
  • --symprec: (Optional) Symmetry precision for identifying equivalent peaks. Defaults to 0.1.

Output Files

  1. <filename>_xrd.json: Contains $2\theta$ positions, intensities, d-spacings, and (hkl) indices.
  2. <filename>_PV_xrd.png: A plot of the simulated XRD spectrum (Pseudo-Voigt model).

Example

To calculate the XRD pattern for LiFePO4:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/calculate_xrd.py \
    ${CLAUDE_SKILL_DIR}/examples/LiFePO4/LiFePO4.cif --output_dir xrd_LiFePO4

Foundation Potential Recommendations

Since XRD is a purely geometric property of the crystal structure, it does not require a machine learning interatomic potential (MLIP) for the calculation itself. However, it is highly recommended to perform a structure relaxation using a high-quality MLIP (e.g., MACE, CHGNet) before calculating the XRD pattern to ensure the structure is at its energy minimum.

For recommendations on relaxation models, see the ml-foundation-potentials skill.

Author: Bowen Deng Contact: GitHub @learningmatter-mit

© learningmatter-mit, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts) in skills/mat-xrd-calculator of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/Li3PO4/Li3PO4.cif
  • examples/Li3PO4/Li3PO4_PV_xrd.png
  • examples/Li3PO4/Li3PO4_xrd.json
  • examples/LiFePO4/LiFePO4.cif
  • examples/LiFePO4/LiFePO4_PV_xrd.png
  • examples/LiFePO4/LiFePO4_xrd.json
  • examples/LiFePO4/LiFePO4_xrd.png
  • examples/LiFePO4/README.md
  • scripts/calculate_xrd.py
  • scripts/xrd_utils.py

Open the folder on GitHubat commit 6257444

Compare with similar skills

Mat Xrd Calculator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mat Xrd Calculator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mat Xrd Calculator this skilllearningmatter-mit/AtomisticSkills176—~599Automated safety check: PassMIT
Cantera Ignition DelayK-Dense-AI/scientific-agent-skills48k2 repos~2.2kAutomated safety check: PassMIT
AstropyzLanqing/codex-claude-academic-skills4.6k14 repos~2.9kAutomated safety check: PassBSD-3-Clause
PymatgenzLanqing/codex-claude-academic-skills4.6k12 repos~5kAutomated safety check: PassMIT
Weathertrpc-group/trpc-agent-go1.8k9 repos~591Automated safety check: PassApache-2.0
Pymol VisualizationChatMol/ChatMol372—~1.2kAutomated safety check: PassMIT

Similar skills

  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 2 repos~2.2k tokens
    Research & ScienceAuto-check passed
  • Astropy

    zLanqing/codex-claude-academic-skills

    Comprehensive Python library for astronomy and astrophysics.

    4.6k GitHub starsUsed in 14 repos~2.9k tokens
    Research & ScienceAuto-check passed
  • Pymatgen

    zLanqing/codex-claude-academic-skills

    Materials science toolkit. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 12 repos~5k tokens
    Research & ScienceAuto-check passed
  • Weather

    trpc-group/trpc-agent-go

    Get current weather and forecasts via wttr.in or Open-Meteo.

    1.8k GitHub starsUsed in 9 repos~591 tokens
    Research & ScienceAuto-check passed
  • Pymol Visualization

    ChatMol/ChatMol

    Generate publication-quality molecular visualization images using PyMOL.

    372 GitHub stars~1.2k tokensUpdated 6 mo ago
    Research & ScienceAuto-check passed
  • Review

    Muuuun/luxas

    Write domain-authentic review articles that synthesize rather than stack.

    1.2k GitHub stars~2.1k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed

More from learningmatter-mit/AtomisticSkills

All 129 skills in this repo
  • Drug Binding Site Definition

    learningmatter-mit/AtomisticSkills

    Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.

    176 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

    Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.

    176 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Drug Pocket Detection

    learningmatter-mit/AtomisticSkills

    Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).

    176 GitHub stars~4k tokensUpdated today
    Auto-check passed
  • Chem Bond Dissociation

    learningmatter-mit/AtomisticSkills

    Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.

    176 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Chem Conformer Search

    learningmatter-mit/AtomisticSkills

    Generate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting.

    176 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

    Query multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al.

    176 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Mat Xrd Calculator

What does Mat Xrd Calculator do?

Calculate the X-ray Diffraction (XRD) spectrum of a material using pymatgen. Mat Xrd Calculator is an agent skill from learningmatter-mit/AtomisticSkills. Calculate the X-ray Diffraction (XRD) spectrum of a material using pymatgen.

When should I use Mat Xrd Calculator?

Mat Xrd Calculator fits situations like: tasks that involve Physical and earth sciences.

How do I install Mat Xrd Calculator in Claude Code?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-xrd-calculator -a claude-code`. Or copy the skill folder (skills/mat-xrd-calculator in learningmatter-mit/AtomisticSkills) into .claude/skills/mat-xrd-calculator in your project. Claude Code loads it when a task matches its description.

How do I install Mat Xrd Calculator in Codex?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-xrd-calculator -a codex`. Or copy the skill folder (skills/mat-xrd-calculator in learningmatter-mit/AtomisticSkills) into .agents/skills/mat-xrd-calculator in your project. Codex loads it when a task matches its description.

Can I use Mat Xrd Calculator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-xrd-calculator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mat-xrd-calculator, .gemini/skills/mat-xrd-calculator, .github/skills/mat-xrd-calculator and .opencode/skills/mat-xrd-calculator in your project.

What does Mat Xrd Calculator need to run?

Going by SKILL.md and its folder, Mat Xrd Calculator needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Mat Xrd Calculator access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Mat Xrd Calculator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Mat Xrd Calculator use?

Mat Xrd Calculator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mat Xrd Calculator use?

About 599 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mat Xrd Calculator?

Skills that share tags, products or a category with Mat Xrd Calculator: Cantera Ignition Delay (K-Dense-AI/scientific-agent-skills, 48k stars), Astropy (zLanqing/codex-claude-academic-skills, 4.6k stars), Pymatgen (zLanqing/codex-claude-academic-skills, 4.6k stars) and Weather (trpc-group/trpc-agent-go, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mat Xrd Calculator?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 176 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 7, 2026.

Source: learningmatter-mit/AtomisticSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.