*** 2007 Update ***

FPX: a package for the ab initio calculation of X-ray absorption near edge structure (XANES) using the non-muffin-tin (non-MT) multiple-scattered-wave (MSW) method.

by David L Foulis


This web page has been unfortunately in Limbo since I left the ESRF in 2003. Although I visit my SciSoft colleagues here occasionally and have been intending to finalise the page for some while, I have had little time to consider it and have also been in something of a quandary about how to bring it into a useful form. Recently, with a renewed interest in the whole non-muffin-tin multiple-scattering problem, it has become clearer what might be a useful approach; and this, together with the fact that even in its unfinished state it has provoked some interesting feedback, encourages me to finish it off. More importantly, the muffin-tin (MT) approximation remains a major problem in ab initio calculations of XANES, at least for open, covalently bonded systems, and there is still, to my mind at least, no globally effective, generally available way of dealing with it, despite some recent advances. Thus the idea occurred to me to dig out the old FPX codes, that I had developed with colleagues, and which were languishing unused on backup media, to make them generally available, with a bit of background information and some careful caveats. While it was only loosely related to my original mission at the ESRF, it appeared not to be a time consuming task and was in keeping with the service ethic of the SciSoft group.

The original idea was to take the codes as they were developed under VMS, on VAX and Alpha machines, adapt them to the Linux environment (which has become a de facto standard in research) and the g77 compiler (mainly a question of finding the appropriate compiler switches), write some shell scripts to facilitate their compilation and running, tidy up the documentation, provide a few examples/file templates, and bundle them up. They had last been used "in anger" in 1997, and I had no real intention of using them further (except perhaps to complete some minor fragments of work that were never published), so there appeared to me no reason why they should not be made available for others to use. Indeed there were several reasons why it might be a useful idea to produce, in effect, a "canonical", reference version of the codes, not least for my collaborators who took part in the original work, but also possibly as a resource for other colleagues who are still working on the non-MT problem (as has actually been the case with, for example, the potential-multipole generating routines).

After porting them to Linux on the ESRF's Amber cluster I very quickly realised, however, that this would not be straightforward. Apart from the purely technical issues of porting codes (themselves far from Fortran 77 standard, developed under VMS with its very user-indulgent native Fortran compiler - and excellent debugger) to the g77 compiler, there were other issues. In fact I had forgotten just how awkward they are to use. Being experimental programs in origin, it was necessary that one be able to modify any parameter anywhere in the calculation to investigate their effects; consequently a considerable amount of manual editing of data files passing between programs is required. I had begun to make a lot of this more systematic (formats, file naming etc) with a view to automating it as much as possible, and the (still incomplete) documentation became quite "arcane" as a result. The fact that this was never carried through completely didn't matter much when it was just myself running the programs, since the throughput was never high enough to require automation. (For example, the Cl2 calculations mentioned below took more than a week on our MicroVAX cluster in 1993. On a typical PC running Linux today, the computational part would take a few hours, so that the bottleneck would be the human data-file manipulations!) With all this in mind, offering them to be used in their present state to a larger public risked causing a lot of frustration and wasted time.

Nevertheless, the FPX codes have been a useful pathfinder in the field of non-MT MSW calculations for molecules and clusters, and have had an important place in the development of our understanding of the problem (at least in the context of X-ray absorption fine-structure (XAFS) spectroscopy) and how to deal with it. In the most favourable cases they have produced impressive agreement with experiment, which results still (I am told) provide a benchmark for current efforts in this field. More importantly perhaps, they have lead to a clearer view of the relative importance of elements in the heirarchy of approximations used for XAFS calculations. In principle they should be still usable for a limited range of systems, but the effort required to bring them into user-friendly form would be better expended on the development and implementation of improved approaches to the whole non-MT problem (as I shall describe later on).

With the foregoing comments in mind, it appears to me therefore, that the most useful role for this page would be to provide information (and perhaps some solace!) to users confronted with muffin-tin related problems in their XANES (or even extended X-ray absorption fine-structure (EXAFS)) calculations. So, on the back of an overview of the FPX codes and their development, I propose to provide a brief technical account of some of the physical aspects of the MT problem and related issues, within the context of XAFS calculations. In this way I hope to promote a greater awareness of the MT problem in XANES (and EXAFS) calculations, perhaps provoke some discussion, and maybe raise a few voices for the development of more effective computational tools in this field. Incidentally it provides a vehicle for various observations about the problem that do not find their way into the published literature. It is also a nice way to highlight the contributions, comments and influence of other people that deserve to mentioned.

