Full spectrum optical constant interface to the Materials Project

J. J. Kasa,b, F. D. Vilaa,b, C. D. Pemmarajub, M. P. Prangec, K. A. Perssond, R. X. Yangd, J. J. Rehra,b,∗

aDepartment of Physics, University of Washington, Seattle, WA 98195, USA bStanford Institute for Materials and Energies Sciences, SLAC National Accelerator Laboratory, Menlo Park, CA 94025, USA cPhysical and Computational Sciences Directorate, Pacific Northwest National Laboratory: Richland, WA 99352 dMaterials Science Division, Lawrence Berkeley National Laboratory, Berkeley, CA 94720, USA

Abstract Optical constants characterize the interaction of materials with light and are important properties in material design. Here we present a Python-based Corvus workflow for simulations of full spectrum optical constants from the UV- VIS to hard x-ray wavelengths based on the real-space Green’s function code FEFF10 and structural data from the Materials Project (MP). The Corvus workflow manager and its associated tools provide an interface to FEFF10 and the MP database. The workflow parallelizes the FEFF computations of optical constants over all absorption edges for each material in the MP database specified by a unique MP-ID. The workflow tools determine the distribution of computational resources needed for that case. Similarly, the optical constants for selected sets of materials can be computed in a single-shot. To illustrate the approach, we present results for nearly all elemental solids in the periodic table, as well as a sample compound, and compared with experimental results. As in x-ray absorption spectra, these results are interpreted in terms of an atomic-like background and fine-structure contributions. Keywords: Optical constants, Materials Project, FEFF, Corvus

1. Introduction quantitative.[8–17] Also limited tables of theoretical op- tical constants of materials have been compiled over the Optical constants characterize the frequency depen- optical range.[18, 19] However, such calculations involve dent interaction between light and matter in the long- many-body calculations of optical response, and become wavelength limit. Thus they are often important char- computationally intractable for many materials over broad acteristics in materials design. These properties include spectral ranges. In contrast, the real-space Green’s func- the complex dielectric constant and index of refraction, tion (RSGF) approach in FEFF10 includes the key many- as well as the energy-loss function, photoabsorption co- body effects, is highly automated and has proved to be efficient, and optical reflectivity.[1–4] Many other physi- quite accurate for general materials in the x-ray regime. cal properties can be derived from the optical constants, Moreover the code can be semi-quantitative in the UV-VIS including electron energy loss spectra (EELS), inelastic to soft-x-ray regime.[20] Thus the code provides an effi- mean-free paths, the atomic scattering amplitudes, and cient platform for calculations of dielectric properties over Hamaker constants for the van der Waals interaction. For a broad spectral range. Consequently, theoretical calcula- these purposes, tabulations of experimentally determined tions based on FEFF10 provide an attractive alternative to optical constants are widely used.[1–4] For practical rea- available theoretical and experimental tabulations of op- sons, however, such tabulations are limited to a rela- tical constants for many purposes. Nevertheless, selected tively small number of well characterized materials over experimental measurements are important to validate the limited spectral ranges and limited environmental condi- theory. tions. Thus here we focus on broad spectrum theoreti- cal treatments for the systems defined in the Materials Recently K- and L-shell XAS calculations based on the Project(MP) database. FEFF code have been added for a very large number of Significant progress has been made in the fundamen- materials in the Materials Project (MP) database.[21, 22] arXiv:2108.10981v2 [cond-mat.mtrl-sci] 26 Aug 2021 tal theory of optical properties since the pioneering These data have been exploited, e.g., in machine-learning works of Nozieres and Pines,[5] Adler,[6] and Wiser.[7] models for the interpretation of XAS data.[21, 23] Our In particular modern first-principles calculations based aim here is to complement these properties with a more on time-dependent density functional theory (TDDFT) complete set of optical constants for all edges from the and the Bethe-SalpeterEquation (BSE) are now highly UV-VIS to hard-x-ray energies. Consequently, the results presented here provide significant extension, both in the ∗Corresponding author variety of optical-constant spectra, spectral range, and ma- Email address: [email protected] (J. J. Rehr) terial properties. Our approach is based on the the devel-

Preprint submitted to Computational Materials Science August 27, 2021 1e4 opment of the Corvus [opcons] workflow, where Corvus is Expt. (DESY) the workflow engine,[24] and opcons is the target property. FEFF (Opcons) 2 atomic In particular, the approach imports the structural and 1e property data from the MP, and then parallelizes and au- 1e0 tomates the calculations permitting high-throughput cal- culations of optical constants for materials throughout the 1e−2

MP database. Our procedure for theoretical calculations (E) 2 ε of optical constants over all edges essentially follows that 1e−4 Cu described in detail by Prange et al.,[20] but has been up- dated for the FEFF10 code. In addition, refinements for 1e−6 including vibrational disorder via the correlated Debye −8 model using MP data have been added and the calcula- 1e tions for the UV-VIS range have been simplified. To il- 1e−10 lustrate the approach calculations have been carried out 0.1 1 10 100 1000 10000 100000 for nearly all elemental solids throughout the periodic ta- Energy (eV) ble and explicit examples are given for Cu, Ag, and Au, 0.7 full together with comparisons to experimental data. In ad- L−edges 0.6 K−edge dition we show results for a sample compound Al2O3 to validate our approximation in the UV-VIS range. The 0.5 Corvus workflow described here is applicable to [opcons] 0.4 any material available in the MP database as defined by a given MP identificatoin label (MP-ID), thus making pos- 0.3 (E)

5 χ sible routine calculations of optical constants for over 10 0.2 structures. By default, the calculations are carried out with lattice vibration effects included at room tempera- 0.1 ture, while electronic temperature and thermal expansion 0 effects are neglected. However, corrections for thermal ex- pansion, finite temperature, and pressures other than 1 −0.1 atm can be added using subsequent calculations that reuse 2 4 6 8 10 12 14 some of the previously computed data. The workflow is k(E) (Å) naturally parallelized and, for typical settings, requires as little as minutes of wall-clock time per material on mas- Figure 1: Top: Calculated imaginary part of the dielectric function sively parallel systems. 2 for Cu (blue) along with the atomic background χ (see text) (red). Bottom: Approximate optical√ fine structure of the imaginary (blue) part of  for Cu vs k = 2E, along with the same fine-structure defined with energies E relative to the K- and L-edges. Note the similarities between the fine structure found in the optical and that of the K-edge. Note also that the fine structure becomes negligible for large k above any edges or outside the optical range.

