Lucy
Haddad
*ab,
Diego
Gianolio
b,
David J.
Dunstan
a,
Ying
Liu
a,
Conor
Rankine
c and
Andrei
Sapelkin
a
aQMUL, Mile End Road, London E1 4NS, UK. E-mail: apw813@qmul.ac.uk
bDiamond Light Source, Diamond House Harwell Science & Innovation Campus, Didcot OX11 0DE, UK
cDepartment of Chemistry, University of York, Heslington, York, YO10 5DD, UK
First published on 16th February 2024
Analysis of the extended X-ray absorption fine structure (EXAFS) can yield local structural information in magic size clusters even when other structural methods (such as X-ray diffraction) fail, but typically requires an initial guess – an atomistic model. Model comparison is thus one of the most crucial steps in establishing atomic structure of nanoscale systems and relies critically on the corresponding figures of merit (delivered by the data analysis) to make a decision on the most suitable model of atomic arrangements. However, none of the currently used statistical figures of merit take into account the significant factor of parameter correlations. Here we show that ignoring such correlations may result in a selection of an incorrect structural model. We then report on a new metric based on Bayes theorem that addresses this problem. We show that our new metric is superior to the currently used in EXAFS analysis as it reliably yields correct structural models even in cases when other statistical criteria may fail. We then demonstrate the utility of the new figure of merit in comparison of structural models for CdS magic-size clusters using EXAFS data.
This new class of nanoscale systems pushes XAS capabilities to the limit both in terms of the quality of the data required and of analysis methods for the two key parts of the X-ray absorption spectrum: X-ray absorption near edge structure (XANES) and extended X-ray absorption fine structure (EXAFS). The former is sensitive to the symmetry around the absorbing atom of interest (e.g. Cd in CdS MSCs6) and its oxidation state, while the latter provides information about local coordination numbers, interatomic distances and local atomic dynamics (see Fig. 1).
Analysis of EXAFS data typically involves background subtraction and normalisation followed by theoretical EXAFS calculations for a selected structural model (or a selection of model structures), comparisons of the calculated spectrum with the data and parameter refinement to obtain the best fit and the corresponding structural information.7,8 Theoretical calculations and subsequent refinement are some of the most crucial steps and require a suitable atomistic model, thus implying some prior knowledge of the atomic structure or having an informed guess (e.g. based on molecular dynamics, DFT calculations or similar material, etc.). Recovering atomic structure of MSCs puts particularly stringent demands on model comparison in EXAFS because local atomic arrangements can be quite similar.9 When theoretical and experimental spectra are compared, in most EXAFS analysis programs (such as Artemis10 and Larch11) there are a number of figures of merit (FoMs) available to provide quantitative model evaluation to answer the question of whether the model is a suitable match for the experimental data. However, none of the commonly used FoMs take into account parameter correlation. At the same time, it is well-known12–14 that correlation can have significant negative consequence on data refinement (i.e. larger errors) and, most importantly, on model verification and selection.
This shortcoming of the EXAFS FoMs has long been recognised as a problem and in the latest development of the Artemis (one of the most commonly used EAXFS analysis package) a heuristic “happiness parameter” is offered to provide in-code indication of the fit quality. This parameter is based on decades of EAXFS analysis experience and includes, with varying weighting, an R-factor (a numerical measure of how well the fit over-plots the data), penalties for parameter correlations, restraints, the number of independent parameters, etc.15 While recognised as an important guide during data analysis, being a heuristic parameter, it has no firm basis in statistics and therefore cannot be quoted in publications.
In this article we introduce for the first time in EXAFS analysis an FoM that explicitly includes parameter correlations – the Bayes factor integral (BFI).16 We use EXAFS data for crystalline Ge at low temperature to demonstrate that the BFI is more sensitive than the typical FoMs used for EXAFS analysis to model choice. We then demonstrate that the BFI consistently points towards the correct structure as preferred model. We then use the BFI to compare a selection of models for a material with unknown structure: CdS magic sized clusters (MSCs 311 and 322).5,6,17 With these examples, we introduce the BFI as a numerical metric for quantifying intuition in EXAFS model comparison.
The first is the well-known statistical value characterising the residuals between the model and experimental data. It is a simple statistical measure of how small the fit residuals are:
i.e. how closely does the model fit the data, however, it is has been well-established that the number of independent variables (fitting parameters) can significantly influence the value of χ2. The total number of parameters available in EXAFS analysis is limited by the sampling theorem of the Fourier analysis18 (this is also known as the Nyquist criterion/theorem in EXAFS community). Therefore, the most commonly reported fitting statistic in EXAFS is the so-called reduced chi-squared, χν2, based on χ2 but with a modification to include normalisation of χ2 by degrees of freedom such that once the maximum number of free parameters allowed for the data (Nind) is reached,18 it will become negative and provides a clear indication of over-fitting. The R-factor is another variation of the χ2 criterion with a different normalisation factor.
The AIC and BIC are not found in Artemis, but are used as FoMs in Larch11 to aid model comparison: both are based on the Likelihood function (rather than χ2) while also including a penalty term for adding parameters to the model (adding fitting parameters to a model—physically meaningful or not—normally increases the likelihood of the model while reducing the probability that the model is correct).
There are a number of problems with the figures of merit described above. They treat all parameters alike, whether physically-meaningful or not. Apart from the number of parameters approaching Nind, there is not much help from these FoMs to tell whether one has a physically meaningful fit. Crucially, none of them include parameter correlations, while it is well documented12–14 that parameter correlations indicate over-fitting and have significant consequences on the refinement errors and model selection. For example, in EXAFS analysis it is well-established that there exist correlations between fitting parameters even when Nind18 is not exceeded.7,11,19–21 Both Artemis and Larch do provide functionality to calculate parameter correlations, but these are almost never used to assess the quality of the fit nor to aid model justification or selection. To compensate for that and to help guide users during the refinement in Artemis there is an inbuilt FoM that does include correlations: the Happiness parameter.15 However, it cannot be reported in publications since it has no mathematical basis: it is an empirical FoM that can be adjusted between fits to accord with the user's preferences. Hence, there is a need for a FoM rooted in statistics that does include parameter correlations.
![]() | (1) |
![]() | (2) |
![]() | (3) |
![]() | (4) |
![]() | (5) |
Here we propose a simple alternative FoM that requires only trivial modifications to the statistical procedures already existing in EXAFS analysis. We note that the multidimensional integral on the far right of the eqn (5) constitutes the volume in the parameter distribution space. We also note that Covp is symmetric positive definite, hence its diagonalization involves basis rotation. However, the volume (and also det(Covp)) does not change under rotation of the parameter space required for the transformation to the orthonormal basis. Hence, the following expression normally corresponding to the orthonormal parameter set can be used for calculation of P(D|Mi,I)—Bayes factor integral (BFI)—for a model with parameter correlations present:16
![]() | (6) |
![]() | (7) |
• <1 – barely worth considering,
• 1–2 – substantial,
• 2–5 – strong evidence,
• >5 – decisive.
We proceed below by testing this approach on a reference data set (crystalline Ge, c-Ge) before applying the procedure to the magic size clusters of CdS.
Three structural models have been selected for comparison: (i) the actual structure of crystalline Ge at 12 K known to be a 4-coordinated face-centered diamond cubic type;28,32 (ii) 6-coordinated high-pressure Ge phase VI structure (Cmma, model 2); (iii) 6-coordinated high pressure β-Sn structure of Ge33 (I4/amd, models 3a, 3b). For model 3 two different refinements were carried out: one (model 3a) was for a single shell of 6 nearest neighbours, while for the other (model 3b) 3 shells of 2 atoms were used to reflect the actual nearest neighbour configuration in the β-Sn structure. This was also used to gauge the effect on the BFI of increasing the number of model parameters.
To enable a fair model comparison, for each model we only looked at the first peak in the R-space (corresponding to the GeGe bond length of 2.45 Å; the atomic shell structure beyond the first shell is very different in the three selected models) and we used single-scattering paths only (see Fig. 2). The data were fitted over the range of 2.00 Å−1 < k < 22.93 Å−1 in k-space (see Fig. 2). This ensured that only the first-shell EXAFS were fitted. Parameter ranges are given in Table 1 and are defined as follows. The amplitude reduction factor S02 corrects for inelastic effects in the absorbing atom.34 This is empirically established to be in the range 0.8–1, and is well-covered by 0.5 range. The shift in the edge position E0 accounts for errors in experimental calibration and for empirical convention in determination of the absorption edge position7,19—the range typically does not exceed 10 eV. Relative change in the nearest-neighbor interatomic distance ΔR is not expected to exceed 10% as the interatomic distances are determined by the covalent radii of elements and the pressure temperature conditions (as an example, 10% bond length variation is well above that expected on melting or under pressures as high as 10 GPa in a typical semiconductor material such as Ge29). Mean squared relative displacements of atoms due to atomic vibrations σ2 (and static disorder, if any) accounts for damping effects on χ(k). The initial value can be calculated using e.g. correlated Debye or Einstein approximations35–37 and for c-Ge at 12 K this is around 0.003 Å2 (ref. 26) hence the range of ±0.003 is selected to make it positive-definite. The number of nearest neighbours N was set according to the structural models and was not refined.
Parameter | Initial value | Range |
---|---|---|
S 0 2 | 0.9 | 0.5 |
E 0 | 0 | 10 |
ΔR | 0 | 0.1 |
σ 2 | 0.003 | 0.006 |
For model 1 (zinc blende structure), one single-scattering single-shell path was used to fit the spectrum. For model 2 (the high-pressure Cmma structure), the spectrum was fit with 3 single-scattering single-shell paths between (in total) 6 atoms in the first shell to describe the signal. For (β-Sn) model 3a, one single-scattering single-shell path was used at first, and then 3 single-scattering first shell paths were used (model 3b).
The summary of the results for the ln(BF) (the difference between ln(BFI) values) are shown in Fig. 3 and Table 2. One can see that model 1 is favoured over all other models except for 3a (the single path β-Sn fit): the ln(BF) between model 1 and all other models (except 3a) are found to be >3 providing strong evidence for model 1 being the preferred structure. The lnBF value between model 1 and 3a is 0.67 is slightly in favour of model 1 but not statistically significant according to the criteria outlined at the end of the previous section. However, the currently available fitting statistics FoMs found in the corresponding tables† favour other models: model 2 has lowest χ2 and χν2, model 3b has the lowest value of R-factor, while AIC and BIC favour model 2 over model 1. This shows that reliance only on the currently used FoMs in EXAFS analysis can lead to an incorrect atomic structure model as the best solution. At the same time, we see that the BFI is able to deliver the correct result in this relatively complicated case – after all we used a single peak only in the EXAFS FT magnitude in order to differentiate between the models. Having verified the utility of the proposed BFI-based FoM in case of the reference system, in the next section we apply the Bayes approach to analysis of EXAFS of MSCs.
Model | Ln(BFI) |
---|---|
1 | −6.65 |
2 | −10.07 |
3a | −7.32 |
3b | −10.22 |
K-Space noise (εk) was evaluated from the signal between 6.50 Å−1 < k < 18.30 Å−1 and the fit to the EXAFS data was carried out in the region 2.50 Å−1 < k < 15.0 Å−1, parameter ranges for the BFI calculations are shown in Table 3. The results of the fit are shown in the Table 4. The BFI-based FoMs support ZB and WZ structures significantly over the NaCl-like and cmcm models. This is consistent with our previous results where XPDF analysis of bulk CdS (and of regular CdS quantum dots) has shown CdS to be a mix of ZB and WZ structures.5
Parameter | Initial value | Range |
---|---|---|
ΔR | 0 | 0.1 |
E 0 | 0 | 10 |
S 0 2 | 0.9 | 0.5 |
σ 2 | 0.006 | 0.006 |
Model | Ln(BFI) |
---|---|
ZB | −0.738 |
WZ | −1.31 |
NaCl-like | −2.04 |
cmcm | −2.31 |
The MSCs under investigation in this work are CdS. These MSCs exhibit a sharp UV-vis absorption peak at 311 nm (MSC 311) but when heated to 60 °C (ref. 4) this peak shifts to 322 nm (MSC 322)6 and the shift is accompanied by atomic structure rearrangement as indicated by X-ray pair distribution function (xPDF) and XAS analysis.5,6 Due to their small size leading to the lack of long-range order, establishing the atomic-level structure of MSCs is challenging41 and in this work we examine the sensitivity of our new EXAFS BFI-based FoM to the structural model selection. To this end we compared 4 models as candidates of possible structures of MSCs 311 and 322: (i) Cd40S19 with ZB structure, (ii) Cd40S20 with WZ structure, (iii) Cd33S32 β-Sn-like structure and (ii) Cd37S20 with an InP-like structure. The rationale for the model selection is as follows:
(i) Bulk CdS can possess WZ or ZB structure (while regular CdS quantum dots are known to exhibit both characters5). Hence, when constructing a model for an unknown atomic structure of MSCs, the atomic arrangement found in the bulk can be a starting point if there is no other information (this is frequently the case).
(ii) It has been observed29 that average interatomic distances in small nanoparticles can be reduced compared to their bulk counterparts. This can be interpreted as an effective pressure on these systems. Such compression may results in distortion towards the β-Sn structure,42 hence it is reasonable to use it as one of the structural models.
(iii) It has recently been shown that an InP-like structure43 provides the best fit to PDF5 data in CdS MSCs.
All clusters (except for InP-like cluster where the structure from our recent work5,6 was used) have been cut as spherical regions of appropriate size from the corresponding bulk crystalline structure and were terminated with oxygen. This followed by the cluster geometry optimisation where we used two approaches: standard classical Universal Force Field44 available in Avogadro45 and via ab initio density functional theory methods using CP2K. In doing so we pursued two goals: comparison between classical and ab initio methods and evaluation of quantum effects in geometry relaxation in MSCs. Indeed, a number of recent investigations suggest that classical force fields may not always be appropriate in description of interatomic interactions in small nanoclusters46 with some work showing sensitivity of local atomic dynamics in EXAFS to potential selection.47 In the case of CP2K MOLOPT Cd basis set was used for Cd atoms (the excited atoms in the simulation) and for the S and O atoms a pseudo potential (DZVP-MOLOPT-GTH) was used. Again, since the InP-like structure has been experimentally obtained no further optimization was applied to it.
EXAFS data analysis has been carried out in Larch11 and Mathematica 13.0 (for BFI calculations). The initial parameter values and their ranges for all models are given in Table 3 (if the standard errors returned by Larch exceed the half range set for Δpi terms, the range is corrected to 2 × standard error). While at low temperatures (90 K in our case) 3rd cumulants for the atoms in the bulk of a nanoparticle are expected not to be significant, this may not be the case for the surface Cd–O coordination shell. The ln(BFI)s for and ln(BF)s between the candidate models were calculated using the same method as in the Ge model comparisons with the fits carried out in the range of 2–16 Å−1, 2–14 Å−1 for MSC 311 and 322 respectively. For the noise value used in EXAFS χ, χν2 calculations we used the standard deviation of the k space spectra for the MSC 311 and 322 data at 14.50–15 Å−1 and 13–14 Å−1 respectively, with scattering paths up to near 4 Å fitting up to the second peak in R-space corresponding to Cd–Cd scattering path close to 4 Å.
The results for ln(BFI) for relaxed model clusters for 311 and 322 MSCs are given in the Tables 5 and 6 below and summarised in Fig. 5 (where shades are used to differentiate between various structures according to the classification proposed at the end of the Methods section). One can see that for the MSC 311 and the models optimised with UFF it is ZB and InP-like models that fall within the category of “strong evidence” (i.e. ln(BF) > 2) with InP-like structure having slight advantage. The result is almost identical for DFT-based optimisation with ZB structure coming slightly on top in the ranking. For MSC 322 the results show the β-Sn-like structure being ranked the highest in both UFF and DFT cases (this is consistent with the results of our recent work6). We can also conclude, that both UFF and DFT-based geometry optimisations, although show small quantitative differences in model ranking, ultimately yield very similar results.
Model | Ln(BFI) |
---|---|
(a) ln(BFI) values for UFF optimized models, MSC311. | |
Zinc blende | −3.0387 |
β-Sn | −4.2649 |
InP-like | −2.7893 |
Wurtzite | −5.0384 |
(b) ln(BFI) values for DFT optimized models, MSC311. | |
Zinc blende | −2.6579 |
β-Sn | −6.1064 |
InP-like | −2.7893 |
Wurtzite | −4.3887 |
Model | Ln(BFI) |
---|---|
(a) ln(BFI) values for UFF optimized models, MSC322. | |
Zinc blende | −3.4749 |
β-Sn | −2.03393 |
InP-like | −3.8476 |
Wurtzite | −6.3588 |
(b) ln(BFI) values for DFT optimized models, MSC322. | |
Zinc blende | −3.9762 |
β-Sn | −2.8193 |
InP-like | −3.8476 |
Wurtzite | −5.2444 |
Thus, our findings indicate that the new FoM: (i) is pointing to the InP-like and ZB models as the most probable structures for MSC 311; (ii) pointing to β-Sn-like structure as a model for MSC 322; (iii) is detecting the difference between the EXAFS data of the two MSCs (as reflected in changing values of FoM and model preferences). This is a very significant finding considering the differences between the EXAFS signals for MSC 311 and 322 are very small (see Fig. 4) and the corresponding χ2-values are also quite close (see ESI†). The preference for InP-like structure for MSC 311, and for β-Sn-like for MSC 322 is consistent with our previous work5,6 where it was shown to provide the best model to fit xPDF, EXAFS and XANES data. Thus, the result provide very strong support to using the new Bayesian FoM as a universal metric for model comparison and selection.
![]() | ||
Fig. 5 Charts of the results for each MSC, darker colours indicate a higher statistical significance of the favoured model. |
So far we utilised identical parameter ranges for all models of interest in all our tests (except for the range correction when the standard error ≥1/2Δpi). Imposing model-specific constraints on parameter ranges routed in microscopic physics (e.g. from molecular-dynamics or ab initio simulations) in the calculation of BFI values should be an interesting direction to pursue. The results also show that the choice of cluster geometry optimization method has influence (albeit small) on the BFI-based model ranking—this should be a another avenue of study.
We note that the current approach is so far limited by the requirement of providing initial guess structures, while the ultimate goal of structural analysis of MSCs (and of nonperiodic/nanoscale systems in general) is developing new structural models for materials with unknown structures. Hence, further development of our approach should include automation of the BFI calculation to be used to inform model evolution in a variety of structure searching methods.9,48
Footnote |
† Electronic supplementary information (ESI) available. See DOI: https://doi.org/10.1039/d3nr05110b |
This journal is © The Royal Society of Chemistry 2024 |