Re: [Ifeffit] EXAFS calculation with large RMAX and NLEG - exceeding path finder limit
Hi Renske,
Unfortunately, Bruce's idea will not work for exactly the reason he
guessed, i.e., that both path and genfmt have hard coded limits. Luckily,
it is not so hard to recompile the code with larger dimensions. If you have
access to a fortran compiler, you can just use your favorite find and
replace to change the variables in question, or we can do it for you if you
send us the details of your operating system. What you will want to search
for is
parameter (npatx =
parameter (nx =
parameter (npx =
The first parameter (npatx) is the maximum number of atoms in a path, not
including the absorbing atom at the beginning and the end, so that the
maximum number of legs is npatx + 1. For 8 legs, you will need npatx=7.
The second parameter (nx) is the dimension for the heap sort of the paths
(maximum number of paths kept). I don't know how large this will need to be
for graphite, but I have it set to 60000 in my personal version. I think by
default it is set to 10000.
The third parameter is the internal path finder limit and can be set quite
large. I have it set to 4000000 in my personal version.
You will probably want to play with the values so that you can get all the
paths you want. If you find at some point that the code fails to run
altogether (doesn't even start) you may have exceeded the stack limit. In
linux you can set the stack limit to unlimited by running
ulimit -s unlimited.
Cheers,
Josh
On Tue, Sep 2, 2014 at 10:00 AM,
Send Ifeffit mailing list submissions to ifeffit@millenia.cars.aps.anl.gov
To subscribe or unsubscribe via the World Wide Web, visit http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit or, via email, send a message with subject or body 'help' to ifeffit-request@millenia.cars.aps.anl.gov
You can reach the person managing the list at ifeffit-owner@millenia.cars.aps.anl.gov
When replying, please edit your Subject line so it is more specific than "Re: Contents of Ifeffit digest..."
Today's Topics:
1. Re: EXAFS calculation with large RMAX and NLEG - exceeding path finder limit (Bruce Ravel)
----------------------------------------------------------------------
Message: 1 Date: Tue, 02 Sep 2014 11:36:53 -0400 From: Bruce Ravel
To: XAFS Analysis using Ifeffit Subject: Re: [Ifeffit] EXAFS calculation with large RMAX and NLEG - exceeding path finder limit Message-ID: <5405E415.4010301@bnl.gov> Content-Type: text/plain; charset=windows-1252; format=flowed 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 wrong.
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 phase.bin
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 eta 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.
B
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_an... ,
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@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
-- Bruce Ravel ------------------------------------ bravel@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/
------------------------------
_______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
End of Ifeffit Digest, Vol 139, Issue 5 ***************************************
participants (1)
-
Joshua Kas