원시데이터 수집 시스템
선정목록으로

Use of Bayesian Inference in Crystallographic Structure Refinement via Full Diffraction Profile Analysis

간접 관련 화학·수지 · (21) 에폭시수지 (10) 아라미드(16) CPI(투명 폴리이미드)

기본 정보

저자
  1. Chris M. Fancher — Department of Materials Science and Engineering, North Carolina State University, Raleigh, North Carolina 27695, USA|||Department of Materials Science and Engineering, North Carolina State University, Raleigh, 27695, North Carolina, USA
  2. Zhen Han — Department of Statistics, North Carolina State University, Raleigh, North Carolina 27695, USA|||Department of Statistics, North Carolina State University, Raleigh, 27695, North Carolina, USA
  3. Igor Levin — Materials Measurement Science Division, National Institute of Standards and Technology, Gaithersburg, Maryland 20899, USA|||Materials Measurement Science Division, National Institute of Standards and Technology, Gaithersburg, 20899, Maryland, USA
  4. Katharine Page — Neutron Scattering Science Directorate, Oak Ridge National Laboratory, Oak Ridge, Tennessee 37831, USA|||Neutron Scattering Science Directorate, Oak Ridge National Laboratory, Oak Ridge, 37831, Tennessee, USA
  5. Brian J. Reich — Department of Statistics, North Carolina State University, Raleigh, North Carolina 27695, USA|||Department of Statistics, North Carolina State University, Raleigh, 27695, North Carolina, USA
  6. Ralph C. Smith — Department of Mathematics, North Carolina State University, Raleigh, North Carolina 27695, USA|||Department of Mathematics, North Carolina State University, Raleigh, 27695, North Carolina, USA
  7. Alyson G. Wilson — Department of Statistics, North Carolina State University, Raleigh, North Carolina 27695, USA|||Department of Statistics, North Carolina State University, Raleigh, 27695, North Carolina, USA
  8. Jacob L. Jones — Department of Materials Science and Engineering, North Carolina State University, Raleigh, North Carolina 27695, USA|||Department of Materials Science and Engineering, North Carolina State University, Raleigh, 27695, North Carolina, USA
DOI
10.1038/srep31625
저널
Scientific Reports
발행년도
2016
발행기관
Nature Portfolio
피인용수
27
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1038/srep31625
토픽
Electron and X-Ray Spectroscopy Techniques
OpenAlex ID
W2510431877

평가 내용

관련도
간접 관련
사업분야
화학·수지 · (21) 에폭시수지
부 분야
(10) 아라미드, (16) CPI(투명 폴리이미드)
R&D 측면
분석·모델링
확신도
0.70
근거 용어
X-ray diffraction, Crystallographic structure refinement, Bayesian inference, Rietveld method, Uncertainty quantification
판단 근거
본 논문은 X선 회절(XRD) 데이터를 활용하여 결정 구조를 정밀하게 분석하고 불확실성을 정량화하는 베이지안 통계 방법론을 다룹니다. 이는 코오롱인더스트리의 고분자(에폭시, 폴리이미드) 및 아라미드 등 결정성 소재의 미세 구조 및 물성 분석 기법에 응용될 수 있습니다.
R&D 활용 포인트
에폭시 수지, 아라미드, CPI 등 결정성 고분자 소재의 결정 구조, 결정 크기 및 미세 변형(microstrain)을 정밀하게 분석하여 품질 관리 및 물성 예측 모델링에 활용 가능합니다.
평가 입력
본문 55,995자 중 30,032자 발췌

초록

초록이 없습니다.

본문 55,995자

