mat-xrd-calculator
OfficialSimulate XRD spectra from crystal structures.
Education & Research#python#pymatgen#xrd#diffraction#crystal structure#materials characterization#peak simulation
Authorlearningmatter-mit
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill calculates the X-ray Diffraction (XRD) spectrum of a material from a provided crystal structure, producing diffraction peak positions, intensities, and associated (hkl) indices without requiring a full simulation workflow.
Core Features & Use Cases
- XRD pattern computation: Computes diffraction peak information from an input structure using pymatgen.
- Simulated spectrum generation: Converts the discrete diffraction pattern into a pseudo-Voigt simulated intensity curve versus 2θ.
- Actionable outputs: Writes a JSON file containing 2θ and intensity data (plus HKL and d-spacings) and saves a plotted spectrum image.
- Use case: Use this to compare expected diffraction features of phases (e.g., LiFePO4) or to generate baseline spectra for downstream analysis or benchmarking.
Quick Start
Run this to generate the XRD JSON and plot for a structure file: conda activate base-agent, then run python .agents/skills/mat-xrd-calculator/scripts/calculate_xrd.py <structure_file> --output_dir <output_dir> --wavelength CuKa.
Dependency Matrix
Required Modules
argparseosjsonmatplotlibpymatgennumpypathlib
Components
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: mat-xrd-calculator Download link: https://github.com/learningmatter-mit/AtomisticSkills/archive/main.zip#mat-xrd-calculator Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.