mat-xrd-refinement
Installation
SKILL.md
Rietveld Refinement
Goal
Perform quantitative Rietveld refinement of powder X-ray diffraction (XRD) patterns using DARA (Data-driven Automated Rietveld Analysis) with BGMN. Use when you have an experimental (or theoretical) pattern in .xy format and candidate phase CIFs.
Requirements
- Conda environment:
xrd-agent(see conda-envs/xrd-agent). - Dependencies:
dara-xrd,pymatgen. Optional:kaleidofor PNG export (usekaleido>=0.2.1,<0.3to avoid needing Chrome). - BGMN: DARA uses BGMN; ensure it is installed. On HPC without network, set
--bgmn_dirorDARA_BGMN_DIRto a local BGMN directory.
Scripts
| Script | Purpose |
|---|---|
scripts/refine.py |
Run Rietveld refinement with known phases; writes plots and summary under refinement_results/. |
scripts/convert_xrd_to_xy.py |
Convert XRD from JSON (xrd-spectrum) or DIF to .xy for DARA. |
scripts/dara_utils.py |
Helpers (e.g. load_xrd_file); used by other scripts. |