terms of 2(ω), 2. Optical constants with Corvus and FEFF10 Z ∞ 0 0 2 0 ω 2(ω ) 1(ω) = 1 + P dω 2 02 (1) π 0 ω − ω

−1 2(ω) L(ω) = −Im[ (ω)] = 2 2 (2) 1(ω) + 2(ω) n(ω) = n(ω) + iκ(ω) = (ω)1/2 (3) ω µ(ω) = 2 κ(ω) (4) In general, the optical constants are related to the com- c plex dielectric constant (ω) = 1(ω) + i2(ω) in the long [n(ω) − 1]2 + κ(ω)2 wave-length limit, where ω is the frequency of the electro- R(ω) = , (5) [n(ω) + 1]2 + κ(ω)2 magnetic field. Since their real and imaginary parts are re- lated by Kramers-Kronig (KK) transformations, they can where P denotes the principal part of the integral. Note all be calculated from the imaginary part 2(ω) (e.g. Fig. that at high energies dielectric response is weak, and 1). In this work the, the Corvus [opcons] workflow yields 2(ω) ≈ L(ω) ≈ 2κ(ω) ≈ µ(ω)(c/ω). Sum-rules the complex dielectric function (ω), energy loss function for the dielectric properties provide a qualitative check L(ω), complex index of refraction n(ω), absorption coef- on the reliability of the results.[25] Related properties, ficient µ(ω), and reflectivity R(ω) defined as follows, in such as the local atomic polarizability α(ω) = ((ω) − 2 1)/(4πn), the Rayleigh forward scattering amplitudes 1.8 2 2 2 f(ω) = ωα(ω)/r0c (where r0 = e /mc is the classi- 1.6 Cu cal radius of the electron, c is the speed of light and 1.4 n = N/V is the atomic number density), electron energy loss spectra (EELS), inelastic mean-free paths, Hamaker 1.2 constants (iω), etc., can also be determined, [20] but 1 are not yet implemented in the present Corvus [opcons] 0.8 workflow. For simplicity here and below we use atomic 0.6 units e = ¯h = m = 1 throughout this paper unless other- FMS wise needed for clarity. XANES (arb. units) 0.4 Stitched MSP The treatment of excitations from the core- and valence- 0.2 FMS-MSP levels generally requires different considerations, so it is 0 convenient to separate the calculations as -0.2 8980 9000 9020 9040 9060 core val 2 = 2 + 2 , (6) Energy (eV)

core where 2 includes the contribution from all levels below a Figure 2: Cu K-edge spectrum obtained using the stitching algorithm fixed core-valence separation energy Ecv, which in FEFF10 (black). For comparison, the curves calculated using FMS (red) and is set to -40 eV. Although this separation is approximate MSP (blue) are also shown, shifted above and below the stitched curve, respectively. The green curve is the difference between the due to many-body effects, the contributions from deep FMS and MSP calculated results, and the shaded area shows the core levels (and to a reasonable approximation, semi-core region where the stitching algorithm is applied. states) respond nearly independently from the valence.

2.1. Core level contributions One of the advantages of the RSGF approach is the separation of the propagator G(ω) into contributions In this paper calculations of the optical constants are from the central absorber at a given site and single or carried out using the real-space Green’s function code multiple-scattering contributions from neighboring atoms, FEFF10 and an updated version of the approach de- i.e., G(ω) = Gabs(ω) + Gsc(ω). As a result the dielec- scribed by Prange et al. [20] FEFF uses the same real- tric properties exhibit fine structure analogous to that in space Green’s function formalism to calculate a variety of XAFS, i.e., spectroscopies and related quantities including XAS, XES, RIXS, EELS, and Compton. Thus the calculations of the X atomic 2 = 2i [1 + χi(ω)], (8) optical constants use essentially the same ingredients as i those for the well-established calculations of XAS, greatly simplifying the workflow design. which we dub “optical fine structure” (OFS). Typically Briefly, the RSGF approach in FEFF is used to calculate χi(ω) is of order a few percent within a range of order 100 the contribution to 2(ω) from each occupied level i (i.e., eV above each edge; however, χi(ω) can be large and of absorption edge) at each unique site in the system a. For order unity in the near-edge regime, within about 10 eV or simplicity, the site index will be usually suppressed below. so of a given edge. Thus the physical interpretation of the The core level contribution to 2(ω) from a given site a OFS is similar to that for EXAFS and XANES, reflecting consists of a sum of contributions from occupied core levels the local geometrical structure in the vicinity of an ab- |ii [20] for εi < Ecv given by sorbing atom. These observations also explain why a local, atomic approximation that neglects the fine structure from X 4π h i core = Im hi|dˆ†G(ω + ε )dˆ|ii θ(ω − ε + ε ), (7) neighbor scattering can be a reasonable approximation, ac- 2 ω i F i i curate to within a few percent for the core contributions to the optical constants, except close to an absorption edge. where |ii is the core-orbital of interest, εi its binding en- In order to show the fine structure over the entire energy ergy, dˆ is the transition operator, which in most cases is range of our calculations, it is convenient to calculate the atomic atomic dipole dominated, and G(ω) is the one-electron Green’s fine-structure defined as χ2 = (2 − 2 )/2 , which function. Finally, θ(ω − εF + εi) is a unit step function is shown for Cu in Fig. 1 (bottom), together with the full that turns on when the photon energy ω is sufficient to and atomic approximation to 2 (top). A corresponding excite the core-electron above the Fermi energy εF . If the approximation can also be made for any of the other op- core interaction between the core- and photoelectron levels is tical constants. When 1 ≈ 1, the fine structure in the ignored, this level of approximation is equivalent to the loss function L(ω), absorption µ and imaginary part of RPA. However, in this work we use the final-state rule the index of refraction κ are similar to that in 2. The fine ◦ approximation to the core hole interaction, in which the structure in 1 is similar, although phase shifted by 90 . photoelectron Green’s function is calculated in the pres- In order to obtain optical constants over a broad en- ence of a self-consistently screened core-hole. ergy range from the UV to hard x-rays, two FEFF cal- 3 culations must be performed for each edge (i.e. each oc- 1.5 cupied atomic level i) and each unique atomic site a in the presence of the corresponding core-hole: 1) In the Al2O3 near edge regime within about 50 eV of a given edge full-multiple-scattering (FMS) calculations must be per- 1.0 formed, and 2) at higher energies (the EXAFS regime), the multiple-scattering path expansion (MSP) is used. Once these calculations are performed, the results are interpo- lated onto a common energy grid and stitched together to i Energy Loss 0.5 Expt. (DESY) yield the spectrum 2(ω) coming from the core-state |ii. FEFF (Corvus) The stitching algorithm used is:[20]

