AutoPhaseAnalysis¶

A desktop GUI for automated X-ray diffraction (XRD) phase identification and
Rietveld refinement. Load a diffraction pattern, name a chemical system (or
supply your own CIF files), and hit run — a tree search (via
dara) automatically explores
candidate phase combinations, runs a full Rietveld refinement on each with the
BGMN / eflech engines, and returns ranked solutions with interactive plots,
phase weight fractions, lattice parameters, fit metrics (Rwp / Rp / GOF), and
exportable refinement files.
No manual peak matching. No hand-built refinement models. Pattern in, ranked refined phase compositions out — typically in minutes.
Download the app — no Python required
AutoPhaseAnalysis ships as a packaged macOS app (Apple Silicon). Get
AutoPhaseAnalysis-0.1.0-macos-arm64.zip from the
GitHub Releases page
— see Installation for details.
A packaged Windows version will be released soon.
What it does¶
-
Automated phase matching
A dara tree search assembles candidate phase combinations from the Crystallography Open Database (COD) and/or your local CIF files — no manual peak matching — and ranks the best-fitting solutions.
-
Automatic Rietveld refinement
Every candidate combination gets a full BGMN refinement, hands-off. Quick and Advanced modes: zero-point, sample height, asymmetry, size broadening, preferred orientation, and background subtraction.
-
Interactive results
Ranked solutions with Plotly charts, phase-weight tables, lattice parameters, fit metrics, and the raw
.lstoutput. -
Headless MCP server
Drive the entire pipeline from an AI agent over the Model Context Protocol — the GUI does not need to be running.
-
Batch analysis queue
Load many patterns at once: they run sequentially with the same settings, with a live queue panel, per-file result sets, and failure isolation — one bad file never kills the batch.
-
Bounded search, best-so-far results
Huge searches are capped (30 min / 5000 combinations). Instead of hanging, the app stops at the budget and returns the best matches found so far, with a clear warning.
-
Self-healing COD fetching
Automatic mirror fallback (
crystallography.net→qiserver.ugr.es) and a per-system CIF cache that detects interrupted downloads and repairs itself on the next run. -
Presets & publication export
Save parameter presets shared between the GUI and the MCP server, restore your last session, and export Origin-style publication figures (300-dpi PNG or vector PDF/SVG).
Supported input formats¶
.xy · .xye · .xrdml · .raw · .rasx · .scn · .txt — single files or
batches.
Quick links¶
- Installation — download the packaged macOS app, or set up a Python 3.13 environment from source.
- Running the App — launch and run your first phase search.
- The Main Window — tour of the interface, tab by tab and control by control.
- Results — reading the refinement chart and inspector.
- MCP Server — headless / agent control.
- Architecture — how the internals fit together.
First run needs internet
On first launch the app downloads the BGMN engine, and it queries COD the first time you search a new chemical system. After a system's CIFs are cached and BGMN is installed, repeated runs work offline.