본문 펼치기
## OPEN received: 28 April 2016 accepted: 22 July 2016 Published: 23 August 2016 # Use of Bayesian Inference in Crystallographic Structure Refinement via Full Diffraction Profile Analysis Chris M. Fancher <sup>1</sup> , Zhen Han <sup>2</sup> , Igor Levin <sup>3</sup> , Katharine Page <sup>4</sup> , Brian J. Reich <sup>2</sup> , Ralph C. Smith <sup>5</sup> , Alyson G. Wilson <sup>2</sup> & Jacob L. Jones <sup>1</sup> A Bayesian inference method for refining crystallographic structures is presented. The distribution of model parameters is stochastically sampled using Markov chain Monte Carlo. Posterior probability distributions are constructed for all model parameters to properly quantify uncertainty by appropriately modeling the heteroskedasticity and correlation of the error structure. The proposed method is demonstrated by analyzing a National Institute of Standards and Technology silicon standard reference material. The results obtained by Bayesian inference are compared with those determined by Rietveld refinement. Posterior probability distributions of model parameters provide both estimates and uncertainties. The new method better estimates the true uncertainties in the model as compared to the Rietveld method. X-ray diffraction is a powerful technique for characterizing the atomic structure of materials. Diffraction relies on scattering of X-rays from planes of atoms resulting in either constructive or destructive interference. Figure 1 shows example peaks observed in diffraction patterns, and the inset is a schematic of X-ray scattering from planes of atoms that results in constructive interferences. The constructive interference is observed in the diffraction pattern as intensity vs scattering angle (2 _θ_ ). Over the past 100 years a variety of approaches have been developed to determine and refine the crystallographic structure from single crystal and powder diffraction patterns <sup>1,2</sup> . The pervasive application of these approaches is evidenced by over 200,000 structures being cataloged in the International Centre for Diffraction Data Database. Moving forward, X-ray techniques and analysis methods will continue to advance, particularly in the areas of combining data from different experimental or theoretical sources <sup>3</sup>, and _in situ_ measurements during materials’ processing or performance <sup>1,2,4</sup> . It is also expected that new crystallographic structures will be used in global materials databases for property prediction, as articulated by the Materials Genome Initiative (MGI) <sup>5,6</sup> . In diffraction, observed intensities ( _Yi_ ) at angle 2 _θi_ can be represented as intensities from the material of interest ( _f_ (2 _θi_ | _α_ )), background scattering ( _b_ (2 _θi_ | _γ_ )), and errors ( _εi_ ), where _i_ represents the _i_ <sup>_th_</sup> data point in the measurement range. We write the observed intensity as _Y_ _i_ = _f_ (2 _θi_ _α_ ) + _b_ (2 _θi_ _γ_ ) + _εi_ . (1) Here _α_ is a collection of structural, microstructural, and instrumental parameters that determines the scattered intensity from a sample, and _γ_ are parameters used to construct the background scattering. Most current approaches in crystallographic refinement infer the structure by minimizing the difference between a calculated and experimental pattern. The difference is minimized by adjusting model parameters. One example is the Rietveld method <sup>7,8</sup>, in which the structure is refined in a least-squares (LSQ) minimization routine using a weighted sum of squares residual: 1Department of Materials Science and Engineering, North Carolina State University, Raleigh, North Carolina 27695, USA. <sup>2</sup> Department of Statistics, North Carolina State University, Raleigh, North Carolina 27695, USA. <sup>3</sup> Materials Measurement Science Division, National Institute of Standards and Technology, Gaithersburg, Maryland 20899, USA. <sup>4</sup> Neutron Scattering Science Directorate, Oak Ridge National Laboratory, Oak Ridge, Tennessee 37831, USA. 5Department of Mathematics, North Carolina State University, Raleigh, North Carolina 27695, USA. Correspondence [and requests for materials should be addressed to J.L.J. (email: jacob_jones@ncsu.edu)](mailto:jacob_jones@ncsu.edu) Figure 1. Example peaks observed in an X-ray diffraction pattern and schematic of X-ray scattering from atoms. Constructive interference of X-rays scattered from planes of atoms results in observed peaks at various scattering angle (2 _θ_ ), which is characteristic of the interplanar spacing. The inset is a schematic illustration of X-rays incident at an angle _θ_ that results in constructive interference from a periodic array of atoms at an angle _θ_ from the plane of atoms. 2 ∑ <u>[</u> _<u>Yi</u>_ <u>−</u> <u>(</u> _<u>f</u>_ <u>(2</u> _<u>θi</u>_ _<u>α</u>_ <u>)</u> <u>+</u> _<u>b</u>_ <u>(2</u> _<u>θi</u>_ _<u>γ</u>_ <u>))]2</u> . _Yi_ _<u>i</u>_ <u>−</u> <u>(</u> _<u>f</u>_ <u>(2</u> _<u>θi</u>_ _<u>α</u>_ <u>)</u> <u>+</u> _<u>b</u>_ <u>(2</u> _<u>θi</u>_ _i_ _i_ _Yi_ (2) This minimization procedure results in estimates for each model parameter _α_ and background parameter _γ_, and large-sample theory can be used to construct standard errors for these estimates. While immensely powerful and widely applied, the Rietveld method can be subject to errors associated with false minima and uncertainty quantification <sup>8,9</sup> . In recent years, stochastic global optimization methods have been developed to improve the likelihood of reaching the global minimum <sup>10–16</sup> . However, the Rietveld method, and more recently developed stochastic methods, do not allow for the extraction of probability distributions of model parameters without prior knowledge of the distribution, a limitation that precludes the characterization of parameters in which a distribution is expected, e.g., unit cell descriptors (a, b, c, _α_, _β_, and _γ_ ). It is also well known that the Rietveld method handles statistical uncertainties using Hessian propagation <sup>9</sup>, and accounts for systematic errors by multiplying the resulting standard uncertainty in model parameters by the goodness of fit (i.e. scaling) <sup>17,18</sup> . The practice of scaling the obtained standard uncertainty is an approximation for the effect of systematic errors on uncertainty in model parameters <sup>18</sup> . Instead, a more complete model that formally accounts for systematic errors may obtain standard uncertainties without scaling. The application of alternative statistical approaches can address these deficiencies. For example, Bayesian statistical inference <sup>19</sup> can be used to compute posterior probability distributions of model parameters. Though not yet widely applied in full profile refinement for atomic structure determination, Bayesian statistical inference has been used in related areas of crystallography and measurement science <sup>17,20–28</sup> . For example, Wiessner and Angerer demonstrated the use of Bayesian approaches to determine probability distributions in the phase fractions of austenite and martensite during heating and cooling of a steel sample <sup>29</sup> . Recently, Gagin and Levin developed a Bayesian approach to account for unknown systematic errors in Rietveld refinements. Their method, paired with a least-squares minimization algorithm provided significantly more accurate estimates of structural parameters and their uncertainties than the standard analysis <sup>17</sup> . In this paper, we introduce and employ an alternative and unique Bayesian statistical approach to solve the crystallographic structure refinement problem. Similar to the Rietveld method, a diffraction pattern is calculated from a modeled crystallographic unit cell. However the difference between the modeled and measured diffraction pattern is not minimized to reach single point value estimates of model parameters. Instead, the parameter space is explored by sampling multiple combinations of model parameters using a Markov chain Monte Carlo (MCMC) algorithm <sup>30</sup> . The results of the analysis are the posterior probability distributions of all modeled parameters, which yield both estimates of all parameters and quantifiable uncertainty. This work introduces a formal framework to account for unknown systematic errors (e.g. those manifested by correlated residuals), correlated and complex error variance patterns to help solve the problem of uncertainty quantification <sup>9</sup>, and a Monte Carlo simulation study that verifies the statistical validity of this approach. Measures of uncertainty are important for formally testing for differences between samples, comparing properties of the new sample to a historical value, and determining whether more data is required to obtain reliable results. While introduced in the present work Figure 2. Representative Rietveld and Bayesian analysis results. Powder diffraction data of Si is compared with results of (top) a Rietveld analysis and (bottom) an average of the final 1000 MCMC samples. Insets of the 111, 220, 422, and 911/953 reflections show that the Bayesian inference and Rietveld approaches achieve a similar fit to the observed diffraction data. using X-ray diffraction of a National Institute of Standards and Technology (NIST) standard reference material (SRM), the present approach can be readily adopted for use with data from other measurement probes and materials and should serve as a new structure refinement approach. Results Data collection and Rietveld analysis. A high resolution synchrotron diffraction pattern of a NIST Silicon standard (SRM 640d) was measured at the state-of-the art beamline 11-BM-B of the Advanced Photon Source (APS) at Argonne National Laboratory. The sample was held at constant temperature (22.5 °C) during the measurement. A Rietveld refinement analysis was first performed as a reference for a Bayesian approach. The execution of a Rietveld refinement also provides starting values for the MCMC algorithm. The software package General Structure Analysis Software-II (GSAS-II) (version 0.2.0 revision 1466) <sup>31</sup> was used to complete the Rietveld analysis. Traditionally, estimates are obtained by weighted least-squares minimization with weights proportional to the inverse of the intensity (Equation 1). The lattice parameter was fixed to the NIST reported value parameter (5.43123(8) Å at 22.5 °C) <sup>32,33</sup> . The Finger-Cox-Jephcoat peak profile function was used to account for axial divergence. Reported instrumental parameters (Caglioti (U =​ 1.163, V =​ −​0.126, and W =​ 0.063) and axial divergence (SH/L =​ 0.0011)) were used. The space group and Wycoff positions were set to that of diamond cubic, and the isotropic thermal parameter ( _Uiso_ ) was initially set to be 0.001 (Å <sup>2</sup> ). The parameter refinement sequence suggested by Young was followed to facilitate optimization and reduce the risk for nonconvergence of the least squares routine <sup>8</sup> . Additionally, Rietveld analyses were completed using various background orders (4 <sup>_th_</sup>, 5 <sup>_th_</sup>, 10 <sup>_th_</sup>, and 15 <sup>_th_</sup> ) to confirm that the use of high order polynomial background does not yield an unstable least-squares refinement. Parameters obtained from all refinements were within two standard uncertainties, demonstrating that the 15 <sup>_th_</sup> order Chebyshev polynomial used in this work does not inhibit the Rietveld refinement. A representative fit of the refinement result is presented in Fig. 2. The refined structural, microstructural, and instrumental parameters and goodness of fit indicators obtained from the Rietveld refinement are summarized in Table 1. A satisfactory fit could not be achieved without refining the Caglioti (U, V, and W) parameters. microstrain <u>(%</u> <u>*</u> <u>​100)</u> _λ_ <u>(Å)</u> <u>Profile fti</u> <u>a (Å)</u> Crystal <u>size (</u> _μ_ <u>m)</u> _<u>Rp</u>_ =​ 5.85% <u>5.43123</u> <u>1.0006(6)</u> <u>2.98(2)</u> <u>0.4138490(5)</u> _<u>Rw</u>_ =​ 8.28% _χ_ <sup>2</sup> =​ 2.02 <u>Site positions</u> <u>x</u> <u>y</u> <u>z</u> _<u>Uiso</u>_ <u>(Å</u> <sup>2</sup> <u>)</u> <u>Si</u> <u>0.125</u> <u>0.125</u> <u>0.125</u> <u>0.00551(2)</u> <u>Peak shape parameters</u> <u>U</u> <u>V</u> <u>W</u> <u>0.702(19)</u> −​0.242(6) <u>0.0322(5)</u> Table 1. Summary of refined structural parameters, atomic positions and occupancies, and goodness of fit for the Rietveld refinement. Instrumental parameters (Lx and Ly) associated with crystallite size and microstrain broadening were set to 0 and not refined; instead the crystallite size and microstrain broadening terms introduced in GSAS-II were used. The refined crystallite size (1.00006(6) _μ_ m) and microstrain (0.0298(2)%) parameters were found to differ from the values reported in the NIST SRM 640D data sheet: 0.6 _μ_ m and 0, respectively <sup>32,33</sup> . The origin of the discrepancy between the refined and NIST reported value might arise from a difference in resolution of the measured data ( _i.e._ synchrotron vs laboratory) or the implementation of methods used to infer crystallite size and strain broadening contributions ( _i.e._ GSAS-II vs TOPAS) <sup>34</sup> . It should be noted that the previous NIST Si standard (SRM 640c) did report a non-zero microstrain. Simulation study. Before describing a Bayesian analysis of the NIST silicon standard, we present a simulation study to illustrate the importance of properly modeling the variance and correlation of the residuals and compare the proposed method with more standard approaches. We performed this study on a face centered cubic structure as a model system. We have chosen to study a simple system with idealized data generation mechanisms in which we can model gross features of diffraction data to explore the impact of not accounting for correlated residuals when estimating parameters and uncertainties. Our simulation study proceeds by generating synthetic data from a model with known parameter values. We then fit the synthetic data using Bayesian inference to obtain estimates and credible intervals for model parameters, and compare the estimated values and intervals with the true values used to generate the data. By repeating this process many times we can study the statistical properties of the method, including estimating the accuracy and coverage of credible intervals. In particular, we demonstrate that models that do not account for heteroskedastic and correlated residuals give poor estimates of model parameters, and that the actual coverage of 90% credible intervals can be far less than 90%. Synthetic data are generated from Equation 1. Observations are indexed by _i_, with _i_ =​ 1,..., _n_ =​ 901 observations made on a grid of 2 _θ_ spanning 10 to 100 degrees 2 _θ_ with 0.1 2 _θ_ step. An arbitrary background intensity (Fig. 3) is simulated to mimic a background that is typically observed in experiment _b_ (2 _θ_ ) = 500 + 3000/(2 _θ_ ) + 50 sin [2 _π_ (2 _θ_ )/100]. (3) We set _f_ (2 _θ_ | _α_ ) to be _f_ (2 _θ_ | _α_ ) = _I_  ∑ _SFhklL_ (2 _θ_ ) _G_ ( _λ_,2 _θ_ , _U_, _V_, _W_ ) _hkl_ _hkl_  _hkl_ (4) where _SFhkl_ and _L_ (2 _θ_ ) represent the structure factor for the _hkl_ reflection and Lorentz-polarization correction, respectively. Structure factors of gold were utilized. The vector _α_ is comprised of six parameters: incident X-ray intensity ( _I_  ); wavelength ( _λ_ ); 2 _θ_ offset (2 _θ_  ); and Caglioti (U, V, and W) parameters. Diffraction peaks were modeled as Gaussian distributions with a full width half maximum that follows the Caglioti function <sup>35</sup> . Synthetic data were generated using _I_  =​ 100, _λ_ =​ 1.54 Å, 2 _θ_  =​ 0.10, _U_ =​ 0.10, _V_ =​ −​0.05, _W_ =​ 0.03. The errors _εi_ are normally distributed with variance _σ_ <sup>2</sup> [ _f_ (2 _θi_ | _α_ )/10000 +​ _γ_ 0], where _σ_ <sup>2</sup> =​ 2000 <sup>2</sup> and _γ_ 0 =​ 0.1. Errors on intensity are typically approximated using Poisson statistics, though in the limit of high counts this error can be approximated using a normal distribution. The stationary correlation between adjacent errors is set to _ρ_ =​ 0.9, and autocorrelation between observations at angles 2 _θi_ and 2 _θj_ is _ρ_ <sup>|</sup> <sup>_i_</sup> <sup>−</sup> <sup>_j_</sup> <sup>|</sup> . We generate _N_ =​ 100 data sets from this model. Representative true and background intensities are shown in Fig. 3. For each simulated data set, we fit four models that vary by their treatment of the residuals _εi_ . The goal of this simulation study is to examine the impact of fitting successively more complex models on the accuracy and precision of parameter estimates, as measured by relative mean squared error (RMSE) and the coverage of our credible intervals. We fit the model with independent residuals (correlation fixed at _ρ_ =​ 0) and dependent residuals ( _ρ_ >​ 0). We also fit model with equal residual variance Var( _εi_ ) =​ _σ_ <sup>2</sup> (analogous to least-squares minimization) and unequal residual variance Var( _εi_ ) =​ _σ_ <sup>2</sup> [ _f_ (2 _θi_ | _α_ )/10000 +​ _γ_ 0] (analogous to weighted least-squares minimization). For all models, we capture the background process using a b-spline basis expansion with 20 degrees of freedom, which is sufficiently rich to capture the true background intensity. We use MCMC to generate 5,000 posterior Figure 3. Synthetic data used for the simulation data. Simulated gold diffraction data and (inset) background used in the simulation study. samples, discarding the first 1,000 as burn-in. Additional details about the specification of the models, including prior distributions, can be found in the supplementary materials. For each data set and each of the four models, we compute an estimate of the parameter (specifically, the posterior mean) and 90% (equal-tailed) credible interval for each parameter in _α_ . A 90% credible interval should have a 90% probability of containing the true parameter. Let _αj_ be the true value of the _j_ <sup>_th_</sup> element of _α_ and _α_ ˆ _sj_ be posterior mean for data set _s_ =​ 1,..., _N_ . Methods are compared using relative mean squared error, _S_ <u>(</u> _α_ <u>ˆ</u> _sj_ <u>2</u> <u>1</u> _S_ <u>(</u> _α_ <u>ˆ</u> _RMSE_ = ∑ <u>1</u> _S_ <u>(</u> _α_ <u>ˆ</u> _sj_ - _α_ _<u>j</u>_ <u>)2</u> _S_ ∑ _s_ =1 _αj_ <u>2</u> 2 . ∑ _α_ <u>ˆ</u> _sj_ - _α_ _<u>j</u>_ <u>1</u> _<u>j</u>_ = ∑ _S_ _s_ =1 _αj_ _<u>j</u>_ _s_ =1 _αj_ <u>2</u> (5) 1 _αj_ _s_ =1 We also compute the empirical coverage of the 90% intervals. That is, for each data set we compute the posterior 90% interval for each element of _α_ and report the sample proportion of the _S_ intervals that contain the true value _αj_ (as illustrated in Fig. 4). Methods with small RMSE for all parameters and coverage at or above 90% are preferred. RMSE and coverage of the 90% credible intervals for each model are summarized in Table 2. The simplest model (independent residuals and constant (homoskedastic) variance) has the largest RMSE and lowest coverage of the 90% intervals. Including additional complexity (correlated residuals or variable (heteroskedastic) variance) decreases the RMSE and increases the coverage of the 90% interval. The coverage of the 90% intervals for the full model is near or above the nominal 90% level for all parameters while the coverage sinks far below 90% for simpler models. Therefore, we conclude that it is essential to adequately model the residual distribution of _ε_ to obtain valid statistical inference. It is noted that the model implemented in Rietveld refinement method uses independent residuals and variable (heteroskedastic) variance. The Bayesian model we propose in the next section uses a more complex residual structure that should improve our estimates and credible intervals. Bayesian Analysis of the NIST silicon standard. Bayesian analyses begin by specifying a prior probability distribution that captures any knowledge about parameters that we have before the experiment. Based on observed data, this knowledge is updated to a posterior probability distribution, which reflects the resulting uncertainty about the model parameters. Figure 5 compares the posterior distributions for select model parameters (wavelength, U, _Uiso_, and crystallite size) to point estimates and the corresponding standard uncertainty (s.u.) determined by Rietveld analysis. Posterior distributions for all model parameters are reported in supplemental information (Supplementary Figs 1, 2, 3, 4 and 5). Figure 5 and Supplementary Figs 1, 2, 3, 4 and 5 demonstrate that model parameters estimated by Bayesian inference are in reasonable agreement with point estimates determined by Rietveld. With the exception of _Uiso_ and scale, the posterior distributions overlap with the Rietveld point estimates. Figure 5 suggests that, for a NIST Si standard measured at 11-BM-B, the uncertainties in model parameters estimated by LSQ minimization are comparable to those estimated by Bayesian inference. In the case of the 2 _θ_ offset (zero) the s.u. is significantly larger than the uncertainty determined by Bayesian inference (Supplementary Fig. 5). Figure 4. Coverage of the 90% interval. Illustration of the coverage in the simulation study. The plot shows the 90% posterior interval for _I_  for all 100 simulated data sets and the unequal variance models with independent (left) and dependent (right) residuals. The intervals that exclude the true value (vertical line at _I_  =​ 100) are show in red. The coverage percentage reported in Table 2 is the percent of the 100 intervals that include the true value. <u>Parameter</u> <u>Ind-EV</u> <u>Ind-UEV</u> <u>Dep-EV</u> <u>Dep-UEV</u> <u>(a) Relative mean squared error</u> <sup>_<u>I</u>_</sup> <u></u> <u>0.32 (0.03)</u> <u>0.20 (0.02)</u> <u>0.38 (0.03)</u> <u>0.12 (0.01)</u> <u>100</u> _λ_ <u>0.30 (0.14)</u> <u>0.16 (0.02)</u> <u>27.08 (9.80)</u> <u>0.14 (0.02)</u> <u>2</u> _θ_ <u></u> <u>7.81 (3.53)</u> <u>4.47 (0.68)</u> <u>514.02 (174.25)</u> <u>3.94 (0.70)</u> _<u>U</u>_ <u>1.05 (0.10)</u> <u>0.63 (0.06)</u> <u>0.83 (0.08)</u> <u>0.23 (0.03)</u> _<u>V</u>_ <u>3.41 (0.37)</u> <u>1.25 (0.17)</u> <u>3.27 (0.38)</u> <u>0.78 (0.08)</u> _<u>W</u>_ <u>2.06 (0.28)</u> <u>1.06 (0.13)</u> <u>3.47 (0.61)</u> <u>0.58 (0.08)</u> <u>(b) Coverage of 90% intervals</u> <sup>_<u>I</u>_</sup> <u></u> <u>17 (4)</u> <u>64 (5)</u> <u>23 (4)</u> <u>96 (2)</u> <u>100</u> _λ_ <u>32 (5)</u> <u>65 (5)</u> <u>30 (5)</u> <u>87 (3)</u> <u>2</u> _θ_ <u></u> <u>31 (5)</u> <u>69 (5)</u> <u>25 (4)</u> <u>85 (4)</u> _<u>U</u>_ <u>61 (5)</u> <u>86 (3)</u> <u>70 (5)</u> <u>100 (0)</u> _<u>V</u>_ <u>55 (5)</u> <u>98 (1)</u> <u>69 (5)</u> <u>100 (0)</u> _<u>W</u>_ <u>41 (5)</u> <u>79 (4)</u> <u>48 (5)</u> <u>95 (2)</u> Table 2. Simulation study results for models with residuals that are independent (“Ind”) and dependent (“Dep”), and with equal-variance (“EV”) and unequal variance (“UEV”). Results are reported as the mean (standard error) over the _S_ simulated data sets; all values are multiplied by 100, and results are reported for 100 _λ_ rather than _λ_ . Discussion The two analysis approaches, Rietveld (non-Bayesian) and Bayesian inference, are fundamentally different. The most important distinction of the Bayesian approach is that prior distributions are created and propagated Figure 5. Comparison of posterior probability distribution and Rietveld estimates. Posterior probability distributions from Bayesian inference and corresponding point estimates (vertical lines) from Rietveld LSQ method with s.u. through the analysis to posterior distributions for parameters and predictive distributions for observables. A posterior distribution offers a richer set of information regarding the uncertainty in model parameters than the s.u. obtained from LSQ minimization. For example, a posterior distribution can be used to demonstrate that a model parameter has a multimodal or asymmetric distribution of values. This is evident in the posterior distribution of U (Fig. 5), _λ_ (Fig. 5), crystal size (Fig. 5), V (Supplementary Fig. 3) and 2 _θ_ offset (Supplementary Fig. 5) where the posterior distributions are asymmetric. Distributions of certain parameters can be determined from other refinement approaches. For example, the Whole Powder Pattern Modeling (WPPM) method has been used to model distributions of crystallite size using assumed distributional forms such as normal and lognormal <sup>36</sup> . However, the present approach enables the determination of general posterior densities without requiring these assumptions a priori. To determine the quality of fit, crystallographers typically plot the modeled intensity against the observed intensities. Because Bayesian inference does not converge to a single-valued estimate for model parameters, any single diffraction profile generated from a MCMC sample should be thought of as one observation from an ensemble. One may construct a representative pattern from the ensemble by 1) choosing a single pattern or 2) averaging the calculated patterns from many MCMC samples. We use the second method and present in Fig. 2 a single pattern that is the average of the patterns produced using the parameters from the final 1000 MCMC samples. We employ method 2 because it incorporates correlations, asymmetries, and uncertainties in the parameter distributions when computing predicted patterns. Though this representation overly simplifies the result of the Bayesian approach, it does demonstrate that the modeled patterns match well to the measured data. Figure 2 shows the fit of the modeled pattern to the measured data for the Rietveld and Bayesian approaches. The insets in Fig. 2 highlight various reflections to illustrate that the Bayesian and Rietveld methods achieve a similar quality of fit. From Fig. 2 it is difficult to determine any subtle difference in the the fitting quality of the Bayesian and Rietveld analysis. The measured data and Rietveld and Bayesian results are overlaid, and a residual curve is also shown to highlight differences in the Rietveld and Bayesian results in Fig. 6. The difference curve demonstrates that Bayesian inference method better reproduces the observed diffraction profiles. This is evidenced by a positive and negative difference curve in regions where the Rietveld method under and over estimates the observed intensity. The 911/953 profile highlights that the Rietveld method underestimates the peak position, while Bayesian inference estimates a peak positions that more closely reproduces the observed peak position. In addition to these graphical comparisons, Table 3 provides several numerical summaries of the Rietveld and Bayesian analyses. Each goodness-of-fit measure in Table 3 uses the discrepancy between the observed intensities _Yi_ and the calculated intensities _Y_ <sup></sup> _i_ . The goodness-of-fit measures differ by whether they use absolute or squared errors, and whether observations are weighted by the observed intensities. Results of the residual analysis presented in Table 3 demonstrate that the Bayesian inference method achieves a final result that more closely reproduces the measured diffraction data than the Rietveld method, as for each of the measurements of discrepancy, the results obtained by Bayesian inference are smaller. The improved performance provided by Bayesian inference Figure 6. Direct comparison of graphical pattern fit from Bayesian and Rietveld analysis. Measured diffraction data are overlaid with Bayesian and Rietveld analysis results for the 111, 220, 422, and 911/953 reflections to highlight subtle differences in the fit quality. The difference (Bayesian - Rietveld) demonstrates that the Bayesian results better models the observed diffraction data (x). <u>Residual Method</u> <u>Bayes/ Rietveld</u> _i_ <u>(</u> _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup><u></u></sup> <u>)</u> <sup>2</sup> 0.79 ∑ _i_ <u>(</u> _<u>Yi</u>_ <u>−</u> _<u>YiYi</u>_ <sup><u></u></sup> _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup><u></u></sup> _<u>Yi</u>_ _<u>i</u>_ <sup>_<u>Y</u>_</sup> _<u>i</u>_ <u>−</u> _<u>Yi</u>_  <u>∑</u> _<u>i</u>_ <sup>_<u>Y</u>_</sup> _<u>i</u>_ <u>−</u> ∑ _i_ <sup>_Y_</sup> _i_ _<u>i</u>_ <u>−</u> _<u>Yi</u>_ 0.90 _i_ <sup>_Y_</sup> _i_ #### ∑ i ( Yi Yi − Yi  ) _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup><u></u></sup> _Yi_ 2 0.89 _i_ _<u>YiY</u>_ <u>−</u> _<u>i</u>_ _<u>Yi</u>_ <sup></sup> 0.85 _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup></sup> _i_ _Yi_ ∑ ∑ _i_ _Y_ _<u>i</u>_ - _Y_ <sup></sup> _<u>i</u>_ 0.89 ∑ _<u>i</u>_ <u>(</u> _<u>Y</u>_ _<u>i</u>_ - _<u>Y</u>_ <sup></sup> _<u>i</u>_ <u>)</u> 2 <u>0.92</u> #### ∑ i ( Yi Y −  iYi  ) _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup><u></u></sup> _Y_ ~~~~ _<u>i</u>_ 2 0.64 _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup></sup> _i_ _<u>Yi</u>_ ~~~~ _<u>Yi</u>_ <u>−</u> _<u>Yi</u>_ <sup></sup> _i_ _<u>Yi</u>_ ~~~~ ∑ 0.80 Table 3. Summary of residual analysis using results from both the Rietveld and Bayesian approaches. is likely due to the manner in which parameters are optimized in Rietveld refinement. As described by Young <sup>8</sup>, Rietveld refinement employs a one-by-one turn-on sequence to facilitate optimization and avoid unstable least squares behavior, which can cause optimization to fail. In this sequence, uncorrelated parameters are optimized first, followed by those that are considered to be correlated or potentially less stable. Young notes that this strategy improves the robustness of the optimization procedure. The disadvantage is that coordinate descent in this manner is prone to termination in local minima, even when multiple initial values are employed. In contrast, the inherently stochastic nature of the MCMC approach mitigates being trapped in a false minimum because the parameter space (bounded by the priors) is randomly sampled and no turn-on sequence is employed. The Bayesian approach is thus less sensitive to the potential instabilities in parameters that can be observed in the Rietveld method. We note that the MCMC approach does not preclude chains from being trapped in local minima. However, the chance of becoming trapped in a local minimum can be reduced through the use of multiple initial starting values, careful consideration of algorithm diagnostics, and appropriate parameter transformation. We have employed all of these methods in the development of our algorithm, and details are discussed in the methods and supplementary materials. The development and tuning of MCMC algorithms to perform Bayesian inference can be a complex process, especially when incorporating computations from other codes. In the example utilizing our approach, the computational expense of accurately modeling a diffraction pattern with 50,000 data points, 30 reflections, and complex peak shapes (required to account for axial divergence) is a substantial bottleneck for the MCMC analysis. At each MCMC iteration a model diffraction pattern must be calculated using GSAS-II for each of the ten model parameters. One thousand iterations required, on average, 900 s on an Intel CoreTM i5-3750. [The identification of any commercial product or trade name does not imply endorsement or recommendation by the National Institute of Standards and Technology.] To be conservative, we ran the MCMC algorithm for 100,000 iterations. Diagnostic plots, like those in Supplementary Figs 6, 7 and 8, show the convergence of the algorithm. One particular advantage of Bayesian inference is its ability to incorporate prior knowledge. With the exception of rigid body constraints, there is no framework for incorporating prior knowledge about the sample of interest (e.g., crystallite size obtained by electron microscopy analysis) into a Rietveld analysis. A prior distribution, which makes a probabilistic specification of prior knowledge, is required in the Bayesian approach. While this can be defined by physical expectations at the outset of an analysis, it is also possible to employ iterative or hierarchical calculations in the Bayesian approach. For example, posterior distributions obtained from a Bayesian inference of LaB6 NIST SRM 660a can serve as priors for subsequent analyses. I.e., one might first complete a Bayesian analysis on a NIST SRM designed to quantify line broadening to obtain posterior distributions for instrumental parameters (e.g., wavelength, axial divergence, and Caglioti peak shape parameters). These results could be used in analyses of structurally more complex materials (such as relaxor ferroelectrics or high entropy alloys) where well-calibrated instrumental parameters are critical for obtaining posterior distributions that precisely describe the structure of the material of interest, for example, the lattice and atomic parameters (displacements, occupancies, and thermal factors) <sup>8</sup> . Additionally, the MCMC algorithm has an important advantage over a deterministic least-squares minimization: the ability to escape from local minima. The stochastic aspect of the MCMC algorithm enables the method to overcome barriers that would otherwise trap a least-squares method in a confined region of parameter space. This advantage makes the use of the present method advantageous despite its computationally-intensive nature. In summary, we present a new Bayesian inference method for refining crystallographic structures. This approach is fundamentally different from that of the Rietveld method, which is currently the predominant analysis method for structure refinement. This analysis approach is applied to an example where the structure of a standard reference material is refined using synchrotron X-ray diffraction data. The approach can be readily adopted to refine other structures as well as integrating additional or different data sources (e.g., area detector patterns and neutron diffraction patterns). The Bayesian approach offers a richer description of the model and model uncertainties than has been available previously. Methods Data collection and Rietveld analysis. An X-ray wavelength of 0.413848 Å (30.1 keV) was utilized. Diffracted X-rays were measured using an array of twelve detectors with Si (111) analyzer crystals <sup>37,38</sup> . Measured data was merged into a single data set using previously reported methods <sup>38</sup> . A 15 <sup>_th_</sup> order Chebyshev polynomial background was used to account for an irregular background due to amorphous scattering from the Kapton® capillary. Parameters refined include the zero, profile shape (U, V, and W), scale, wavelength, isotropic displacement parameter ( _Uiso_ ), microstrain and crystallite size. Prior distributions for simulation study. Within the simulation study, the coefficients for the background model have prior distribution _βj_ ~ _iid_ N(0, _τ_ 2). The other prior distributions used are _σ_ 2, _τ_ 2 ~ InvGamma (0.01, 0.01), log( _γ_ 0) ~ N(0, 10 <sup>2</sup> ) (for the heteroskedastic models), _Io_ ~ Unif(90, 110), _λ_ ~ Unif(1.5, 1.6), 2 _θ_  ~ Unif(0, 1), _U_ ~ Unif(0.08, 0.12), _V_ ~ Unif(−​0.06, −​0.03), _W_ ~ Unif(0.015, 0.45), and _ρ_ ~ Unif(0, 1) (for the models with correlated residuals). Bayesian inference. The Bayesian inference method uses Equation 1 to model the observed data. The background intensity is approximated using the spline basis expansion, _L_ _θ_ ) = ∑ _Bl_ (2 _θ_ ) _γl_ _b_ (2 _θ_ ) = ∑ _Bl_ (2 _θ_ ) _γl_, _l_ =1 _Bl_ (2 _θ_ ) _γl_, 1 _l_ _l_ _l_ =1 (6) where _Bl_ are known basis functions and _γl_ are unknown coefficients that determine the shape of _b_ . In our analysis we use b-spline basis functions. B-splines are a flexible piecewise polynomial functions used for curve fitting that provide results similar to higher degree polynomials while avoiding potential instabilities <sup>39</sup> . The coefficients _γl_ have priors _γl_ ~ Normal(0, _τ_ <sup>2</sup> ). This prior was selected because we do not have prior information about the background intensity; it does not imply that our resulting estimates are centered at 0. By treating these coefficients as part of the Bayesian hierarchical model we propagate uncertainty about the background correction through to the posterior distributions. Since the counts are large, we approximate their distribution as Gaussian with variance depending on the mean. Specifically, the residuals are modeled as Gaussian with mean zero and variance Var( _εi_ ) =​ _σ_ <sup>2</sup> [ _f_ (2 _θi_ | _α_ )/ _C_ +​ _γ_ 0], where _C_ is a large constant to scale the variance. Therefore, the overall variance is determined by _σ_ <sup>2</sup>, but the variance increases with the intensity _f_ (2 _θi_ | _α_ ) ≥​ 0. The constant _γ_ 0 >​ 0 is included so that the variance remains positive for observations with _f_ (2 _θi_ | _α_ ) =​ 0. This approach is in contrast with the frequent assumption that the residual variance is proportional to the observed intensity, _Yi_, and is a common statistical approach for count data. In addition to heteroskedasticity, we account for dependence between the residuals for intensities with similar angles using an AR(1) process, so that correlation between residuals _h_ observations is _ρ_ <sup>_h_</sup> . The correlation parameter is given an uninformative prior and is estimated as part of the MCMC process. Autocorrelation in residuals could arise from background scattering. If the modeled background is lower-order than required to fit the diffuse scattering, then autocorrelation would be expected. Likewise, an imprecise peak position would lead to autocorrelation. This is because many data points are used to sample a smooth peak and the left and right hand sides of the peaks would both exhibit correlated residuals. To complete the Bayesian model we specify prior distributions for the remaining parameters. As examples, the prior distribution for X-ray wavelength is uniform between 0.41 and 0.42, and the prior distribution for the _Uiso_ is uniform between 0.0 and 0.1. The remaining parameters are summarized in Supplementary Table 1. For this analysis, we use _L_ =​ 15 b-spline basis functions to mirror the Rietveld analysis. Modeled diffraction patterns used for the Bayesian analysis were calculated using routines extracted from GSAS-II. A standalone Python class was developed to interface with GSAS-II routines utilized to calculate a diffraction pattern (i.e., peak intensity, position, and profile shape). This Python class enabled calculating a modeled diffraction pattern and modification of parameters that controls the modeled pattern (e.g., lattice parameters, atomic occupancy and position, _Uiso_ factor, peak profile parameters, etc.). The Python code is included in a Supplementary note. MCMC Details. MCMC is an iterative, general-purpose algorithm to draw samples from a complex, multivariate distribution <sup>30</sup> : in this case, the posterior distribution of the parameters of the model. The algorithm requires starting values, which we initialize using the point estimates from the Rietveld refinement in our analyses. To improve convergence, we transform bounded parameters to take values on the real line and linearly transform correlated parameters. We run 100,000 iterations and verify convergence using standard diagnostics. Since the procedure is iterative, observations near the beginning of the chain (called _burn-in_ ) have not converged and are not draws from the appropriate distribution, so they are discarded. Here, the first 10,000 runs are discarded for burn-in. The posterior distributions are summarized using the posterior mean, which is calculated as the average of the posterior samples, and posterior credible intervals. Since a posterior distribution is a probability distribution, it integrates to 1. A p% credible interval is an interval over which the posterior distribution integrates to _p_ /100. Since MCMC is an iterative procedure, there are a variety of diagnostics used to diagnose when samples are being drawn from the desired distribution and how many samples should be discarded as “burn-in.” Supplementary Fig. 6 plots sample pairs for three parameters (and marginal density estimates). If the sample pairs indicate high correlation (e.g., the point clouds are elongated instead of round), this may indicate that the MCMC should be adjusted to allow for faster convergence. Supplementary Fig. 7 plots successive samples from a single parameter. These plots are termed _trace plots_ . As convergence is reached, the samples stabilize around a value; the early samples are burn-in. This is also illustrated by Supplementary Fig. 8. We perform MCMC sampling using an equivalent and convenient parameterization. The priors for the elements of _α_ =​ ( _α_ 1,..., _αp_ ) are independent and uniform _αj_ ~ Uniform( _lj_, _uj_ ), where the prior intervals ( _lj_, _uj_ ) are chosen to give a scientifically plausible range of values. MCMC sampling is easier for parameters defined on the real line, so we perform computing using the parameterization _αj_ =​ _lj_ +​ ( _uj_ −​ _lj_ )Φ​( _zj_ ), where Φ​ is the standard normal cumulative distribution function and _zi_ have standard normal priors. This induces a Uniform( _lj_, _uj_ ) prior for _αj_, and so the parameterization is equivalent to the desired model. For _i_ >​ 1 the auto-regression model can be written: _Y_ _i_ | _Y_ _i_ −1 = _b_ (2 _θi_ ) + _f_ (2 _θi_ | z ) + _ρ_ _<u>ωi</u>_ <u>(</u> <u>z</u> <u>)</u> [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ (2 _θi_ ) + _f_ (2 _θi_ | z ) + _ρ_ _<u>ωi</u>_ <u>(</u> <u>z</u> <u>)</u> [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1 z _θi_ ) + _f_ (2 _θi_ | z ) + _ρ_ _ωωi_ - _<u>i</u>_ _<u>i</u>_ ( z ) z _i_ | _Y_ _i_ −1 = _b_ (2 _θi_ ) + _f_ (2 _θi_ | z ) + _ρ_ _<u>i</u>_ [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1 z )] + _εi_ _i_ | _Y_ _i_ −1 = _b_ (2 _θi_ ) + _f_ (2 _θi_ | z ) + _ρ_ _ωi_ −1( z ) [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1 z )] + _εi_, (7) 1 = _b_ (2 _θi_ ) + _f_ (2 _θi_ | z ) + _ρ_ _ωi_ −1( z ) [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1 z )] + _εi_, [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1 z )] + _εi_, _i_ _i_ where z =​ ( _z_ 1,..., _zp_ ), _εi_ ~ Normal[0, _σ_ <sup>2</sup> (1 −​ _ρ_ <sup>2</sup> ) _ωi_ ( z )] independent over _i_, and _ωi_ ( z ) =​ _f_ (2 _θi_ | z )/ _C_ +​ _γ_ 0. Since the first observation provides negligible information, we ignore the first observation and express the remaining _n_ −​ 1 observations in matrix notation, Y ~ N( B _γ_ + f ( z ) + W ( z )[∼ Y - B  _γ_ - f  ( z )], _σ_ 2Ω( z )), (8) where Y =​ ( _Y_ 2,..., _Yn_ ) <sup>_T_</sup>, B is the ( _n_ −​ 1) ×​ _L_ matrix of basis coefficients, f ( z ) = [ _f_ <sup>(2</sup> _θ_ 2 z ), …, _f_ (2 _<u>θn</u>_ <u>z</u> <u>)]</u> _T_ <u>, ∼</u> <u>Y</u> <u>,</u> <u>B</u>  <u>,</u> f  ( z ) are lagged matrices, e.g., ∼ Y = ( _Y_ 1, …, _Y_ _n_ −1) _T_ <sup>,</sup> <sup>W</sup> <sup>(</sup> <sup>z</sup> <sup>) is diagonal with diagonal elements</sup> <sup>_ρ_</sup> <sup>_<u>ω</u>_</sup> 2( <u>z</u> <u>)/</u> _<u>ω</u>_ 1( <u>z</u> <u>)</u>, …​, 2 z ), …, _f_ (2 _<u>θn</u>_ <u>z</u> <u>)]</u> _T_ <u>,</u> where Y =​ ( _Y_ 2,..., _Yn_ ) <sup>_T_</sup>, B is the ( _n_ −​ 1) ×​ _L_ matrix of basis coefficients, f ( z ) = [ _f_ <sup>(2</sup> _θ_ 2 z ), …, _f_ (2 _<u>θn</u>_ <u>z</u> <u>)]</u> are lagged matrices, e.g., ∼ Y = ( _Y_ 1, …, _Y_ _n_ −1) _T_ <sup>,</sup> <sup>W</sup> <sup>(</sup> <sup>z</sup> <sup>) is diagonal with diagonal elements</sup> <sup>_ρ_</sup> <sup>_<u>ω</u>_</sup> 2( <u>z</u> <u>)/</u> _<u>ω</u>_ 1( <u>z</u> <u>)</u>, …​, _ρ_ _<u>ωn</u>_ <u>(</u> <u>z</u> <u>)/</u> _<u>ωn</u>_ −1( <u>z</u> <u>)</u>, and Ω( z ) is diagonal with diagonal elements (1 −​ _ρ_ <sup>2</sup> ) _ω_ 2( z ), …​, (1 −​ _ρ_ <sup>2</sup> ) _ωn_ ( z ). We explore the posterior by generating MCMC samples. MCMC sampling begins by specifying initial values for all parameters, _γ_, Z, _ρ_, _τ_ <sup>2</sup> and _σ_ <sup>2</sup> . For each iteration of the algorithm, the parameters are updated in sequence conditioned on all other parameters. The parameters _γ_, _σ_ <sup>2</sup>, _τ_ <sup>2</sup> have conjugate full conditional distributions and are thus updated using Gibbs sampling. The full conditional distributions are _γ_ _σ_ ⋅ 2 _<u>n</u>_ <u>−</u> <u>1</u> ⋅ ~ InvGamma + _a_ 1, <sup><u>1</u></sup> ∑  2 2 _i_ =2 ~ Normal( _V_ −1 _M_, _V_ −1) _V_ −1 _M_, _V_ −1 _M_, _V_ 1 _M_, _V_ −1) _l_ _n_ 2 _i_ =2 (1 - _ρ_ <u>2)</u> _ω_ (2 _θi_ z ) ∑ 2 _<u>i</u>_ ⋅   ~  _<u>n</u>_ <u>−</u> <u>1</u> InvGamma 2 + _a_ 1, <sup><u>1</u></sup> 2  _<u>n</u>_ <u>−</u> <u>1</u> + _a_ 1, <sup><u>1</u></sup> ∑ _n_ <u>2</u> _<u>ri</u>_ 2 + _b_ 1  <u>−</u> <u>1</u> + + _ρ_ <u>2)</u> _ω_ (2 _θi_ <u>2)</u> _ω_ (2 _θ_ z ) + _b_ 1 _i_ _i_ z _i_ = (9) _L_ = 2 _<u>L</u>_ ⋅ ~ InvGamma 2 + _a_ 2, <sup><u>1</u></sup> 2 ∑ _l_ =1  ,  _l_ 2 + _b_ 2 _<u>L</u>_ + _a_ 2, <sup><u>1</u></sup> ∑ _L_ _γl_ 2 + _b_ 2 _<u>L</u>_ 2 + _a_ 2, <sup><u>1</u></sup> 2 <sup><u>1</u></sup> 2 ∑ _l_ =1 _γl_ 2 + _b_ 2, ∑ 2 _<u>L</u>_ _τ_ ⋅ ~ InvGamma + _a_ 2, <sup><u>1</u></sup> ∑ _γl_ ⋅ ~ InvGamma     + _a_ 2, <sup><u>1</u></sup> ∑ _γl_ 2 + _l_ 2Ω( z )]−1 [ B - W ( z ) B  ] + _τ_ −2 _I_ _L_, _M_ = [ B - W ( z ) B  ] _T_ [ _σ_ 2Ω( z )]−1 [ Y - f ( z ) w he re _V_ = [ B - W ( z ) B  ] _T_ [ _σ_ 2Ω( z )]−1 [ B - W ( z ) B  ] + _τ_ −2 _I_ - W ( z )( _Y_  - f <sup></sup> ( z ))], _ri_ = _Y_ _i_ - _b_ (2 _θi_ ) - _f_ (2 _θi_ | z ) - _ρ_ _<u>ωi</u>_ <u>(</u> <u>z</u> <u>)</u> [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1| _ri_ = _Y_ _i_ - _b_ (2 _θi_ ) - _f_ (2 _θi_ | z ) - _ρ_ _ωωi_ - _<u>i</u>_ <u>(1</u> <u>z</u> () <u>z</u> ) [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1| z )] _<u>i</u>_ <u>(</u> <u>z</u> <u>)</u> _σ_ <sup>2</sup> ~ InvGamma( _a_ 1, _b_ 1) and _τ_ <sup>2</sup> ~ InvGamma( _a_ 2, _b_ 2). _<u>ωi</u>_ - _<u>i</u>_ <u>(1</u> <u>z</u> () <u>z</u> ) [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1| z )] and the priors are - _<u>i</u>_ <u>(1</u> <u>z</u> () <u>z</u> ) [ _Y_ _i_ −1 - _b_ (2 _θi_ −1) - _f_ (2 _θi_ −1| <u>z</u> The remaining parameters _ρ_ and z do not have conjugate full conditionals and are thus updated using Metropolis sampling. We use random-walk Gaussian candidate distributions for both _ρ_ and z . The standard deviation for _ρ_ ’s candidate distribution is tuned to give acceptance probability near 0.4; candidates outside the prior range (0, 1) are discarded. The parameter vector z is updated as a block. The proposal covariance matrix is _c_ Δ​, where _c_ is a tuning parameter selected to give acceptance probability near 0.4 and the matrix Δ​ is taken to be the posterior covariance matrix of z from an initial MCMC sample. References 1. Crystallography-Matters. _Nature materials_ 13, 757 (2014). 2. Thomas, J. M. Centenary: The birth of X-ray crystallography. _Nature_ 491, 186–187 (2012). 3. Billinge, S. J. L. & Levin, I. The problem with determining atomic structure at the nanoscale. _Science_ 316, 561–5 (2007). 4. Cheetham, A. K. & Goodwin, A. L. Crystallography with powders. _Nature materials_ 13, 760–2 (2014). 5. de Pablo, J. J., Jones, B., Kovacs, C. L., Ozolins, V. & Ramirez, A. P. The materials genome initiative, the interplay of experiment, theory and computation. _Current Opinion in Solid State and Materials Science_ 18, 99–117 (2014). [6. The White House. Materials genome initiative. URL http://www.whitehouse.gov/mgi.](http://www.whitehouse.gov/mgi) 7. Rietveld, H. M. A profile refinement method for nuclear and magnetic structures. _Journal of Applied Crystallography_ 2, 65–71 (1969). 8. Young, R. A. _The Rietveld Method_ (Oxford University Press, 1995). 9. Will, G. _Powder Diffraction: The Rietveld Method and the Two-Stage Method_ (Springer-Verlag, Berlin/Heidelberg, 2006). 10. Turner, G. W., Tedesco, E., Harris, K. D., Johnston, R. L. & Kariuki, B. M. Implementation of lamarckian concepts in a genetic algorithm for structure solution from powder diffraction data. _Chemical Physics Letters_ 321, 183–190 (2000). 11. Harris, K. D. M. & Tremayne, M. Crystal structure determination from powder diffraction data. _Chemistry of Materials_ 8, 2554–2570 (1996). 12. Favre-Nicolin, V. & Černý, R. _FOX_, ‘free objects for crystallography’: a modular approach to _ab initio_ structure determination from powder diffraction. _Journal of Applied Crystallography_ 35, 734–743 (2002). 13. Shankland, K., David, W. & Csoka, T. Crystal structure determination from powder diffraction data by the application of a genetic algorithm. _Zeitschrift Fur Kristallographie_ 212, 550–552 (1997). 14. Altomare, A. _et al._ Automatic structure determination from powder data with _EXPO2004_ . _Journal of Applied Crystallography_ 37, 1025–1028 (2004). 15. Chong, S. Y. & Tremayne, M. Combined optimization using cultural and differential evolution: application to crystal structure solution from powder diffraction data. _Chem. Commun._ [4078–4080 (2006). URL http://dx.doi.org/10.1039/B609138E.](http://dx.doi.org/10.1039/B609138E) 16. Andreev, Y. G., Lightfoot, P. & Bruce, P. G. A General Monte Carlo Approach to Structure Solution from Powder Diffraction Data: Application to Poly(ethylene oxide)3:LiN(SO3CF3)2. _Journal of Applied Crystallography_ 30, 294–305 (1997). 17. Gagin, A. & Levin, I. Accounting for unknown systematic errors in Rietveld refinements: a Bayesian statistics approach. _Journal of_ _Applied Crystallography_ 48, 1201–1211 (2015). 18. Schwarzenbach, D. _et al._ Statistical descriptors in crystallography: Report of the IUCr Subcommittee on Statistical Descriptors. _Acta_ _Crystallographica Section A_ 45, [63–75 (1989). URL http://dx.doi.org/10.1107/S0108767388009596.](http://dx.doi.org/10.1107/S0108767388009596) 19. Gelman, A. _et al._ _Bayesian Data Analysis_ (CRC Press, 2014), 3rd edn. 20. Hogg III, R., Charles, Mullen, K. & Levin, I. A Bayesian approach for denoising one-dimensional data. _Journal of Applied_ _Crystallography_ 45, 471–481 (2012). 21. Bourenkov, G. P., Popov, a. N. & Bartunik, H. D. A Bayesian Approach to Laue Diffraction Analysis and its Potential for TimeResolved Protein Crystallography. _Acta Crystallographica Section A Foundations of Crystallography_ 797–811 (1996). 22. David, W. I. F. & Sivia, D. S. Background estimation using a robust Bayesian analysis. _Journal of Applied Crystallography_ 34, 318–324 (2001). 23. French, S. A Bayesian three-stage model in crystallography. _Acta Crystallographica Section A_ 34, 728–738 (1978). 24. Gilmore, C. J. Maximum Entropy and Bayesian Statistics in Crystallography: a Review of Practical Applications. _Acta_ _Crystallographica Section A Foundations of Crystallography_ 52, 561–589 (1996). 25. Bergmann, J. & Monecke, T. Bayesian approach to the Rietveld refinement of Poisson-distributed powder diffraction data. _Journal_ _of Applied Crystallography_ 44, 13–16 (2010). 26. Armstrong, N., Dowd, A., Cline, J. P. & Kalceff, W. Bayesian Analysis of Ceria Nanoparticles From Line Profile Data. _Advances in_ _X-Ray Analysis_ 48, 59–66 (2004). 27. Armstrong, N. _et al._ X-Ray Diffraction Characterisation of Nanoparticle Size and Shape Distributions:— Application to Bimodal Distributions. In _Annual Condensed Matter and Materials Meeting — 28th – 28th Annual Condensed Matter and Materials Meeting_ _— Australian Institute of Physics,_ 1, 8–10 (2004). 28. Armstrong, W., Kalceff, N., Cline, J. P. & Bonevich, J. Bayesian inference of nanoparticle-broadened x-ray line profiles. _Journal of_ _Research of the National Institute of Standards and Technology_ 109, 166–178 (2004). 29. Wiessner, M. & Angerer, P. Bayesian approach applied to the Rietveld method. _Journal of Applied Crystallography_ 47, 1–7 (2014). 30. Chib, S. & Greenberg, E. Understanding the metropolis-hastings algorithm. _The American Statistician_ 49, 327–335 (1995). 31. Toby, B. H. & Von Dreele, R. B. GSAS-II: the genesis of a modern open-source all purpose crystallography software package. _Journal_ _of Applied Crystallography_ 46, 544–549 (2013). 32. Black, D. R. _et al._ Standard reference material 640d for x-ray metrology abstract. 33. Black, D. R. _et al._ Certification of nist standard reference material 640d. _Powder Diffraction_ 25, 187–190 (2010). 34. Balzar, D. _et al._ Size-strain line-broadening analysis of the ceria round-robin sample. _Journal of Applied Crystallography_ 37, 911–924 (2004). 35. Caglioti, G., Paoletti, A. & Ricci, F. P. Choice of Collimators for a Crystal Spectrometer for Neutron Diffraction. _Nuclear Instruments_ _& Methods_ 3, 223–228 (1958). 36. Langford, J. I., Louër, D. & Scardi, P. Effect of a crystallite size distribution on X-ray diffraction line profiles and whole-powderpattern fitting. _Journal of Applied Crystallography_ 33, 964–974 (2000). 37. Lee, P. L. _et al._ A twelve-analyzer detector system for high-resolution powder diffraction. _Journal of Synchrotron Radiation_ 15, 427–432 (2008). 38. Wang, J. _et al._ A dedicated powder diffraction beamline at the Advanced Photon Source: Commissioning and early operational results. _Review of Scientific Instruments_ 79, 7 (2008). 39. Kincaid, D. & Cheney, W. _Numerical Analysis: Mathematics of Scientific Computing_ (American Mathematical Society, 2002), 3rd edn. References Acknowledgements The authors acknowledge the support of the Kenan Institute for Engineering, Technology and Science at NC State and the Eastman Chemical Company - University Engagement Fund at NC State. JLJ acknowledges support from the National Science Foundation under DMR-1445926. This research used resources of the Advanced Photon Source, a US. Department of Energy (DOE) Office of Science User Facility operated for the DOE Office of Science by Argonne National Laboratory under Contract No. DE-AC02-06CH11357. Author Contributions J.L.J. initiated the research project. The experiments and analysis were conceived by collaborative discussion between J.L.J., I.L., A.G.W., R.C.S., B.J.R. and K.P. Diffraction experiments were completed by C.M.F. with assistance of beamline staff at 11-BM-B of the APS. C.M.F. completed the Rietveld refinement and worked together with Z.H. to execute the analysis. Z.H. coded the MCMC algorithm and C.M.F. adopted a portion of the opensource GSAS code for interfacing with the MCMC algorithm. A.G.W., R.C.S. and B.J.R. guided the mathematical and statistical approaches employed in the MCMC algorithm used for Bayesian inference. B.J.R. completed the simulation study. C.M.F. led the construction of the manuscript with contributions and collaboration from J.L.J., A.G.W., R.C.S., B.J.R., I.L. and K.P. All authors reviewed and approved the final manuscript. Additional Information Supplementary information [accompanies this paper at http://www.nature.com/srep](http://www.nature.com/srep) Competing financial interests: The authors declare no competing financial interests. How to cite this article : Fancher, C. M. _et al._ Use of Bayesian Inference in Crystallographic Structure Refinement via Full Diffraction Profile Analysis. _Sci. Rep._ 6, 31625; doi: 10.1038/srep31625 (2016). This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this [license, visit http://creativecommons.org/licenses/by/4.0/](http://creativecommons.org/licenses/by/4.0/) © The Author(s) 2016