i FMS,i 2(k) =2 (k); k < k0, 0.0 2 k − k0 FMS,i 10 100 1000 = cos ( )2 (k) Energy (eV) k1 − k0 2 k − k0 MSP,i 1.5 + sin ( )2 (k); k0 ≤ k ≤ k1, k1 − k0 Expt. (DESY) MSP,i FEFF (Corvus) Au =2 (k); k > k1 (9)

−1 −1 1/2 1.0 where k0 = 3 A˚ , k1 = 4 A˚ , and k = [2(E − Eedge)] is the photoelectron wave-number. This is illustrated in Fig. 2 for the K-edge spectrum of fcc Cu.

2.2. Valence Contributions Energy Loss 0.5 The contribution from the valence levels is complicated by the extended range and continuum nature of the va- lence wave functions and the large density of states in 0.0 the valence region. In the full RSGF approach this re- 1 10 100 1000 quires sums over multiple sites as in Eq. (32) of Ref. [20]. Energy (eV) Moreover, systems with strong excitonic effects often re- quire treatments beyond the RPA such as TDDFT or the Figure 3: Comparison of the experimental[26] and calculated energy Bethe-Salpeter equation.[9] Several codes are available for loss function for Al2O3 (corundum) (top) and Au (gold) (bottom) with the local approximation (see text). these advanced treatments,[10, 11, 13, 15] but they are computationally challenging for high throughput calcu- lations. Nevertheless, neglecting these effects is often a excitonic effects are small. We have found that our local reasonable approximation for semi-quantitative purposes. approximation in Eq. (10) is significantly better than a Consequently, in this work we use a local approximation pure atomic approximation alone. One can also define at the absorption site to calculate the contribution from an optical fine structure χval for the valence contributions val the valence electrons. In addition, we replace the valence 2 , although its magnitude is typically large and of order wavefunctions with the -Fock atomic eigenfunctions, unity (see Fig. 1), as in core-level XANES, over the optical which allows us to write Eq. (32) of Ref. [20] as an integral energy range. For this reason, FMS and the local projected over the local valence density of states densities of states are needed to evaluate Eq. (10). In val addition, the physical interpretation of 2 is akin to a X Z EF val(ω) = dω0ρ˜ (ω0)ia(ω − ∆ − ω0), (10) sum of terms proportional to the joint projected density 2 ai 2 of states.[20] Even so, the valence fine structure for Cu is ia Ecv rather similar to the K-edge fine structure, as shown in ia where 2 (ω) is the local atomic spectrum at a given site the lower panel of Fig. 1. This makes sense, since the d- to a corresponding to atomic state i, andρ ˜ = ρ/N is the p-state transitions dominate in the optical region, and the normalized, angular momentum projected density of states DOS is dominated by a single, relatively sharp occupied (LDOS) with symmetry equal to that of the state i, and d-band. ∆ = Etop −Eedge is a shift to properly position the valence Finally, the total 2(ω) is obtained from a double sum spectra, where Etop is the energy at the top of the gap, if over edges i and unique sites in the system, one exists, and is equal to the Fermi energy otherwise. As X ia 2(ω) = na (ω), (11) shown for the energy loss of Al2O3 (top) and Au (bottom) 2 in Fig. 3, which provide good tests for this procedure we ia find that the approximation is reasonably accurate when where a denotes a unique site in the unit cell, and na = 4 1e7 Expt. (DESY) 6 FEFF (Corvus) 1e Without Drude 1e5

1e4

) 3 -1 1e Ag

