Technical Overview & Methodology
This document is a technical reference for the Brutus powder indexing software. It explains the main algorithms, search parameters, and methodology, and is intended for users familiar with powder X-ray diffraction and crystallography. As the name suggests, this is a brute-force method, the initial search enumerates a bounded set of peak/HKL assignments and is not necessarily fast. Filters, candidate limits and optional local searches mean that the complete workflow is not an exhaustive search of all possible cells.
Core Goal
The aim of ab initio powder indexing is to determine the unit-cell parameters ($a, b, c, \alpha, \beta, \gamma$) from a list of observed diffraction peak positions ($2\theta$). Brutus performs this task using a symmetry-specific enumeration of selected peak and HKL combinations, followed by filtering, refinement and bounded local searches.
The central assumption is that a small subset of the low-angle reflections corresponds to simple crystal planes with low-integer Miller indices $(hkl)$. For a given crystal system, the program chooses some observed peaks and solves the resulting system of linear equations.
Q-Space Formulation
For indexing, peak positions are converted from $2\theta$ to reciprocal squared spacing, written here as $Q = 1/d^2$. The plot’s Q-axis, peak-finder radius/smoothing controls and Kα2 stripping instead use the scattering vector $Q_{scat}=4\pi\sin\theta/\lambda=2\pi\sqrt{Q}$ (Å⁻¹). These two conventions must not be interchanged. The general quadratic relationship between $Q$, the Miller indices, and the reciprocal cell parameters ($A, B, C, D, E, F$) is:
where $A = a^{*2}$, $B = b^{*2}$, $C = c^{*2}$, and the cross-terms involve the reciprocal angles. Working in Q-space linearises the problem: for a given assignment of Miller indices to observed peaks, the unknown parameters $\{A, B, C, \ldots\}$ appear as the solution to a system of linear equations.
Brutus solves for these reciprocal parameters (or the subset relevant to the current crystal system), then converts them back to real-space cell parameters. Each candidate cell is then refined with a weighted least-squares fit and scored against the full observed peak list via figures of merit.
System-Specific Parameterisation
The quadratic form simplifies for each crystal system, reducing the number of free parameters. The design matrix column vector for the least-squares system is:
| System | Free parameters ($k$) | Design row getLSDesignRow(hkl) |
|---|---|---|
| Cubic | 1 | $[h^2+k^2+l^2]$ |
| Tetragonal | 2 | $[h^2+k^2,\; l^2]$ |
| Hexagonal | 2 | $[\tfrac{4}{3}(h^2+hk+k^2),\; l^2]$ |
| Orthorhombic | 3 | $[h^2,\; k^2,\; l^2]$ |
| Monoclinic | 4 | $[h^2,\; k^2,\; l^2,\; hl]$ |
| Triclinic | 6 | $[h^2,\; k^2,\; l^2,\; kl,\; hl,\; hk]$ |
The solved parameters relate to reciprocal lattice constants. For example, in orthorhombic, the three fitted parameters are $A=1/a^2$, $B=1/b^2$, $C=1/c^2$, giving $a=1/\sqrt{A}$ etc. For monoclinic, the four parameters are $A=1/(a^2\sin^2\beta)$, $B=1/b^2$, $C=1/(c^2\sin^2\beta)$, $D=-2\cos\beta/(ac\sin^2\beta)$, from which $\beta$ is extracted as $\cos\beta = -D/(2\sqrt{AC})$.
Rhombohedral (R) lattices have no system of their own: every R lattice is indexed by its hexagonal triple cell, so the hexagonal search finds it, and refinement and the space-group analysis (R centring) treat it in hexagonal axes; the refinement flags it as R so that its M(20) counts only R lines (see R lattices in hexagonal axes).
All six systems are searched on the GPU (cubic, hexagonal, tetragonal, orthorhombic, monoclinic, triclinic). Any combination may be checked; the checked systems run one after the other, highest symmetry first, and they share two global search settings (HKL Basis (% / unknown) and Depth) instead of per-system values. Without WebGPU, cubic, tetragonal and hexagonal fall back to a CPU search in a background worker; the other systems are then unavailable.
Architecture
Brutus runs entirely in the browser, requiring no installation, and it can be completely run locally in a server. The program is split across several files:
index.html— the application markup and the list of scripts. It loadsjs/core/version.jssynchronously first, then a short loader runs every script listed in it, in the listed order, with?v=<version>appended. The list is written as<script type="application/x-brutus" src="...">so that the browser does not run it before the loader does.js/core/version.js— the single source of truth for the version of the program (APP_VERSION). The loader, the workers, the shaders,sg_ops.json, the status-bar label and the PDF report all take it from here (see Build and maintenance scripts).js/core/workspace.jsandjs/core/shell.js— the window around the plot.workspace.jsholds the log, the run history, the project (.brutus) save and load, the theme and the space-group explorer;shell.jsholds the title-bar buttons and menus, the Index / Stop button and the lock that applies during a run, the plot strip, the pattern metadata and the status bar.js/convert/—sg_subgroups.jsandsg_convert.js: the maximal subgroups of a space group from its operators, and the change of basis that relates two groups.js/dialogs/convert.jsis the dialog that uses them.css/workspace.css,css/dialogs.css— the light and dark themes and the layout of the window, and the styles of the modal dialogs and Space Group MC window.css/styles.cssis the base stylesheet they sit on.js/(UI) — the user interface as a set of small classic scripts loaded in order byindex.html:js/core/(state, status, input reading),js/data/(file loading, radiation presets, Kα2 stripping, export),js/parsers/(one reader per file format),js/peaks/(background, smoothing, peak picking, the peak table),js/chart/(Chart.js rendering and interaction),js/indexing/(search coordination, solution sieving, the results table),js/dialogs/(Refine MC, Space Group MC, Convert, context menu),js/report/(pdCIF and PDF report) andjs/main.js(startup).js/crystallography/— all crystallographic mathematics: HKL generation, Q-calculation, least-squares solvers, figure-of-merit calculations, error propagation, Niggli reduction and the space-group analysis. The same files are loaded three ways: on the main thread (post-processing and helper maths), in the CPU index worker, and in each refinement worker;manifest.jslists them in load order for the workers.js/workers/index-worker.js— the post-processing pass over GPU solutions, and the CPU fallback search of cubic/tetragonal/hexagonal cells used only when WebGPU is unavailable.js/workers/refinement-worker.js— a thin batch-refinement worker. GPU-found candidate cells are refined (full weighted least-squares, M(20), error propagation) not on the main thread but across a pool of these workers, sized tohardwareConcurrency − 2(minimum 1, at most 12) to leave cores free for the UI and the GPU driver. The pool lives for the whole page and is re-initialised for each run. Candidate cells are streamed to the pool in round-robin batches while the GPU search is still running, so refinement overlaps GPU execution.js/gpu/webgpu-engine.js— the GPU-accelerated brute-force search for all six systems. Manages the WebGPU device, buffers, dispatch chunking, and combinadic bookkeeping; loads the WGSL compute shaders inshaders/.js/gpu/gpu-setup.jsholds the per-system table (SEARCH_SYSTEMS,SEARCH_ORDER) and turns the two global settings into each system's basis size and peak count;js/indexing/run.jsruns the checked systems in sequence.sg_ops.json— the space-group database: all 530 settings of the 230 groups, each carrying its full set of symmetry operators together with the zone definitions and the printed reflection conditions. Generated directly from cctbx bybuild_sg_db.py(see Build and maintenance scripts). Operators are dictionary-encoded against a shared table of the 64 distinct rotation matrices, so the whole database is about 235 KB — one fetch rather than the 530 the app would otherwise need to build its extinction classes.css/styles.css,css/inter-font.css, and the vendored libraries undervendor/(Chart.js, Hammer, the Chart.js zoom plugin, jsPDF).highsym_solver.wgsl— one module with three entry points (main_cubic,main_tetragonal,main_hexagonal) for the systems with one or two unknowns. The 1×1 or 2×2 system is solved exactly (the 2×2 determinant of integer index products is an exact integer, so singular pairs are rejected without a tolerance), and both assignments of the two peaks are tried.ortho_solver.wgsl,monoclinic_solver.wgsl,triclinic_solver.wgsl— the WGSL compute kernels for the low-symmetry systems. Each unranks HKL combinations on the fly from a u32 combinadic (combinatorial-number-system) index, solves the per-trial linear system (3×3, 4×4, or 6×6), applies the geometric and figure-of-merit filters, and atomically appends surviving cells to the results buffer. Each invocation factors its coefficient matrix once and reuses it across the peak permutations: an explicit 3×3 inverse for orthorhombic, and Gaussian elimination with partial pivoting for monoclinic and triclinic. The latter replay the stored row swaps and multipliers for each right-hand side. Singular combinations are rejected before the permutation loop. The tables contain 6, 24 and 720 permutations respectively; an invocation exits after its first accepted candidate.
Build and maintenance scripts
None of these are needed to run Brutus. The application is static: put the HTML, the
JavaScript, the shaders and sg_ops.json on any web server (or open them from a
local one) and it works. The scripts below exist to build that database and to check the
things a browser cannot tell you it got wrong.
build_sg_db.py — the space-group database
Reads cctbx and writes sg_ops.json. Requires a cctbx environment; nothing else in
Brutus does.
python3 scripts/build_sg_db.py --out sg_ops.json
It walks every setting cctbx knows, extracts the exact rational symmetry operators, and derives the zones and reflection conditions from those operators: for each operator the zone is the integer null space of $R - I$, and on that zone the phase requirement $\mathbf{h}\cdot\mathbf{t} \in \mathbb{Z}$ reduces to an exact integer congruence. Nothing is copied from a table, so the conditions cannot drift out of step with the operators the app actually uses — and every setting is verified before the file is written.
The printed rules are equivalent to those of the International Tables, though a composite
modulus is not always written the same way: the shipped file stores 61 as
00l: $l=2n,\ l=3n$, R̄3c as h̄hl: $-2h+l=6n$ and C2/c as
h0l: $h+l=2n,\ h=2n$. The operators are what the analysis uses; the strings are what
it prints, and they forbid exactly the same reflections. The strings are then checked
against the operators, read exactly as the app reads them, first per setting and again on the
finished file over a larger box; the file is written only if everything passes, so a failed
build leaves the previous sg_ops.json in place.
| Option | Effect |
|---|---|
--self-test |
Checks the derivation against eleven space groups built by closing published generators, with no cctbx involved. Each group's order is checked against its published value first, so a typo in a generator fails loudly instead of quietly testing the wrong group, and the printed rules of key zones must match the tables exactly. Run this first: if it passes, the mathematics is sound and only the cctbx enumeration is unexercised. |
--check FILE |
Re-reads a finished sg_ops.json cold and confirms it is internally
consistent: every zone label used by a condition exists, the conditions reproduce the
operators reflection by reflection, every rule string is in the documented grammar,
crystal_system is lower case, the centring letters are ones the app
recognises, and no text field carries a control character. |
--box N |
Half-range of the hkl box used to derive and minimise the conditions (default 5). |
--verify-box N |
Half-range of the final check of the finished file, and of --check
(default 10, about a minute). It must cover the largest modulus (6) on every zone
parameter. |
--limit N, --pretty |
Stop after N settings (smoke test; written to sg_ops.partial.json unless
--out is given, so it cannot replace the real database); write indented JSON. |
check_sg_ops.mjs — does the app accept the database?
node tests/check_sg_ops.mjs sg_ops.json
Where --check validates the file against itself, this validates it
against the application. It loads the real crystallography scripts (js/crystallography/), replays the
loader's gates, confirms every field the code dereferences is present, and builds the
extinction classes for each crystal system. It then reports reachability:
how many settings can actually be used, and why any cannot.
ok with their
reason. An exclusion the check cannot explain, an operator set that fails to compile, or a
whole crystal system vanishing, are the things it exists to catch.
One consequence worth knowing when reading any of this output: in the database
hall is the identifier and symbol is a display label. Several
settings share a Hermann–Mauguin symbol — the two origin choices of a
centrosymmetric group, and the hexagonal and rhombohedral descriptions of an R group, are the
common cases. Origin choice provably cannot change which reflections are absent, so those
pairs are expected to land in the same extinction class and appear as two members under one
symbol.
js/core/version.js — the version
The version is written in one file, js/core/version.js (const APP_VERSION = '20261028';), and
nowhere else. Update APP_VERSION after changing any JavaScript or rebuilding the database.
Verification scripts
The following checks cover different parts of the application. Run the scripts available in your distribution after changing the corresponding code.
The scripts in tests/ are run from the application folder (the one holding
index.html), as written below: check_pipeline.mjs
and check_sg_ops.mjs look for the application files
in the current directory, while check_load_order.mjs and
regression_test.mjs find them from their own location and also run from inside
tests/.
node tests/check_sg_ops.mjs sg_ops.json— validates the space-group database against the application and checks reachability across all crystal systems.node tests/check_pipeline.mjs— confirms thatjs/indexing/run.js,js/gpu/webgpu-engine.jsand the four shaders still agree on how the HKL basis is packed for each of the six systems, that every system inSEARCH_ORDERhas a packer, an engine configuration and a kernel, and that the engine's parameter list matches what the application passes. Both failures are otherwise invisible: the run completes, every candidate cell is nonsense, and the search reports no solutions with no error anywhere.node tests/check_load_order.mjs— the UI and crystallography scripts share one global scope and run in the orderindex.html(and, in the workers,js/crystallography/manifest.js) lists them. This checks that nothing which runs while the scripts load uses a name defined by a later script, that the two lists agree, and that no file is left unloaded. Needsnpm install --no-save typescript.node tests/regression_test.mjs— Node tests of the crystallography code with synthetic data of known answer: cubic, tetragonal and hexagonal searches through the real CPU (fallback) worker, refinement of a perturbed orthorhombic cell, Niggli reduction, error propagation compared with a Monte-Carlo estimate, Kα1 lines indexed with λKα1, and the final sieve keeping the most symmetric description of a lattice, or both descriptions when a less symmetric one fits clearly better.
?v= query string exists only to force
browsers to re-fetch a file that has changed. Its value is arbitrary — a date is merely readable —
and only the fact that it changed matters. It matters more than it seems: the crystallography
scripts are loaded three ways (the page, the CPU index worker and the refinement worker) and each way is a
separate cache entry, so a partial update can leave the main thread and the workers running different
builds of the same file. That does not present as a caching problem: it presents as results that
disagree between the table and the report.
index.html loads js/core/version.js first, which defines APP_VERSION
and APP_VERSION_QS (?v=<version>), and the loader appends it to every script it runs.
The same query string is appended to everything the program loads itself: both workers (which
forward it to the crystallography files they import), the WGSL shaders and sg_ops.json — that
last one would otherwise be cached across a database rebuild and fail the operator check while the file on
disk was perfectly correct. The label at the bottom right of the window and the version line of the PDF report
show the same value. The page has to be served over HTTP (to fetch shaders and sg_ops.json).
Deploy the matching HTML, JavaScript, shaders and js/core/version.js together, change APP_VERSION when
files change, and reload the page. Shader source is cached by URL for the page lifetime; compiled modules and
pipelines are cached on the GPU device.
Quick Start Guide
Use the following workflow for a typical single-phase powder pattern.
-
Load the data file.
Choose
File → Load pattern…(there is no drag-and-drop). Supported formats include.xy,.xrdml,.brmland.xml(Bruker DIFFRAC RawData; for a.brmlwith several scans the first is loaded),.ras,.xra,.uxd,.udf, GSAS.esd, FullProf free-format.dat, Powder CIF.cif, and plain text two-column data (scientific notation such as1.000e+01, thenumpy.savetxtdefault, is read as data, not as a header). A file that cannot be read or parsed replaces nothing: the current pattern, peaks and solutions stay as they were. -
Detect peaks.
On the Peaks tab, adjust the
Min peak (%),Bkg radius (Å⁻¹), andSmoothing (Å⁻¹)sliders until the automatically detected peaks match the visual pattern. If shoulders or artifacts are picked up as peaks, raiseProminence (%)as well. -
Curate the peak list.
Carefully review all peaks:
- Edit $2\theta$ positions for accuracy.
- Delete spurious peaks (noise, impurities, and, if stripping is off, any Kα2 peak that was not flagged). Keep the flagged (yellow) Kα2 rows: they are already left out of indexing, and they are what marks their parents as Kα1 lines.
- Add important missing peaks, e.g. low-angle reflections, using
Ctrl + Clickon the chart.
-
Set parameters.
On the Data tab (radiation, 2θ range and search parameters) and the Indexing tab (crystal systems and GPU parameters):
- Select the correct X-ray
Radiation Preset(e.g. Cu Kα). - Choose whether to enable
Strip Kα₂. When enabled, the Ka1 wavelength is used; when disabled, the average Kα wavelength is used. The default is OFF (average Kα wavelength). With stripping off, resolved Kα2 peaks are flagged and their Kα1 parents are indexed with the Kα1 wavelength; stripping is still the most accurate choice when the doublet is resolved — see Flagged or stripped? - Set a chemically reasonable
Max Volume (ų)to limit the search space. - Set
2θ Error (°)according to your data quality (e.g. ≈0.02° for synchrotron, ≈0.05° for a typical lab diffractometer). - Leave Refine Zero Error enabled unless you have a specific reason to turn it off.
- Select the crystal systems to search. By default all are checked except Triclinic (rarer, and by far the slowest). All checked systems are searched in one run, highest symmetry first; rhombohedral (R) lattices are found by the Hexagonal search. If Orthorhombic, Monoclinic and Triclinic are greyed out, GPU acceleration is not active in the browser. See the Troubleshooting section.
- Select the correct X-ray
-
(Optional) Tune GPU Parameters.
The panel GPU Search Parameters (Indexing tab) applies to every checked system.
HKL Basis (% / unknown): size of the HKL basis, as a percentage of each system's maximum, per unknown cell parameter (default 5: tetragonal/hexagonal 10%, orthorhombic 15%, monoclinic 20%, triclinic 30%). Cubic always searches its whole list (752 hkl), which costs next to nothing.Depth: extra peaks combined beyond the number of unknowns. Orthorhombic, monoclinic, triclinic use unknowns + Depth peaks (default 3: 6, 7, 9); cubic, hexagonal and tetragonal use three times as many, 3 × (unknowns + Depth) (default: cubic 12, the others 15), which costs almost nothing with one or two unknowns.- The lines under the panel list, for each checked system, the basis size (with the percentage actually used), the number of peaks (capped by the peaks you have picked) and the number of trials.
- The four GPU parameters are locked while a run is in progress; each run uses the values it started with.
- Leave these at their defaults unless you have trouble finding a solution.
-
Start indexing.
Press
Indexin the title bar (it turns into a redStopduring the run; Esc stops it too, and the rest of the window is locked until the run ends). Progress is shown on the main progress bar and the status line names the system being searched. If a search would need too many GPU dispatches, a warning will appear. -
Inspect solutions.
On the Solutions tab, each solution is an accordion; only one is open at a time.
- The
Sort byselector orders them by M(20), volume or crystal system, either way round. - Opening a solution selects it: its calculated reflections (Sol, blue ticks) and, if it has a space group, that group’s allowed reflections (the Space group layer, green ticks) are drawn under the observed peaks (Exp, red ticks). Its detail shows the symmetry, cell, volume, M(20), the Niggli cell and its space groups.
- A plausible solution shows excellent alignment and reasonable space-group suggestions.
- The Solution menu in the title bar (enabled only while a solution is open) refines it, tests, explores and converts its space group, exports a pdCIF or a PDF report, or erases it; see below. Closing the accordion deselects the solution.
- The
The User Interface
The window has a title bar, a left panel of four tabs (the controls), a
right panel of three tabs (the results) separated by a draggable divider, and a
status bar. ⇄ Panels
swaps the two panels. Dialogs and menus use the same palette as the window.
Title bar
- About shows a summary of the program, its file formats and the workflow in the right panel (click it again to return to the plot). Help opens this guide in a new tab, in the same light or dark theme as the program.
- File:
Load pattern…,Export pattern…(see Saving & Converting Data);Open project…,Save project…(a.brutusJSON file, see Projects);Unload pattern(asks first when something would be lost). - Solution: acts on the open solution; the whole menu is disabled while none is open. See The Solution menu.
- Report writes the PDF report: of the open solution only, or of every listed solution when none is open.
- Index starts the search. While a search runs it becomes a red Stop (Esc does the same) and keeps what was found. Until then it is disabled and its tooltip says why (Need 4 more peaks, a GPU limit, no data). During a run the left panel, the menus, Report, About, Panels and the theme switch are locked, and so are Ctrl+click on the plot and the keyboard shortcuts; the plot, Log and History stay readable.
- The Dark switch changes the theme of the program, of its dialogs and of the plot (the choice is remembered, and shared with this guide).
Left panel
The controls are organised into four tabs, in the order of the work: Data, Peaks, Indexing, Solutions.
Data tab
- Pattern. One accordion, closed by default and titled with the name of the loaded file (long names are shortened from the middle; “No file loaded” when empty). Opened, it lists the metadata of the pattern: file, format, size, number of points, 2θ range, step (median), intensity range and total, the radiation found in the file (or “none in the file”) and the radiation in use. The parsers give the program only what the readers extract (radiation, 2θ and intensity); anything else in a file header, such as scan or instrument details, is not shown.
- 2θ range. The 2θ Min and Max sliders restrict the window used for peak finding and indexing, for example to exclude a noisy low-angle or high-angle region. Each limit can also be typed in the box beside its slider (steps of 0.01°).
- Radiation (preset, wavelength, Strip Kα2): described under Radiation and search parameters below. The Search limits (Max Volume, Impurity Peaks, 2θ Error, Refine Zero Error) are on the Indexing tab, above the crystal systems.
Peaks tab
-
Peak finding sliders:
Radius– rolling-ball background radius, in reciprocal space ($Q = 4\pi\sin\theta/\lambda$, Å⁻¹). Larger values handle broader, slowly varying backgrounds. Default 0.100 Å⁻¹.Smoothing– half-width of the moving average applied inside the background estimator, before the rolling ball runs. Same units asRadius(Å⁻¹), so the two are directly comparable. It suppresses noise spikes that would otherwise drag the estimated background down into the baseline. Set to 0 to disable. Default 0.010 Å⁻¹.KeepSmoothingwell belowRadius— roughly a factor of 10 at the defaults. If the smoothing window approaches the ball radius, the moving average flattens the very peaks the ball is supposed to pass underneath, and the background is subtracted from the peaks themselves.Min peak (%)– peak detection threshold on a logarithmic scale. Peaks below this fraction of the strongest peak are ignored. Reduce to detect weak reflections; increase to suppress noise.Prominence (%)– rejects a detected maximum unless the valley beside it drops by at least this fraction of the maximum's own height. Answers a different question fromMin peak (%): that one asks is this tall enough?, this one asks is this actually resolved? A bump riding on the flank of a strong peak can easily be tall enough while having almost no prominence. Default 25% (set to 0 to disable the test). See below for how to choose a value.
Why Å⁻¹ and not data points? Counts of data points would make both sliders properties of the file rather than of the sample: the same specimen measured at 0.01° and 0.02° per step would need two different settings to give the same background, and a value tuned on one diffractometer would mean nothing on another. $Q$ is the physical axis the background actually lives on, so a setting in Å⁻¹ transfers between scans, step sizes and instruments.
Because $Q$ is not linear in $2\theta$ — $dQ/d(2\theta) = 2\pi\cos\theta/\lambda$, which shrinks as the angle rises — a fixed $Q$ window spans progressively more channels toward the back of the scan, typically two to four times as many over a laboratory range. This is intentional and is handled internally per channel. One consequence: high-angle peaks receive more smoothing than a flat point count would give them. That is the physically correct behaviour; nudgeSmoothingdown if high-angle peaks look too broad.
Note that these sliders depend on the wavelength, since $Q$ does. Changing the radiation preset or typing a new $\lambda$ therefore re-runs peak detection, as long as the peak list is still the automatic one. Once you have edited it by hand (added, deleted, moved or confirmed peaks), the edits are kept instead and a status message says that the background window is now stale; move any peak-finding slider to re-detect, which discards the edits. The exception is a change made while Kα2 stripping is on: a preset change, or a typed value that turns the preset to Custom, switches stripping off, which changes the plotted data, so detection always re-runs. - 2θ range sliders: They are on the Data tab (see above). Changing them re-detects the peaks and updates the status of the Index button — unless the peak list has been edited by hand: a curated list is kept (a message says so), and peaks outside the range are simply not used. Moving one of the four peak-finding sliders still re-detects and replaces the list.
-
Peak table:
Lists all detected peaks. The
2θ Obs (°)column is directly editable for fine corrections. Selecting a peak position will mark the peak in the chart. Suspected Kα2 peaks (when stripping is off) are flagged with a yellow background and a ⚠ symbol. Right-clicking a yellow row lets you manually confirm it as a genuine peak. The Kα1 parent of each flagged peak is numbered with a*; its d column is computed with λKα1, and it is indexed and refined with λKα1 too — see Flagged or stripped?
Radiation (Data tab), search limits and crystal systems (Indexing tab)
-
Radiation Preset:
Selects the X-ray source, setting the internal Kα1 and Kα2 wavelength values
(Bearden, 1967) used for Kα2 stripping and d-spacing calculations. Each anode is offered
both as a pure Kα1 preset and as a Kα-average preset; the average is
(2·Kα1 + Kα2)/3, weighting the doublet by its 2:1 intensity ratio.
Custom (Monochromatic) makes the wavelength field editable and disables all
Kα2 handling.
Anode Kα1 (Å) dmin at 130° Rel. no. of reflections Typical use Cr 2.28970 1.264 Å 0.30 Residual stress, large cells, polymers Fe 1.93604 1.068 Å 0.50 Mn/Cr-bearing samples Co 1.78896 0.987 Å 0.64 Fe-bearing samples (avoids fluorescence) Cu 1.54056 0.850 Å 1.00 General-purpose workhorse Mo 0.70930 0.391 Å 10.2 Strong absorbers, capillary/transmission Ag 0.55941 0.309 Å 20.7 High-Q and total-scattering work Choosing a wavelength for indexing. The relative reflection count scales as $1/\lambda^{3}$ for a fixed cell volume, and both extremes cause trouble:
- Long wavelengths (Cr, Fe) access very few reflections. M(20) needs 20 indexed lines, and with a large wavelength you may simply not reach them. Excellent for stress analysis; a weak choice for indexing except for the case of very large unit cells.
- Short wavelengths (Mo, Ag) give 10–20× more reflections, but compress them into low 2θ where angular dispersion is poor, so they overlap heavily. For one real monoclinic cell, the mean number of calculated reflections falling within ±0.06° 2θ is about 4 for Cr, 6 for Cu, 15 for Mo and 20 for Ag. The extinction analysis is built to cope with this (see the Ambiguous criterion in the space-group section), but expect more soft violations.
A further consequence: the doublet separation grows with tan θ, so on Mo or Ag data — where most peaks sit at low 2θ — the Kα2 ghosts are barely separated and the Kα2 tagger will flag few or no peaks. That is expected, not a malfunction.
-
Wavelength (Å):
(Like every decimal field of the program it accepts a decimal point or a decimal comma, whatever
the language of the browser; a comma becomes a point as it is typed, and the Up and Down keys step the value.)
Displays the wavelength used for all Q-space calculations — the search, the refinement and the
Refine MC and Space Group MC dialogs use it for every peak except the Kα1 parents
of flagged Kα2 peaks, which use λKα1. Updated automatically when a preset is chosen
and depends on the
Strip Kα₂setting:- When stripping is ON: displays the pure Ka1 wavelength (e.g. 1.54056 Å for Cu).
- When stripping is OFF: displays the intensity-weighted average wavelength (e.g. 1.54184 Å for Cu Kα), which accounts for the unstripped doublet. That is the right value for peaks whose doublet is not resolved; the Kα1 lines of resolved doublets that Brutus identifies use λKα1 instead (see Flagged or stripped?).
- When a Custom preset is selected, this field becomes editable.
-
Strip Kα₂:
Removes the Kα2 component before peak analysis by inverting the doublet exactly in $q$-space.
Mapped onto the Kα1 coordinate $u = 4\pi\sin\theta/\lambda_{K\alpha1}$, the measured profile is
$y(u) = F(u) + r\,F(us)$, with $s = \lambda_{K\alpha1}/\lambda_{K\alpha2}$ and $r = I(K\alpha_2)/I(K\alpha_1)$;
the pure Kα1 pattern $F$ is recovered as the alternating series
$F(u) = \sum_k (-r)^k\, y(u s^k)$, evaluated directly on the data with cubic interpolation and
summed to eight terms ($r^8 \approx 0.004$). $r$ is the preset's ratio, 0.497 for every anode. A single difference in the dual-wavelength $q$-space form (Zhang et al., 2026) would leave a negative ghost of about $r^2 \approx 25\,\%$ of each strong peak at twice
the doublet separation, which the series does not. A flat background comes out at $1/(1+r)$ of its
level, the correct Kα1-only value.
Ticking it sets the wavelength to λKα1 and re-detects the peaks on the stripped data, replacing the current peak list. The default is OFF (average Kα wavelength is used). It is the most accurate choice whenever the doublet is resolved in your pattern: flagging the Kα2 peaks instead covers only the doublets it identifies — see Flagged or stripped? - Max Volume (ų): Upper bound on the allowed unit-cell volume. This is one of the most powerful constraints on the search. Setting it appropriately (e.g. based on the number of formula units and estimated molecular volume) dramatically reduces spurious solutions and speeds up the search. The maximum volume at this moment is 12500 A3, it can be edited in the source file if you wish to do so.
-
Impurity Peaks:
The number of unindexed peaks tolerated when scoring a candidate, default 1, range 0–3. If your sample
contains a known minor impurity phase, set this to 1 or 2 to avoid penalising the correct solution.
It is applied at two separate stages, over different peak sets:
- On the CPU, during M(20)/M(N) scoring, over the first $N$ peaks used for the merit figure.
- On the GPU, during the figure-of-merit pre-filter, over the $\min(\max(k + \text{Depth}, 10),\, 32)$ peaks described under Two-Stage GPU Filtering — which is generally not the same count as the CPU stage.
Performance note: leaving this at 0 lets the GPU pre-filter use its "fail-fast" early abort at the first misfit. With a non-zero value the abort can fire only once more peaks have misfitted than the allowance covers, and a small sort is added, so the GPU stage runs measurably slower. Prefer 0 unless you genuinely have impurity lines. - 2θ Error (°): The matching tolerance between observed and calculated peak positions during indexing. This value is converted to a Q-space tolerance using an angle-dependent formula (see Refinement). Typical values: ≈0.01–0.02° for synchrotron data, ≈0.03–0.06° for laboratory diffractometers.
- Refine Zero Error: When enabled, a zero-point error parameter ($\Delta 2\theta_{zero}$) is simultaneously refined alongside the lattice parameters during the least-squares step. This corrects for instrumental misalignment. It is enabled by default and strongly recommended. See the Refinement section for the full two-round strategy.
- Crystal systems to search (Indexing tab): Checkboxes for Cubic, Hexagonal, Tetragonal, Orthorhombic, Monoclinic and Triclinic, all searched on the GPU GPU. The systems are not mutually exclusive: every checked system is searched in the same run, sequentially, in the order cubic → hexagonal → tetragonal → orthorhombic → monoclinic → triclinic (decreasing Laue-group order). Candidate cells of one system are refined on the CPU while the GPU already searches the next. Defaults: all checked except Triclinic. Rhombohedral (R) lattices are found by the Hexagonal search and reported, refined and analysed in hexagonal axes (system “hexagonal”, R centring). Such a cell carries an R badge in the solutions list, and its M(20) counts only the lines an R lattice allows (see R lattices in hexagonal axes). Without WebGPU, Cubic, Tetragonal and Hexagonal fall back to the CPU search CPU and the other three are disabled.
GPU Search Parameters (Indexing tab)
When at least one system is checked (and WebGPU is available), a panel appears with four parameters controlling the scope, speed, and memory usage of the GPU search. The same four values apply to every system; the first two are converted into per-system values, which are listed under the panel.
-
HKL Basis (% / unknown) → $N_{hkl}$:
Sets, for every system, the size $N_{hkl}$ of the pool of theoretical Miller index triplets (HKLs)
used to construct trial matrices:
$$ N_{hkl} = \mathrm{round}\big(N_{max} \times \min(100,\; k \times \text{value}) / 100\big) $$
where $k$ is the number of unknown cell parameters and $N_{max}$ the system's maximum usable basis
(table below), with a floor of $\max(10, 2k)$. Cubic always uses its whole list, $N_{hkl} = 752$: its search sends a few dozen candidates to refinement whatever the basis, so the full list costs nothing . For orthorhombic and monoclinic the floor is 76: the 36 axial reflections, which are always placed first (see Axial front-loading), plus at least 40 mixed ones. Below it a monoclinic basis would be made almost entirely of axials, which cannot determine $\beta$. The value can be set from 1 to 16 (typically 2–12).
At the default of 5 the basis is: orthorhombic 15% (329), monoclinic 20%
(114), triclinic 30% (37).
Brutus generates a candidate list of simple HKLs and sorts it by $h^2+k^2+l^2$. For
orthorhombic and monoclinic the list is then re-ordered so that all axial
reflections — (h00), (0k0), (00l), i.e. two indices zero — are moved to the front before the list is
truncated to $N_{hkl}$ (see Axial front-loading below for why). For
triclinic no re-ordering is applied; the first $N_{hkl}$ by magnitude are taken directly.
The four high-symmetry systems use de-duplicated lists ordered by their own quadratic form (see
High-symmetry searches).
Increasing $N_{hkl}$ allows finding cells with larger unit-cell edges or complex centering, but increases
the number of HKL combinations factorially.
$N_{max}$ is the smaller of the generated list length and the u32 combinadic ceiling (2954 / 568 / 123 for orthorhombic / monoclinic / triclinic), so no setting can request a basis the solver would have to clamp.System $k$ $N_{max}$ $N_{hkl}$ at 5 Peaks at Depth 3 Trials at defaults Cubic 1 752 752 (all) 12 9,024 Hexagonal 2 1,249 125 15 1,627,500 Tetragonal 2 1,474 147 15 2,253,510 Orthorhombic 3 2,196 329 6 ≈ 706 Million Monoclinic 4 568 114 7 ≈ 5.6 Billion Triclinic 6 123 37 9 ≈ 140 Billion -
Depth → $N_{peaks}$:
Controls how many observed peaks (starting from the lowest-angle) are considered when generating the
solving tuple:
$$ N_{peaks} = f \times (k + \text{Depth}), \qquad f = 1 \text{ (ortho, mono, tri)}, \quad f = 3 \text{ (cubic, tetragonal, hexagonal)} $$
capped by the number of peaks available. The solver needs exactly $k$ peaks ($k=1$ cubic,
2 tetragonal/hexagonal, 3 orthorhombic, 4 monoclinic, 6 triclinic), and the program tests
every possible subgroup of $k$ peaks from those $N_{peaks}$ peaks. This provides robustness against
impurities: if one low-angle peak is from an impurity, at least one combination will skip it. For
example Depth = 2 gives 6 peaks for monoclinic, 9 for cubic and 12 for tetragonal.
The factor 3 for the systems with one or two unknowns costs almost nothing (at most $C(15,2) = 105$ peak pairs at the default) and is needed when the first lines all belong to one zone: a long $c$ axis gives a run of $00l$ lines, a long $a$ axis a run of $hk0$ lines, and no pair of lines from one zone can determine the other parameter. Tetragonal $a = 3.8$, $c = 45$ Å (first six lines $003$–$008$) is found with 15 peaks but not with 5. The GPU figure of merit is still scored on $\max(10, k + \text{Depth})$ peaks, so the extra seed peaks do not make it stricter.
Default: 3 (range 0–12). A system with fewer peaks in the window than its minimum (4 cubic, 5 tetragonal/hexagonal, 6 orthorhombic, 7 monoclinic/triclinic) is skipped with a message; the others still run. -
FoM Tolerance:
The "Fail-Fast" threshold for the GPU's internal pre-filter. On the GPU, after solving a trial cell,
the mean normalised $Q$ residual is computed over the first $\min(\max(k + \text{Depth}, 10),\, 32)$ observed
peaks (the upper limit is the shader's
MAX_FOM_PEAKS = 32). If this exceedsFoM Tolerance(each residual already divided by that peak's Q tolerance, itself derived from the user's 2θ Error), the cell is discarded before being sent to the CPU. A value of 1.0 means the trial must match on average to within your stated error; a larger value (e.g. 3) is more permissive and will pass more candidates (including valid ones with large zero-shifts) to CPU refinement.
Default: 1.25 -
Candidate buffer (×1000):
The maximum cumulative number of GPU candidates stored during the search of one system (in
thousands); every system in the sequence starts with an empty buffer.
Candidates are streamed to CPU refinement while the GPU is running. When the capacity
is reached, GPU enumeration of that system ends early (a status message says so) and the run moves on
to the next system. The message that ends the run then names every truncated system, for example
Search TRUNCATED (candidate buffer full): Monoclinic at 12%, and that line stays in the status bar; the Log and the PDF report give the trial counts of the part actually searched. The percentage is exact as a lower bound: the shaders record the first HKL combination they could not finish, and everything before it was searched completely.
In the PDF report, the Indexing Parameters are those of the last run, recorded when its search started (radiation, wavelength, tolerances, 2θ range, peak-search settings, number of peaks used, and the HKL, Depth, FoM Tolerance and Candidates values), not the controls as they stand when the report is written. If a setting or the peak list has been changed since, a line under the block says which: the peak table and the calculated lines of the report are computed from the current values. With no run on record the current settings are printed, and said to be. The Indexing Solutions Summary has one row per system the run searched (not the checkboxes as they are when the report is made): HKL basis size, peaks combined, trials searched / planned with the percentage, candidate cells sent to refinement, time, and a note (truncated at 12% (buffer full), stopped, not reached, skipped (needs 7 peaks), skipped (GPU required)), followed by the run totals: Trials: searched / planned (%) Time. The same table is printed in the browser console at the end of each run. Candidates are retained in GPU arrival order, not ranked by final M(20). A larger buffer reduces the risk of reaching the cap but increases potential CPU work; it does not guarantee completion of the full search.
Default: 100 (i.e. 100,000 candidate cells per system). The GPU memory cost is small (16 bytes per cell, 32 for triclinic, held twice); the real cost of a larger value is the CPU refinement of every candidate, paid only by systems that actually fill the buffer.
Solutions tab
-
The list (the ledger).
One accordion per solution found during the session, only one open at a time. The closed line shows the crystal system, the key cell parameters, the volume and M(20), then badges: R (rhombohedral lattice in hexagonal axes), ≡ (see below), MC (cell polished by Refine), SG / SG? (refined under a Space Group MC class; SG? when its margin was not decisive), and the symbol of the space group attached to the solution (with +n when there are several).
Sort byorders the list by M(20) (default, highest first), volume or crystal system, in either direction. - An open solution lists its Symmetry, Cell (a, b, c, α, β, γ), Volume, M(20), the refined Zero when there is one, the Niggli reduced cell (computed on the metric of the solved lattice, see Niggli Cell Reduction) and its Space groups. A solution can hold several space groups: those chosen with Explore Space Group or reached with Convert, each with a radio button (the one selected is the one drawn as the Space group layer of the plot) and a × to remove it, and, below them, what Test Space Group proposed (the extinction class and its member groups, and whether the margin was decisive). Opening a solution also shows its Space group markers: those of the chosen group, or of the first group of the proposed class when none was chosen.
- Selection. Opening an accordion selects its solution and closes the others; closing it deselects the solution, which removes its markers and switches the Solution menu off. A solution selected before a run is not kept across a new run.
-
≡ badge (same lattice, two descriptions):
when a lower-symmetry cell fits more than twice as well (M(20)) as a more symmetric description
of the same lattice, the final sieve keeps both. Each row then carries
a ≡ badge naming the other's system (“≡ cubi”); hover it for the other
cell and its M(20). You decide: a real distortion, or extra parameters fitting the noise? Check
the residuals and the space-group analysis of both, and erase the one you reject. The PDF report
marks such rows
[=xxxx]. - Cumulative Search Behaviour: The list acts as a cumulative record across searches. If you run a search for Orthorhombic cells and then a second search for Monoclinic cells, previous results are retained. New solutions are added to the existing list and the entire list is re-ranked by M(20). This allows direct comparison across crystal systems. The list is only cleared when you load a new data file.
The Solution menu
The menu acts on the open solution and is disabled when none is open or a search is running.
- Refine: a Monte-Carlo search around the cell, constrained to its crystal system, with the zero error refined as an extra parameter when Refine Zero Error is on (Monte Carlo Cell Polish). The result is added above its parent only if it improves M(20).
- Test Space Group: the Space Group MC (refining under each hypothesis). Add as solution in its window adds the chosen class as a new solution, which then appears in the report.
- Convert…: carry the cell to a subgroup or a supergroup of its space group, see Convert.
- Explore Space Group…: the crystal-system filter opens on that of the cell; choose a space group by hand, see Explore Space Group.
- Export pdCIF: saves the raw diffraction data, the refined cell, the zero offset, the wavelength and the space group into a Powder CIF (see Saving & Converting Data).
- Report PDF: the PDF report of this solution only. (The Report button in the title bar does the same when a solution is open, and reports all listed solutions otherwise.)
- Erase: removes the solution from the list (a partner of an ≡ pair loses its badge). The message that follows carries an
Undobutton, andCtrl + Zdoes the same: the solution comes back in its place, with its badges. Only the last erased solution can be restored, and only until the list is rebuilt by a run, a loaded pattern or an opened project.
Right panel
Three tabs, Plot, Log and History, and the About view (opened from the title bar).
- Log. Every message of the program with its time, and a narrated account of each run: the pattern and the number of peaks used in the 2θ window; the radiation, wavelength and Kα2 treatment; the tolerances (2θ error, maximum volume, impurity peaks, zero error); the systems searched, highest symmetry first, and whether each runs on the GPU or the CPU; the GPU settings (HKL basis, Depth, FoM tolerance, candidates). Then, for each system, the plan (HKL basis size and its share of the maximum, number of peaks, trials planned), and when it ends its time, the trials searched, whether the candidate buffer filled or the search was stopped or failed, and the number of candidate cells sent to refinement. At the end: the total trials and time, the sieve (cells before and after), the time of the systematic-absence analysis and the best M(20). Conversions, space groups added to a solution and opened projects are logged too.
- History. One entry per completed run, with the date, the file and the number of solutions. Restore run, at the right of the entry, reloads that run’s pattern, peaks, parameters and solutions so that its solutions can be compared. It is unavailable during a run, and the history is saved in the project. When the history reaches 100 MB the program offers, once, to remove the oldest runs; it asks before saving a project larger than 10 MB.
-
Status bar.
One line, laid out on the split between the two panels. Under the controls panel, the current status: the last message of the program, the progress line during a run, or the number of peaks and solutions. Where the plot starts, the position under the plot pointer (2θ, d, Q and hkl); with the panels swapped it is at the left, under the plot. Then the open solution (system, cell, angles, M(20)), and the right side the version of the program (
Brutus v<version>, fromjs/core/version.js).
Plot
-
Chart:
Shows the experimental diffraction pattern, the experimentally detected peaks (red ticks), the reflections calculated for the
open solution (blue ticks) and the reflections allowed by its space group (green ticks, labelled
Sim:in the plot). A good solution exhibits visually convincing overlap across the full angular range. There is no legend and no grid inside the plot: the toggles of the strip above it take their place, and each carries the colour of its layer. -
The strip above the plot.
Linear,√Iandlog Ichoose the intensity scale. The toggles show or hide Background (the rolling-ball background of the peak finder), Data (the experimental pattern), Peaks (the experimentally detected peaks of the peak table), Cell (the reflections calculated from the open solution) and Space group (the reflections allowed by the space group of the open solution).XandSnapare described below.Save PNGwrites the plot as it is shown, on the background colour of the current theme. The i at the right lists the mouse controls. The position under the pointer (2θ, d and Q, and hkl when snapping to a calculated line) is shown in the status bar, under the plot. -
Chart interaction:
- Zoom: Use the mouse wheel (it zooms both axes around the pointer) or click-and-drag across the chart to rectangle-select an area.
- Pan: Hold
Alt+ click-and-drag across the chart. - Reset zoom: Press
Reset viewin the strip above the plot, or right-click anywhere on the chart. - Add peak manually: Hold
Ctrl+ click on the chart, or tickAdd peakin the strip and click or tap (for touch screens). A click within the 2θ error of a listed peak is refused;Shiftoverrides. - Touch screens:
Panin the strip makes a plain drag move the view;Reset viewrestores it. Zooming and panning out stop at the full view. - Add peak at exact cursor position: Hold
Ctrl + Shift+ click (ignores snapping).
-
Axis selectors.
The strip above the chart chooses how the pattern is displayed.
Xoffers 2θ (the default), θ, d-spacing, or Q = 4π·sinθ/λ. the intensity scale (the buttons at the left of the strip) is linear, √I (the default) or logarithmic.
These controls change the view only. Peak positions are stored in 2θ and intensities in raw counts no matter what is on screen, so indexing, refinement, the peak table and the PDF report are identical whichever axes you are looking at. The Y tick labels always show real intensity, even on the √I and log scales, so a number read off the axis means the same thing in every mode.
Two consequences are worth knowing. The d-axis is drawn in decreasing order, so that large d stays on the left and the pattern keeps the familiar left-to-right shape it has in 2θ. And because d and Q both depend on λ, changing the wavelength redraws the whole pattern in those two modes, while θ and 2θ are unaffected.
√I is the default because it is the useful compromise for indexing: counting statistics make the noise on a peak scale roughly as √I, so a √I plot shows something close to constant noise across the pattern, and weak high-angle reflections — the ones that discriminate between candidate cells — become visible without a strong low-angle peak flattening everything else. A log axis goes further and is useful for inspecting the background, but it exaggerates noise near zero. -
Snapping.
At normal zoom one screen pixel spans a few hundredths of a degree, which is the same size
as the
2θ Errorthe indexer works to. A peak placed by eye is therefore limited by the pointer, not by the data. TheSnapselector controls where aCtrl + Clickactually lands:- Off (default): exactly where you clicked. The readout in the status bar reports the cursor's 2θ, d and Q with no snapping.
- Obs: the observed peak position — the highest measured point within the snap window.
- Calc: the nearest calculated reflection of the selected solution; the readout additionally shows its Miller indices.
Shiftwhile clicking to bypass snapping for a single peak.
Snapping to a calculated (Calc) line is deliberately a separate choice from snapping to observed data. It places a peak where the model says a reflection should be, which is what you want when adding a reflection that is visible but too weak or too broad for the detector to have produced a clean maximum. It is not evidence that the reflection is there: a peak added that way agrees with the solution by construction, so it cannot be used to confirm it.
Saving & Converting Data
Brutus can export the pattern it is displaying, which makes it a convenient
format converter as well as an indexer. File → Export pattern… becomes
active once a data file has been loaded. Choosing it
opens a small dialog where you choose an output format; pressing Save then hands
off to the browser's own save dialog, so you pick the folder and file name in the normal way.
On the Data tab, the Pattern accordion is titled with the loaded file. Long names are shortened
from the middle so the extension stays visible, and the full name is available on
hover. File → Unload pattern unloads the file: it aborts any indexing run
in flight, discards the peaks, solutions and run statistics, clears the pattern and returns
the window to its opening state. When there is something to lose it first opens a
confirmation dialog — the same panel as Export pattern — naming the file and
listing exactly what will be discarded. With nothing to lose it simply unloads.
Loading replaces the session only once the new file has been read, parsed and checked. A file that
fails at any of those steps leaves everything as it was — pattern, peaks, solutions and the
accordion's title — and reports the error, so Export pattern can never write the previous data
under the new file's name. The file picker is re-armed every time, so the same file can be chosen
again after you have fixed it.
A note on .dat
The extension .dat covers two quite different things, and Brutus tells them apart
by content rather than by name. A plain whitespace two-column file is read as
such. A FullProf free-format file — optional ! comment
lines, then a line giving start, step, end in 2θ, then the intensities packed
several to a line — is recognised by its header triple together with its value count:
the file must carry (end − start)/step + 1 values, give or take a padded final line.
The count is what makes the test safe. A two-column file fails on the triple; a three-column
x, y, σ file passes the triple but fails the count. Without the check a FullProf
file loads silently and wrongly through the two-column reader, which takes
15.00 0.01 for a data point and then 25 22 for the next —
producing a plausible-looking pattern of counts plotted against counts.
The format records no wavelength, so the radiation already selected is kept; it can be changed in the
Radiation selector as with any .xy file. Export of this format is not
offered; saving as DAT writes the two-column form.
What is exported
The exported pattern is exactly what is plotted on the chart, so two view choices carry through to the file:
- Kα2 state. If Kα2 stripping is on, the stripped trace is written; if it is off, the raw counts are written. The dialog states which of the two will be saved so there is no ambiguity.
- Range. The current 2θ zoom acts as a range selection. If you have zoomed in, only the visible interval is exported and the dialog reports the span and how many points that is; reset the zoom (right-click on the chart) first to write the whole pattern.
The abscissa is always written in 2θ regardless of whether the chart is currently showing θ, d or Q — those are display transforms only, and the underlying pattern is stored in 2θ.
Formats
The plain-text column formats store an explicit 2θ value for every point, so they preserve a non-uniform scan faithfully. The instrument formats are written with the angle of every point as well whenever the loaded scan is not evenly spaced (an XRDML position list, UXD 2θ–count pairs, GSAS FXYE records), so no format moves a point.
| Format | Extension | Stores λ | Grid |
|---|---|---|---|
| XY (2θ intensity) | .xy | no | per-point 2θ |
| CSV (2θ,intensity) | .csv | no | per-point 2θ |
| Two-column whitespace | .dat | no | per-point 2θ |
| Panalytical XRDML | .xrdml | yes | per-point 2θ if uneven |
| Bruker RawData XML | .xml | yes | per-point 2θ |
| Bruker UXD | .uxd | yes | per-point 2θ if uneven |
| GSAS ESD | .esd | no | per-point 2θ if uneven |
| Powder CIF (pdCIF) | .cif | yes | per-point 2θ |
Exporting to pdCIF: While Export pattern exports the current view of the pattern, you can also export a complete Powder CIF (pdCIF) directly from a solved cell. Open the solution and choose Solution → Export pdCIF. This saves the unstripped raw data within your indexed 2θ range, the refined unit cell, the applied zero offset (mapped safely to _pd_calib_2theta_offset), the wavelength (including Kα1/Kα2 doublet ratios), and the space group in a standard format ready for deposition or Rietveld refinement. The space group written is the one drawn on the plot (the one most recently chosen for the solution, with an H–M symbol), and any others the solution holds are listed in a comment; a converted subgroup that could not be named, or a bare extinction class, is not a single space group and is left as ? with the details in the comments.
For the formats that record a wavelength, the value written is the one in the
Wavelength (Å) box, and the dialog shows it before you save. With a Kα-average preset
and stripping off, the pattern still holds the doublet, so the file records both lines and their
ratio instead, and loading it back restores the same preset. The default file name
is taken from the loaded file; change it in the browser's save dialog if you want.
A note on the informational messages. The lines in the dialog are labelled Info, not warnings — they describe what is being written (Kα2 state, visible range, wavelength, constant-step assumption) so you can confirm the output matches your intent. None of them blocks the save.
Peak Finding in Detail
Accurate peak positions are the single most important input for successful indexing. Brutus uses a multi-step procedure to detect peaks from raw intensity data.
Algorithm Steps
-
Kα2 stripping (optional):
If
Strip Kα₂is enabled, the doublet is inverted exactly in $q$-space (the alternating series described under Strip Kα₂, which grew out of the Zhang (2026) dual-wavelength differencing method) and applied to the raw intensities. Working in reciprocal space, it separates overlapping doublet reflections without prior background subtraction or empirical peak-shape parameters. -
Background subtraction:
A rolling-ball style algorithm estimates and removes the background. The signal is first
passed through a moving average whose half-width is set by the
Smoothingslider, which stops isolated noise spikes from pulling the estimated background down; the ball is then rolled under the result by an erosion followed by a dilation, with the ball radius set by theRadiusslider. A larger radius rides over broader background humps.
Both sliders are specified in $Q$ (Å⁻¹) and converted internally to a per-channel half-width using the scan's own $2\theta$ axis and wavelength, so the window follows a fixed span in reciprocal space rather than a fixed number of channels. The two morphological passes use a monotonic-deque running minimum and maximum, and the moving average a prefix sum, so the cost is linear in the number of data points regardless of how wide the windows become. -
Data smoothing:
A Savitzky–Golay filter (quadratic, 5 to 11 points) is applied to the background-subtracted
signal to reduce noise while preserving peak shapes. Its window is sized automatically from the
length of the scan and is not user-adjustable — in particular it is not the
Smoothingslider, which acts earlier and only on the background estimate. -
Initial peak detection:
Local maxima above the
Min peak (%)threshold are identified. -
Prominence filter:
Optional, and off unless
Prominence (%)is greater than zero.
Prominence is a topographic measure: how far you must descend from a maximum before you can reach any higher maximum. For a local maximum of height $h$: walk left until the profile rises above $h$ (or the scan ends) and keep the lowest value seen, call it $L$; walk right the same way for $R$; then the prominence is $h - \max(L,\,R)$. The $\max$ matters: you take the higher of the two valley floors, because that is the shallowest escape route to higher ground.
A maximum is kept only if its prominence exceeds both the noise floor (three times the robust MAD estimate, so the feature is statistically real) and the fraction of its own height set by the slider (so the feature is genuinely resolved). The ratio prominence/height is scale-free, which is why one setting works for weak and strong peaks alike. It is computed on the same smoothed, background-corrected profile used for detection — on the raw data, noise in the valley sets the floor and the number stops meaning anything.Why not simply impose a minimum separation between peaks? Because separation cannot distinguish a genuine close doublet from a bump on a flank, and in a dense low-symmetry pattern the close reflections are often exactly the ones that make the cell indexable. A distance rule would delete them silently. Prominence asks the right question — is there a real valley between these two maxima? — and so can reject a shoulder while keeping a pair that is closer together than the shoulder was to its parent.Measured on synthetic data with known ground truth (six real peaks including a resolved close pair, plus one shoulder and one noise spike):
Two things to read from this. Values below about 50 % do essentially nothing, which is why the default is 0 rather than a small number that would look active while changing no result. And the resolved close pair survives even at 80 %, while the shoulder is gone by 60 % — the filter discriminates on shape, not on distance.Prominence Real peaks kept Shoulder Resolved close pair 0 % (off) 6 / 6 kept both kept 25 % 6 / 6 kept both kept 40 % 6 / 6 kept both kept 60 % 6 / 6 rejected both kept 80 % 6 / 6 rejected both kept
As a safeguard the filter never reduces the list below three maxima; if a setting would, the unfiltered list is restored instead, so an over-tight value degrades the peak list rather than destroying it. - Position refinement: For each detected peak, a five-point least-squares quadratic fit (Savitzky–Golay coefficients) is carried out around the local maximum to obtain a sub-step precision position. If the peak is too close to the data edge, the algorithm falls back to a three-point fit.
Suspected Kα2 Peaks & Wavelength Treatment
If your data has not been stripped of Kα2, Brutus automatically scans the peak list to flag suspected Kα2 ghosts. A candidate must satisfy two independent tests:
- Position: the peak lies at the 2θ predicted for the Kα2 companion
of an earlier (lower-2θ) parent peak, within an angle-adaptive tolerance. Since the doublet
separation grows with 2θ, the tolerance is the larger of your
2θ Errorand 25% of the expected split. - Intensity ratio: the peak height is consistent with the characteristic
doublet ratio (≈0.497 for Cu, Co, Fe, Mo and Cr Kα). Brutus accepts a candidate only if the
measured child/parent height ratio lies roughly between 0.17 and 0.85 — that is, within
0.35× to 1.7× of the expected value, with generous slack for peak-fitting error, background
and partial overlap.
The upper bound is the important one: a peak as tall as, or taller than, its supposed parent cannot be that parent's ghost. Position alone is not sufficient evidence for a Kα2 suspect peak.
Flagged peaks are then treated as follows:
- Yellow Rows: Suspected Kα2 peaks are highlighted in yellow in the table and marked with ⚠. These are excluded from the combinatorial indexing search and from the M(20) Figure of Merit calculation, and count only as "soft" violations during space-group analysis (subject to the consensus override described in the space-group section). Refine MC and Space Group MC exclude them from their refits and figures of merit in the same way, so a child cell's M(20) is comparable with its parent's.
- Kα1 Wavelength for Parent Peaks: The parent peak of each Kα2
ghost is identified and numbered with a
*. It is a pure Kα1 line, so it is indexed, refined and reported with λKα1: the search, the least-squares refinement, the Refine MC and Space Group MC dialogs, the absence analysis, the peak table, the PDF report and the plotted line all use it. Every other peak uses the wavelength in theWavelength (Å)box. The fit itself works at one wavelength, so a parent enters it at the 2θ where its $d$-spacing appears at that wavelength, $\sin\theta' = \sin\theta\,\lambda/\lambda_{K\alpha1}$, which gives exactly its λKα1 $Q$; the zero error is then subtracted in that frame, which differs from subtracting it first by $Z(\lambda/\lambda_{K\alpha1} - 1)/\cos^2\theta$ — 0.0005° for $Z$ = 0.1° at 130° with Cu. (See Flagged or stripped?) - PDF Report Table Markers (*1 and *2): In the final PDF report, reflection pairs belonging to the same doublet are explicitly distinguished:
*1marks the proven Kα1 parent line ($d$-spacing computed with λKa1).*2marks the corresponding Kα2 companion line ($d$-spacing computed with λKa2).
*1, Kα2 for*2), so its 2θ and $d$ residuals compare like with like. - Manual Override: Right-click a yellow row to mark it as a confirmed real peak if it was flagged incorrectly (e.g. due to a near-coincidence with another phase). A confirmed peak is never re-flagged, is returned to the indexing search and the M(20) calculation, and no longer contributes a Kα2-based soft violation.
Measured on synthetic Cu Kα patterns of a cubic cell with $a$ = 5.4309 Å:
| Pattern | Flagged | Stripped |
|---|---|---|
| Sharp, every doublet resolved, zero 0.06° | 5.4309 | 5.4309 |
| Unresolved at low angle, resolved at high angle, zero 0.04° | 5.4305, $Z$ 0.032° | 5.4309, $Z$ 0.039° |
| Sharp, but the 111 Kα2 shoulder not picked, zero 0 | 5.4307, M(20) 593 | 5.4309, M(20) 18059 |
Ctrl + Click
(Snap off) lets the pair be recognised: $a$ = 5.4309 Å, M(20) 4148. A partly
resolved peak, whose maximum sits between the two lines, has no single right wavelength at all.
So: strip Kα2 whenever the doublet is resolved — it is the most accurate route. Use the flags when stripping is not wanted, keep the yellow rows in the list (they are what marks their parents as Kα1 lines), and check the peaks they missed. A Kα1 preset flags nothing, so with one, delete the Kα2 peaks by hand.
Practical Recommendations
- Start from the default slider values and inspect the result visually. Only the peaks shown in the table will be used in the calculations.
- If weak but real peaks are missed, reduce
Min peak (%). If noise is detected as peaks, increase it. - If detection produces shoulders or ringing artifacts rather than genuine reflections, raise
Prominence (%)to 50–60. Below 50 it has little effect; above that it removes shoulders while leaving genuinely resolved close pairs intact. RaiseProminencerather thanMin peak (%)for this, since a shoulder on a strong peak is often taller than a weak but real reflection elsewhere in the pattern — raising the height threshold would delete the reflection and keep the shoulder. - For broad, slowly varying backgrounds, increase
Radius. As a rule of thumb it should be several times your widest peak: a typical laboratory peak of 0.10° FWHM at $2\theta = 30$° is about 0.007 Å⁻¹ wide in $Q$, so the 0.050 Å⁻¹ default already sits comfortably above it. - For noisy data, increase
Smoothing, but avoid over-smoothing, which can merge or shift close peaks. Keep it well underRadius; if you need more than about a third of the radius, the data is probably better served by loweringMin peak (%)and curating the list by hand. - Always manually curate the final peak list. Remove artifacts and known impurity peaks.
If you are not stripping Kα2, check that the program has tagged the Kα2
shoulders, and leave the tagged (yellow) ones in the list: they are already kept out of indexing,
and they are what marks their parents as Kα1 lines. Delete a Kα2 peak the
program did not tag, or add a missed shoulder so the pair is recognised.
Important: At high angles, the Kα1/Kα2 doublet may be fully resolved. If you accidentally include one line from Kα1 and the adjacent one from Kα2 as two separate peaks — treating them as originating from the same wavelength — your peak list will be inconsistent and indexing will likely fail.
- Kα2 stripping can simplify the pattern but may introduce small artifacts. If indexing fails with stripping ON, try turning it OFF and manually cleaning the peak list; the flagged doublets are then indexed with λKα1, but only those (see Flagged or stripped?).
Indexing Algorithm and Search Strategy
Brutus uses a bounded, symmetry-specific trial-and-refine indexing algorithm. For each crystal system, the program generates trial solutions from combinations of low-angle observed peaks and low-index Miller indices, solves the corresponding linear system in reciprocal space, rejects unphysical cells, and then performs a full weighted least-squares refinement on surviving candidates.
Linear System Formulation
The search is formulated as a system of linear equations based on the quadratic form. Given a trial assignment of Miller indices $\{(hkl)_i\}$ to observed peaks $\{Q_{obs,i}\}$:
where $H_{j,i}$ is the $j$-th element of the design row for $(hkl)_i$ (see the table in the Overview), and $P_j$ are the unknown reciprocal-lattice parameters. Stacking $k$ such equations gives a $k \times k$ square system that is solved exactly (or in the over-determined case, by weighted least-squares).
Search Order
All checked systems are searched on the GPU in a single run, one system at a time, in decreasing order of symmetry: cubic → hexagonal → tetragonal → orthorhombic → monoclinic → triclinic. The engine holds one current compute pipeline, so the searches are strictly sequential; the CPU refinement pool, however, keeps refining the candidates of one system while the GPU searches the next, and is drained once after the last system. The post-processing pass (Niggli reduction, transformations, swap search) then runs once over the de-duplicated solutions of all systems.
High-Symmetry Searches (k ≤ 2) GPU
Cubic, tetragonal and hexagonal cells are searched by highsym_solver.wgsl.
Each trial solves a 1×1 or 2×2 system exactly and passes the same geometric and
figure-of-merit filters as the low-symmetry solvers; only surviving cells are refined on the CPU.
(Before October 2026 these systems ran on the CPU, which refined every trial; a tetragonal
search took minutes there and takes seconds on the GPU.)
- Cubic ($k=1$): $Q = A\,N$ with $N = h^2+k^2+l^2$, so $a = \sqrt{N/Q_{obs}}$. hkl sharing the same $N$ give the same trial, so the list keeps one representative per $N$: all representable $N \le 900$ (752 values; numbers of the form $4^a(8b+7)$ cannot occur).
- Tetragonal & Hexagonal ($k=2$): $Q = A\,S + C\,l^2$ with $S = h^2+k^2$ (tetragonal, $A = 1/a^2$) or $S = h^2+hk+k^2$ (hexagonal, $A = 4/(3a^2)$), and $C = 1/c^2$. One representative per $(S, l)$ is kept, complete for $S \le 144$ and $l \le 24$ (1,474 and 1,249 entries), ordered by the quadratic form for $a = c$. Pairs of two $hk0$ or two $00l$ lines are singular and skipped.
- Rhombohedral (R) lattices are found by the hexagonal search: an R lattice is a hexagonal lattice with two-thirds of the reflections absent ($-h+k+l = 3n$ obverse, $h-k+l = 3n$ reverse), so its observed lines are all hexagonal lines of the triple cell. Refinement and the space-group analysis (R centring) work in these hexagonal axes, and the refinement recognises the R lattice by itself (see R lattices in hexagonal axes). Tested on corundum ($c/a \approx 2.73$) and Bi2Te3 ($c/a \approx 7$) at default settings.
Full-list figure of merit. For these three systems the GPU uploads the whole hkl list, not only the search basis: the combinations are taken from the first $N_{hkl}$ entries, but the figure-of-merit pre-filter scores each trial cell against all of them. With one or two unknowns the number of trials is small, so this costs little, and it prevents a correct cell with a long axis from failing the pre-filter merely because its deep lines were truncated away. The low-symmetry systems keep scoring against the search basis only.
CPU fallback. When WebGPU is unavailable, cubic, tetragonal and hexagonal are searched as before in a background worker: cubic over the first 12 peaks and all hkl with $h \le 40$, tetragonal and hexagonal over all pairs of the first 12 peaks and hkl to index 12 (≈ 92 million trials, every one refined), with a trials-per-second counter in the status bar. Orthorhombic, monoclinic and triclinic have no CPU search.
Low-Symmetry Searches GPU
For Orthorhombic, Monoclinic, and Triclinic systems the combinatorial explosion is largest: the WebGPU API allows billions of trial cells to be evaluated in minutes. The search space formulas below apply to all six systems.
The Combinatorial Search Space
The total number of cells tested depends on two user-configurable parameters.
- $C(N_{peaks}, k)$ — the number of ways to choose $k$ peaks from the pool of $N_{peaks}$ low-angle observed peaks.
- $C(N_{hkl}, k)$ — the number of ways to choose $k$ HKL triplets from the $N_{hkl}$ basis.
- $k!$ — the number of permutations (assignments of the chosen HKLs to the chosen peaks). Cubic: 1; tetragonal/hexagonal: 2; Ortho: $3!=6$; Mono: $4!=24$; Tri: $6!=720$.
System Specifics
| System | $k$ | Default $N_{hkl}$ (5 %/unknown) | Default $N_{peaks}$ (Depth 3) | Estimated trials (defaults) |
|---|---|---|---|---|
| Orthorhombic | 3 | 329 | 6 | $C(6,3) \times C(329,3) \times 6 \approx 706\;\text{Million}$ |
| Monoclinic | 4 | 114 | 7 | $C(7,4) \times C(114,4) \times 24 \approx 5.6\;\text{Billion}$ |
| Triclinic | 6 | 37 | 9 | $C(9,6) \times C(37,6) \times 720 \approx 140\;\text{Billion}$ |
These numbers can grow very rapidly. For example, raising HKL Basis from 5 to 7.5 %/unknown
takes the Monoclinic $N_{hkl}$ from 114 to 170 and multiplies the HKL combinations by roughly
$(170/114)^4 \approx 5\times$, and raising Depth from 3 to 5 takes monoclinic from 7 to 9 peaks
and multiplies the peak combinations by $C(9,4)/C(7,4) = 126/35 \approx 3.6\times$. Because both
settings are shared, they act on all checked systems at once, and most strongly on the systems with the
most unknowns.
Axial Front-Loading (finding "strange" axis ratios)
The HKL basis is sorted by index magnitude $h^2+k^2+l^2$, but that magnitude is only a proxy for a reflection's actual $Q$ when the cell is roughly isotropic. For a cell with one very long (or very short) axis, the reflection that indexes a given low-angle peak can be a high-order axial reflection — e.g. a long $c$ axis makes $(0\,0\,l)$ with large $l$ appear at low angle. Under a pure magnitude sort such a reflection sits far down the list and is discarded when the basis is truncated to $N_{hkl}$, so the cell cannot be found.
To prevent this, for orthorhombic and monoclinic Brutus partitions the sorted list into axial reflections (two of $h,k,l$ equal to zero) and everything else, and places all axials at the front before truncation. This guarantees that the axis-defining reflections survive regardless of $N_{hkl}$, giving the brute-force solver a chance to assign a high-order axial to a low-angle peak and so recover an unusual axis ratio. Because $N_{hkl}$ (and therefore $C(N_{hkl},k)$) is fixed, front-loading changes only which reflections are kept — it swaps the highest-magnitude tail reflections for the axials — and does not increase the search cost.
The depth of the axial set matters. Orthorhombic generates reflections to index 12, so its axials already reach $(0\,0\,12)$. Monoclinic's general grid only reaches index 6, which was too shallow for genuinely long axes (a $c \approx 30\;\text{Å}$ axis needs $(0\,0\,l)$ well beyond $l=6$ to index its observable peaks), so Brutus additionally injects deep axial reflections $(h00)/(0k0)/(00l)$ out to index 12 for monoclinic. These are cheap (three reflections per order) and are front-loaded like the rest; the only overhead is that an all-axial 4-tuple is rank-deficient in the $D=hl$ (i.e. $\beta$) column and is discarded by the near-zero-determinant filter — roughly $1.5\%$ of combinations at $N_{hkl}=100$.
Triclinic is deliberately excluded from front-loading. With $k=6$, the reciprocal angles
($D=kl$, $E=hl$, $F=hk$) are carried only by mixed reflections, and the basis is small (default
$N_{hkl}=37$). Promoting axials there would crowd out the mixed reflections needed to determine the angles
and drive most trials singular, so triclinic keeps the plain magnitude ordering. The practical consequence
is that triclinic cells with one very long axis are intrinsically harder for this tool; raising $N_{hkl}$
(HKL Basis up to 16 %/unknown, i.e. 96% of the ceiling of 123) is the available lever.
GPU Memory Management & Safe Batching
Testing hundreds of billions of cells generates massive amounts of data. To prevent crashing your browser or freezing your computer, Brutus uses a Safe Batching architecture:
-
Dispatch chunking (thread budget):
The HKL-combination dimension is split into chunks using a target of
500,000 invocations per dispatch for every system except Triclinic,
and 50,000 for Triclinic (whose 6×6 solve and 720-permutation inner loop make
each thread far heavier). These are sizing targets, not hard trial ceilings:
workgroup rounding and the minimum of one Y workgroup can exceed the target, and
each invocation can test several peak permutations. The engine computes
hklsPerChunk = safeWorkgroupsY × workgroupSizeY, iterates the full search asceil(totalHklCombos / hklsPerChunk)sequential dispatches, and yields to the event loop between chunks so the browser tab stays responsive. The yield is aMessageChannelpost rather thansetTimeout(0): browsers clamp nested timers to a ~4 ms floor, so a per-chunksetTimeout(0)in a long run would waste several seconds sleeping in the clamp. TheMessageChanneltask is unclamped, and the engine only yields when the last yield was more than one display frame (~16 ms) ago, so keeping the tab responsive costs almost nothing. -
WebGPU dimension ceiling:
A compute dispatch may request at most 65,535 workgroups per dimension; Brutus additionally clamps the
Y (HKL) dimension to
16,383workgroups per dispatch as a conservative cross-driver limit. This bound, combined with the thread budget above, is what fixes the chunk size and it allows indexing on old GPU cards. -
Time Limit (TDR Prevention):
On Windows, if a single GPU dispatch takes longer than ~2 seconds, the OS assumes the driver has frozen
and resets it (
DXGI_ERROR_DEVICE_HUNG). The smaller Triclinic thread budget exists specifically to keep each dispatch well under this watchdog timeout. -
Buffer sizing:
At device-request time Brutus asks the adapter for its maximum
maxBufferSizeandmaxStorageBufferBindingSize. The results buffer is then sized toCandidate buffer × 1,000 × cell-struct-size(32 bytes/cell for Triclinic, 16 for the others), once per system searched. The solver loop releases its per-run GPU buffers in afinallyblock when execution completes, fails or is cancelled. The GPU device itself is created once and reused by every search for the lifetime of the page, rather than re-created per run, and is released on page unload. If the browser or driver loses the device mid-search (a driver reset or TDR, or the tab being suspended), Brutus reports it and disables GPU searches until the page is reloaded, since a lost device cannot be revived. Note that an inactive panel may be throttled by the OS, so for full speed you may need to keep the panel active. - Incremental read-back: The engine reads the candidate counter after each group of up to eight dispatches (and at the final dispatch). It then copies only the candidate cells written since the previous read-back, not the whole results buffer. Reading the full buffer every chunk would re-copy every earlier cell over and over, turning read-back into an $O(n^2)$ cost that on a full buffer dominates the run; the incremental copy keeps it linear.
What this means for you: The engine manages dispatch sizes automatically. The Buffer/Candidate control sets the candidate capacity. Small progress increments can reflect a large number of dispatches; they do not by themselves indicate a failure.
If the search is too slow: Adjusting internal GPU memory or chunk parameters is not useful. Instead, curate the peak list, uncheck the systems you can exclude, lowerHKL Basis, or reduceDepth.
Two-Stage GPU Filtering
Most candidate cells are invalid and are discarded on the GPU to save CPU time. Two filters are applied:
-
Geometric Filter:
Cells are rejected immediately if the reciprocal metric is singular (near-zero determinant), if any
edge length falls outside $2\;\text{Å} \le a,b,c \le 50\;\text{Å}$, or if the volume is below
$20\;\text{Å}^3$ or above the user's
Max Volume. Angle bounds are applied on the GPU directly and are system-specific:- Monoclinic: $\beta$ is folded to its obtuse representation and required to lie in $90° \le \beta \le 150°$ (after the fold only the upper limit can fail).
- Triclinic: each of $\alpha, \beta, \gamma$ must lie in $60° \le \angle \le 150°$.
-
Figure of Merit Pre-filter:
For surviving cells, the GPU calculates a fast internal score: the mean of the per-peak normalised
residual $\langle |\Delta Q_i| / \Delta Q_{tol,i}\rangle$, evaluated over the first
$\min(\max(k + \text{Depth}, 10),\, 32)$ observed peaks (for orthorhombic, monoclinic and triclinic
$k + \text{Depth} = N_{peaks}$). The lower bound of 10 guarantees a meaningful sample
even for very small $N_{peaks}$; the upper bound is the shader constant
MAX_FOM_PEAKS = 32, which is the same for all four GPU shaders. The $k$ peaks a trial was solved from fit exactly and test nothing, so what judges a cell is the scored peaks minus those $k$ and minus the impurity allowance: fewer for triclinic ($k = 6$) than for cubic ($k = 1$). The matching tolerance $\Delta Q_{tol,i}$ is the per-peak Q tolerance derived from the user's 2θ Error (see Q-Space Tolerance). If the mean normalised residual exceedsFoM Tolerance, the cell is discarded. A running-sum "fail-fast" test aborts the peak loop as soon as the partial sum can no longer pass, so most rejects touch only the first 2–3 peaks. Only cells passing this filter are written to the GPU results buffer for CPU refinement.
Impurity tolerance. IfImpurity Peaksis non-zero, the shader takes a second path: it scores every peak, then averages only the best $(N_{fom} - N_{impurity})$ residuals via a partial selection sort, so the worst-fitting peaks are discarded rather than penalising the cell. This path cannot use the plain running-sum abort, since the worst peaks are only known at the end; instead (for up to 4 impurity peaks) it keeps the largest residuals seen so far and aborts as soon as sum − largest exceeds the budget, a lower bound on the final score. It still scores more peaks per reject, so a non-zeroImpurity Peaksmakes the GPU stage somewhat slower. The impurity count is clamped by the program to $N_{fom} - k - 1$, so that at least one peak which was not solved exactly still tests the cell (and inside the shader to at most $N_{fom} - 1$), whatever is entered in the UI. Without the first clamp a short peak list let every geometrically valid cell through.
Least-Squares Refinement
Every candidate cell passing the GPU (or CPU) filters is subjected to a full weighted least-squares
refinement before being scored and reported. This section details the weighting scheme, zero-point
correction, and error propagation implemented in js/crystallography/ (refine.js, fit.js).
Q-Space Tolerance
The matching tolerance used during peak assignment is not a fixed ΔQ but a peak-angle-dependent quantity derived from the user's stated $\sigma_{2\theta}$. From $Q = (4/\lambda^2)\sin^2\theta$, differentiating:
This means the Q tolerance is largest at intermediate angles (where $\sin 2\theta$ is largest) and converges to zero at $2\theta = 0°$ and $2\theta = 180°$. The implementation adds a small constant ($10^{-9}$) to prevent division by zero.
Least-Squares Weighting Scheme
For a measurement with constant $2\theta$ uncertainty $\sigma_{2\theta}$, the uncertainty in $Q_{obs}$ is:
The statistically optimal weight for each peak in the least-squares system is therefore:
Weights are smallest near $2\theta=90°$ and rise towards both $0°$ and $180°$. The implementation uses $w_i=1/\max[\sin^2(2\theta_i),\sin^2(178°)]$: the floor is on the denominator, which caps the maximum weight. This differs from weighting by $Q_{obs,i}$ and matters when fitting the zero shift.
The least-squares normal equations solved are therefore:
where $M$ is the design matrix (rows = indexed peaks, columns = reciprocal-lattice parameters), $W = \text{diag}(w_1, \ldots, w_n)$, and $\mathbf{x}$ is the vector of reciprocal parameters. This system is solved numerically via Cholesky decomposition for symmetric positive-definite matrices (implemented in choleskyDecomposition / choleskySolve).
Zero-Point Error Refinement (Two-Round Strategy)
When Refine Zero Error is enabled, an extra design-matrix column
fits a zero-shift coefficient in radians; the reported $\Delta_{zero}$ is
converted to degrees. The physical model is that the true $2\theta$ of a
peak is $2\theta_{true} = 2\theta_{obs} - \Delta_{zero}$, which shifts the observed Q as:
With angles in radians, the linear model fits observed Q as cell Q plus the zero-shift contribution. Its positive zero-error design-matrix column is:
A two-round strategy is used to handle non-trivial zero shifts robustly:
- Round 1: Peak assignment is done assuming $\Delta_{zero}=0$. The full weighted LS system (cell + zero) is solved to obtain a first estimate $\Delta_{zero}^{(1)}$. When that assignment fails, or pairs fewer peaks than the list minus the impurity allowance, trial offsets are scanned as well (steps of the 2θ error, both signs, up to a fixed limit) and the one that pairs the most peaks is kept: on a dense pattern a correct cell with a real offset still finds a few chance matches at zero, and those alone would give a wrong first estimate.
- Round 2: Peak assignment is repeated, this time correcting the observed $Q$ values by $\Delta_{zero}^{(1)}$ when its magnitude exceeds $10^{-4}$ degrees. The LS system is solved again on that pairing. If this second fit fails, the first fit is retained.
With zero refinement disabled, only one pairing/fit is performed and no fitted zero correction is attached. With it enabled, the same up-to-two-round strategy applies to every system, whether the candidate came from the GPU or from the CPU fallback. GPU candidates are refined in parallel by a pool of dedicated Web Workers (see Architecture).
How the zero shift appears on the plot. The measured pattern is drawn exactly as recorded, including its zero error, because that is the only thing actually observed. The refined cell, in contrast, describes the sample once the zero error has been removed, so its calculated lines live in the corrected frame $2\theta_{true} = 2\theta_{obs} - \Delta_{zero}$. To draw a calculated line beside the observed peak it explains, Brutus therefore maps it back the other way, $2\theta_{plot} = 2\theta_{calc} + \Delta_{zero}$. Without that step every blue tick would sit a distance $\Delta_{zero}$ from its red partner — a small, perfectly uniform offset across the whole pattern, easy to misread as a slightly wrong cell. If you see a uniform offset between red and blue ticks, suspect the zero error rather than the cell parameters; the refined value is shown as $Z$ in the solutions table.
Minimum Peaks Required for Acceptance
A solution is accepted only if a minimum number of observed peaks can be indexed. These thresholds are hard-coded. The free-parameter column below counts cell parameters only; refining zero adds one parameter, and the zero is fitted only while that leaves at least one degree of freedom: with exactly seven triclinic peaks the cell is fitted with the zero held at its trial value (a seven-parameter fit of seven peaks is exact and says nothing):
| System | Free parameters | Min indexed peaks |
|---|---|---|
| Cubic | 1 | 4 |
| Tetragonal / Hexagonal | 2 | 5 |
| Orthorhombic | 3 | 6 |
| Monoclinic | 4 | 7 |
| Triclinic | 6 | 7 |
The same thresholds decide whether a system can be searched at all: a checked system with fewer peaks
in the 2θ window than its minimum is skipped with a message, and the Index button asks for
more peaks only when no checked system can run.
Standard Deviation Propagation
The covariance matrix $V = \sigma^2 (M^T W M)^{-1}$ (with $\sigma^2 = SSR/\nu$, $\nu$ = degrees of freedom) is propagated to standard deviations of the cell parameters:
- Cubic: $\sigma_a = \tfrac{1}{2} a^3 \sqrt{V_{AA}}$.
- Tetragonal / Hexagonal: $\sigma_a = \tfrac{1}{2} a^3 \sqrt{V_{AA}}$, $\sigma_c = \tfrac{1}{2} c^3 \sqrt{V_{CC}}$.
- Orthorhombic: Diagonal terms $\sigma_a, \sigma_b, \sigma_c$ analogously.
- Monoclinic: A numerical Jacobian of $(a, b, c, \beta)$ with respect to the fitted parameters, with the full covariance matrix (off-diagonal terms included). $\beta$ is differentiated before it is folded to its obtuse value, so the fold at 90° does not erase the derivative.
- Triclinic: A full numerical Jacobian $\partial(\text{cell})/\partial(\text{fit params})$ via central finite differences (adaptive step size $\approx 10^{-5}$ relative), propagated as $\sigma_{x_i}^2 = \sum_{j,k} J_{ij} V_{jk} J_{ik}$.
- Zero correction: $\sigma_{zero} = \sqrt{|V_{zz}|} \times (180/\pi)$, appended to the errors regardless of system.
Computational Limits & The Scale of Search
Because Brutus performs a brute-force combinatorial search, the number of trial cells can become astronomical. While modern GPUs are incredibly fast, there are hard limits defined by both hardware (WebGPU specifications) and practical time constraints.
The Hierarchy of Limits
The "Total Trials" displayed in the application is:
The HKL Combos count $C(N_{hkl}, k)$ is the critical hardware constraint, and the reason
is specific to how the shaders work. Rather than materialising an enormous list of HKL tuples in memory,
each GPU thread receives a single linear index and reconstructs its own unique $k$-combination on the fly
using the combinatorial number system (get_combinadic_indices), which reads a
precomputed table of binomial coefficients. Both that linear index and every entry of the binomial table
are 32-bit unsigned integers (u32). Consequently the entire enumeration must fit in
$C(N_{hkl}, k) < 2^{32}-1 \approx 4.29 \times 10^9$: past that point the thread index and
the unranking arithmetic would overflow, silently producing wrong HKL assignments and truncating the
search. Widening the host-side table would not help — the limit is intrinsic to the u32 shader.
This translates into a hard ceiling on the HKL basis, distinct for each system. For $k \le 3$ the generated lists run out first (cubic 752, tetragonal 1,474, hexagonal 1,249, orthorhombic 2,196); the u32 limit binds for monoclinic and triclinic:
| System | $k$ | u32 ceiling on $N_{hkl}$ | $C(\text{Max}, k)$ |
|---|---|---|---|
| Cubic | 1 | $2^{32}-1$ | — |
| Tetragonal / Hexagonal | 2 | 92,682 | $4.295 \times 10^9$ |
| Orthorhombic | 3 | 2,954 | $4.292 \times 10^9$ |
| Monoclinic | 4 | 568 | $4.291 \times 10^9$ |
| Triclinic | 6 | 123 | $4.249 \times 10^9$ |
Each value is the largest $N_{hkl}$ for which $C(N_{hkl}, k)$ still fits in u32
(e.g. $C(124, 6) \approx 4.47 \times 10^9$ already overflows, so Triclinic stops at 123). Because
HKL Basis is a percentage of $N_{max} = \min(\text{list length}, \text{u32 ceiling})$, capped
at 100%, no setting can exceed the ceiling. A pre-flight check still recomputes
$C(N_{hkl}, k)$ for every checked system and would disable the Index button (its tooltip then says
"Too Large") should a list ever grow past it.
The u32 ceiling is not the only pre-flight limit. A search can stay well under it and still be impractically slow, because the number of GPU dispatches grows as you raise Depth: the per-dispatch thread budget is fixed, so more peak combinations mean fewer HKL combinations per dispatch and therefore more dispatches to cover the same space. At the extreme — triclinic with the maximum peak count — the chunk collapses to a handful of HKLs and the run would need on the order of a billion dispatches: it never errors, it just never finishes. The pre-flight check therefore estimates the dispatch count of every checked system and treats it like the u32 ceiling: a warning in the status line above a soft threshold (100,000 dispatches), and a red Index button above a hard one (2 million), naming the system concerned. It also blocks a peak count whose combinations exceed the WebGPU limit of 65,535 workgroups. If you see a “too slow” block, lower Depth first — it has a much larger effect on dispatch count than HKL Basis — or uncheck triclinic.
System-Specific Breakdown
1. Triclinic ($k=6$)
- HKL Limit: The 4.29 Billion wall is reached at $N_{hkl} = 123$. ($C(123,6) \approx 4.24 \times 10^9$).
- Permutations: $6! = 720$.
- Peak Multiplier: Using 18 peaks (Depth 12): $C(18,6) = 18,564$.
- Maximum Possible Trials: $$ 4.24 \times 10^9 \times 18,564 \times 720 \approx 5.7 \times 10^{16} \quad (57 \text{ Quadrillion}) $$
2. Monoclinic ($k=4$)
- HKL Limit: The wall is reached at $N_{hkl} = 568$. ($C(568,4) \approx 4.29 \times 10^9$).
- Permutations: $4! = 24$.
- Peak Multiplier: Using 16 peaks (Depth 12): $C(16,4) = 1,820$.
- Maximum Possible Trials: $$ 4.29 \times 10^9 \times 1,820 \times 24 \approx 1.9 \times 10^{14} \quad (190 \text{ Trillion}) $$
3. Orthorhombic ($k=3$)
- HKL Limit: The u32 wall would be at $N_{hkl} = 2,954$, but the generated list ends at 2,196 ($C(2196,3) \approx 1.76 \times 10^9$).
- Permutations: $3! = 6$.
- Peak Multiplier: Using 15 peaks (Depth 12): $C(15,3) = 455$.
- Maximum Possible Trials: $$ 1.76 \times 10^9 \times 455 \times 6 \approx 4.8 \times 10^{12} \quad (4.8 \text{ Trillion}) $$
4. Cubic, Tetragonal, Hexagonal ($k \le 2$)
- Even at the maximum settings these searches stay small: tetragonal at 16 %/unknown (32%, 472 hkl) and Depth 12 ($3 \times 14 = 42$ peaks) is $C(472,2) \times C(42,2) \times 2 \approx 190$ million trials. Their run time is dominated by refinement of the candidates on the CPU, not by the GPU.
- That is why a wider hexagonal or tetragonal basis rarely pays: the extra trials mostly yield
supercells of small cells, which pass the GPU filter and are refined one by one. On synthetic Si,
rutile and ZnO patterns a 20 % or 40 % basis (4–16× the trials) filled the
100 k candidate buffer, so the search was truncated, and took about three times as long (in a
software WebGPU test); on nine
test cells, large, long-$c$ and R lattices included, it found nothing the default 10 % missed.
Raise it only for a cell you expect to be large, and keep
Max Volumetight, which removes most supercells. Cubic sends only a few dozen candidates to refinement whatever its basis, so it always searches its whole list.
Practical Implications
Is the "Trials" number real?
Yes. It represents the total number of mathematical systems the GPU would solve. However,
most invalid cells are rejected after checking only the first 2 or 3 peaks ("Fail-Fast" optimisation),
meaning the GPU rarely performs the full calculation for every trial. The effective throughput
is substantially higher than the raw theoretical number implies.
Can you actually run 120 Quadrillion trials?
Technically yes — the Safe Batching system prevents your computer from crashing. However, even at
200 Million trials/sec, 120 Quadrillion trials would take ~19 years to finish.
Practical Limit: For a search to finish in a "coffee break" time frame (5–10 minutes), keep the Total Trials count under 100–500 Billion. For modern desktop GPUs (e.g. Nvidia RTX series), speeds of 100 Mcells/sec are typical for Orthorhombic; Triclinic is slower due to the larger $k$ and the more complex 6×6 linear solve. With the default systems checked, the run time is dominated by monoclinic; checking triclinic as well usually multiplies it many times. The size of the GPU buffer, or the accepted solutions, will greatly affect the indexing time because each cell will pass a CPU Least Square fit.
Tuning the Search
If you obtain no solutions, or too many, consider the following adjustments.
If no solutions (or only poor ones) are found
- Re-examine the peak list. This is the dominant failure mode. Check that the first 10–15 peaks belong to a single phase, are free of impurities, and have accurate $2\theta$ positions.
-
Relax
2θ Error. If this value is too strict for your data resolution, valid solutions may be discarded. -
Increase
Max Volume. The true cell may be larger than initially expected. - Check more systems. Triclinic is off by default; check it if the higher-symmetry results are not convincing. To keep the run short, uncheck the systems you have already explored.
-
Increase GPU Parameters.
Try increasing
HKL Basis(e.g. from 5 to 8 %/unknown) orDepth(e.g. from 3 to 5). Both apply to every checked system, so consider unchecking the ones you do not need first. This significantly increases search time but covers more combinations. - Increase FoM Tolerance. If there is a significant zero-shift, valid trial cells may have large pre-refinement errors and be discarded. Raise FoM Tolerance to 3-5 and increase the Buffer size accordingly.
If you get too many solutions (GPU buffer fills)
The GPU buffer is limited (default 100,000 candidates per system). If it fills up, GPU enumeration of that system stops early, a status message names it, and unvisited combinations remain unsearched; the following systems are still searched. In that case, if there is no solution:
- Tighten the FoM Tolerance (e.g. from 1.25 to 1.0). This discards more candidates on the GPU, so fewer reach the CPU buffer.
-
Lower the
Max Volumeif you can constrain the cell size further. - Increase the Buffer size (e.g. from 100 to 250 kCells) if you suspect the correct solution may occur in combinations not yet visited when the buffer fills. Note that larger buffers mean more CPU work during post-processing.
-
Tighten
2θ Errorif your data quality warrants it — this also tightens the Q-tolerance used in matching.
Evaluating Solutions
The indexing search usually produces several candidate cells. Selecting the correct one requires interpreting figures of merit and checking the refined fit visually.
How many solutions are kept
Every system feeds one common list, ranked by M(20). Each cut below keeps a reserved share for every system that has cells, then fills the remaining places with the best of the rest, whatever their system. The share is the cap divided by the number of systems present in the list at that moment, so it adapts: with one system that system may use the whole cap, with six each is guaranteed a sixth. In order:
- Candidate buffer, per system. The GPU search of each system stores at most
Candidate buffer (×1000)candidate cells (default 100, i.e. 100,000; the buffer starts empty for every system). When it fills, that system’s search ends early and the run moves on, so a system cannot take space from another here; the Log and the status line say when a buffer filled and how much of the search was done. - Acceptance. A candidate is refined on the CPU and enters the list only if its M(20) is above 2.0 (and, with the impurity allowance, if at most that many of the peaks scored are unindexed). A cell already in the list (same cell, same input data) is not added twice; the better copy is kept.
- Working list. When the list passes 500 entries it is cut to 400: each system present keeps its best 400/n cells (n systems present, e.g. 133 each for three), and the other places go to the best remaining cells by M(20). The Solutions tab shows at most 50 rows while the run goes on.
- Final sieve (
applyFinalSieve, described below), at the end of the run, over the list including the solutions of earlier runs of the session: equivalent descriptions of one lattice are merged first, which removes most of the duplicates a system produces. - Final cap: 50 solutions. Each system present keeps its best 50/n cells (for example 16 each for three systems, 8 for six); the places a system does not fill go to the best remaining cells by M(20). The two cells of an ≡ pair are kept together, so the list can exceed 50 by a few. The Log gives the number of solutions per system after the sieve.
So at most about 50 solutions are listed after a run, and every system that produced a cell is represented. The reserve is a guarantee of presence, not of quality: a system that produced only poor cells (M(20) a few units) still gets its share, below the strong cells of the others in the list, and its cells are the ones to treat with suspicion. If the list is dominated by cells of one system, that is because the other systems produced fewer than their share.
de Wolff Figure of Merit: M(20) / M(N)
The primary ranking indicator is the de Wolff Figure of Merit, M(N), calculated from the first $N$ observed reflections (typically $N = 20$ or the full peak list if fewer than 20 peaks are available). It quantifies both positional accuracy and completeness. The implementation uses:
- $Q_N = 1/d_N^2$ — the Q-value of the $N$-th observed line.
- $\langle|\Delta Q|\rangle$ — the mean absolute deviation between observed and calculated Q, averaged over all successfully indexed lines within $Q_N$.
- $N_{calc}$ — the number of all calculated (allowed) reflections up to the $N$-th observed line, the calculated line that indexes it included: $Q \leq \max(Q_N, Q_{calc,N})$. (Lines are generated a little beyond the last peak; that margin is not part of the count.) This penalises cells that generate many unobserved calculated lines. $F_N$ counts the same lines.
A high M(N) therefore requires both a small average positional error (large 1/$\langle|\Delta Q|\rangle$) and high completeness (small $N_{calc}$ relative to $N$). Both M(20) (from the first 20 peaks) and M(all) (from the full peak list) are computed and stored. The M(20) value is used for ranking; M(all) appears in the PDF report.
| M(20) value | Interpretation |
|---|---|
| > 20 | Very likely correct. A cell with both high M(20) and plausible chemistry is almost certainly the true solution. |
| > 10 | Likely correct, provided the cell volume is chemically plausible. |
| 5–10 | Plausible; requires further inspection. Check all peaks visually. |
| < 5 | Probably spurious; treat with great caution. |
A minimum M(20) of 2.0 is required for a solution to be retained at all. Solutions below this threshold are silently discarded.
R lattices in hexagonal axes
A rhombohedral (R) lattice is described in Brutus on its hexagonal triple cell. Two thirds of the hexagonal reflections are then systematically absent: only those with $-h+k+l = 3n$ (obverse) exist, or $h-k+l = 3n$ in the reverse setting. A powder line merges the two $\bar{3}m$ stars $(hkl)$ and $(khl)$ and exists if either is allowed, so about half of the calculated hexagonal lines are absent (corundum to 75° 2θ: 25 lines instead of 51), and obverse and reverse give the same line list. Counting the absent lines in $N_{calc}$ made M(20) about two times too low, so a true R cell could rank below a lower-symmetry sub-cell.
Every hexagonal cell is therefore probed for an R lattice during refinement. After the normal (P) fit, the R line list is generated for the refined cell, and if it indexes exactly as many peaks as the full hexagonal list — both among the first 20 and among all peaks — the cell is refined again as R: peaks are paired only with R lines and M(20) counts only R lines. Requiring the same number of indexed peaks ensures the impurity allowance is never spent on a genuine non-R line, so a primitive hexagonal cell can never be turned into an R one. Both versions describe one lattice: when the R one scores at least as well, the primitive one is not listed. The probe runs before the M(20) threshold: an R lattice that scores below 2.0 on the full list is still caught.
Measured on synthetic patterns: counting only the R lines gives corundum M(20) 232 (ranked first, ahead of a monoclinic sub-cell at 226) and Bi2Te3 164; ZnO (primitive hexagonal) is correctly left as P.
- Where the R line list is used: refinement and M(20)/F(N), the post-processing swap search, Refine MC, the calculated tick marks on the chart and the hkl table of the PDF report. Cells derived from an R cell by these tools stay R.
- Where it is not: the automatic space-group analysis and Space Group MC always use the full hexagonal lattice, because they detect R centring precisely by finding the R-forbidden lines empty. The R flag does not decide the space group; the analysis still does.
- Display: an R badge in the solutions table, “hexa R” in the report summary and “(R lattice, hexagonal axes)” in the report details.
- Sub-cells and transformed cells found in post-processing do not inherit the flag; they are probed afresh when refined.
F(N) Figure of Merit
As a complementary metric, Brutus computes the F(N) figure of merit (Smith & Snyder, 1979). While M(N) is expressed in Q-space, F(N) uses $2\theta$ directly:
- $N$ — number of observed lines used.
- $\langle|\Delta(2\theta)|\rangle$ — mean absolute difference between observed and calculated $2\theta$ for those lines.
- $N_{calc}$ — number of theoretical reflections (observed or not) up to the $2\theta$ of the $N$-th observed line.
A high F(20) indicates a precise fit with low average angular error. A solution with both high M(20) and high F(20) is highly reliable. Both F(20) and F(all) are reported in the PDF.
Least-Squares Refinement and Standard Deviations
For each promising candidate, Brutus performs the weighted least-squares refinement described in the Refinement section: one pairing/fit with fixed zero, or up to two when zero refinement is enabled. The resulting cell parameters are reported with standard deviations propagated from the covariance matrix.
When Refine Zero Error is enabled, the reported zero correction ($\Delta_{zero}$)
represents a systematic misalignment of the diffractometer. A large value (e.g. >0.05° for a lab
instrument) may indicate a calibration issue and should be investigated independently.
Duplicate Suppression
An initial key suppresses repeated refined candidates before the final sieve. Numerical components are rounded to four decimal places. Cubic uses its single edge; tetragonal and hexagonal use $a,c$; orthorhombic normalises axis order; monoclinic treats $a,c$ interchangeably and includes $b,\beta$. Triclinic includes all six ordered cell parameters, keeping each angle associated with its axes. Volume and angles alone do not identify a triclinic lattice. Within a matching key, the higher-M(20) candidate replaces the lower one.
Fixed-zero and fitted-zero models have different keys. On the main thread, merging also requires the same input peak data, wavelength, 2θ tolerance and impurity allowance. Identical-input reruns can share results; a result from changed input data does not replace a current result solely because its stored M(20) is higher. Existing solutions remain available across runs, subject to the reservoir and final result caps.
The final sieve then checks lattice geometry to merge equivalent axis permutations and basis settings, retaining the more symmetric description of each lattice, and otherwise the better M(20). When a less symmetric description fits clearly better, both are kept and marked ≡, for you to choose.
Space Group Analysis
After a high-quality unit cell is obtained, Brutus can suggest likely space groups based on systematic absences. This serves as input for subsequent structure solution or Rietveld refinement.
Two routes, one absence test
Space groups reach you by two different routes, and it is worth knowing which is which before reading either.
| Automatic analysis | Space Group MC | |
|---|---|---|
| When | Runs on its own for every solution; appears in the results table and in the PDF report. | Only when you ask for it, on one cell at a time. |
| Question | Which settings do the observed reflections contradict, and by how many? | Which extinction class does the evidence favour, and by how much? |
| Output | A compatibility list: settings grouped by hard-violation count, ordered by space-group number within each group. Not a ranking. | A ranked table with a log-odds score, a margin over the runner-up, and a NOT DECISIVE flag when that margin is too small to call. |
| Unit of answer | Individual settings. | Extinction classes — sets of settings powder data cannot separate. |
| Peaks used | All indexed peaks, Kα2-suspect ones included but demoted to soft. | Kα2-suspect peaks excluded; no centering pre-filter. |
| Refines the cell? | No. | Yes — under each hypothesis in turn, which is the point of it. |
Only one of them claims a winner. The automatic analysis reports what the data rule out; it does not put the survivors in preference order, for the reason set out in A compatibility list, not a ranking. If you want a determination, run the Space Group MC. The PDF report reproduces its conclusion verbatim and recomputes nothing — see What the PDF report says about space groups.
What the two share is the primitive underneath: both decide whether a given reflection is systematically absent by applying the candidate’s symmetry operators directly, as described in Absences are computed from the symmetry operators. So they can still disagree about the detected centering or which conditions the data support — they are looking at different peak sets and asking different questions — but not about whether a particular reflection is forbidden under a particular group.
Note: For some space groups that have different origin choices but identical extinction rules (e.g. Pmmn), both settings appear in the list. This is intentional — they are not distinguishable by powder diffraction alone, and the reminder is useful for subsequent Rietveld refinement.
Method
- Generate unique reflections. Using the refined cell, Brutus computes a complete list of theoretical reflections up to the maximum observed $2\theta$, applying Friedel's law to keep only symmetry-unique $(hkl)$ indices (e.g. $l > 0$, or $l=0,\,k > 0$, or $l=k=0,\,h > 0$ for triclinic).
-
Index observed peaks (1.5× Tolerance Relaxation).
All peaks in the curated list are matched against the theoretical pattern. During space group analysis—and when generating the final PDF report table—Brutus applies a 1.5× safety multiplier to your stated
2θ Errorwindow. For example, an input tolerance of 0.04° opens an effective 0.06° matching window. This relaxation prevents slight sample zero-shifts or high-angle refinement drift from rejecting valid reflections, which would otherwise trigger false systematic absences and disqualify the correct space group. -
Retain all indexed reflections.
Every uniquely indexed peak is passed to the extinction analysis, including peaks that
overlap another theoretical $(hkl)$ within the
2θ Errorwindow. Filtering overlapped peaks out would be self-defeating on exactly the cells that need the most care: when a lattice of high symmetry is described in a lower-symmetry setting, the reflections that overlap are the symmetry-related ones, so such a filter removes most of the pattern (typically 70–80% of peaks) and keeps the biased remnant least able to falsify a centering. Overlap is therefore handled one reflection at a time, through the Ambiguous demotion described below, rather than by excluding peaks up front. -
Determine centering and extinctions.
Each indexed peak is tested against every candidate setting by asking its symmetry
operators directly, as described in Absences are computed
from the symmetry operators. To prevent noise or overlap from unfairly disqualifying a valid space
group, Brutus classifies violations into two categories:
- Hard violations: A strong, real (non-Kα2), unambiguous reflection clearly breaks a rule. These count against the setting: they are what groups the compatibility list, and in the Space Group MC they are what falsifies a class outright.
- Soft violations: A reflection breaks a rule, but the peak is considered unreliable. These do not count against the setting, but are listed in the report for the user to review. A violation is flagged as "soft" if the peak is:
- Kα2-suspect: Flagged as a likely Kα2 companion (position and intensity ratio — see below). Never applies to Custom or Kα1-only radiation, or to Kα2-stripped data — see the note below on stripping residuals.
- Weak: The peak height is below 5% of a local maximum, measured over a ±15° 2θ window centered on the peak. The window is local because diffracted intensity falls off steeply with angle (Lorentz–polarisation, Debye–Waller, absorption). Measured against a single global maximum, the same 5% threshold would act as an angle cutoff in disguise: above roughly 90° 2θ nearly every genuine reflection would fall below it, and the whole back-reflection region would silently lose its power to falsify an absence rule. Comparing each peak against peaks at comparable 2θ preserves the crystallographic intent — a truly forbidden reflection should have no intensity — without the angular bias.
- Ambiguous: The assigned $(hkl)$ violates a rule, but an allowed theoretical reflection explains the observed peak about as well. The alternative must be competitive, not merely present: it qualifies only if it lies within your stated
2θ Errorof the observed position, or fits no more than 2× worse than the assigned reflection does. Merely falling somewhere inside the overlap window is not enough — on a crowded pattern almost every reflection has some allowed neighbour, and accepting those would excuse every violation in turn. See the note on wavelength below.
A note on Kα2-stripped data. Stripping is never perfect. Rachinger-type algorithms subtract a scaled, shifted copy of the pattern, and the error accumulates towards high angle where the doublet separation grows, leaving ripples or “ringing” beside strong peaks. It is reasonable to ask whether disabling the Kα2-suspect test on stripped data lets those artefacts through as hard evidence.
Enabling the test would not catch them, and would cause harm. The Kα2-suspect test looks for a peak at a specific predicted offset from a lower-angle parent, with an intensity ratio near 0.497. A stripping residual has neither property: the companion it would have matched has already been removed, and residuals sit immediately beside the parent on either side, not at the Kα2 offset. Running the test on stripped data would therefore flag mostly genuine reflections that happen to fall near the original Kα2 position of a strong neighbour — silently removing real evidence.
What actually covers stripping residuals is the Weak demotion. Ringing is typically a few percent of its parent peak, so it falls below the 5%-of-local-maximum floor and is demoted to soft automatically — and because that floor is local rather than global, it keeps working at high angle where residuals are worst. The Ambiguous demotion catches a further share, since residuals sit close to a real reflection by construction. The gap worth knowing about is a residual beside a very intense peak that clears the 5% floor: that one will count as a hard violation. If a space group is being rejected by one or two violations sitting right next to your strongest reflections, over-stripping is a realistic explanation — mark those peaks as excluded, or re-strip with a lower ratio, before trusting the rejection.
Consensus override. Each demotion above asserts that one reflection is poor evidence; none of them licenses ignoring a systematic trend. Noise, peak tails and Kα2 ghosts are not correlated with reflection parity, so if many independent reflections all break the same rule, the rule is genuinely broken and the demotions are concealing a real result. Brutus therefore promotes an entire soft pile back to hard when it passes both an absolute and a proportional floor: at least 5 violations and at least 15% of the reflections examined. A couple of weak stragglers will not disqualify a genuine centering; a systematic breach will.
This matters most for pseudo-symmetric cells. A hexagonal lattice indexed in a monoclinic setting, for example, produces a false body-centering signal: roughly half the reflections appear absent, and without the override every surviving counter-example is demoted as weak or overlapped, so the cell is reported as I-centered with zero hard violations. That false centering then propagates into the Niggli reduction (see Advanced Topics).
Impurity lines and the centering
A hard violation is a strong, unambiguous line on a position the centering forbids: exactly what an impurity line looks like. A centering is therefore kept when its hard violations fit the
Impurity Peaksallowance (at most two, and never more than a tenth of the indexed lines, so a short list cannot let a primitive lattice pass as centred: a primitive lattice breaks I on half of its lines and F on three quarters). The Lattice Centering line then says so, for example “Body-centered (I), 1 line against it (within the impurity allowance)”, and the centred space groups are listed with that line counted as their hard violation. The lattice-wide reflection condition of the centering (hkl: $h+k+l=2n$ and the like) carries the same allowance; zonal conditions (glides and screws) do not, since their zones hold too few lines for one contradiction to be read as an impurity. WithImpurity Peaksat 0 a single hard violation removes the centering, as before. Violations that are merely unclear — a Kα2 suspect, a weak peak, a line with an allowed neighbour within the tolerance — were never hard: they are demoted to soft before any of this.Why Primitive (P) is not listed as an alternative
A primitive lattice imposes no centering condition: its test function forbids nothing, so P can never accumulate a single violation. It is therefore always among the zero-violation candidates, for every pattern, by construction. Reporting “A-centered (A) or Primitive (P)” would state something structurally guaranteed rather than something measured. The Lattice Centering line therefore names only the genuine centering found — P appears there only when no centering survives.
P is still retained internally and passed to the space-group candidate list as an allowed centering; removing it there would delete every primitive space group (P212121, Pbcn, Pca21 …) from the candidate list. The question “is this lattice actually primitive?” is answered by the Possible Extinctions list and by the Space Group MC, not by the centering line.
F and I qualify like A/B/C. The candidate pool always keeps P beside F, I, A/B/C and R: all of them qualify on the same bar — zero hard violations, which P also has by construction — so none is treated as more certain than P. That matters because the pool is the candidate filter for the extinction test and for the compatibility list: a wrong I verdict must not delete the primitive settings, since a group that was never a candidate looks exactly like a group that was ruled out. This is the pseudo-symmetry trap described just above: no measured reflection happens to fall in the forbidden parity class, I comes back clean, and the true primitive cell would disappear from the report. The Lattice Centering line is built after P is stripped.How to read this. A genuine centering produces a condition on general $hkl$ — hkl: $k+l=2n$ for A, $h+k+l=2n$ for I, and so on — and that condition appears in the extinction list. If the extinction list contains only zonal conditions ($h0l$, $0kl$, $hk0$: glide planes) and axial conditions ($h00$, $0k0$, $00l$: screw axes) with no general-$hkl$ rule, the lattice is primitive and the centering shown survived only because no measured reflection happened to fall in its forbidden parity class. Treat such an assignment as unconfirmed and check the primitive classes in the Space Group MC, which applies no centering pre-filter at all.
Beyond this, P remains meaningful in one other place: cell reduction, where it simply means “no centering transform applied” before the Křivý–Gruber algorithm runs (see Advanced Topics).
Redundant rules are collapsed (4n beats 2n)
A rule is confirmed when nothing observed contradicts it. That test is one-sided, so a zone whose only observed reflection is 004 confirms 00l: $l=2n$ and 00l: $l=4n$ — the second implies the first, so both survive. Reporting both is redundant and actively understates the result: $l=4n$ is the stronger claim, because it additionally forbids 002 and 006, and it is the only one carrying information. Brutus therefore drops, within each zone, any confirmed rule that is implied by another confirmed rule in the same zone, and reports only 00l: $l=4n$.
Implication is tested by enumeration over the zone rather than algebraically, so compound shorthand (“h, l=2n”) and any modulus are handled without special cases. The collapse is evidence-driven, not cosmetic: if 002 or 006 were actually observed, $l=4n$ would be contradicted and never confirmed in the first place, so the reported rule correctly falls back to $l=2n$.
Redundancy also arises without any single rule implying another. Zektzerite confirms hk0: $h=2n$, hk0: $k=2n$ and hk0: $h+k=2n$ — the third follows from the first two (even + even is even) but from neither alone, so a pairwise test cannot see it. A rule is therefore dropped when every reflection allowed by the conjunction of all the others already satisfies it, applied iteratively so a mutually-redundant set collapses to a minimal equivalent subset instead of vanishing. Rules from other zones count too, so a general hkl condition can subsume a zonal restatement of itself. Zektzerite's eight reported conditions reduce to four independent ones, with the discrimination unchanged: Abma and Ac2a still explain 4/4, Abmm 3/4, Pccn 2/4.
The extinction test and the violation count use the same demotions
A rule is confirmed when every reliable reflection in its zone satisfies it. Reliability excludes Kα2-suspect peaks and peaks below the local intensity floor — and now also applies the same ambiguity demotion the violation count uses: a reflection that formally breaks the rule is forgiven when another calculated hkl within the same peak's tolerance window is not forbidden by it, because the peak could equally well be that reflection.
Without this the two analyses contradict each other. In zektzerite the four soft violations all have $k+l$ odd, so they blocked confirmation of hkl: $k+l=2n$ even though the centering test had already forgiven the same four peaks and reported
A:0(+4 soft). The A-centering condition was consequently missing from the detected list, and P-lattice candidates such as Pccn were never penalised for failing to explain it.The same consensus guard as the violation count applies: forgiving one overlap is reasonable, forgiving a systematic trend is not. If five or more reflections — and at least 15% of those examined in the zone — all break the same rule, the rule is treated as genuinely broken however excusable each individual case looks.
Acentric settings are flagged
Systematic absences are blind to an inversion centre. Abma (#64) and Ac2a (#41) have byte-identical reflection conditions, so no powder extinction analysis can separate them — only $|E|$ statistics or the solved structure can. Settings lacking a centre of symmetry are therefore marked [acentric] in the list, so settings that the absences cannot separate are read as the genuine ambiguity they are.
The same logic applies to the confirmation score. A confirming reflection is weighted by how much of its zone the condition forbids, normalised so an ordinary $2n$ rule keeps weight 1.0 and $l=4n$ scores 1.5. A stricter condition is harder evidence: a reflection such as 004 is consistent with $l=2n$ and with $l=4n$ alike, but surviving the $l=4n$ test excludes far more of the zone. Weighting the two equally would leave P41, P43, P4122 and P4322 tied with P42 and P4222 on identical evidence. Because the weight is normalised rather than raw, an ordinary $2n$-based score is untouched: the scheme promotes genuinely stronger rules instead of shifting the whole score against the rule-free baseline.
This score does not order anything. The confirmation figure of merit described here feeds the explains n/N absences tag printed beside each setting, but it does not sort the report's space-group list — see A compatibility list, not a ranking below. Ranking space-group hypotheses happens in one place only, the Space Group MC.Absences are computed from the symmetry operators
A reflection condition such as 0kl: $k+l=2n$ is a description of a systematic absence, written for a printed table. The absence itself follows from the symmetry operators. For every operator $(R, \mathbf{t})$ of a space group,
$F(\mathbf{h}) = \exp(2\pi i\, \mathbf{h}\cdot\mathbf{t})\; F(\mathbf{h}R)$
so whenever an operator leaves the reflection unmoved — $\mathbf{h}R = \mathbf{h}$ — the relation reads $F = e^{2\pi i \mathbf{h}\cdot\mathbf{t}} F$, and $F$ must vanish unless $\mathbf{h}\cdot\mathbf{t}$ is a whole number. That single test is what Brutus applies:
$\mathbf{h}$ is systematically absent if some operator has $\mathbf{h}R = \mathbf{h}$ with $\mathbf{h}\cdot\mathbf{t} \notin \mathbb{Z}$.Translations are stored as exact rationals, so the test is integer arithmetic throughout — there is no tolerance, and no rounding to get wrong. Three consequences are worth spelling out, because each is a class of error that a condition-string test is exposed to and this one is not.
Nothing has to be inherited. Zone labels are nested rather than exclusive: 330 is an hk0 reflection and simultaneously an hhl one, 004 is 00l and also hhl, 300 is h00 and also hk0 and h0l. Printed tables exploit this to stay short — Pna21 is listed with only
{0kl: k+l=2n, h0l: h=2n}, because its 00l: $l=2n$ follows by restricting $k+l=2n$ to $k=0$. A test that reads the printed conditions must therefore reconstruct the implied ones or miss them entirely. The operators imply nothing: they answer for the reflection in front of them, whether or not any table prints a condition covering it.Centering is not a special case. The centring vectors are operators — identity rotation, non-zero translation — so lattice absences fall out of the same test as glide and screw absences, with no separate per-letter rule. Rhombohedral obverse and reverse settings, which differ only in which translations they carry, are simply different operator lists.
Zone spelling stops mattering. Where a zone is still referred to by name — in the report, and when naming which printed condition a violation breaks — membership is decided by the zone’s normal vectors, stored alongside it: $\mathbf{h}$ lies in the zone when $\mathbf{n}\cdot\mathbf{h}=0$ for each normal. This distinguishes families that a label-matching test conflates. hhl ($h=k$) and h̄hl ($h=-k$) are different zones carrying different conditions in trigonal and hexagonal groups: in P63/mmc reflection 111 is absent while 1̄11 is present, and in R-3̄c 223 is present while 2̄23 is absent. The arithmetic test also makes membership inclusive for free, which is what the nesting above requires: h00 satisfies the hk0 normal $l=0$, so it is an hk0 reflection without anything having to say so.
The database carries 25 distinct zone labels across the 530 settings. Twelve of them — (-2k)kl, 0k-k, 0kk, h(-2h)l, h-h-h, h-h0, h-hh, h0-h, h0h, hh-h, hk-h and hk-k — are spellings that a table of condition labels would have no entry for; the operator treatment needs none. They are largely the trigonal and hexagonal families.
What this changes in practice. Every setting is now held to every absence it actually implies, which is strictly more than any printed subset states. Groups that would otherwise show zero hard violations therefore accumulate them and move down the compatibility list, or drop out of it. Those violations were always present in the data; they were simply not being checked against. Violations are still named by a printed condition where one applies, since that is what makes the report readable — and where an absence follows from a condition the tables leave implied, the report says so rather than inventing a rule to blame.
A powder line, not a reflection
The operator test above answers for one $(hkl)$. A powder peak is not one $(hkl)$: it is a line, and every reflection that falls on it contributes. The line is forbidden only if every reflection on it is. Brutus therefore asks about the whole line, in both routes:
- Its metric orbit. All indices that the cell metric places at the same $2\theta$ (the holohedry: $m\bar{3}m$, $4/mmm$, $6/mmm$, $mmm$, $2/m$) are tested, not just the one the generator happened to keep. This matters whenever the space group’s Laue class is lower than the lattice’s: in Pā3, 320 is forbidden (hk0: $h=2n$) but 230, on the same line, is not; in an R group in hexagonal axes, $(h,k,l)$ and $(k,h,l)$ share a line but fall under different obverse conditions.
- Exact coincidences. Different orbits that happen to have the same $2\theta$ — cubic 221 and 300 ($N=9$), 410 and 322 ($N=17$) — are merged into one line by the generator, which now remembers the merged reflections, so a line carrying an allowed 221 is not blamed for its forbidden 300.
Testing only the kept representative was wrong in both cases, and wrong systematically: every R group, Pā3, Iā3, and the c/n/d-glide cubic groups (P̄43n, Pm̄3n, Pn̄3n, F̄43c, Fm̄3c, Fd̄3c, Ī43d, Iā3d) collected hard violations on patterns that obey them exactly. The same line test decides the Ambiguous demotion, so an allowed alternative counts as allowed when any reflection on its line is.
Settings in other axes are not candidates. The indexer produces b-unique monoclinic cells and indexes every R lattice in hexagonal axes, so a-/c-unique monoclinic settings and the rhombohedral-axes settings of the seven R groups (Hall symbol with
3*) are skipped: their conditions refer to different indices. The rhombohedral-axes copies are not offered as hexagonal candidates: they forbid almost nothing in hexagonal indices, so every R group would appear only through that duplicate, never through its true setting.Rewarding settings that explain the observed absences
Violation counting is one-sided: it only ever looks at reflections that are present, so it can punish a setting for predicting an absence that did not happen, but it can never reward one for predicting an absence that did. The consequence is structural — if one setting's condition set is a strict subset of another's, it can never accumulate more violations, so the least-constrained candidate wins by default.
Zektzerite is the worked example. The true structure is Cmca (#64); in a cyclically permuted axis setting that is Abma, whose conditions are
{hkl: k+l=2n, 0kl: k=2n & l=2n, hk0: h=2n}— exactly Abmm (#67) plushk0: h=2n. The observed absences include h00: $h=2n$, which Abmm cannot explain: A-centering gives $k+l=0$ for every h00 reflection, which is even for all h, so Abmm predicts odd-h h00 reflections that were never seen. Only thehk0: h=2nof Abma accounts for them.Each rule from the extinction analysis is therefore treated as evidence in its own right. A setting is tested for whether it entails each detected condition — is every reflection the setting allows in that zone already required to satisfy it? — and is rewarded or penalised accordingly, weighted by the condition's selectivity and by how many observed reflections back it. The result is reported per setting as explains n/N absences, with any it fails to account for listed explicitly.
For zektzerite, Abma and Acam explain 4/4 detected conditions while Abmm, Acmm, Abm2, Ac2m and Ammm explain 3/4 — exactly the distinction a count of confirmations cannot make on its own, since every one of those settings is confirmed by the same well-populated zones.
Hard violations come first, and they are the only thing that groups the list. A genuinely observed reflection in a forbidden class is strong evidence against a setting. If an expected setting is missing from the list entirely, it has exceeded
MAX_VIOLATIONS(2) and the reflections responsible are worth inspecting individually — they are frequently overlaps that the ambiguity demotion failed to rescue under the stricter rule set.A compatibility list, not a ranking
Everything above establishes which settings the observed absences contradict, and by how many reflections. That much is sound, and it is what the PDF report prints. Brutus does not put those settings in preference order.
The reason is structural, and it is worth being blunt about. A confirmation score counts reflections that are present, so it can never separate a rule set from a strictly less-constrained one that contains it: the extra condition earns only whatever few extra confirmations happen to fall in its zone, and that difference is swamped by the shared, well-populated zones. The explains n/N absences term was added to patch exactly that asymmetry, but it is an unnormalised weight with no scale — differences in it are not comparable between patterns and cannot be turned into odds. Two further problems sit underneath it:
- The whole list is judged against one cell that was refined knowing nothing about extinctions. That cell was pulled toward the very forbidden reflections it is now being asked to rule on, and peaks near them were paired with the wrong lines — which is precisely how the correct setting acquires its violations.
- The candidate pool is pre-filtered by the centering test. A wrong centering verdict does not demote the correct setting, it removes it from the list altogether.
The list is therefore grouped by hard violations and, within each group, ordered by space-group number. No preference is expressed beyond “this many observed reflections contradict it”. The cap on its length is applied after that neutral sort rather than before: truncating a score-ordered list drops settings for scoring reasons while presenting itself as a list of what is merely compatible, and “never a candidate” reads far too easily as “ruled out”. The cap never cuts a setting with zero hard violations: all of those are kept (up to 150), and settings with violations fill the list up to 40. A fixed cap of 40 on a list ordered by number would drop the low-numbered compatible settings — F222, Fmm2, Ccc2, Aba2, Iba2, I4, I41… — on patterns that obey them exactly. The report states how many settings it shows out of how many were found.
To choose between compatible settings, use the Space Group MC. It refits the cell once per hypothesis, merges the settings your data cannot separate, applies no centering pre-filter, and scores a likelihood ratio you can read as odds.
Nothing is re-indexed automatically
Indexing is extinction-blind: each observed peak is assigned to the nearest calculated line, whatever that line's parity, because the absence rules do not exist yet at that stage. When two lines straddle a peak, the nearest one can easily be systematically absent. PbSO4 (anglesite, Pnma) is the classic case — the peak at 16.423° takes (0,1,0), 0.019° off, over (1,0,1) at 0.024°, though 010 breaks 0kl: $k+l=2n$ and cannot exist in that space group.
Brutus does not correct this by itself during absence analysis, and that is a deliberate choice. Re-assigning such peaks automatically once the rules are known, then re-fitting the cell to match, would alter a solution the user never asked to change; with several peaks involved the resulting corrections are hard to interpret; and it would still miss the cases that matter most — an assignment that is wrong while remaining allowed, which happens whenever the candidate space group is permissive enough that neither choice violates anything. An automatic fix would give the appearance of thoroughness while leaving the hardest errors untouched.
The report therefore shows exactly what the indexer decided, with no silent edits.
This is not in tension with the automatic combinatorial swap search, which does relabel peaks without being asked. The distinction is what happens to your solution: the automatic search never edits an existing entry, it refits the alternative labelling into a separate cell and offers it alongside as a new candidate to be judged on its own figures. What Brutus declines to do is silently rewrite the assignments of a solution already in your table, or re-derive them from absence rules the assignments themselves were used to establish.
One consequence is worth knowing when reading figures of merit. The de Wolff figure is $M_{20} = Q_{20} / (2\,\langle|\Delta Q|\rangle\,N_{20})$, and $N_{20}$ counts possible calculated lines. Being extinction-blind inflates that count — for anglesite, 13 distinct lines to $d=3.0$ Å against 9 once Pnma is imposed — so $M_{20}$ is systematically conservative for a centred or glide-rich lattice. A correct assignment is never penalised into being discarded by the figure of merit; it is simply never considered, because assignment happens before the space group is known.
Why the Ambiguous test is proximity-weighted
Peak separation follows $\Delta(2\theta) = 2\tan\theta \cdot (\Delta d / d)$. A fixed 2θ window therefore corresponds to a lattice resolution of $\Delta d/d = \Delta(2\theta) / (2\tan\theta)$, which grows without bound as θ falls. Short-wavelength anodes push the whole pattern to low 2θ, so the same window swallows far more reflections — around 20 neighbours per reflection for Ag against 6 for Cu. Under a mere presence test, essentially every violation on Mo or Ag data would be demoted and the extinction analysis would stop working.
Note that the remedy is not a wavelength-dependent tolerance. Instrumental 2θ uncertainty is set by alignment, sample displacement and detector resolution, and is very nearly independent of the anode: a 0.04° tolerance means 0.04° whichever tube is fitted, so widening or narrowing the window per wavelength would misrepresent the instrument. The competitiveness requirement addresses the problem from the other end, and adapts on its own: on a crowded short-wavelength pattern the extra neighbours are mostly far from the observed position and so do not excuse the violation, while a genuine near-coincidence still does.
The zone assignment for each $(hkl)$ (e.g.h00,0k0,hk0,hkletc.) is used to apply the correct subset of conditions for that zone. -
List the compatible space groups. Based on the crystal system and detected centering, the internal space-group database is filtered, and every remaining setting (in the axes the indexer uses) is tested against the indexed reflections, one powder line at a time (see A powder line, not a reflection). A setting is kept when its hard violations do not exceed
MAX_VIOLATIONS(2). Each surviving setting carries its hard and soft violation counts, the offending reflections, and how many of the detected absences it accounts for (explains n/N).The output is a compatibility list, not a ranking: settings are grouped by hard violation count and ordered by space-group number within each group, and the length cap (every zero-violation setting, up to 150; otherwise 40; the total is stated) is applied after that neutral sort. A Weighted Extinction Confidence score is still computed per setting and still drives the explains n/N figure, but it no longer decides the order — see A compatibility list, not a ranking. Names are given as the conventional space-group symbol consistent with the orientation the program found. Ranking hypotheses against each other is the job of the Space Group MC.
Interpreting the Output
- 0 hard violations: Ideal case. No unambiguous reflection breaks the extinction rules, so the data are consistent with the setting. Note what this does not say: several settings normally reach 0 together, and being compatible with all of them is not a determination.
- 1–2 hard violations: Still plausible; minor violations can result from weak forbidden lines visible above background, or small systematic errors in peak positions.
- Read violation counts relatively, not absolutely. Every indexed reflection reaches the extinction analysis, so the counts are large in absolute terms for every centering and every space group — and larger than in tables that score only a filtered subset of peaks. A count means something only alongside the other candidates in the same run. Compare candidates against each other, and remember that they are all being judged against a cell refined without knowing about any of them.
-
Ambiguous peaks (in italics in the PDF report):
Peaks that overlap another theoretical reflection within the tolerance window are printed in
italics, with a
*added to the respective line. They are still included in the extinction analysis — the italics simply mark that any rule violation they raise is demoted to soft unless the consensus override applies. - Soft-violation warnings: Space groups that are only challenged by Kα2-suspect reflections are flagged. They may still be the correct space group; strip Kα2 and re-run to resolve the ambiguity. The Space Group MC sidesteps this trap by excluding Kα2-suspect peaks from its evidence altogether — a ghost sitting a few hundredths of a degree off its parent is exactly the kind of peak that lands on a forbidden line and manufactures a violation against the correct rule set.
- A centering with 0 hard violations but a large soft pile: Read this with suspicion, and check whether the consensus thresholds were only just missed. It is the signature of a pseudo-symmetric cell, where a false centering survives purely on the strength of demotions. Inspect the listed soft violations: if many of them break the same rule, the centering is probably wrong.
Space Group MC — refining under each hypothesis
The analysis above scores every candidate against a single cell, and that cell was refined without knowing about any of them: its calculated line list contains every reflection the lattice allows, forbidden ones included. On real data the two weaknesses compound. The least-squares fit is pulled toward reflections that should not be there; peaks near them are then paired with the wrong line; and those mispairings are precisely the violations that condemn the correct group. The scoring is asymmetric as well — a candidate can be punished for predicting an absence that did not happen, but never rewarded for predicting one that did — so a rule set that is a strict subset of another can never lose on violations alone, and the least constrained candidate tends to win by default.
Space Group MC (Solution → Test Space Group) asks the opposite question: if this space group were true, how well would the pattern index? For each candidate the forbidden reflections are deleted from the calculated line list, the cell is re-refined against what remains, and the evidence is recounted. Every number in the resulting row (the peak-to-line pairing, the cell, the zero error, $M(20)$, the line count) then belongs to one and the same hypothesis, so the rows compare hypotheses against each other rather than bookkeeping tallies against a cell fitted to forbidden lines.
What a row is: extinction classes
Candidates are grouped before anything is refined. Powder absences reveal only which reflections are missing, so two space groups that forbid exactly the same reflections are indistinguishable in principle — no amount of computation separates them. Brutus therefore collects the settings of the crystal system into extinction classes and refines once per class, listing every group that shares the row.
The grouping happens at two levels, and the difference between them matters:
- Arithmetic. Two settings are first compared by what their operators forbid over a box of hkl, never by comparing the conditions printed for them. Settings whose tables are worded differently but which forbid the same reflections therefore collapse into one row, and settings whose tables happen to look alike but which forbid different reflections do not.
- Observable. The surviving classes are then compared by the pattern they actually produce for this cell, at this wavelength, over this 2θ range, at this tolerance. Rule sets that differ only at reflections beyond your measured range, or only at lines that coincide with an allowed line inside the matching window, cannot be told apart by your data and are merged into one row. Its label then names every class it absorbed, joined by “≡”.
The second step exists because presenting such rule sets separately — each with its own $M(20)$, as though the numbers meant something — invents a discrimination the experiment cannot support. That is the single most common way a space-group table misleads. Merging on observable behaviour rather than arithmetic is what makes the row count honest: a short scan on a small cell may collapse a dozen candidates into two or three rows, and that collapse is the result.
Calculated lines too close together to be told apart are merged the same way, into what the code calls resolution groups. Two reflections that no observed peak could separate count as one position, so a rule set gets no credit for forbidding a line buried under an allowed neighbour. A group is capped at one matching tolerance wide: it is not enough for each line to sit within tolerance of the one before it, because in a crowded high-angle region a chain of such lines would otherwise merge into a single group many tolerances across, whose two ends are perfectly resolvable from each other. That kind of over-merging costs evidence twice, once by counting several distinct forbidden positions as one and again by letting a peak anywhere in the chain excuse an absence at the far end.
Row labels are extinction symbols
Each row is named by its extinction symbol (Pbca,
Pn-a, P2₁/c, Fd-, I4₁/a--),
derived by probing what the class forbids along each symmetry direction of the crystal system
rather than being read from a table. A dash means no condition in that position; a
“?” means the probe found absences it could not name, which is reported rather
than guessed at.
Labelling a row with the lowest-numbered group it contains — the obvious alternative
— reads like a determination. A user who sees P2₁2₁2₁ at
the head of the table takes it for the answer, when what the absences establish is only the
extinction symbol and the row may hold half a dozen groups. The Space groups column
beside it always carries the full membership.
How the ranking is made
This is the part worth reading carefully, because the criterion is not the one most powder software uses, and the reason it is not is worth stating plainly.
Why $M(20)$ cannot do this job
The de Wolff figure of merit is $M(20) = Q_{20} / (2\langle|\Delta Q|\rangle N_{20})$, where $N_{20}$ counts the possible lines below the twentieth observed one. Deleting any line from the calculated list lowers $N_{20}$ and therefore raises $M(20)$. A more restrictive rule set is rewarded automatically, whether or not the lines it deleted had anything to do with the data.
The usual defence is that an over-restrictive rule set pays for its extra restrictions in violations — it deletes lines that were observed, and gets caught. That defence only holds if every allowed line is actually observed. Real patterns are full of reflections that are simply too weak to see, lost in an overlap, or below the noise. A rule set that happens to delete a handful of unobserved lines gains $M(20)$ for free and incurs no violation at all. Rank on $M(20)$ and you systematically favour the most restrictive class the data failed to contradict, which is not the same thing as the class the data support.
$M(20)$ remains in the table because it is a good figure of merit for a cell, most readers have a feel for its scale, and it can be sorted on like any other column. It is simply not a criterion for choosing between line lists, and so it is not what the table is ordered by. The Score column is, and the table leads with it.
Sorting by $M(20)$ is still occasionally useful — it answers “which of these cells refined best?” — but read it knowing that it puts the most restrictive surviving class on top, because deleting lines is what raises it. That is a different question from “which hypothesis do the absences support?”, and only the second one has an answer the data can defend.
What a nat is
The Score column is a log-odds, measured in nats. A nat is the natural-logarithm unit of evidence: if one hypothesis is $R$ times more probable than another given the data, that is $\ln R$ nats of evidence in its favour. It is the same quantity as a “bit” of evidence, only using base $e$ instead of base 2 (1 nat = 1.443 bits).
The useful property is that nats add. Two independent pieces of evidence worth 1.2 and 0.8 nats together give 2.0 nats, which is why every term below can simply be summed. Convert back to odds by exponentiating:
Only differences between rows are meaningful; the absolute value of a score carries no
information on its own. The Score column therefore shows each row's difference from the best
row of its own tier (see falsification below), so
the leader reads 0.00 and everything else in that tier is negative. A row at
$-0.4$ is barely distinguishable from the leader; a row at $-15$ is out of the running.
The model
Let $p$ be the probability that a symmetry-allowed line inside the measured range actually produces a detectable peak — at its simplest, the fraction of allowed line positions at which a peak was in fact observed. A clean, strongly diffracting sample measured over a wide range gives $p$ near 1; a sparse or noisy pattern gives $p$ near 0.3. The value is shown in the status line.
$p$ is estimated once and shared by every row, so that no class can inflate the value of its own evidence by discarding lines. Estimating it needs a reference class, and the choice is not innocent: measured on the most permissive class it comes out too low whenever the true lattice is centred, because every systematically absent position then sits in the denominator and can never be observed. Brutus therefore makes two passes — a first estimate from the most permissive class, and a second from whichever class that pass favoured, with every row rescored against the final value. One iteration is enough in practice, and the estimate is clamped at both ends either way.
When peak heights are available $p$ stops being a single number and becomes a per-position quantity, described under intensity weighting below. The formulae that follow are unchanged; only the value of $p$ at each position differs, and the same two-pass calibration then applies to the intensity scale as well.
For a candidate rule set $H$ the score adds up four contributions:
-
Absences that held. Every forbidden position that is
informative — meaning no allowed line shares it, so its emptiness is
attributable — and that is in fact empty contributes
$\ln[(1-\varepsilon_0)/(1-p_j)]$. Read it as: under $H$ that position should be empty
(bar a small spurious-peak rate $\varepsilon_0$); under “no extinction” it
would have been empty only with probability $1-p_j$. This is the term that makes the
criterion self-limiting. When $p$ is small — most allowed lines unobserved anyway
— each clean absence is worth almost nothing, which is correct: in a sparse pattern
a missing line proves very little. When $p$ approaches 1, each clean absence is worth a
couple of nats. Adding a restriction that deletes an unobserved line therefore buys
$\ln[1/(1-p)]$ and no more, instead of a free $M(20)$ increase.
Where no per-position weight is available the contribution is $\bar{p}\,\ln[(1-\varepsilon_0)/(1-p)]$ — the same term scaled by the mean detectability $\bar{p}$. The reason is that conditioning on “this position is empty” preferentially selects the positions where nothing would have shown up anyway, whose true worth is near zero; paying every empty position the population average over-credits the restrictive class systematically. The factor is the same for every row, so it rescales the term without disturbing the order it induces. -
Absences that failed. Every violation — an observed peak that only
a forbidden line can explain — contributes $\ln(\varepsilon_i/p_i)$, a penalty. The
rate $\varepsilon_i$ is set per peak by how believable that particular peak is as real
evidence, which is where intensity enters:
Between the weak threshold and full strength the rate is interpolated, so a 6%-of-local peak is not treated as identical to a 100% one. Intensity is measured against a local baseline — the strongest peak within 15° — because diffracted intensity falls off with angle, and a fixed fraction of the global maximum would quietly strip the whole back-reflection region of any power to falsify a rule.Peak $\varepsilon_i$ Rationale Strong, clean, unambiguous $\approx N_{stray}/N_{pos}$ Near-fatal. Derived from the pattern, not fixed — see below. Weak (<5% of the local maximum) 0.25 More likely a tail, a wing, an overlap or noise than a genuine reflection. Kα2 ghost 0.50 An artefact of the source, not the structure. Ambiguous (an allowed line within 1.5× tolerance) 0.50 The assignment is a judgement call, not a fact.
The three soft rates are genuine probabilities for that peak: each names an identified alternative explanation (a Kα1 parent at the right offset, an allowed line inside the window), so they do not depend on how large the pattern is. The rate for a strong, clean, unexplained peak is different in kind — it is a rate per forbidden position — and is therefore derived as roughly one stray peak across the whole pattern, $N_{stray}/N_{pos}$. A fixed 0.02 would assert, on a pattern with 700 resolvable positions, that fourteen spurious peaks are expected; the derived value there is 0.0014, making each hard violation cost 5.3 nats instead of 2.6. On a small pattern of about 50 positions it returns 0.02. $N_{pos}$ is counted once on the parent lattice and shared, so $\varepsilon_0$ is a property of the pattern and identical for every row.
The $\min(0,\cdot)$ is not decoration. The ratio $\varepsilon_i/p_i$ exceeds one whenever the detectability model says a reflection at that position would have been invisible, and the peak that contradicts the hypothesis then scores in its favour — up to +6 nats apiece, in a measured case where a deliberately mis-set cell collected seventeen of them and beat the cell that indexed the pattern exactly. When $p_i < \varepsilon_i$ the honest reading is not “this peak supports $H$” but “the intensity model is wrong about this position”: a peak is sitting where the model says nothing could be seen, so it is the model the observation bears on, not the hypothesis. Clamping at zero says exactly that. A violation is at best uninformative, and never support. - Peaks nothing explains. Each unindexed peak contributes $\ln \varepsilon_u$ with $\varepsilon_u = 0.15$. They are part of the ranking: each class refines its own cell, so the classes do not carry them equally.
- Parameter charge. $k$ is the number of refined parameters (cell parameters, plus the zero error if you are refining it), $n_{\text{obs}}$ the number of observed peaks, and $n_{\text{con}}$ the number of lines actually constraining the fit. The BIC part, $-\tfrac{1}{2}k\ln n_{\text{obs}}$, is the same for every row and cancels out of every comparison, which is as it should be — charging it on the indexed count instead would hand a discount to exactly the restrictive classes that match fewest peaks. What does not cancel is the small-sample correction $k(k+1)/(n_{\text{con}}-k-1)$, which blows up as the number of constraining lines approaches the number of free parameters. That is the “absorb the error into my own zero-point” case: a class with very few allowed lines can fit almost anything, and this is what it pays for the privilege.
The impurity peaks setting is spent here too, on the least believable unexplained peaks first — weakest relative intensity before anything else, and violations before unindexed peaks, since a foreign phase that merely adds an unindexable line falsifies nothing and needs no forgiving. The previous behaviour subtracted the allowance from the raw violation count, which let a class buy forgiveness for the strongest peak in the pattern.
$C$ has to sit above the largest separation absences can legitimately produce, or the ceiling eats real evidence instead of runaway evidence. Two clean classes differing by thirteen informative absences at $p = 0.9$ are 26.9 nats apart; at $C = 23$ that reads as 0.95 nats — an overwhelming result reported as a tie. At $C = 46$ it reads 8.0, while the PbSO4 failure below still cannot buy its way out.
Intensity weighting — a limited borrowing from ExtSym
Everything above uses peak positions. Peak heights carry more, and the statistical method of Markvardsen, David, Johnston & Shankland (ExtSym) shows what can be done with intensities. Brutus borrows part of it. It is worth being exact about which part, because the difference matters.
What ExtSym does that Brutus cannot. ExtSym works from integrated intensities extracted by Pawley refinement, together with their full covariance matrix. That is what lets it ask the sharp question: given all the overlaps, what is the intensity at this forbidden position? Brutus has a peak list, not a profile. Where no peak was picked there is no measurement at all — only absence. The sharp question is therefore out of reach here, and any claim to answer it from a peak list would be pretending.
What is reachable, and why it is worth having. The weakest part of the scoring is that single global $p$. It says a strong low-angle reflection of multiplicity 24 and a weak high-angle one of multiplicity 2 were equally likely to be seen, which is plainly false. Wilson statistics turn that one number into a per-reflection probability, using exactly the information a peak list does carry:
- Each observed height is corrected to a quantity proportional to $|F|^2$ by dividing out the Lorentz-polarisation factor and the intensity weight of the line. That weight is $m\varepsilon$, not the multiplicity $m$ alone, and the difference is not a detail — see the note below.
- The corrected intensities are averaged in shells of $s^2 = (\sin\theta/\lambda)^2$. Binning is not a refinement but the definition: the Wilson relation $\langle I \rangle = K \exp(-2Bs^2)$ holds for the shell mean, while individual reflections scatter enormously about it — for an acentric structure $|F|^2$ is exponentially distributed, so its standard deviation equals its mean.
- The shell means are corrected for truncation. A peak list contains only what rose above the detection limit, and that limit bites hardest where intensities are weakest, so the surviving means are biased upward more and more with angle. Since $E[y \mid y > t] = t + \mu$ for an exponential variate, subtracting each reflection's own threshold before averaging recovers the true mean without needing to know how many reflections were lost — which is fortunate, because that is unknowable from a peak list.
- The weakest peak actually picked sets the detection limit. At each position it converts into the $|E|^2$ a reflection there would have needed in order to be seen, and $p$ at that position is the Wilson tail probability of exceeding it.
Weighting by $m$ alone therefore expects a cubic $\{h00\}$ line ($m=6$) to be an eighth the strength of a $\{hkl\}$ line ($m=48$) at the same angle, when their means are equal. The detection threshold at $h00$ comes out eightfold too high, $p$ far too low, and a clean absence there earns almost no credit — on the axial reflections, which are precisely the ones that decide screw axes. Tetragonal is out by up to 4×, orthorhombic and monoclinic by up to 2×. Brutus uses $m\varepsilon$, computed under the holohedry of the crystal system so that it depends only on the cell and never on the candidate being scored — a weight a hypothesis could adjust in its own favour would be the M(20) failure in a new costume.
That calibration follows the same two passes as $p$ itself, and against the same reference class each time. The two are the same physical quantity measured two ways, and pinning them to different hypotheses makes the clean and violation terms disagree about how detectable the pattern is: absences weighted against a no-extinction lattice, compared with a $p$ measured on the winner's own allowed positions. On a synthetic test the level moved by more than a factor of two between the two passes, so this is not a refinement of a detail.
The same scale gives every violating peak an $|E|^2$: its intensity in units of the mean at that angle, corrected for Lp and multiplicity. This is a better variable than raw height for deciding how damning a violation is, because it already accounts for angle and multiplicity, and it appears in the Viol tooltip. A value near or above 1 is unmistakably a real reflection; well below 0.1 is the sort of thing a tail or a little noise produces.
Honest limitations. Peak heights are not integrated intensities: the ratio between them is the peak width, which varies with angle. That matters less than it first appears, because a smooth monotonic error is absorbed almost entirely into the fitted $B$ — which is consequently not a physically meaningful temperature factor and is not reported as one. Overlapped reflections remain a genuine error, since their shared height cannot be divided between them without a profile. And the whole mechanism is switched off, with a note in the status line, whenever the pattern has no heights, too few peaks or too few usable shells — in which case the scoring falls back to the single global $p$ and behaves exactly as described above.
What it buys, measured. On synthetic patterns built with Wilson-distributed intensities, a real Debye–Waller falloff and a detection cut-off, the weighting sharpened a correct Pbca identification from a 3.5-nat margin to 12.1. More importantly, in the degraded regimes where neither method can identify the class, the weighting recognises that the surviving absences are the ones that prove least and reports a tie — where the unweighted score confidently announced the wrong class at 5.9 nats. Refusing to answer is the more valuable half of the improvement.
Falsification comes before the score
A systematic absence is not a statistical tendency. If a space group has an a-glide then $|F|$ is exactly zero for $h0l$ with $h$ odd, and a single genuine reflection there rules the group out however many other absences hold. The likelihood score cannot express that on its own, because it multiplies evidence across reflections: a class that forbids a great deal of reciprocal space accrues absence credit in proportion to how much it forbids, and with enough of it any number of violations can be outweighed.
Rows are therefore ranked in two tiers. A row carrying hard violations that the impurity allowance does not cover is falsified and cannot outrank an unfalsified one, whatever its score. Within each tier the score decides, so the ordering among survivors is still the full likelihood comparison, and the falsified rows are still ordered least-bad first — knowing which groups the data exclude, and by how much, is half the answer. Only hard violations falsify: Kα2 ghosts, peaks below the local weak threshold, and peaks with an allowed line inside the matching window are graded soft, because none of them is a reliable reflection.
Tiering and the saturation ceiling attack the same failure from opposite ends. Tiering stops a pile of absences from burying a reflection that is demonstrably there; the ceiling stops it from burying everything else — soft violations, unindexed peaks, the parameter charge — which no tier protects. Neither alone is enough.
The margin quoted beneath the table is measured within the surviving tier, and among rows refined to the same depth. Comparing an unfalsified row against a falsified one would report a lead that means nothing, since the two are not competing on the same question; comparing a Monte-Carlo row against a stage-1 row measures partly who got more compute, which is not a fact about the crystal. When the restriction bites, the status line says how many rows the comparison covered. And if every class is contradicted, it says so rather than crowning the least bad one — that verdict usually means the cell is wrong, the range too short, or the pattern genuinely contains foreign lines and the impurity allowance needs raising.
A worked reading
Suppose a scan reports $p = 90\%$ on a pattern of about 300 resolvable positions
($\varepsilon_0 \approx 0.0033$), the leading row shows Clean 34/34 with no
violations, and the runner-up shows Clean 21/21, also with none. Each clean
absence is worth $0.9 \times \ln(0.997/0.10) = 2.07$ nats, so the leader's absences come to
70.4 nats raw against the runner-up's 43.5 — but both are well into the ceiling, which
brings them to 41.9 and 34.0. The lead is therefore about 8 nats: decisive,
roughly 3000:1, and the extra restrictions are all supported. The raw difference of 27 nats
would have claimed $10^{11}\!:\!1$ from thirteen missing lines, which no powder pattern has
ever earned.
Now suppose the same pattern gives $p = 35\%$. Each absence drops to $0.35 \times \ln(0.997/0.65) = 0.15$ nats, nothing comes near the ceiling, and the same thirteen-absence difference is worth 1.9 nats — below the threshold, reported as a tie. A single strong violation ($\ln(0.0033/0.35) = -4.7$) would more than wipe it out. Same absences, very different confidence, and that is the whole point: what an absence proves depends entirely on whether a line would have been visible had it been there.
Using the dialog
The scan runs in two stages. Stage 1 gives every class one constrained least-squares refit against its own restricted line list, and keeps the result. That cell is the hypothesis — the cell fitted to the lines the hypothesis allows — so it is accepted whether or not $M(20)$ happened to rise; judging a hypothesis on a cell fitted to reflections it forbids is the exact bias this tool exists to remove.
Stage 2 spends the annealing budget on the shortlist. It offers three candidates per class — the parent cell, the least-squares cell, and the annealed one — and keeps whichever scores best, judged with the same impurity allowance and zero-point setting as the final ranking, so stage 2 can never leave a class worse off than stage 1 did. Where the score cannot separate two candidates, and it often cannot, $M(20)$ breaks the tie: within a single class the line list is fixed, which makes $M(20)$ a legitimate comparison there and the only one of the two that can see the difference between a good cell and a mediocre one. Three fields control the stage:
| Field | Meaning |
|---|---|
| Iterations | Annealing steps per run, as in Refine MC. Default 600. Below ~200 the walk has not cooled. |
| Restarts | Independent runs per class. Default 4. Every class walks the same pseudo-random sequence, so a difference between two rows is a difference between hypotheses and not between two draws. |
| Refine top | How many classes reach stage 2 on score. Up to four more are added for coverage: the most permissive class (the null hypothesis the score is measured against), the class with the most clean absences, and one representative per centering type. The rest keep their stage-1 result, marked with a small dot beside the score. |
Progress is reported per class and the run can be stopped at any point with the same button (rows already scored are kept). Kα2-suspect peaks are excluded from the scan exactly as they are from indexing — a ghost sitting a few hundredths of a degree off its parent is precisely the sort of peak that lands on a forbidden line and manufactures a violation against the correct rule set.
The results table has one row per distinguishable class, sorted by Score so that it leads with the hypothesis the evidence favours. Click any header to sort by that column instead, and click it again to reverse; errored rows always sink to the bottom. The row leading on Score stays bold wherever the sort places it, so re-sorting never hides which row actually won.
| Column | Meaning |
|---|---|
| Class | The extinction symbol. Rows merged because your data cannot separate them show every symbol they cover, joined by “≡”. |
| Space groups | Every group and setting sharing these absences. Hover for the full list; hover the row for the reflection conditions. |
| Lines | Distinct line positions the restricted list produces within the measured range. Lines the scan never reached are not counted, so this agrees with every other tally in the row. |
| M20 | de Wolff figure of merit of the refined cell under this class. Describes the cell, not the hypothesis — see above. |
| Score | Log-odds against the best row of the same tier, in nats. 0.00 marks the leader; more negative is worse. Within about 2.3 nats of the leader means “not distinguishable”. Falsified rows are measured against the least-bad falsified row, not against the winner, since they are answering a different question. |
| Clean | Informative forbidden positions that are empty, out of the number that are informative at all. 34/34 means every absence this class predicts is borne out; 3/19 means most are not. |
| Viol | Hard violations, with soft ones (Kα2, weak, ambiguous) in brackets. Hover for the offending 2θ, its relative intensity and how far it sits into the tolerance window. |
| Unidx | Observed peaks no line explains at all. |
| Zero | The zero-point error this class refined to. A row whose zero is far from its neighbours’ is fitting the shift rather than the structure. |
Selecting a row and pressing Add as solution inserts its refined cell into the solutions list immediately above its parent, tagged with an SG badge. The badge is green when that row led decisively and amber (SG?) when it did not; its tooltip carries the class, the groups it covers, the reflection conditions, the evidence tally, the estimated $p$ and the margin over the runner-up. That cell was fitted against a restricted line list, so it only means anything alongside the hypothesis it assumes — which is what the badge is for.
The same record travels into the PDF report, which reproduces this verdict rather than deriving one of its own; see What the PDF report says about space groups.
Interpreting the table
- Read the margin, not the order. Some row is always at the top, and by default it is the highest-scoring row the data have not falsified. Whether that lead means anything is decided by the gap to the second row, which the status line states in nats and in odds — a row can sit first and still be in a four-way tie. Re-sorting by any other column changes the view only; it never changes the verdict.
-
Clean is the positive evidence. A count of violations alone can only punish a class for an absence that failed. The Clean column is the other half: absences that held. A class with
0/0is making no testable claim at all within your measured range. - The unconstrained class is the null hypothesis. The class with no conditions is always present and always has zero violations and zero clean absences, so its score is near zero by construction. Any class that cannot beat it has not been supported by your data — usually too few peaks, or a range too short to sample the zones the conditions act on.
- Stage-1 rows are not fully comparable. Rows marked with a dot beside the score have had one least-squares solve and no annealing. They are shown because leaving them out would hide candidates, but a stage-1 row sitting just below the leader may be there for want of compute rather than want of evidence. Raise Refine top if one of them looks interesting.
- M20 = 0.00 is a rejection, not a failure. When the unindexed count exceeds the impurity allowance the figure of merit is zero by construction, the same rule that applies everywhere else in Brutus. Such rows are dimmed rather than hidden: knowing which groups the data exclude is half the answer.
- It is an independent second opinion. The scan deliberately does not pre-filter candidates using the centering test described above, so its verdict is reached without importing that test’s assumptions. Where the two methods agree the case is strong precisely because they fail in different ways; where they disagree, the reflections responsible are worth inspecting individually.
- Cost. A low-symmetry system has many extinction classes and each stage-2 class pays a full annealing budget. Enumeration takes well under a second; stage 1 runs in a second or two; stage 2 costs roughly 0.1–3 s per class depending on the system. Reduce Refine top or Restarts for a faster first look.
Limits worth knowing
Trigonal and rhombohedral groups are only ever tested in their hexagonal setting. Brutus classifies cells by their metric, and a trigonal or rhombohedral lattice described in hexagonal axes has $a = b$, $\gamma = 120^\circ$ — which the program calls hexagonal, correctly. There is no separate trigonal or rhombohedral system to search and none is needed: every rhombohedral lattice is found and reported on the hexagonal triple cell, and that is what you will get. (Such a cell may carry the R flag, which changes only its calculated line list and M(20); Space Group MC removes it and tests every hypothesis against the full hexagonal lattice.) The consequences are worth stating explicitly:
- Space groups 143–167 are included among the candidates for a hexagonal cell, in their hexagonal-axes description. The R-centred groups (146, 148, 155, 160, 161, 166, 167) are tested through the obverse condition $-h+k+l = 3n$.
- The rhombohedral-axes settings are not searched. The database stores each R group twice, once in hexagonal axes and once in rhombohedral axes ($a = b = c$ with equal non-90° angles), and the two carry completely different condition lists because in rhombohedral axes the lattice is primitive and has no centering condition at all. Those settings describe indices this program never produces, so they are excluded. If you want the rhombohedral cell you must convert it yourself; the transformation is standard and the hexagonal cell Brutus reports is the conventional description in any case.
-
Obverse and reverse are not distinguished, and hkl labels reflect that.
A powder pattern cannot tell the two settings apart — they differ by a relabelling
of the indices, not by anything measurable. The line positions Brutus reports for
an R lattice are correct, but the hkl attached to some of them are the generator’s
own $h \ge k$ representative rather than the conventional obverse label: you may see
102where tables print012, or204for024. Cell refinement, $M(20)$ and the whole of the scoring depend only on $d$-spacings and are unaffected; only the printed index differs. Relabel by hand if you are transcribing indices into a report. - A trigonal group whose Laue class is $\bar{3}m$ is treated using $\bar{3}$, because the stored point group does not record whether the two-folds run along $\langle 100 \rangle$ or $\langle 210 \rangle$. This was checked exhaustively against the database and changes no line list for any of the 25 trigonal groups, so it costs nothing in practice.
Monoclinic cells are b-unique throughout. The refinement solves for $\beta$ with $\alpha = \gamma = 90^\circ$, so only the b-unique settings of the monoclinic groups are considered; the a-unique and c-unique descriptions of the same groups carry conditions written for indices Brutus does not produce and are excluded. If your reference data uses one of those settings, transform it before comparing.
Explore Space Group
Solution → Explore Space Group… opens a browser of the 530 settings of the 230 groups of
sg_ops.json. Filter by crystal system, centring, international number, Hermann–Mauguin
symbol, Hall symbol or setting; selecting a setting shows its point group, its Hall symbol and its reflection
conditions. The list opens on the crystal system of the cell; for a hexagonal cell that is the whole hexagonal
family (hexagonal axes: the hexagonal and the trigonal groups, since trigonal lattices are indexed on
hexagonal axes), and for an R cell on its R settings. Add to solution attaches the setting to the open solution and draws its allowed reflections
(the Space group layer, green ticks) next to the observed peaks and the solution’s own blue ticks. Remove from
solution removes the setting currently drawn. A solution can hold several groups; the radio buttons in the open
solution choose which one is drawn.
This is a fixed-cell extinction comparison. It uses the displayed cell axes, the wavelength and the zero correction, without refining the cell or converting its basis, so a monoclinic or rhombohedral setting needs a cell expressed in those axes. Groups with identical extinctions cannot be separated by it. Positions alone cannot establish a space group. The groups attached to a solution are saved in the project, listed in the PDF report and written to the pdCIF.
Convert: subgroups and supergroups
Solution → Convert… carries the open cell to a maximal subgroup of its space group, or to another group that is a subgroup or a supergroup of it, and adds the result as a new solution above its parent. Brutus holds cells, not atoms, so only the cell and the group are converted; nothing else is moved or merged.
- Current space group. The group in which the cell axes are expressed. The dialog starts from the group chosen for the solution, else from the first group of the class that Test Space Group proposed, else from the first setting of the cell’s crystal system; the filter narrows the list. The conversion is only meaningful if the cell axes really are those of this setting.
- Maximal subgroups. The list comes from the operators of the group (
js/convert/sg_subgroups.js, after International Tables A1 and the Bilbao SUBGROUPGRAPH): translationengleiche (t) subgroups keep the lattice and lose point-group operators, klassengleiche (k) subgroups keep the point group and lose lattice translations (index 2, 3 or 4, so their cell is larger). Each row gives the relation and index, the group, the new axes (a′, b′, c′) in terms of the old ones, the new cell and its volume. Conjugate subgroups with the same name, index and cell are listed once, as ×n equivalent. - Naming. The operators alone give a subgroup, not its name. Brutus looks for a setting of
sg_ops.jsonwith the same number of operators and the same number of rotations, and tries changes of basis (the unimodular matrices with entries −1, 0, 1, and those combined with the centring conversions) and origin shifts (eighths and twelfths of a cell edge) until the operators coincide (SGConvert.findTransforms). Three things keep this short. The lattice basis of each subgroup is first replaced by its Niggli-reduced one: the basis the enumeration produces is correct but, for a centred parent, as oblique as a basis can be, and no small matrix leads from it to a standard setting (every subgroup of an R group but one used to go unnamed for that reason). A setting is tried only if its fingerprint matches the subgroup’s — for each rotation its trace, its determinant and whether the group holds it without a screw or glide part, none of which a change of axes or origin can alter. And before any origin shift is tried, the screw or glide part of each operator is compared, which is the same at every origin. The t subgroups are named first. The search runs in the background, rows are named as they are found (a fraction of a second for most groups), and it stops after 30 s as a safeguard; a row left not named can still be used, and then carries a label such as subgroup (klassengleiche, index 3) of … with no symbol. - Another group. Choose any setting as the target; the dialog lists up to eight changes of axes (and origin) that make it a subgroup, a supergroup or the same group as the current one, the same group in the same volume first. The lattices must be related, not only the operators: a cell of half the volume is never offered as the “same” group, and a supergroup is offered only when the metric of the cell has its symmetry.
The new solution takes the transformed cell (a′, b′, c′, α′, β′, γ′ from the metric, G′ = PT G P), its volume, and the group as its space group. Its crystal system is worked out from the metric (lengths within 0.4 %, angles within 0.12°), not taken from the group, and a monoclinic cell with a unique axis other than b is therefore listed as triclinic. Its M(20) is the parent’s and is not recomputed: for an index above 1 the new cell has more lines than the parent, so its true M(20) would be lower. The solution records what it came from (convertedFrom), the report says so, and the Log and a message state it.
Projects
File → Save project… downloads a .brutus file: JSON with format: "brutus-project" and version: 2 (files of the earlier version 1 are refused), holding the state (file name, the original and the working pattern, the peak list and whether it was edited by hand, every solution with its space groups, the one drawn on the plot and its conversion record, the selected solution, the background, the input fields and the systems checked, the plot axes and view, and the statistics of the last run), the run history and the log. The pattern arrays are written once, in arrays, and the state and every run of the history refer to them ({"$array": n}), so a file indexed many times is not stored many times. Open project… validates all of it before replacing anything (a bad file leaves the session as it was), then restores the pattern, peaks, solutions and plot without re-running peak detection or indexing. Both are refused while a search runs. Nothing is uploaded; the file is local.
What the PDF report says about space groups
The report has exactly one source of ranking authority, the Space Group MC. It reproduces that run’s conclusion and recomputes nothing.
Each solution’s detail page carries two blocks, in this order:
1. Space Group Determination
First, the space groups attached to the solution by Explore Space Group or Convert: each with its label and Hall symbol and where it came from, and, for a converted cell, the parent cell, the relation and the new axes, with the note that M(20) is the parent’s. Then, when the cell came from a Space Group MC run (via Add as solution), the determination below. It is a verbatim reproduction of what that run concluded — the report recomputes nothing and re-orders nothing. It gives:
- the class (extinction symbol) and every space group it contains;
- the reflection conditions that define it;
- the margin over the runner-up, in nats and as approximate odds;
- the evidence: clean absences out of informative ones, hard and soft violations, unindexed peaks;
- the method: whether absences were weighted per reflection (Wilson $|E|^2$) or uniformly, the estimated $p$, and whether the cell was refined by the Monte-Carlo pass or by stage-1 least squares only.
Two cases are called out rather than smoothed over. A margin below the 2.3-nat threshold prints as NOT DECISIVE, in warning colour, stating that the cell is refined under the hypothesis rather than proof of it — a bold class name at the top of a page is read as an answer, and when the run ended in a tie it is not one. A stage-1 row says so too, since a lead over a class that was never fully refined is a weaker statement than a lead over one that was.
When no Space Group MC was run and no group was attached, the block says so plainly and points you at the tool. It does not substitute a weaker determination.
2. Space groups compatible with the observed absences
The list described in A compatibility list, not a ranking: grouped by hard violation count, ordered by space-group number within each group, with the offending reflections, the explains n/N absences tag and any conditions the setting fails to account for. Its heading and its explanatory note both state that it is not a ranking, and it discloses how many settings it is showing out of how many were found.
Advanced Topics: Enhanced Search and Sieving
Beyond the core indexing routine, Brutus applies several "fishing" strategies and reduction steps
to improve robustness and simplify the set of final solutions. These are applied in
findTransformedSolutions() after the main search completes.
1. Niggli Cell Reduction & Symmetry Upgrade
For each solution, Brutus computes the Niggli reduced cell — the standardised, most compact cell for the lattice — by applying the Křivý–Gruber reduction directly to the solved cell.
The reduction deliberately does not use the centering inferred from systematic absences. The Niggli cell and the symmetry upgrade are questions about the metric of the lattice actually solved, whereas the detected centering is a space-group guess, and that guess is least reliable exactly when reduction matters most. If a pseudo-symmetric cell is wrongly assigned a centering, applying the corresponding primitive transform extracts a half-volume sublattice bearing no relation to the true symmetry — the reduction then reports a spurious triclinic-looking cell and the symmetry upgrade never fires. Reducing the solved lattice on its own terms makes this step robust to an incorrect absence analysis.
As a worked example: a hexagonal cell forced into a monoclinic setting ($a \approx c \approx 9.40$ Å, $b \approx 6.90$ Å, $\beta \approx 120°$, $V = 527$ ų) is reduced correctly to a cell with two near-equal edges and a 120° angle, revealing the hexagonal metric. Had the false I-centering been applied first, the result would instead have been a 264 ų sublattice with no recognisable symmetry.
After reduction, the code calls getSymmetry() with a deliberately loose tolerance (0.25 Å / 0.25°)
and again with a tight one (0.02 Å / 0.02°); a transformed cell is tried as each system the two
calls name, so a cell that is only nearly more symmetric is not lost when the idealised one fails.
The loose call detects pseudo-symmetry: a cell found as monoclinic might, after Niggli reduction, reveal
all angles equal to 90° and two equal axes — i.e. it is actually tetragonal. If the detected
symmetry is higher than the search symmetry (and the user has selected that higher-symmetry system),
a new trial cell is constructed with the correct symmetry and re-refined and re-scored.
The trial cell is first put in the setting the line generator assumes: for tetragonal and hexagonal the equal pair becomes $a = b$ (for hexagonal, the pair spanning the angle nearest 120°) and the third edge $c$; for monoclinic the angle furthest from 90° marks the unique axis, which is relabelled $b$. This matters because the Niggli cell orders its edges by length, so a monoclinic lattice very often reduces with its oblique angle on α or γ. Refined as it stood, such a cell was matched against the line list of a different lattice and always rejected, and a triclinic hit was never promoted to monoclinic. The cells produced by the matrix transformations and the divisor analysis below are oriented the same way.
A true-primitive reduction of a genuinely centered lattice is available to callers that want it, by passing an explicit centering to the reduction routine. It is not taken from the absence analysis automatically: the centering derived there is a ranked hypothesis, not an established fact, and feeding a hypothesis silently into the cell reduction would make the reported cell depend on a guess the user never sees.
Two cells in the PDF report, and what they are called
Because the internal reduction ignores centering, reporting only that cell would be misleading: for a centered lattice it is not primitive, yet a heading of “Niggli cell” implies that it is. This is a definitional point, not a stylistic one. In International Tables for Crystallography Vol. A, §9.2, the reduced cell is defined as a primitive cell, and Niggli reduction is specified on the primitive basis. Both “reduced cell” and “Niggli” therefore already assert primitivity, so a heading such as “Reduced Cell (Niggli, centering not applied)” asserts and then retracts the same property, and printing it above a line reading “Lattice Centering: Body-centered (I)” is self-contradictory.
The report therefore prints both cells and reserves the Niggli name for the one that has earned it:
- Standardised Conventional Cell (centering not applied) — the Křivý–Gruber reduction of the solved conventional basis, with the centering deliberately ignored. This is the cell the pseudo-symmetry / symmetry-upgrade check actually operates on, so showing it makes that step auditable. Strictly, it is the Niggli cell of the sublattice spanned by a, b, c — a real lattice, but not the crystal's, which is why neither reserved term is used in the heading. When the lattice is primitive there is no centering transform to apply and the two cells coincide, so the heading changes to plain Reduced (Niggli) Cell and the second block is not printed. The Lattice Centering line is printed immediately above these blocks, since the headings refer to it.
- Reduced (Niggli) Cell — primitive — printed only when the absence analysis has detected a genuine centering (I, F, A, B, C or R). The conventional cell is first transformed to its primitive basis, then reduced. This is the reduced cell of the lattice in the strict sense, and it is the one to quote or use as a database key. The subtitle states the volume ratio to the cell above (1/2 for I, A, B and C; 1/4 for F; 1/3 for R). If the centering could not be determined, this block is omitted rather than guessed.
For the same reason, the pseudo-symmetry alert reads “HIGHER SYMMETRY DETECTED IN CONVENTIONAL CELL METRIC” and its entries are labelled Conventional-cell metric: that check runs on the first block, not on the primitive cell.
Worked example. A body-centered cubic solution with a = 18.8800 Å, V = 6729.89 Å3 reports a first block identical to the input (the conventional cell is already reduced), and a second block giving the rhombohedral primitive cell: a = b = c = 16.3506 Å, α = β = γ = 109.471°, V = 3364.93 Å3 — exactly half, as expected for I-centering. Seeing both makes it immediately clear that the full-volume cell is the conventional setting and not a failed reduction.
Niggli cells are also used for:
- Database searching: Different settings of the same lattice reduce to the same cell, making it a canonical key for identification. Use the second (primitive) block for this: reduction is centering-independent by default, so the first block is canonical only across settings of a given lattice, whereas reduced-cell databases expect the centering to have been applied first.
- Standardised reporting: Both cells are included in the PDF report for each major candidate, providing an unambiguous description for cross-referencing.
2. Matrix-Based Cell Transformations
A set of seven crystallographic transformation matrices $P$ is applied to each candidate cell. Each transforms the real-space metric tensor $G \to P^T G P$, generating a new lattice description. The matrices include:
- Face-centered (F) → primitive: $P = \tfrac{1}{2}\bigl[(0,1,1),(1,0,1),(1,1,0)\bigr]$
- Body-centered (I) → primitive: $P = \tfrac{1}{2}\bigl[(-1,1,1),(1,-1,1),(1,1,-1)\bigr]$
- C-centered → primitive: $P = \tfrac{1}{2}\bigl[(1,1,0),(-1,1,0),(0,0,2)\bigr]$
- Axis halvings (a/2, b/2, c/2) and one C→P transformation.
The resulting cell is classified by symmetry and, if the system is among those selected by the user, sent to refinement and scoring.
3. HKL Divisor Analysis (Sub-cell Detection)
The list of indexed $(hkl)$ values for each solution is inspected for common divisors. The GCD of all $|h|$ values, all $|k|$ values, and all $|l|$ values are computed separately. If any GCD exceeds 1 (e.g. all $h$ values are even), the program tests a shrunken cell with the corresponding axis divided by that GCD. This detects cases where the indexing algorithm found a super-cell of the true cell.
4. Orthorhombic–Hexagonal Relationship
A hexagonal lattice can sometimes be described as C-centered orthorhombic with $b/a \approx \sqrt{3}$ (or permutations). All orthorhombic solutions are checked against this condition (within 3% tolerance), and potential hexagonal equivalents are generated and evaluated.
5. Combinatorial Swap Search (Swap Fishing)
Mis-assignment is the commonest way a correct cell ends up with a poor M(20): two calculated lines straddle one observed peak and the nearest-line rule picks the wrong one by a few thousandths of a degree. Nothing flags it — in a permissive space group both labels are allowed — and, crucially, the wrong labelling always has the smaller residual at the cell you already have, because that is how it was chosen. The only way to tell is to relabel, refit the cell, and rescore.
An automatic swap search is applied to up to the best 40 eligible parent cells during post-processing.
What is enumerated
Observed peaks are examined for calculated lines inside the search window. After equivalent design rows are collapsed, at most four labels per peak are kept by default. The search walks the Cartesian product for a limited set of variable peaks: eight by default, increased to twelve or sixteen for the smaller GPU parent lists described below.
That product is astronomically large, so it is visited cheapest-first: each assignment carries a penalty $\sum_i (\Delta q_i / \mathrm{tol}_i)^2$ measuring how far it departs from the nearest-line labelling, and a priority queue expands states in order of increasing penalty starting from all-nearest. The fit budget limits how much of this restricted product is visited; it does not guarantee that every plausible relabelling is covered. Multiple rounds re-centre the search on an improved cell.
Two-stage evaluation
A full rescore means regenerating the whole calculated line list, which is too expensive to do hundreds of times per solution. Each candidate labelling is therefore first fitted cheaply: the least-squares design rows are built straight from the labels against a line list generated once for the parent cell, and the normal equations solved. No line regeneration, no nearest-line rescan. These are ranked by weighted RMS residual, and only the best few distinct cells go on to a full M and F recomputation.
Rounds — why one pass is not enough
Fixing a crossing moves the cell, and moving the cell changes which calculated lines sit near which observed peaks. The second round therefore enumerates a genuinely different candidate set — one the first round could not see at any budget, because those candidates did not exist at the starting geometry. The search runs up to four rounds, re-centring on the improved cell each time and stopping as soon as a round stops gaining. A round gains only if its best candidate indexes more of the observed lines than the cell the round started from, or raises M(20) by more than 2 %.
On the PbSO4 test pattern available in this repository: a single round lifts the best cell from M(20) 43.7 to 49.4 and stops there; four rounds reach 93.6, with the number of indexed lines rising from 44/47 to 46/47.
What counts as better
M(20) is computed on the first twenty peaks and is blind to everything beyond them. A relabelling can inflate it while quietly wrecking the fit to the rest of the pattern, and the combinatorial search is very good at finding exactly such labellings. Candidates are therefore ranked on how many of all N observed lines they index first, and on M(20) only as a tie-break.
Pruning and constraints
- Equivalent labels are collapsed. Two reflections that produce the same least-squares design row are the same equation; trying both is pure waste. This is a large factor in the higher-symmetry systems.
- One calculated line per observed peak, the same rule the main refinement enforces. A transposition — two peaks exchanging different labels — is the whole point of the search and is unaffected; two peaks landing on the same line would be fitted as duplicate equations and averaged, so the closer peak keeps it.
- Candidates are fitted against all indexed peaks, not the bare minimum for the crystal system, so a wrong swap shows up as a bad fit instead of being absorbed by a handful of rows.
Window, budget and what is kept
Alternatives are collected in a window wider than the indexing tolerance (2.5×). A competing reflection just outside tolerance is precisely the interesting case: if it is the right assignment, the cell will shift to meet it. At the strict tolerance the PbSO4 example is invisible — (1,0,0) and (0,1,1) sit 0.048° apart against a 0.040° window, so no alternative would ever be found.
Before GPU post-processing, the parent list is restricted to the current input-data
context and zero-refinement mode, then passed through the geometry-aware sieve.
This avoids repeating work on equivalent settings and avoids refitting older cells against
changed data. The budget increases for smaller parent lists: up to 600 cheap fits per
round and six rounds for at most eight parents; up to 300 fits and five rounds for at
most twenty parents; otherwise the default BRUTUS_LIMITS.swap budget applies.
Full rescores and posted children are also capped. A child must score at least as well
as its parent to be posted; subsequent duplicate selection can replace a lower-quality
equivalent already in the table.
The scan needs at least as many indexed peaks as the crystal system has parameters to refine, which means six for triclinic and one more again when the zero error is being refined. This is a requirement rather than a tuning choice: below it there is nothing to fit and the search declines to run.
BRUTUS_LIMITS.swap object in
js/crystallography/limits.js: window width, alternatives kept per peak, peaks allowed to vary
at once, fits per round, number of rounds, and how many parent solutions are searched. Setting
DEBUG: true prints one line per parent to the worker console — rounds run,
fits spent, lines indexed before and after, and M(20) before and after — which is the
quickest way to see whether the search is reaching a given solution at all.
6. Monte Carlo Cell Polish (Refine MC)
Least squares converges to the nearest minimum of the residual, but the M(20) score is not the residual: a cell a few tenths of a percent away can index more lines and score considerably higher. Brutus includes a Refine MC tool (accessible via the right-click context menu on the Solutions tab) to run a symmetry-constrained stochastic local hunt around a refined solution.
Instead of explicitly mutating or manually swapping HKL labels, this algorithm takes continuous random-walk steps in the reciprocal-space parameters (and the zero-error shift, if enabled). As the trial cell geometry shifts, the evaluation functions dynamically pair each observed peak to whichever theoretical line is now closest.
If this dynamic re-pairing captures a better-fitting theoretical reflection and improves the overall M(20) score, the step is accepted. This allows the solution to smoothly escape local minima and naturally resolve its own HKL assignments without requiring manual intervention.
The dialog asks for Iterations (annealing steps per run, default 1000) and
Restarts (independent runs, default 8). It works on the open solution (Solution → Refine),
captured when the dialog opens, and runs one restart at a time, so the page stays responsive: the dialog says which
run it is on and the best M(20) so far, and Stop (the Cancel button during a run, or Esc) ends it
after the current restart and keeps the best cell found. The target is fixed when the dialog opens,
so a table re-sorted or still filling while it is open cannot change
the target. Peaks are those of the 2θ window minus the Kα2-suspect ones, as in indexing,
so the result's M(20) is directly comparable with its parent's; the space-group analysis of the result
still sees the suspects, as soft evidence. With Refine Zero Error on, the zero error
walks in steps of about 0.01° within ±0.2° of the parent's refined zero (so a parent with a larger zero error is not pinned at a bound). With it off, the parent's zero is held fixed — it is part of the cell, not dropped. A result is added, directly above its parent, only if it beats
the parent's M(20).
The same walk is reused, under a restricted line list, by Space Group MC, which refines the cell once per extinction class of its crystal system and ranks the classes by a log-odds score.
7. Final De-Duplication (Sieving)
Similar volume is only an initial filter. Two candidates must describe equivalent lattice geometry before either is dropped as a duplicate. For example, orthorhombic $(3,4,5)$ and $(4,3,5)$ describe the same cell and merge; $(4,5,6)$ and $(3,5,8)$ have equal volume but different geometry and remain separate.
- Compare like with like. Candidates must have the same stored input context and the same fixed-zero or fitted-zero mode. Their volumes must differ by no more than 1% of the smaller volume.
- Check the metric. The existing Niggli reducer is applied once per cell, without inferring centering from space-group analysis. The comparison searches signed axis permutations and neighbouring combinations of the reduced basis vectors (integer coefficients −1, 0, 1), and accepts only a basis transformation with determinant +1 or −1. If reduction does not converge, the original metric is used for that check.
- Allow small numerical differences. Corresponding edges must agree within 0.2% of the smaller edge and the three inter-edge angles within 0.15°. An uncertain or unsuccessful comparison retains the candidate.
- Keep the more symmetric description. Candidates are compared
best-first. Of two equivalent cells the more symmetric one is kept
(cubic > hexagonal, tetragonal > orthorhombic > monoclinic > triclinic); between equal
symmetries the higher M(20) wins. If the less symmetric cell's M(20) is more than twice as high,
both are kept, each marked ≡ with the other's system (
[=xxxx]in the PDF report): the sieve cannot tell a real distortion from extra parameters fitting the noise, so you decide. The higher M(20) alone is not used, because a description with more free parameters can score a little higher by fitting the noise: on Si a tetragonal cell with $c = a + 0.001$ Å scores M(20) 1518 against the cubic cell’s 1054. A genuine distortion inside the 0.2 % tolerance fits clearly better instead — $c/a = 1.0005$ measured to 0.002° gave the tetragonal cell 3–4 times the cubic M(20), and a larger one leaves the cubic cell unable to fit at all — while the extra parameter alone gave at most 1.4 times in tests. A cell matching a kept one at least as symmetric is dropped; otherwise it replaces the kept cells it fits within a factor of 2 and is listed beside the others. The factor of 2 is applied to everything a cell displaces, directly or through intermediate descriptions: orthorhombic 100, tetragonal 60 and cubic 35 keep the orthorhombic and the cubic cell, exactly as orthorhombic 100 and cubic 35 alone do. When more distinct cells remain than the list holds, the lowest M(20) are dropped and the message says how many; the run that just finished takes the list first, cells of earlier runs fill what is left. - R cells that are cubic. A rhombohedral lattice with $\alpha$ = 90°, 109.47° or 60° is P, I or F cubic. Found by the hexagonal search its triple cell has 3, 3/2 or 3/4 of the cubic volume, so the steps above never pair the two; the sieve compares their primitive cells instead and keeps the cubic description. Their M(20) values do not compare: the R cell counts only R lines, the cubic one every P line, absent F or I lines included.
This conservative check recognises equivalent settings without treating every pair of equal-volume cells as identical. It is not an exhaustive search of every possible basis change when numerical reduction is ambiguous. Distinct zero models or input contexts are kept separate during duplicate testing, but all results remain subject to the existing final cap of 50 solutions, ranked by M(20). The cells of a ≡ pair are kept together, so the list can exceed 50 by a few.
Troubleshooting & FAQ
Error: "WebGPU not supported in this browser"
This error usually indicates a software or configuration issue rather than a lack of hardware capability. Even integrated graphics (e.g. Intel UHD) support WebGPU if configured correctly.
- Unsupported Browser: WebGPU is currently best supported on Google Chrome (v113+) and Microsoft Edge. Firefox has experimental support. Safari supports a subset of WebGPU.
- Outdated Drivers: Old graphics drivers are frequently blocklisted by browsers to prevent instability. Update your GPU drivers (Intel, NVIDIA, or AMD) to the latest version via the manufacturer's website or Windows Update.
-
Hardware Acceleration Disabled:
Check your browser settings (usually under
Settings > System) and ensure "Use graphics acceleration when available" is turned ON. Restart the browser afterwards. -
Linux:
On Linux, WebGPU is often disabled by default. You may need to manually enable flags in
chrome://flags. Search for "Vulkan" and "WebGPU" and set them to Enabled.
To verify: Type chrome://gpu in your address bar and look for "WebGPU".
If it says "Software only" or "Disabled", the GPU search will not function.
Why were no solutions found?
- Poor peak list: This is the most common cause. Ensure the list is accurate, impurity peaks are removed, and positions are well refined. A minimum of 15–20 clean peaks is recommended. For low-symmetry systems, the first 10 peaks (largest d-spacings) must be especially reliable.
-
Incorrect parameters:
Check the wavelength, the selected
Radiation Preset, and theMax Volume. A Kα1 preset on data that still contain the doublet flags nothing, so every resolved Kα2 peak enters the search as a real line; strip Kα2 or delete those peaks. -
GPU parameters too restrictive:
The true solution might require HKLs or peak combinations beyond the default
HKL BasisorDepth. Try increasing these, and check that the right systems are selected (Triclinic is off by default). - Large zero-point error: Brutus corrects moderate misalignments, but very large zero errors (e.g. >0.2°) may cause all trial cells to fail the pre-filter. Increase FoM Tolerance and try again.
- Sample is a mixture: Successful indexing requires peaks from a single crystalline phase.
Why is M(20) low although the fit looks good?
- Sub-multiple or super-multiple cell: The found cell may be a multiple or sub-cell of the true one. It indexes only a subset of peaks and is penalised for being too sparse or too dense in calculated reflections. Look for a related cell with higher M(20) in the solutions list.
-
High error / low resolution:
The
2θ Errorsetting may be too strict for broad peaks. Try slightly increasing it to widen the Q-tolerance. - Spurious solution: Random solutions can fit a few peaks by coincidence. Always check whether all major observed peaks are reproduced by the calculated pattern. If significant peaks are missed, the solution is incorrect regardless of M(20).
-
Unstripped Kα doublets:
With stripping off, only the Kα1 parents of flagged Kα2 peaks are
indexed with λKα1. A resolved Kα1 line whose Kα2 shoulder was not
picked, or a partly resolved peak, stays at the average wavelength and misfits by up to a third of
the doublet splitting. Look for it in the report, add a missed
shoulder with
Ctrl + Clickso the pair is recognised, or strip Kα2 — see Flagged or stripped?
The progress bar is stuck / search seems frozen
- A high Depth value can make the GPU issue an enormous number of tiny dispatches, so the bar advances in barely-visible steps even though nothing is wrong. If you were warned about a large dispatch count before starting, this is expected — press Stop, lower Depth, and run again. The progress bar is shared by all checked systems: with five systems, each covers one fifth of it, and monoclinic or triclinic take far longer than their share suggests.
- Without WebGPU (CPU fallback), Tetragonal and Hexagonal searches with dense patterns refine a large fraction of the trial cells. The search is still running. Watch the trials-per-second counter in the status bar.
- For GPU searches, the batch system may be processing a very large number of candidates in the CPU post-processing phase (Niggli reduction, M(20) calculation). This can take several minutes if the GPU buffer is large (e.g. 200 kCells).
- After the last GPU system finishes (status Refining candidate cells...), the refinement drain watches each worker individually. A worker with outstanding batches and no valid activity for more than about 30 seconds is removed and terminated. Its remaining candidates are abandoned, and any late messages from that worker are ignored. The search is marked incomplete; a timeout does not mean the remaining candidates were successfully refined.
- If the browser reports that the GPU device was lost, the driver has reset (a TDR) or the tab was suspended. GPU searches are disabled until you reload the page; reload and try again with a smaller HKL Basis or a lower Depth.
Stopping and restarting a search
Index is locked as soon as startup begins, including GPU initialization, and turns into Stop (Esc does the same); the rest of the window is locked until the run ends. Stop cancels that run and terminates its CPU/refinement workers. A new search has its own cancellation state and re-initialises the refinement pool for itself; late results and callbacks from the stopped run are ignored, and so is its clean-up, which therefore cannot release the pool under the new run . GPU commands already submitted may still finish on the device, but their cancelled results do not enter the new run. Existing accepted solutions are retained for review.
What does “Search incomplete” mean?
A worker crash, refinement timeout, candidate-processing error, GPU execution/read-back
failure or post-processing error can leave part of the search unprocessed. The application
reports this in the status area and includes INCOMPLETE in the saved indexing
statistics when it finalizes the run. Solutions already obtained remain available, but
the result must not be interpreted as a completed search of the requested space.
Review the reported failure before deciding whether to rerun.
Test Files
- The GitHub repository contains several example datasets:
- Monoclinic_test_1.xy — Synchrotron XRD, monoclinic, monochromatic λ = 0.79764 Å. Lattice parameters: a = 19.877 Å, b = 8.196 Å, c = 11.243 Å, β = 106.08°.
- C61Br2_079764.XY — Dibromo-methano fullerene measured at ESRF, λ = 0.79764 Å. Contains an impurity peak at ~16.24° 2θ. Expected solution: cubic I with a ≈ 18.92 Å.
- SPDDRR1_sample2_0692.xy — Round-robin data measured at Daresbury, λ = 0.692 Å. Expected cell: orthorhombic with a = 10.983 Å, b = 12.852 Å, c = 15.740 Å.
- SPDDRR1_sample2_Cu.xy — Same sample as above, measured with a Cu Kα laboratory source.
- SPDDRR1_zhu1_Cu.xy — Round-robin sample 1, measured with Cu Kα; likely monoclinic with a = 7.672 Å, b = 9.624 Å, c = 7.076 Å, β = 106.24°.
- PbSO4.xra and FAP.xra — Laboratory Cu Kα samples representative of orthorhombic and hexagonal structures (datafiles taken from GSAS-2 tutorials).
Found a Bug?
If you suspect you have found a bug (e.g. the interface freezes unexpectedly or valid data crashes the GPU search), please report it.
Note: You will need a free GitHub account. The form will ask for your browser version and GPU model to help reproduce the issue.
References
Brutus was developed by Nita Dragoe at Université Paris-Saclay (2024–2026) as a successor to the earlier
program Powder (1999–2000). If you use Brutus in your work, please cite:
https://doi.org/10.13140/rg.2.2.18182.84806
For further background on the methodology, the following references are recommended:
-
M(N) figure of merit
de Wolff, P. M. (1968). "A Simplified Criterion for the Reliability of a Powder Pattern Indexing." Journal of Applied Crystallography 1, 108–113. -
F(N) figure of merit
Smith, G. S. & Snyder, R. L. (1979). "F(N): A Criterion for Rating Powder Diffraction Patterns and Evaluating the Reliability of Powder-Pattern Indexing." Journal of Applied Crystallography 12, 60–65. -
General powder diffraction text
Klug, H. P. & Alexander, L. E. (1974). X-Ray Diffraction Procedures for Polycrystalline and Amorphous Materials, 2nd ed. New York: Wiley-Interscience. -
Kα2 Elimination Algorithm (q-space differencing)
Zhang, Z., Lv, B., Zhao, G., Sun, X., Chang, S., Zhang, J., Rodriguez-Carvajal, J., Chen, X. & Feng, Z. (2026). "Parameter-free Kα2 elimination for X-ray diffraction via dual-wavelength q-space differencing." Measurement 276, 121448. (The starting point of Brutus's Kα2 stripping, which now inverts the doublet exactly; see Strip Kα₂.) -
Savitzky–Golay smoothing
Savitzky, A. & Golay, M. J. E. (1964). "Smoothing and Differentiation of Data by Simplified Least Squares Procedures." Analytical Chemistry 36(8), 1627–1639. -
Alternative indexing approaches
Ito, T. (1949). "A General Powder X-ray Photography." Nature 164, 755–756.
Werner, P.-E., Eriksson, L. & Westdahl, M. (1985). "TREOR, a Semi-exhaustive Trial-and-Error Powder Indexing Program for All Symmetries." Journal of Applied Crystallography 18, 367–370.
Visser, J. W. (1969). "A Fully Automatic Program for Finding the Unit Cell from Powder Data." Journal of Applied Crystallography 2, 89–95.
Le Bail, A. (2004). "Monte Carlo Indexing with McMaille." Powder Diffraction 19(3), 249–254.
Boultif, A. & Louër, D. (2004). "Powder Pattern Indexing with the Dichotomy Method." Journal of Applied Crystallography 37, 724–731. -
Space-group determination from powder absences
Markvardsen, A. J., David, W. I. F., Johnson, J. C. & Shankland, K. (2001). “A Probabilistic Approach to Space-Group Determination from Powder Diffraction Data.” Acta Crystallographica A57, 47–54. -
Previous software
Dragoe, N. (2001). "PowderV2: A Suite of Applications for Powder X-Ray Diffraction Calculations." Journal of Applied Crystallography 34, 535.