섹션 본문 32문단 · 30,103자

(제목 없음)

1A Bayesian inference method for refining crystallographic structures is presented. The distribution of model parameters is stochastically sampled using Markov chain Monte Carlo. Posterior probability distributions are constructed for all model parameters to properly quantify uncertainty by appropriately modeling the heteroskedasticity and correlation of the error structure. The proposed method is demonstrated by analyzing a National Institute of Standards and Technology silicon standard reference material. The results obtained by Bayesian inference are compared with those determined by Rietveld refinement. Posterior probability distributions of model parameters provide both estimates and uncertainties. The new method better estimates the true uncertainties in the model as compared to the Rietveld method.

2X-ray diffraction is a powerful technique for characterizing the atomic structure of materials. Diffraction relies on scattering of X-rays from planes of atoms resulting in either constructive or destructive interference. Figure 1 shows example peaks observed in diffraction patterns, and the inset is a schematic of X-ray scattering from planes of atoms that results in constructive interferences. The constructive interference is observed in the diffraction pattern as intensity vs scattering angle (2θ). Over the past 100 years a variety of approaches have been developed to determine and refine the crystallographic structure from single crystal and powder diffraction patterns 1,2 . The pervasive application of these approaches is evidenced by over 200,000 structures being cataloged in the International Centre for Diffraction Data Database. Moving forward, X-ray techniques and analysis methods will continue to advance, particularly in the areas of combining data from different experimental or theoretical sources 3 , and in situ measurements during materials' processing or performance 1,2,4 . It is also expected that new crystallographic structures will be used in global materials databases for property prediction, as articulated by the Materials Genome Initiative (MGI) 5,6 .