Before proceeding let me say what this page is not:

  • It is not a literature review of non-MT methods. I have included references to all articles of my colleagues and myself related to the FPX codes, with passing mention of their significance; but only a few key external references are mentioned. A full review of the field would indeed be useful, but too time consuming for the moment. The interested reader may, without too much difficulty, find a way into the current literature via the mentioned articles.
  • While I mention the work of others, in the hope that the potential user may find something useful with which to treat systems of interest, it is not my intention here to attempt an evaluation of their methods or results. Although I give enough information to help the interested user track down their work (via a search engine or otherwise), I have avoided, for the moment (in the absence of their explicit permission), giving direct links to their Web pages.
  • This page represents, of course, my own experience, knowledge and opinions in the field. I am not particularly inviting controversy (although controversy is often the uninvited - and sometimes most interesting - guest in any scientific discussion). Among workers in the field (few in number as we are) there would be, I guess, general agreement about the broad outline of what I say here, if some differences of emphasis in relation to certain relatively minor areas, as I shall try to indicate. There is, I think, a general awareness in the wider "XAFS community" that the MT approximation is "bad", but somewhat less awareness of where and to what extent this "badness" has an effect; although, at the same time, there is a steadily inceasing demand on the part of experimentalists for more sophisticated and accurate methods of theoretical analysis, particularly as computer codes. In the face of this there is still, to my mind, too little concerted effort to develop such codes, especially given the volume of high-quality experimental data coming out of major experimental facilities.

If contacted, I am happy to correct matters of fact in this text, I will consider carefully matters of opinion, and I welcome hearing about other work in this field.


Those not interested in the gory technical or historical details may well prefer to skip them, as I shall gather the main points in a separate section. I hope nevertheless that what is said here will be useful, or at least of interest, to XANES physicists. For those who are not part of this happy band, but use XAFS spectroscopy at some level, it is advisable that they be at least aware that the MT problem leads to serious limitations in the analysis of such spectra.


The FPX package is a collection of codes for the ab initio calculation of XANES for molecules and clusters, which implements the non-muffin-tin MSW theory of Natoli, Benfatto and Doniach (1986). It is a rebuild, and port to Linux/Unix, of a group of experimental codes developed from the late 1980s to the mid 1990s, in collaboration with Rino Natoli, Robert Pettifer and Maurizio Benfatto.

In the (hopefully temporary) absence of an easily usable version of the codes, the purpose of this web page is to highlight the problem of the muffin-tin approximation in relation to multiple-scattering calculations of XANES, by means of an overview of the development history of the FPX package with at least passing mention of the main aspects of calculations for this difficult spectral region. In the mean time anyone is welcome to peruse the codes as they currently stand (this may, realistically, interest only those working themselves on the muffin-tin problem), as well as other material below. In this way it is hoped that a potential user might obtain a useful perspective on some issues involved in XAFS calculations for the near-edge. For those with immediate practical calculational needs in relation to XANES it is intended first to flag the possibility of muffin-tin related problems, and then to suggest alternative methods of calculation that might be able to work around them.


The MSW method derives from the work of J C Slater and K H Johnson (see, e.g., Slater and Johnson (1972)) from the mid to late 1960s onwards, who adapted the KKR method, well known from solid-state theory, to bound-state calculations for molecules and clusters. Codes implementing the method were written by Smith and Johnson (1969). (An overview of all this work, with further references and a brief exposition of the method, is given by Johnson (1973).) Over the years several variants and extensions of the method have appeared - most interestingly (at least for me) a relativistic extension due to Yang and Rabii (1975) (see also Yang (1978)), although it is not part of our present approach, since we are typically interested in systems containing atoms no heavier than first or second row transition metals. The method was soon extended to continuum states by Dill and Dehmer (1974) with application to electron-molecule scattering and molecular photoionization. The application to XANES was carried out by C R ("Rino") Natoli and co-workers (see Natoli et al (1980)), and it is from this work, and later theoretical developments, that our current approach was developed.

The theoretical methods used in the foregoing rely on the muffin-tin approximation for the electron-molecule potential to make them tractable. Here space is partitioned into disjoint atomic spheres centred on the nuclear positions, and a remaining interstitial region. In the atomic spheres the potential is spherically symmetric, so that the scattering T-matrix is diagonal (and expressible in terms of phase-shifts, as is well known) and thus readily calculated by standard methods. In the interstitial region the potential is taken to be constant, so that the electron propagates freely between scattering centres. In the case of a molecule or cluster an outer sphere is sometimes used, which contains all the atomic spheres and whose potential in the external region is spherically symmetric about some chosen molecular centre, and for which the scattering is treated in a similar way to the atomic spheres. (This allows the boundary conditions at infinity to be imposed directly via the integrations of the radial Schrödinger equations, useful in the case of, say, a long-range Coulomb potential.)

