/atomistic-skills:mat-xrd-phase-analysisfrom Atomistic Skills
Identifies crystalline phases in experimental XRD patterns using DARA's tree search with BGMN. Fetches candidate CIFs from COD or ICSD databases for a given chemical system.
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.
Identify crystalline phases present in an XRD pattern by using DARA's phase search (parallelized tree search with BGMN), following the DARA tutorial (Tutorial 2: Phase analysis with tree search).
This skill:
Ge-O-Zn) using either the COD or ICSD database. Any directory of CIFs works as the candidate set -- including structures pulled from Materials Project -- via --cif_dir or the phases argument of search_phases.search_phases to search mixtures of phases.DARA searches for structures in experimental databases. It supports:
--database cod): Open-access. DARA will attempt to download CIFs from crystallography.net. If the website is offline or unreachable, DARA will automatically look for a local copy at ~/COD_2024 (or the path defined in ~/.dara.yaml).--database icsd): Commercial database. Requires a local copy, default path ~/ICSD_2024 (or configured in ~/.dara.yaml). Online download is not supported for ICSD.Dependencies: dara-xrd (and its Ray/BGMN stack). The pip distribution is named
dara-xrd but the import module is dara:
from dara import search_phases
Check for the library itself (python -c "import dara"), not for an environment
name -- import dara_xrd will always fail.
Environment: cpu (it includes dara-xrd; venv/run creates it on first use).
Where dara-xrd is already installed on another interpreter, call
search_phases directly; scripts/phase_search.py is a convenience.
BGMN: DARA will prompt to download or use a local BGMN installation.
For clusters where only some nodes have internet:
scripts/phase_search.py
CODDatabase.get_cifs_by_chemsys(chemical_system, dest_dir=...)search_phases(pattern_path, phases, wavelength, instrument_profile)phase_analysis_results/ under the same directory as the XRD pattern.Use this script when the node where you run it can reach the database servers (for automatic COD CIF download), or when you have a local directory of CIFs/local database installed.
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/phase_search.py \
--xrd_data ${CLAUDE_SKILL_DIR}/examples/GeO2-ZnO/GeO2-ZnO_700C_60min.xrdml \
--chemical_system "Ge-O-Zn" \
--database icsd
This will:
phase_analysis_results/ next to the XRD file.Ge-O-Zn from the ICSD into phase_analysis_results/cifs/.search_phases(...).phase_analysis_results/.You can also provide your own CIFs:
python .../phase_search.py \
--xrd_data pattern.xrdml \
--cif_dir /path/to/my_cifs
In this case no database lookup is used; only --cif_dir is searched.
Specific example:
python .../phase_search.py \
--xrd_data ${CLAUDE_SKILL_DIR}/examples/GeO2-ZnO/GeO2-ZnO_700C_60min.xrdml \
--cif_dir ${CLAUDE_SKILL_DIR}/examples/GeO2-ZnO/phase_analysis_results/cifs
phase_search.py)--xrd_data (required):
.xy, .xrdml, or .raw).--chemical_system:
"Ge-O-Zn". Used with COD or ICSD to fetch CIFs when --cif_dir is not given.--cif_dir:
.cif files to search. When set, skips COD/ICSD lookup.--database (optional):
cod (default) or icsd. Specifies which database to use when using --chemical_system.--output_dir:
<xrd_dir>/phase_analysis_results/.--wavelength (optional):
Cu, Co, Cr, Fe, Mo, or a numeric wavelength in nm. Default: Cu.--instrument_profile (optional):
Aeris-fds-Pixcel1d-Medipix3.--quiet:
All outputs go under <output_dir> (default: phase_analysis_results/ under the XRD directory):
CIFs
cifs/: Candidate phases for the chemical system (when downloaded).Search results
results_summary.json:
pattern, chemical_system, cif_dirnum_solutions, best_rwpsolutions: list of {rank, rwp, phase_files}.phase_search_report.txt:
Rwp.Rwp of solution i = ... % for each solution.Phases found in solution 0: with grouped phase file names.Plots
solution_0_refinement.html, solution_0_refinement.pngsolution_1_refinement.html, solution_1_refinement.png, etc. (if multiple solutions)SearchResult.visualize() (observed / calculated / difference pattern, like the tutorial).ray.init(address="local", ...).num_cpus in the script’s ray.init(...) if needed.mat-xrd-digitizer:
.xy file required by this phase analysis skill.mat-xrd-refinement:
mat-xrd-calculator:
Author: Nofit Segal Contact: GitHub @nofitsegal
examples/GeO2-ZnO/GeO2-ZnO_700C_60min.xrdml (opens in a new tab)examples/GeO2-ZnO/README.md (opens in a new tab)examples/GeO2-ZnO/phase_analysis_results/results_summary.json (opens in a new tab)examples/GeO2-ZnO/phase_analysis_results/solution_0_refinement.png (opens in a new tab)scripts/dara_utils.py (opens in a new tab)scripts/phase_search.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
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