[Ifeffit] EXAFS calculation with large RMAX and NLEG - exceeding path finder limit

Bruce Ravel bravel at bnl.gov
Tue Sep 2 10:36:53 CDT 2014

Hi Renske,

As you can tell from the lack of response, there is not a lot of depth
of understanding of the fine details of Feff's pathfinder out there.
My vague memory is that there is a hardwired limit of 7-legged paths
in the pathfinder and that increasing that number is tricky due to
some optimizations that were written in to the code to make it fast on
computers in the early 1990s.  But that's a vague memory and could be

Matt and I are in the early stages of working on a version of feff 8.5
which the folks at the Feff Project contributed under redistributable
licensing.  https://github.com/xraypy/feff85exafs

We have a lot of things we want to do, but the most important thing is
to turn genfmt from a free-standing program into a library that can be
wrapped and called from other software, thus allowing recalculation of
scattering paths as part of the fitting loop.  That's cool, but not
really to the point of your question.

I don't know how much effort you want to put into your problem, but if
you do put in the effort to change the pathfinder in Feff's source, I
hope that you'll contribute your effort to feff85exafs.

In Artemis, I don't actually use Feff's path finder -- I wrote my own to 
overcome some other limitations of the original.  Unfortunately, my 
implementation stops at 4-legged paths.  That's not a technical limit -- 
I simply stopped writing code once I got 4-legged paths working.  As you 
probably know, your sort of problem is something of an outlier.  Not a 
lot of folk work on problems that need more than 4 legs.

It would be very nice to have a path finder written for Matt's Larch
project.  In fact, it's something I am thinking of doing myself (but I
certainly don't need to!).  It would be lovely to have a path finder
in Larch with the advantageous features of Artemis' implementation and
no limit of order of scattering.

I know that wasn't exactly helpful -- just my musings on the scope of
the problem.

To make a comment that actually is helpful, I can offer a somewhat
tedious solution that may just work.  This is entirely untested --
there could be some reason I don't know about for why it won't work.

  1. Run the part of Feff that computes the potentials and write the

  2. Using a paths.dat from a feff calculation you've already made as a
     model, keep the header (everything up to and including the line of
     dashes), take a "paragraph" like this:

         11    4  12.000  index, nleg, degeneracy, r=  5.1053
           x           y           z     ipot  label      rleg      beta 
         0.000000   -1.805000   -1.805000   1 'Cu    '     2.5527 
180.0000    0.0000
         0.000000    0.000000    0.000000   0 'Cu    '     2.5527 
0.0000    0.0000
         0.000000    1.805000    1.805000   1 'Cu    '     2.5527 
180.0000    0.0000
         0.000000    0.000000    0.000000   0 'Cu    '     2.5527 
0.0000    0.0000

     and edit it to look like this:

         9999  8  12.000  index, nleg, degeneracy, r=  10.2106
           x           y           z     ipot  label
         0.000000   -1.805000   -1.805000   1 'Cu    '
         0.000000    0.000000    0.000000   0 'Cu    '
         0.000000    1.805000    1.805000   1 'Cu    '
         0.000000    0.000000    0.000000   0 'Cu    '
         0.000000    1.805000    1.805000   1 'Cu    '
         0.000000    0.000000    0.000000   0 'Cu    '
         0.000000    1.805000    1.805000   1 'Cu    '
         0.000000    0.000000    0.000000   0 'Cu    '

     That's an 8-legged path.  The lreg, beta, and eta columns are not
     needed -- those were only written for the human reader, anyway.

  3. Rename your new file with the header and this one path to
     "paths.dat" (preserving the old "paths.dat", of course).

  4. Run the last part of Feff, the part that reads phase.bin and
     paths.dat and writes out the feffNNNN.dat.  Doing so will make a
     file called "feff9999.dat" (the first integer on the first line
     of the paragraph is the NNNN number -- it can be anything from 1
     to 9999).

I am assuming that you have a sense of which paths you want to
consider and can make these paragarphs by hand without too much
difficulty and that you can figure out what the degeneracy is supposed
to be.  (in this example, I think 12 is still correct.)

Obviously, this a lot of work.  And it may be that the nleg limit is
hardwired into genfmt as well.  But it's something to try.


On 08/22/2014 09:32 AM, van der Veen, Renske wrote:
> Dear FEFF users,
> Using FEFF8.4, I am trying to perform EXAFS calculations with rather
> large RMAX and NLEG values. The system of interest is graphite. It has
> been shown by Castrucci et al (J. Phys. Chem. C 2009, 113, 4848–4855),
> that convergence of the EXAFS modulations in the region 4-6 A-1 is only
> achieved for a cluster size of RMAX = 8 and including up to 8-body MS
> paths (NLEG = 8). I have tried to reproduce these calculations and
> noticed that the path finder runs into a limit when I use these
> parameters. I can maximally use RMAX = 7.5 and NLEG =  5. With larger
> RMAX or NLEG values I get the message:
> "Internal path finder limit exceeded -- path list may be incomplete.",
> and the cluster size subsequently truncated at 6-6.5 A (depending on
> NLEG), instead of the desired 8 A.
> My path filter criteria are 3% (plane-wave) and 4% (curved-wave).
> However, these values do not affect the appearance of the above message,
> which occurs before the path filter is applied. Consequently, altering
> the 'npx' parameter, as suggested here
> http://leonardo.phys.washington.edu/feff/wiki/static/c/o/d/Code_Variables_and_Dimensions_ceec.html,
> does not help.
> Is there a way to increase this internal path limit so I can work with
> RMAX = 8 and NLEG = 8?
> P.S.1 I guess graphite is a special case for which MS can be very
> efficient within the graphite planes. In addition, the C-C bond length
> is quite short, which makes higher n-body paths more important.
> P.S.2 I have tried merging XANES and EXAFS using the cards: XANES, FMS
> 6, RPATH 8 and NLEG 8, but the same problem occurs and the agreement
> with experiment in the low-k region 3-6 A-1 does not become better using
> FMS (compared to the path expansion).
> Thanks in advance,
> Best wishes,
> Renske
> _______________________________________________
> Ifeffit mailing list
> Ifeffit at millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit

  Bruce Ravel  ------------------------------------ bravel at bnl.gov

  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
  Building 535A
  Upton NY, 11973

  Homepage:    http://bruceravel.github.io/home/
  Software:    https://github.com/bruceravel
  Demeter:     http://bruceravel.github.io/demeter/

More information about the Ifeffit mailing list