International
Tables for
Crystallography
Volume I
X-ray absorption spectroscopy and related techniques
Edited by C. T. Chantler, F. Boscherini and B. Bunker

International Tables for Crystallography (2020). Vol. I. ch. 6.8, pp. 764-769
https://doi.org/10.1107/S1574870720003274

Chapter 6.8. The FEFF code

J. J. Kas,a F. D. Vilaa and J. J. Rehra*

aDepartment of Physics, University of Washington, Box 351560, Seattle, WA 98195-1560, USA
Correspondence e-mail:  [email protected]

FEFF is a real-space multiple-scattering Green's function code for simulating a variety of X-ray spectroscopies as well as ground-state and excited-state electronic structure. It is perhaps best known for its use in extended X-ray absorption fine-structure (EXAFS) calculations, particularly within various analysis codes such as DEMETER and LARCH. In addition to EXAFS, FEFF can also be used to calculate X-ray absorption near-edge structure (XANES), X-ray emission spectroscopy (XES), electron energy loss spectra (EELS) and many other spectroscopic quantities. Here, the basic approach used for the calculations is described, focusing on the most important approximations and aspects of the simulations. The capabilities of the FEFF code, including those of the Java-based graphical user interface JFEFF, are also briefly described.

Keywords: FEFF; JFEFF; EXAFS; XANES; XES; multiple scattering.

1. Introduction: what is FEFF?

FEFF is a widely used all-electron real-space multiple-scattering Green's function code for simulating a variety of X-ray spectroscopies. However, the code also calculates self-consistent atomic, ground-state and excited-state electronic structure (Rehr & Albers, 2000link to reference; Rehr et al., 2009link to reference, 2010link to reference). The code is highly automated and is applicable to both periodic and aperiodic systems of up to several hundred atoms, throughout the periodic table, which can be defined by a set of atomic coordinates and their atomic numbers. The calculations carried out by FEFF include the dominant many-body effects in the spectra including inelastic mean free paths and vibrational damping. FEFF is named for the effective scattering amplitude feff in EXAFS, and is probably best known for its use in extended X-ray absorption fine-structure (EXAFS) calculations, particularly within various analysis codes such as DEMETER (Ravel & Newville, 2005link to reference) and LARCH (Newville, 2013link to reference; Newville & Ravel, 2024link to reference). In addition, FEFF can be used to simulate many other spectroscopies including X-ray absorption near-edge structure (XANES), X-ray emission spectroscopy (XES), electron energy loss spectra (EELS), nonresonant and resonant inelastic X-ray scattering (NRIXS and RIXS) and several others.

2. How does FEFF work?

The FEFF calculations are broken into several independent steps or modules, which are used sequentially to calculate different properties of the system. The major steps of the calculation are as follows:

(i) Dirac–Fock atomic calculation.

(ii) Potentials and densities.

(iii) Embedded atomic cross sections and phase shifts.

(iv) Calculation of the multiple-scattering Green's function.

(v) Spectral calculations.

Each of these steps calculates different ingredients, for example total potentials, densities, scattering phase shifts etc., which are then used to calculate the final spectrum. In this section we describe each step of the calculation, noting the main approximations and how the ingredients produced are incorporated into the overall calculation.

The first step of a FEFF simulation is a calculation of the atomic properties of each of the unique atoms in the structure specified by the user by solving the relativistic Dirac equation within the Dirac–Fock approximation (Ankudinov et al., 1996link to reference; Desclaux, 1975link to reference). Of particular importance are the total atomic energies, atomic densities and the occupied spinor wavefunctions. In addition an extra calculation is performed for the absorbing atom, which includes a core hole in a given core level (K, L1 etc.). The total atomic energies are used to approximate the edge energy for the system, and naturally include spin–orbit coupling effects beyond the perturbative method. The edge energy is approximated by taking the difference between the total energies of the absorbing atom with and without a core hole, which allows an approximation of the relaxation energy. Atomic electron densities are used in the second step to produce the muffin-tin potentials, while the core-level wavefunctions are used in the calculation of the embedded atomic cross sections.