As an approximation in electronic structure calculations the muffin-tin appears to have been first introduced by J C Slater in the 1930s, in the context of the augmented plane-wave method, but has, of course, been used much more generally since then. The fact that it limits the quality of the results has been well appreciated whatever field has made use of the approximation, although the magnitude of typical errors has not always been clear.

The field of calculations for XAFS spectroscopy has inherited a variety of computational approaches from electronic structure theory, particularly, of course, multiple-scattering methods, which rely on the MT approximation. Several other major approximations are used for XAFS, notably (and particularly for EXAFS) the generation of potentials from the superposition of (spherical) electron densities of free atoms. It is consequently sometimes difficult to distinguish between their effects. A detailed appreciation of the effects of the MT approximation is therefore a more recent development for XAFS than might perhaps be expected.

Concurrently with the development of multiple-scattering methods in general there have been many investigations of ways to avoid this approximation, as well as a variety of proposed schemes of greater or lesser complexity. It is a measure of the difficulty of the problem that only in the last decade or so have we seen implementations of some of these schemes that can be considered moderately successful. One of the reasons why so much effort has been made to develop usable non-MT multiple-scattering methods is that few, if any, of the alternatives have all of the desirable features of MSW methods: notably (but not exhaustively);

  1. They are real space methods;
  2. They do not rely on basis-sets;
  3. The main physical quantities are expanded in rapidly converging partial-wave expansions;
  4. Atomic cores are treated accurately;
  5. Bound and continuum states may be treated within the same framework.
  6. (In the original (MT based) MSW/KKR methods there was a separation of geometric and dynamical terms in the secular matrix. In some non-MT extensions this separation has been lost or become blurred, although some workers claim that their approach retains it.)
  7. (More vague perhaps ...) The multiple-scattering approach to the solution of Schrödinger's equation is very satisfying from the point of view of physical intuition.

My own impression of the state of the non-MT multiple-scattering art, however, is that further progress is required on both the theoretical and numerical implementation fronts, before we have a completely satisfactory situation. In the absence of such a situation, those requiring computational methods which take into account more realistic potentials tend increasingly to rely on other, non-scattering techniques, with, in general, their own limitations.


One interesting general approach to the non-MT multiple-scattering problem, within the context of solid-state systems, was pioneered by Williams and Morgan (1974) who extended the KKR method by generalising the atomic spheres to space-filling polyhedral cells, eliminating the interstitial region altogether. This "cellular" (or "space-filling") method and several variants (including relativistic) or related schemes, have been developed by a number of workers (including R G Brown and M Ciftan; E Badralexe and A J Freeman; R Zeller, A Gonis, J S Faulkner, W H Butler and co-workers; R K Nesbet; I I Gegusin; and R G Newton) with some computational implementations. Although mainly applied to the calculation of band structures of periodic systems, there have been applications to photoemission from solids (M Grass, J Braun, G Borstel and others). A variant of the method for isolated clusters or molecules was proposed by Brown (1988) but does not appear to have been developed further or implemented as computer codes.

For molecules and clusters, a particularly clear extension of the MSW method was developed by Natoli, Benfatto and Doniach (1986). It retains the partition of space into disjoint atomic spheres with, optionally, an outer (or molecular) sphere enclosing all the atomic spheres. In the atomic spheres the potential is represented by a multipole expansion and the atomic T-matrices are generalized to have off-diagonal elements, resulting from the mixing of l-values in the radial Schrödinger equations. The effect of the (relatively) slowly varying interstitial potential is included via a Lippmann-Schwinger equation for the interstitial region, and leads to an extra term added on to the MSW secular matrix - in effect a T-matrix for the interstitial region. When an outer sphere is used, the potential in the extra-molecular region is expanded in multipoles and its effect on the multiple scattering is treated similarly to an atomic sphere.