(cm 1e2 µ

1e1

1e0

1e-1 Figure 6: Schematic of the Corvus workflow for optical constants. 1e-2 User input is shown in light green, while code blocks associated with 0.1 1 10 100 1000 10000 100000 Corvus are shown in blue, and input/output/code associated with Energy (eV) FEFF is shown in black. The output is shown in light blue. Note that Corvus [opcons] requires minimal input from the user (only the Figure 4: Comparison of the theoretical absorption µ of Ag with and CIF file and a request for optical constants), although many optional without the Drude contribution, along with experimental results [26]. parameters are available.

2 2 30 where σ is the conductivity, ωp = 4πne /m, n is the mean conduction electron density, and τ the relaxation time, 25 Cu which is typically of order 0.1 − 4.0 femtosecond at room temperature.[28] Fig. 4 shows a comparison of the absorp- 20 tion µ of Ag with and without the Drude contribution, along with experiment.[26]

E ff Thermal expansion can also be treated by calculating n 15 the expansion parameter via DFT,[29] or using parame- 10 ters from the literature. Additional broadening due to Expt. (DESY) electron-phonon interactions, impurities, and other mech- FEFF (Corvus) 5 anisms can also be important. While neglected by default, these effects can be added ex post facto by a Lorentzian 0 broadening of the spectra. 1 10 100 1000 10000 100000 Once  (ω) is obtained by summing both core and va- Energy (eV) 2 lence contributions over all sites, the real part of the dielec- tric function is formed via a KK-transform, as in Eq. (1). Figure 5: Comparison of the experimental[26] and theoretical 2(ω) R ω sum rule neff (ω) = 0 dω 2(ω)/π for Cu. The horizontal dashed A check on the completeness of the calculations is provided line indicates the ideal theoretical limit (Z = 29). by the optical constant sum-rules,[25] as illustrated in Fig. 5. N /V is the corresponding number density. a 2.4. Corvus [opcons] workflow 2.3. Debye-Waller factors and Drude corrections The Corvus [opcons] workflow is built on the concept of recursive workflow generation, wherein Corvus generates A number of other considerations are generally impor- and runs a workflow with the target property , and tant in calculations of optical spectra over broad energy opcons the optical constants workflow in turn generates ranges. For example, effects of thermal vibrations are tem- [opcons] and runs a workflow for each required FEFF10 perature dependent and strongly damp the fine-structure [xanes] calculation. The workflow tool is described in detail to- in the EXAFS regime. For the systems treated here we gether with various examples in the Corvus reference.[24] have approximated the multiple-scattering path dependent This approach determines the input files from the data in DW factors exp(−2σ2k2) using the default correlated De- the MP database, afterwhich all of the individual FEFF10 bye model in FEFF10. The Debye temperature parameter calculations are set up and run through the Corvus work- can be estimated[27] from the bulk and shear elastic mod- flow manager. The Corvus workflow then car- uli data available in the MP database. [opcons] ries out the following steps: i) calculating the  (ω) for a Drude corrections in metals can be added phenomeno- 2 given edge; ii) applying the stitching algorithm to combine logically by an additional ad hoc contribution to the lim- the near-edge full multiple scattering (FMS) and multiple- iting low frequency behavior of  (ω) given by 2 scattering path (MSP) calculations; iii) convolving with 4πσ ω2τ the density of states (Eq. 10); iv) performing the KK- D = = p (12) 2 ω ω transform to obtain 1; v) adding the Drude contribution; 5 Query found 16 systems target_list { opcons } Keeping 3 systems after energy screening usehandlers { Feff } Found systems: opcons.usesaved{ True } #------# cif_input{CIF_symm.cif} System: mp-1279742 feff.scf{ 3.2350952042425325 0 30 0.1 0 } Reduced Form.: FeO feff.fms{ 5.075798356336175 0 0 0.0 0.0 40.0 } CellComp.: Fe4O4 feff.debye{ 298.0 416.52459701743817 0 } Sym. Unique Comp.: Fe1 O1 Total num. of edges: 15 # The lines below should set the parallel settings Estimated Debye T: 466.60 (Pred.) ... #------# System: mp-715262 Reduced Form.: FeO Figure 8: Typical template Corvus [opcons] input generated by the CellComp.: Fe2O2 crv mp mk set command. This input shows the selected Corvus tar- Sym. Unique Comp.: Fe1 O1 get opcons, the handlers that sould be used (only FEFF is required Total num. of edges: 15 for these types of runs), the location of the structure in CIF format, Estimated Debye T: 416.52 (Calc.) and the FEFF SCF and FMS radii. The latter are automatically gen- #------# erated based on the number of shells requests in the command line. System: mp-1178232 Depending on the options used, the calculation can use a Correlated Reduced Form.: FeO Debye model to add thermal broadening, using a Debye temperature CellComp.: Fe4O4 parameter estimated from MP database values of the bulk and shear Sym. Unique Comp.: Fe1 O1 moduli. Given that Corvus stores the MPI command, number of Total num. of edges: 15 processors, etc in the input, the actual input is generated at runtime Estimated Debye T: 465.00 (Pred.) by the crv mp run set, where the required parameters are added at #------# the end of the template input shown here.

Keeping 3 systems after symmetry and edge screening 3.2. Usage: crv mp mk set Total number of edges to compute in set: 45 The basic input of a typical Corvus [opcons] calcula- tion is set up using the crv mp mk set command: Figure 7: Typical output for the crv mp mk set command showing crv mp mk set [OPTIONS] Set Name that the MP query returned 16 possible systems, of which only 3 are left after screening for energy, symmetry, and total number of where “Set Name” is a text label that will be used through- edges. Also shown are the estimated Debye temperatures, which can out to refer to the set of materials. This label is used to be calculated (e.g., from DFT data), or predicted (e.g., from machine name the directory where the calculations will be done and learning data). the results stored. crv mp mk set can be used to query the MP database in three different ways (see options below): 1) Query an n arbitrary class of materials selected by for- and vi) calculating the other optical constants following mula, 2) automatically query some or all of the elemen- the relations in Eqs. (1). In order to facilitate automated tal solids, for which the tools have an internal database calculations, Corvus handles the creation of FEFF10 in- of MP-IDs, and finally, 3) an individual material with a put files from minimal user input, executes FEFF10, and given MP-ID. The full set of options can be obtained with translates the output. Additionally, the Corvus [opcons] “crv mp mk set --h”. Here we focus on some of the most workflow is designed to optimize the calculations, for ex- computationally relevant ones. ample re-using output from the XANES results within the EXAFS calculations to bypass the self-consistency loop. 3.2.1. Required options Figure 6 shows a schematic of the Corvus [opcons] work- --k APIKEY flow for producing the optical constants. API key used to interact with the MP REST interface

This option is required for the command to be able to in- 3. Materials Project interface tools teract with the MP database. See section 3.4.4 for details.

3.1. Global structure of Corvus [opcons] simulations 3.2.2. System selection options --f FORMULA MP optical constants simulations are set up in two steps: Use chemical formula FORMULA to define a set of mate- 1) The crv mp mk set command reads the command line rials. inputs, creates a request to the MP, downloads all the structures available matching the query, generates a set of --pt materials to run and calculates the totl number of edges Create a set for all the solid elements in the periodic table using the structure for the most stable phase in in the set. 2) The crv mp run set command runs all the calculations required for the set, distributed in serial or standard conditions parallel mode according to the resources provided. In the --ptel PT ELEMS following section we describe their usage in detail. Same as --pt, but only for a list of specific elements 6 --mpid MP-ID 2e-03 Select the individual system with Materials Project 1e+04 Cu identification label MP-ID (Default: “mp-30”)

