## research papers

## Pushing the limits of crystallography

^{a}Faculty of Physics and Applied Computer Science, AGH University of Science and Technology, Krakow, Poland^{*}Correspondence e-mail: strzalka@fis.agh.edu.pl

A very serious concern of scientists dealing with *versus* measured diffraction intensities, observed particularly in the weak reflection regime. This bias is here attributed to corrective factors for phonons and, even more distinctly, phasons, and credible proof supporting this assumption is given. The lack of a consistent theory of phasons in quasicrystals significantly contributes to this characteristic bias. It is shown that the most commonly used exponential Debye–Waller factor for phasons fails in the case of quasicrystals, and a novel method of calculating the correction factor within a statistical approach is proposed. The results obtained for model quasiperiodic systems show that phasonic perturbations can be successfully described and fits of high quality are achievable. The standard Debye–Waller factor for phonons works equally well for periodic and quasiperiodic crystals, and it is only in the last steps of a that different correction functions need to be applied to improve the fit quality.

### 1. Introduction

Crystallography deals with the solution and *Ab initio* phase measurement (Weckert & Hümmer, 1997), initially considered as an ineffective tool for structure solution mainly because of the low precision of the measurement (Shen, 2003), was subsequently shown to be useful for improving the structural resolution of NH_{4}H_{2}PO_{4} and an experimental strategy for future application was proposed (Morelhão *et al.*, 2015). The of diffraction was shown to be valid not only for the `imperfect crystal' model proposed by Darwin (1922) but also for distorted crystals (Fewster, 2016) for which the reduction of dynamical effects is significant. A diffraction experiment requires a crystalline sample (Ooi, 2010), but simulations performed on helical structures with twisted waves show the existence of constructive/destructive interference even for noncrystalline samples as long as the wave propagation and the molecules are axially aligned (Jüstel *et al.*, 2016). Another promising method for of molecular samples requires porous media to impose crystalline order (Inokuma *et al.*, 2013). The sample need not be crystalline and trace amounts are sufficient for experimental treatment. To solve highly complex structures (*e.g.* proteins, quasicrystals, complex metallic alloys), high-quality diffraction patterns are a must. The role of weak reflections is of extreme importance. The information contained in a weak reflection is of equal interest to that contained in a strong reflection. From the experimental point of view, using synchrotron radiation, it is possible to measure diffraction intensities with a of seven or more orders of magnitude, and even powder diffraction structure factors can be measured with high accuracy (Nishibori *et al.*, 2007; Wahlberg *et al.*, 2016) comparable to the dynamical *Pendellösung* method (Kato, 1988). To overcome the detector limitations it is also possible to combine datasets with different exposure times per frame or different primary beam intensities (Kuczera *et al.*, 2012, 2014). The problem lies primarily in appropriate data treatment and structure Any measured diffraction pattern is modified by factors related to the perturbations of `idealized' atom positions. A commonly used correction term is the Debye–Waller factor (Debye, 1914; Waller, 1923), which takes into account the thermal excitations of the In the simplest picture, for the sake of calculating the correction, atoms are considered to vibrate independently in a mean potential (Bürgi, 1995). Isotropic and anisotropic distributions of motion are used in practice. Restrictions on the symmetry of the anisotropic displacement tensor were developed by Thorkildsen & Larsen (2015). A recently proposed procedure based on the lattice dynamical model takes into account concerted atomic motion to properly describe the peak intensity correction (Hoser & Madsen, 2016). Although the quality of the correction is similar to that obtained using anisotropic displacement parameters, this theory cannot be directly applied to the complex structures of quasicrystals (Shechtman *et al.*, 1984; Dotera *et al.*, 2014; Engel *et al.*, 2014; Cockayne *et al.*, 2016; Förster *et al.*, 2013; Takakura *et al.*, 2007) owing to the lack of periodicity and the resulting complex atomic motion (de Boissieu, 2011, 2012). To account for the latter, a mean field approximation is the only alternative. The generalized Debye–Waller factor (Bancel, 1989; Lubensky *et al.*, 1986) can be written as , where *k* is the scattering vector magnitude in physical or perpendicular space and is the variance of the statistical distribution of atoms in physical or perpendicular space (sometimes also called inner space or phasonic space). The above formula is correct only for Gaussian distributions. As far as the phononic contribution is concerned, the approximation made by the Gaussian function is justified only for small atomic displacements from the equilibrium position. On the other hand, the description of the influence of phasonic disorder on the peaks' intensities fails significantly in the small-peak regime (Buganski *et al.*, 2016). The Debye–Waller correction with respect to phasons can be made exclusively for a random tiling type of structure (Henley *et al.*, 2001; I. Buganski, R. Strzalka & J. Wolny, unpublished). The Debye–Waller factor in generalized form can also be used to calculate the intensity of a diffraction peak related to a statistical distribution of atomic positions with respect to a reference lattice (Wolny, 1992, 1993; Wolny & Kozakowski, 2003).