3In diffraction, observed intensities (Y i ) at angle 2θ i can be represented as intensities from the material of interest (f(2θ i | α)), background scattering (b(2θ i | γ)), and errors (ε i ), where i represents the i th data point in the measurement range. We write the observed intensity as

4Here α is a collection of structural, microstructural, and instrumental parameters that determines the scattered intensity from a sample, and γ are parameters used to construct the background scattering. Most current approaches in crystallographic refinement infer the structure by minimizing the difference between a calculated and experimental pattern. The difference is minimized by adjusting model parameters. One example is the Rietveld method 7,8 , in which the structure is refined in a least-squares (LSQ) minimization routine using a weighted sum of squares residual:

5This minimization procedure results in estimates for each model parameter α and background parameter γ, and large-sample theory can be used to construct standard errors for these estimates. While immensely powerful and widely applied, the Rietveld method can be subject to errors associated with false minima and uncertainty quantification 8,9 . In recent years, stochastic global optimization methods have been developed to improve the likelihood of reaching the global minimum [10][11][12][13][14][15][16] . However, the Rietveld method, and more recently developed stochastic methods, do not allow for the extraction of probability distributions of model parameters without prior knowledge of the distribution, a limitation that precludes the characterization of parameters in which a distribution is expected, e.g., unit cell descriptors (a, b, c, α, β, and γ). It is also well known that the Rietveld method handles statistical uncertainties using Hessian propagation 9 , and accounts for systematic errors by multiplying the resulting standard uncertainty in model parameters by the goodness of fit (i.e. scaling) 17,18 . The practice of scaling the obtained standard uncertainty is an approximation for the effect of systematic errors on uncertainty in model parameters 18 . Instead, a more complete model that formally accounts for systematic errors may obtain standard uncertainties without scaling.