The FPX codes implement directly the method of Natoli, Benfatto and Doniach (1986) apart from in the interstitial region where, instead of solving its Lippmann-Schwinger equation, we use the first Born approximation. The accuracy of this latter approximation is improved by resetting the energy zero to the average of the potential over the interstitial region. The coupled radial Schrödinger equations are solved by matrix integration from suitable boundary conditions at the atomic-sphere centres (or at infinity for the extra-molecular region in the case of an outer sphere). As in the earlier MT programs the FPX codes make use of molecular point symmetry to reduce the size of the secular matrix. In the context of the non-MT MSW method this required some additional theoretical work (which has remained unpublished). It adds, however, an extra layer of complexity to an already complicated implementation.



Reiterating the general observation that modelling XANES with ab initio calculations is a much more difficult problem than for EXAFS, for a variety of reasons, the most serious being the MT approximation, we summarize now several of the issues involved (and which hopefully have been brought out in the above text):
Firstly there are characteristics of a system that predispose it to a poor representation by the MT approximation, notably having

  1. an open structure (low coordination numbers / large fraction of empty space in the structure);
  2. covalent bonding (particularly multiple bonds which tend to hold atoms closer together); and
  3. (to a lesser extent) adjacent light and heavy atoms.


Although it is difficult to identify general tendancies in the errors that occur as a result of the MT approximation in calculated XAFS spectra, there are several observations to be made. Intuitively one may expect a priori that there will be problems when the kinetic energy of the excited photoelectron, travelling across the interstitial region, is of a similar order of magnitude to the typical errors of the potential approximation in that region, pointing to an energy scale of tens of electron volts, i.e. typical of XANES energies. Indeed the same would also apply when considering the errors introduced by using a potential derived from overlapped free-atom electron densities rather than full SCF densities. The typical errors here only become apparent when one has access to SCF-based potentials, although in our experience they appear to be comparable to those due to the MT approximation. One particularity of the MT approximation that does seem to provoke identifiable consequences is the appearance of discontinuities in potential at the atomic-sphere sphere surfaces, which give rise to spurious oscillations in the spectra.

Empirically it seems to be frequently the case that, in the continuum especially, MT-based calculations are rather featureless, and that including non-MT corrections sometimes reveals more structure in the spectrum. Quite often also the MT results seem relatively unchanging when one varies physical parameters in the system. I suspect that this occasionally leads to unwarranted confidence in the MT results, taking for reliability of result what is actually an incapacity of the MT approximation to reflect any subtlety in the real system, stemming from the tendancy of the approximation to neutralise variation and wash out spectral structure.

The FPX codes implement the non-MT MSW method of Natoli, Benfatto and Doniach (1986) for the calculation of XANES in clusters and molecules of arbitrary geometry. They were the first of their kind and served to provide a clearer view of the nature of the MT problem in XAFS as well as a way to solve the problem. In combination with an external SCF program they have been used to show that the bulk of errors in ab initio XANES calculations may be removed by using a non-MT multiple-scattering approach together with potentials derived from SCF electron densities. As a consequence of of detailed investigations it appears now that the hierarchy of approximations in MSW XANES calculations for molecules and clusters is (from most serious downwards):

  1. MT approximation (comparable but slightly larger than the following)
  2. SCF densities (by which time most of the error is accounted for)
  3. exchange potential, etc.

FPX: The Codes

When I arrived at the ESRF in 2002 I gave a talk at one of our SciSoft coffee meetings (17/4/2002) reviewing the FPX codes and the general methodology. This was basically cobbled together as a MS Powerpoint presentation from old slides and posters (mainly from conference material). It will serve to illustrate several of the points mentioned in passing above. I have interleaved some more text into the presentation so that it is more self explanatory and the result may be found here. Because of interest expressed by several people I also gave a brief demonstration of the use of the codes a few days later (24/4/2002). (I thank again those who came along to these meetings.) It was this latter event that caused me to reflect on the practicalities of using the codes and led to the view I have expressed in the Foreword.

As mentioned above the codes are available for perusal by those interested in the methods and implementation details:
A snapshot of the current directory tree may be found at fpx-1.0-0.tar.gz
(Dated: 5 April 2002 - Completed port of skeleton of main codes to Linux environment.
This constitutes version 1.0 (revision level 0)).

Bearing in mind what I say below about the best way to proceed with the non-MT MSW problem, it would appear counterproductive to invest much effort in maintaining and upgrading the codes in their current form. Having said that, however, there are some novel and valuable parts of the code which may be retained or rewritten to be used in some future, as yet undefined, "FPX 2". Moreover it will probably be useful to have a working reference version of FPX for comparison, so that a cut-down "toy system" may be worth making available for a limited range of systems. If I find some time I shall investigate what can be done in this direction.

