[Wien] A question about the implementation of XSPEC

John McLeod john.mcleod at usask.ca
Tue Sep 27 00:37:02 CEST 2011


Hi Kevin,

Thanks for your advice!

I see now what you are referring to with regard to the r^3 term. In the hfsd.f part of telnes2 the comments on line 101 mention multiplying the DP and DQ arrays by a factor of r to obtain the r^2 weighted dirac spinors P and Q, while in the hfsd.f part of XSPEC at line 186 the comments mention multiplying the DP and DQ arrays by a factor of r to obtain just r weighted Dirac spinors P and Q. 

That, and the fact that the newer XSPEC code rights the core wave function to the file case.corewfx after dividing by a single factor of r lead me to believe that hfsd.f returned only an r-weighted Dirac spinor rather than an r^2-weighted spinor.

I am sure you are correct though, I thought it very strange that the XSPEC code would be missing the dipole operator in the radial part.

Thanks again,
John McLeod

On 2011-09-26, at 2:48 PM, Kevin Jorissen <kevinjorissenpdx at gmail.com> wrote:

> Hi,
> 
> I haven't looked at the paper you refer to, but from memory (I
> developed much of TELNES, which in turn was based on XSPEC) -
> 
> 1.  There's a change of basis in which the LAPW coefficients A/B/C are
> transformed to a single set of coefficients "D" for the APW basis.
> The transformation is somewhat approximate - there is some "averaging"
> over the radial coordinate r within the muffin tin sphere.  However,
> this should not be a reason for concern.  I can send more details if
> you are still worried (and they are also in some of the early TELNES
> papers ~ 1998-2000).
> 
> 2.  You'd be amazed at how some arrays are defined in the guts of the
> code, especially some of the older routines.  Look but don't touch is
> my advice.  Whenever I've thought that I found a mistake in the power
> of "r", it has turned out I was wrong because another "r" was included
> in another array and they were multiplied together later to calculate
> an integral in one of the rint routines ...  My guess is that what you
> think is a core wave function, is actually r times or r^2 the core
> wave function ... at least that's how it is in TELNES, which was built
> on top of XSPEC.
> 
> cheers,
> 
> 
> Kevin Jorissen
> University of Washington
> Seattle, WA, USA
> 
> 
> 
> 
> On Mon, Sep 26, 2011 at 1:35 PM, John McLeod <john.mcleod at usask.ca> wrote:
>> Hello all,
>> 
>> In an attempt to learn more about how the WIEN2k code works, I have started by reading through the source code for XSPEC. I have also studied the paper: A. Neckel, K. Schwarz, R. Eibler, et al. Mikrochimica Acta Supplementum, 6 (1975) 257, where the algorithm for calculating XES from an APW standpoint is discussed.
>> 
>> I have two questions about the implementation of XSPEC, I realize that the code is rather old so these questions may seem obscure.
>> 
>> 1. Does XSPEC use only the APW basis? In Neckel et al.'s paper the APW basis is used, and it seems like only the normalized regular solution to the radial relativistic Dirac equation (namely the quantities A and B) are used in SRC_txspec/txspec.f (returned by outwin.f at line 282 in txspec.f). If the LAPW basis was used to converge the SCF cycle, is any information lost by ignoring the derivatives of these solutions? Or due to the local nature of XES is it more correct to just use the APW basis?
>> 
>> 2. The radial component of the transition matrix for XES is described in equation 18 of Neckel et al.'s paper as involving an r^3 term (where r is the radial distance); i.e. An r^2 term from the volume element r^2dr and an additional r term from the dipole operator. However in SRC_txspec/txspec.f on line 305 it seems to me that the radial integral is calculated (using rint13.f) by only considering the r-weighted APW and core wave functions... this only give a total of r^2. Shouldn't one of the wave functions be multiplied by an additional factor of r before passing to rint13()?
>> 
>> In regards to my latter question, I did modify the txspec code so that the APW wave function was multiplied by an additional factor of r prior to calling rint13(). Although I only tested this code on a limited number of cases, it seems that this factor has no effect on the spectral shape (although it does modify the absolute intensity) for K-edge spectra and has a small but possibly significant effect on L3-edge spectra (usually a relative increase in the amplitude of the spectrum at lower energies).
>> 
>> Thanks,
>> John McLeod
>> _______________________________________________
>> Wien mailing list
>> Wien at zeus.theochem.tuwien.ac.at
>> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien


More information about the Wien mailing list