7. Feff

IFEFFIT ships with a free copy of FEFF6. Although deep support for FEFF8 is on the long range list of objectives for DEMETER, currently only FEFF6 is well supported. This seems reasonable as DEMETER currently have no special capabilities for XANES or other inner shell spectroscopy analysis beyond empirical, ATHENA-level functionality.


Fig. 7.1 This is a rough flow diagram for FEFF6. The configuration of atoms in the feff.inp file is used to compute the potentials in the potph part of FEFF6 and to find all possible scattering geometries with the cluster in the pathfinder part. The output files from those two parts, phase.bin and paths.dat, are used by genfmt to compute the feffNNNN.dat files, each of which contains the contribution to the EXAFS from an individual scattering geometry. The various scattering contributions are then summed by ff2chi to make the theoretical χ(k).

When run outside of DEMETER, FEFF6 is usually treated as a single program that starts by reading an input file and ends by writing out feffNNNN.dat files containing the contributions from each individual scattering path. In fact, FEFF6 runs in five distinct steps:

  1. Read the feff.inp file
  2. Compute the atomic potentials (called potph in the internal language of the FEFF program)
  3. Find all possible scattering paths with the cluster defined by the feff.inp file (pathfinder)
  4. Using the geometric information from the paths finder and the atomic potentials, compute the contribution from each scattering path (genfmt)
  5. Sum the contributions from the scattering paths into a calculated χ(k) (ff2chi)

In IFEFFIT and in the older version of ARTEMIS, we simply drop ff2chi. IFEFFIT is a high-functionality replacement for ff2chi. It takes all the contributions computed by the FEFF calculation and adds them up with parameterization for the path parameters.

That was the only part of FEFF6 that was unused in old ARTEMIS. When you imported a feff.inp file into ARTEMIS, FEFF6 was run all the way through the genfmt stage. Hidden somewhere out of the way were all the output files from FEFF. This is why old-style ARTEMIS project files are so very large. It is because they contain the phase.bin file and possibly hundreds of feffNNNN.dat files – one for each scattering path computed in each FEFF calculation performed.

FEFF, however, does not have to be run this way. Using the CONTROL keyword, you can specify which parts of FEFF actually run. Each of potph, pathfinder, genfmt, and ff2chi can be turned on and off individually, so long as the all the necessary input information is somehow available. For example, to run just genfmt, you must somehow have already calculated the phase.bin and paths.dat files.

An aside about FEFF's pathfinder: it is fast, but is missing useful features. One missing feature is that, when it determines which scattering geometries are degenerate (i.e. they provide the same contributions to the EXAFS), it throws each degenerate path away. That is, the feffNNNN.dat file for the first coordination shell in an BCC metal tells you the coordinates of one such scattering atom and it tells you that the degeneracy is 8. It does not, however, retain the coordinates of the other 7 atoms. The other shortcoming of the pathfinder is that it treats scattering paths as non-degenerate if their half path lengths differ by 0.00001 Å or more. That is, in most cases, a ridiculously tight tolerance which leads to a substantial proliferation of very similar paths.

OK, back to how FEFF is used in ARTEMIS. In the new ARTEMIS, I take a much more fine-grained approach. FEFF is never run from beginning to end. When FEFF is run, the potph part is run and the resulting phase.bin file is saved.

Then the pathfinder is run, but not FEFF's pathfinder. The pathfinder has been completely rewritten as part of DEMETER. The new pathfinder is missing one important feature. It has no way of doing FEFF's quick and dirty plane wave estimation of path amplitude, thus DEMETER's pathfinder does not have that way of discarding obviously small paths and all higher-order scattering paths based on that geometry. Also, DEMETER's pathfinder is pretty slow compared to FEFF's. However, DEMETER's pathfinder retains information about all scattering geometries that contribute to the degeneracy of a path. In the future, this could allow propagation of distortions to the starting structure through all the scattering paths.

Secondly, DEMETER's pathfinder introduces something called “fuzzy degeneracy”. ♦Pathfinder→fuzz is the configurable parameter that defines a length scale below which paths of similar length are considered degenerate. The default is 0.03 Å, but can be set as you wish. Thus paths that differ in length by less than 0.03 Å are considered degenerate and the resulting path is computed at the average length of the nearly degenerate set of paths.

So, the pathfinder introduces a number of new features. But the really powerful bit is how ARTEMIS interacts with genfmt. Basically, genfmt is run on demand the first time that the corresponding feffNNNN.dat file is needed (perhaps for a fit, perhaps for a plot). When the current instance of DEMETER is finished (say, by quitting ARTEMIS) all the feffNNNN.dat files are deleted. The next time you fire up your program, they will be recalcualted. It turns out that the call to genfmt is so fast that it is preferable to recompute the feffNNNN.dat files rather than carry them around. Thus ARTEMIS project files are much smaller that the old-style project files. The feffNNNN.dat files are given names based on random strings, so it is extremely unlikely that you will accidentally over-write them if you happen to re-run earlier parts of FEFF. The way this on-demand calcualtion of feffNNNN.dat files works is by having DEMETER generate short replacements for the paths.dat file which contain only the single path that you want to calculate. The paths.dat file is deleted immediately after it is used.

This approach makes it very easy to define interesting abstractions of paths. For instance, suppose you want to consider the possibility that one of the atoms in your material is at a position very different from the examples in the cluster. This approach makes it easy to compute that. It's called an SSPath.

There are a number of other tricks that this capability could enable, including things like considering variation in scattering angle of a MS path or consideration of arbitrary radial distribution functions.


DEMETER is copyright © 2009-2016 Bruce Ravel – This document is copyright © 2016 Bruce Ravel

This document is licensed under The Creative Commons Attribution-ShareAlike License.

If DEMETER and this document are useful to you, please consider supporting The Creative Commons.