1e+02 2 � These options are mutually exclusive. If none of them are 1e-03 present the command generates input for a test run on Cu, 1e+00 a traditional choice since FEFF was first deployed. 1000 1200 1400

2 Energy (eV)

� 1e-02 3.2.3. Selection fine-tuning options --mxpt MXNAPT 1e-04 Maximum atomic number to use while creating the pe- Expt. (DESY) riodic table with --pt (Default: 99) 1e-06 FEFF (Corvus, (1,2)) FEFF (Corvus, (3,6)) --enpct EN PCT FEFF (Corvus, (4,8)) Keep only EN PCT% of lowest energy systems (Default: 1e-08 100%) 10 100 1000 10000 1e+05 Energy (eV) --nedg MXNEDGES Keep only systems with fewer than MXNEDGES edges (De- fault: 250) Au 2.0 These options help trim the raw selection generated by the system selection options.

3.2.4. Auxiliary options --nSCF NSCF 1.0 Number of neighbor shells to use in SCF (Default: 1)

--nFMS NFMS Index of Refraction Number of neighbor shells to use in FMS (Default: 2) Expt. (DESY) FEFF (Corvus) --symprec SYM PREC 0.0 Symmetry precision (in A)˚ used by symmetrizer (De- 1 10 100 1000 fault: 0.01A)˚ Energy (eV) --dw Figure 9: Comparison of the experimental[26] and theoretical 2 for Use the correlated Debye thermal broadening model in Cu as a function of FEFF Corvus (nSCF,nFMS) shells to explore the optical constants calculation convergence (top) and (bottom) index of refraction for Au in the valence region (bottom). --temp TEMPERATURE Temperature (in K) used for correlated Debye thermal broadening (Default: 298K) 3.2.6. Examples A typical invocation of crv mp mk set is as follows These options control the setup of the optical constants crv mp mk set --k [APIKEY] --f "FeO" --enpct calculations by defining how many shells to use in the 20 --nedg 250 --nSCF 2 --nFMS 4 --v --dw --temp SCF and FMS steps, as well as the precision of the sym- 298.0 IronOxides metrization procedure used to reduce the number of unique creates a set of 3 systems (Figure 7) after screening for en- sites. The shell selection is performed using the Jenks nat- ergy, symmetry and total number of edges. The command ural breaks classification method[30] as implemented in also requests that the Debye temperature be estimated, the jenkspy Python module.[31] Additionally, vibrational and that the calculation be done at room temperature. broadening can also be controlled by requesting that a cor- Inside the set directory, the structures are organized by related Debye model[32] be used. reduced formula and MP-ID. A typical Corvus [opcons] directory created with crv mp mk set contains, for each 3.2.5. Calculation control options material, a template Corvus [opcons] input (Fig. 8) and --dr a few auxiliary files with structural information. A set for Dry run, collect and display information without actu- the Li, Be and B elemental solids can be generated using: ally creating a set crv mp mk set --k [APIKEY] --v --ptel --v ’Li,Be,B’ LiBeB Make the command output more verbose while a single compound (one of the forms of Mg3N, in this case) can be set up with: 7 1 IA 18 VIIIA

1 – 2 – 1 H Periodic Table of FEFF Optical Constants He Hydrogen 2 IIA 13 IIIA 14 IVA 15 VA 16 VIA 17 VIIA Helium

3 mp-135 4 mp-87 5 mp-160 6 mp-48 7 – 8 – 9 – 10 – 2 Li Be B C N O F Ne Lithium Beryllium Boron Carbon Nitrogen Oxygen Flourine Neon

11 mp-127 12 mp-153 13 mp-134 14 mp-149 15 mp-157 16 mp-77 17 – 18 – 3 Na Mg Al Si P S Cl Ar Sodium Magnesium 3 IIIA 4 IVB 5 VB 6 VIB 7 VIIB 8 VIIIB 9 VIIIB 10 VIIIB 11 IB 12 IIB Aluminum Silicon Phosphorus Sulfur Chlorine Argon

19 mp-58 20 mp-45 21 mp-67 22 mp-46 23 mp-146 24 mp-90 25 mp-35 26 mp-13 27 mp-54 28 mp-23 29 mp-30 30 mp-79 31 mp-142 32 mp-32 33 mp-11 34 mp-14 35 – 36 – 4 K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Potassium Calcium Scandium Titanium Vanadium Chromium Manganese Iron Cobalt Nickel Copper Zinc Gallium Germanium Arsenic Selenium Bromine Krypton

37 mp-70 38 mp-76 39 mp-112 40 mp-131 41 mp-75 42 mp-129 43 mp-113 44 mp-33 45 mp-74 46 mp-2 47 mp-124 48 mp-94 49 mp-85 50 mp-84 51 mp-104 52 mp-19 53 mp-23153 54 – 5 Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Rubidium Strontium Yttrium Zirconium Niobium Molybdenum Technetium Ruthenium Rhodium Palladium Silver Cadmium Indium Tin Antimony Tellurium Iodine Xenon

55 mp-1 56 mp-122 57-71 72 mp-103 73 mp-50 74 mp-91 75 mp-8 76 mp-49 77 mp-101 78 mp-126 79 mp-81 80 – 81 mp-82 82 mp-20483 83 mp-23152 84 – 85 – 86 – 6 Cs Ba La-Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Cesium Barium Lanthanide Hafnium Tantalum Tungsten Rhenium Osmium Iridium Platinum Gold Mercury Thallium Lead Bismuth Polonium Astatine Radon

87 – 88 – 89-103 104 – 105 – 106 – 107 – 108 – 109 – 110 – 111 – 112 – 113 – 114 – 115 – 116 – 117 – 118 – 7 Fr Ra Ac-Lr Rf Db Sg Bh Hs Mt Ds Rg Uub Uut Uuq Uup Uuh Uus Uuo Francium Radium Actinide Rutherfordium Dubnium Seaborgium Bohrium Hassium Meitnerium Darmstadtium Roentgenium Ununbium Ununtrium Ununquadium Ununpentium Ununhexium Ununseptium Ununoctium