Future Directions

By the mid-1990s several things had become clear in relation to the future of the FPX codes and the general computational approach underlying them. Firstly, although quite a lot of the code was newly written, it still followed loosely the overall coding approach of the older MT programs and was thus tied in to various practices that led to the codes becoming more and more difficult to maintain and upgrade. Secondly, and more importantly, results from the FPX codes have shown clearly what is necessary for ab initio calculations of XANES (or at least the most important ingredients; i.e. a non-MT multiple-scattering treatment, SCF electron densities, and a better treatment of exchange). In the light of this the required developments of the codes become quite formidable. To try to upgrade FPX directly therefore seemed rather to be inviting disaster.

Thus I am inclined to think that the best programming approach would be to rewrite everything from scratch, taking advantage of the enormous developments in computing that have taken place since the 1970s (which is effectively the era of the computational practice of the MSW codes), and keeping with the best modern practice. Whether new codes would be written in Fortran 77, 90 etc, or C/C++ (or all of them) they should be constructed in a modular, flexible form and possibly even capable of being interfaced with other computational packages.

Also at that time I was of the opinion that the best theoretical approach would still be essentially that of the original Natoli, Benfatto and Doniach (1986) paper, as implemented in the FPX codes (with many improvements deriving from our experience of using them); except for the interstitial region where the method of Wästberg (1994) would be used. There are one or two outstanding numerical analysis issues that need to be dealt with for this approach to be practicable - notably finding a more suitable general method for the interstitial region integration grid - but none of them seem particularly difficult.

Having seen (at least from the sidelines) the efforts of colleagues to implement a version of the cellular MSW method for clusters, I consider the approach to be probably a viable one, but harbour considerable doubts about its practicality in the cluster or molecular context. I understand that for periodic systems it has attracted some attention (although I am told by people involved in calculations for magnetic solids, for example, that it has not been widely taken up as the method of choice (?)). For many periodic systems I can imagine that the polyhedral volume associated with a given atom does not stray too far from being very roughly spherical. (I gather that this fact is used to advantage in the variant of the method implemented by H Ebert (Ludwig-Maximilians-University, Munich) who represents the non-sphericity of these volumes by spherical harmonic expansions.) For finite systems I suspect the issue becomes more problematic as it is easily possible to have systems (planar molecules for example) with resulting polyhedral atomic volumes of quite exotic shapes and quite likely problems with convergence of the partial-wave expansions in the multiple-scattering calculations. Nevertheless this approach should be kept in mind at least for a subset of molecular systems.

Most recently an alternative approach has presented itself. Inspired by some preliminary ideas about the solution of Schrödinger's equation in the interstitial region that occurred to me in the early 1990s, recent results, including a form for the partial-wave expansions of the Green function for a general potential (Foulis (2004)) and some new re-expansion formulae, have led to a new treatment of the multiple-scattering problem. Intended for submission shortly (Foulis (2007)) this approach avoids any volume integration for the interstitial region, relying on solutions of coupled radial Schrödinger equations and integrals over atomic-sphere surfaces (with the possibility that further developments may make even these last unnecessary)

Whichever approach may be the most practicable I am convinced of the fact that it is worth persevering with a "pure" multiple-scattering approach to non-muffin-tin XAFS calculations, and that experience with the FPX codes and methods, as well as similar approaches and more recent theoretical developments, put us in a good position to develop some effective computational tools for such problems. Despite the fact that some alternative non-MSW methods have been used in recent years with some success, and will likely continue to have a useful place in this field, I am inclined to suspect that the best approach in the long term will be some version of the non-MT MSW approach, at least for the XANES region and clusters of moderate size.




This initial effort has turned out much more long winded than I originally intended, but it serves to bring out most of the essential aspects of the non-MT MSW problem. I have deliberately maintained an informal style to try to convey a feel for the problem, rather than descend into lurid technical detail. I have also tried to indicate, by reference to conferences etc, how our work has fitted into the general progress of ab initio XAFS calculations.

I am hopeful that this page might prove at least a useful minor resource for non-MT XAFS calculations. With a little feedback it might become clearer how to improve it. It has been interesting for me to put the FPX story together in one text for the first time, although I recognize that it may not be of interest to every reader; and, on further reflection (prompted by comments from my colleagues), I have shunted the some of the auxiliary and more anecdotal material to subsidiary pages to avoid too large a volume of text on the main page.

Last updated on 18 June, 2007 (Version 1.0)
Queries and comments to (David Foulis)