Skip to content

Running the App

Packaged app — launch AutoPhaseAnalysis from your Applications folder (installed as described in Installation).

From source:

python main.py

Either way, on first launch the app downloads the BGMN engine (a few seconds) and is then ready.


  1. Load a pattern. Use the sidebar file picker to open a diffraction pattern (.xy, .xye, .xrdml, .raw, .rasx, .scn, or .txt). You can load a single file or a batch.
  2. Set the X-ray source and instrument profile. Choose a named source (Cu, Co, Cr, Fe, Mo) or enter a custom wavelength in Å, and pick the instrument profile that matches your diffractometer.
  3. Define the phase space. Enter a chemical system (for example Fe-As-S) to search COD, and/or add local CIF files. Optionally pin phases you know are present (e.g. an internal standard).
  4. Leave refinement on Quick. Quick mode's defaults are tuned for the search itself — identify the phases first, tune the model later. See the Refine Panel.
  5. Run. Click Run Phase Search. Progress is reported live in the sidebar.
  6. Review results. Each ranked solution opens in its own tab with an interactive chart, phase-weight bars, fit metrics, lattice parameters, a peak table, and the raw .lst output — all exportable.
  7. (Optional) Polish with Advanced. Open the solution you trust, switch the Refine panel to Advanced, enable the parameters you need (zero-point, asymmetry, size broadening, preferred orientation…), and click Refine phases to run a single full-control refinement of that phase list — no new search.

Overlay reflections first

Before running a full search you can overlay the expected Bragg reflections of candidate phases on the raw pattern to sanity-check your inputs.


What to expect on timing

A phase search runs a real refinement for many candidate combinations, so it can take minutes — longer with exhaustive search or large chemical systems. The first search of a chemical system also downloads CIFs from COD. Subsequent searches of the same system reuse the local CIF cache and are much faster.

See the Phase Search Workflow for the full pipeline.