Density Functional Theory Based Methods for the Calculation of X-ray Spectroscopy

The availability of new light sources combined with the realisation of the unique capabilities of spectroscopy in the X-ray region has driven tremendous advances in the field of X-ray spectroscopy. Currently, these techniques are emerging as powerful analytical tools for the study of a wide range of problems encompassing liquids, materials and biological systems. Time-resolved measurements add a further dimension to X-ray spectroscopy opening up the potential to resolve ultrafast chemical processes at an atomic level. X-ray spectroscopy encompasses a range of techniques which provide complementary information, these include X-ray photoelectron spectroscopy (XPS), X-ray absorption spectroscopy (XAS), X-ray emission spectroscopy (XES) and resonant inelastic X-ray scattering (RIXS). In many studies the interpretation of the experimental data relies upon calculations to enable the nature of underlying molecular structure, electronic structure and bonding to be revealed. Density functional theory (DFT) based methods are one of the most widely used methods for the simulation of X-ray spectra. In this Account, we focus on our recent contributions to the simulation of a range of X-ray spectroscopic techniques using DFT and linear-response time-


Introduction
In recent years the advances in the intensity and resolution that can be achieved with synchrotron radiation has resulted in a surge in interest in spectroscopic techniques in the X-ray region. Exploiting spectroscopy involving core electrons has several advantages, the large energy difference between core orbitals of different elements and their spatially local nature results in the techniques being element specific. Furthermore, the lifetime of the core-hole states allows processes to be probed on an ultrafast timescale. Figure 1 illustrates four widely used X-ray spectroscopic techniques, namely X-ray photoelectron spectroscopy (XPS), nearedge X-ray absorption fine structure (NEXAFS), X-ray emission spectroscopy (XES) and resonant inelastic X-ray scattering (RIXS). XPS monitors the photoionised core-electrons and provides a sensitive probe of the chemical environment of the nuclei. X-ray absorption spectroscopy encompasses a range of techniques, but of particular relevance here is NEXAFS which corresponds to the spectroscopic structure around the absorption edge arising from the excitation of core electrons to low lying unoccupied orbitals to give bound states below the ionisation threshold. XES measures the emission following the ionisation of a core-electron as electrons in higher lying orbitals relax to fill the core-hole. XES is complementary to NEXAFS since it probes the occupied orbitals, while NEXAFS probes the unoccupied orbitals. In RIXS an incident X-ray photon is scattered by the core excited states leading to fluorescent decay and the emission of a photon.
The interpretation of X-ray spectra can be challenging and calculations often play a critical role in revealing the information contained within the spectra. There has been an intense effort towards developing quantum chemical based methods for the treatment of core-electron spectroscopies. These can be based on the many electron wavefunction such as complete active space self-consistent field with multiconfigurational perturbation theory, 1 coupled cluster [2][3][4][5] and the algebraic diagrammatic construction (ADC) based method, 6,7 and a review of these methods is available elsewhere. 8 Our work has concentrated on the  Figure 1: Schematic diagrams illustrating X-ray photoelectron spectroscopy (XPS), X-ray absorption spectroscopy (XAS), X-ray emission spectroscopy (XES) and resonant inelastic X-ray scattering (RIXS). description of core-electron spectroscopies within the framework of density functional theory (DFT). The main advantage of DFT is its computational cost which allows large systems to be studied more readily. However, the use of an approximate treatment of the exchangecorrelation term introduces a number of problems that become evident in the context of X-ray spectroscopy. In this Account, our recent developments in the application of DFT based methods for studying a variety of X-ray spectroscopies for exciting electrons from the 1s orbital, the so-called K-edge, are described.
Within DFT, excited states are usually studied using linear response time-dependent density functional theory (TDDFT) through the Random Phase Approximation (RPA) form and i are the orbital energies and E XC is the exchange correlation functional. To determine X-ray absorption spectra efficiently, it is usual to limit the single excitation space to include only excitations from the relevant core orbitals, 10 Alternative approaches to describing excited states within DFT are becoming increasing well established. One common strategy is to converge the DFT calculation to describe an excited state directly, 14 one example of this is the maximum overlap method (MOM) which uses an overlap criterion to maintain the excited state during the self-consistent field calculation and this approach has been applied to study core-excited states. 15 Calculations of X-ray spectroscopies can be performed using a variety of software packages, however, the calculations and developments discussed here use the Q-Chem software package. 16 Relativistic effects also become an important consideration for calculations of core-electron spectroscopies. For studies at the K-edge, these effects lead to a lowering of the energy of the 1s orbital, and this can be accounted for by applying a constant energy shift to the computed transition energies. For other edges, for example the L-edge, the effects of spin-orbit coupling become significant which necessitates a more sophisticated treatment.