Available Not Available 57 mp-26 58 mp-28 59 mp-38 60 mp-123 61 mp-867200 62 mp-86 63 mp-20071 64 mp-155 65 mp-18 66 mp-88 67 mp-144 68 mp-99 69 mp-143 70 mp-162 71 mp-145 La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu

Lanthanum Cerium Praseodymium Neodymium Promethium Samarium Europium Gadolinium Terbium Dysprosium Holmium Erbium Thulium Ytterbium Lutetium

Z MP-ID 89 mp-10018 90 mp-37 91 mp-62 92 mp-44 93 mp-11534 94 mp-613989 95 – 96 – 97 – 98 – 99 – 100 – 101 – 102 – 103 – Symbol Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr

Name Actinium Thorium Protactinium Uranium Neptunium Plutonium Americium Curium Berkelium Californium Einsteinium Fermium Mendelevium Nobelium Lawrencium

Figure 10: Periodic table of FEFF optical constants currently available. The index on the top-right corner of each element indicates the MP-ID of the structure used in the calculations. A dynamic version of this table can be found at http://feff.phys.washington.edu/ optical-constants/,[33] including all optical constants data as well as the input files used to generate it.

crv mp mk set --k [APIKEY] --v --mpid 3.3.2. Options to estimate computational cost mp-1185783 --t More examples can be found in Ref. [34]. Estimate total runtime up to NP TOT processors --sf SER FRAC 3.3. Usage: crv mp run set Fraction of serial code to estimate parallel runtimes (De- After a set is created, the actual optical constants can fault: 0.5) be computed with the crv mp run set command: If the “--t” runtime option is present, instead of running crv mp run set [OPTIONS] Set Name the set, crv mp run set prints out estimates of the cost of where “Set Name” is again the label for the set to run. As the calculation from 1 to NP TOT processors relative to the for “crv mp mk set”, the full set of options can be obtained cost of a single edge calculations performed in serial mode. with “crv mp run set --h”, but here we focus on some of the most computationally relevant ones. 3.3.3. Auxiliary options --v 3.3.1. Options to control the number of processors Generate verbose output (timings, etc) --np NP TOT Total number of processors to be used in the run (De- --dr fault: 1) Dry run: Do everything but actually run

--ppn PPN 3.3.4. Examples Number of processors per node (Default: 1) A typical instance of crv mp run set to run the set --nn NNODES IronOxides created in the previous example (Fig. 7) is Number of nodes with PPN processors per node to be as follows: used in the run (Default: 1) crv mp run set --ppn 64 -nn 45 --v IronOxides or If more than one of these options are specified, the com- crv mp run set -np 2880 --v IronOxides mand will choose max(NP TOT,PPN*NNODES) as the total Given that the set contains 45 edges, for maximum ef- number of processors to use. ficiency we assign one node with 64 processors to each 8 edge, or a total of 2880 processors, thus effectively run- to estimate how well a given system of interest will paral- ning all materials simultaneously. FEFF10 then computes lelize for a certain range of number of processors (“--np”) each individual edge parallelizing over the energy grid with relative to the fully serial calculation. 64 processors. 3.0 15 )

