computer programs
inserexs: reflection choice software for resonant elastic X-ray scattering
aUniversité de Strasbourg, CNRS, IPCMS, UMR 7504, 23 rue du Loess, Strasbourg 67200, France
*Correspondence e-mail: antonio.penacorredor@ipcms.unistra.fr
This paper presents inserexs, an open-source computer program that aims to pre-evaluate the different reflections for resonant elastic X-ray scattering (REXS) diffraction experiments. REXS is an extremely versatile technique that can provide positional and occupational information about the atoms present in a crystal. inserexs was conceived to help REXS experimentalists know beforehand which reflections to choose to determine a parameter of interest. Prior work has already proven this to be useful in the determination of atomic positions in oxide thin films. inserexs allows generalization to any given system and aims to popularize resonant diffraction as an alternative technique to improve the resolution of crystalline structures.
Keywords: inserexs; resonant elastic X-ray scattering; REXS; EXAFS; atomic positions; atomic occupancies; thin films.
1. Introduction
Precise location of atoms is crucial to explain the properties of many functional materials. In some ferromagnetic materials, the magnetic ordering can only be explained via the atomic positioning of the crystal cations (Giovannetti et al., 2011). In some ferroelectric oxides, knowing where oxygen vacancies are can be the key to understanding the phenomena behind the polar behaviour of the material (Zhou et al., 2019). Equally, in oxides with an orbitally ordered state, knowing the position of oxygen atoms allows understanding of the lattice deformations which lead to the orbital order inside the material (Ishibashi et al., 2017).
In bulk materials, X-ray diffraction (XRD) or neutron diffraction can be used to locate the different atoms that compose the crystal (Woińska et al., 2016; Shahzad et al., 2011). But these conventional diffraction methods struggle to provide the whole picture of a crystal when it is presented as a strongly orientated system (e.g. thin films) or when there is little matter to probe (e.g. nanoparticles). More adapted methods might raise some other issues. For instance, precession electron diffraction (Rotella et al., 2015) allows the crystallographic structures of thin films to be solved, but requires a tedious and destructive sample preparation process.
As an alternative, resonant elastic X-ray scattering (REXS) has shown success in locating atoms in thin films in a non-destructive and straightforward manner. REXS, also known as anomalous diffraction, combines et al., 2001). provides information about the electronic states involved in the crystal ordering, whereas XRD provides information about the spatial order. In a REXS experiment, an incident photon (of varying energy) excites a bound core electron into an unoccupied state, close to the while the orientation of the material respects the diffraction condition – the scattering vector is aimed at a specific point (RLP). The electronic transition from a ground to an strongly depends on the electronic structure of the valence shell. The electron falls back into its core ground level, re-emitting a photon of the same energy as the incoming photon (Fink et al., 2013). Since the transition takes place at a specific edge of a specific atom (among those present in the crystal), REXS is both element and orbital sensitive (Vettier, 2012). This process, as well as a visual scheme of the experimental setup, are represented in Fig. 1.
and XRD in a single experiment (HodeauBy studying the X-ray absorption near-edge structure (XANES; 50 eV around the absorption edge), a technique also known as diffraction anomalous near-edge structure (DANES), information about the et al., 2014). Beyond this edge, by scanning the extended X-ray absorption fine structure (EXAFS; 50–1000 eV above the edge), also known as extended diffraction absorption fine structure (EDAFS), we can obtain information about the chemical environment (Poineau et al., 2019). In thin films, DANES has already been used to study cation oxidation states and their occupation factors (Lefevre et al., 2017), and we have recently shown that EDAFS can be successfully used to indirectly locate the ligands of the cation (Peña Corredor et al., 2022).
of the absorbing atoms can be retrieved (KawaguchiIn contrast to conventional XRD, REXS exploits the energy dependence of the dispersive terms [f′(E) and f′′(E)] of the [] by measuring the intensity as a function of the energy at a specific RLP. These anomalous terms or the factor, however, are not the same for all the crystal reflections. As a result, to determine a certain parameter (an atom position, a site occupation), all the RLPs will not be equally useful to provide the desired information.
The symmetry conditions for an RLP to be active in diffraction experiments (allowed reflections) are determined by the crystal symmetry and the different atomic scattering factors. A reflection is `allowed' when the interference between the scattered waves is not destructive. However, the general symmetry conditions are only applicable when the equivalent positions are occupied by atoms with the same ). Moreover, if the X-ray susceptibility of the crystal is anisotropic, the forbidden reflections can be observed by characterizing the near-edge thus giving a non-zero intensity in REXS experiments (Dmitrienko, 1983). Conversely, the non-equality of the scattering factors of crystallographically equivalent atoms can cancel out the for conventionally allowed reflections. The suppression of an otherwise allowed reflection makes that reflection highly sensitive to any atomic displacement (Richter et al., 2018). In conclusion, the choice of a convenient RLP is crucial for the determination of a parameter of interest.
In fact, the interatomic interactions may break the atoms' sphericity, and the scattering factors of equivalent atoms could be different. In this case, `forbidden' reflections can have a non-zero This can happen naturally via thermal atomic vibrations or point-defects in the crystal (Dmitrienko & Ovchinnikova, 2002In an ideal case, in order to solve a crystallographic structure, one could simply measure the REXS spectra at all non-null reflections. However, in real experiments, the acquisition of DANES/EDAFS spectra at all RLPs is not possible because of the measurement times that would be required. Access to instruments that can facilitate such experiments is costly and infrequent and beam times are limited. Prior to the measurement, an experimentalist should know whether REXS experiments are suitable for their aim and decide which are the most appropriate reflections.
Here we present our application inserexs (intensity and sensitivity comparator for REXS), conceived to help REXS users decide which reflections should be explored in order to determine a certain parameter of interest.
The framework was written in Python and consists of several modules that communicate between each other, as detailed later. Implemented multithreading capability allows the simultaneous operation of the several modules that compose the general program. Simulation of the spectra is performed with the ab initio software FDMNES (Bunău & Joly, 2009), which uses time-dependant differential functional theory (TD-DFT) with the Hubbard correction (LDA+U) for the generation of spectra. The user interacts with inserexs through an intuitive graphical user interface (GUI), shown in Fig. 2, from which the user can load all the crystallographic data, specify the desired parameters from REXS and visualize the program output. The option of inserting the data without the GUI is also available. inserexs has been tested on Windows 10 and Ubuntu 20.040 LTS. At its current stage, inserexs has already accomplished the goal for which it has been designed: facilitating the choice of reflection for the determination of an atomic position or occupancy, before any real experiment takes place. Future releases will expand its current functionalities. An expanding user manual has been included in the software distribution.
2. Feature overview
2.1. Reflection choice: intensity and sensitivity
Judging the adequacy of each reflection to determine a certain parameter is the main objective of inserexs. This `usefulness' or adequacy will depend on two factors. First, the more intense a reflection, the better the signal-to-noise ratio for the measurement, and the better the spectrum fitting and the Therefore, the intensity of the reflection will be the first parameter to consider. For this intensity value, inserexs calculates the factor Fhkl = and considers the intensity to be . This allows the program to know which reflections are allowed (non-zero intensity). For such a purpose, inserexs generates all the atomic positions (from the symmetry operations and the positional information in the .cif file) and calculates Fhkl, considering the (fi) of each atom. By default, inserexs considers a reflection to be active when its intensity is larger than 0.1% of the intensity of the most intense reflection. This value can be manually changed in the intensity module.
For quick simulations, inserexs makes a rough approximation by considering the to be the number of electrons of the atom. However, on request (by selecting `Include forbidden reflections' in the GUI), inserexs can precisely calculate the fi of each atom using the numerical tables of factors calculated by the Cromer and Liberman method (Sasaki, 1989). For this last method to work, the file Sasaki_anomalous (distributed alongside inserexs) must be present in the directory where inserexs is executed. If the atom whose edge will be used for the simulations is indicated, the edge energy of that atom is used for the calculation of the Otherwise, the atomic scattering factors are calculated for an energy of 10 keV, i.e. the order of magnitude of most cation K edges (not recommended). Independently of choosing whether or not to consider the forbidden reflections, the plotted intensity will correspond to the one generated by FDMNES, for which each is individually calculated again.
Secondly, the REXS spectrum must be sensitive to the parameter of interest: if this parameter changes, the spectrum acquired at a certain reflection must also change, and the spectrum modification must allow detection of the parameter variation. For this, one can define a second parameter called `sensitivity' which considers how much spectra are altered when the desired parameter changes. These two parameters and the way in which inserexs uses them to evaluate each reflection are schematized in Fig. 3.
As shown in equation (1), the sensitivity calculation for a specific RLP compares the simulated intensity [ITS(x)] for a specific set of parameters (x) and at a specific energy E to the average simulated intensity at this specific energy, for all sets of parameters, Iav(E):
The sensitivity is proportional to the intensity since it sums the absolute spectral variation. A `normalized' sensitivity can also be proposed, which instead takes into account the relative spectral variation, as shown in equation (2):
The normalized sensitivity, however, is overestimated for reflections with a very low intensity and, as a result, the `absolute' sensitivity will be the default option for inserexs. The normalized sensitivity is also always calculated, and switching from one to the other can be done on request by checking that option on the GUI.
Prior assessment of the intensity and sensitivity of reflections has already proved useful for indicating which reflections to choose and to verify that the REXS experiments were worth performing, when we attempted to determine the position of oxygen atoms in thin films (Peña Corredor et al., 2022).
2.2. Code composition and module interaction
The program is composed of three main modules which interact with the outer program FDMNES as shown in Fig. 4. The first is the central module, whose function is to connect the rest of the modules and provide a backbone to the whole application. It is also directly linked to the GUI, where the input takes place. It is further responsible for data assembly and final display. The other two modules are in charge of obtaining the intensity and sensitivity values, respectively.
In the GUI, the user can load the crystal data as a .cif file. Alongside the inserexs main code, a `cif builder' tool has been distributed for cases where a .cif file is not available. The .cif file should follow the conventions indicated in International Tables of Crystallography (Bernstein et al., 2016). The code attempts to extract the different crystal parameters from the and these can be subsequently modified and updated directly from the GUI. Several .cif files have been successfully tested, each one with different writing styles and amounts of information. However, some lines will be mandatory for the correct functioning of inserexs. The complete list can be found in the user guide.
All the .cif file's atomic positions and symmetry operations. Then, redundant positions are removed and each unique position is used to calculate the for each reflection. By using the lattice parameters, we can verify whether the reflections are equivalent, and output those which are not. From the GUI the user can choose to either neglect all forbidden reflections or take them into account (despite not being observed in conventional XRD experiments they can sometimes be measured in REXS). A maximum value for the h, k and l values must be entered (2 by default). In order to calculate all the possible reflections, a large number should be introduced. If the forbidden reflections are considered the calculation time significantly increases. For the intensity calculation, the module calculates the Thomson component of the as well as its anomalous components (Brown et al., 2006). Then, it calculates the considering both the atomic scattering factors and the atomic positions. The output intensity has been simplified as the square of the structure factor.
information is sent to the intensity module, which uses the crystal information to obtain the intensity of the non-null reflections. For this purpose, the program generates all the atomic positions from theThe code considers a general triclinic case when angle-dependent calculations are needed for the FDMNES. The code requires the user to choose from the GUI which parameter will vary, how much it will vary, the energy range (start, stop and step) and the edge on which the simulation will take place. The user can also choose if all the parameters will vary simultaneously or if they should vary in an unrelated manner. All this information, alongside the list of active reflections, is sent to the sensitivity module so that valid FDMNES input files are generated. FDMNES is then run and generates the simulations. A cluster radius of 5 Å was chosen after multiple trials (a good compromise between exact results and reasonable calculation time). The Green formalism is used for the calculations.
The set of intensities for each reflection can be retrieved from all these steps, although similar results are produced (and faster) using the intensities given byIf the chosen edge or the chosen parameter does not respect the FDMNES output data, treats them and calculates the sensitivity as previously defined. Finally, a sensitivity versus intensity plot is shown directly in the GUI. The plot is also automatically saved in the folder where the .cif file was found.
an error arises at this point. If the process has been successful, the sensitivity module loads the2.3. Output showcase
Three examples are given in this section. They are analogous to the study we carried out on FeV2O4 (Peña Corredor et al., 2022), in which both the experimental and the theoretical spectra were shown. In the structures presented hereafter, the studied parameter directly affects the material properties, and the best reflections to study such parameters are plotted in a sensitivity versus intensity plot.
All the parameters have been modified by 1%. The results are shown in Fig. 5. An energy step of 2 eV was chosen for the simulations, for percentual variation of the indicated parameters of 1%. A maximum value of 4 for h, k and l was chosen. The first example corresponds to a DANES experiment and aims to locate the cation which is directly explored, while the two others correspond to EDAFS experiments in which cations are probed to indirectly obtain the positions or the occupancies of the oxygen atoms.
Firstly, we consider the ferroelectric oxide BaTiO3 (P4mm), whose polar behaviour can be attributed to the displacement of the Ti4+ cation in the perovskite structure (Barrett et al., 2010; Kwei et al., 1993) along the z direction. The XANES region of Ti (−50, +50 eV around the edge), which is sensitive to the cation position, has been chosen. The 022 reflection is shown to be the most sensitive to the Ti position and also the most intense, whereas the 200 reflection is just as intense but not as sensitive. Another suitable reflection would be 040, being both sensitive and intense; or 033, also sensitive to the parameter under study.
The second system is the spinel oxide CoFe2O4 (Fd3m), a hard ferromagnetic material with good electromagnetic performance (Maaz et al., 2007) and catalytic properties (Cao & Zuo, 2020). It crystallizes in a cubic spinel structure, with oxygen atoms located in the 32e position, which depends on the x parameter (x, x, x) (Wyckoff, 1931). To determine this position, the part of one of the cations could be chosen (e.g. +20, +120 eV). For this material, and in contrast to the previously studied FeV2O4 (Peña Corredor et al., 2022), the 404 reflection is the most intense and the most sensitive to the oxygen positions. The difference might arise from the difference in Fe—O polyhedral configuration: tetrahedra in FeV2O4 versus octahedra in CoFe2O4, leading to distinct signatures when the oxygen positions vary.
The third crystal studied is the ferroelectric BiFeO3 (R3c:H), whose electrical polarization and switching dynamics are highly dependent on the oxygen vacancies (Noguchi et al., 2019; Sosnowska et al., 2013). In order to determine the occupation of the oxygen site, the same conditions for the domain have been chosen at the Fe edge. The 334 reflection is clearly the most sensitive to the occupation of the oxygen atoms and is also intense enough to be considered. The 410 reflection is the most intense and also possesses significant sensitivity. In this example these two reflections are so intense and sensitive with respect to the occupation factor of the oxygen that the remaining reflections have almost zero relative intensities and sensitivities.
3. Conclusions
We have shown how the inserexs code can evaluate the active reflections of a system for a REXS experiment, considering both their intensity and how sensitive they are with respect to the studied parameter. The program has been demonstrated on three completely different materials, for three different purposes and using different simulation conditions. From a user-friendly GUI interaction, the program uses a .cif file to send the crystallographic information to its several modules, from which the intensity and sensitivity values are obtained. This program will help any potential REXS user in deciding which reflections to choose before any real experiment takes place.
4. Distribution
inserexs has an open-source code which is protected under a BSD licence at the Agence de Protéction de Programmes (French Agency for software protection; deposition No. IDDNFR001490010000SP202200031325). It is free to use or modify with the appropriate authorship recognition and can be found at https://github.com/antpeacor/inserexs.
Acknowledgements
The authors sincerely thank Yves Joly for his fruitful feedback and recommendations, as well as the inserexs alpha testers.
Funding information
This work of the Interdisciplinary Thematic Institute QMat, as part of the ITI 2021–2028 programme of the University of Strasbourg, CNRS and Inserm, was supported by IdEx Unistra (grant No. ANR 10 IDEX 0002) and the SFRI STRAT'US project (grant Nos. ANR 20 SFRI 0012; EUR QMAT ANR-17-EURE-0024) under the framework of the French Investments for the Future programme.
References
Barrett, N., Rault, J., Krug, I., Vilquin, B., Niu, G., Gautier, B., Albertini, D., Lecoeur, P. & Renault, O. (2010). Surf. Interface Anal. 42, 1690–1694. Web of Science CrossRef CAS Google Scholar
Bernstein, H. J., Bollinger, J. C., Brown, I. D., Gražulis, S., Hester, J. R., McMahon, B., Spadaccini, N., Westbrook, J. D. & Westrip, S. P. (2016). J. Appl. Cryst. 49, 277–284. Web of Science CrossRef CAS IUCr Journals Google Scholar
Brown, P. J., Fox, A. G., Maslen, E. N., O'Keefe, M. A. & Willis, B. T. M. (2006). International Tables for Crystallography, Vol. C, Mathematical, Physical and Chemical Tables, edited by E. Prince. pp. 554–595, 1st online ed. Chester: International Union of Crystallography. Google Scholar
Bunău, O. & Joly, Y. (2009). J. Phys. Condens. Matter, 21, 345501. Web of Science PubMed Google Scholar
Cao, Z. & Zuo, C. (2020). ACS Omega, 5, 22614–22620. Web of Science CrossRef CAS PubMed Google Scholar
Lefevre, C., Martin, E., Grenier, S., Roulland, F., Blanc, N., Boudet, N., Favre-Nicolin, V., Pourroy, G. & Viart, N. (2017). XII e Colloque Rayons X et Matière. LILLIAD, LILLE, 14 au 17 Novembre 2017, https://docplayer.fr/68271818-Xii-e-colloque-rayons-x-et-matiere-lilliad-lille-14-au-17-novembre-2017.html. Google Scholar
Dmitrienko, V. E. (1983). Acta Cryst. A39, 29–35. CrossRef CAS Web of Science IUCr Journals Google Scholar
Dmitrienko, V. E. & Ovchinnikova, E. N. (2002). Struct. Chem. 13, 397–404. Web of Science CrossRef CAS Google Scholar
Fink, J., Schierle, E., Weschke, E. & Geck, J. (2013). Rep. Prog. Phys. 76, 056502. Web of Science CrossRef PubMed Google Scholar
Giovannetti, G., Stroppa, A., Picozzi, S., Baldomir, D., Pardo, V., Blanco-Canosa, S., Rivadulla, F., Jodlauk, S., Niermann, D., Rohrkamp, J., Lorenz, T., Streltsov, S., Khomskii, D. I. & Hemberger, J. (2011). Phys. Rev. B, 83, 060402. Web of Science CrossRef Google Scholar
Hodeau, J.-L., Favre-Nicolin, V., Bos, S., Renevier, H., Lorenzo, E. & Berar, J.-F. (2001). Chem. Rev. 101, 1843–1867. Web of Science CrossRef PubMed CAS Google Scholar
Ishibashi, H., Shimono, S., Tomiyasu, K., Lee, S., Kawaguchi, S., Iwane, H., Nakao, H., Torii, S., Kamiyama, T. & Kubota, Y. (2017). Phys. Rev. B, 96, 144424. Web of Science CrossRef Google Scholar
Kawaguchi, T., Fukuda, K., Tokuda, K., Shimada, K., Ichitsubo, T., Oishi, M., Mizuki, J. & Matsubara, E. (2014). J. Synchrotron Rad. 21, 1247–1251. Web of Science CrossRef CAS IUCr Journals Google Scholar
Kwei, G. H., Lawson, A. C., Billinge, S. J. L. & Cheong, S. W. (1993). J. Phys. Chem. 97, 2368–2377. CrossRef ICSD CAS Web of Science Google Scholar
Maaz, K., Mumtaz, A., Hasanain, S. K. & Ceylan, A. (2007). J. Magn. Magn. Mater. 308, 289–295. Web of Science CrossRef CAS Google Scholar
Noguchi, Y., Matsuo, H., Kitanaka, Y. & Miyayama, M. (2019). Sci. Rep. 9, 4225. Web of Science CrossRef PubMed Google Scholar
Peña Corredor, A., Wendling, L., Preziosi, D., Schlur, L., Leuvrey, C., Thiaudière, D., Elklaim, E., Blanc, N., Grenier, S., Roulland, F., Viart, N. & Lefevre, C. (2022). J. Appl. Cryst. 55, 526–532. Web of Science CrossRef IUCr Journals Google Scholar
Poineau, F., Louis-Jean, J., Jang, H., Higgins, C., Balasekaran, S. M., Hatchett, D. & Sattelberger, A. P. (2019). SN Appl. Sci. 1, 1442. Web of Science CrossRef Google Scholar
Richter, C., Zschornak, M., Novikov, D., Mehner, E., Nentwich, M., Hanzig, J., Gorfman, S. & Meyer, D. C. (2018). Nat. Commun. 9, 178. Web of Science CrossRef PubMed Google Scholar
Rotella, H., Copie, O., Steciuk, G., Ouerdane, H., Boullay, P., Roussel, P., Morales, M., David, A., Pautrat, A., Mercey, B., Lutterotti, L., Chateigner, D. & Prellier, W. (2015). J. Phys. Condens. Matter, 27, 175001. Web of Science CrossRef PubMed Google Scholar
Sasaki, S. (1989). Technical Report No. 20 KEK-88-14. National Laboratory for High Energy Physics, Tsukuba, Ibaraki, Japan. Google Scholar
Shahzad, K., Khan, M. N., Shabbir, G. & Bashir, J. (2011). Ferroelectrics, 414, 155–161. Web of Science CrossRef ICSD CAS Google Scholar
Sosnowska, I., Azuma, M., Przeniosło, R., Wardecki, D., Chen, W., Oka, K. & Shimakawa, Y. (2013). Inorg. Chem. 52, 13269–13277. Web of Science CrossRef ICSD CAS PubMed Google Scholar
Vettier, C. (2012). Eur. Phys. J. Spec. Top. 208, 3–14. Web of Science CrossRef CAS Google Scholar
Woińska, M., Grabowsky, S., Dominiak, P. M., Woźniak, K. & Jayatilaka, D. (2016). Sci. Adv. 2, e1600192. Web of Science PubMed Google Scholar
Wyckoff, R. W. G. (1931). The Structure of Crystals, No. 19, p. 290. New York: The Chemical Catalog Company. Google Scholar
Zhou, Y., Zhang, Y. K., Yang, Q., Jiang, J., Fan, P., Liao, M. & Zhou, Y. C. (2019). Comput. Mater. Sci. 167, 143–150. Web of Science CrossRef CAS 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.