The second step is to calculate the potentials used to describe the scattering of the valence electrons and the photoelectron. This is performed by self-consistently solving the Dirac equation within the local density approximation (LDA) using the real-space multiple-scattering Green's function (RSGF) approach (Ankudinov et al., 1998link to reference) and the final-state rule (FSR) for the core hole. In particular, the total LDA potential v(r) can be calculated given the nuclear Coulomb potentials and the total electron density ρ(r), which is related to the Green's function byMathematical equationHere, μ is the chemical potential and is constrained by the total number of electrons, Mathematical symbol. The Green's function in turn can be calculated given the total LDA potential; thus, a looping procedure is used to calculate the densities, potentials, the Green's function and back to densities until the density is self-consistent, i.e. the same (within a specified tolerance) for two consecutive iterations. The self-consistency loop starts with an approximate density based on overlapped atomic densities. The FEFF code then uses the spherical muffin-tin approximation; while this approximation is highly efficient, it can lead to substantial errors close to the edge. Fig. 1link to figure shows a flow chart of the self-consistency loop. For more details, see Rehr et al. (2024link to reference).

[Figure 1]

Figure 1

Flow diagram of FEFF's self-consistency loop.

After the self-consistent potentials have been found, we can proceed with the third step, which is to calculate the embedded-atom cross sections and phase shifts. For this step, the Dirac equation is solved one more time for each embedded atom, i.e. for each self-consistently defined muffin-tin potential. The cross sections are given in terms of the regular and irregular solutions of the Dirac equation at a particular energy, and the matrix elements and embedded-atom cross sections can then be calculated. The scattering phase shifts are determined by matching these solutions to spherical Bessel functions (the free-space solutions) at the muffin-tin radius. The dipole cross sections are proportional to the atomic background absorption for the material, similar to that defined experimentally for EXAFS analysis, while the phase shifts define the scattering T-matrices (in an angular momentum, site basis) for each atom i with angular momentum componentsMathematical equationwhich can be used to calculate the scattering amplitude of the photoelectron from the atoms. Additional photoelectron lifetime effects are also included in this final solution of the embedded-atom Dirac equation in the form of an energy-dependent self-energy, which defines the EXAFS inelastic mean free path.