In this work, we show the limitations of the standard Debye–Waller correction (exponential form) in terms of handling the phasonic disorder. We focus on quenched phasons (static or frozen phasons) appearing as atomic flips in the quasicrystalline structure with no dynamical considerations. Two motivations underlie our study. The first is to include weak reflections in the *versus* observed intensities. We attribute this fact to the improper use of the exponential Debye–Waller factor for correction for phasons. Secondly, the exponential phasonic correction term is proved to be fully valid in the random-tiling approximation but there is no proof of its correctness and physical soundness in the general case. Our study leads to a new type of formula. Weak reflections that were underestimated by the previous strategy can now be properly included in the structure In this paper we also investigate the pertinence of the Debye–Waller correction for phonons. Even though the Debye–Waller correction for phonons is applicable for quasicrystalline structures as well, which we prove in this paper, we suggest testing other functions as a small improvement can be observed for peaks with large scattering vector. The calculations are performed for vertex decoration models based on a one-dimensional Fibonacci chain and two-dimensional Penrose tiling. Neither the model selection nor its dimensionality have any impact on the generality of the results presented here, which can be used for of any structure (periodic crystals, quasicrystals, defected structures and any type of disordered systems). The choice of the Fibonacci chain as a model allows us to easily analyze the influence of both physical and perpendicular space fluctuations on the diffraction pattern. The results obtained for Penrose tiling are of significant practical importance.

### 2. AUC method

The ). For a selected scattering vector we construct a hypothetical reference lattice with a period of . The positions of the atoms with respect to the reference lattice are denoted as *u* (obviously ). The bounded distribution of *u*, denoted as *P*(*u*), is called the average (AUC). A Fourier transform of *P*(*u*) correctly describes the for any integer multiple of *k*_{0} (Wolny *et al.*, 2014, 2015). Therefore, for each distribution *P*(*u*), there exists a periodic series of diffraction peaks (see Fig. 1*b*). In the case of incommensurately modulated structures or quasicrystals another scattering vector is necessary, , also called the modulation vector or satellite peaks vector. Using two reference lattices, with periods and , we can define a probability distribution *P*(*u*,*v*). The variable *u* defines the atom position in the first reference lattice and the variable *v* that in the second. It can be easily shown that the for a scattering vector written as is an (*n*,*m*)-mode Fourier transform of the distribution *P*(*u*,*v*) (Buczek *et al.*, 2005). For incommensurately modulated structures as well as for quasicrystals, the distribution *P*(*u*,*v*) is nonzero only along certain curves. In particular, for quasicrystals scaled with the golden mean ratio τ, these are linear segments with the slope of (so-called TAU2 scaling). The distribution *P*(*u*,*v*), as well as its trace in the (*u*,*v*) domain (TAU2 scaling) and its marginal distribution *P*(*u*), is depicted in Fig. 1(*a*). For a harmonically modulated structure the scaling relation is more complicated. Details of the scaling relation and AUC construction for a harmonically modulated structure are discussed by Wolny *et al.* (2016). If the scaling property is used, the diffraction pattern calculation for a Fibonacci chain can be reduced to a one-dimensional Fourier transform (Wolny *et al.*, 2015). The marginal distribution *P*(*u*) [for the Fibonacci chain shown in Fig. 1(*a*)] of the full distribution *P*(*u*,*v*) is enough to describe the whole diffraction pattern of the structure.

Knowledge of *P*(*u*) is sufficient to calculate a full one-dimensional diffraction pattern of any In the higher-dimensional (*n*D) space approach (de Bruijn, 1981; Yamamoto, 1996; Steurer & Deloudi, 2009; Janssen & Janner, 2014), the distribution *P*(*u*) is related to the so-called in perpendicular space. It can be easily shown (Wolny *et al.*, 2002) that in the *n*D approach the AUC is an oblique projection of the on the physical space. The projection direction is perpendicular to the *n*D vector. Therefore, the choice of *n*D vector fully defines the distribution *P*(*u*) used for the diffraction pattern calculation.

### 3. Debye–Waller factor for periodic crystals

