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: kaleido for PNG export (use kaleido>=0.2.1,<0.3 to avoid needing Chrome).
  • BGMN: DARA uses BGMN; ensure it is installed. On HPC without network, set --bgmn_dir or DARA_BGMN_DIR to 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.
Installs
5
GitHub Stars
172
First Seen
Jun 19, 2026