/atomistic-skills:mat-xrd-calculatorfrom Atomistic Skills
Calculates X-ray Diffraction (XRD) spectra from crystal structure files using pymatgen. Outputs peak positions, intensities, d-spacings, and (hkl) indices as JSON and a Pseudo-Voigt plot.
Ships in Atomistic Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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.
cpu (commands run through venv/run cpu ...)pymatgenmatplotlibThe 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$.
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/calculate_xrd.py <structure_file> --output_dir <output_dir> --wavelength <wavelength>
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.<filename>_xrd.json: Contains $2\theta$ positions, intensities, d-spacings, and (hkl) indices.<filename>_PV_xrd.png: A plot of the simulated XRD spectrum (Pseudo-Voigt model).To calculate the XRD pattern for LiFePO4:
${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
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.
Author: Bowen Deng Contact: GitHub @learningmatter-mit
examples/Li3PO4/Li3PO4.cif (opens in a new tab)examples/Li3PO4/Li3PO4_PV_xrd.png (opens in a new tab)examples/Li3PO4/Li3PO4_xrd.json (opens in a new tab)examples/LiFePO4/LiFePO4.cif (opens in a new tab)examples/LiFePO4/LiFePO4_PV_xrd.png (opens in a new tab)examples/LiFePO4/LiFePO4_xrd.json (opens in a new tab)examples/LiFePO4/LiFePO4_xrd.png (opens in a new tab)examples/LiFePO4/README.md (opens in a new tab)scripts/calculate_xrd.py (opens in a new tab)scripts/xrd_utils.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub learningmatter-mit/atomisticskills --plugin atomistic-skills133 skills in this plugin
/chem-bond-dissociationCalculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation./chem-conformer-searchGenerate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting./chem-db-mofQuery multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al. via Materials Cloud) and download CIF structures with optional element or identifier filters.Other plugins' skills for the same job