It is possible to construct the AUC for periodic crystals – it is equivalent to the traditional *P*(*u*) is given by a Dirac delta function centered at some value *u*_{0}. The Fourier transform of the Dirac delta function is constant over the whole range of the scattering vector. The diffraction pattern consists of a periodic series of peaks with periodicity of , where *a* is the lattice constant, as shown in Fig. 2. We used a relative peak intensity, *i.e.* the ratio of intensity *I*(*k*) with thermal fluctuations and idealized intensity (no thermal motion) *I*_{0}(*k*). Only peaks with *I*(*k*) > 10^{−2} in a scale reduced to *I*(*k* = 0) are shown. For a real structure the is given as a Fourier transform of the probability distribution *P*(*u*) depicted in Fig. 2 (insets). For a Gaussian probability distribution, , the is also a Gaussian function with a standard deviation . Therefore the envelope function of the diffraction peaks is given by , as shown in Fig. 2. The envelope function gives the peak intensities at the positions described by integer multiples of *k*_{0}. The above formula is known as the Debye–Waller factor and is related to the atom fluctuations in physical space (due to the thermal motion; Trueblood *et al.*, 1996). It is important to emphasize that the Debye–Waller factor in the form of a Gaussian function properly describes the reduction in peak intensities only for thermal fluctuations given by a Gaussian distribution. For other distributions a Debye–Waller factor written as a second moment of the distribution *P*(*u*) is used. The quality of such an approximation decreases for larger values of the argument . The impact of the approximation on the diffraction pattern is depicted in Fig. 2. For a Gaussian distribution we get the classical form of the Debye–Waller factor. A uniform distribution is better described by a sin(*x*)/*x* factor. Harmonic distributions, on the other hand, are best described by Bessel functions. In each case the amplitude of thermal vibrations of atoms is given by 2% of the average distance between atoms (for periodic crystals this is the cell parameter *a*). It can be said that for the considered cases the classical Debye–Waller factor works well for small corrections, whereas it performs much worse for the strong ones. Only for Gaussian distributions does the use of the classical Debye–Waller factor correctly describe the diffraction pattern. In any other case it is an approximation, which gets worse as the intensity correction increases.

### 4. Model structure – Fibonacci chain

The Fibonacci chain is a model example of a one-dimensional aperiodic (quasiperiodic) structure (Senechal, 1995; Baake & Grimm, 2013). In one-dimensional physical space the Fibonacci chain can be generated using the following recursion rules: ; . In a single step every short distance (S) becomes a long distance (L) and every long distance (L) transforms to a long–short pair (LS). It is possible to use the *n*D method presented in Fig. 3 for a description of quasicrystals. For the Fibonacci chain we use a two-dimensional square lattice. We place a so-called (AS) at every lattice node. The physical space is chosen in an incommensurate direction in the two-dimensional square lattice. In the case of the Fibonacci chain the slope of the physical space direction is equal to . This guarantees aperiodicity. The AUC probability distribution for a Fibonacci chain is shown in Fig. 1(*a*). It is a uniform distribution with a width related to the reference lattice period (Wolny, 1998). Such a probability distribution can also be understood as an oblique projection of the (Kozakowski & Wolny, 2010). The diffraction pattern can be calculated as a Fourier transform of either the AS in perpendicular space or the AUC distribution in physical space (Strzalka *et al.*, 2015). The two methods are absolutely equivalent. In the case of the AUC, calculations can be carried out knowing the distributions explicitly or, alternatively, a knowledge of the distribution's moments is also sufficient (Buganski *et al.*, 2016).

If we allow for flips in the structure of a Fibonacci chain, *i.e.* a point interchange of the form LS SL, or if during structure generation we randomly use the rule L SL instead of L LS we will obtain a defected Fibonacci chain. Such position flips are called phasons (Lipp *et al.*, 2010), and this kind of sequence formation was experimentally observed, for example, during the formation of nanodomains on the decagonal AlCuCo surface (Duguet *et al.*, 2011). In the remainder of the article we will try to describe the influence of phonons and phasons on the diffraction pattern by introducing appropriate correction terms for the intensities of diffraction peaks.

In our simulated structure we obtained the effect of phason flips by randomly swapping the neighboring distances L and S in a numerically generated structure of *n* = 70 000 points of a Fibonacci chain. We perform a flip if the value of a standard uniform random variable is greater than , where . Because each S tile potentially participates in the flip occurrence, the expected value of the number of flips is . The value in the denominator comes from the fact that the ratio of the number of tiles , and thus the probability of finding an S tile is equal to .

### 5. Debye–Waller factor for quasicrystals

In physical space the Debye–Waller factor works relatively well for narrow probability distributions, which are characteristic for ideal periodic structures, *i.e.* for periodic crystals. The issue becomes more complicated for quasicrystals. The lack of periodicity broadens the probability distributions even for ideal structures (Wolny, 1998). The scaling relation *v*(*u*) provides the best tool to consider phononic smearing of the probability distribution as it is clearly recognizable even for commensurately modulated structures, which can be considered as periodic (see Fig. 4). This additional broadening caused by phonons modifies the *P*(*u* ) distribution as indicated in Fig. 5 (insets). We need the full *P*(*u*,*v* ) distribution, depicted in Fig. 4(*b*), to properly describe the diffraction pattern. Gaussian smearing of each atomic position leads to smearing of the characteristic TAU2 scaling. The amplitude of phonons is defined again as 2% of the average distance between atoms (for a Fibonacci chain it is ). The marginal distributions are shown in Fig. 5 (insets). The use of the Debye–Waller factor calculated according to the appropriate distribution of position fluctuations yields correct intensities for all diffraction peaks. The diffraction pattern in this case is much denser than the analogous diffraction pattern for a periodic crystal (Fig. 5). This is because the diffraction pattern of a is theoretically infinitely dense (Levine & Steinhardt, 1986).

If we compare the diffraction patterns for a periodic crystal and a and 5) it is clear that for both cases the Debye–Waller factor modifies the peak intensities in the exact same manner. There are no major differences for a practical use of the phononic Debye–Waller factor for quasicrystals and periodic crystals (see Appendix *A*). The choice of the right distribution of position fluctuation with respect to the idealized structure is a major issue. This can be done by trial and error, based on the quality of the obtained fit.

In Fig. 6 we show a comparison of simulated and fitted diffraction patterns for the Fibonacci chain. For the simulated structure the atomic positions were modified by fluctuations expressed by a sine function. Then, an idealized diffraction pattern was modified by the traditional Debye–Waller factor and fitted to the simulated pattern. The agreement factor, understood as the conventional *R* factor (Prince, 2004), is 3%. If the Gaussian distribution of the Debye–Waller factor is changed to a Bessel function, the agreement factor is equal to 1.8%. In this case the improvement is caused by the use of a correction in the form of a Bessel function.

Generally, for scalable structures, the probability distributions can be lifted to higher dimensions. This leads to the so-called . It is possible to use a higher-dimensional periodic space for the description of such structures. The ASs are placed at the nodes of the higher-dimensional space. For the simplest quasiperiodic structures, like the one-dimensional Fibonacci chain, two-dimensional Penrose tiling or three-dimensional primitive icosahedral Ammann tiling, the higher-dimensional lattice is regular and the ASs are simple geometric shapes (a line section, set of four pentagons and a rhombic triacontahedron, respectively). The diffraction patterns can be calculated as Fourier transforms of these ASs for a suitable perpendicular component of the scattering vector. However, it must be emphasized that such methodology works for defect-free structures. The influence of phonons on the probability distributions is solely a physical space phenomenon. Therefore, the shape of the ASs, as part of the perpendicular space, remains unchanged under phononic disorder. The statistical method allows for incorporating phononic disorder into a structural analysis of quasiperiodic structures within one unified approach. The full mathematical justification is presented in Appendix *A*.

### 6. Phasonic Debye–Waller factor

Contemporary crystallography still struggles to find a way to describe structures with correlated disorder (Keen & Goodwin, 2015). A perfect example is the phason flip where a group of atoms rearrange their positions in a specific manner imposed by geometric restrictions (Engel & Trebin, 2008). It is believed that phasons play a crucial role in the stabilization mechanism of quasicrystals (Janssen & Janner, 2014; Kiselev *et al.*, 2012). Therefore, an appropriate treatment of diffraction data with respect to phasons is required. The growth of a itself occurs because of reconstruction of atomic positions through phason flips (Nagao *et al.*, 2015), but there exists also a theoretical possibility of perfect formation (Achim *et al.*, 2014). Phason flips occurring in the structure of quasicrystals are usually randomly distributed with a small probability of collective phason formation (Engel *et al.*, 2010). In the case of phason flips and their statistical description within the AUC concept, part of the distribution is shifted from one place to another (Fig. 7). Usually, this leads not only to a broadening of the probability distribution but also to its fragmentation. In the most popular approach, the influence of phasons on the diffraction pattern is described in the perpendicular space. A Gaussian approximation of the form leads to a Debye–Waller factor of the form , where is the perpendicular component of the scattering vector. Frequently, is a fit parameter. It is worthwhile remembering that it is only a phenomenological parameter and that the Debye–Waller factor in the form mentioned above only describes a Gaussian distribution approximation valid in the case of random tiling. For quasicrystals described by aperiodic tiling with phason disorder, such an approximation breaks down for weak reflections, which are actually in a majority (Fig. 8*a*). Replacing the underlying Gaussian distribution assumption with a more suitable one, considering cuts in the AUC, yields much better results (Fig. 8*c*). The use of the `classical' Debye–Waller factor leads to the characteristic bias for weak reflections shown in Fig. 8(*b*). Only the use of a sum of cardinal sine functions as an underlying distribution for a Debye–Waller-like correction term radically improves this problem and enables the practical use of weak reflections in the process. We emphasize that for aperiodic structures, and especially for quasicrystals, the number of weak reflections is far greater than that of strong ones. The use of weak reflections in the process is therefore of fundamental importance. In our approach, we exchange the multiplicative classical Debye–Waller factor for an additive factor based on a sum of first-order spherical Bessel functions of rank 0. This step is theoretically justified (see Figs. 7 and 9 and Appendix *B*). It is also important to stress that the characteristic bias in our model calculations is observed in modern results which make use of the standard phasonic Debye–Waller factor. As may be easily checked from real experimental data (Kuczera *et al.*, 2012, 2014), the bias is significantly larger for reflections with larger values. This observation independently confirms our hypothesis.

### 7. Model structure – Penrose tiling

The two-dimensional quasilattice can be obtained by Penrose tiling, where the nodes are spanned by two kinds of rhombuses: thick and thin, with their volume ratio given by τ. In physical space the tiling can be obtained by applying the so-called matching rules defining the mode of tile assembly to fill the plane with no holes or overlaps. Penrose tiling is widely used for the construction of a starting model for decagonal quasicrystals (Steurer & Deloudi, 2009; Kozakowski & Wolny, 2010; Takakura *et al.*, 2001). The AUC shape constructed within the statistical method takes the form of four pentagons, two smaller and two larger ones. In the *n*D approach the four pentagons decorate a four-dimensional hyperrhombohedron, which is a four-dimensional for decagonal quasicrystals. The for Penrose tiling can be expressed in the statistical method simply as a Fourier transform of the marginal distribution *P*(*u*_{ x},*u*_{ y}), which is now a two-dimensional object, since the TAU2 scaling property is the same as for the Fibonacci chain (Wolny *et al.*, 2002; Kozakowski & Wolny, 2010).

A phason flip in the case of Penrose tiling will be understood as a rearrangement of tiles such that groups of two thick and one thin rhombuses swap their positions at a certain orientation in physical space. Another possibility is the swapping of tiles in a group of two thin and one thick rhombuses. For a better understanding, the two kinds of flips are shown in Fig. 9. The rearrangement of tiles can be effectively modeled as a small shift of the inner vertex of the group of three rhombuses. The same is true in the case of the Fibonacci chain (see Fig. 7). Our calculations are performed for a structure consisting of nearly 10^{6} nodes and different probability ratios of flip occurrence, α.

### 8. Phasons for Penrose tiling

As in the case of the Fibonacci chain, for Penrose tiling phasons also cause a fragmentation of the probability distribution and some triangular parts are shifted to positions that do not constitute ideal tiling (Fig. 9). The diffraction pattern of the disordered structure can again be calculated in two ways: as a Fourier integral over all atomic positions (treated as the observed dataset) or using the fitted to the data points with a possible correction for phasons. In Fig. 10(*a*) a log–log plot of the fitted *versus* observed intensities is shown for the ideal Penrose tiling with no phason flips. The small deviation from a straight line is caused only by the finite size of the sample. If phasons are introduced into the structure, the picture looks very different. Depending on the degree of phasonic disorder the *I*_{calc} *versus I*_{obs} line gets broadened and a strong dispersion of peaks is observed, particularly in the weak reflection regime, which is clearly seen in Fig. 10(*b*). The Debye–Waller correction for phasons can now be calculated in Gaussian form again, but such an approximation does not describe all diffraction peaks correctly, as was the case for the Fibonacci chain. In the log–log plot of fitted *versus* (simulated) observed intensities a strong bias in the weak reflection regime is apparent (Fig. 10*c*). At the same time, the spread of data points along the straight line only slightly diminishes and, moreover, the fit becomes worse owing to the systematic deviation. This behavior is a well known fact in modern refinements of quasicrystalline structures (Kuczera *et al.*, 2010, 2011, 2012; Takakura *et al.*, 2007). The models using the standard phasonic Debye–Waller correction suffer from the improperly treated phasonic disorder.

The statistical method gives a perfect tool to handle phasons. Since we know how phasons affect the probability distributions, and how the we conclude that the probability distribution obtained for a Penrose tiling with phasons differs from the ideal one by the shifting apart of some triangular components. By restoring the initial distribution, *i.e.* moving the triangular parts back to their initial positions, the calculations of diffraction intensities can be performed in the same way as for a perfect Penrose tiling. Another approach is also possible. The Fourier-transformed triangular parts give an additive factor to the as was the case for the Fibonacci chain with phasons. There, the cardinal sine functions emerge from the Fourier transformation of the flat parts of the distribution shifted to new positions. The result of application of the above-mentioned approach to phasons in the Penrose tiling is shown in Fig. 10(*d*). All peaks are equally well corrected and aligned perfectly on a straight line. No bias is observed and the fit is of the same quality as for ideal Penrose tiling without phasons.

### 9. Summary

It is possible to fully reconstruct the diffraction pattern using a probability distribution of atoms in the reference lattice. For practical calculations it is sufficient to know the moments of the distribution. However, the number of moments required grows with the degree of complication of the distribution. For a Gaussian distribution knowledge of the second moment is sufficient, and the classical Debye–Waller factor is the result. In the general case the classical Debye–Waller factor is only an acceptable approximation for small corrections and it breaks down for larger corrections.

The Debye–Waller factor has two components: phononic and phasonic. The first is related to thermal motion of atoms in the (quasi)crystal structure, the other to the atomic jumps (flips, phasons). Usually, the phononic part is described in physical space and the phasonic part in the higher-dimensional perpendicular space.

Both components influence the distribution *P*(*u*,*v*). Phonons cause a small broadening of the line along the [1, 1] direction in the (*u*,*v*) reference system describing the scaling properties (the TAU2 scaling for quasicrystals based on τ; Fig. 5). Only Gaussian broadening leads to the classical Deby–Waller factor in This factor is independent of the type of the underlying structure. It is the same for all structures from periodic crystals to quasicrystals. The correct intensity reducing term depends not on the kind of structure but only on the kind of position modulation. In this paper we have presented model calculations for the distributions of atoms described by normal, uniform and harmonic distributions. For each case the use of an appropriate function is necessary to account for the intensity correction. Only the use of an appropriate correction term allows one to refine the structure against the whole measured range of diffraction intensities. To summarize, the classical phononic Debye–Waller factor works equally well for periodic crystals and for quasicrystals; however, the possible improvement of a result can be obtained by trying different correction terms, *e.g.* in the last steps of the procedures.

Completely different conclusions apply to phasonic correction. The standard (Gaussian) correction term fails in the case of quasicrystals and a new approach is needed. Our calculations for model systems – Fibonacci chain and Penrose tiling – show the problem with intensities of weak reflections, which is also a fact described in the literature. We are convinced that the characteristic bias in the fitted *versus* simulated (observed) intensities plot is caused by the incorrect Debye–Waller factor form used in the The commonly used exponential term is wrong. The argument confirming our hypothesis independently of the simulation results is that the bias concerns mostly peaks with a large perpendicular space component of the scattering vector. Such a feature is observed experimentally. If so, the correction term with perpendicular scattering vector in the exponent, as in case of the Debye–Waller factor, must fail. We have proposed a novel method of dealing with phasons, where knowing the probability distribution of atoms in the reference lattice is enough to reconstruct a full diffraction pattern of a structure with possible phason disorder. Phasons significantly influence the probability distribution by its fragmentation. Including this in a definition of automatically solves the problem of phasons at the very basic level of calculating the diffraction pattern. Neither any multiplicative correction factor nor iterative fitting of parameters in the Gaussian's exponent is required. The only free parameter to fit would be the number of phason flips, which has a physical basis. Moreover, by using a statistical method in the of structures with phason flips, very good results are achieved.

The statistical method offers the possibility to retrieve probability distributions directly from diffraction patterns (Kozakowski & Wolny, 2013). The distributions can also be modeled by some approximation techniques. One of the possible ways is to approximate the shape of the probability distribution by its histograms. This yields a correction factor described by a sum of cardinal sine functions (sin*x*/*x*). Another approach is to use the Taylor expansion of an envelope function for the moments, where an envelope function is considered a characteristic function of probability distribution. It is also possible to use projections of distributions along certain directions, which leads to a corresponding sum of components.