6The application of alternative statistical approaches can address these deficiencies. For example, Bayesian statistical inference 19 can be used to compute posterior probability distributions of model parameters.

7Though not yet widely applied in full profile refinement for atomic structure determination, Bayesian statistical inference has been used in related areas of crystallography and measurement science 17,[20][21][22][23][24][25][26][27][28] . For example, Wiessner and Angerer demonstrated the use of Bayesian approaches to determine probability distributions in the phase fractions of austenite and martensite during heating and cooling of a steel sample 29 . Recently, Gagin and Levin developed a Bayesian approach to account for unknown systematic errors in Rietveld refinements. Their method, paired with a least-squares minimization algorithm provided significantly more accurate estimates of structural parameters and their uncertainties than the standard analysis 17 .

8In this paper, we introduce and employ an alternative and unique Bayesian statistical approach to solve the crystallographic structure refinement problem. Similar to the Rietveld method, a diffraction pattern is calculated from a modeled crystallographic unit cell. However the difference between the modeled and measured diffraction pattern is not minimized to reach single point value estimates of model parameters. Instead, the parameter space is explored by sampling multiple combinations of model parameters using a Markov chain Monte Carlo (MCMC) algorithm 30 . The results of the analysis are the posterior probability distributions of all modeled parameters, which yield both estimates of all parameters and quantifiable uncertainty. This work introduces a formal framework to account for unknown systematic errors (e.g. those manifested by correlated residuals), correlated and complex error variance patterns to help solve the problem of uncertainty quantification 9 , and a Monte Carlo simulation study that verifies the statistical validity of this approach. Measures of uncertainty are important for formally testing for differences between samples, comparing properties of the new sample to a historical value, and determining whether more data is required to obtain reliable results. While introduced in the present work Constructive interference of X-rays scattered from planes of atoms results in observed peaks at various scattering angle (2θ), which is characteristic of the interplanar spacing. The inset is a schematic illustration of X-rays incident at an angle θ that results in constructive interference from a periodic array of atoms at an angle θ from the plane of atoms. using X-ray diffraction of a National Institute of Standards and Technology (NIST) standard reference material (SRM), the present approach can be readily adopted for use with data from other measurement probes and materials and should serve as a new structure refinement approach.

