computer programs
InteractiveXRDFit: a new tool to simulate and fit X-ray diffractograms of oxide thin films and heterostructures
aDQMP, University of Geneva, 24 Quai Ernest Ansermet, Geneva 4, 1211, Switzerland
*Correspondence e-mail: celine.lichtensteiger@unige.ch
InteractiveXRDFit is a custom-made MATLAB program that calculates the X-ray diffracted intensity for oxide thin films and heterostructures based on a library of inorganic materials.
Keywords: simulation; X-ray diffractograms; heterostructures; epitaxial structures; c-axis parameter.
1. Introduction
With recent advances in deposition techniques, artificial materials can be produced with atomic scale control, creating new functional materials with tailored electronic properties. These fascinating materials can be studied with a plethora of advanced techniques. Independent of their properties, their characterization usually starts with conventional X-ray diffraction (XRD) to attest their crystalline quality. Indeed, most crystal-growth laboratories are equipped with X-ray diffractometers, standard instruments that are relatively inexpensive, fast and non-invasive.
Based on these observations, the program InteractiveXRDFit was developed to allow the user to simulate the (00L) diffractogram of heterostructures combining different materials grown on different substrates (L is defined in Fig. 2). The user can choose the substrate and the different materials composing a heterostructure from a long list of compounds (mainly perovskite oxides), choose between (001) or (111) substrate orientation, and play with the different structural parameters (unit-cell size and number of layers). It is possible to build a composed of up to three different materials, and to add a top and/or bottom layer (to simulate electrodes, spacers or capping layers). The simulation is quick and allows the user to compare it directly with experimental measurements, so as to give a rapid determination of the crystalline parameters of the sample.
This paper describes the program, how to use it and how it is constructed, with an example for illustration.
2. Technical details
InteractiveXRDFit was written using MATLAB R2015b (The MathWorks Inc., Natick, MA, USA) for Mac. It is compatible with Linux, Unix, Mac OS and Windows. The version available at the date of publication of this paper can be found in the supporting information. However, this program is constantly being adapted to suit users' needs, and anyone interested in using the latest release can obtain it from GitHub. If the user does not already have an account, he/she should start by creating a personal GitHub account (for free): https://github.com. The user should then request access to InteractiveXRDFit.
The user can then download every file for the latest version of the program, open MATLAB on his/her computer and run InteractiveXRDFit.m.
3. Program use
Once the user runs InteractiveXRDFit.m, three windows will appear:
(i) the XRD fitting parameters window (Fig. 1a),
(ii) the c display (Fig. 1c), and
(iii) the fit display (Fig. 1b).
3.1. The XRD fitting parameters window
From the XRD fitting parameters panel (Fig. 1a), the user has the following options:
(i) Quit the program.
(ii) Load data to be fitted (has to be a .csv file). When loading data for comparison, two vertical green lines are displayed together with the data (in red) and the simulation (in blue). They delimit the region over which the r.m.s. values are evaluated [see equations (12) and (13)].
(iii) Export the fit (as a .csv file).
(iv) Choose the parameters describing the heterostructure.
The heterostructure can be composed of
(a) a substrate,
(b) a bottom layer,
(c) a composed of up to three different materials, and
(d) a top layer.
Substrates can be chosen from DyScO3, GdScO3, KTaO3, LaAlO3, LaSrAlO4, LSAT [(LaAlO3)0.3(Sr2AlTaO6)0.7], NdAlO3, NdGaO3, Si, SrTiO3, TbScO3 and YAlO3.
Layer materials can be chosen from AlO2, BaO, BaTiO3, BiFeO3, CaCuO2, LaAlO3, La2CuO4, LaFeO3, LaMnO3, LaNiO3, La2NiMnO6, LaO, LSMO (La0.67Sr0.33MnO3), MnO, MnO2, MnTiO3, NiO2, NdNiO3, Nd2NiMnO6, NdO, PbO, PbTiO3, (PbxSr1−x)TiO3, Pb(ZrxTi1−x)O3, PrBa2Cu3O7, RuO2, SmNiO3, SrO, SrO2, SrRuO3, SrTiO3, SrVO3, TiO2, VO2, YBa2Cu3O7 and ZrO2.
For each layer, the user can define the number of unit cells and the c-axis value. The c-axis value either can be a constant (in most cases) or can vary as a function of depth within a layer (as will be discussed in the example in §7).
3.2. The c display
The c-axis value is then displayed on a separate graph (Fig. 1c) to help visualize the evolution of the c axis throughout the heterostructure.
3.3. The fit display
The XRD intensity is calculated and displayed in the fit display window (Fig. 1b) after each modification of a parameter, to follow rapidly any changes in intensity as a function of the different parameters and compare the simulations with the measurement. In this window, one can display the data as a function of either 2θ (as defined in Fig. 2) or reciprocal L, change the limits for the graph, and change the scaling of the calculated intensity for better comparison with the measurement.
4. Calculations
4.1. XRD measurement geometry
The calculations use Bragg's law of reflection, represented schematically in Fig. 2. A parallel incoming beam is reflected by the atomic planes. Two such beams are represented in blue in Fig. 2(a), the lower one having to cover a longer distance (in red) equal to 2dsinθ. The beams are characterized by their wavelength λ and their wavevectors k = . If the path difference corresponds to a multiple of the X-ray wavelength λ, the different beams will interfere constructively, resulting in a peak in the X-ray reflection. This is the famous Bragg diffraction law,
In k′ − k = Q, where Q is a Bravais vector of the as shown in Fig. 2(b). Further details can be found in the work of Ashcroft & Mermin (1976).
this condition is equivalent toBragg's law tells us whether or not the conditions are met for diffraction to be observed. The intensity of this diffraction is calculated below using a bottom-up approach, starting with the contribution from individual atoms, then looking at the contribution from a group of atoms organized into a
and finally building the whole heterostructure to get the total response of the whole sample.4.2. Atomic scattering factors
The atomic scattering factors f are calculated using the formula
where the values for the parameters αi, βi and γ are found in International Tables for Crystallography, Vol. C (Brown et al., 2006). (Note that the values used are for neutral atoms. The scattering factor values change if one uses ions, but this change will be small and will only affect the relative intensities and not the peak positions.) θ is the diffraction angle and λ the wavelength of the diffracted beam (here λ = 0.15406 nm), as described in Fig. 2. This is done for a number of atoms: Al, Ba, Bi, Ca, Cu, Dy, Fe, Ga, Gd, K, La, Mn, Nd, Ni, O, Pb, Pr, Ru, Sc, Si, Sm, Sr, Ta, Tb, Ti, V, Y and Zr. Others will be added on request. In the case of alloying on an atomic site, an effective is created by taking the weighted average of the atomic scattering factors for the respective individual atoms.
4.3. Structure factors
The
is then obtained for each using the Wyckoff positions within this cell:where N is the number of atoms in the and Q is a Bravais vector of the also known as the momentum transfer [||Q|| = 4πsin(θ)/λ]. Since this program evaluates the Bragg diffraction along the Q direction as shown in Fig. 2(b), only the z value for the different atoms and the distance d between equivalent planes of the corresponding material are needed:
A few examples are described below.
4.3.1. Perovskite structure
Most of the materials used in this program have a perovskite structure ABO3, as shown in Fig. 3. For simplification, we will consider a simple cubic perovskite structure with c. In the (001) orientation (Fig. 3, top), the atoms are in the positions shown in Table 1 (in lattice parameter units c).
|
The F is then
In the (111) orientation (Fig. 3, bottom), one has to consider not one but three unit cells with the atoms in the positions shown in Table 2 (in lattice parameter units). In the x, y and z directions, the lattice parameter units are equal to c(2)1/2, c(2)1/2 and c/(3)1/2, respectively, where c is the lattice parameter of the unit cell.
|
One can easily see that the positions along z of the groups of atoms (A2 O4 O5 O6 B2) and (A3 O7 O8 O9 B3) are equivalent to (A1O1 O2 O3 B1). We therefore use the first set of five atoms as our to calculate the F:
4.3.2. LaSrAlO4 substrate
LaSrAlO4 is a tetragonal material used as a substrate, with a = b = 3.75576 Å and c = 12.6377 Å, as shown in Fig. 4. In the (001) orientation, the atoms are at the positions shown in Table 3 (in lattice parameter units).
|
The F is then
4.4. Scattering amplitude and scattered intensity
In the kinematic theory of diffraction, the scattering amplitude g for the whole heterostructure is then obtained by adding the contributions from each layer. However, this neglects the effects associated with the absorption of the beam as it passes through the sample, or the reduction in intensity due to scattering and diffraction. The dynamic theory of diffraction takes these effects into account, but involves a degree of complexity that is beyond the scope of this program (Zachariasen, 1945). Here, we chose an intermediate approach consisting of modifying the kinematic approach by adding an attenuation factor to take absorption effects into account. The scattering amplitude is then
where Zj is the position of the jth layer in the z direction, T is the total sample thickness and μ is the The first exponential term takes into account the correct phase depending on the position of the considered layer in the structure. The second exponential term takes into account the reducing the intensity of the contribution of the deeper layers. A penetration factor μ = 1.5 × 104 Å is used, as it was found to give a better representation for the substrate intensities.
The scattered intensity is then just I = gg*, and it is renormalized to a maximum intensity equal to 1, allowing comparison with the measurements that are also renormalized.
5. Program organization
An important part of the program is dedicated to the graphical user interface (GUI) providing point-and-click control of the program, so that the user can run the application with no need to learn the MATLAB language or type commands.
Other parts of the program calculate the atomic scattering factors, structure factors, scattering amplitude and scattered intensity of the heterostructure built by the user. In order to save time, the substrate scattering amplitudes have all been calculated beforehand and are uploaded by the program.
The program is composed of the following MATLAB scripts and functions:
(i) InteractiveXRDFit.m. This is the heart of the program. It initializes all the variables and creates the GUI.
(ii) Substrate.m. This script loads the correct substrate data and intensity (from Substrates.mat) depending on the user's choice.
(iii) GenerateSubstrates.m. This script generates the XRD intensities for different substrates. It is never called from the other scripts. This is the script that was used to calculate the substrate scattering amplitudes beforehand in order to save time (saved in Substrates.mat). It is made available only for the sake of completeness.
(iv) PlotFitAndData.m. This script plots the calculated XRD intensities on the fit display panel. If the user has loaded a measurement for comparison, this script also displays the measured XRD intensities, together with the lines delimiting the region over which the RMS (root mean square) is evaluated. On the c display panel, it plots the x-axis profile of the simulated heterostructure.
(v) ProgcNSimu.m. This script calculates the XRD intensity and c-axis profile of the heterostructure defined by the user. It is used every time the user modifies a parameter in the XRD fitting parameters panel.
(vi) expzm.m. This function calculates the contribution from each layer material to the diffracted intensity.
(vii) FLayer.m. This function calculates the form factors of the different materials depending on their crystallographic structures. `z' are the out-of-place atomic positions in the different unit cells, expressed in relative unit cells.
(viii) StructureFactor.m. This function calculates the for materials with a perovskite structure (other structures are calculated directly within FLayer.m).
(ix) AtomicScatteringFactor.m. This function calculates the different atomic scattering factors used in this program, based on International Tables for Crystallography, Vol. C.
(x) RMS.m. This script is used to calculate the RMS of the pairwise differences of the fit and measurement,
and RMS(log), the RMS of the pairwise differences of the log of the fit and the log of the measurement,
The user can change the region delimited by xmin and xmax over which the RMS and RMS(log) values are calculated (shown by vertical green lines on the fit display panel). This is done only if the user loads measured data, to compare them with the fit.
6. Program limitations and future developments
As discussed in §4.4, we chose an intermediate approach between the two limits of the kinematic and dynamic X-ray diffraction theories. Additionally, there are many factors that affect the diffracted intensity which are not taken into account here, such as beam size, sample alignment, surface and interface roughness, relaxation and rumpling, mosaicity, off-stoichiometry, vacancies, vicinality, and defects. Some of these factors will be added to future versions of the program. These simplifications were implemented in order to obtain a practical program that reproduces the main features of an XRD pattern, allowing the user to simulate quickly complex heterostructures with a limited number of adjustable parameters describing in the most convenient way the structure of the desired materials.
7. Example: constant versus depth-varying c-axis value
An interesting example is shown in Fig. 5. In a series of PbTiO3 samples grown on SrTiO3 substrates, standard simulations (i.e. with a constant c-axis value) were not giving satisfactory results. This is shown in Fig. 5 (top), where a simulation for PbTiO3 with N = 127 unit cells and c = 4.139 Å (in blue) is compared with the measurement (in red). The value of c is determined by the PbTiO3 peak position and the number of unit cells is optimized to fit the finite size oscillations. However, the width of the simulated film peak is narrower than the measured one, and the oscillations to the right of the film peak are less intense than the measured ones.
The option to fit the diffractogram using a depth-varying c-axis value described with an exponential function was added to the program. The result obtained for N = 125 and cz = −0.079exp(−z/20) + 4.146 Å (corresponding to an average value of c = 4.134 Å) is shown in Fig. 5 (bottom), demonstrating the better agreement between the simulation and the measurement. In addition to the good match with the finite size oscillations and the peak position, the shape of the peak and the intensity of the oscillations on the right of the film peak are also now perfectly matching.
8. Conclusions
The program InteractiveXRDFit was developed to answer the need for users to simulate rapidly the (00L) diffractogram of heterostructures combining different materials grown on different substrates.
Other fitting programs are already available and they are efficient, but they may lack some flexibility with some of the parameters that this program allows to be modified. For example, Epitaxy (https://www.malvernpanalytical.com/en/products/category/software/X-ray-diffraction-software/epitaxy) from Malvern Panalytical allows thorough analysis of X-ray diffraction data with efficient fitting procedures, taking the instrumental details (background, divergence and intensity) into account and allowing the user to determine the sample structure properties (layer density, thickness and roughness), but the materials data remain fixed as they are in the materials database. SUPREX (Fullerton et al., 1992) and CADEM (Komar & Jakob, 2017) are other examples of programs calculating X-ray diffraction from epitaxial layers, with SUPREX very useful for high-Tc superconductor superlattices, and CADEM focusing on half-Heusler superlattices such as HfNiSn/TiNiSn. While SUPREX was written in Fortran and in Turbo Pascal, CADEM was written using MATLAB and can be adapted to other materials as well. The interested user might also want to try COBRA (Yacoby et al., 2002), a phase-retrieval algorithm that has proved to be useful in the study of buried interfaces in epitaxial heterostructures; GenX (https://genx.sourceforge.net), a versatile program using the differential evolution algorithm for fitting X-ray and neutron reflectivity data as well as surface X-ray diffraction data (Björck & Andersson, 2007); or the xrayutilities (https://xrayutilities.sourceforge.io/index.html) Python scripts for assisting X-ray diffraction experiments.
InteractiveXRDFit is simple to use and has the advantage of allowing the user to carry out rapid simulations of different heterostructures and see how changing the parameters modifies the diffractogram for a better understanding of the measurements.
Additionally, it can be easily adapted to the user's needs, with more materials and functionalities added on demand. Requests for any new requirements are most welcome.
Supporting information
App allowing direct installation of the free-standing executable of the program. DOI: https://doi.org/10.1107/S1600576718012840/vh5084sup1.zip
MATLAB main program InteractiveXRDFit.m, 9 MATLAB sub-programs and file containing the calculated intensities of the different substrates (Substrates.mat). DOI: https://doi.org/10.1107/S1600576718012840/vh5084sup2.zip
Acknowledgements
The author would like to thank all the members of the groups of Professor Jean-Marc Triscone and Professor Patrycja Paruch for their useful remarks and motivating requests when using this program from its early infancy up to this current stage. Thanks also go to Arnoud Everhardt and Jorrit Hortensius for their support and enthusiasm.
Funding information
This work was supported by the Swiss National Science Foundation through Division II. The research leading to these results received funding from the European Research Council under the European Union's Seventh Framework Programme (FP7/2007–2013)/ERC grant agreement No. 319286 (Q-MAC).
References
Ashcroft, N. W. & Mermin, N. D. (1976). Solid State Physics. Philadelphia: Saunders College Publishing. Google Scholar
Björck, M. & Andersson, G. (2007). J. Appl. Cryst. 40, 1174–1178. Web of Science CrossRef IUCr Journals Google Scholar
Brown, P., Fox, A., Maslen, E., O'Keefe, M. & Willis, B. (2006). International Tables for Crystallography, Vol. C, ch. 6.1, 1st online ed. Chester: International Union of Crystallography. Google Scholar
Fullerton, E. E., Schuller, I. K., Vanderstraeten, H. & Bruynseraede, Y. (1992). Phys. Rev. B, 45, 9292–9310. CrossRef CAS Web of Science Google Scholar
Komar, P. & Jakob, G. (2017). J. Appl. Cryst. 50, 288–292. Web of Science CrossRef IUCr Journals Google Scholar
Momma, K. & Izumi, F. (2011). J. Appl. Cryst. 44, 1272–1276. Web of Science CrossRef CAS IUCr Journals Google Scholar
Weymann, C., Lichtensteiger, C., Fernandez-Peña, S., Triscone, J.-M. & Paruch, P. (2018). In preparation. Google Scholar
Yacoby, Y., Sowwan, M., Stern, E., Cross, J. O., Brewe, D., Pindak, R., Pitney, J., Dufresne, E. M. & Clarke, R. (2002). Nat. Mater. 1, 99–101. Web of Science CrossRef PubMed CAS Google Scholar
Zachariasen, W. H. (1945). Theory of X-ray Diffraction in Crystals. Chichester: Wiley. 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.