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. As the name of the program suggests it, this is brute force method (force is not necessarily smart).
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 system-specific, exhaustive search algorithm.
The central assumption is that a small subset of the most intense, low-angle reflections corresponds to simple crystal planes with low-integer Miller indices $(hkl)$. For a given crystal system, the program chooses exactly as many observed peaks as there are unknown lattice parameters, and solves the resulting system of linear equations.
Q-Space Formulation
All peak positions are first converted from $2\theta$ to Q-space, where $Q = 1/d^2$. The general quadratic relationship between $Q$, the Miller indices, and the reciprocal cell parameters ($A, B, C, D, E, F$) is
$$ Q_{hkl} = Ah^2 + Bk^2 + Cl^2 + Dkl + Ehl + Fhk $$
Brutus solves for these reciprocal parameters (or the subset relevant to the current crystal system), then converts them to real-space cell parameters. Each candidate cell is refined immediately and scored against the full peak list.
Quick Start Guide
Use the following workflow for a typical single-phase powder pattern.
-
Load the data file.
Click
Select Data File. Supported formats include.xy,.xrdml,.ras, and others. -
Detect peaks.
On the Peaks tab, adjust the
Min peak (%),Radius (pts), andPointssliders until the automatically detected peaks match the visual pattern. -
Curate the peak list.
Carefully review all peaks:
- Edit $2\theta$ positions for accuracy.
- Delete spurious peaks (noise, Kα2 shoulders if you are not stripping Kα2).
- Add any missing reflections using
Ctrl + Clickon the chart.
-
Set parameters.
On the Parameters tab:
- Select the correct X-ray
Radiation Preset(e.g. Cu Kα). - Choose whether to enable
Strip K-alpha2. This also updates theKa1 Wavelengthfield. The default is OFF (average Kα wavelength). - 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-Point Error enabled unless you have a specific reason to turn it off.
- Select the crystal systems to search. Enabling Orthorhombic, Monoclinic, or Triclinic activates GPU-accelerated searches.
- Select the correct X-ray
-
(Optional) Tune GPU Parameters.
If searching Orthorhombic, Monoclinic, or Triclinic, a new box appears.
HKL Basis Size: Number of simple HKLs to use for the search (Defaults: Ortho 300, Mono 100, Tri 40).Peaks to Combine: Number of observed peaks to use for combinations (Defaults: Ortho 7, Mono 7, Tri 9).- Leave these at their defaults unless you have trouble finding a solution.
-
Start indexing.
Click
Start Indexing. Progress is shown on the main bar. -
Inspect solutions.
On the Solutions tab:
- Sort solutions by M(20).
- Click a row to display calculated (blue) and observed (red) tick marks on the chart.
- A plausible solution will show excellent alignment and reasonable space-group suggestions.
The User Interface
The application window is divided into a Controls Panel (left) and a Results Area (right).
Controls Panel
The controls are organized into three main tabs.
1. Peaks Tab
-
Peak finding sliders:
Radius– background subtraction radius (rolling-ball algorithm).Points– Savitzky–Golay smoothing window width.Min peak (%)– peak detection threshold on a logarithmic scale.
- 2θ range sliders: Restrict the angular window for peak finding, for example to exclude noisy low-angle or high-angle regions.
-
Peak table:
Lists all detected peaks. The
2θ Obs (°)column is editable to allow fine corrections.
2. Parameters Tab
- Radiation Preset: Select the X-ray source (e.g. Cu Kα, Co Kα). This sets the internal wavelength values.
-
Ka1 Wavelength (Å):
Displays the wavelength used for calculations. It is updated automatically when a preset is chosen and
depends on the
Strip K-alpha2setting. It becomes editable only when aCustompreset is selected. -
Strip K-alpha2:
Applies a Damped Richardson-Lucy deconvolution to remove the Kα2 component before peak analysis.
This iterative Bayesian method is superior to traditional subtraction as it enforces positivity (no negative artifacts) and includes damping to prevent noise amplification ("ringing").
When enabled, the
Ka1 Wavelengthfield is set to the pure Kα1 value. The default is OFF. - Max Volume (ų): Upper bound on the allowed unit-cell volume. This is a strong constraint on the search.
- Impurity Peaks: Number of unindexed peaks allowed among the first 20 when computing M(20).
- 2θ Error (°): Matching tolerance between observed and calculated peak positions.
- Refine Zero-Point Error: When enabled, a full zero-point refinement is performed for the final solution.
- Crystal systems to search: Checkboxes for Cubic, Tetragonal, Hexagonal, Orthorhombic, Monoclinic, and Triclinic.
GPU Search Parameters
When Orthorhombic, Monoclinic, or Triclinic is selected, a dedicated panel appears. These four parameters control the scope, speed, and memory usage of the brute-force search.
-
HKL Basis Size ($N_{hkl}$):
Defines the size of the pool of theoretical Miller indices used to construct trial matrices.- What it does: Brutus generates a list of simple HKL triplets (e.g., 100, 011, 112) sorted by $h^2+k^2+l^2$. This parameter determines how many of these triplets are used to form combinations (bases).
- Implication: Increasing this allows finding cells with larger unit cell edges or complex centering, but it increases the number of "HKL Combinations" factorially. This is the main driver of search time for Monoclinic and Triclinic systems.
- Defaults: 300 (Ortho), 100 (Mono), 40 (Tri).
-
Peaks to Combine ($N_{peaks}$):
Controls how many observed peaks (starting from the first one) are considered for generating the solving tuple.- What it does: To solve a system, Brutus needs exactly $k$ peaks ($k=3$ for Ortho, 4 for Mono, 6 for Tri). If this parameter is set higher than $k$ (e.g., 7 for Monoclinic), the program tests every possible subgroup of 4 peaks drawn from those top 7.
- Implication: This provides robustness against impurities. If the 2nd peak is an impurity, a search using only the first 4 peaks will fail. A search using the first 7 peaks will eventually test the combination $\{1,3,4,5\}$, skipping the impurity. Increasing this value effectively creates a "Sliding Window" search but increases total trials.
- Defaults: 7 (Ortho), 7 (Mono), 9 (Tri).
-
FoM Tolerance:
The "Fail-Fast" threshold for the GPU's internal Figure of Merit filter.- What it does: Before sending a solution to the CPU, the GPU calculates a quick score based on the average absolute deviation of the first 10 observed peaks. If the error is higher than this tolerance, the cell is discarded immediately.
- Note: A value of 1.0 corresponds to an average error exactly matching your user-defined
2θ Error. The default is higher to allow for unrefined trial cells. - Recommendation: The default (0.8) is a balanced choice. Increase it (e.g., to 3.0) if your data is very noisy or has a significant zero-shift, to prevent valid but poorly-fitting initial cells from being rejected too early. A large value will generate many candidates, you may need to update the Candidates number.
-
Buffer (kCells):
The maximum number of candidate solutions (in thousands) the GPU is allowed to store.- What it does: It limits the size of the results buffer passed back to the CPU. If the search finds more valid candidates than this limit, the search stops early ("Buffer Full").
- Recommendation: Keep this around 20 (20,000 solutions). Sending millions of solutions to the CPU will freeze the interface during the refinement step without adding value, as the correct solution is almost always among the top candidates if it exists.
Note: The status text at the bottom of the panel updates in real-time as you adjust these values, showing the total estimated number of cells to be tested. Ensure this number remains reasonable (e.g., under 500 Billion) for a timely result.
When you select a GPU system, the status text at the bottom of the panel will show you the total number of cells to be tested, which is a direct result of these two parameters. Be careful, this number can increase very fast. For a regular GPU card at the time of this writting (like Nvidia 8Gb T1000) the search speed is in the range of millions/sec cells tested.
3. Solutions Tab
- Solutions table: Shows each valid solution with crystal system, unit-cell parameters, volume and M(20). Selecting a row updates the main chart. After the search finishes, you can filter visible solutions by enabling or disabling crystal systems.
Results Area
- Chart: Shows the experimental diffraction pattern, observed peaks (red ticks) and calculated peaks for the selected solution (blue ticks). A good solution exhibits visually convincing overlap.
-
Chart interaction:
- Zoom: mouse wheel (different zoom type if the mouse at the left of Y axis or nelow the Y axis).
- Pan: click and drag.
- Reset zoom: right-click.
- Add peak:
Ctrl + Click.
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-alpha2is enabled, the Damped Richardson-Lucy algorithm is applied to the raw intensities. This separates the doublet based on the wavelength ratio; even the natural shape of the peak base is not preserved this is not important for this program. -
Background subtraction:
A rolling-ball style algorithm estimates and removes the background.
The
Radiusslider controls the ball radius. -
Data smoothing:
A Savitzky–Golay filter is applied to the background-subtracted signal to reduce noise
while preserving peak shapes. The
Pointsslider sets the window width. -
Initial peak detection:
Local maxima above the
Min peak (%)threshold are identified. - Position refinement: For each peak, a five-point least-squares quadratic fit (based on Savitzky–Golay coefficients) is carried out around the maximum to obtain a the position. If too close to the data edge, the algorithm falls back to a three-point fit.
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. - For broad, slowly varying backgrounds, increase
Radius. - For noisy data, increase
Points(smoothing), but avoid over-smoothing, which can merge or shift peaks. - Always manually curate the final peak list. Remove artifacts and known impurity peaks. If you are not stripping Kα2, delete Kα2 shoulders explicitly.
- 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.
Indexing Algorithm and Search Parameters
Brutus uses an exhaustive, symmetry-specific trial-and-refine indexing algorithm. For each crystal system, the program generates trial solutions from combinations of the lowest-angle peaks and low-index Miller indices, solves the corresponding linear system of equations in reciprocal space, rejects unphysical cells, and finally performs a full refinement.
Linear System Formulation
The search is formulated as a system of linear equations based on the quadratic form:
$$ Q_{obs} = \sum P_i \cdot H_i $$
where $Q_{obs}$ are the observed $1/d^2$ values, $H_i$ are terms derived from trial Miller indices (e.g. $h^2$, $k^2$, $l^2$), and $P_i$ are the reciprocal lattice parameters (e.g. $A = 1/a^2$, $B = 1/b^2$, …).
CPU Searches (High Symmetry)
High-symmetry systems have fewer degrees of freedom and are solved instantly on the CPU.
- Cubic (1 parameter): Solves a 1×1 system by iterating through the first 12 observed peaks.
- Tetragonal & Hexagonal (2 parameters): Solves a 2×2 system using pairs of peaks from the first 12.
GPU-Accelerated Searches (Low Symmetry)
For Orthorhombic, Monoclinic, and Triclinic systems, the combinatorial explosion makes CPU searching impractical. Brutus offloads these tasks to the WebGPU, allowing billions of cells to be tested in minutes.
The Combinatorial Search Space
The total number of cells tested depends on two user-configurable parameters:
$$ N_{total} = C(N_{peaks}, k) \times C(N_{hkl}, k) \times k! $$
User Parameters
-
HKL Basis Size($N_{hkl}$): The size of the pool of simple Miller indices (e.g., (100), (110), (211)) used to form the mathematical basis.
Defaults: 300 (Ortho), 100 (Mono), 40 (Tri). -
Peaks to Combine($N_{peaks}$): This parameter determines the search's robustness against impurity peaks.The solver requires exactly $k$ peaks to find a solution (Ortho $k=3$, Mono $k=4$, Tri $k=6$). However, simply taking the first $k$ peaks fails if even one of them is an impurity or has a large error.
By increasing "Peaks to Combine" (e.g., to 7 for Monoclinic), Brutus tests every possible subgroup of 4 peaks drawn from those top 7. This allows the algorithm to "skip over" bad peaks automatically, but it increases the search time factorially (e.g., $C(7,4)=35\times$ more work).
-
FoM Tolerance: During the GPU search, the average of absolute difference between observed and calculated q is calculated on the first Peaks to Combine (or 10, whichever is larger). This is a crude estimation of the cell quality. If it passes the User error * FoM tolerance, the cell is saved as a candidate. A value of 1.0 means the fit matches the user error exactly. A larger FoM tolerance will generate more candidates.
Default: 3. -
Candidate (kCells): This is the size of the memory buffer reserved in the GPU.All the candidate cells are passed to the CPU for proper M(20) validation. The number of candidates is the size of this buffer (20 means 20 000 cells). If the number of candidates reaches the buffer size, the search is stopeed. A good balance needs to be found between the tolerance to allow a cell to be posted as a candidate and the size of the buffer. A larger buffer will allow more candidates but it will take more time to validate by CPU.
Default: 20.
System Specifics
- Orthorhombic (3 parameters): Solves combinations of 3 peaks. With defaults ($N_{hkl}=300, N_{peaks}=7$), tests ~936 million cells.
- Monoclinic (4 parameters): Solves combinations of 4 peaks. With defaults ($N_{hkl}=100, N_{peaks}=7$), it tests 35 peak subgroups × HKL combos × 24 permutations ≈ 3.3 Billion cells.
- Triclinic (6 parameters): Solves combinations of 6 peaks. Tests 720 permutations per combination. With defaults ($N_{hkl}=40, N_{peaks}=9$), tests ~232 Billion cells. These are the default parameters, the numbers can go up quickly.
GPU Memory Management & "Safe Batching"
Testing 50+ billion cells generates massive amounts of data. To prevent crashing your browser or freezing your computer, Brutus utilizes a sophisticated Safe Batching architecture.
The program automatically splits the work into smaller chunks based on a "Dual Constraint" logic:
- Hardware Limit (VRAM): The program detects your GPU's available memory. If you are on a mobile device or a laptop with integrated graphics, the batch size is automatically reduced to fit within your specific VRAM limits.
-
Time Limit (TDR Prevention):
On Windows, if a GPU calculation takes longer than ~2 seconds, the Operating System assumes the driver has frozen and resets it (causing a
DXGI_ERROR_DEVICE_HUNGcrash). Brutus enforces a strict "Speed Limit" (e.g., max 100,000 trials per batch for Triclinic) to ensure the GPU stays responsive.
What this means for you: You do not need to configure memory settings. If you see the progress bar moving in many small steps, the safety system is working correctly.
If the search is too slow: Adjusting technical settings for the GPU is not useful, or not a lot. Some parameters are listed in the Console (if you really want to play with the memory and chunk parameters... you may gain 50-100 msec, is it worth it ?). Instead, curate the peak list, reduce the physics parameters: lower theHKL Basis Sizeor reducePeaks to Combine.
Two-Stage Filtering
Most candidate cells are invalid. They are discarded directly on the GPU to save CPU time:
-
Geometric Filter:
Cells are rejected if they are singular, have unphysical edge lengths ($< 2Å$), invalid angles ($< 20^\circ$ or $> 160^\circ$), or exceed the user's
Max Volume. - Figure of Merit Filter: For surviving cells, the GPU calculates a fast internal score based on the match of the first 10 lines. Only the top candidates are sent back to the CPU for full refinement.
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 the hardware (WebGPU specifications) and practical time constraints.
The Hierarchy of Limits
The "Total Trials" displayed in the application is calculated as:
The HKL Combos count is the most critical hardware constraint. It maps directly to the number of GPU threads dispatched.
Since WebGPU uses 32-bit integers (u32) for indexing, this value must strictly remain below $2^{32}-1$ (approx. 4.29 Billion).
Brutus automatically calculates this limit based on your "HKL Basis Size" and prevents the search from starting if you exceed it.
System-Specific Breakdown
Each crystal system scales differently based on the number of parameters ($k$). The maximum safe HKL Basis Size ($N_{hkl}$) is determined by the Combinatorial formula $C(N, k) < 2^{32}$.
1. Triclinic ($k=6$)
- HKL Limit: You hit the 4.29 Billion safety wall at a Basis Size of 123. ($C(123,6) \approx 4.24 \times 10^9$).
- Permutations: $6! = 720$.
- Peak Multiplier: Using 20 peaks ($C(20,6)$) adds a factor of 38,760.
- Maximum Possible Trials: $$ 4.24 \times 10^9 \times 38,760 \times 720 \approx \mathbf{1.18 \times 10^{17}} \quad (118 \text{ Quadrillion}) $$
2. Monoclinic ($k=4$)
- HKL Limit: You hit the 4.29 Billion wall at a Basis Size of 568. ($C(568,4) \approx 4.29 \times 10^9$).
- Permutations: $4! = 24$.
- Peak Multiplier: Using 20 peaks ($C(20,4)$) adds a factor of 4,845.
- Maximum Possible Trials: $$ 4.29 \times 10^9 \times 4,845 \times 24 \approx \mathbf{5 \times 10^{14}} \quad (500 \text{ Trillion}) $$
3. Orthorhombic ($k=3$)
- HKL Limit: You hit the 4.29 Billion wall at a Basis Size of 2,954. ($C(2954,3) \approx 4.29 \times 10^9$).
- Permutations: $3! = 6$.
- Peak Multiplier: Using 20 peaks ($C(20,3)$) adds a factor of 1,140.
- Maximum Possible Trials: $$ 4.29 \times 10^9 \times 1,140 \times 6 \approx \mathbf{2.9 \times 10^{13}} \quad (29 \text{ Trillion}) $$
Practical Implications
Is the "Trials" number real?
Yes. It represents the total number of mathematical checks the GPU would theoretically perform.
However, Brutus uses a "Fail-Fast" optimization: most invalid cells are rejected after checking only the first 2 or 3 peaks,
meaning the GPU rarely performs the full calculation for every trial.
Can you actually run 120 Quadrillion trials?
Technically yes—the "Safe Batching" system prevents your computer from crashing. However, even at a speed of
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), you generally want to keep the Total Trials count under 100–500 Billion.
Tuning the Search & Troubleshooting
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. -
Increase GPU Parameters.
Try increasing
HKL Basis Size(e.g., from 80 to 120) orPeaks to Combine(e.g., from 7 to 9). This will significantly increase the search time but covers more combinations.
If you get too many solutions (GPU buffer fills)
The GPU buffer is limited (user selected up to 200k, default 20,000) candidate solutions. If this buffer fills up, the search stops earlier than the full space requested. If you have no solution that appears valid:
-
Tighten
2θ Error. This is the most effective way to reduce the number of false positives. -
Reduce
Max Volume. This is another strong constraint to remove unphysical large cells. -
Decrease GPU Parameters.
Reducing
HKL Basis SizeorPeaks to Combinewill run a smaller, faster search, but may miss the solution if it relies on a higher-index HKL or a peak further down the list.
GPU Buffers and Chunking
The total list of HKL combinations can be too large for a single GPU buffer. Brutus therefore:
-
Generates HKL combinations in large JavaScript chunks in
brutus.html. -
Further splits each of these into small “dispatch chunks” (e.g. 256 workgroups) in
webgpu-engine.jsbefore sending them to the GPU.
This two-level chunking avoids both memory overflow and long-running GPU commands.
Performance: WebGPU vs CPUCubic, Tetragonal, and Hexagonal searches run on the CPU (in a Web Worker) and are typically very fast (under a second).
Orthorhombic, Monoclinic, and Triclinic searches are offloaded to the GPU. This allows testing of billions of trial cells in a time frame (few minutes for 1 billion cells) that would be impractical on the CPU.
Note: at the end of a GPU search all candidates (up to 20 000) are passed to refinement, Niggli cell reduction, M(20) and F(N) calculations. These are made on the CPU so it might take a few minutes, be patient (or change the parameters, or decrease the number of peaks in the list).
Evaluating Solutions
The indexing search usually produces several candidate cells. Brutus keeps at most the best 50, ranked by M20, after the search. Selecting the correct one requires interpreting figures of merit and checking the refined fit.
de Wolff Figure of Merit: M(20)
The primary ranking indicator is the de Wolff Figure of Merit, M(20), calculated from the first 20 observed reflections. It combines both positional accuracy and completeness. In the PDF report additional values are listed, for instance F(20).
| M(20) value | Interpretation |
|---|---|
| > 20 | Very likely correct. |
| > 10 | Likely correct, provided the cell volume is chemically plausible. |
| 5–10 | Plausible; requires further inspection. |
| < 5 | Probably spurious; treat with caution. |
F(N) Figure of Merit
As a complementary metric, Brutus computes the F(N) figure of merit, usually with N = 20 (F(20)). While M(20) emphasizes the completeness of indexing, F(N) focuses on the average positional accuracy.
$$ F_N = \frac{N}{\langle |\Delta(2\theta)| \rangle \cdot N_{calc}} $$
- $N$ – number of observed lines used (e.g. 20).
- $\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 error. A solution with both high M(20) and high F(20) is usually reliable.
Least-Squares and Zero-Point Refinement
For each promising candidate, Brutus performs a two-stage refinement.
Stage 1: Internal zero-point correction
First, a constrained refinement is carried out including a zero-point error parameter.
This internal zero correction is limited by the user-defined 2θ Error, which allows
the algorithm to compensate for modest alignment errors without overfitting. The corrected
peak positions are then used to refine a stable baseline cell.
Stage 2: Final refinement (optional)
If the Stage-1 cell achieves a sufficiently high M(20) and the
Refine Zero-Point Error option is enabled, a second, full refinement (with an
unconstrained zero-point) is performed. This yields the final reported parameters and standard deviations.
If the option is disabled, the Stage-1 cell parameters are reported directly.
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.
Method
- Generate unique reflections. Using the refined cell, Brutus computes a complete list of theoretical reflections and keeps only crystallographically unique ones (e.g. it includes (100) but omits Friedel equivalent (−100)).
- Index observed peaks. All peaks in the curated list are indexed against the theoretical pattern.
-
Build a high-confidence subset.
To avoid ambiguity due to overlapping lines, Brutus retains only reflections for which no other
theoretical $(hkl)$ lies within the
2θ Errorwindow of the observed peak. - Determine centering and extinctions. This subset of unambiguous $(hkl)$ indices is compared with the extinction rules of candidate lattices (centerings and glide/screw symmetries). A rule is considered violated only if an observed unambiguous peak contradicts it.
- Rank space groups. Based on the crystal system and plausible centerings, the internal database is filtered. Each space group is assigned a violation count and ranked accordingly. The correct name of the space group is given, based on the orientation found by the program.
Interpreting the Output
- 0 violations: Ideal case. No unambiguous reflection breaks the extinction rules; these are the strongest candidates.
- 1–2 violations: Still plausible; minor violations can result from weak forbidden lines or experimental artifacts.
- Ambiguous peaks in italics: In the PDF report, peaks classified as ambiguous (and therefore excluded from extinction analysis) are printed in italics to distinguish them from the high-confidence subset.
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.
1. Swap Fishing for Ambiguity
For each promising solution, Brutus re-examines the indexing of the first four low-angle peaks. It identifies the two peaks closest in angle (a common source of mis-assignment) and creates a new hypothesis by swapping their HKL labels. The resulting cell is fully refined and rescored. If this swap resolves an ambiguity, the new solution might have a higher M(20) and this solution will be retained.
2. Matrix-Based Cell Transformations
Candidate cells are transformed using crystallographic matrices to test for related primitive or higher-symmetry descriptions. For example, a body-centered (I) cell can be mapped to an equivalent primitive (P) cell and evaluated.
3. HKL Divisor Analysis
The list of indexed HKLs is inspected for common divisors. If all indices along one axis (e.g. all h values) share a common factor, Brutus tests a cell with the corresponding axis shortened accordingly (sub-cell).
4. Orthorhombic–Hexagonal Relationship
A hexagonal lattice can sometimes be indexed as C-centered orthorhombic with $b/a \approx \sqrt{3}$. All orthorhombic solutions are checked against this condition, and potential hexagonal equivalents are generated and evaluated.
5. Niggli Cell Standardization
For each high-ranking solution, Brutus computes the Niggli reduced cell, i.e. the standardized primitive cell describing the same lattice.
The conventional (possibly centered) cell identified by the program is first converted to a primitive cell using the detected centering (e.g. I, F, C). A reduction algorithm is then applied to obtain the most compact set of basis vectors ($a, b, c$) and angles ($\alpha, \beta, \gamma$) satisfying the Niggli conditions.
The Niggli cell is useful for:
- Database searching: Different conventional cells that represent the same lattice reduce to the same Niggli cell, which can be used as a canonical key.
- Symmetry analysis: Niggli parameters correlate directly with Bravais lattices and crystal systems.
- Standardized reporting: It removes ambiguity when comparing unit cells between sources.
Niggli cells are included in the detailed section of the PDF report for each major candidate.
6. Final Sieving
After all transformations and refinements, Brutus applies a final de-duplication step. If two solutions have volumes within 1% of each other, the one with higher symmetry is preferred.
If their symmetry is identical (e.g. two monoclinic cells), M(20) is compared. Cells with M(20) values within a small tolerance (e.g. ΔM(20) < 0.05) are considered equivalent in quality and the first solution found is retained.
Troubleshooting & FAQ
Error: "WebGPU not supported in this browser"
This error indicates a software or configuration issue, rather than a lack of hardware capability. Even integrated graphics (like Intel UHD) support WebGPU if configured correctly.
- Unsupported Browser: WebGPU is currently best supported on Google Chrome (v113+) and Microsoft Edge.
- Outdated Drivers: Old graphics drivers are frequently "blacklisted" 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 / Special OS:
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. Look for "WebGPU". If it says "Software only" or "Disabled", the program will not work.
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 refined. A minimum of 15–20 clean peaks is recommended. For low symmetry, the first 10 peaks (largest d-spacings) must be especially reliable.
-
Incorrect parameters:
Check the wavelength, the selected
Radiation Preset, and theMax Volumevalue. -
GPU parameters are too restrictive:
The true solution might require HKLs or peaks beyond the default
HKL Basis SizeorPeaks to Combine. Try increasing these values. - Large zero-point error: Brutus can correct moderate misalignments, but very large zero errors may still prevent indexing.
- 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 can index only a subset of peaks and is penalized for being too sparse or too dense in calculated reflections.
-
High error / low resolution:
The
2θ Errorsetting may be too strict for broad peaks. Try slightly increasing it. - Spurious solution: Random solutions can fit a few peaks by chance. Always check whether major observed peaks are reproduced by the calculated pattern. If not, the solution is incorrect regardless of M(20).
Test Files
- The GitHub repository contains several example data sets:
- Monoclinic_test_1.xy – Synchrotron XRD, monoclinic, monochromatic radiation λ = 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 about 16.24° 2θ. A likely solution is cubic I with a ≈ 18.92 Å.
- SPDDRR1_sample2_0692.xy – Round-robin data measured at Daresbury, λ = 0.692 Å. Probable 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 (these datafiles were taken from GSAS-2 tutorials).
- P-1_sim_5_6_7_86_91_96.txt – Simulated powder pattern for a P−1 lattice, λ = 1.7 Å, a = 5.0 Å, b = 6.0 Å, c = 7.0 Å, α = 86.0°, β = 91.0°, γ = 96.0° (volume of 208.29 A^3)
References
Brutus was developed by Nita Dragoe at Université Paris-Saclay (2024–2025) 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.13443.57126
For further background on the methodology, the following references are recommended:
-
M(20) 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. -
Deconvolution Algorithm (Richardson-Lucy):
Richardson, W. H. (1972). “Bayesian-Based Iterative Method of Image Restoration.” Journal of the Optical Society of America, 62, 55–59.
Lucy, L. B. (1974). “An iterative technique for the rectification of observed distributions.” The Astronomical Journal, 79, 745. -
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. -
Previous software
Dragoe, N. (2001). “PowderV2: A Suite of Applications for Powder X-Ray Diffraction Calculations.” Journal of Applied Crystallography 34, 535.