Data collection and Rietveld analysis. A high resolution synchrotron diffraction pattern of a NIST

9Silicon standard (SRM 640d) was measured at the state-of-the art beamline 11-BM-B of the Advanced Photon Source (APS) at Argonne National Laboratory. The sample was held at constant temperature (22.5 °C) during the measurement. A Rietveld refinement analysis was first performed as a reference for a Bayesian approach. The execution of a Rietveld refinement also provides starting values for the MCMC algorithm.

10The software package General Structure Analysis Software-II (GSAS-II) (version 0.2.0 revision 1466) 31 was used to complete the Rietveld analysis. Traditionally, estimates are obtained by weighted least-squares minimization with weights proportional to the inverse of the intensity (Equation 1). The lattice parameter was fixed to the NIST reported value parameter (5.43123(8) Å at 22.5 °C) 32,33 . The Finger-Cox-Jephcoat peak profile function was used to account for axial divergence. Reported instrumental parameters (Caglioti (U = 1.163, V = − 0.126, and W = 0.063) and axial divergence (SH/L = 0.0011)) were used. The space group and Wycoff positions were set to that of diamond cubic, and the isotropic thermal parameter (U iso ) was initially set to be 0.001 (Å 2 ). The parameter refinement sequence suggested by Young was followed to facilitate optimization and reduce the risk for nonconvergence of the least squares routine 8 . Additionally, Rietveld analyses were completed using various background orders (4 th , 5 th , 10 th , and 15 th ) to confirm that the use of high order polynomial background does not yield an unstable least-squares refinement. Parameters obtained from all refinements were within two standard uncertainties, demonstrating that the 15 th order Chebyshev polynomial used in this work does not inhibit the Rietveld refinement.

11A representative fit of the refinement result is presented in Fig. 2. The refined structural, microstructural, and instrumental parameters and goodness of fit indicators obtained from the Rietveld refinement are summarized in Table 1. A satisfactory fit could not be achieved without refining the Caglioti (U, V, and W) parameters. Instrumental parameters (Lx and Ly) associated with crystallite size and microstrain broadening were set to 0 and not refined; instead the crystallite size and microstrain broadening terms introduced in GSAS-II were used. The refined crystallite size (1.00006(6) μm) and microstrain (0.0298(2)%) parameters were found to differ from the values reported in the NIST SRM 640D data sheet: 0.6 μm and 0, respectively 32,33 . The origin of the discrepancy between the refined and NIST reported value might arise from a difference in resolution of the measured data (i.e. synchrotron vs laboratory) or the implementation of methods used to infer crystallite size and strain broadening contributions (i.e. GSAS-II vs TOPAS) 34 . It should be noted that the previous NIST Si standard (SRM 640c) did report a non-zero microstrain.

