Whole pair distribution function modeling: the bridging of Bragg and Debye scattering theories

The whole pair distribution function modeling method is introduced to overcome the distinction between Bragg and Debye theories in analysis of powder-scattering data. Models based on Bragg’s law are used to facilitate the computation of a whole pair distribution function followed by the solution of the Debye scattering equation.

Supporting information S1. Crystal shape and size dispersions The dispersion of the crystal shapes and sizes is captured via combination of the contributions from the different sample fractions. For any given crystal with shape , the common volume function (CVF), ( , ), is normalized with the shape volume ∀ , such that ( = 0, ) = 1, where is the pair-distance, and is the size of the crystal. Therefore, besides to account for the probability of observing a crystal with a given shape and size, ( ), the contributions to the pair distribution function are weighted with the reciprocal of the crystal volumes as, where = ∀ ⁄ is a constant dependent on the crystal shape. The size-distribution can be convoluted with the CVF for any given shape as, where ( ) is the probability distribution function ( Figure S2). To facilitate the solution of the integrals, the CVF can be approximated with a polynomial function with coefficients , as, Given piecewise polynomial functions with two intervals are better suited to approximate the CVF of concave and non-regular shape, Eq. S3 becomes where , and , are the polynomial coefficients for the two consecutive intervals, and and are characteristic shape constants.

S2. Algorithm parallelization
The modeling of both the intensity profile and the pair distribution function (PDF) is performed through three subsequent computing stages ( Figure S4).

S2.1. Estimation of the directional-pair distribution function (D-PDF)
In this stage, synchronous and asynchronous operations are performed by different CPU threads. Child processes synchronize to retrieve the directional parameters from the master process, which computes the independent directions using a serial IUCrJ (2021). 8 algorithm. The child threads compute the D-PDFs without any synchronization, inherently balancing their workload. A pair of per-thread memory arrays are updated with the estimated probability counts and the difference between actual and recorded pair-distances.

S2.2. Solution of the whole pair distribution function (WPDF)
The data collected by each thread in the first stage are collected. The estimated probabilities and pair distance differences are summed. The recorded pair distances are, then, corrected.
Asynchronous computing processes perform this task for a different set of pair-distances (i.e., non-empty memory locations).

S2.3. Modeling of the scattering profiles
Experimental-like scattering profiles are computed: the intensity profile via Debye scattering equation (DSE), and the PDF resampling the high accuracy whole PDF. Both the scattering profiles are corrected to match the corresponding experimental representation (e.g., removal of the small-angle contribution to the PDF, and rescaling with the pair-distance).
Figure S1 Interpolation of tabulated common volume functions. A, projection on a unit-sphere of the directions for which are recorded the CVFs. In case the correlation between a site and its own repetition is considered, the complete set (black dots) is inferred from a subset in the first octant (red dots). A triangular sector from the sphere surface is mapped with an RGB color scheme using the barycentric coordinates as the R, G, and B factors. B, C, and D, variation of the CVF interpolated along the edges of the triangular sector. E, Interpolation of the two-intervals piecewise CVFs tabulated for the directions associated with the triangular sector corners. In B to E, the intervals into which the CVFs are divided are marked (gray line). Note that the CVFs for the sector corners are only example profiles, and they were not computed from any shape. ⁄ site is shown to intersect also the site (3,4,0) 5 ⁄ that belongs to the service lattice system. The same site type repeat along the [uvw] direction at constant step intervals with coprime triplet (3,4,0) the step interval in the crystalline lattice system. Figure S4 Algorithm parallelization. Computing stages used to model both the intensity profile and the pair distribution function (PDF).

Figure S5
Map of the library of shapes for which the CVF coefficients were tabulated. The CVF coefficients were computed for a set of polyhedral shapes bounded by a single family of planes (hkl indices in the map) and for a set of truncated cubes with 200 degrees of truncation. The shapes were separated into homogeneous groups (I to IX) according to the set of edges and corners angles. The shapes are colored according to the surface-to-volume ratio (color bar) assuming the polyhedral crystals with volume 10 3 nm 3 . The CVF coefficients were calculated for 163 positively defined independent directions described by triplets of integers with none index larger than 9 (2000 data point per direction). The values were interpolated either with a single cubic or a pair of cubic functions. The data were formatted to be compatible with the software package PM2K. Because of size limitation, the complete data set is available on request.
Table S1 Analytical expression of the common volume functions (CVF). Unless for the sphere shape, the CVF is a function of the observed direction ( , , ) positively defined in a Cartesian space such as ‖ , , ‖ = 1. Whereas for the cube, the tetrahedron, and the octahedron the direction components are reordered such that ≥ ≥ ≥ 0, for the cylinder and hexagonal prism is aligned with the shape axes and is normal to a pair of opposite hexagonal sides. The cube and octahedron shapes are assumed to be bounded by {1,0,0} and {1,1,1} planes, respectively. The tetrahedron is assumed to be bounded by the (1,1,1), (1, 1 , 1 ), (1 , 1, 1 ), and (1 , 1 , 1) planes. Depending on the shape, is: the diameter of the sphere; the edge length of the cube, the tetrahedron, and the octahedron; the height and the base diameter of the cylinder, or distance between a pair of opposite sides of the hexagonal prism. The equations are written for 0 ≤ ≤ ⁄ . The CVF for the hexagonal prism split into two pieces at = * ⁄ .

Shape
Case