These scattering matrices can thus be used (along with an expansion of the free-electron Green's function) to calculate the multiple-scattering Green's function either by path expansion or full multiple scattering by matrix inversion. The path method is very efficient and has the benefit that it can be directly correlated to the EXAFS equation, which is used for analysis purposes. In particular, the path-expansion approach is used to define the effective parameters, i.e. scattering amplitudes, phase shifts and inelastic mean free paths, to allow the use of theoretical standards. For example, the effective scattering amplitude feff is where the FEFF code gets its name. For near-edge (XANES) calculations, the path expansion fails to converge and thus the full-multiple scattering (FMS) method is used. The FMS approach sums all paths for a small cluster of approximately 150 atoms analytically by performing a matrix inverse, i.e.Mathematical equationwhere T is the scattering matrix and G0 is the free Green's function matrix, in which the on-site diagonal terms are set to zero.

2.1. Path expansion and the EXAFS equation

Owing to the large dimension of G, exact calculations with the path expansion can be carried out efficiently only for a few low-order multiple-scattering (MS) paths (Gurman et al., 1984link to reference). To overcome this computational bottleneck, an efficient method based on the Rehr–Albers (RA) scattering-matrix formalism (Rehr & Albers, 1990link to reference) has been devised. This yields an MS path expansion of the scattering contribution to the propagator, Mathematical equationwhere the successive terms represent single, double and higher-order scattering processes. Typically, the maximum value of l necessary for accurate EXAFS calculations using equation (4)link to equation is 25 or less for excitations up to about 1000 eV above the threshold (Ankudinov, 1996link to reference).

The RA approach yields curved-wave calculations of the effective scattering amplitude feff(k) in terms of a separable representation of the free propagator G0(E). With this representation the MS expansion can be re-expressed as a sum over MS paths R in a form similar to the original EXAFS equation of Sayers, Stern and Lytle (Sayers et al., 1971link to reference), Mathematical equationAn important difference, however, is the overall many-body amplitude factor Mathematical symbol reflecting the lack of orthogonality between initial and final states with and without the core hole. Here, k = [2(EEF)]1/2 is the wavenumber measured from threshold EF, λkk/(|ImΣ| + Γ/2) is the XAFS mean free path, which is calculated in terms of the self-energy and core-hole lifetime Γ. Finally σ, which characterizes the thermal and structural disorder, is the root-mean-squared fluctuation in the effective path length R = Rpath/2, which corresponds to peaks in the EXAFS Fourier transform. This equation has been automated in the FEFF codes and is now widely used to analyse EXAFS data. In addition, equation (5)link to equation illustrates the dominant many-body `inelastic parameters' Mathematical symbol, λk and the vibrational Debye–Waller (DW) factors σ2, which we now show can be calculated from first principles.

Finally, all of these ingredients are collected, and a particular spectrum (EXAFS, XES etc.) is produced. The details of the calculation of the final spectrum differ depending on which spectrum is chosen by the user, but they all require the multiple-scattering Green's function matrix (the FMS matrix) along with transition-matrix elements, the edge energy, and parameters such as Debye–Waller factors, phase shifts etc.

3. Developments in FEFF9

Here, we discuss recent developments in the treatment of the key many-body effects in deep-core excitation spectra. From a many-pole representation of the dielectric function and the GW approximation (see Section 3.1link to section), we obtain photoelectron self-energies, inelastic mean free paths (IMFPs) and contributions from multi-electron excitations. Next, as an improvement on the FSR, core-hole effects can be treated via a random phase approximation (RPA) calculation of the local response function (Takimoto et al., 2007link to reference), which is then used to calculate the screened core-hole interaction. Finally, from calculations of the dynamical matrix and a many-pole Lanczos algorithm, we obtain phonon spectra and DW factors. By iterating these steps, we then obtain improved calculations of optical constants from the UV to X-ray energies. All of the above procedures have been introduced into calculations of excited-state spectra based on the real-space Green's function formalism described in the previous section (Rehr & Albers, 2000link to reference; Rehr & Ankudinov, 2005link to reference).

3.1. Many-pole model of inelastic losses

Using the dielectric response, we can then obtain the self-energy Σ(E) via the `GW approximation' (Hedin, 1965link to reference), where G is the Green's function and W = ɛ−1v is the screened Coulomb interaction. In order to retain the efficiency of the FEFF code, we represent the dielectric function as a weighted sum of poles, which produces a sum of plasmon pole self-energy terms, each with a different plasmon frequency, i.e. Mathematical equationIn the above, the weights gi and frequencies ωi are matched to the loss function of the material, which can be measured or calculated within various levels of approximation. This model has been shown to give improved IMFPs, amplitudes and phases in XAS and other spectroscopies compared with the plasmon pole model, without sacrificing the efficiency of the calculations.

3.2. Multi-electron excitations

Our many-pole model in equation (6)link to equation also permits calculations of inelastic losses due to multi-electron (for example `shake-up' and `shake-off') excitations. These can be calculated using a generalization of the GW approximation and a quasi-boson model, as described in detail in Campbell et al. (2002link to reference). Such excitations correspond to satellites beyond the quasiparticle peak in the spectral function A = (−1/π)ImGeff, where Geff is an effective one-particle propagator. In addition to intrinsic losses, Geff contains energy-dependent interference terms, which tend to suppress the satellites.

3.3. Improved core-hole interaction

Several methods have been used to improve upon the FSR approximation for the core-hole interaction. One is the use of the RPA for the screened core hole. Another is based on the Bethe–Salpeter equation (BSE), which goes beyond the single-particle picture by explicitly considering particle–hole wavefunctions. The other is time-dependent density functional theory (TDDFT), which is an extension of the standard Kohn–Sham density functional theory to treat excited states.

3.4. Debye–Waller factors and vibrational damping

As noted above, the analysis of XAS spectra requires the knowledge of DW factors arising from thermal vibrations and structural disorder. These factors are important in the calculation of XANES spectra and are an essential component of the EXAFS equation (5)link to equation. They result from the thermal and configurational average 〈μ(E)〉 of the X-ray absorption coefficient μ(E) over the pair (or MS path-length) distribution function. The vibrational and structural disorder effects are additive. Structural disorder dominates in the near-edge region, and depends on external factors such as sample history and preparation. Currently, this kind of disorder can be included in FEFF9 by means of configurational averaging using, for instance, structures sampled from molecular-dynamics simulations (Vila et al., 2008link to reference).

4. Software improvements in FEFF9

In addition to improved theoretical methods, FEFF9 has a number of features which make it more user-friendly compared with previous versions. The most notable of these are (i) a new GUI, (ii) improved memory management and (iii) the ability to run within a cloud-computing cluster. The code is now accessible to a wide variety of users (from beginners to expert users) within a number of operating systems.

In addition, the FEFF9 code has been reformatted to conform to the Fortran95 standard. The Fortran95 standard allows improved memory management compared with Fortran77, which is the language that was used for previous versions of FEFF. In particular, users will no longer need to recompile the code in order to increase the cluster size or the angular momentum cutoff.

The availability of large, virtualized pools of computing resources such as those offered by Amazon Web Services provides a new and possibly advantageous computing paradigm for scientific research. We have recently demonstrated the feasibility of scientific computation using these cloud-computing resources as an alternative to traditional tools (Jorissen et al., 2012link to reference) and have shown that cloud computing can provide convenient access to reliable, high-performance clusters without the need to purchase and maintain sophisticated hardware. As part of the FEFF project, we have developed a set of tools which makes Amazon's Elastic Compute Cloud (EC2) behave like a virtual homogeneous computer cluster. They consist of a set of Bash scripts that perform the basic tasks involved in efficiently interacting with a virtual cluster, including: launching, connecting to, transferring files to and from, monitoring and terminating such clusters.

5. Spectrum capabilities

In this section, we briefly discuss the capabilities of the FEFF code, including the available spectra and advanced approximations that can be made. The different kinds of spectroscopies that can currently be simulated with FEFF include:

(i) XAS (XANES/EXAFS): X-ray absorption spectra including near-edge and extended;

(ii) XES: X-ray emission spectra;

(iii) XMCD: X-ray magnetic circular dichroism;

(iv) DAS (DAFS/DANES): diffraction anomalous scattering and fine structure;

(v) EELS: electron energy-loss spectra;

(vi) NRIXS: nonresonant inelastic X-ray scattering;

(vii) RIXS: resonant inelastic X-ray scattering; and

(viii) Compton scattering.

6. The JFEFF GUI

In this section, we briefly discuss the Java-based graphical user interface JFEFF (Rehr et al., 2010link to reference), which automates the FEFF calculations (Fig. 2link to figure). This GUI is self-explanatory and easy to use, greatly facilitating all aspects of carrying out FEFF calculations on various systems from laptops to mainframes. Notable features of JFEFF including a plotting window to show results of the calculations and the structure used. JFEFF executes the modules in FEFF, and can import, write and change specified input. JFEFF also allows users to quickly view crystal or molecular structures using Jmol, plot spectral output and local densities of states, and compare simulated data with experimental data. The GUI consists of a main panel which controls the most important options in FEFF, such as the description of the system, the type of spectroscopy and the modules of the code which should be run. Additional options are grouped into separate tabs, with one tab for each module (or step) of the FEFF code, with common and advanced options separated on each tab. All options have sensible defaults which depend on the type of spectroscopy. This allows users to focus on specifying only the property of interest and the system. The system can be specified by importing atomic coordinates in x, y, z format, by importing crystallographic information files (CIFs) or by hand. For example, a user who wants to calculate XANES can download the crystal or molecular structure from a database, import it into JFEFF, set the spectrum to XANES and run the calculations. In order facilitate the process, pop-up help is available for each input option. JFEFF runs on most commonly used operating systems including Windows, MacOS and Linux. Finally, for more advanced users, JFEFF can be used to run FEFF in parallel locally, on a remote computing cluster or on the Amazon cloud (Jorissen et al., 2012link to reference).

[Figure 2]

Figure 2

The Java-based GUI JFEFF. The main panel, output of the run, Jmol structure viewer and a plot of the final spectrum are shown.

7. Conclusions

Calculations based on the standard quasiparticle theory and the RSGF formalism now make a general treatment of XAS possible, encompassing XANES and EXAFS, as well as a number of other X-ray spectroscopies. These calculations typically rely on simplified models to deal with many-body effects. However, recent theoretical advances have led to efficient, ab initio approaches for calculations of the key many-body damping factors in these core-level X-ray spectroscopies.

In summary, our calculations of many-body effects are made possible by three key developments: (i) an extension of our RSGF code for full-spectrum calculations, (ii) an efficient many-pole representation of the dielectric function and (iii) an efficient Lanczos approach for phonon spectra and DW factors. These developments yield significantly improved self-energies compared with plasmon-pole models, as well as quantitative IMFPs and losses due to multi-electron excitations. All of these many-body effects are important in calculations of optical constants over a broad spectrum, and their inclusion yields improved amplitudes and phases from the UV to X-ray energies (Prange et al., 2009link to reference). The results presented show that the new approaches for calculating inelastic losses, self-energies and Debye–Waller factors yield significant improvements in amplitude and phase compared with the semi-empirical approaches, both for near-edge spectra (XANES; Fig. 3link to figure) and EXAFS (Newville et al., 2009link to reference). Our approach includes solid-state effects (for example edge shifts, fine structure and temperature-dependent DW factors) and is applicable to general aperiodic materials. Thus, our optical constants complement and can potentially replace empirical tables (Hagemann et al., 1975link to reference; Henke et al., 1993link to reference; Palik, 1998link to reference; Chantler, 1995link to reference; Elam et al., 2002link to reference) or atomic models (Cromer & Liberman, 1970link to reference) for many applications.

[Figure 3]

Figure 3

Polarization-dependent XANES of ZnO as calculated within the many-pole (solid) and plasmon-pole approximations in versions FEFF84 (blue dots) and FEFF90 (green dashes) compared with experimental results (Ney et al., 2008link to reference). The X-ray linear dichroism (XLD) is also shown.

The FEFF9 code is capable of calculating a variety of spectra not available in FEFF8 including NRIXS, EELS, RIXS etc. and comes with the JFEFF GUI to facilitate user input and control. Additional improvements, documentation and future updates can be found at http://feff-project.org/ .

Funding information

Funding for this research was provided by: DOE BES (award No. DE-FG03-97ER45623); NERSC (award No. DE-AC02-05CH11231).

References

First citationAnkudinov, A. (1996). PhD thesis. University of Washington, USA.Google Scholar
First citationAnkudinov, A., Ravel, B., Rehr, J. J. & Conradson, S. D. (1998). Phys. Rev. B, 58, 7565–7576.Google Scholar
First citationAnkudinov, A., Zabinsky, S. & Rehr, J. (1996). Comput. Phys. Commun. 98, 359–364.Google Scholar
First citationCampbell, L., Hedin, L., Rehr, J. J. & Bardyszewski, W. (2002). Phys. Rev. B, 65, 064107.Google Scholar
First citationChantler, C. T. (1995). J. Phys. Chem. Ref. Data, 24, 71–643.Google Scholar
First citationCromer, D. T. & Liberman, D. (1970). J. Chem. Phys. 53, 1891–1898.Google Scholar
First citationDesclaux, J. (1975). Comput. Phys. Commun. 9, 31–45.Google Scholar
First citationElam, W., Ravel, B. & Sieber, J. (2002). Radiat. Phys. Chem. 63, 121–128.Google Scholar
First citationGurman, S. J., Binsted, N. & Ross, I. (1984). J. Phys. C Solid State Phys. 17, 143–151.Google Scholar
First citationHagemann, H.-J., Gudat, W. & Kunz, C. (1975). J. Opt. Soc. Am. 65, 742–744.Google Scholar
First citationHedin, L. (1965). Phys. Rev. 139, A796–A823.Google Scholar
First citationHenke, B., Gullikson, E. & Davis, J. (1993). At. Data Nucl. Data Tables, 54, 181–342.Google Scholar
First citationJorissen, K., Vila, F. & Rehr, J. (2012). Comput. Phys. Commun. 183, 1911–1919.Google Scholar
First citationNewville, M. (2013). J. Phys. Conf. Ser. 430, 012007.Google Scholar
First citationNewville, M., Kas, J. J. & Rehr, J. J. (2009). J. Phys. Conf. Ser. 190, 012023.Google Scholar
First citationNewville, M. & Ravel, B. (2024). Int. Tables Crystallogr. I, ch. 6.13, 791–795 .Google Scholar
First citationNey, A., Ollefs, K., Ye, S., Kammermeier, T., Ney, V., Kaspar, T. C., Chambers, S. A., Wilhelm, F. & Rogalev, A. (2008). Phys. Rev. Lett. 100, 157201.Google Scholar
First citationPalik, E. D. (1998). Handbook of Optical Constants of Solids, Vol. 3. New York: Academic Press.Google Scholar
First citationPrange, M. P., Rehr, J. J., Rivas, G., Kas, J. J. & Lawson, J. W. (2009). Phys. Rev. B, 80, 155110.Google Scholar
First citationRavel, B. & Newville, M. (2005). J. Synchrotron Rad. 12, 537–541.Google Scholar
First citationRehr, J. & Ankudinov, A. (2005). Coord. Chem. Rev. 249, 131–>140.Google Scholar
First citationRehr, J. J. & Albers, R. C. (1990). Phys. Rev. B, 41, 8139–8149.Google Scholar
First citationRehr, J. J. & Albers, R. C. (2000). Rev. Mod. Phys. 72, 621–654.Google Scholar
First citationRehr, J. J., Kas, J. J., Prange, M. P., Sorini, A. P., Takimoto, Y. & Vila, F. (2009). C. R. Phys. 10, 548–559.Google Scholar
First citationRehr, J. J., Kas, J. J. & Vila, F. D. (2024). Int. Tables Crystallogr. I, ch. 2.6, 71–79 .Google Scholar
First citationRehr, J. J., Kas, J. J., Vila, F. D., Prange, M. P. & Jorissen, K. (2010). Phys. Chem. Chem. Phys. 12, 5503–5513.Google Scholar
First citationSayers, D. E., Stern, E. A. & Lytle, F. W. (1971). Phys. Rev. Lett. 27, 1204–1207.Google Scholar
First citationTakimoto, Y., Vila, F. D. & Rehr, J. J. (2007). J. Chem. Phys. 127, 154114.Google Scholar
First citationVila, F. D., Rehr, J. J., Kas, J., Nuzzo, R. G. & Frenkel, A. I. (2008). Phys. Rev. B, 78, 121404.Google Scholar








































to end of page
to top of page