12Simulation study. Before describing a Bayesian analysis of the NIST silicon standard, we present a simulation study to illustrate the importance of properly modeling the variance and correlation of the residuals and compare the proposed method with more standard approaches. We performed this study on a face centered cubic structure as a model system. We have chosen to study a simple system with idealized data generation mechanisms in which we can model gross features of diffraction data to explore the impact of not accounting for correlated residuals when estimating parameters and uncertainties.

13Our simulation study proceeds by generating synthetic data from a model with known parameter values. We then fit the synthetic data using Bayesian inference to obtain estimates and credible intervals for model parameters, and compare the estimated values and intervals with the true values used to generate the data. By repeating this process many times we can study the statistical properties of the method, including estimating the accuracy and coverage of credible intervals. In particular, we demonstrate that models that do not account for heteroskedastic and correlated residuals give poor estimates of model parameters, and that the actual coverage of 90% credible intervals can be far less than 90%.

14Synthetic data are generated from Equation 1. Observations are indexed by i, with i = 1,..., n = 901 observations made on a grid of 2θ spanning 10 to 100 degrees 2θ with 0.1 2θ step. An arbitrary background intensity ( Fig. 3) is simulated to mimic a background that is typically observed in experiment

15where SF hkl and L(2θ) represent the structure factor for the hkl reflection and Lorentz-polarization correction, respectively. Structure factors of gold were utilized. The vector α is comprised of six parameters: incident X-ray intensity (  I ); wavelength (λ); 2θ offset ( θ  2 ); and Caglioti (U, V, and W) parameters. Diffraction peaks were modeled as Gaussian distributions with a full width half maximum that follows the Caglioti function 35 . Synthetic data were generated using

16, where σ 2 = 2000 2 and γ 0 = 0.1. Errors on intensity are typically approximated using Poisson statistics, though in the limit of high counts this error can be approximated using a normal distribution. The stationary correlation between adjacent errors is set to ρ = 0.9, and autocorrelation between observations at angles 2θ i and 2θ j is ρ |i−j| . We generate N = 100 data sets from this model. Representative true and background intensities are shown in Fig. 3.

17For each simulated data set, we fit four models that vary by their treatment of the residuals ε i . The goal of this simulation study is to examine the impact of fitting successively more complex models on the accuracy and precision of parameter estimates, as measured by relative mean squared error (RMSE) and the coverage of our credible intervals. We fit the model with independent residuals (correlation fixed at ρ = 0) and dependent residuals (ρ > 0). We also fit model with equal residual variance Var(ε i ) = σ 2 (analogous to least-squares minimization) and unequal residual variance Var(ε i ) = σ 2 [f(2θ i | α)/10000 + γ 0 ] (analogous to weighted least-squares minimization). For all models, we capture the background process using a b-spline basis expansion with 20 degrees of freedom, which is sufficiently rich to capture the true background intensity. We use MCMC to generate 5,000 posterior samples, discarding the first 1,000 as burn-in. Additional details about the specification of the models, including prior distributions, can be found in the supplementary materials.

18For each data set and each of the four models, we compute an estimate of the parameter (specifically, the posterior mean) and 90% (equal-tailed) credible interval for each parameter in α. A 90% credible interval should have a 90% probability of containing the true parameter. Let α j be the true value of the j th element of α and α j s be posterior mean for data set s = 1,..., N. Methods are compared using relative mean squared error, We also compute the empirical coverage of the 90% intervals. That is, for each data set we compute the posterior 90% interval for each element of α and report the sample proportion of the S intervals that contain the true value α j (as illustrated in Fig. 4). Methods with small RMSE for all parameters and coverage at or above 90% are preferred.

19RMSE and coverage of the 90% credible intervals for each model are summarized in Table 2. The simplest model (independent residuals and constant (homoskedastic) variance) has the largest RMSE and lowest coverage of the 90% intervals. Including additional complexity (correlated residuals or variable (heteroskedastic) variance) decreases the RMSE and increases the coverage of the 90% interval. The coverage of the 90% intervals for the full model is near or above the nominal 90% level for all parameters while the coverage sinks far below 90% for simpler models. Therefore, we conclude that it is essential to adequately model the residual distribution of ε to obtain valid statistical inference. It is noted that the model implemented in Rietveld refinement method uses independent residuals and variable (heteroskedastic) variance. The Bayesian model we propose in the next section uses a more complex residual structure that should improve our estimates and credible intervals.

20Bayesian Analysis of the NIST silicon standard. Bayesian analyses begin by specifying a prior probability distribution that captures any knowledge about parameters that we have before the experiment. Based on observed data, this knowledge is updated to a posterior probability distribution, which reflects the resulting uncertainty about the model parameters. Figure 5 compares the posterior distributions for select model parameters (wavelength, U, U iso , and crystallite size) to point estimates and the corresponding standard uncertainty (s.u.) determined by Rietveld analysis. Posterior distributions for all model parameters are reported in supplemental information ( Supplementary Figs 1, 2, 3, 4 and 5). Figure 5 and Supplementary Figs 1, 2, 3, 4 and 5 demonstrate that model parameters estimated by Bayesian inference are in reasonable agreement with point estimates determined by Rietveld. With the exception of U iso and scale, the posterior distributions overlap with the Rietveld point estimates. Figure 5 suggests that, for a NIST Si standard measured at 11-BM-B, the uncertainties in model parameters estimated by LSQ minimization are comparable to those estimated by Bayesian inference. In the case of the 2θ offset (zero) the s.u. is significantly larger than the uncertainty determined by Bayesian inference (Supplementary Fig. 5). Table 2 is the percent of the 100 intervals that include the true value. Table 2. Simulation study results for models with residuals that are independent ("Ind") and dependent ("Dep"), and with equal-variance ("EV") and unequal variance ("UEV"). Results are reported as the mean (standard error) over the S simulated data sets; all values are multiplied by 100, and results are reported for 100λ rather than λ.

21through the analysis to posterior distributions for parameters and predictive distributions for observables. A posterior distribution offers a richer set of information regarding the uncertainty in model parameters than the s.u. obtained from LSQ minimization. For example, a posterior distribution can be used to demonstrate that a model parameter has a multimodal or asymmetric distribution of values. This is evident in the posterior distribution of U (Fig. 5), λ (Fig. 5), crystal size (Fig. 5), V ( Supplementary Fig. 3) and 2θ offset ( Supplementary Fig. 5) where the posterior distributions are asymmetric. Distributions of certain parameters can be determined from other refinement approaches. For example, the Whole Powder Pattern Modeling (WPPM) method has been used to model distributions of crystallite size using assumed distributional forms such as normal and lognormal 36 . However, the present approach enables the determination of general posterior densities without requiring these assumptions a priori.

22To determine the quality of fit, crystallographers typically plot the modeled intensity against the observed intensities. Because Bayesian inference does not converge to a single-valued estimate for model parameters, any single diffraction profile generated from a MCMC sample should be thought of as one observation from an ensemble. One may construct a representative pattern from the ensemble by 1) choosing a single pattern or 2) averaging the calculated patterns from many MCMC samples. We use the second method and present in Fig. 2 a single pattern that is the average of the patterns produced using the parameters from the final 1000 MCMC samples. We employ method 2 because it incorporates correlations, asymmetries, and uncertainties in the parameter distributions when computing predicted patterns. Though this representation overly simplifies the result of the Bayesian approach, it does demonstrate that the modeled patterns match well to the measured data. Figure 2 shows the fit of the modeled pattern to the measured data for the Rietveld and Bayesian approaches. The insets in Fig. 2 highlight various reflections to illustrate that the Bayesian and Rietveld methods achieve a similar quality of fit. From Fig. 2 it is difficult to determine any subtle difference in the the fitting quality of the Bayesian and Rietveld analysis. The measured data and Rietveld and Bayesian results are overlaid, and a residual curve is also shown to highlight differences in the Rietveld and Bayesian results in Fig. 6. The difference curve demonstrates that Bayesian inference method better reproduces the observed diffraction profiles. This is evidenced by a positive and negative difference curve in regions where the Rietveld method under and over estimates the observed intensity. The 911/953 profile highlights that the Rietveld method underestimates the peak position, while Bayesian inference estimates a peak positions that more closely reproduces the observed peak position.

23In addition to these graphical comparisons, Table 3 provides several numerical summaries of the Rietveld and Bayesian analyses. Each goodness-of-fit measure in Table 3 uses the discrepancy between the observed intensities Y i and the calculated intensities  Y i . The goodness-of-fit measures differ by whether they use absolute or squared errors, and whether observations are weighted by the observed intensities. Results of the residual analysis presented in Table 3 demonstrate that the Bayesian inference method achieves a final result that more closely reproduces the measured diffraction data than the Rietveld method, as for each of the measurements of discrepancy, the results obtained by Bayesian inference are smaller. The improved performance provided by Bayesian inference is likely due to the manner in which parameters are optimized in Rietveld refinement. As described by Young 8 , Rietveld refinement employs a one-by-one turn-on sequence to facilitate optimization and avoid unstable least squares behavior, which can cause optimization to fail. In this sequence, uncorrelated parameters are optimized first, followed by those that are considered to be correlated or potentially less stable. Young notes that this strategy improves the robustness of the optimization procedure. The disadvantage is that coordinate descent in this manner is prone to termination in local minima, even when multiple initial values are employed. In contrast, the inherently stochastic nature of the MCMC approach mitigates being trapped in a false minimum because the parameter space (bounded by the priors) is randomly sampled and no turn-on sequence is employed. The Bayesian approach is thus less sensitive to the potential instabilities in parameters that can be observed in the Rietveld method. We note that the MCMC approach does not preclude chains from being trapped in local minima. However, the chance of becoming trapped in a local minimum can be reduced through the use of multiple initial starting values, careful consideration of algorithm diagnostics, and appropriate parameter transformation. We have employed all of these methods in the development of our algorithm, and details are discussed in the methods and supplementary materials. The development and tuning of MCMC algorithms to perform Bayesian inference can be a complex process, especially when incorporating computations from other codes. In the example utilizing our approach, the computational expense of accurately modeling a diffraction pattern with 50,000 data points, 30 reflections, and complex peak shapes (required to account for axial divergence) is a substantial bottleneck for the MCMC analysis. At each MCMC iteration a model diffraction pattern must be calculated using GSAS-II for each of the ten model parameters. One thousand iterations required, on average, 900 s on an Intel CoreTM i5-3750. [The identification of any commercial product or trade name does not imply endorsement or recommendation by the National Institute of Standards and Technology.] To be conservative, we ran the MCMC algorithm for 100,000 iterations. Diagnostic plots, like those in Supplementary Figs 6, 7 and 8, show the convergence of the algorithm.

Residual Method Bayes/ Rietveld