X-ray Absorption Spectroscopy (XAS)
X-ray absorption spectra contain two different regions, the region near the absorption edge which is described in NEXAFS spectroscopy and the region at higher energies which is referred to as extended X-ray absorption fine structure (EXAFS). NEXAFS corresponds to formation of bound states below the ionisation threshold which can be described by TDDFT, whereas EXAFS arises from the scattering of the ionised electron and is not described by standard TDDFT approaches, but alternative methods for describing the EXAFS region are widely used. 17 It has been well established in the literature that core-excitation energies predicted by TDDFT with generalised gradient approximation (GGA) and hybrid functionals lead to a systematic underestimation of the experimentally observed values which increases as the nuclear charge of the absorbing atom increases. 18 The size of the error ranges from about 11 eV for the carbon K-edge to over 100 eV for the Cu K-edge for a hybrid functional such as B3LYP. One approach to this is to apply energy shifts to the calculated spectra. 19,20 We have been interested in understanding the origin of this error and designing exchangecorrelation functionals that reproduce experimental spectra without the need to apply an energy shift.
The underestimation of the core-excitation energies is a manifestation of the self-interaction error associated with the approximate treatment of the exchange energy. Several groups have addressed this through the development of new functionals or the introduction of a selfinteraction correction. [21][22][23][24] Our approach built on an analogy with the treatment of charge transfer excitations and introduced short-range corrected exchange-correlation functionals for core-excitations. 25 In one of these functionals, denoted SRC1, the 1/r 12 operator in the evaluation of the exchange energy is partitioned using the error and complementary error functions as follows: Treating the first and third terms of equation 7 with HF exchange and the remaining terms with DFT exchange leads to the following functional This functional introduces a number of parameters, C SHF , C LHF , µ SR and µ LR . C SHF and C LHF are the fraction of HF exchange at r 12 = 0 and r 12 = ∞, respectively, while µ SR and µ LR are the attenuation parameters for the short and long range exchange contributions. The four parameters were fitted to reproduce experimental core-excitation energies. Two sets of parameters were obtained, one appropriate for the K-edge of elements Li -Ne, denoted SRC1r1 and one for heavier elements denoted SRC1r2. The primary difference between these functionals is that SRC1r2 has a significantly greater proportion of HF exchange at short-range.
These functionals have been used in a number of studies. [26][27][28][29][30][31] This includes the study of ionic liquids (ILs) and biological systems, which are illustrated in Figure 2. ILs are composed entirely of mobile ions and the large number of potential ILs that can be generated allows the physiochemical properties to be controlled leading to a wide range of potential applications.
We have studied the NEXAFS spectra of 12 ILs at the nitrogen and sulphur K-edges. 26 A close agreement with experiment was found when the ion-pair was considered, and significant conformational dependence of the spectra was observed for some ILs. occupied molecular orbital (SOMO) which can be described as an anti-bonding combination of the Cu 3d x 2 −y 2 and S cys 3p π orbitals for plastocyanin and Cu 3d x 2 −y 2 and S cys 3p σ orbitals for nitrosocyanin (see figure 2). The calculations predict a greater intensity for plastocyanin compared with nitrosocyanin, consistent with experimental measurements, indicating a greater sulphur 3p content of the SOMO in plastocyanin. The ability of NEXAFS spectroscopy to differentiate between different elements of protein secondary structure has also been studied, 29 where the greatest sensitivity to secondary structure was found at the nitrogen K-edge associated with the intense bands arising from N(1s)→ π * C=O transitions.
The underlying cause of this change is that for the α-helix there is a significant energy change between different types of excitations, i.e. to π * C=O orbitals localized on the same and neighbouring residues, while for the β-sheet this difference is much smaller.
While there has been considerable focus on the role of the exchange-correlation functional, there have been fewer studies on the importance of the basis set for NEXAFS calculations.
A recent study 32 that investigated the convergence of core-excitation energies for a range of basis sets found that TDDFT calculations were not very sensitivity to the basis set used, and the excitation energies of large basis sets are reproduced by relatively small basis sets.
However, as in the case for excitations from the valence orbitals, it is necessary to have basis sets augmented with diffuse functions to describe excitations to Rydberg orbitals.
While the computational cost of NEXAFS calculations with standard linear response TDDFT is relatively low, the calculations can become prohibitively expensive as the system size increases. One reason for this is the high density of states in the NEXAFS region which can requires a very large number of states be evaluated, particularly when excitations from many core orbitals need to be considered. Historically TDDFT has been used to study valence excited states, and a consequence of this is that standard implementations are not optimal for the study of core-excited states. The transition potential method is a widely used approach that can be applied to study large systems. 34 We have investigated making TDDFT calculations efficient for core-excited states by exploring the calculation of the integrals required and also the efficient construction of the A matrix. 35,36 In particular, a significant speed up in the calculations is achieved through the introduction of an integral screening procedure that includes only integrals that involve the core s basis function of the absorbing atom(s), this is combined with a reduced quality numerical quadrature for integrals associated with the exchange and correlation functionals. Furthermore, construction of A within the excitation space of the absorbing core orbitals and exploiting further truncation of the virtual orbital space reduces the memory required for the calculations. 36 The study of transition metal K-edge spectra of transition metal complexes represents an example of a system where this methodology is particularly effective owing to the highly localised nature of the metal 1s orbital. Figure 3 shows computed and experimental spectra for ferrocene. The computed spectra are in good agreement with experiment and there is essentially no difference between spectra computed using default TDDFT and fast TDDFT where the modified integral screening and quadrature are used, while the latter calculation is approximately 20 times faster.
In addition to the study of larger systems, a further challenge to computational simulations of XAS is to capture the greater resolution that is now achievable in experimental measurements. We have contributed to a comprehensive experimental and computational study of the X-ray spectroscopy of the methyl iodide molecule. [37][38][39] One motivation for these studies is to investigate a molecule containing an atom of high atomic number allowing the effects of the molecular environment on the spectroscopic properties and photoionisation dynamics of the heavy atom to be studied. In a recent study 39 the photoelectron spectrum at the carbon K-edge was measured and showed significant vibrational structure for the  the context of DFT, the energy of these states can be determined using ∆SCF methods. 40 This involves performing a separate DFT calculation for the initial core-ionised state and all of the final states using an approach such as MOM to achieve convergence for each of the states required. The advantage of this approach is that the orbital relaxation is explicitly included, and it is possible to determine accurate transition energies. 15 However, there are practical limitations to this approach. It can be technically challenging to successfully converge the SCF calculation for all of the required electronic states, although there has been recent progress in this regard. 14 This is compounded by the large number of states required as the system size grows. This motivates the need for alternative approaches that do not require explicit orbital optimization for each state.
One successful approach is to approximate the transitions energies using the energy difference between the orbital energies of the neutral ground state molecule and estimate the oscillator strengths from where φ c is a core orbital and φ v is a valence orbital. The critical benefit from this approach is that only a calculation for the ground state is required, however as a consequence no account of the orbital relaxation for the core-ionised state is included. Despite its simplicity this approach provides remarkably accurate spectra and has been applied successfully in a variety of applications, including the valence-to-core XES of transition metal complexes by Neese and co-workers. 41 Our recent work 42 has shown that using this approach in combination with the short-range corrected functionals described earlier provides accurate non-resonant X-ray emission spectra with transition energies close to experiment. Since simulating spectra for a given structure only requires a single DFT calculation it opens up the possibility to study very large systems. This is illustrated by the study of carbon nanostructures including fullerenes and carbon nanotubes. 43 Figure 5 shows the computed and experimental non-resonant X-ray emission spectra for C 60 and a model (9,0) nanotube. The simulated spectra are based upon a SRC1r1/6-31G* calculations and generated using equations 9 and 10. For both systems the calculations reproduce the shape of the experimental spectra well. Insight into the nature of the observed peaks can be obtained through decomposing the spectra into contributions from orbitals with π and σ character. The most intense bands in the spectrum of C 60 correspond to transitions from σ-type orbitals, while the high energy bands at 281.7 eV and 283.0 eV arise from π-type orbitals. For the nanotube the calculations show that peak A arises from σtype orbitals, while bands B and C correspond to orbitals of π character. It has also been shown the spectra are insensitive to factors such as nanotube diameter, length and chirality. 43 More recently, our work has shown how XES can be determined using TDDFT through  the use of a reference determinant with a core-hole. 44 The advantage of this approach is that the core-hole relaxation is included and all the emission transitions can be captured in a single calculation. The procedure for determining an XES spectrum is as follows: 1. Determine the molecular orbitals for the neutral ground state molecule.
2. These orbitals are used as an initial guess for a further DFT calculation on the cation with a core hole in the relevant orbital. The MOM procedure 45 is used to prevent the collapse of the core hole during the self-consistent field process.
3. Use TDDFT with the TDA to determine the emission energies which appear as the negative eigenvalues.
This strategy of using a core-hole reference determinant is not limited to TDDFT calculations. This approach has also been exploited to study XES within ADC and EOM-CCSD formalisms. 7,46 This approach has been demonstrated to give accurate spectra for transition metal complexes [47][48][49] and has also been used to study the XES of liquid water. 50 The key feature in the X-ray emission spectrum of liquid water is the two peaks observed for the emission associated with the lone-pair (1b 1 ). The spectra were analysed in terms of the hydrogen bond configurations using a local structure index (LSI) combined with a geometrical H-bond cone criterion classification. This showed that tetrahedrally coordinated molecules characterized by high LSI values and two strong donated and two strong accepted hydrogen bonds contribute to the low energy 1b 1 emission peak while the high energy 1b 1 peak is associated with asymmetric hydrogen bond environments with one strong accepted hydrogen bond and one strong donated hydrogen bond and low LSI values. It was suggested that these extreme structures were under-represented in MD simulations. 50 Our recent work has focused on the simulation of X-ray emission spectra for organic molecules, exploring the influence of factors such as basis set and exchange-correlation functional on the computed spectra. 51 The degree of accuracy that can be achieved using this approach is illustrated in Figure 6 which shows a comparison between the computed B3LYP/cc-pCVQZ spectra and experiment for a range of molecules. The computed spectra provide an accurate description of the experimental spectra reproducing the peak heights and their relative energy spacing accurately. In some cases, for example ammonia and acetone, the relative intensities of the bands are predicted less well. However, for these spectra a uniform broadening has been applied and a single structure considered, and it has been shown 51 that incoporating nuclear dynamics can improve the calculated relative intensities of the bands. Similar to TDDFT calculations of X-ray absorption spectra, the use of approximate exchange-correlation functionals leads to a systematic error in the calculated transition energies. However, for XES the transition energies are too large in contrast with X-ray absorption where they are underestimated.
For X-ray absorption spectroscopy it has been possible to design exchange-correlation  Figure 6: Calculated B3LYP/cc-pCVQZ and experimental X-ray emission spectra for CH 3 OH, NH 3 , (CH 3 ) 2 CO, (CH 3 ) 2 SO, C 6 H 5 F, H 2 S, CH 3 Cl and CF 3 Cl, with bold font denoting the atom that has been core-ionised. Black line: experiment and red line: calculation. * indicates a multi-electron feature. The following energy shifts have been applied to the calculated spectra to align them with experiment CH 3 OH: -6.3 eV, NH 3 : -6.9 eV, (CH 3 ) 2 CO: -8. functionals that are able to predict the core-excitation energies that are in agreement with experiment without the need to apply an energy shift. We have found for standard hybrid functionals, approximately (66%) of HF exchange is required to give emission energies close to the experimental values. 44 However, a consequence of this focus on the transition energies is that quality of the computed spectra deteriorates, and similar problems were encountered for short-range corrected functionals. 44,51 One reason for this difficulty is that for XES the relevant core orbital is unoccupied, and as a result the properties of this orbital are only being influenced indirectly through orthogonalisation with respect to the occupied orbital space. It is possible to determine the energy shift that needs to be applied to the TDDFT computed spectra through an additional ∆SCF calculation, in a similar strategy that is often used for X-ray absorption spectra. 19,20 One approach is to evaluate the required energy shift from the energy difference between the highest energy transition in the TDDFT calculation and the corresponding transition energy from a ∆SCF (E core−ionised -E cation ) calculation. 51 Another factor that has emerged as important for TDDFT based calculations of XES is the quality of the basis set used. We have performed an extensive study of the performance of a wide range of basis sets for the calculation of core-electron spectroscopies. 32 This study reveals that calculations that involve the core-ionised state, which include the calculation of core-electron binding energies for XPS and TDDFT calculations of X-ray emission spectra, converge very slowly with respect to the size of the basis set. This particularly the case for studies at the K-edge of heavier nuclei. The reason for this poor convergence is that smaller basis sets provide a poor description of the core-ionised state since they do not contain basis functions necessary to describe the more compact electron density of the core-ionised state.
We have proposed a simple strategy that can be applied to all commonly used gaussian basis sets, which provides relatively small basis sets which are able to capture the accuracy of much larger basis sets. 52 In this approach, core and valence (not polarisation) basis functions for the element with one higher nuclear charge are added to the basis set. This only needs to be done for element being core-ionised and adds only a few additional basis functions, the resulting basis sets are term (Z+1) basis sets, for example (Z+1)6-31G*. Alternative strategies include using values for the exponents that lie between the element and the element with a nuclear charge of one higher 53  The sensitivity of computed X-ray emission spectra to basis sets is illustrated in Figure   7. There is a significant shift to higher energy for the 6-31G* basis set compared with the larger cc-pCVQZ basis set, and this shift is much larger for the chlorine K-edge compared with the oxygen K-edge. The (Z+1)6-31G* basis set is shown to reproduce the behaviour of the much larger basis set. This improvement is not just in terms of a shift in energy but also the computed spectral profile which for the (Z+1)6-31G* basis set closely resembles the larger basis set, while there is a significant variation for the 6-31G* basis set. This approach to augmenting basis sets is also important in the calculation of coreelectron binding energies in ∆SCF approaches for simulating XPS. Table 1 shows the computed binding energies for the oxygen and sulphur 1s electrons in H 2 O and H 2 S. The values for the cc-pCVQZ basis set are near the basis set limit and a large discrepancy from these values is observed for the 6-31G* basis set, particularly for H 2 S. However, when the 6-31G* set is augmented with basis functions according to the (Z+1) prescription the cc-pCVQZ core-electron binding energies are essentially reproduced. The valence-to-core (VtC) region of the X-ray emission spectra of transition metal complexes has attracted considerable attention. The study of these systems highlights further considerations that need to be taken into account when simulating X-ray spectra at the K-edge of heavier nuclei. This was illustrated in our recent study on the VtC X-ray emission spectroscopy of halozincate complexes. 54 Figure 8 shows spectra corresponding to the ultrafast timescale, see Figure 9, and the role of sections rules in RIXS has been highlighted in a recent study of benzene. 55 Gel'mukhanov and co-workers have reported a formalism for computing RIXS intensities based upon the Kramers-Heisenberg (KH) equation which accounts for channel interference and polarisation anisotropy effects. 56 In our calculations, this is achieved in a sum-over-states approach, however, alternative approaches based upon damped response theory have been developed. 55 The key quantities required to determine RIXS intensities are the transition energies and transition dipole moments of the excitation and emission processes, which means that simulation of RIXS maps requires both the excitation and emission processes to be described accurately. Another factor that can be important is nuclear dynamics which can have a significant effect on the maps, and this is further complicated by the dynamics of the core-excited intermediate state may differ significantly from the ground state.
RIXS data can be presented as a RIXS map where the intensity is plotted as a function of the excitation and emission energies. High quality experimental data is for the RIXS map of the water molecule is available, 57

Summary and Outlook
The application of spectroscopy in the X-ray region to study chemical and biological processes will continue to grow and develop in the upcoming years. The increased availability of synchrotron and free-electron lasers has placed greater emphasis on the ability to analyse and interpret the data. The development of computational methods that aid the detailed analysis of experimental data has emerged as an important component for the continued growth of the field of X-ray spectroscopy. In this Account our work on the use of DFT and TDDFT based methods to simulate XPS, NEXAFS, XES and RIXS spectroscopies has been summarised. Historically, these methods have been developed for the treatment of the spectroscopy of valence electrons. It has shown that these approaches can be adapted for the description of the spectroscopy of core electrons to provide a description of XPS, NEXAFS and XES spectra with sufficient level of accuracy and reliability to assign and interpret experimental spectra with a high degree of confidence. The current frontier for computational methods is the simulation of 2-photon spectroscopies such as RIXS and X-ray transient absorption spectra, in combination with the description of ultrafast non-adiabatic processes.
This presents additional challenges to the electronic structure methods, 60 and currently the simulation of these spectroscopies cannot be regarded as routine, and considerable work is required to treat complex systems such as liquids with a high degree of accuracy.

Conflicts of interest
There are no conflicts of interest to declare.