Feff10 Users Guide
Feff10 Users Guide
This document is copyright ©2020 by J.J. Rehr, J.J. Kas, K. Jorissen, A. Ankudinov, and B.
Ravel.
Permission is granted to reproduce and distribute this document in any form so long as the
copyright notice and this statement of permission are preserved on all copies.
This document can also be found on the feff website.
CONTENTS i
Contents
1 Synopsis 1
1.1 Acknowledgements and history . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 The FEFF Users Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
C References 118
Chapter 1
Synopsis
feff10 is the most recent version of the real-space multiple scattering code feff for calculating
a wide variety of spectroscopies, including XAS, XES, EELS, and Compton scattering. The
feff code has been extensively used, especially for calculation and analysis of XAS (both EX-
AFS and XANES) and XES. There are a variety of new features available in feff10, including
finite temperature calculations of XAS, extension to superheavy elements up to Z=138, and
calculations of resonant inelastic x-ray scattering.
In addition, feff10 can be coupled with our scientific workflow framework Corvus, which
allows users to run advanced calculations using multiple scientific software starting from a
single simple input file. In some cases, Corvus is used with several different software packages,
for example to relax the structure of a system before calculating the XAS. In other cases,
it augments a single code by combining different input structures, for example looping over
unique sites in a crystal, or creating a RIXS calculation from mulitple feff calculations of
XAS and XES.
feff calculates spectroscopic properties, including extended x-ray-absorption fine structure
(EXAFS), x-ray-absorption near-edge structure (XANES), x-ray natural circular dichroism
(XNCD), spin-dependent calculations of x-ray magnetic dichroism (XMCD) and spin polar-
ized x-ray absorption (SPXAS and SPEXAFS), Compton scattering, nonresonant x-ray emis-
sion (XES), and Non-Resonant Inelastic X-ray Spectroscopy (NRIXS). In addition the code
calculates electronic structure including local densities of states (LDOS), and the x-ray elastic
scattering amplitude f = f0 +f 0 +if 00 including Thomson and anomalous parts, and relativistic
electron energy loss spectroscopy (EELS).
feff uses an ab initio self-consistent real space multiple scattering (RSMS) approach,
including polarization dependence, core-hole effects, and local field corrections, based on self-
consistent, spherical muffin-tin scattering potentials. Calculations are based on an all-electron,
real space relativistic Green’s function formalism with no symmetry requirements. The code
builds in inelastic losses in terms of a GW self-energy, and includes vibrational effects in terms
of Debye-Waller factors. For periodic structures reciprocal space calculations based on periodic
boundary conditions are also available. feff can use both full multiple scattering based on
LU or Lanczos algorithms and a high-order path expansion based on the Rehr–Albers multiple
1.1. ACKNOWLEDGEMENTS AND HISTORY 2
scattering formalism.
The name feff is derived from fef f , the effective curved wave scattering amplitude in the
modern EXAFS equation. This was the first application of the feff code, and is the basis for
the multiple-scattering path-expansion in the code.
For details on use of the code, examples and suggestions for calculation strategies, see
Sections 2, 4, and 3. For details about the algorithms, see the discussion for the appropriate
module in Section 3. For additional details, see the published references in Appendix C and
the feff website.
feff is written in ANSI Fortran 90. It typically requires 250 MB - 2GB of available memory
(RAM). More memory may be needed on MS Windows systems or for very large calculations.
See Appendix B for installation instructions. Many problems run well on a laptop. For larger
calculations of XANES, NRIXS, or COMPTON a small cluster may be more appropriate.
Please contact the authors concerning any problems with the code. See Appendix G for
trouble-shooting hints and problem/bug reports or the FAQ on the feff website.
font denotes
small caps names of programs
typewriter font contents of files
‘quoted typewriter font’ file names
ROMAN CAPITALS names of cards in the ‘feff.inp’ file
slanted typewriter font commands executed at a command line
1.3. EXAMPLES 5
1.3 Examples
Your feff installation includes a folder containing examples of calculations for nearly all dif-
ferent types of calculations feff can do. It’s worth spending some time looking at the files
and exploring which options were used. Most of the examples are also discussed in the next
chapter of this Users Guide.
Note that many examples have reduced basis sets that allow you to run the test quickly,
but do not produce a ”converged” spectrum that can be compared to experiment or used in a
publication. At least the cutoff radii of the SCF, FMS, and RPATH cards need to be converged
to achieve proper results.
Each example has a self-contained directory containing the input file ‘feff.inp’, a ref-
erence spectrum file ‘xmu.dat’, and a compressed file ‘REFERENCE.zip’ containing the entire
calculation, including intermediary files.
Once you start setting up and running your own calculations, we recommend that you
continue to launch each calculation in a separate directory to avoid problems and confusion.
(Once files get mixed up, it can be very hard to figure out what happened, and the only solution
is often to recalculate everything from the beginning.)
6
Chapter 2
requiring the entire calculation to be redone. If the model (i.e., the atom positions) doesn’t
change significantly, it is usually not necessary to recalculate the potentials. E.g., if one wants
to add more paths to the path expansion, the calculation can be restarted with module path,
saving much time. If one wants to change the beam orientation in an EELS calculation,
only the eels module needs to run again. However, significant changes to the model require
rerunning the entire calculation. Generally, pot, fms, and genfmt take much time, while all
other program modules are very fast.
The study of a material usually requires running several calculations, because there are
parameters to converge, for example the cutoff radius of the full multiple scattering algorithm.
There are no default values for these parameters that work for all materials. Debye-Waller
factors may require much attention in the EXAFS regime but the XANES regime may be less
sensitive. It takes some experimentation to find out what treatment is adequate for a given
material.
The information in this chapter aims to illuminate such matters; some hands-on experience
will do the rest.
The feff program consists of a set of program modules driven by a single input file ‘feff.inp’.
To prepare feff input, you must answer four questions:
The answer to question 1 requires knowledge of the structure. In most cases, this means
obtaining a list of x,y,z Carthesian atom coordinates and atomic numbers. feff is happy with
an explicit list of atoms, e.g. for molecules, aperiodic systems, or as an approximation to a
periodic material. feff can also read ‘.cif’ files, a widely accepted format for representing
crystal data. Such files can be found for many materials in online databases and can be
linked to in the ‘feff.inp’ file. Finally, there are some third-party tools that can set up a
‘feff.inp’ file for you based on atomic positions or crystallographic information. An example
is webatoms, developed by B. Ravel; or the popular Athena program. More feff-compatible
crystallographic tools are available from ICMPE.
Although feff input can certainly be constructed from scratch, the most common approach
is to start from an existing input file, and modify it to what you want to do. Example input files
included in your feff installation and discussed in this chapter are an excellent starting point.
You can take such a file and replace the atomic coordinates with your own (typically, using
2.2. RUNNING FEFF 8
the ATOMS and POTENTIAL cards, or equivalently the CIF card). Then you can continue
to edit the file to answer questions 2-4.
As you look at the examples in this chapter, it may be helpful to refer to Chapter 3, which
contains an exhaustive reference list of all input options.
The input file ‘feff.inp’ is a loosely formatted, line-oriented text file. Each type of input read
by the program is on a line starting with a CARD: a keyword possibly followed by some numbers
or words. The sequence of keyword cards is arbitrary. If any card or optional data is omitted,
default values are used. Most calculations do require the POTENTIALS card, and either the
ATOMS card or the OVERLAP card. Together, the POTENTIALS and ATOMS/OVERLAP
cards specify the physical structure of the molecule or solid one is interested in. feff uses
Carthesian coordinates and Angstrom units. Hence it is easy to copy atom positions from, e.g.,
an ‘xyz’ file or other popular file formats. It is also possible to import CIF files (‘*.cif’). There
are many optional cards to specify the material property to calculate (e.g., X-ray spectroscopy)
and to control how feff calculates it.
All distances are in Angstrom (Å) and energies are in electron-volts (eV).
Once the input is ready, the calculation is started by giving a single command feff from a
command line terminal. This executes a script bundling about fifteen modules that together
comprise the feff code.
Generally, not all modules are run for a given calculation. To some extent, each step can be
controlled individually through cards or an intermediate input file (‘pot.inp’, ‘ldos.inp’, ...).
Note that it’s useless to run any module unless the preceding modules have been run already.
We recommend that novice users simply run the feff command until they develop a more
detailed understanding of how the feff code works.
On the command line one can either call each of the modules by name, or use the CONTROL
card in ‘feff.inp’ to select modules.
The underlying program flow of the feff program is as follows:
1. The ‘feff.inp’ file is read and checked for consistency. Various intermediate input files
are written (in the module rdinp, read input).
2. Ab initio Debye-Waller factors are calculated if the dynamical matrix is provided. (dmdw,
dynamical matrix to debye-waller.)
3. Atomic overlap (Mattheiss) potentials are calculated. (module atomic, atomic poten-
tials.)
4. The scattering potentials are calculated self-consistently using an automated SCF loop.
Absolute energies are estimated. (module pot, potentials.)
2.2. RUNNING FEFF 9
Figure 2.2: Flow chart of the FEFF program showing all submodules. The ldos module is not
shown - it can be executed any time after the calculation of the potentials.
Figure 2.3: Flow chart of the FEFF program showing all submodules as well as some of the
most important input and output files. Many other files are produced by the FEFF program
depending on spectrum type and selected options. File descriptions are in Chapter 5.
2.3. CALCULATING THE POTENTIAL AND PHASE SHIFTS. 11
First the quality of the calculation must be examined. We list a tentative set of questions one
can ask:
Making sure that the Self-Consistent Field (SCF) calculation of the potentials has con-
verged (more below) - see ‘log1.dat’
Check that the Density of States and Fermi level are reasonable (‘ldos01.dat’, ‘log1.dat’)
Check that the calculations are converged with respect to SCF cutoff radius
Check that the calculations are converged with respect to FMS cutoff radius
Check that the calculations are converged with respect to RPATH cutoff radius
In a next step, one plots the calculated spectrum (e.g. the XANES spectrum in file
‘xmu.dat’) together with a measured spectrum from an experiment. If the agreement is not
satisfactory, one can check many factors in the calculation:
Most of these techniques are discussed in greater detail throughout this chapter. The paper
by Moreno and Jorissen refers to an older version of feff but still provides a good case study
of all the steps to check when doing a feff study.
CONTROL 1 1 0 0 0 0
PRINT 2 0 0 0 0 0
2.4. CALCULATING THE DENSITY OF STATES 13
results in files ‘pot00.dat’, ‘pot01.dat’ and so on. These contain single and overlapped
potentials and densities and can be plotted, e.g. in gnuplot.
The progression of a self-consistent calculation can be checked in the ‘.scfconvergence-feff’.
Note that feff has historically accumulated options for setting the edge and core hole.
We highly recommend that users use only the EDGE card for specifying the edge, and the
COREHOLE card for selecting the core hole treatment. The HOLE and NOHOLE cards are
deprecated and supported for backward compatibility only.
How best to treat the core-hole in XAS is an interesting theoretical question. The default
choice in FEFF has always been a fully screened core-hole (meaning that the hole is self-
consistently screened during the SCF loop), which is consistent with the ”final state rule”
(”COREHOLE fsr”). But this approximation sometimes breaks down for the L-shell metals.
Often a better approximation is to use RPA screening. This screening approximation is similar
to that in the Bethe-Salpeter equation (BSE) and is available in FEFF9 (”COREHOLE RPA”).
However, missing is the exchange term in the particle-hole interaction, which tends to cancel
the core-hole. Interestingly the cancellation is often strong for the L-shell materials, which
is why ”COREHOLE none” sometimes works better. Recently we’ve developed a BSE code
to better study these phenomena. See also “Final-state rule vs the Bethe-Salpeter equation
for deep-core x-ray absorption spectra,” J.J. Rehr, J. A. Soininen, and E. L. Shirley, Physica
Scripta T115, 207 (2005); as well as a forthcoming paper, ”BSE calculations of transition
metal L-shell spectra, J. Vinson and J.J. Rehr”.
FIX add paragraph about screening.
xsph writes its main output to ‘xsect.dat’ : this file contains the matrix elements and
the atomic background as a function of energy. If you set the PRINT card to 1 or higher, the
phases will be written to a file ‘phase.dat’, though this file is not usable for plotting. Setting
the PRINT card even higher makes feff calculate hole counts and write them to ‘log2.dat’.
Careful - this is quite slow.
Relativistic dipole matrix elements (alpha form) are calculated using atomic core and nor-
malized continuum wave functions. Polarization dependence is optionally incorporated in the
dipole-operator. Scattering phase shifts are determined by matching at the muffin-tin radius.
feff is designed to calculate absorption from completely filled shells. You can try to
simulate absorption from valence electrons with feff, but you may get unreliable results. If
you encounter difficulties and need valence shell absorption, please contact the authors.
The ldos module uses a fixed energy mesh of 81 points which sometimes frustrates users
wanting the DOS over a larger energy range. The simplest solution is to simply run ldos
several times with a different energy range and combine the output.
There are two ways to calculate the Green’s function. The first method is suitable for
near-edge properties and is executed by modules fms and mkgtr. These modules carry out a
full multiple scattering XANES/ELNES calculation. In real space calculations this is done for
a cluster centered on the absorbing atom. In k-space it is done for a matrix containing only
the atoms of the unit cell. Thus all multiple-scattering paths within this system are summed
to infinite order. This is useful for XANES and ELNES calculations, but usually cannot be
used for EXAFS analysis. FMS loses accuracy beyond k = (lmax + 1)/rmt , which is typically
about 4 Å−1 since the muffin-tin radius rmt is typically about 1 Å. In real-space calculations,
the FMS cluster radius must be converged to ensure adequate accuracy. FMS is typically the
most time-consuming part of the calculation and slows down significantly with cluster or unit
cell size.
The FMS Green’s function is written to file ‘gg.dat’. Its trace - which yields the spectrum
- can be found in ‘gtr.dat’.
For energies high above the Fermi level or edge threshold, the Path Expansion (PE) is
more appropriate. It is executed by modules path and genfmt. Here, instead of summing
implicitly over an infinite number of paths, we sum explicitly over a select range of scattering
paths. The code uses a constructive algorithm with several path importance filters to explore
all significant multiple-scattering paths in order of increasing path length. The paths are
determined from the list of atomic coordinates in ‘feff.inp’. An efficient degeneracy checker
is used to identify equivalent paths (based on similar geometry, path reversal symmetry, and
space inversion symmetry). To avoid roundoff errors, the degeneracy checker is conservative
and occasionally treats two degenerate paths as not degenerate. These errors occur in the third
or fourth decimal place (less than 0.001 Ang) but are fail-safe; that is, no paths will be lost.
All paths which are completely inside the FMS cluster are automatically excluded from the
paths list, if specified by the FMS card.
The criteria used in filtering are based on increasingly accurate estimates of each path’s
amplitude. The earliest filters, the pathfinder heap and keep filters, are applied as the paths
2.6. CALCULATING THE SPECTRUM 15
are being searched for. A plane wave filter, based on the plane wave approximation (plus a
curved wave correction for multiple-scattering paths) and accurate to about 30%, is applied
after the paths have been enumerated and sorted. Finally, an accurate curved wave filter is
applied to all remaining paths.
In the event of a k-space calculation, the rdinp module generates a large real-space list of
atom coordinates from the unit cell information in ‘feff.inp’. This list will be used for the
path and genfmt modules, which always work in real space, as this is the optimal space for
treating the extended spectrum.
The list of all paths can be found in file ‘paths.dat’. You can manually edit this list.
For each path the code calculates the effective scattering amplitude and the total scattering
phase shift along with other XAFS parameters using the scattering matrix algorithm of Rehr
and Albers. This requires only the scattering phase shifts (module xsph) and the paths (module
path) as input.
It is possible to combine the two strategies. E.g. the following input
FMS 4.0
RPATH 10.0
XANES
tells feff to calculate a XANES spectrum by doing Full Multiple Scattering up to a radius of
4. Åaround the aborber (summing all paths to infinite order within this radius), and adding
Path Expansion contributions from paths extending beyond this radius but no longer than 10.
Å. Although this is possible, we do not recommend it. We recommend the combination FMS
+ XANES for near-edge spectra, and EXAFS + RPATH for extended spectra.
The modules ff2x, sfconv, compton and eels construct the XAS spectrum χ(k) or µ
using the XAFS parameters described in Section 4.2.5 from one or more paths, and adding
the FMS contributions. Single and multiple scattering Debye–Waller factors are calculated
using, for example, the correlated Debye model. The spectrum can be found in file ‘xmu.dat’
for most types of spectroscopy. Numerous options for filtering, Debye–Waller factors, and other
corrections are available. The details depend on the type of spectroscopy. For more details and
examples, we refer to the section below that is appropriate for your type of calculation.
??FIX Add a paragraph or two about sfconv either here or in a section of itself??
2.7. EXAFS CALCULATION 16
SF6 Molecule. This is the simplest example of running feff to obtain results for EXAFS.
Only two input cards, POTENTIALS and ATOMS, are strictly necessary. However it is good
practice to list the cards EXAFS and RPATH. The output χ can be found in the file ‘chi.dat’.
POTENTIALS
* absorbing atom must be unique pot 0
* ipot z tag
0 16 S
1 9 F
EXAFS 20
RPATH 10
EDGE K
2.7. EXAFS CALCULATION 17
ATOMS
* x y z ipot
0 0 0 0 S absorber
1.56 0 0 1 6 F backscatters
0 1.56 0 1
0 0 1.56 1
-1.56 0 0 1
0 -1.56 0 1
0 0 -1.56 1
2.7.2 Solids
Cu metal
Cu, fcc metal, 4 shells. The list of atomic coordinates (ATOMS card) for crystals can be
produced by the program atoms. Thus instead of giving a long atoms list, we present a short
‘atoms.inp’ file. For connection with EXAFS fitting programs see Section 4 and the PRINT
card on page 75.
POTENTIALS
0 29 Cu0
1 29 Cu
ATOMS
atoms list generated using atoms.inp file below
--------------------------------------------
title Cu metal fcc a=3.6032
fcc ! shorthand for F M 3 M
rmax= 11.13 a=3.6032
out=feff.inp ! index=true
geom = true
atom
! At.type x y z
Cu 0.0 0.0 0.0
--------------------------------------------
2.7. EXAFS CALCULATION 18
RPATH 4.5
POTENTIALS
* ipot z tag
0 29 Cu2
1 8 O
2 39 Y
3 29 Cu1
4 56 Ba
ATOMS
atoms list generated by the following atoms.inp file
-----------------------------------
title YBCO: Y Ba2 Cu3 O7 (1-2-3 structure)
space P M M M
rmax=5.2 a=3.823 b=3.886 c=11.681
core = Cu1
atom
! At.type x y z tag
Y 0.5 0.5 0.5
Ba 0.5 0.5 0.184
Cu 0 0 0 Cu1
Cu 0 0 0.356 Cu2
O 0 0.5 0 O1
O 0 0 0.158 O2
O 0 0.5 0.379 O3
O 0.5 0 0.377 O4
--------------------------------------
All above examples yield calculations for the K edge (default). To do calculations for other
edges, use the EDGE or HOLE cards. These cards will also yield an estimate of S02 from atomic
calculations if you set S02 < 0.1 by the one of two possible ways shown below.
EDGE L3 0.0
S02 0.0
2.8. XANES CALCULATIONS 19
The result for S02 is given in ‘chi.dat’ or ‘xmu.dat’. S02 is a square of determinant of overlap
integrals for core orbitals calculated with and without core hole. The core-valence separation
can be changed by editing the subroutine getorb, but it is currently set by default to the most
chemically reasonable one.
In amorphous materials or materials with distortions from regular crystals, the absorbing atoms
(with the same number in the periodic table) may have different surroundings. Thus one may
want to average the calculation over different types of sites for the same atom or even over all
atoms in the ‘feff.inp’ file. This can be accomplished using CFAVERAGE card of Section 3.3.
This type of calculation is currently curtailed by the limited functionality of the CFAVERAGE
card, which should be used with caution. Please contact the authors if problems occur.
FIX we need an example here
Self-consistency is expected to be more important for XANES calculations, but even for EXAFS
one may want to have a more reliable determination of Fermi level or to account for charge
transfers in order to do fits with a single energy shift E0 . Our experience shows that reliable
EXAFS phase shifts are best achieved using the SCF card.
The above example works for solids or large molecules, but for molecules with less than 30
atoms, calculations can be done faster if you set lfms1 = 1:
SCF 10.0 1
For details see the SCF and FMS cards in Sections 3.5.2 and 3.5.4.
XANES calculations usually take more time and require more experience than EXAFS calcu-
lations. They require self-consistent potentials using the SCF card. The use of the SCF card
also gives a more reliable estimate of the Fermi level. (The CORRECTIONS card can still
be used, since the error in Fermi level position is only a few eV). feff10 thus automatically
accounts for charge transfer. The ION card should be used only to specify the total charge of
2.8. XANES CALCULATIONS 20
a cluster. Overlapping of muffin tins (AFOLP) leads to better results for XANES and is done
by default.
The high order MS path expansion can lead to unreliable XANES calculations when the
MS series converges poorly (as is often the case near the Fermi level). Thus using Full Multiple
Scattering (FMS) instead of the path expansion is essential for calculations of `DOS and elec-
tronic densities and is usually an improvement for XANES. We suggest to use FMS exclusively
and uses path expansion for testing its convergence. The FMS calculations typically take more
time and memory than the other 5 modules. The results can be somewhat better with larger
clusters, but typically one achieves convergence with about 100-300 atoms. Calculation time
scales as a third power of the number of atoms in a cluster and quickly becomes expensive.
However, the description of the FMS card lists options for iterative matrix solvers that improve
the scaling somewhat. Here are sample input files for XANES calculation.
This is historically the first molecule for which EXAFS was calculated using short range order
theory. (Hartree, Kronig and Peterson, 1934)
COREHOLE none
EDGE K 1.0
RSIGMA
CONTROL 1 1 1 1 1 1
SCF 3.0 1
FMS 3.0 1
RPATH 1.0
XANES 8.0 0.05
AFOLP 1.30
POTENTIALS
* ipot z label
0 32 Ge 3 3
1 17 Cl 3 3
ATOMS
* x y z ipot atom
0.0000 0.0000 0.0000 0 Ge
1.2100 1.2100 1.2100 1 Cl
1.2100 -1.2100 -1.2100 1 Cl
-1.2100 1.2100 -1.2100 1 Cl
-1.2100 -1.2100 1.2100 1 Cl
2.8. XANES CALCULATIONS 21
END
BN crystal has a zinc sulfide structure. The multiple scattering path expansion does not con-
verge near the Fermi level. Using the full multiple scattering approach leads to good agreement
with experiment.
SCF 3.1
EDGE K 1.0 * s0^2=1.0
EXCHANGE 0 0 1.0
LDOS -20 10 0.5
FMS 5.1
RPATH 1.0
XANES 4.0
INTERSTITIAL 0 1.54
POTENTIALS
* ipot z label lmax1 lmax2
0 5 B 2 2 0.1
1 7 N 2 2 1
2 5 B 2 2 1
ATOMS
list generated by ATOMS program
-------------------------------------
title BN (zincblende structure)
Space zns
a=3.615 rmax=8.0 core=B
atom
! At.type x y z tag
B 0.0 0.0 0.0
N 0.25 0.25 0.25
----------------------------------------
The absolute cross section for XAS spectroscopy can be obtained from the output in ‘xmu.dat’.
Look for this line:
2.9. SPIN-DEPENDENT CALCULATIONS 22
Since our distances are in Å, we report the XAS cross section also in Å2 . If you multiply
the 4-th or 5-th column by this normalization value you will obtain the cross section in Å2 .
Literature often reports the absolute cross section in barns (1 Å2 = 100Mbarn).
Note that this normalization can be switched off using the ABSOLUTE card. This is set
by default for NRIXS, ELNES and EXELFS calculation. The normalization factor then shows
as ”‘1.0”’.
As of feff9.1, EELS spectra in ‘eels.dat’ are always given in units of a20 /eV . Multiply
by 28.0010− 18 to get units of cm− 2/eV . Or multiply by 28 to get units of M barn/eV .
This section contains information on extracting the XMCD signal and on the SPXAS technique,
including example input files.
Spin-dependent calculations are automated. All spin-dependent calculations require that
the SPIN card be present in ‘feff.inp’ (see the SPIN card in Section 3.5.2). The method de-
pends on the value of the parameter nspx in the header file ‘feff10/src/COMMON/m dimsmod.f90’.
Please contact the authors if you need help modifying the source code.
In order for the final result to be contained in ‘xmu.dat’, feff must be compiled with
nspx = 2 to combine both the spin-up and spin-down calculations. This will also add the
contribution from spin-flip processes (which we find typically very small), but may require up
to 4 times the memory and 8 times the execution time for the XANES region.
With nspx = 1, one can run the code twice, once for spin-up and once for spin-down. Spin-
flip terms are not calculated, but by making the proper combination of spin-up and spin-down
spectrum, one obtains XMCD or SPXAS (Section 2.9.3). A simple program ‘spin.f’, printed
in the appendix and also on the feff (website), can do this. The same paths should be used
for spin-up and spin-down calculations, otherwise the difference between 2 calculations may be
due to different paths used. Typically the paths list in ‘paths.dat’ should be generated by
running the usual EXAFS calculations and comparing with experiment (to make sure that all
important paths are included). Then, when running with SPIN, turn off the pathfinder module
using the CONTROL card.
Example input file for calculation of XMCD for the Gd L1 edge. Note the presence of both
the SPIN and XMCD cards.
TITLE Gd l1 hcp
2.9. SPIN-DEPENDENT CALCULATIONS 23
XMCD
EDGE L1 1.0 * s0^2=1.0
SPIN 1
EXCHANGE 2
RGRID .01
CONTROL 1 1 1 1 1 1
RPATH 7.29
CRITERIA 0.0 0.0 curved plane
DEBYE 150 176 temp debye-temp
XANES
POTENTIALS
* ipot z label
0 64 Gd
1 64 Gd
ATOMS
the list of atoms is created by ATOMS program
---------------------------------------------
title Gd , hcp
! Wycoff, vol.1 p.331
space hcp
rmax = 9.0
a = 3.6354
c = 5.7817
atom
Gd 0.33333 0.66667 0.25 center
-----------------------------------
2.9.3 SPXAS
For antiferromagnets, the XMCD should be zero, and a measure of the spin-up and spin-down
signals can be accomplished using SPXAS. SPXAS is a technique where you measure the spin-
up and spin-down signal by measuring the intensity of two spin-split Kβ lines. This corresponds
to measuring spin-order relative to the spin on the absorber (not relative to the external
magnetic field as in XMCD). As an example, let us look at the Mn K edge of antiferromagnetic
MnF2 . Our calculations agree well with experiment in the EXAFS region.
Here is an example input file for MnF2 :
CONTROL 1 1 1 1 1 1
RPATH 10.0
XANES
PCRITERIA 0.8 40.0
CRITERIA 0.0 0.0
DEBYE 300 350
NLEG 4
POTENTIALS
* ipot z label
0 25 Mnup
1 9 F
2 25 Mnup
3 25 Mndown
ATOMS
0.0000 0.0000 0.0000 0 Mnup 0.0000
1.4864 1.4864 0.0000 1 F 2.1021
-1.4864 -1.4864 0.0000 1 F 2.1021
0.9503 -0.9503 1.6550 1 F 2.1319
0.9503 -0.9503 -1.6550 1 F 2.1319
-0.9503 0.9503 1.6550 1 F 2.1319
-0.9503 0.9503 -1.6550 1 F 2.1319
0.0000 0.0000 -3.3099 3 Mndown 3.3099
0.0000 0.0000 3.3099 3 Mndown 3.3099
-3.3870 1.4864 0.0000 1 F 3.6988
3.3870 -1.4864 0.0000 1 F 3.6988
1.4864 -3.3870 0.0000 1 F 3.6988
-1.4864 3.3870 0.0000 1 F 3.6988
2.4367 2.4367 -1.6550 2 Mnup 3.8228
-2.4367 -2.4367 -1.6550 2 Mnup 3.8228
2.4367 -2.4367 -1.6550 3 Mndown 3.8228
-2.4367 -2.4367 1.6550 3 Mndown 3.8228
-2.4367 2.4367 -1.6550 3 Mndown 3.8228
2.4367 2.4367 1.6550 3 Mndown 3.8228
2.4367 -2.4367 1.6550 2 Mnup 3.8228
-2.4367 2.4367 1.6550 2 Mnup 3.8228
...
END
2.10. ELASTIC SCATTERING AMPLITUDES 25
FMS 7.0
ELNES ...
RPATH 8.0
EXELFS ...
The EELS spectrum is written to the ‘eels.dat’ file in absolute units. See the file header
for more details. Old versions of feff used arbitrary units and may have a wildly different
order of magnitude.
2.13. NRIXS 26
The EELS engine calculates the Σ tensor, containing ’basis spectra’ for all 9 polarization
components. EELS calculations cannot be combined with the POLARIZATION or ELLIP-
TICITY cards. The corresponding variables (the polarization vector resp. the beam direction)
are set internally based on the options of the ELNES card or the EXELFS card.
If you change something in the calculation of the material properties - such as atom positions,
or the FMS radius - you need to rerun all or most of feff. If you only change the experimental
setup (i.e., beam direction, beam energy, detector aperture or position, or beam convergence
angle ; or toggle relativistic cross-section on/off ) but leave the sample unchanged, then you
need only do the following :
Edit ‘feff.inp’
Run module rdinp to update ‘eels.inp’ (alternatively, you can edit ‘eels.inp’ directly–
but beware, this file is somewhat format-sensitive)
Run module eels to calculate a new EELS spectrum.
The eels module is very fast and can be looped over to fit some of the experimental
parameters mentioned.
2.13 NRIXS
Non-Resonant Inelastic X-ray Scattering (NRIXS) is determined by the momentum transfer
dependent dynamic structure factor S(~q, E) (DFF). feff NRIXS calculations output the DFF
for a given ~q over a range of E. From this quantity, the NRIXS signal is obtained by simply
adding a multiplicative factor containing beam energies and polarization. (See references.)
NRIXS calculations are controlled by the following cards : NRIXS, LJMAX, and LDEC. In
addition, one must use either the XANES and FMS cards for the near-edge region ; or the
EXAFS and RPATH cards for the extended region. Note that for NRIXS, if xkmax < 0 in the
XANES or EXAFS card, then an energy grid of approximately constant energy step is used
(instead of the usual constant k-step).
Although the code has been tested for wide range of momentum transfers the code is
most stable for the medium region of momentum transfer values. This typically means 0.1 <
q < 14a.u. for light elements or shallow edges, i.e. binding energy less than 400 eV. Higher
momentum transfers are possible for more tightly bound electrons (see examples below). The
small momentum transfers can cause numerical instabilities at near edge region and large
2.13. NRIXS 27
momentum transfers also in the extendend energy range. There is no default value for the
momentum transfer.
NRIXS produces two main output files. ‘xmu.dat’ contains the total spectrum in the usual
6-column format. ‘xmul.dat’ contains:
col 4 - 4+ld: the next ld + 1 columns give the contribution to the atomic background
Sl0 (~q, E) for the final state electron angular momentum values l = 0, . . . , ld :
col 4+ld+1 - end: the next (ld+1)(ld+1) columns give the decomposition of fine structure
i.e.
0 1 X
χllq~ (k) = ~ E)ρsc
ML (−q, LL0 (E)ML0 (~
q , E) (2.2)
S0 (~q, E) 0
mm
To plot the contribution of only s-type (l = 0) final states one would do in gnuplot (ld = 2)
:
FMS 3.0 1
RPATH 1.0
XANES 8.0 0.05
AFOLP 1.30
POTENTIALS
* ipot z label
0 32 Ge 3 3
1 17 Cl 3 3
ATOMS
* x y z ipot atom
0.0000 0.0000 0.0000 0 Ge
1.2100 1.2100 1.2100 1 Cl
1.2100 -1.2100 -1.2100 1 Cl
-1.2100 1.2100 -1.2100 1 Cl
-1.2100 -1.2100 1.2100 1 Cl
END
The NRIXS code requires substantial stack space. We recommend changing the available
stacksize to unlimited using shell commands (in tcsh)
or (in bash)
The following input cards cannot currently be used for NRIXS: CFAVERAGE, SPIN, EL-
LIPTICITY, MULTIPOLE, POLARIZATION, TDLDA, RPHASES, XES, XMCD.
The NRIXS code cannot run in k-space.
The NRIXS code can simultaneously calculate a list of q-vectors if run from the command
line.
2.14. LOCAL FIELD EFFECTS AND CORE-HOLE EFFECTS (PMBSE,
TDDFT) 29
2.14 Local Field Effects and Core-hole Effects (PMBSE, TDDFT)
These are features of feff that are still under development. They are not reliable in this
release of feff10.
Many-body effects such as local fields and the core-hole interaction can be significant in
x-ray absorption spectra, even several hundred eV above an absorption edge. The treatment of
these effects requires theories beyond the independent-particle approximation, e.g., the Bethe-
Salpeter equation (BSE) or the time-dependent density-functional theory (TDDFT).
The projection-operator method Bethe-Salpeter equation (PMBSE) is used for core-hole ab-
sorption spectra calculations. The BSE is usually limited to low energies, while the TDDFT of-
ten ignores the nonlocality of the core-hole interaction. Time dependent density functional the-
ory (TDDFT) is a general framework for studying non-stationary electronic processes. TDDFT
is used for local-field absorption spectra calculations.
The approach being developed for feff is a combined approach for calculations of the x-ray
spectra that include both of these effects, together with inelastic losses and self-energy shifts
over a wide energy range.
Note that the TDLDA card accounts for some of the same effects, and is functional in this
release of feff10.
See Combined Bethe-Salpeter equations and time-dependent density-functional theory approach
for x-ray absorption calculations; A.L. Ankudinov, Y. Takimoto, and J.J. Rehr, Phys. Rev. B
71, 165110 (2005)
cell. These potentials are given the default angular cutoffs (lmax) based on atomic number.
Inspecting ‘pot.inp’ or ‘log1.dat’ shows the list of assigned potentials. Note that the current
scheme could be problematic for large unit cells, where there might be many crystallographically
inequivalent atoms of the same atomic number. Calculating a large number of potentials
will make the calculation slow and potentially unstable (the SCF algorithm may have a hard
time reaching convergence). Furthermore, in our experience respecting strict crystallographic
equivalence does not always improve the accuracy of a calculation. For such large systems, it
may be preferable to make all atoms of the same atomic number equivalent, or to determine
equivalence based on first-shell coordination only. The EQUIVALENCE card achieves that
end.
If both a CIF card and a POTENTIALS card are present in ‘feff.inp’, the program
does the following. First, it determines if the list of potentials in the POTENTIALS card
matches exactly that generated from the CIF file. If it does not match, the POTENTIALS
card is ignored and a warning is printed to the screen. If the list of potentials does match, the
program takes the options for the potentials (i.e., lmax1 lmax2 xnatph spinph ) and uses these
values instead of the defaults generated from the CIF file. This way, the user can control the
angular momentum cutoff and set the spin-related variables.
Finally, a word of warning on using the TARGET card to indicate the corehole atom. Com-
bined with the CIF card, this counts an atom in a list of the crystallographically inequivalent
atoms in the unit cell (e.g., 2 C atoms for graphite) in the order given in the CIF file. However,
combined with LATTICE/ATOMS cards, it counts an atom in a list of all atoms in the unit
cells (e.g., 4 C atoms for graphite, 2 of which are equivalent by symmetry to the other 2) in the
order given in the ATOMS card. Hence, the value of the TARGET card must be reevaluated
if you switch from one representation to the other. Note that you must look at the file yourself
to find out in what order the atoms are listed and identify which one you want to place the
core hole on. If it is the third atom listed in the CIF file, use ”TARGET 3” in ‘feff.inp’.
Although CIF is a mature standard, there is a wild proliferation of options and input fields
for cif files. We’ve come across some files that seem to contain endless ”junk” entries, or that
enter data in sufficiently nonstandard ways to confuse feff.
With most cif files there is no problem, although we sometimes delete fields we don’t need
just for the sake of simplicity. When there is a problem, it is almost always due to one of two
things: * The H-M space group is specified in a nonstandard way, often with extra ”:1” or
” 1” symbols: the solution is to delete these extra characters; * The atomic symbols are not
specified: in this case, one simply adds them.
The Cr2GeC example shows a good cif file. The following fields are required by the feff
parser:
_symmetry_space_group_name_H-M or _symmetry_Int_Tables_number
_symmetry_equiv_pos_as_xyz
Most cif files contain much, much more information than this.
It is typical to calculate spectra of crystals using band-structure codes, which calculate crystals
very efficiently in k-space using periodic boundary conditions (PBC). But the introduction of
a core hole is in essence identical to an impurity calculation and breaks the periodicity of the
ground state of the crystal. The typical solution is to construct a supercell large enough to
separate the core hole atom from its twin in the neighboring unit (super)cell so that unphysical
interactions are avoided. This approach is inefficient and can be computationally expensive.
It is complicated by the absence of a universally appropriate size for the supercell, requiring a
convergence study.
The feff code operates similarly to impurity KKR calculations and is able to combine
the best of both worlds. The Green’s function of the ground state crystal is first calculated in
k-space and then transformed back to r-space. The core hole impurity is added to the r-space
2.16. K-SPACE FEFF 32
Green’s function through simple matrix algebra. This is inexpensive and avoids the need for
a supercell altogether. Note that this requires using the ”COREHOLE RPA” setting. This is
the recommended way of calculating a core hole spectrum of a crystal in feff. (The default
”COREHOLE FSR” setting puts the core hole explicitly in the unit cell and would correspond
to the bandstructure code calculation.) No further user effort is required.
This intermediate file written by rdinp contains all the parameters for k-space calculations.
The first parameter is the main switch : if it’s set to 0, the calculation will be done in real
space and all the parameters following it are ignored. If it’s set to 1, the calculation is done
in reciprocal space, and all the parameters following it are read and used. This allows the
advanced user some leeway ; one could eg. calculate potentials in reciprocal space and FMS in
real space by toggling this variable (perhaps for NRIXS).
The k-mesh is constructed using the tetrahedron of Bloechl et al., Phys. Rev. B, 1990. It is
written to file early on. The number of k-points in the k-mesh is an unphysical parameter that
simply needs to be converged. Although it is impossible to give a general guideline, starting
with 1000 k-points is a good idea for small unit cells. Generally, the number of points needed
scales inversely with the volume of the unit cell. Some systems require more points than
others. One always needs to check. The more broadened the property of interest (e.g. ELNES
as opposed to DOS), the fewer points are necessary. Also, the near edge structure requires more
points, whereas more extended structure (e.g., 50-70 eV above threshold) is often converged
with just a few k-points.
Generally speaking, the calculations of the potentials requires less accuracy than the calcula-
tion of FMS. Just like one usually uses a smaller SCF-radius than the FMS-radius for real-space
calculations, it makes sense to use a smaller k-mesh for SCF than for FMS. Therefore, it can
be a good strategy to, e.g., set the k-mesh to 200 points, run the potentials calculation, then
raise the number of k-points to, e.g., 1000, and then run the FMS calculation. This can save
much calculation time, but requires more skill from the user.
Some time-saving schemes are implemented through the KMESH card and are described
there.
For extended loss structure (i.e., upwards from 50-100 eV), the real space Path Expansion
method is so efficient and robust that we do not see the point in trying to reformulate it in
reciprocal space. Therefore, it is always done in real space. If the RECIPROCAL card is
active, the rdinp module generates a real-space cluster based on the crystal structure and the
value of the RPATH value. This cluster is written to the atoms.dat file. The spectrum is then
calculated by the path and genfmt modules, which always work in real space. It is good
2.16. K-SPACE FEFF 33
practice to look at this atoms.dat file when one is still learning to use k-space feff - it’s a
good check to make sure no mistakes have been entered.
The first of these is currently implemented. However! The extent to which symmetry can
be used depends on what one is calculating. E.g., to calculate the diagonal parts of GLL0 , one
can reduce the k-mesh and just sum all the contributions from inequivalent k-vectors. But
for the offdiagonal components (which are needed in order to add the core hole), symmetry is
more subtle and one needs to add all the equivalent ones, which can be somewhat shortcut by
reconstructing them from the inequivalent ones through unitary transformations dictated by
symmetry elements of the crystal. Whereas the first strategy would yield a speedup x 48 for
diamond, the gain for the latter strategy is much more modest ( x 5?) and depends on the
size of the matrices, i.e. the number of atoms in the unit cell.
So, while a number of symmetry strategies are implemented in the code, it is currently
recommended to test these cautiously on a smaller k-mesh before relying on them. Testing
against real-space results is another safety check. We have not tested all possible lattice types
and errors may occur. Contact the authors in case of doubt. Note that many symmetry options
are disabled in the code for safety reasons and would require recompilation.
The second idea - LL0 symmetry within the G matrix - has not been implemented in any
way.
2.16.6 Speed
Generally, fms matrix inversion takes most of the computation time. In real space, for every
energy point feff does one matrix inversion of order nclus ∗ (lmax + 1) ∗ ∗2 ∗ nsp. In reciprocal
space, for every energy point feff does nkp matrix inversions of order nu∗(lmax+1)∗∗2∗nsp.
Here, nu is the number of atoms in the unit cell, nkp the number of k-vectors in the mesh,
nclus the number of atoms in the real space cluster, lmax the angular momentum cutoff, nsp
the number of spins (1 or 2). So, the relative speed is something like (nu/nclus)a ∗ nkp , where
a is the scaling of matrix inversion. In general, unit cells with more atoms (nu) are larger
and therefore require less k-vectors (nkp). For small systems (1-10 atoms in the unit cell),
RECIPROCAL is faster. For larger systems, it depends.
The Ge L3 edge of Cr2GeC using a Cr2GeC.cif file. This is the only kind of feff calculation
that doesn’t require a POTENTIALS card and an ATOMS or OVERLAP card.
2.16. K-SPACE FEFF 34
CONTROL 1 1 1 1 1 1
PRINT 5 1 1 1 1 1
SCF 4.0
FMS 6.0
LDOS -30 15 0.01
data_Cr2GeC
_cell_length_a 2.9400(0)
_cell_length_b 2.9400(0)
_cell_length_c 12.1100(0)
_cell_angle_alpha 90.0000(0)
_cell_angle_beta 90.0000(0)
_cell_angle_gamma 120.0000(0)
_symmetry_space_group_name_H-M ’P 63/m m c’
_symmetry_Int_Tables_number 194
_symmetry_cell_setting hexagonal
loop_
_symmetry_equiv_pos_as_xyz
’+x,+y,+z’
’-y,+x-y,+z’
2.16. K-SPACE FEFF 35
’-x+y,-x,+z’
’-x,-y,1/2+z’
’+y,-x+y,1/2+z’
’+x-y,+x,1/2+z’
’-y,-x,+z’
’-x+y,+y,+z’
’+x,+x-y,+z’
’+y,+x,1/2+z’
’+x-y,-y,1/2+z’
’-x,-x+y,1/2+z’
’-x,-y,-z’
’+y,-x+y,-z’
’+x-y,+x,-z’
’+x,+y,1/2-z’
’-y,+x-y,1/2-z’
’-x+y,-x,1/2-z’
’+y,+x,-z’
’+x-y,-y,-z’
’-x,-x+y,-z’
’-y,-x,1/2-z’
’-x+y,+y,1/2-z’
’+x,+x-y,1/2-z’
loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
C C 0.0000 0.0000 0.0000
Cr Cr 0.6667 0.3333 0.0833
Ge Ge 0.6667 0.3333 0.7500
(Most ‘cif’ files contain many additional fields. We have removed all the information that
is ignored by feff.)
The graphite C K edge using LATTICE and ATOMS cards.
TITLE graphite
* C K edge energy = 284.20 eV
EDGE K 0.0
COREHOLE RPA
CONTROL 1 1 1 1 1 1
2.17. CHARGE TRANSFER AND CHARGE COUNTS 36
MAGIC 40 # create plot that shows magic angle. Evaluate at 40 eV above threshold.
FMS 6.0
SCF 4.5
POTENTIALS
* ipot Z element l_scmt l_fms stoichiometry
0 6 C 3 2 0.01
1 6 C 3 2 2
2 6 C 3 2 2
RECIPROCAL
KMESH 1000
TARGET 1
LATTICE P 2.456
0.86603 -0.50000 0.00000
0.00000 1.00000 0.00000
0.00000 0.00000 2.72638
ATOMS
* x y z ipot tag
0.00000 0.00000 0.68160 1 C1
0.00000 0.00000 2.04479 1 C1
0.57735 0.00000 0.68160 2 C2
0.28868 0.50000 2.04479 2 C2
END
-40 eV, but can sometimes change if the atoms in the problem have binding energies close
to -40eV. The difference between these numbers and the number of valence electrons in these
channels in the atomic system should be equal to the charge transfer into each channel. If these
are summed over angular momentum channels, you should get the total charge transfer. The
only case where this is different is in the absorbing atom, which starts with and extra electron
in the valence. As an example, we can look at NaF which gives
Electronic configuration
iph il N_el
0 0 0.521
0 1 6.535
0 2 0.358
0 3 0.000
1 0 1.958
1 1 5.285
1 2 0.014
1 3 0.000
2 0 0.221
2 1 6.292
2 2 0.236
2 3 0.000
Here iph = 0 is the absorbing Na atom, iph = 1 is the F atom, and iph = 2 is the other Na
atom. These atoms start with the configuration
Electronic configuration
iph il N_el
0 0 2.0 - extra screening electron
0 1 6.0
0 2 0.0
0 3 0.0
1 0 2.0
1 1 5.0
1 2 0.0
1 3 0.0
2 0 1.0
2 1 6.0
2 2 0.0
2 3 0.0
Looking at the difference between these two, you can see that in the solid state, some electrons
are transferred from the sodium s to the sodium p and d states, and some to the F p states.
There is also a small tranfer from the F s states, and into the F d states, but minor. Note that
the final configuration allows more than 6 electrons in the Na p states. This is because the
p-states are not limited to the 2p states, but include the 3p as well.
2.18. AB INITIO DEBYE-WALLER FACTORS 38
If one uses the multiple scattering path expansion (PE), the DW factors are added to each
path individually in module ff2x. If one uses Full Multiple Scattering (FMS), the effect of finite
2 2
temperature is approximated by multiplying each free propagator by e−σ k . This is only exact
for single scattering paths, but since the effect of thermal disorder is reduced in the near-edge
region anyway, it’s probably adequate.
There are three ways to modify the Debye–Waller factor. The DEBYE card calculates
a Debye–Waller factor for each path in PE or FMS. The SIG2 and SIG3 and SIGGK card
add various constant or near-constant Debye–Waller factors to all paths in PE. Finally, you
2.18. AB INITIO DEBYE-WALLER FACTORS 40
can edit ‘list.dat’ to add a Debye–Waller factor to a particular path in PE. In PE, these
three Debye–Waller factors are summed, so if the DEBYE and SIG2/SIG3/SIGGK cards are
present, and if you have added a Debye–Waller factor to a particular path in ‘list.dat’, the
Debye–Waller factor used will be the sum of all three.
After changing the DW factors, feff must be rerun starting with module ff2x for PE and
starting with module fms for FMS.
The DEBYE card offers a choice between 5 different models for the DW factors:
Only method CD and CCD can run without additional input. These Correlated Debye
models are isotropic and can be very inaccurate for anisotropic materials. Methods 1, 2 and
5 require that the force constants or the dynamical matrix be provided. We will now describe
these requirements from a computational point of view. For more information on the physics
behind these calculations, we refer to Anna Poiarkova’s thesis and our paper on the DM method.
2.18. AB INITIO DEBYE-WALLER FACTORS 41
The Equation of Motion (EM) and Recursion Method (RM) require additional input to be
given in the file ‘spring.inp’. The file defines the force fields for feff. First, feff searches
for all similar bonds and angles in the material, creates complete lists of all bond stretches and
angle bends, and then, based on the force field and geometry of the structure, calculates the
cartesian force field matrix and scales it with the atomic masses, thus obtaining the dynamical
matrix. Finally, the DW factors are calculated from the dynamical matrix.
The file ‘feff.inp’ has the same CARD-based structure as the master input file ‘feff.inp’.
For example, the ‘spring.inp’ file for zinc tetraimidazole looks like this.
Output files
2
All σj2 values in the output files are given in units of Å , all frequencies are in units of THz,
and all reduced masses are in atomic units. The output files from a EM calculation include:
2.18. AB INITIO DEBYE-WALLER FACTORS 43
‘prdenNNN.dat’ which contains projected VDOS for selected scattering paths (as indi-
cated by the PRINT card).
‘s2 rm2.dat’ Contains σj2 for each scattering path in ‘paths.dat’ calculated using the
second tier approximation.
‘s2 rm1.dat’ Contains σj2 for each scattering path in ‘paths.dat’ calculated using the
first tier approximation.
Examples
These examples can also be found in the ‘examples’ folder of the feff10 distribution.
First we present a ‘spring.inp’ example for a 177-atom cluster of a Cu crystal. Here only
a single central force constant between the first nearest neighbors is taken into account. Similar
input files can be constructed for other fcc structures, e.g. Pt, Al, etc.
As a second example we show the ‘spring.inp’ file for a 147-atom cluster of c-Ge crystal.
The force constants used here were fitted to phonon dispersion curves. Similar output files can
be constructed for other diamond-type lattices, e.g. Si, C, etc.
* c-Ge crystal
VDOS 0.02 0.7 0. 3.
PRINT 6
STRETCHES
0 1 103.58 2.
0 5 5.81 2.
0 20 -1.08 2.
0 30 -0.30 2.
ANGLES
1 0 2 31.45 2.
The output files for these examples can be found in the ‘examples’ folder of the feff10
distribution. They are also discussed in pp. 100-104 of Anna Poiarkova’s thesis.
2.18. AB INITIO DEBYE-WALLER FACTORS 44
2.18.2 DM method
Preparation
First, the user needs to calculate the dynamical matrix. feff cannot do this, but many other
codes can, e.g. ABINIT or Gaussian. Using such a code, the user needs to produced a file that
contains the dynamical matrix, and which we will refer to as the ‘dymfile’.
Before explaining how to include dynamical matrix DW factors in EXAFS and XANES
feff calculations, it is important that the user becomes familiar with some constraints and
limitations that are present in the current implementation. These limitations stem from the
fact that both the dynamical matrix file and the FEFF input file contain structural information.
These structures must match for the DW values to be correct. Since FEFF internally sorts the
atoms according to distance to the absorber, special care must be taken to avoid mismatching
the structural information coming from the FEFF input with that from the ‘dymfile’.
Therefore, it is not recommended to start from an existing ‘feff.inp’ file, add a ‘dymfile’,
and run the calculation. Instead, we recommend to start from the dymfile, and generate
correctly matched ‘feff.inp’ and ‘feff.dym’ files from the dymfile. Then we can edit the
newly generated ‘feff.inp’ file to add CARDS, before running the feff calculation.
dym2feffinp is a utility that helps in the generation of FEFF input files with structures
that match those in the dynamical matrix files. The usage of dym2feffinp is as follows:
where dymfile is the name of the file containing the dynamical matrix. This command
creates two files, ‘feff.dym’ and ‘feff.inp’, which contain correctly matched structures. (Note
of warning: If dymfile is named ”feff.dym”, then dym2feffinp will APPEND the updated dym
information to it. Please don’t call the dymfile ’feff.dym’. Future version will check that dymfile
doesn’t use the ”feff.dym” name.)
The default behavior of dym2feffinp can be modified with the following options:
The –c options allows the user to choose different absorbers. The usual approach of editing a
FEFF input file and changing the potential type of a certain atom to 0 will result in mismatched
FEFF and dym structures. This should be avoided. It is recommended that different input
files be generated using the –c option.
The –f and –d change the default output filenames from ”feff.inp” and ”feff.dym” to fname
and dname, respectively.
2.18. AB INITIO DEBYE-WALLER FACTORS 45
Feff.inp syntax
To calculate Debye-Waller factors from a dynamical matrix (or matrix of force constants or
Hessian matrix) using the Lanczos recursive algorithm, the following syntax is required in
‘feff.inp’ :
where:
Example 1: Creating a FEFF input file from a dym file using dym2feff.inp
Here we demonstrate how to convert a dym file, in this case created from a Gaussian fchk file,
into matched pairs of ‘feff.inp’ and ‘feff.dym’ files, for different absorbing centers.
The dym file for a CO2 molecule ‘CO2.dym’, converted from the formatted checkpoint file,
looks like:
###############################################################################
1
3
8
6
2.18. AB INITIO DEBYE-WALLER FACTORS 46
8
15.99491460
12.00000000
15.99491460
0.00000000 0.00000000 2.20979482
0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 -2.20979482
1 1
3.501599e-02 -7.311989e-13 -8.941376e-12
-7.311989e-13 3.501599e-02 3.206256e-11
-8.941376e-12 3.206256e-11 1.042343e+00
1 2
-7.001817e-02 -5.485621e-12 2.501278e-11
-3.211930e-12 -7.001817e-02 -2.341738e-11
-3.124223e-11 -3.615378e-11 -9.594793e-01
1 3
3.500217e-02 -8.681691e-13 -1.846564e-11
8.681691e-13 3.500217e-02 -1.245331e-11
-1.846599e-11 1.245327e-11 -8.286417e-02
2 1
-7.001817e-02 -3.211930e-12 -3.124223e-11
-5.485621e-12 -7.001817e-02 -3.615378e-11
2.501278e-11 -2.341738e-11 -9.594793e-01
2 2
1.400363e-01 1.883207e-12 2.058909e-11
1.883207e-12 1.400363e-01 4.005329e-11
2.058909e-11 4.005329e-11 1.918959e+00
2 3
-7.001817e-02 2.586772e-12 5.500370e-12
4.227571e-12 -7.001817e-02 3.602353e-12
3.495310e-11 1.591451e-11 -9.594793e-01
3 1
3.500217e-02 8.681691e-13 -1.846599e-11
-8.681691e-13 3.500217e-02 1.245327e-11
-1.846564e-11 -1.245331e-11 -8.286417e-02
3 2
-7.001817e-02 4.227571e-12 3.495310e-11
2.586772e-12 -7.001817e-02 1.591451e-11
5.500370e-12 3.602353e-12 -9.594793e-01
3 3
3.501599e-02 7.311989e-13 -8.940090e-12
7.311989e-13 3.501599e-02 -3.206153e-11
-8.940090e-12 -3.206153e-11 1.042343e+00
###############################################################################
2.18. AB INITIO DEBYE-WALLER FACTORS 47
The dym files are not required to be sorted in any particular order, they retain the atom order
of the program that generated the dynamical matrix. In this case, the order is O, C and O, with
the C atom at the origen. Since FEFF internally sorts the atoms according to their distance to
the absorber, if this dym file is used as is to compute the EXAFS/XANES for the C atom, the
results would be incorrect. We can generate the appropriate FEFF input file and associated
dym file with the following command:
This creates new files ‘CO2-C-feff.inp’ and ‘CO2-C-feff.dym’. The CO2-C-feff.dym file:
###############################################################################
1
3
6
8
8
12.000000
15.994915
15.994915
0.00000000 0.00000000 0.00000000
0.00000000 0.00000000 2.20979482
0.00000000 0.00000000 -2.20979482
1 1
1.400363E-01 1.883207E-12 2.058909E-11
1.883207E-12 1.400363E-01 4.005329E-11
2.058909E-11 4.005329E-11 1.918959E+00
1 2
-7.001817E-02 -3.211930E-12 -3.124223E-11
-5.485621E-12 -7.001817E-02 -3.615378E-11
2.501278E-11 -2.341738E-11 -9.594793E-01
1 3
-7.001817E-02 2.586772E-12 5.500370E-12
4.227571E-12 -7.001817E-02 3.602353E-12
3.495310E-11 1.591451E-11 -9.594793E-01
2 1
-7.001817E-02 -5.485621E-12 2.501278E-11
-3.211930E-12 -7.001817E-02 -2.341738E-11
-3.124223E-11 -3.615378E-11 -9.594793E-01
2 2
3.501599E-02 -7.311989E-13 -8.941376E-12
-7.311989E-13 3.501599E-02 3.206256E-11
-8.941376E-12 3.206256E-11 1.042343E+00
2 3
2.18. AB INITIO DEBYE-WALLER FACTORS 48
This ‘feff.dym’ file is now centered on the C atom and the atoms are sorted correctly. The
associated CO2-C-feff.inp FEFF input file has the following structure section:
###############################################################################
POTENTIALS
0 6 C
1 8 O
ATOMS
0.00000 0.00000 0.00000 0 C 0.00000 0
0.00000 0.00000 1.16937 1 O 1.16937 1
0.00000 0.00000 -1.16937 1 O 1.16937 2
END
###############################################################################
which is correctly centered and has the same structure as the dym file.
A typical FEFF input file that uses ab initio DW factors in a XANES calculation looks as
follows:
FMS 6.000
POTENTIALS
0 8 O
1 1 H
ATOMS
0.00000 0.00000 0.00000 0 O 0.00000 0
0.96141 -0.12674 0.00000 1 H 0.96972 1
-0.12674 0.96141 0.00000 1 H 0.96972 2
END
This input calculates the XANES O K edge spectrum of a single water molecule. If an
EXAFS calculation is required, the same DEBYE card parameters apply, but the XANES
card should be substituted by the EXAFS card. It uses ab initio DW factors at 500K and a
dynamical matrix stored in the file ‘feff.dym’. The number of Lanczos recursion iterations
is set to 6, the type of DW calculation is to calculate parallel σ 2 , and it asks that all single
scattering paths from the absorber be calculated independently in the dmdw module. When
feff reads this ‘feff.inp’ file, it will create an intermediate input file ‘dmdw.inp’:
6
1 500.000 500.000
0
feff.dym
1
2 1 0 3.20
The first line gives the number of Lanczos iterations. The second defines the temperature, in
this case a grid with a single point. The third defines the type of DW calculation and the
fourth the name of the dynamical matrix file. The fifth line declares that the input contains
a single path descriptor, which is included in the next line. This descriptor defines all single
scattering paths from the absorber that are less than 3.2 Bohr long.
The dynamical matrix file ‘feff.dym’ for this calculation looks like this:
1
3
8
1
1
15.994915
1.007825
1.007825
2.19. PARALLEL CALCULATIONS 50
The user must obtain this file using another program, for example, Gaussian or ABINIT.
Given these files ‘feff.inp’ and ‘feff.dym’, feff calculates a XANES spectrum including the
Debye-Waller factors derived from the given dynamical matrix.
Additional technical information about the calculation of ab initio Debye-Waller factors is
provided in Appendix F.
An MPI environment. There are different MPI implementations, and configuring MPI
on your system can be non-trivial. If you will run parallel calculations across several
computers (e.g., the nodes of a cluster) then these computers must also share disk access
and have passwordless access to each other. Your system administrator can help set up
MPI or can tell you the specifications for your computer. Unfortunately, it’s very hard
for us to provide support as we don’t know your setup.
feff binaries for your configuration. Although some versions of feff come with precom-
piled parallel binaries, it is unlikely that they will work on your system. You’ll probably
have to compile feff-mpi yourself. That requires a suitable FORTRAN90 compiler.
2.19. PARALLEL CALCULATIONS 51
feff-MPI scales well even on slow networks because the parallel threads communicate very
little. We simply distribute a grid of energy points over the MPI processor grid and calculate
the Green’s function for each energy point. The limitation of this approach is that we cannot
use more cores than there are energy points in the grid. Typically, feff maxes out at N = 64
or N = 128. Speedup will be slightly lower than linear because of sequential tasks and the
efficiency of distributing the energy points.
Several parallel threads may write identical output to the screen or log file. This may cause
the standard output to be less readable.
Although the precise syntax varies with software and hardware environment, a command like
will execute fms in parallel using 40 threads. Your feff installation includes a simple ‘feffmpi’
script that contains the above instruction for all consecutive feff modules. Or you can copy
it here:
#!/bin/bash
# Adjust this line: it must point to a directory containing the MPI FEFF modules
FeffPath=/home/jorissen/feff10/bin/MPI
# Adjust this line to meet your system configuration: "
MPICommand="mpirun -n 12 --host n20,n20,n20,n20,n17,n17,n17,n17,n18,n18,n18,n18 "
# In this example, we are using 12 parallel threads on 3 cluster nodes
# (n17, n18, and n20) with 4 (or more) cores each.
# Other common mpirun options are: --hostfile ; --nolocal ; etc.
# The calculation will be (a little less than) 12 times faster than a non-parallel
# calculation on the same computer.
$MPICommand $FeffPath/sfconv
$MPICommand $FeffPath/compton
$MPICommand $FeffPath/eels
$MPICommand $FeffPath/ldos
On some computers you can omit the hosts and hostfile options (e.g. when running on a
multicore desktop). On other computers that are shared among many users you may have to
interact with a queuing system. This may involve writing a small script that determines node
availability on the fly and sets the hosts list. A simpler example is shown here:
#!/bin/csh
# Typically, you save this file as "feff.pbs.sh" in the pwd containing feff.inp .
# Then submit as "qsub feff.pbs.sh".
# You can monitor the job using "qstat".
# But find out the specifics of your configuration before submitting.
# E.g. oftentimes you have to specify maximum runtime.
#PBS -l nodes=4:ppn=16
#PBS -N feff9-Cu
#PBS -o feff.out
#PBS -e feff.err
#PBS -q batch
#PBS -V
More information can be found in Sec. B. If you are unable to figure out the particularities
of your local setup, we ask that you consult your system administrator or system documentation
for help first.
AI2NBSE
YAMBO
WIEN2K
QUANTUM ESPRESSO
...
2.20.1 Examples
An input file that uses OPCONS to calculate the loss function and MPSE/SFCONV to calculate
the resulting many-pole self-energy and many-body spectral function for a Cu K-edge XANES
calculation follows:
TITLE Cu crystal
2.20. USING THE MANY-POLE SELF-ENERGY 54
* Shift the fermi-level back 1.5 eV and add 0.3 eV of experimental broadening.
CORRECTIONS 1.5 0.3
POTENTIALS
0 29 Cu 3 3 0.01
1 29 Cu 3 3 1.0
ATOMS
0.0000 0.0000 0.0000 0 Cu_00 0.0000
2.21. COMPTON SCATTERING 55
This input file specifies that we want to calculate the Cu K-edge XANES of bulk Cu using
the many-pole model dielectric function to calculate self-energy effects (MPSE) as well as multi-
electron excitation effects (SFCONV). The file ‘loss.dat’ is required input for the many-pole
dielectric function and in this case is obtained by specifying the OPCONS card. Note that the
OPCONS card gives only a rough estimate of the loss function.
For a more accurate calculation, comment out the ”OPCONS” card and provide your own
‘loss.dat’ file, e.g. from an experimental measurement or an ab initio calculation. An example
of a ‘loss.dat’ file can be found in ~/feff10/examplesMPSE/Cu/. You can compare this to
the ‘loss.dat’ file that will be generated from the OPCONS card in the example above or at
~/feff10/examples/MPSE/Cu_OPCONS/. You can also compare the resulting spectra. (Note
that the 2 examples provided have many other differences. You should compare 2 calculations
differing only in the use of the OPCONS card to study its effects.)
RHOZZP
* The grid for calculating rho(r,r’)
CGRID 10 32 32 32 120
POTENTIALS
0 29 Cu 3 3 0.01
1 29 Cu 3 3 1.0
ATOMS
0.00000 0.00000 0.00000 0 Cu_00 0.0000
0.00000 -1.80500 1.80500 1 Cu_01 2.5527
1.80500 0.00000 -1.80500 1 Cu_01 2.5527
-1.80500 0.00000 -1.80500 1 Cu_01 2.5527
1.80500 -1.80500 0.00000 1 Cu_01 2.5527
* [Truncated]
END
Chapter 3
options that determine how feff calculates the required spectrum for the given structure
Additionally, we can classify CARDS as standard options frequently and easily used, useful
options that are often used, and advanced options that are seldom necessary, but may be
helpful in some cases.
Structural information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Purpose: Specify the structure
Standard Cards: ATOMS, POTENTIALS, RECIPROCAL, REAL, CIF, LATTICE,
TARGET, and TITLE
Useful Cards: COORDINATES, RMULTIPLIER and SGROUP
Advanced Cards: CFAVERAGE, OVERLAP and EQUIVALENCE
Spectrum information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Purpose: Specify the spectrum or material property to be calculated
Standard Cards: EXAFS, ELNES, EXELFS, LDOS, and XANES
Useful Cards: ELLIPTICITY, MULTIPOLE, and POLARIZATION
Advanced Cards: COMPTON, DANES, FPRIME, MDFF, NRIXS, XES, and XNCD
(or XMCD)
These CARDS are listed below in the same order as in the table above. Each CARD
description is of this form:
3.3. STRUCTURAL INFORMATION CARDS 60
ATOMS Standard
ATOMS specifies the Cartesian coordinates (in Ångstroms) and unique potential indices of
each atom in the cluster, one atom per line. If the LATTICE card is used to define the unit
cell for reciprocal space calculations, the ATOMS card lists the atoms in the unit cell. See the
discussion of the POTENTIALS card and the COORDINATES card for more info on how to
specify atom types and coordinates.
An auxiliary code, atoms, can generate a real-space ATOMS list for crystals from crystal-
lographic data.
* the file GaN.cif defines the unit cell of hexagonal (wurtzite) GaN :
CIF GaN.cif
The next optional entry, xnatph, can be used to specify the stoichiometric number of each
unique potential in the unit cell of a crystalline material. This helps in the calculation of the
Fermi level. In the case of an infinite solid, xnatph = 0.01 (default value) is a suitable value
for the absorbing atom. For materials finite in extent, see the example below.
The last optional entry spinph is used to specify the spin amplitude and relative spin align-
ment for spin-dependent calculations. See the SPIN card in this section for more information
on spin-dependent calculations.
The absorbing atom must be given unique potential index 0. Unique potential indices are
simply labels, so the order is not important, except that the absorbing atom is index 0, and
you may not have missing indices (i.e., if you use index 3, you must also have defined unique
potentials 1 and 2). Exception: If the material is defined by its unit cell the absorbing atom
is not defined through the POTENTIALS card but in the TARGET instead - in this case,
there should not be a unique potential index 0 in the POTENTIALS card. There is another
exception to the rule when the CFAVERAGE card is used.
To save time, the code calculates the overlapped atom potential for each unique potential
only once, using the first atom with a given unique potential index. For example, in Cu it is a
good approximation to determine potentials only for the central atom and the first shell and
to use the first shell potential (ipot = 1) for all higher shells. Such approximations should
always be checked. If the neighborhood of the sample atom is not representative, the code will
generate inaccurate potentials and phase shifts, as well as poor XAS results. Atoms of the
same Z may have different potentials if their local environment is substantially different. feff
leaves such judgments to the user. One can always make two atoms inequivalent, and compare
their potentials, electronic configutations, and lDOS in the feffoutput.
An example of spin-dependent usage can be found in the SPIN card description in the next
section.
REAL Standard
This card tells feff to work in real space. This is the default mode, so it is never strictly
necessary to use this card. This card may be used for clarity in input files that mix real-space
and k-space calculations. See also the RECIPROCAL card.
* do a real-space calculation
REAL
RECIPROCAL Standard
3.3. STRUCTURAL INFORMATION CARDS 63
This card tells feff to work in reciprocal space. It affects modules pot, xsph, fms and ldos.
This card requires the use of CIF or ATOMS and LATTICE; TARGET; and KMESH.
TARGET ic Standard
Specifies the location of the absorber atom for reciprocal space calculations. It is entry ic of the
ATOMS card if an ATOMS card and LATTICE card are used. In conjunction with the CIF
card it is entry ic the list of atoms as given in the ‘.cif’ file (i.e., a list of the crystallographically
inequivalent atom positions in the unit cell). The target needs to be specified also for NOHOLE
calculations. Note that this cannot be specified in the POTENTIALS list because periodic
boundary conditions would then produce an infinite number of core holes.
* calculate a spectrum for the second atom in the ATOMS list or CIF file.
TARGET 2
COORDINATES i Useful
i must be an integer from 1 through 6. It specifies the units of the atoms of the unit cell given
in the ATOMS card for reciprocal space calculations. If the card is omitted, the default value
icoord = 3 is assumed. FIX check this
1. Cartesian coordinates, Angstrom units. Like feff - you can copy from a real-space
feff.inp file if your lattice vectors coincide with atoms in that feff.inp file.
2. Cartesian coordinates, fractional units (i.e., fractions of the lattice vectors ; should be
numbers between 0 and 1). Similar to feff.
3. Cartesian coordinates, units are fractional with respect to FIRST lattice vector. Like
SPRKKR. (default)
4. Given in lattice coordinates, in fractional units. Like WIEN2k (but beware of some
‘funny’ lattice types, e.g. rhombohedral, in WIEN2k case.struct if you’re copy-pasting )
5. Given in lattice coordinates, units are fractional with respect to FIRST lattice vector.
*increase distances by 1%
RMULTIPLIER 1.01
iphabs
potential index for the type of absorbing atoms over which to make the configuration
average (any potential index is allowed).
3.3. STRUCTURAL INFORMATION CARDS 65
nabs
the configuration average is made over the first nabs absorbers in the ‘feff.inp’ file
of type iphabs. You do not need to have potential of index 0 in your input file when
using the CFAVERAGE card, but you must have the same type of potential for iph=0
and iph=iphabs. The configurational average is done over ALL atoms of type iphabs, if
nabs is less than or equal to zero.
rclabs
radius to make a small atom list from a bigger one allowed in ‘feff.inp’. Currently the
parameter controlling the maximum size of the list, natxx, is set to 100,000, but this
can be increased. The pathfinder will choke on too big an atoms list. You must choose
rclabs to have fewer than 1,000 atoms in the small atom list. If your cluster has fewer
than 1,000 atoms simply use rclabs=0 or negative always to include all atoms.
Default values are iphabs=0, nabs=1, rclabs=0 (where rclabs = 0 means to consider an
infinite cluster size).
FIX check that there’s a more substantial example of this somewhere and put a link to it
SCF algorithm tends to have a harder time reaching convergence as the number of potentials
increases, leading to substantially longer calculation times or even convergence failure if the
number of potentials becomes very large.
If ieq = 5, unique potentials are assigned based on a label in the ‘cif’ file. That is, the
user can edit the ‘cif’ file in a text editor and mark different sites with labels such as ”Ti1”
and ”Ti2”. feff will assign the same unique potential to all sites with the same label. This
gives the user complete control over potential assignment. (To be implemented.)
If you require one of the solutions marked as ”To be implemented”, please contact us for
assistance.
* Example : Do a traditional FEFF calculation where all atoms with the same Z
* have the same potential
CIF graphite.cif
EQUIVALENCE 2
* This would be equivalent to a file using LATTICE and ATOMS card, and
* POTENTIALS
** ipot z label lmax1 lmax2
* 0 6 C -1 -1 * for the core hole atom
* 1 6 C -1 -1 * for all other C atoms
xkmax
The maximum k-value for the calculation. xkmax, xkstep and vixan are exactly the
same parameters as those used for the XANES card.
xkstep
The step size of the upper part of the k-mesh
vixan
The step size of the lower part of the k-mesh
E
energy of the electron beam in keV (typical values are 100-400 keV);
aver
1: calculate orientation averaged spectrum (e.g., a polycrystalline sample, working at the
magic angle) ; 0 : use specific sample to beam orientation (default);
cross
1: use cross terms for the cross section (e.g., xy or yx ; default); 0: use only direct terms
(eg., atom coordinates entered in symmetric coordinate frame ; assumed as default if aver
is set to 1);
relat
1 (default): to use relativistic formula for the cross-section (default, always recommended)
; 0 to use nonrelativistic formula;
kx,ky,kz
wave vector of the incoming electron in the crystal frame (i.e., the Cartesian coordinate
3.4. SPECTRUM INFORMATION CARDS 69
system in which the atom positions of the ATOMS card are given). In arbitrary units
(only the direction, not the size of k is used). This line must be present for orientation-
sensitive calculations, and absent for averaged calculations.
β
the collection semiangle of the EELS detector in mrad (typical values are of the order of
1 mrad);
α
The convergence semiangle of the incoming beam in mrad (typical values are of the order
of 1 mrad);
nr, na
The cross section is integrated over the values of impulse transfer q allowed by α and
β. The integration grid consists of nr concentric circles sampling a disc of radius α+β.
Circle i contains na ∗ (2i − 1) points, making for nr ∗ nr ∗ na points total. These are
nonphysical parameters and should be converged. Typical would be 50, 1; the integration
is quite fast. Only for small values of nr is it necessary to increase na above 1.
dx, dy
The position of the detector in the scattering plane, specified by angles in mrad along
the x and y axes (the same as used in the ATOMS card) (typical values are 0.0, 0.0)
The line giving beam orientation must be present if and only if an oriented spectrum is
calculated.
The following example simulates an experiment with a 300 keV beam hitting the sample
along the y-axis. The detector is set in the forward direction and has a 2.4 mrad (semi-)opening;
the width of the incoming beam is 0 mrad. To do the integration over the detector aperture,
5∗5∗3 = 75 points are used. The calculation is relativistic and takes sample to beam orientation
into account. Default settings are used for the energy/k-mesh.
See the ELNES card for a description of these parameters. Note that xkmax, the maximum
k value, is the only parameter immediately following the EXELFS card.
xkmax
The maximum k value of the XANES calculation. If FMS calculations are being made,
note that these are not accurate beyond about k = 6; for larger values of k, e.g. k = 20
with the path expansion, FMS must be turned off.
xkstep
This argument specifies the size of the output k grid far from the edge.
vixan
This argument specifies the energy step of the grid at the edge.
3.4. SPECTRUM INFORMATION CARDS 71
The default values are xkmax = 8, xkstep = 0.07, and vixan = 0.0.
POLARIZATION x y z Useful
This card specifies the direction of the electric field of the incident beam, or the main axis
of the ellipse, in the case of elliptical polarization. x, y, z are the coordinates of the nonzero
polarization vector. The ELLIPTICITY card is not needed for linear polarization. If the
POLARIZATION card is omitted, spherically averaged XAFS will be calculated.
Note that polarization reduces the degeneracy of the paths, increasing the calculation time.
Choosing polarization in the directions of symmetry axes will result in a faster calculation.
Cannot be used with ELNES, EXELFS, or NRIXS.
COMPTON
f0 (Q) is also tabulated in ‘fpf0.dat’; f 00 is printed out by FPRIME and can be used to
obtain the total f 0 . The total energy correction to f 0 is given in the first line of ‘fpf0.dat’
in Cromer-Liberman form, and in the more accurate Kissel-Pratt form. See the references for
more details.
imdff = 3 : EELS type MDFF calculation selected - summed over all q,q’ pairs
imdff = 2 : NRIXS type MDFF calculation selected - for a single q,q’ pair only
imdff = 1 : NRIXS type MDFF calculation selected - summed over all q,q’ pairs
imdff ¡ 1 : MDFF calculation disabled
If imdff=1 or =2 and qqmdff and cosmdff are not specified, calculate MDFF(q,q’) using q and
q’ vectors from the NRIXS list of q-vectors (needs to contain at least two vectors). If imdff=1
or =2 and qqmdff and cosmdff are specified, calculate MDFF(q,q’) using q vectors from the
3.4. SPECTRUM INFORMATION CARDS 73
NRIXS list of q-vectors and generating vector q’ as having length qqmdff and making an angle
cosmdff with the vector q. If imdff=3, calculate MDFF(q,q’) using the parameters of the
ELNES or EXELFS card. (Output on a grid; or sum if appropriate Bloch wave coefficients are
provided. Not implemented.) Note that imdff=3 calculates a dipole-selected MDFF, but does
it really rapidly and using relativistic corrections appropriate for EELS. ‘feff.inp’ must also
contain the ELNES or EXELFS card. Using imdff=1 or imdff=2 calculates the MDFF without
a selection rule (or determined using the LJMAX or LDECMX cards), but is slower and does
not have relativistic corrections. Note that the NRIXS routines provide for weights, meaning
that Bloch wave type (complex) coefficients can be added to simulate dynamical diffraction, if
an external code is used to provide these coefficients. ‘feff.inp’ must also contain the NRIXS
card. This card is probably too complex and may be butchered in the future. If you want to
use any of this functionality, you’d better be in touch for collaboration, or really like Fortran
:-P.
NRIXS nq qx qy qz Advanced
Calculate the NRIXS spectrum for given momentum transfer ~q. Currently, nq must be set
either to any negative value to calculate a spherical average over q-vectors of fixed length qx
(qy and qz ignored) ; or set to 1 to calculate for the q-vector qx qy qz. nq > 1 is implemented
experimentally; contact the authors for assistance if needed. Further options are available
through the LDEC and LJMAX cards.
The cards in this section generally affect the entire feff calculation. The CONTROL card is
used to selectively run parts of feff. The PRINT card controls which output files are written.
* example 1
* calculate self consistent potentials, phase shifts and fms only
CONTROL 1 1 1 0 0 0 ipot ixsph ifms ipaths igenfmt iff2x
* example 2
* run paths, genfmt and ff2x; do not run pot, xsph, fms
* this run assumes previous modules have already been run and
* adds MS paths between rfms and rpath to the MS expansion
CONTROL 0 0 0 1 1 1 ipot ixsph ifms ipaths igenfmt iff2x
END Standard
The END card marks the end of the portion of the ‘feff.inp’ file that feff will read. All
3.5. FEFF PROGRAM CONTROL CARDS 75
data following the END card is ignored. Without an END card, the entire input file is read.
* use a k-mesh of 1000 points in the full BZ for a k-space calculation of a crystal
KMESH 1000
* use a k-mesh of 10x5x3 points for a large, irregular cell
KMESH 10 5 3
* use a k-mesh of 1000 points and try to save time:
KMESH 1000 0 0 3
The print levels for each module are summarized in Table 4.1 on page 105.
EGRID Advanced
This card can be used to customize the energy grid. The EGRID card is followed by lines
specifying the type of grid, minimum and maximum values for the grid, and the grid step, i.e.
The grid type parameter is a string that can take the values e grid, k grid, or exp grid. When
using the e grid or k grid grid types, grid min, grid max, and grid step are given in eV or Å−1
respectively. For the exp grid type, grid min and grid max are the minimum and maximum
grid values in eV , and grid step is the exponential, i.e. Ei = EM in + exp(grid step ∗ i) − 1.0.
A fourth grid type user grid is also available for feff. user grid is followed by an arbitrary
number of lines, each specifying an energy point in eV , i.e.,
user_grid
0.1
1.5
3.45
6.0
.
.
.
Note that the energies are all defined relative to the Fermi energy, i.e. the edge.
Up to ten grids can be specified for feff. The grids can also overlap. If one is using
multiple grid types, a useful parameter last can be used in place of grid min, i.e.
The last parameter will use the last point of the previous grid as grid min.
overlapping fraction should be between 1.0 and 1.3. See FOLP for a non-automated version.
Automatic overlapping is done by default; to switch overlapping off, use 1.0 as the argument
for AFOLP.
rfms1
This specifies the radius of the cluster for full multiple scattering during the self-consistency
loop. Typically one needs about 30 atoms within the sphere specified by rfms1. Usually
3.5. FEFF PROGRAM CONTROL CARDS 78
this value is smaller than the value rfms used in the FMS card, but it should be larger
than the radius of the second coordination shell. Will be ignored completely in k-space
calculations. Must be converged in real-space calculations.
lfms1
The default value 0 is appropriate for solids; in this case the sphere defined by rfms1
is located on the atom for which the density of states is calculated. The value 1 is
appropriate for molecular calculations and will probably save computation time, but
may lead to inaccurate potentials for solids. When lfms1 = 1 the center of the sphere is
located on the absorbing atom.
nscmt
This is the maximum number of iterations the potential will be recalculated. A value of
0 leads to non-self-consistent potentials and Fermi energy estimates. A value of 1 also
yields non-self-consistent potentials but the Fermi energy is estimated more reliably from
calculations of the `DOS. Otherwise, the value of nscmt sets an upper bound on the
number of iterations in the self-consistency loop. Usually self-consistency is reached in
about 10 iterations.
ca
The convergence accelerator factor. This is needed only for the first iteration, since feff
uses the Broyden algorithm to reach self-consistency. A typical value is 0.2; however,
you may want to try smaller values if there are problems with convergence. After a new
density is calculated from the new Fermi level, the density after the first iteration is
nmix
This specifies how many iterations to do with the mixing algorithm before starting the
Broyden algorithm. The SCF calculations in materials containing f-elements may not
converge. We encountered such a problem for Pu. However, the SCF procedure converged
if we started the Broyden algorithm after 10 iterations with the mixing algorithm with
ca = 0.05. nmix must be between 1 and 30; a value outside of this range will be ignored,
and replaced with an acceptable value.
then the value of S02 is estimated from atomic overlap integrals. Experimental values of S02 are
typically between 0.8 and 1.0.
Alternatively, you can specify the value of S02 in the HOLE or EDGE card; however, the
meaning of the parameters in the ‘feff.inp’ file is more clear if you use the S02 card.
f ef f 7 signifying the same occupation numbers as were used in this old FEFF version;
f ile indicating there’s a file called ‘config.inp’ containing the relevant information;
card stating that the information is passed inside the card itself in the optional parameter
conf iguration.
Note that several instances of CONFIG card can appear in ‘feff.inp’ and all will be taken into
account. There is a syntax to be used for specifying configurations; it follows the usual noble gas
notations closely. The resulting configuration is written to file ‘config.dat’ for user inspection.
The general format is iph name [NobleGas] istate iocc- [iocc+] istate ... where
iph is a potential index of ‘feff.inp’ and name a 2-letter element name (C, Au, ...). If iph is
negative, the card applies to all atoms of type name. It can even be used when there are no
such atoms specified in ‘feff.inp’. (Due to the presence of a core hole or when the ION card
is used, feff may use this information.) The configuration can optionally be specified from
a noble gas; acceptable values are He, Ne, Ar, Kr, Xe, Hg, or Rn. All remaining fields must
specify states. istate = 1s, 2p, 4f, ... For s-states, only one occupation number iocc follows; for
higher states, a l-1/2 and a l+1/2 occupation number is required. Occupation numbers can be
fractional (e.g. 1.5). A positive number indicates a ’valence state’; a negative number indicates
a ’core state’. This distinction is only used when calculating the exchange-correlation potential
and has no implications for the rest of the calculation.
* For all (iph=-1) C atoms (Z=6) use 1s^2 2s^2 2p^2 (note there’s 2p_1/2 and 2p_3/2)
* and consider the 2s and 2p valence electrons and 1s core electrons :
CONFIG card 1 * <-- "1" counts the following lines
-1 C 1s -2 2s 2 2p 1 1
A second example:
* Start from FEFF7 type configurations, but for the I atoms of potential type iph=2,
* start from Kr configuration and add 4d^10 5s^1 5p^6 (all valence)
3.5. FEFF PROGRAM CONTROL CARDS 80
CONFIG feff7
CONFIG card 1
2 I Kr 4d 4 6 5s 1 5p 2 4
IMPORTANT: This card is new and experimental in feff10. Please double-check ‘config.dat’
to make sure your input has been parsed correctly, and contact the authors in case of doubt (or
bugs). Also be aware that non-standard configurations may lead feff to fail, or may produce
nonsense.
Table 3.1: Available hole codes. The entries in the column edge are recognized by the EDGE
card.
NOHOLE Useful
Deprecated. Supported for compatibility only. This card roughly simulates the effect of com-
plete core-hole screening. It is useful to test the final state rule for calculated XAS, and to
compare with other calculations (such as band structure or other codes) that do not have a
core hole. The code will use the final states specified by the HOLE or EDGE card for the
matrix element calculation — but will calculate potentials and phase shifts as if there is no
core-hole. For dDOS and LII or LIII absorption calculations, for example, NOHOLE often
3.5. FEFF PROGRAM CONTROL CARDS 82
gives better agreement for white line intensities. Conversely NOHOLE tends to give poor
XANES intensities for K-shell absorption in insulators.
It is now recommended to use the COREHOLE card instead. However, old ‘feff.inp’ files
with NOHOLE still work.
r(i) = exp(−8.8 + (i − 1) · δ)
where δ ≡ delta. δ = 0.05 by default, which is sufficient for most cases. However, occasionally
there are convergence problems in the atomic background at very high energies (the background
curves upward) and in the phase shifts for very large atoms. If such convergence problems are
encountered we suggest reducing δ to 0.03 or even 0.01. This will solve these problems at the
cost of longer computation times (the time is proportional to 1/δ). This option is also useful
for testing and improving convergence of atomic background calculations.
UNFREEZEF Useful
In somes applications of f -electron systems, we found that it is preferable to freeze the f -
electron density at the atomic value in order to achieve well converged SCF potentials. However,
this may sometimes lead to less accurate results, and it doesn’t improve convergence in all cases.
Freezing f -electrons is the default in feff8.4. If one wants to attempt to calculate the f -DOS
self-consistently, as in feff8.0 and 8.1, the UNFREEZEF card should be used.
CHSHIFT Advanced
Calculate initial core-state energy level using the final self-consistent potential. This card will
give more accurate relative shifts of the edge, however, the absolute edge energy is not accurate
with this method.
the core P1/2 and P3/2 core-hole potentials are essentially equivalent. In order to do this the
following steps should be performed:
1. Put the CHBROADENING card in the feff.inp file with igammach set to 1, i.e.
CHBROADENING 1
2. Run feff through completely for the L2 edge, i.e., set the EDGE L2 card in the feff.inp
file.
3. Copy the ouput files of interest (xmu.dat, eels.dat, chi.dat, ...) to another name or another
directory.
4. Change the edge to L3, i.e., put EDGE L3 in the feff.inp file
rdinp
atomic
mkgtr
path
genfmt
ff2x
eels
You should now have output files (xmu.dat, eels.dat, chi.dat, ...) for the L3 edge. Note: A
similar procedure can be used for quickly obtaining correct results of different polarizations of
a single edge.
EGAP Advanced
This card will only change results if run with the MPSE card. For a material with a band gap,
the Fermi energy is usually set approximately at the top of the gap. The self-energy should
however be referenced to the middle of the gap. If the band gap is known, the EGAP card can
be used to tell FEFF it’s value.
EXTPOT Advanced
Use external potentials calculated by another code. Documentation currently unavailable.
Experimental feature.
inters
inters defines how to find the interstitial potential. inters=0 (default): the interstitial
potential is found by averaging over the entire extended cluster in ‘feff.inp’. inters=1
: the interstitial potential is found locally around the absorbing atom.
vtot
the volume per atom normalized by ratmin3 (vtot=(volume per atom)/ratmin3 ), where
ratmin is the shortest bond for the absorbing atom. This quantity defines the total
volume (needed to calculate the interstitial density) of the extended cluster specified in
‘feff.inp’. If vtot ≤ 0 then the total volume is calculated as a sum of Norman sphere
volumes. Otherwise, total volume = nat ∗ (vtot ∗ ratmin3 ), where nat is the number of
atoms in an extended cluster. Thus vtot=1.0 is appropriate for cubic structures, such as
NaCl. The INTERSTITIAL card may be useful for open systems (e.g. those which have
ZnS structure).
JUMPRM Advanced
Remove potential jumps at muffin tin radii. Documentation currently unavailable. FIX
3.5. FEFF PROGRAM CONTROL CARDS 86
OPCONS Standard
This card provides a fast and easy way to compute a rough estimate of the loss function using
a weighted average of atomic loss functions. The output is contained in the file ‘loss.dat’
and will be used in calculations of the self-energy if the MPSE card is also specified. The
NUMDENS is useful if the OPCONS card is specified.
PREPS Advanced
If PREPS is specified along with the OPCONS card, the atomic dielectric function used for
calculating the loss function will be printed in epsilon.dat.
RESTART Advanced
If RESTART is specified, feff will start the SCF calculation of the potentials from an existing
‘pot.bin’ file, rather than starting from overlapped atomic potentials. This way one can
continue an earlier SCF calculation (e.g. after it ran out of iterations), or one can use an
existing set of potentials as a good starting point for a similar structure (e.g., after making
small changes to the atom coordinates). Note that this strategy is not guaranteed to lead to
good results, or to even converge. This is a new feature and has not been tested in all possible
situations. If you need assistance, please contact us.
* Set the cluster radius for the RPA potential calculation higher than the default of 4.0
COREHOLE RPA
SCREEN rfms 5.0
3.5. FEFF PROGRAM CONTROL CARDS 87
SETEDGE Advanced
This will set the edge energies to those found in the Elam/Mcmasters tables for the element
and edge in question. By default the estimated edge energy is based on Hartree-Fock atomic
calculations. This card is meant to be used with an external program for obtaining the full
optical constants including response from all occupied electrons.
ispin meaning
2 spin-up SPXAS and `DOS
−2 spin-down SPXAS and `DOS
1 spin-up portion of XMCD calculations
−1 spin-down portion of XMCD calculations
Table 3.2: Allowed values of the ispin argument of the SPIN card.
* GdFeO, spin-dependent
* Note that SPIN card must also be present in feff.inp, as well as
* additional cards specific to desired calculations
POTENTIALS
* ipot z tag lmax1 lmax2 xnatph spinph
0 64 Gd 3 3 0.1 7.0 (c sublattice) up
1 26 Fe 2 3 2 4.0 (a sublattice) up
2 26 Fe 2 3 3 -4.0 (d sublattice) down
3 8 O 2 3 12.0 0.0 (h sublattice)
4 64 Gd 3 3 2.9 7.0 (c sublattice) up
LDEC ld Advanced
Only active for NRIXS. This option gives the number of angular momentum channels l ≤ ld
for which the decomposition of the inelastic scattering spectrum is given. The output for this
card is written into file ‘xmul.dat’ in ff2x. Changing ld does not change the total spectrum,
but only the amount of partial data written to file.
LJMAX lj Advanced
This is an NRIXS option and will be ignored for any other type of spectroscopy. LJMAX
influences all modules starting from xsph. This card specifies the number of terms included in
the calculation of the excitation matrix elements
lj ≥l
X
ML (~q, E) = hRL (E)| ei~q·~r |ii ≈ hRL (E)| 4π ∗
il jl (qr)Ylm (~q)Ylm (~r) |ii (3.1)
lm
Typically the value of angular momentum channels needed is dependent on the momentum
transfer and energy transfer range that one is calculating. For typical XANES calculation one
does not need lj > 10 and most often lj = 5 is sufficient. For EXAFS one needs more than for
XANES. However, most often this parameter has to be determined on case-by-case basis. If
this parameter is too large it can occasionally cause small errors. For lj > 25 the code starts to
become unstable. Default value is lj = 1, approximately corresponding to the dipole selection
rule. This is almost certainly too low for any situation. There is no physical limitation on lj;
it simply needs to be converged.
This card runs feff with a many-pole model for the self energy.
The values of ipl correspond to the following: 1: use an “average” self-energy which is
applied to the whole system (default). 2: use a density dependendent self-energy which is
different at every point inside the muffin-tin radius.
It takes as input a file ‘loss.dat’ containing the loss function. This can either be measured
or taken from a calculation. For a rough but very fast estimate of the loss function, see the
OPCONS card. See the references for more information. The output file ‘mpse.dat’ contains
the self energy and the renormalization constant (at the interstitial radius) as a function of
photoelectron energy relative to the Fermi Energy in eV.
RPHASES Advanced
If this card is present, real phase shifts rather than complex phase shifts will be used. The
results of the calculation will not be accurate. This option is intended to allow users to obtain
real scattering phase shifts for use with other programs, or for diagnostic purposes. The phase
shifts can be written to output files ‘phaseNN.dat’ using the PRINT card. If the RPHASES
card is present, these will contain the real phase shifts.
RSIGMA Advanced
If this card is present, the imaginary part of the self-energy will be neglected. It might be
useful for calculations in the XANES region, since the imaginary part of the Hedin-Lundqvist
self-energy tends to overestimate losses in this region.
screened interaction is calculated partially based on the Bethe-Salpeter equation, in the basis
of local atomic states. This approximation yields efficient calculations of the spectra in terms
of screened transition matrix elements. Note that TDLDA does not account for core-hole
relaxation effects.
L-shell x-ray absorption in 3d transition metals is sensitive to dynamic screening effects.
For rare-gas solids, dynamic screening accounts for deviations of the L3 /L2 intensity branching
ratio from the 2:1 value of independent-electron theory.
See the paper on dynamic screening by Ankudinov, Nesvizhskii, and Rehr (see the ref-
erences in Appendix C) for further details on the implementation of TDLDA in the feff
calculations. See also Ch. 8 (pp. 82-105) of A.I. Nesvizhskii’s thesis) for a brief description of
the TDLDA theory.
On certain occasions, instabilities have been observed in the TDLDA routines, causing
sometimes NaN output or unphysical glitches in the tails of edges. If such symptoms occur,
the feff authors should be contacted for help.
rfms
Completely ignored in k-space calculations. This is the cluster radius used in modules
ldos and fms but not in pot. It is also the lower limit of pathfinder calculations. The fms
module sums all MS paths within the specified cluster. Typically, a converged XANES
calculation requires about 50-150 atoms in a cluster, but sometimes more are needed.
For EXAFS analysis, one typically calculates to k = 20, but FMS results are not accurate
at high energies. Thus if you are running feff10 for EXAFS, you should not use the
FMS card.
If the value of RPATH as described in Section 3.5.5 is greater than rfms, the pathfinder
will look for paths which extend beyond the cluster used for the FMS and add them to
the FMS calculation of the `DOS and XANES:
Gtot = Gfms + G0 ti G0 + G0 ti G0 tj G0 + · · ·
where at least one atoms i in the path is outside the FMS cluster and the value of RPATH
is the maximum half path length for the ldos, fms and path modules. However, this is
generally not recommended, as the MS expansion sometimes does not converge well in the
XANES energy region. Thus it is generally best not to add paths for LDOS and XANES,
3.5. FEFF PROGRAM CONTROL CARDS 91
and RPATH should be less than rfms. Adding single scattering paths only (NLEG 2)
usually works well to check the convergence of FMS. But adding double scattering (NLEG
3) often leads to very bad results in XANES. Thus RPATH is useful for EXAFS, but for
XANES only when the path expansion is stable.
lfms2
Optional argument. This is a logical flag that defines how the FMS is done, similar to the
flag lfms1 in the SCF card. With the default value of 0 (appropriate for solids), the FMS
is calculated for a cluster of size rfms around each representative unique potential. With
lfms=1 (appropriate for molecules), FMS is done only once for a cluster of size rfms
around the absorbing atom only. The proper use of this flag can lead to a considerable
time savings.
For example, if you calculate FMS for a molecule smaller than 40 atoms, there is no need
to invert nph + 1 matrices, and lfms1 = 1 will reduce time for calculations by a factor
(nph + 1), where nph is the number of unique potentials listed in the POTENTIALS
card).
Typically the FMS card will be used with lfms2 = 0, for example:
For molecules of less than 30 atoms of radius 4.0 Å we suggest using lfms2 = lfms1 = 1,
as in:
SCF 5.0 1
FMS 5.0 1
RPATH -1
minv
Optional. This is an index that defines the FMS algorithm used in the calculations. By
default, (minv = 0) the FMS matrix inversion is performed using LU decomposition.
However, several alternatives have been designed for the FMS algorithm that start to
work faster than LU decomposition for clusters of more than 100 atoms. (See the feff8.2
reference). We strongly recommend the Lanczos recursion method (minv = 2) which is
very robust and speeds the calculations by a factor of 3 or more. The Broyden algorithm
(minv = 3) is faster, but less reliable, and may fail to converge if the FMS matrix has
large eigenvalues.
toler1
Optional. This defines the tolerance to stop recursion and Broyden algorithm. The
default value of 0.001 gives results in agreement with LU decomposition to within a
linewidth.
3.5. FEFF PROGRAM CONTROL CARDS 92
toler2
Optional. Sets the matrix element of the Gt matrix to zero if its value is less than toler2
(default 0.001).
rdirec
Optional. Sets the matrix element of the Gt matrix to zero if the distance between atoms
is larger than rdirec.
The last two variables can make the matrix Gt very sparse so both recursion and Broyden
algorithms work faster. For example for large Si calculations with the Lanczos algorithm, we
used:
BANDSTRUCTURE Advanced
This card activates the module that calculates and prints out bandstructure. This card does
not work in the current version of feff, and you may get an error if you try to use it. The
authors really want you to have your spaghetti, but they’re still in the kitchen working on it!
Keep fingers crossed ...
path. RPATH is equivalent to the RMAX card in the feff7 code. Typically rpath is needed
for EXAFS calculations only to set limits on the number of calculated paths. Note that rpath
is one-half of the total path length in multiple-scattering paths. Setting this too large can cause
the heap in the pathfinder to fill up. Default is rpath = 2.2 times the nearest neighbor distance.
Since the multiple scattering expansion is unstable close to the absorption edge, the path (MS)
expansion should be used only for EXAFS calculations or for diagnosing the XANES or `DOS
calculations. If you use FMS for XANES calculations, better results are obtained without the
MS contribution. For EXAFS analysis this card is extremely useful, since it cuts off long paths
which contribute only at high R values in R-space.
necessary if your heap is filling up, and if limiting rpath doesn’t help), study the results in
‘crit.dat’ from runs with shorter rpath and experiment with the heap criterion accordingly.
In the future, we hope to improve this filter.
Before using these criteria, study the output in the file ‘crit.dat’ (use print option 1 for
path , see Table 4.1 ), which has the values of critpw, keep criterion, and heap criterion for
all paths which pass the critpw filter.
Default: If this card is omitted, the keep and heap criteria are set to zero, that is, no
filtering will be done at this step in the calculation.
index
The shell index and label used for the ‘feffNNNN.dat’ file name.
ipot
The unique potential index identifying the unique potential of the scattering atom.
deg
The degeneracy (or multiplicity) of the single scattering path.
rss
The distance to the central atom.
This information is used to write the file ‘paths.dat’ and is not needed when the ATOMS card
is used. To generate single scattering paths with ATOMS, use NLEG 2.
...). However sometimes one may wish to control the type of symmetry directly using the
SYMMETRY card with isym ranging from 1 to 7.
2. any rotation around evec, reflections in planes normal and parallel to evec, path reversal
7. no symmetry operations
* force using no symmetry at all - warning : long and slow path list!
SYMMETRY 7
critcw
This is the cutoff for a full curved wave calculation. A typical curved wave calculation
requires a complete spherical wave calculation, which typically takes seconds of CPU
time per path. The default value of critcw is 4%, meaning that any path with mean
amplitude exceeding 4% of the largest path will be used in the calculation of χ. The
criterion critcw is used by genfmt. Since the XAFS parameter calculation is already
done, the savings is not in computation time, but in disk space and ease of analysis.
The values of critcw for each path are written in the file ‘list.dat’ written by module
genfmt.
critpw
This is a plane-wave approximation to χ. This is extremely fast to calculate, and is used
in the pathfinder. The default value of critpw is 2.5, meaning that any path with mean
amplitude exceeding 2.5% of the largest path, including degeneracy factors, (in plane
3.5. FEFF PROGRAM CONTROL CARDS 96
wave approximation) will be kept. Any path that does not meet this criterion will not
be written to ‘paths.dat’, and there is no need to calculate the XAFS parameters for
this path. The default for critpw is less than that for critcw since some paths are more
important when the full curved wave calculation is done than they appear in the plane
wave approximation. Since the plane wave estimate is extremely fast, use this to filter
out as many paths as you can. The file ‘crit.dat’ (written by the module path) tells
you critpw for each path that passes the criterion.
The method of calculation of these importance factors has been improved for feff10, so don’t
worry if the values for some paths have changed slightly from previous versions. (Default values
critcw=4% critpw=2.5%)
NSTAR Advanced
When this card is present, genfmt writes the file ‘nstar.dat’ with the effective coordination
number N ? which is the coordination number weighted by cos2 (θ) to correct for polarization
dependence in SEXAFS calculations.
Several additional models for calculating DW factors are available in feff10 based on the
information about the harmonic force constants in the material. The DEBYE card offers a
choice between 5 different models for the DW factors:
idwopt = 1 means the equation of motion (EM) method is used to get Debye–Waller factors and
idwopt = 2 means the recursion method (RM) which is an improved correlated Einstein model.
Both methods are faster than molecular dynamics simulations, and the recursion method is
much faster than the equation of motion method. However, the equation of motion method
leads to somewhat more accurate results than the recursion method. These additional methods
seem to be superior to the correlated Debye model in cases with tetrahedral coordination, such
as solid Ge and many biological materials. idwopt = 5 uses ab initio DW factors from a
dynamical matrix using the dmdw module. This provides very accurate DW factors. All
these methods are described in more detail in Chapter 3.
3.5. FEFF PROGRAM CONTROL CARDS 98
ABSOLUTE Useful
By default feff normalizes spectra at 40 eV above threshold. This card disables normalization.
ABSOLUTE is automatically set whenever ELNES, EXELFS, or NRIXS cards are used.
MBCONV Advanced
Many-body convolution. Documentation currently unavailable. FIX
3.5. FEFF PROGRAM CONTROL CARDS 99
FIX
SFCONV Useful
SFCONV convolutes the single particle XAS files (‘xmu.dat’, ‘chi.dat’, ‘feffNNNN.dat’, etc.)
from feff with a many body spectral function to include many body effects in the spectra.
This includes an ab-initio calculation of the amplitude reduction factor S20 . SFCONV uses
Hedin-Lundqvist self energies, so it will probably work best with XAS files calculated using
feff’s HL self energies.
SFCONV
SELF Advanced
Print out on-shell self energy as calculated by this module.
SELF
SFSE k0 Useful
Print out off-shell self energy Σ(k0, E).
SFSE
CGRID 10 32 32 32 120
RHOZZP Useful
Calculate a slice rho(z,z’) with z fixed near the origin and z’ moving outward along the z-axis to
zpmax (set in CGRID). The result is saved in ‘rhozzp.dat’. Useful as a test, or to get a quick
estimate of some parameters in the other COMPTON cards. Only to be used in conjunction
with the COMPTON card.
RHOZZP
3.5. FEFF PROGRAM CONTROL CARDS 100
This module assembles an EELS spectrum as specified by the card ELNES or EXELFS. See
Section 2.12 for a more complete description of EELS calculations.
iscfxc
TEMP 0 11
iscfth
1 Use sum of expansions.
2 Use exact integral. (default)
3.5. FEFF PROGRAM CONTROL CARDS 101
emaxscf
Set upper bound of energy grid if 15kT is smaller than emaxscf. (default emaxscf =
68.0275 eV, approximately 5 Rydberg).
negrid
Number of energy points. (default negrid = 320)
nmu
Number of iterations for chemical potential. (default nmu = 100)
xntol
Tolerance for electron counts. (default xntol = 1e-4)
gam Ei
Broadening to use in the incident energy direction.
gam El
Broadening to use in the energy loss direction.
xmu
Fermi energy to use for the RIXS calculation, if not present, the fermi level calculated in
the SCF step will be used.
RLPRINT Advanced
The RLPRINT card prints the regular solution to the radial Dirac-Fock equation at each energy
that would be used in the matrix elements. This option facilitates RIXS calculations.
RLPRINT
ICORE 1
3.5. FEFF PROGRAM CONTROL CARDS 102
HIGHZ Advanced
Necessary for calculations of superheavy elements Z > 100. If HIGHZ is present, the finite size
of the nucleus will be taken into account. This is important for calculations of orbital energies
and atomic properties to high precision.
HIGHZ
103
Chapter 4
Any feff calculation produces a large number of files that may be confusing to the novice.
The most important files are the master input file ‘feff.inp’, which we discussed at length in
the previous chapters ; the output file ‘xmu.dat’, which contains the XAS spectrum ; and the
various ‘log*.dat’ files, which are log files written by feff during execution.
feff creates a variety of output files depending on the spectroscopy type selected by the
user, and depending on verbosity settings. See the PRINT card in Section 3.5.1 and 4 to obtain
various diagnostic files.
feff also writes several intermediate files. Some of these group relevant settings from
‘feff.inp’ and program defaults for each of feff’s program modules. These files, called
‘pot.inp’, ‘xsph.inp’ and so on, can be manipulated by the expert user who knows what she
is doing; see Section 4.3. However we advise that novice users always work through ‘feff.inp’
to avoid mistakes.
Section 4.1 summarizes data flow. The rest of this section describes selected files in more
detail.
Regrettably this chapter is somewhat out of date and a handful of newer files are not
described. This includes NRIXS and COMPTON output.
4.1. DATA FLOW 104
Module 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . atomic
Purpose of Module: Calculate atomic potentials for the photoelectron
Input files: ‘pot.inp’ and ‘geom.dat’
Output files: ‘apot.bin’
Other output: ‘fpf0.dat’
Description: Reads ‘pot.inp’ and calculates atomic potentials for the photoelectron,
which are written into ‘apot.bin’.
Module 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . pot
Purpose of Module: Calculate embedded atomic potentials for the photoelectron
Input files: ‘pot.inp’,‘apot.bin’ and ‘geom.dat’
Output files: ‘pot.bin’
Other output: diagnostic files (see Table 4.1 on page 105)
Description: Reads ‘pot.inp’ and calculates potentials for the photoelectron, which
are written into ‘pot.bin’. Optionally, pot will write other diagnostic files with
information about the potentials.
Module 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . screen
Purpose of Module: Calculate embedded atomic potentials for the photoelectron
Input files: ‘pot.bin’ and, optionally, ‘screen.inp’
Output files: ‘wscrn.dat’
Description: Calculates screening, which is written into ‘wscrn.dat’.
Module 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . opconsat
Purpose of Module: Unknown
Input files: Unknown
4.1. DATA FLOW 105
Table 4.1: Print levels controlling output files from the modules. Log-files are not included.
For ELNES calculations, a proliferation of files may occur, eg. ‘xmu.dat’ through ‘xmu09.dat’
will be produced. NRIXS calculations not included in this table. rdinp not included.
genfmt 0 write ‘list.dat’, and write ‘feff.bin’ with all paths with importance
greater than or equal to two thirds of the curved wave importance
criterion
1 write all paths to ‘feff.bin’
compton
4.1. DATA FLOW 106
Module 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ldos
Purpose of Module: Calculate LDOS
Input files: ‘ldos.inp’, ‘geom.dat’, and ‘pot.bin’.
Output files: ‘ldosNN.dat’ (`DOS) and ‘logdos.dat’
Other output:
Description: LDOS runs only if the LDOS card is present in ‘feff.inp’. It outputs
the angular momentum (`) projected DOS into ‘ldosNN.dat’ files, with each value
of NN corresponding to each unique potential.
Module 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xsph
Purpose of Module: Calculate cross-section and phase shifts
Input files: ‘xsph.inp’, ‘geom.dat’, ‘global.dat’ and ‘pot.bin’
Output files: ‘phase.bin’, and ‘xsect.dat’,
Other output: diagnostic files (see Table 4.1 on page 105), and ‘axafs.dat’.
Description: xsph writes the binary file ‘phase.bin’, which contains the scattering
phase shifts and other information needed by path and genfmt. The atomic cross-
section data is written in ‘xsect.dat’ and used in the module (ff2x) for overall
normalization. Optionally, xsph will write other diagnostic files with information
about the phase shift calculations.
Module 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . fms
Purpose of Module: Calculate full multiple scattering for XANES, ELNES and `DOS
Input files: ‘fms.inp’, ‘global.dat’, ‘geom.dat’, and ‘phase.bin’
Output files: ‘gg.bin’
Other output: optionally ‘gg.dat’
Description: Performs the full multiple scattering algorithm. Writes the Green’s func-
tion matrix to ‘gg.bin’.
Module 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mkgtr
Purpose of Module: Calculate full multiple scattering for XANES, ELNES and `DOS
Input files: ‘fms.inp’, ‘global.dat’, ‘geom.dat’, ‘gg.bin’ and ‘phase.bin’
Output files: ‘fms.bin’
Other output: optionally ‘gtr.dat’
4.1. DATA FLOW 107
Description: Traces the Green’s function matrix and adds in matrix elements. Output
written to ‘fms.bin’. Writes output into ‘fms.bin’ for the ff2x module, which
contains the χ(k) from fms.
If an ELNES/EXELFS card is present, all of the requested components of the sigma
tensor are written to ‘fms.bin’, instead of just one.
Module 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . path
Purpose of Module: Path enumeration
Input files: ‘path.inp’, ‘geom.dat’, ‘global.dat’ and ‘phase.bin’
Output files: ‘paths.dat’
Other output: ‘crit.dat’
Description: path writes ‘paths.dat’ for use by genfmt and as a complete description
of each path for use of the user. path will optionally write other diagnostic files. The
file ‘crit.dat’ is particularly useful when studying large numbers of paths. When
studying large numbers of paths, this module will optionally write only ‘crit.dat’
and not ‘paths.dat’.
If an ELNES/EXELFS card is present, a separate ‘list.dat’ file is written for each
polarization component (i.e., ‘list.dat’, ‘list02.dat’, etc.).
Module 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . genfmt
Purpose of Module: Calculate scattering amplitudes and other XAFS parameters
Input files: ‘genfmt.inp’, ‘global.dat’, ‘phase.bin’, and ‘paths.dat’
Output files: ‘feff.bin’, and ‘list.dat’
Other output:
Description: genfmt reads input files, and writes a file ‘feff.bin’, which contains
all the EXAFS information for the paths, and ‘list.dat’, which contains some
basic information about them. These files are the main output of feff for EXAFS
analysis. To read ‘feff.bin’ into your own program, use the subroutine feffdt as
an example.
If an ELNES/EXELFS card is present, a ‘listNN.dat’ file is written for each po-
larization component, and a separate ‘feff.bin’ file is written (i.e., ‘feff.bin’,
‘feff02.bin’, etc.). The format of the files is unchanged.
Module 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ff2x
Purpose of Module: Calculate specified x-ray spectrum
Input files: ‘ff2x.inp’, ‘global.dat’, ‘list.dat’, ‘feff.bin’, ‘fms.bin’, ‘xsect.bin’
Output files: ‘chi.dat’ and ‘xmu.dat’
Other output: ‘chipNNNN.dat’ and ‘feffNNNN.dat’
4.1. DATA FLOW 108
Description: ff2x reads ‘list.dat’, ‘fms.bin’, ‘feff.bin’, and writes ‘chi.dat’ with
the total XAFS from the paths specified in ‘list.dat’. Additional instructions
are passed to ff2x from ‘feff.bin’, so you can change S02, the Debye tempera-
ture and some other parameters without re-doing the whole calculation. The file
‘list.dat’ can be edited by hand to change the paths being considered, and indi-
vidual ‘chipNNNN.dat’ files with χ(k) from each path are optionally written. If any
of the XANES, DANES, FPRIME or XNCD cards are specified, ff2x will write the
corresponding calculated data in ‘xmu.dat’. Various corrections are possible at this
point in the calculations— see the input cards above.
If an ELNES/EXELFS card is present, this module reads the large ‘fms.bin’ and all
the ‘feffNN.bin’ files, and produces a ‘xmuNN.dat’ file containing the corresponding
component of the sigma tensor (‘xmu.dat’, ‘xmu02.dat’, ..., ‘xmu09.dat’). Those
files have the traditional ‘xmu.dat’ format. Similarly, ‘chiNN.dat’ files are produced.
Module 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . sfconv
Purpose of Module: Convolve output files with the spectral function.
Input files: ‘sfconv.inp’, ‘xmu.dat’, ‘chi.dat’, ‘chipNNNN.dat’, or ‘feffNNNN.dat’
files
Output files: ‘specfunct.dat’,
Other output: The following files are overwritten with convolved spectral data: ‘xmu.dat’,
‘chi.dat’, ‘chipNNNN.dat’, and ‘feffNNNN.dat’.
Description: SFCONV convolutes the single particle XAS files with a many body spec-
tral function to include many body effects on the spectra, including an ab-initio
calculation of the amplitude reduction factor S20 . This module runs after ff2x if the
SFCONV card is present in ‘feff.inp’.
In the presence of an EELS card, the module is run for all components of the sigma
tensor: each ‘xmu.dat’ file is opened and altered individually.
Module 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . eels
Purpose of Module: Calculate EELS
Input files: ‘eels.inp’
Output files: ‘eels.dat’ and ‘logeels.dat’
Other output: optionally, ‘magic.dat’
Description: EELS runs only in the presence of an ELNES or EXELFS card. It reads
‘eels.inp’, and sums the partial spectra from the various polarizations to assemble
a physical EELS spectrum.
4.2. FILE REFERENCE 109
‘chi.dat’
Standard XAFS data containing k, χ(k), |χ(k)| relative to threshold (k = 0). The header
also contains enough information to specify which model was used to create this file.
‘xmu.dat’
The file ‘xmu.dat’ contains XANES, EXAFS or NRIXS data depending on the situation;
µ0
µ, µ0 , and χ̃ = χ µ0 (edge+50eV) as functions of absolute energy E, relative energy E − Ef
and wave number k.
‘feff.bin’
A binary file that contains all the information about the XAFS from all of the paths.
This replaces the old ‘feffNNNN.dat’ files (which you can make using the PRINT card).
If you want to use this file with your own analysis package, use the code in subroutine
feffdt as an example of how to read it.
‘feffNNNN.dat’
You have to use the PRINT option to obtain these files. Effective scattering amplitude
and phase shift data, with k referenced to threshold for shell nn: k, φc , |Feff |, φeff , the
reduction factor, λ, Re(p).
If you need these, use the PRINT option for ff2x greater than or equal to 3, which will
read ‘feff.bin’ and write the ‘feffNNNN.dat’ files in exactly the form you’re used to.
‘fpf0.dat’
Thomson scattering amplitude f0 (Q) and constant contribution to f’ from total energy
term.
‘ratio.dat’
Ratio µ0 (E), ρ0 (E) and their ratio versus energy, for XMCD sum rules normalization.
‘eels.dat’
This contains the EELS spectrum: energy loss in eV, total spectrum, contribution from
each component of the cross section tensor.
‘magic.dat’
This file is only written if the MAGIC card is used. It contains the collection angle in
rad, the pi to sigma ratio, the pi and sigma components of the spectrum, and the total
spectrum.
‘eels.inp’
is read by the eels module and determines what feff will actually do. Expert users can
4.2. FILE REFERENCE 110
tweak this file directly. It contains all the options of the EELS and MAGIC cards. The
very first parameter determines whether eels is executed (=1) or not (=0). The param-
eters on the next line select the components (1-9) of the sigma tensor to be calculated.
These parameters are very important because most other program modules check for the
presence of ‘eels.inp’ and the values of these parameters to determine their course of
action. People who have done EELS and then want to do something else in the same
working directory may want to set the execution switch to 0 (or comment the EELS card
in ‘feff.inp’ and rerun rdinp, which amounts to the same) to make sure none of the
regular modules do anything special for EELS.
‘eels.dat’
contains the EELS spectrum. Its first column has energy loss in eV, the second column
the total spectrum, and the next columns contain the contribution to the total spectrum
from each of the nine components of the cross section tensor (xx, xy, ..., zz)
‘magic.dat’
is only written if the MAGIC card is present in feff.inp. It contains the collection angle in
rad, the π to σ ratio, the π and σ components of the spectrum, and the total spectrum;
all as a function of collection angle, evaluated at the energy loss set by the MAGIC card.
‘logeels.dat’
contains reports on the execution of the eels module. In particular, it contains a summary
of the input options used. Most of the information in the file is also written to the screen
during program execution.
‘xsect.bin’
Total atomic cross section for x-ray absorption. This is an ASCII file, but it is highly
sensitive to format. The information it contains can be viewed, but editing this file is not
recommended.
‘ldosNN.dat’
`-projected density of states for the NNth potential index (see the LDOS card)
‘fms.bin’
contains the results of FMS calculations. Used by ff2x to get the total XAFS or XANES.
‘paths.dat’
Written by the pathfinder, this is a description of all the paths that fit the criteria
used by the pathfinder. It is used by genfmt. The path descriptions include Cartesian
coordinates of atoms in the path, scattering angles, leg lengths and degeneracy. For
details on editing this file by hand, see Section 4.3. (‘pathNN.dat’ files are also created
during the `DOS calculations for each type of potential, but they are deleted after use.)
‘crit.dat’
Values of the quantities tested against the various criteria in the pathfinder.
‘list.dat’
List of paths to use for the final calculations. Written by genfmt when the XAFS pa-
rameters are calculated and used by ff2x. It contains the curved wave importance ratios,
which you may wish to study. For details on editing this file by hand, see Section 4.3.
The curved wave importance ratios are the importance of a particular path relative to
the shortest single scattering path.
‘specfunct.dat’
This is a binary file containing the spectral function. If it is not present, sfconv will
create it. Every time the material is changed, ‘specfunct.dat’ will be recomputed.
‘misc.dat’
Header file for quick reference.
‘phaseNN.dat’
Complex phase shifts for each shell.
‘phminNN.dat’
Real part of phase shifts for `=0,1,2 only. They are smaller versions of corresponding
‘phaseNN.dat’.
‘potNN.dat’
Detailed atomic potentials and densities.
4.2. FILE REFERENCE 112
‘atomNN.dat’
Diagnostic information on Desclaux free atom NN.
‘.dimensions.dat’
Passes array size between modules. Mess with this and all hell will break loose.
‘.scfconvergence-feff’
Tracks charge density difference and convergence throughout SCF iterations in pot.
The wave number in units of Å−1 . k = E − Ef where E is energy and Ef is the Fermi
p
k
level computed from electron gas theory at the average interstitial charge density.
χ(k)
X N Feff
χ(k) = S02 R exp(−2r/λ) sin(2kR + φeff + φc ) exp(−2k 2 σ 2 )
kR2
shells
Feff The effective curved-wave backscattering amplitude in the EXAFS formula for each
shell.
Σ(E) The energy dependent self energy at energy E, Σf is the self energy at the Fermi
energy.
You can modify a path, or even invent new ones, such as paths with more than the pathfinder
maximum of 8 legs. For example, you could make a path to determine the effect of a focusing
atom on a distant scatterer. Whatever index you enter for the path will be used in the filename
given to the ‘feffNNNN.dat’ file. For example, for the choice of index 845, the EXAFS param-
eters will appear in ‘feff0845.dat’. A handy way to add a single scattering path of length R
is to make a 2-leg path with the central atom at (0, 0, 0) and the scatterer at (R, 0, 0).
genfmt will need the positions, unique potentials, and character tags for each atom in the
path. The angles and leg lengths are printed out for your information, and you can omit them
when creating your own paths by hand. The label lines in the file are required (there is code
that skips them, and if they’re missing, you’ll get incorrect results).
This is the list of files that ff2x uses to calculate chi. It includes the paths written by module
genfmt, curved wave importance factors, and user-defined Debye–Waller factors. If you want
to set Debye–Waller factors for individual paths, you may edit this file to set them. ff2x will
sum the Debye–Waller factors in this file with the correlated Debye model σ 2 and the global
σ 2 , if present. You may also delete paths from this file if you want to combine some particular
set of paths. (CAUTION: Save the original, or you’ll have to re-run genfmt!)
This file can be manually edited to take advantage of the paths symmetries.
114
Appendix A
a license as provided for in paragraph (c)(1)(ii) of this section, or without the consent of the
copyright owner, unless it obtains specific written approval of the Contracting Officer for the
inclusion of such copyright material.
Appendix B
Installation Instructions
fortran90 code, and hence a fortran90 compiler is now required. If you do not currently have
a fortran90 compiler, Intel Fortran Compiler is free for personal use on Linux platforms, and
reduced pricing is available for academic licenses.
We provide precompiled binaries for different architectures, compiled using Intel Fortran
Composer 12.5 on all platforms. We are satisfied with that compiler, but you can also try
gfortran, g95, pgf90, or any compiler you like.
We generally recommend starting out with a conservative compilation - all optimization
disabled, maximum safety compiler flags especially for maintaining floating point precision.
Then recompile a faster version checking against the original results. Use a testcase containing
the SCF and FMS cards to make sure the FMS routines are safely compiled.
The feff source code is fully self-contained, i.e. it doesn’t need to be linked against external
libraries.
We’ve noticed that on some machines it is necessary to increase stack size or available virtual
memory in order to run the code succesfully. Your sys admin or your system’s documentation
can help you do this.
118
Appendix C
References
Please cite feff and an appropriate feff reference if the code or its results are used in published
work.
The main references for the theory of feff are:
Calculations of x-ray spectroscopies using FEFF10 and Corvus, J.J. Kas, F.D. Vila, D.
Pemmaraju, Tun S. Tan, S. Vimolchalao, and J.J. Rehr, Unpublished, 2020.
Ab initio theory and calculations of X-ray spectra, J.J. Rehr, J.J. Kas, M.P. Prange, A.P.
Sorini, Y. Takimoto, F.D. Vila, Comptes Rendus Physique 10 (6) 548-559 (2009)
and for EXAFS theory:
Theoretical Approaches to X-ray Absorption Fine Structure, J. J. Rehr and R. C. Albers,
Rev. Mod. Phys. 72, 621, (2000).
The main reference for calculations using the current version feff10 is:
Parameter-free calculations of X-ray spectra with FEFF9, J.J. Rehr, J.J. Kas, F.D. Vila,
M.P. Prange, K. Jorissen, Phys. Chem. Chem. Phys. 12 (21) 5503-5513 (2010).
FEFF9
“Parameter-free calculations of X-ray spectra with FEFF9”, J.J. Rehr, J.J. Kas, F.D.
Vila, M.P. Prange, K. Jorissen, Phys. Chem. Chem. Phys. 12 (21) 5503-5513 (2010).
K-space
“Calculations of electron energy loss and x-ray absorption spectra in periodic systems
without a supercell,” K. Jorissen and J.J. Rehr, Phys. Rev. B 81, 245124 (2010).
EELS “Multiple scattering calculatinos of relativistic electron energy loss spectra,” K. Joris-
sen, J. J. Rehr, and J. Verbeeck, Phys. Rev. B 81, 155108 (2010).
NRIXS
“Inelastic Scattering from Core-electrons: a Multiple Scattering Approach,” J. A.
Soininen, A. L. Ankudinov, and J. J. Rehr, Phys. Rev. B 72, 045136 (2005).
119
EELS “Practical aspects of electron energy-loss spectroscopy (EELS) calculations using FEFF8,”M.S.
Moreno, K. Jorissen, and J.J. Rehr, Micron, 38, 1 (2007).
FEFF7
A.L. Ankudinov and J.J. Rehr, Relativistic Spin-dependent X-ray Absorption Theory,
Phys. Rev. B 56, R1712 (1997).
A.L. Ankudinov, PhD Thesis, Relativistic Spin-dependent X-ray Absorption Theory,
University of Washington, (1996); contains a review of x-ray absorption theory, a whole
chapter of information about feff for expert users, example applications, and the full
feff7 program tree.
FEFF6
S.I. Zabinsky, J.J. Rehr, A. Ankudinov, R.C. Albers and M.J. Eller, Multiple Scattering
Calculations of X-ray Absorption Spectra, Phys. Rev. B 52, 2995 (1995).
FEFF5
J.J. Rehr, S.I. Zabinsky and R.C. Albers, High-order multiple scattering calculations
of x-ray-absorption fine structure, Phys. Rev. Lett. 69, 3397 (1992).
FEFF4
J. Mustre de Leon, J.J. Rehr, S.I. Zabinsky, and R.C. Albers, Ab initio curved-wave
x-ray-absorption fine structure, Phys. Rev. B 44, 4146 (1991).
J.J. Rehr, J. Mustre de Leon, S.I. Zabinsky, and R.C. Albers, Theoretical X-ray
Absorption Fine Structure Standards, J. Am. Chem. Soc. 113, 5135 (1991).
120
Sum rules
A.I. Nesvizhskii, A.L. Ankudinov, and J.J. Rehr, Normalization and convergence of
x-ray absorption sum rules, Phys. Rev. B 63, 094412 (2001).
Multiple Scattering theory
J.J. Rehr and R.C. Albers, Scattering-matrix formulation of curved-wave multiple-scattering
theory: Application to x-ray-absorption fine structure, Phys. Rev. B 41, 8139 (1990).
Dirac-Fock atomic code
A.L. Ankudinov, S.I. Zabinsky and J.J. Rehr, Single configuration Dirac-Fock atom
code, Comp. Phys. Comm. 98, 359 (1996).
121
Appendix D
For historical reasons feff is a mix of older fortran77 code and newer fortran90 code. Hence the
most important array dimensions are treated dynamically, while others are set at compilation
time. If you need to run larger problems than the dimension statements in the code allow, you
must change the dimensions in the file ‘feff10/src/COMMON/m dimsmod.f90’ and recompile.
If you need help, please contact the authors.
The following parameters are supported for dynamical treatment :
For these parameters, the module rdinp will determine from user input what array size
is needed, eg. to fit all atoms of the cluster and all orbital momentum values. These will be
truncated to a precompiled upper limit to protect exceeding available memory (which might
result in nasty errors that would be problematic especially on large computing systems where
tasks have to go through a queue and crashes cannot be immediately rectified) ; optionally, the
user can set these truncation values using the DIMS card.
For all static parameters below, all arrays will be allocated with a fixed dimension regardless
of the problem at hand. These parameters are (values may be different in your release) :
Of these parameters, a user is most likely to want to change nphx and nspx. Care should be
taken in changing these parameters. Whenever the expected length of an array changes, errors,
or, worse, unphysical results may occur when feff then reads intermediate files produced before
the changes. In practice, this means that
whenever one changes user input (‘feff.inp’) or the hardwired truncation limits for the
dynamical dimension parameters such that the length of any arrays in the calculation will
change, all affected parts of the calculation must be rerun before continuing or reusing
parts of it.
whenever one changes any of the static parameters, all intermediate files containing arrays
dimensioned by the affected parameter will become useless and the calculation must be
redone to regenerate these files before they can be used.
Of course, it is entirely possible to have more than one compiled version of feff on your
system, as long as you don’t mix them up and always use the same version for a given calcu-
lation.
It should also be noted here that there is an internal limit on the number of paths (set
to 1200) that will be read from ‘feff.bin’. This limit was chosen to handle any reasonable
problem without using an excessive amount of memory. If you must use more paths, change
the parameter npx in the feff source in subroutine ff2x to whatever you need. This will
require more memory. We have not had a case where the filter criteria were not able to solve
the problem with fewer than 1200 paths.
123
The files ‘.feff.dims’ and ‘.feff.comp.stats’ list the values of all important parameters
used in a given calculation. It’d be a really bad idea to edit these files, but looking won’t hurt.
124
Appendix E
‘spin.f’:
program spin_sum
c written in grandmother’s fortran-77
implicit double precision (a-h,o-z)
c This program read two xmu.dat files for spin -up and -down,
c calculated with Feff8.20 for the SAME paths list.
c spin-up file is fort.1, spin-down file is fort.2
c Both have to be edited: All lines should be deleted except
c 1) line: xsedge+100, used to normalize mu 1.3953E-04
c leave only on this line: 1.3953E-04
c 2) 6-column data lines
c The output will be written in fort.3 in 6 columns
c E+shift1 E(edge)+shift2 xk cmd_total cmd_background cmd_fs
c where total = atomic background + fine structure
c factor = 0.25
c for L2
c factor = -0.5
c ENTER the energy shift you want for columns 1 and 2 in xmu.dat
shift1 = 0
shift2 = 0
Appendix F
DMDW is a set of tools developed to calculate Debye-Waller (DW) factors and other related
quantities from a dynamical matrix (matrix of force constants or Hessian matrix) using the
Lanczos recursive algorithm.[Refs.] This set includes a module integrated into FEFF, a stan-
dalone version that can be used independently of FEFF and a Fortran module that can be
integrated into third-party programs. DMDW also includes conversion tools to generate the
required input files from different ab initio programs.
DMDW is included in the feff distribution and is installed as a feff module with all the
other program modules. Please refer to the feff installation instructions. After the feff
installation is completed a module called dmdw is located under the feff ‘feff10/bin/Seq’
directory structure.
Within the ‘src/DMDW’ directory in the feff distribution, execute the following command:
make standalone
make
F.2. USING DMDW TO CALCULATE DEBYE-WALLER FACTORS 127
make install
make examples
See Chapter 5.
Capabilities of DMDW beyond the feff DEBYE card can be accessed by means of the dmdw
module or by compiling the standalone version. All the detailes described below apply to the
input used by both the dmdw module and the standalone version. During the execution of a
normal FEFF run using ab initio DW factors, an input file ‘dmdw.inp’ for the dmdw module
is automatically generated based on the options used in the DEBYE card. This autogener-
ated input can be used ”as is” with the standalone version, or further edited to access other
capabilities.
‘dmdw.inp’ is composed of at least 5 lines of input. All the parameters must be entered and
no default values are available:
Lanczos_Order
nT T_Min T_Max
DW_Type
Filename
nPathDesc
PathDesc1
PathDesc2
.
.
where:
require a lower recursion order. The user should always check for convergence with this
parameter.
Line 2 - nT: Number of temperature values in grid (integer) T Min, T Max: Minimum
and maximum temperature values (real, in K)
Define a grid of temperatures in which to calculate the DW factors. This option is very
efficient in the generation of whole temperature curves since it performs the Lanczos
procedure only once and then calculates the DW for each temperature.
Lines 6... - PathDescN: Nth path descriptor used to generate a list of paths (integer and
real, see below)
A path descriptor has the following form:
where:
nAt: Number of atoms in the path (integer) At(i): Index of atom that must be included
in the path (integer)
These indices correspond to the ones used in the ”dym” file. The number 0 is a wildcard
representing any atom in the structure. For instance, the atom indices ”1 0 2” represent
a double scattering paths starting at atom 1, ending at atom 2 and passing through
every other allowed atom in the system. The paths are generated in such a way that no
consecutive repeated indices are allowed.
Path Length: Effective path length cutoff (real, in Bohr)
F.3. THE ”DYM” DYNAMICAL MATRIX FILE FORMAT 129
This parameter helps fine-tune the generated path list, removing paths that are longer
than necessary.
F.4 Examples
See Chapter 5.
If the code warns that there are less poles than Lanczos iterations, it usually means that
the iteration order is too high. Try with a smaller number.
When the structure associated with a dynamical matrix is not sufficiently optimized, the
program is likely to report that certain paths result in poles associated with imaginary
frequencies. The code currently ignores these poles by setting ther weigth to zero. Usually
this doesn’t affect the results significantly, but they should be considered very carefully
anyway.
The code checks the symmetry of the dynamical matrix. If it isn’t sufficiently symmetric,
the results should be examined carefully.
131
Appendix G
feff has been extensively tested on many different architectures, but occasionally new bugs
show up. In an effort to maintain portable and trouble-free codes, we take all bug reports
seriously. Please let us know if you encounter any compilation error or warning messages.
Often we receive reports by users of older versions of feff of bugs that have been fixed in
more recent releases. Other code failures can be traced to input file errors, sometimes quite
subtle, and some are compiler bugs, for which we try to find a workaround.
To report a bug, please tell us the version of the code you are using and which operating
system and compiler you have. Please include a ‘feff.inp’ if the problem occurs after com-
pilation and enough detail concerning the warning or error messages or other difficulties you
have so that we can attempt to reproduce the problem.
Some known and commonly encountered difficulties are:
For systems with a large number of potentials (eg. adamantane, a system of C and H
containing 26 different potentials) small negative numbers occur during the SCF calcula-
tion (negative density warning) and the DOS calculation (negative ”‘noise”’ in the ldos).
This is due to limited precision in the FMS routines with so many different potentials,
and probably also more likely for very light atoms. For reasons of efficiency, the FMS
routines work in single precision. One can eliminate the negative numbers by recompiling
feff using double precision as default for real numbers (eg. using the -r8 option for the
ifort compiler). However, this will make the calculation significantly slower. Usually it is
enough to look at the DOS and make sure it is physical.