24One particular advantage of Bayesian inference is its ability to incorporate prior knowledge. With the exception of rigid body constraints, there is no framework for incorporating prior knowledge about the sample of interest (e.g., crystallite size obtained by electron microscopy analysis) into a Rietveld analysis. A prior distribution, which makes a probabilistic specification of prior knowledge, is required in the Bayesian approach. While this can be defined by physical expectations at the outset of an analysis, it is also possible to employ iterative or hierarchical calculations in the Bayesian approach. For example, posterior distributions obtained from a Bayesian inference of LaB 6 NIST SRM 660a can serve as priors for subsequent analyses. I.e., one might first complete a Bayesian analysis on a NIST SRM designed to quantify line broadening to obtain posterior distributions for instrumental parameters (e.g., wavelength, axial divergence, and Caglioti peak shape parameters). These results could be used in analyses of structurally more complex materials (such as relaxor ferroelectrics or high entropy alloys) where well-calibrated instrumental parameters are critical for obtaining posterior distributions that precisely describe the structure of the material of interest, for example, the lattice and atomic parameters (displacements, occupancies, and thermal factors) 8 . Additionally, the MCMC algorithm has an important advantage over a deterministic least-squares minimization: the ability to escape from local minima. The stochastic aspect of the MCMC algorithm enables the method to overcome barriers that would otherwise trap a least-squares method in a confined region of parameter space. This advantage makes the use of the present method advantageous despite its computationally-intensive nature.

25In summary, we present a new Bayesian inference method for refining crystallographic structures. This approach is fundamentally different from that of the Rietveld method, which is currently the predominant analysis method for structure refinement. This analysis approach is applied to an example where the structure of a standard reference material is refined using synchrotron X-ray diffraction data. The approach can be readily adopted to refine other structures as well as integrating additional or different data sources (e.g., area detector patterns and neutron diffraction patterns). The Bayesian approach offers a richer description of the model and model uncertainties than has been available previously.

Methods

26Data collection and Rietveld analysis. An X-ray wavelength of 0.413848 Å (30.1 keV) was utilized.

27Diffracted X-rays were measured using an array of twelve detectors with Si (111) analyzer crystals 37,38 . Measured data was merged into a single data set using previously reported methods 38 .

28A 15 th order Chebyshev polynomial background was used to account for an irregular background due to amorphous scattering from the Kapton ® capillary. Parameters refined include the zero, profile shape (U, V, and W), scale, wavelength, isotropic displacement parameter (U iso ), microstrain and crystallite size.

29Prior distributions for simulation study. Within the simulation study, the coefficients for the back- where B l are known basis functions and γ l are unknown coefficients that determine the shape of b. In our analysis we use b-spline basis functions. B-splines are a flexible piecewise polynomial functions used for curve fitting that provide results similar to higher degree polynomials while avoiding potential instabilities 39 . The coefficients γ l have priors γ l ~ Normal(0, τ 2 ). This prior was selected because we do not have prior information about the background intensity; it does not imply that our resulting estimates are centered at 0. By treating these coefficients as part of the Bayesian hierarchical model we propagate uncertainty about the background correction through to the posterior distributions.

30Since the counts are large, we approximate their distribution as Gaussian with variance depending on the mean. Specifically, the residuals are modeled as Gaussian with mean zero and variance Var(ε i ) = σ 2 [f(2θ i | α)/C + γ 0 ], where C is a large constant to scale the variance. Therefore, the overall variance is determined by σ 2 , but the variance increases with the intensity f(2θ i | α) ≥ 0. The constant γ 0 > 0 is included so that the variance remains positive for observations with f(2θ i | α) = 0. This approach is in contrast with the frequent assumption that the residual variance is proportional to the observed intensity, Y i , and is a common statistical approach for count data. In addition to heteroskedasticity, we account for dependence between the residuals for intensities with similar angles using an AR(1) process, so that correlation between residuals h observations is ρ h . The correlation Scientific RepoRts | 6:31625 | DOI: 10.1038/srep31625 parameter is given an uninformative prior and is estimated as part of the MCMC process. Autocorrelation in residuals could arise from background scattering. If the modeled background is lower-order than required to fit the diffuse scattering, then autocorrelation would be expected. Likewise, an imprecise peak position would lead to autocorrelation. This is because many data points are used to sample a smooth peak and the left and right hand sides of the peaks would both exhibit correlated residuals.

31To complete the Bayesian model we specify prior distributions for the remaining parameters. As examples, the prior distribution for X-ray wavelength is uniform between 0.41 and 0.42, and the prior distribution for the U iso is uniform between 0.0 and 0.1. The remaining parameters are summarized in Supplementary Table 1. For this analysis, we use L = 15 b-spline basis functions to mirror the Rietveld analysis.

32Modeled diffraction patterns used for the Bayesian analysis were calculated using routines extracted from GSAS-II. A standalone Python class was developed to interface with GSAS-II routines utilized to calculate a diffraction pattern (i.e., peak intensity, position, and profile shape). This Python class enabled calculating a modeled diffraction pattern and modification of parameters that controls the modeled pattern (e.g., lattice parameters, atomic occupancy and position, U iso factor, peak profile parameters, etc.). The Python code is included in a Supplementary note.

참고문헌 42건

  1. Powder Diffraction: The Rietveld Method and the Two Stage Method to Determine and Refine Crystal Structures from Powder Diffraction Data 2005
  2. Accounting for unknown systematic errors in Rietveld refinements: a Bayesian statistics approach Journal of Applied Crystallography · Wiley · 2015 10.1107/s1600576715011322
  3. The Rietveld method Crystal Research and Technology · Wiley · 1993
  4. X-ray diffraction characterisation of nanoparticle size and shape distributions : application to bimodal distributions 2004
  5. Crystallography with powders Nature Materials · Nature Portfolio · 2014 10.1038/nmat4044
  6. <i>GSAS-II</i>: the genesis of a modern open-source all purpose crystallography software package Journal of Applied Crystallography · Wiley · 2013 10.1107/s0021889813003531
  7. Crystal structure determination from powder diffraction data by the application of a genetic algorithm Zeitschrift für Kristallographie - Crystalline Materials · De Gruyter · 1997 10.1524/zkri.1997.212.8.550
  8. The Problem with Determining Atomic Structure at the Nanoscale Science · American Association for the Advancement of Science · 2007 10.1126/science.1135080
  9. Effect of a crystallite size distribution on X-ray diffraction line profiles and whole-powder-pattern fitting Journal of Applied Crystallography · Wiley · 2000 10.1107/s002188980000460x
  10. A Bayesian approach for denoising one-dimensional data Journal of Applied Crystallography · Wiley · 2012 10.1107/s0021889812015154
  11. Statistical descriptors in crystallography: Report of the IUCr Subcommittee on Statistical Descriptors Acta Crystallographica Section A Foundations of Crystallography · Wiley · 1989 10.1107/s0108767388009596
  12. A twelve-analyzer detector system for high-resolution powder diffraction Journal of Synchrotron Radiation · Wiley · 2008 10.1107/s0909049508018438
  13. Bayesian approach applied to the Rietveld method Journal of Applied Crystallography · Wiley · 2014 10.1107/s1600576714020196
  14. A General Monte Carlo Approach to Structure Solution from Powder Diffraction Data: Application to Poly(ethylene oxide)<sub>3</sub>:LiN(SO<sub>3</sub>CF<sub>3</sub>)<sub>2</sub> Journal of Applied Crystallography · Wiley · 1997 10.1107/s0021889896013556
  15. A profile refinement method for nuclear and magnetic structures Journal of Applied Crystallography · Wiley · 1969 10.1107/s0021889869006558
  16. The Materials Genome Initiative, the interplay of experiment, theory and computation Current Opinion in Solid State and Materials Science · Elsevier BV · 2014 10.1016/j.cossms.2014.02.003
  17. Bayesian approach to the Rietveld refinement of Poisson-distributed powder diffraction data Journal of Applied Crystallography · Wiley · 2010 10.1107/s0021889810047928
  18. Bayesian Data Analysis 1995
  19. Background estimation using a robust Bayesian analysis Journal of Applied Crystallography · Wiley · 2001 10.1107/s0021889801004332
  20. Implementation of Lamarckian concepts in a Genetic Algorithm for structure solution from powder diffraction data Chemical Physics Letters · Elsevier BV · 2000 10.1016/s0009-2614(00)00318-3
  21. Choice of collimators for a crystal spectrometer for neutron diffraction Nuclear Instruments · Elsevier BV · 1958 10.1016/0369-643x(58)90029-x
  22. A dedicated powder diffraction beamline at the Advanced Photon Source: Commissioning and early operational results Review of Scientific Instruments · American Institute of Physics · 2008 10.1063/1.2969260
  23. Direct Methods in Protein Electron Crystallography: the Ab Initio Structure Determination of Two Membrane Protein Structures in Projection using Maximum Entropy and Likelihood Acta Crystallographica Section A Foundations of Crystallography · Wiley · 1996 10.1107/s0108767396008744
  24. Introduction to the special issue for the 15th International Conference on Small-Angle Scattering (SAS2012) Journal of Applied Crystallography · Wiley · 2014 10.1107/s1600576714001770
  25. The birth of X-ray crystallography Nature · Nature Portfolio · 2012 10.1038/491186a
  26. A Bayesian Approach to Laue Diffraction Analysis and its Potential for Time-Resolved Protein Crystallography Acta Crystallographica Section A Foundations of Crystallography · Wiley · 1996 10.1107/s0108767396005648
  27. Maximum Entropy and Bayesian Statistics in Crystallography: a Review of Practical Applications Acta Crystallographica Section A Foundations of Crystallography · Wiley · 1996 10.1107/s0108767396001560
  28. A Bayesian three-stage model in crystallography Acta Crystallographica Section A · International Union of Crystallography · 1978 10.1107/s0567739478001503
  29. Size–strain line-broadening analysis of the ceria round-robin sample Journal of Applied Crystallography · Wiley · 2004 10.1107/s0021889804022551
  30. Understanding the Metropolis-Hastings Algorithm The American Statistician · Taylor & Francis · 1995 10.1080/00031305.1995.10476177
  31. <i>FOX</i>, `free objects for crystallography': a modular approach to<i>ab initio</i>structure determination from powder diffraction Journal of Applied Crystallography · Wiley · 2002 10.1107/s0021889802015236
  32. Certification of NIST Standard Reference Material 640d Powder Diffraction · Cambridge University Press · 2010 10.1154/1.3409482
  33. Bayesian inference of nanoparticle-broadened X-ray line profiles Journal of Research of the National Institute of Standards and Technology · The National Institute of Standards and Technology · 2004 10.6028/jres.109.012
  34. Combined optimization using cultural and differential evolution: application to crystal structure solution from powder diffraction data Chemical Communications · Royal Society of Chemistry · 2006 10.1039/b609138e
  35. Automatic structure determination from powder data with<i>EXPO2004</i> Journal of Applied Crystallography · Wiley · 2004 10.1107/s0021889804021417
  36. Bayesian Analysis of Ceria Nanoparticles from Line Profile Data | NIST Advances in X-ray Analysis · International Centre for Diffraction Data · 2005
  37. Numerical Analysis 1978
  38. Crystal Structure Determination from Powder Diffraction Data Chemistry of Materials · American Chemical Society · 1996 10.1021/cm960218d
  39. Advances in X-Ray Analysis Springer eBooks · Springer Nature · 1995 10.1007/978-1-4684-8631-5
  40. Crystallography matters Nature Materials · Nature Portfolio · 2014 10.1038/nmat4057
  41. The Review of Scientific Instruments Science · American Association for the Advancement of Science · 1932 10.1126/science.76.1980.535.b
  42. Bayesian Data Analysis Chapman and Hall/CRC eBooks · Informa · 2013 10.1201/b16018