Skip to content
XRD Analyzer

6. CIF Phase Identification

Learn how XRD Analyzer simulates diffraction patterns from crystal structures and calculates phase match scores.

Diffraction Pattern Simulation

Phase matching relies on comparing your experimental diffraction pattern against simulated reference patterns. Our tool uses the gemmi library to parse Crystallographic Information Files (CIF) and compute theoretical Bragg reflections.

Mathematical Simulation Steps

The simulation process involves three key steps:

  • 1. Unit Cell Reflections Search: We query the unit cell dimensions ($a, b, c, \alpha, \beta, \gamma$) and space group symmetry to find all possible reflecting planes ($h, k, l$) within the scanned $2\theta$ range.
  • 2. Structure Factor Calculation: The intensity of each reflection is determined by its structure factor (Fhkl), which calculates how waves scatter from the different atoms in the unit cell:
    F_hkl = Sum_j( f_j · exp(2πi · (h·x_j + k·y_j + l·z_j)) · T_j ) Where $f_j$ is the atomic scattering factor and $T_j$ is the temperature factor.
  • 3. Lorentz-Polarization Correction (LP): The raw intensity is corrected for the geometry of the diffractometer and the polarization of the X-ray beam:
    LP(θ) = (1 + cos²(2θ)) / (sin²(θ) · cos(θ))

The Phase Matching Algorithm

To evaluate how well a reference phase matches your experimental pattern, we calculate a Figure-of-Merit (FOM) score. The algorithm compares the positions of the experimental peaks to the simulated reflections:

Find closest simulated reflection for each experimental peak.
If Delta_2Theta < 0.3°:
  Score += Intensity_relative * (1 - Delta_2Theta / 0.3)
Calculate FOM = Matched_Peaks / Max(Exp_Peaks, Sim_Peaks)
Figure 6.1: Workflow of the Figure-of-Merit (FOM) calculation.

Matching Score Interpretation

The matching score ranges from 0% (no matching peaks) to 100% (perfect alignment of all peaks). A score above 75% indicates a strong phase match, while lower scores suggest the presence of secondary phases or significant lattice strain.