In conclusion, the appropriate choice of correction factor for phonons and phasons allows the inclusion of very weak reflections of the diffraction pattern in the

process of the atomic structure. It is of a great importance for such complex structures as quasicrystals or complex metallic alloys.### APPENDIX A

In order to derive the formula for the *u*_{new}, *v*_{new} in the reference lattice framework for a given position *r*:

(*n* being an integer). The coordinates *u*_{new}, *v*_{new} can be written as

where *u*, *v* denote coordinates without phononic displacement and *u*_{p}, *v*_{p} denote the displacement from the equilibrium position. The distribution *H*(*u*_{new}, *v*_{new}) is equal to the convolution of the distribution *P*(*u*, *v*) and distribution *G*(*u*_{p}, *v*_{p}) (pairs *u*, *u*_{p} and *v*, *v*_{p} are independent):

The Dirac delta function is nonzero if displacements *u*_{p} and *v*_{p} are equal. As mentioned, the is a Fourier transform of the atomic position distribution:

where *h*_{1} and *h*_{2} are diffraction peak indices (integers). Using formula (3) for the distribution *H*(*u*_{new}, *v*_{new} ) we can reformulate (4) as follows:

If we apply the coordinate change

The Jacobian of the transformation (6) is equal to 1. According to Fubini's theorem we can reshuffle the order of integration in equation (7):

