To define the geometry contribution of the merit function, a set of geometry residuals, G s , for structure s, are determined from deviations in unit cell parameters and fractional atomic coordinates in the asymmetric unit cell. The residuals relating to unit cell geometry (denoted by the vector X s ) include lattice variables (cell lengths and angles) which are independent and are unconstrained as a result of space group symmetry. The lattice variables are a subset of the geometric variables (i.e., X s ⊆ Ω s ). The number of such unit cell parameters is denoted N X,s and is dependent on the lattice type (e.g., triclinic, monoclinic, etc.) of the crystal. These residuals are measured as relative deviations from the reference structure and normalised by the square root of the number of residuals of this type,