3.4. Requirements 3 2.5 3.4.1. Code distribution 10 Both Corvus[35] and FEFF10[36] are open source and are available on GitHub. Detailed installation instructions 2.0 5 can be found in Ref. [34]. Energy Loss (×10 0 1.5 540 560 580 3.4.2. Corvus requirements Energy (eV) mp-759943 The Corvus workflow manager is implemented in Energy Loss 1.0 mp-32570 Python 3. In addition, it requires the Numpy[37] and mp-776475 Scipy[38] packages, as well as a few other packages depend- mp-2254 ing on the required functionality. The Corvus workflows 0.5 mp-7048 that are possible will be determined by the specific ex- mp-1143 ternal software packages installed on the system. In this 0.0 10 100 case, the optical constants WF only requires the appropri- Energy (eV) ate version of FEFF10.

Figure 11: Loss function for several Al2O3 oxides listed in the MP. 3.4.3. FEFF10 requirements To run efficiently, a parallel execution is important. Thus, the FEFF code requires a Fortran90 compiler with 4. Example Applications some flavor of MPI-2 for compilation. FEFF has been 4.1. Optical constants of the elements tested with a wide variety of compilers and MPI-2 imple- mentations. As an illustration, we have carried out calculations for the most stable structure (at room temperature and nom- inally 1 atm) of each of the elemental solids listed in 3.4.4. Corvus [opcons] specific requirements the MP with data imported for a given MP-ID. Some of The crv mp mk set and crv mp run set tools are also the most important factors limiting the quality of the re- implemented in Python 3 and, in addition to the Corvus sults are the SCF and FMS radii used in the simulations. requirements, they need the pymatgen package.[39] In or- The results can be obtained online at http://feff.phys. der to use the MPRester method in pymatgen to access washington.edu/optical-constants/[33] Fig. 9 (top) the Materials Project database directly, users need to have shows a comparison of the results using an increasing num- an MP account and a valid API key. For the work pre- ber of near-neighbor shells for 2 of copper. We find that sented in this paper, we used pymatgen v2022.0.9, and MP 3 and 6 shells in the SCF and FMS modules, respectively, v2019.05. produce converged results above 10-20 eV. Overall, the results are in reasonable agreement with 3.4.5. Performance Analysis experimental tabulations,[26] and illustrate that, except The CPU time for a given material scales linearly with close to an edge or in the optical region, 2 can be ap- the number of edges and unique atom positions in a unit proximated reasonably by the atomic approximation, ig- cell and, depending on the SCF and FMS settings, typi- noring the fine structure. For example, Fig. 9 shows a cally takes between a few minutes and 1/2 hr. Thus, when comparison to experiment[26] of Cu 2 (top) and real in- the available number of processors is equal or greater than dex of refraction Au (bottom) computed with converged the total number of edges, linear parallelization is simply SCF and FMS radii and including the density of states achieved by assigning a processor or more to each edge, convolution in Eq. 10. These results show that Eq. 10 up to about 32-64 processors. More processors per edge is only semi-quantitative in the visible range. Fig. 10 becomes less efficient at the level of FEFF calculations. In shows a periodic table of the elements and associated MP- other cases, and for high-throughput runs for many dif- IDs that are currently available and can be freely viewed ferent materials, the wall-clock time depends on how the and downloaded at http://feff.phys.washington.edu/ set is structured (e.g., how many edges per material in optical-constants/.[33] the set) and how the calculations are distributed in the workflow. In that case, there are no simple rules to deter- 4.2. Optical constants of the Al2O3 materials in the MP mine the optimal parallel distribution. To help with this In addition to the elemental solids, we have also com- issue, the crv mp run set tool includes an option (“--t”) puted several aluminum oxides. For example, Fig. 3 shows 9 a comparison to experiment[26] of the energy loss for the optical-constants/. Complete installation and test- full energy range for the corundum form of Al2O3. In ing instructions as well as examples for the Corvus order to demonstrate the set capabilities of the Corvus [opcons] workflow, its associated tools, and the FEFF10 [opcons] workflow, we calculated results for a sub-set of code are available at http://feff.phys.washington. those listed in the MP with formula Al2O3. The results edu/optical-constants/installation.html. for the loss function up to the Al L-edges are shown in the main panel of Fig. 11, while the inset highlights the O K- edge region. The differences in the near edge structure, as Acknowledgments well as those in the optical reflect the different symmetries We thank C. Draxl, S. Dwaraknath, L. Hung, L. Rein- present in the system. For example, there is a mixture ing, and J. Vinson for comments and suggestions. This of Al sites in octahedral and tetrahedral symmetry in the work was supported primarily by the US Department of first two materials, which are both monoclinic, while the Energy, Office of Basic Energy Sciences, Division of Ma- last material is trigonal, and contains only Al in octahe- terials Sciences and Engineering, under Contract No. DE- dral symmetry. Similarly, the oxygen sites in the first two AC02-76SF00515, specifically through the Theory Insti- systems are a mixture of sites in tetrahedral and trigonal tute for Materials and Energies Spectroscopies (TIMES) symmetry. These changes in symmetry lead to differences program (JJR, JJK, FDV, and CDP), with computational in electronic structure, which are directly related to the support from NERSC, a DOE Office of Science User Facil- features seen in the near edge spectra. ity, under Contract No. DE-AC02-05CH11231. R. X. Yang and K. A. Persson acknowledge support by the US De- 5. Conclusions partment of Energy, Office of Science, Office of Basic En- ergy Sciences, Materials Sciences and Engineering Divi- We have presented an optical constants (“opcons”) sion under Contract No. DE-AC02-05-CH11231 (Materials workflow built with the Python-based Corvus workflow Project program KC23MP). manager for high-throughput simulations of full spectrum optical constants from the UV-VIS to hard x-ray wave- lengths for materials defined in the MP data-base. The References calculations are based on the efficient RSGF code FEFF10 and an approximate treatment of the valence contributions [1] E. D. Palik, Handbook of Optical Constants of Solids, Academic Press, Orlando, 1985. using structural data from the MP database specified by [2] S. Adachi, Handbook On Optical Constants Of Metals, The: In a unique MP materials ID. As for the XAS, the results Tables And Figures, World Scientific, 2012. can be represented in terms of an atomic-like background [3] B. L. Henke, E. M. Gullikson, J. C. Davis, X-ray interac- and an optical fine-structure (OFS) analogous to EXAFS. tions: photoabsorption, scattering, transmission, and reflection at E=50–30000 eV, Z= 1–92, Atom. Data Nucl. Data Tables 54 Except close to an edge where the fine-structure is sub- (1993) 181. stantial, the background dominates and can be calculated [4] C. T. Chantler, Detailed tabulation of atomic form factors, pho- efficiently over the full spectrum. The fine-structure is toelectric absorption and scattering cross section, and mass at- edge-specific and as in EXAFS, reflects the structure of tenuation coefficients in the vicinity of absorption edges in the soft x-ray (Z=30–36, Z=60–89, E=0.1 keV–10 keV), addressing the environment of a given absorber in the material. The convergence issues of earlier work, J. Phys. Chem. Ref. Data 29 calculations are set up automatically using Corvus auxil- (2000) 597. iary tools, and the workflow parallelizes the FEFF compu- [5] P. Nozi`eres, D. Pines, Electron interaction in solids. general tations over edges and sites with an optimal distribution of formulation, Phys. Rev. 109 (3) (1958) 741–761. [6] S. L. Adler, Quantum theory of the dielectric constant in real computational resources. Representative results show that solids, Phys. Rev. 126 (2) (1962) 413–420. the workflow produces accurate optical properties over a [7] N. Wiser, Dielectric constant with local field effects included, broad range of energies. Although this algorithm includes Phys. Rev. 129 (1) (1963) 62–69. [8] G. Onida, L. Reining, A. Rubio, Electronic excitations: density- mean-free paths and Debye-Waller factors, multiplet split- functional versus many-body green’s-function approaches, Rev. ting, excitonic effects, and long-range contributions to the Mod. Phys. 74 (2) (2002) 601–659. valence spectra are currently neglected. Consequently, the [9] R. M. Martin, L. Reining, D. M. Ceperley, Interacting electrons, present results may only be semi-quantitative in the UV- Cambridge University Press, 2016. [10] H. M. Lawler, J. J. Rehr, F. Vila, S. D. Dalosto, E. L. Shirley, VIS regime. Z. H. Levine, Optical to UV spectra and birefringence of SiO2 and TiO2: First-principles calculations with excitonic effects, Phys. Rev. B 78 (20) (2008) 205108. 6. Data availability [11] J. Vinson, J. J. Rehr, J. J. Kas, E. L. Shirley, Bethe-Salpeter equation calculations of core excitation spectra, Phys. Rev. B We have computed the optical properties for all el- 83 (2011) 115106. emental solids in the periodic table for which struc- [12] The exc code, https://etsf.polytechnique.fr/exc/. tures are available in the Materials Project database, [13] A. Gulans, S. Kontur, C. Meisenbichler, D. Nabok, P. Pavone, using the approach in this work. The data, in- S. Rigamonti, S. Sagmeister, U. Werner, C. Draxl, excit- ing: a full-potential all-electron package implementing density- cluding input files and structure, are freely avail- functional theory and many-body perturbation theory, J. Phys. able online at http://feff.phys.washington.edu/ Condens. Matter 26 (2014) 363202. 10 [14] N. Tancogne-Dejean, M. J. T. Oliveira, X. Andrade, H. Appel, [35] Corvus [opcons] GitHub repository, https://github.com/ C. H. Borca, G. Le Breton, F. Buchholz, A. Castro, S. Corni, times-software/Corvus/tree/convert-to-3. A. A. Correa, U. De Giovannini, A. Delgado, F. G. Eich, [36] FEFF10 GitHub repository, https://github.com/ J. Flick, G. Gil, A. Gomez, N. Helbig, H. H¨ubener, R. Jest¨adt, times-software/feff10/tree/fullspectrum. J. Jornet-Somoza, A. H. Larsen, I. V. Lebedeva, M. L¨uders, [37] Numpy Python module, https://numpy.org/. M. A. L. Marques, S. T. Ohlmann, S. Pipolo, M. Rampp, C. A. [38] Scipy Python module, https://www.scipy.org/. Rozzi, D. A. Strubbe, S. A. Sato, C. Sch¨afer,I. Theophilou, [39] A. Jain, S. P. Ong, G. Hautier, W. Chen, W. D. Richards, A. Welden, A. Rubio, , a computational framework for S. Dacek, S. Cholia, D. Gunter, D. Skinner, G. Ceder, K. A. exploring light-driven phenomena and quantum dynamics in ex- Persson, Commentary: The materials project: A materials tended and finite systems, J. Chem. Phys. 152 (2020) 124119. genome approach to accelerating materials innovation, APL [15] Y. Takimoto, F. D. Vila, J. J. Rehr, Real-time time-dependent Mater. 1 (2013) 011002. density functional theory approach for frequency-dependent nonlinear optical response in photonic molecules, J. Chem. Phys. 127 (2007) 154114. [16] C. Ambrosch-Draxl, J. O. Sofo, Linear optical properties of solids within the full-potential linearized augmented planewave method, Comput. Phys. Commun. 175 (1) (2006) 1–14. [17] A. Marini, C. Hogan, M. Gr¨uning,D. Varsano, yambo: An ab initio tool for excited state calculations, Comput. Phys. Com- mun. 180 (2009) 1392–1403. [18] W. S. M. Werner, K. Glantschnig, C. Ambrosch-Draxl, Optical constants and inelastic electron-scattering data for 17 elemental metals, J. Phys. Chem. Ref. Data 38 (2009) 1013–1092. [19] E. G. Maksimov, I. I. Mazin, S. N. Rashkeev, Y. A. Uspenski, First-principles calculations of the optical properties of metals, J. Phys. F Met. Phys. 18 (1988) 833–849. [20] M. P. Prange, J. J. Rehr, G. Rivas, J. J. Kas, J. W. Lawson, Real space calculation of optical constants from optical to x-ray frequencies, Phys. Rev. B 80 (2009) 155110. [21] C. Zheng, K. Mathew, C. Chen, Y. Chen, H. Tang, A. Dozier, J. J. Kas, F. D. Vila, J. J. Rehr, L. F. Piper, et al., Automated generation and ensemble-learned matching of x-ray absorption spectra, Npj Comput. Mater. 4 (2018) 1–9. [22] Y. Chen, C. Chen, C. Zheng, S. Dwarknath, M. K. Horton, J. Cabana, J. J. Rehr, J. Vinson, A. K. Dozier, J. J. Kas, K. A. Persson, S. P. Ong, Database of ab initio L-edge x-ray absorp- tion near edge structure, Sci. Data, in press (2021). [23] S. B. Torrisi, M. R. Carbone, B. A. Rohr, J. H. Montoya, Y. Ha, J. Yano, S. K. Suram, L. Hung, Random forest machine learning models for interpretable x-ray absorption near-edge structure spectrum-property relationships, npj Computational Materials 6 (1) (2020) 1–11. [24] S. M. Story, F. D. Vila, J. J. Kas, K. B. Raniga, C. D. Pem- maraju, J. J. Rehr, Corvus: a framework for interfacing sci- entific software for spectroscopic and materials science applica- tions, J Synchrotron Radiat 26 (2019) 1694–1704. [25] M. Altarelli, D. L. Dexter, H. M. Nussenzveig, D. Y. Smith, Superconvergence and sum rules for the optical constants, Phys. Rev. B 6 (12) (1972) 4502–4509. [26] H. Hageman, W. Gudat, C. Kunz, Optical constants from the far infrared to the x-ray region: Mg, Al, Cu, Ag, Au, Bi, C, and Al2O3, Tech. rep., DESY (1974). [27] O. L. Anderson, A simplified method for calculating the Debye temperature from elastic constants, J. Phys. Chem. Solids 24 (7) (1963) 909–917. [28] N. W. Ashcroft, N. D. Mermin, Solid State Physics, Harcourt Brace Jovanovich College Publishers, 1976. [29] F. D. Vila, J. J. Rehr, H. H. Rossner, H. J. Krappe, Theoretical x-ray absorption Debye-Waller factors, Phys. Rev. B 76 (2007) 014301. [30] G. F. Jenks, The data model concept in statistical mapping, International yearbook of cartography 7 (1967) 186–190. [31] jenskpy Python module, https://pypi.org/project/jenkspy/. [32] E. Sevillano, H. Meuth, J. Rehr, Extended x-ray absorption fine structure Debye-Waller factors. I. Monatomic crystals, Physical Review B 20 (12) (1979) 4908. [33] Periodic table of optical constants for the elemental solids, http://feff.phys.washington.edu/optical-constants. [34] Corvus [opcons] and FEFFF installation instructions, http://feff.phys.washington.edu/optical-constants/ installation.html.

11