The first integral in (8) describes the without the phononic contribution, and the second gives the phononic correction factor. No assumptions on the displacement distribution were used in the derivation. The result is therefore applicable for any kind of structure type including periodic ones (for *q*_{0} = 0).

### APPENDIX B

To calculate the *P*(*u* ) distribution into three regions where the distribution is uniform (Fig. 7). These regions are , , in the case of . The heights of the probability density distributions in the respective regions are and . The coefficient α is the phason flip probability. The is

Each component *F*_{n}(*k*) has the following definition:

where

*A*_{n} is the amplitude of probability distribution in the *n*th region,

*a*_{n} is the width of the *n*th region, and

*b*_{n} is the position of the center of the *n*th region.

Equation (10) is the solution of the following integral:

Using the properties of Bessel functions, (10) can be written as

where *j*_{0} denotes the spherical Bessel function of the first kind.

### Acknowledgements

The authors gratefully acknowledge support from the Polish National Science Center under grants No. DEC-2013/11/B/ST3/03787 (all) and No. 2014/13/N/ST3/03776 (RS) and the Marian Smoluchowski Krakow Research Consortium `Matter–Energy–Future' under grant KNOW (IB).

### References

Achim, C. V., Schmiedeberg, M. & Löwen, H. (2014). *Phys. Rev. Lett.* **112**, 255501. CrossRef Google Scholar

Baake, M. & Grimm, U. (2013). *Aperiodic Order*, Vol. 1, *A Mathematical Invitation.* Cambridge University Press. Google Scholar

Bancel, P. A. (1989). *Phys. Rev. Lett.* **63**, 2741–2744. CrossRef PubMed CAS Web of Science Google Scholar

Boissieu, M. de (2011). *Isr. J. Chem.* **51**, 1292–1303. Google Scholar

Boissieu, M. de (2012). *Chem. Soc. Rev.* **41**, 6778–6786. Web of Science PubMed Google Scholar

Bruijn, N. G. de (1981). *Ned. Akad. Wet. Proc. Ser. A*, **84**, 38–66. Google Scholar

Buczek, P., Sadun, L. & Wolny, J. (2005). *Acta Phys. Pol. B*, **36**, 919–933. CAS Google Scholar

Buganski, I., Strzalka, R. & Wolny, J. (2016). *Phys. Status Solidi B*, **253**, 450–457. CrossRef CAS Google Scholar

Bürgi, H.-B. (1995). *Acta Cryst.* B**51**, 571–579. CrossRef Web of Science IUCr Journals Google Scholar

Cockayne, E., Mihalkovič, M. & Henley, C. L. (2016). *Phys. Rev. B*, **93**, 020101. CrossRef Google Scholar

Darwin, C. G. (1922). *Philos. Mag. Ser.* **43**, 800–829. CrossRef CAS Google Scholar

Debye, P. (1914). *Ann. Phys.* **43**, 49. Google Scholar

Dotera, T., Oshiro, T. & Ziherl, P. (2014). *Nature*, **506**, 208–211. CrossRef CAS Google Scholar

Duguet, T., Ünal, B., Ledieu, J., Dubois, J.-M., Fournée, V. & Thiel, P. A. (2011). *Phys. Rev. Lett.* **106**, 076101. CrossRef Google Scholar

Engel, M., Damasceno, P. F., Phillips, C. L. & Glotzer, S. C. (2014). *Nat. Mater.* **14**, 109–116. CrossRef Google Scholar

Engel, M. & Trebin, H.-R. (2008). *Philos. Mag.* **88**, 1959–1965. CrossRef CAS Google Scholar

Engel, M., Umezaki, M., Trebin, H.-R. & Odagaki, T. (2010). *Phys. Rev. B*, **82**, 134206. CrossRef Google Scholar

Fewster, P. F. (2016). *Acta Cryst.* A**72**, 50–54. CrossRef IUCr Journals Google Scholar

Förster, S., Meinel, K., Hammer, R., Trautmann, M. & Widdra, W. (2013). *Nature*, **502**, 215–218. Web of Science PubMed Google Scholar

Henley, L. C., Elser, V. & Mihalkovic, M. (2001). *Z. Kristallogr.* **215**, 553–568. Google Scholar

Hoser, A. A. & Madsen, A. Ø. (2016). *Acta Cryst.* A**72**, 206–214. CrossRef IUCr Journals Google Scholar

Inokuma, Y., Yoshioka, S., Ariyoshi, J., Arai, T., Hitora, Y., Takada, K., Matsunaga, S., Rissanen, K. & Fujita, M. (2013). *Nature*, **495**, 461–466. Web of Science CSD CrossRef CAS PubMed Google Scholar

Janssen, T. & Janner, A. (2014). *Acta Cryst.* B**70**, 617–651. Web of Science CrossRef IUCr Journals Google Scholar

Jüstel, D., Friesecke, G. & James, R. D. (2016). *Acta Cryst.* A**72**, 190–196. CrossRef IUCr Journals Google Scholar

Kato, N. (1988). *Aust. J. Phys.* **41**, 337–350. CrossRef CAS Google Scholar

Keen, D. A. & Goodwin, A. L. (2015). *Nature*, **521**, 303–309. Web of Science CrossRef CAS PubMed Google Scholar

Kiselev, A., Engel, M. & Trebin, H.-R. (2012). *Phys. Rev. Lett.* **109**, 225502. CrossRef Google Scholar

Kozakowski, B. & Wolny, J. (2010). *Acta Cryst.* A**66**, 489–498. Web of Science CrossRef CAS IUCr Journals Google Scholar

Kozakowski, B. & Wolny, J. (2013). *Aperiodic Crystals*, edited by S. Schmied, R. Lifshitz & R. L. Withers, pp. 125–132. Dordrecht: Springer. Google Scholar

Kuczera, P., Kozakowski, B., Wolny, J. & Steurer, W. (2010). *J. Phys. Conf. Ser.* **226**, 012001. CrossRef Google Scholar

Kuczera, P., Wolny, J. & Steurer, W. (2012). *Acta Cryst.* B**68**, 578–589. Web of Science CrossRef CAS IUCr Journals Google Scholar

Kuczera, P., Wolny, J. & Steurer, W. (2014). *Acta Cryst.* B**70**, 306–314. Web of Science CrossRef IUCr Journals Google Scholar

Levine, D. & Steinhardt, P. J. (1986). *Phys. Rev. B*, **34**, 596–616. CrossRef CAS Web of Science Google Scholar

Lipp, H., Engel, M., Sonntag, S. & Trebin, H.-R. (2010). *Phys. Rev. B*, **81**, 064302. CrossRef Google Scholar

Lubensky, T. C., Socolar, E. S., Steinhardt, P. J., Bancel, P. A. & Heiney, P. A. (1986). *Phys. Rev. Lett.* **57**, 1440–1443. CrossRef CAS Google Scholar

Morelhão, S. L., Amirkhanyan, Z. G. & Remédios, C. M. R. (2015). *Acta Cryst.* A**71**, 291–296. CrossRef IUCr Journals Google Scholar

Nagao, K., Inuzuka, T., Nishimoto, K. & Edagawa, K. (2015). *Phys. Rev. Lett.* **115**, 075501. CrossRef Google Scholar

Nishibori, E., Sunaoshi, E., Yoshida, A., Aoyagi, S., Kato, K., Takata, M. & Sakata, M. (2007). *Acta Cryst.* A**63**, 43–52. Web of Science CrossRef CAS IUCr Journals Google Scholar

Ooi, L. (2010). *Principles of X-ray Crystallography.* Oxford University Press. Google Scholar

Prince, E. (2004). Editor. *International Tables for Crystallography*, Vol. C, *Mathematical, Physical and Chemical Tables*, 3rd ed. Dordrecht: Kluwer Academic Publishers. Google Scholar

Senechal, M. (1995). *Quasicrystals and Geometry.* Cambridge University Press. Google Scholar

Shechtman, D. S., Blech, I., Gratias, D. & Cahn, J. W. (1984). *Phys. Rev. Lett.* **53**, 1951–1953. CrossRef CAS Google Scholar

Shen, Q. (2003). *Acta Cryst.* A**59**, 335–340. Web of Science CrossRef CAS IUCr Journals Google Scholar

Steurer, W. & Deloudi, S. (2009). *Crystallography of Quasicrystals.* Berlin, Heidelberg: Springer-Verlag. Google Scholar

Strzalka, R., Buganski, I. & Wolny, J. (2015). *Acta Cryst.* A**71**, 279–290. CrossRef IUCr Journals Google Scholar

Takakura, H., Gómez, C. P., Yamamoto, A., De Boissieu, M. & Tsai, A. P. (2007). *Nat. Mater.* **6**, 58–63. CrossRef CAS Google Scholar

Takakura, H., Yamamoto, A. & Tsai, A. P. (2001). *Acta Cryst.* A**57**, 576–585. Web of Science CrossRef CAS IUCr Journals Google Scholar

Thorkildsen, G. & Larsen, H. B. (2015). *Acta Cryst.* A**71**, 467–470. CrossRef IUCr Journals Google Scholar

Trueblood, K. N., Bürgi, H.-B., Burzlaff, H., Dunitz, J. D., Gramaccioli, C. M., Schulz, H. H., Shmueli, U. & Abrahams, S. C. (1996). *Acta Cryst.* A**52**, 770–781. CrossRef CAS Web of Science IUCr Journals Google Scholar

Wahlberg, N., Bindzus, N., Bjerg, L., Becker, J., Dippel, A.-C. & Iversen, B. B. (2016). *Acta Cryst.* A**72**, 28–35. CrossRef IUCr Journals Google Scholar

Waller, I. (1923). *Z. Phys.* **17**, 398–408. CrossRef CAS Google Scholar

Weckert, E. & Hümmer, K. (1997). *Acta Cryst.* A**53**, 108–143. CrossRef CAS Web of Science IUCr Journals Google Scholar

Wolny, J. (1992). *Acta Cryst.* A**48**, 918–921. CrossRef CAS Web of Science IUCr Journals Google Scholar

Wolny, J. (1993). *J. Phys. Condens. Matter*, **5**, 6663–6672. CrossRef CAS Google Scholar

Wolny, J. (1998). *Philos. Mag. A*, **77**, 395–412. Web of Science CrossRef CAS Google Scholar

Wolny, J., Buganski, I. & Strzalka, R. (2016). *Philos. Mag.* **96**, 1344–1359. CrossRef CAS Google Scholar

Wolny, J. & Kozakowski, B. (2003). *Acta Cryst.* A**59**, 54–59. Web of Science CrossRef CAS IUCr Journals Google Scholar

Wolny, J., Kozakowski, B., Kuczera, P., Pytlik, L. & Strzalka, R. (2014). *Acta Cryst.* A**70**, 181–185. CrossRef IUCr Journals Google Scholar

Wolny, J., Kozakowski, B. & Repetowicz, P. (2002). *J. Alloys Compd.* **342**, 198–202. Web of Science CrossRef CAS Google Scholar

Wolny, J., Kuczera, P. & Strzalka, R. (2015). *Appl. Phys. Lett.* **106**, 131905. CrossRef Google Scholar

Yamamoto, A. (1996). *Acta Cryst.* A**52**, 509–560. CrossRef CAS Web of Science IUCr Journals Google Scholar

This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.