Dear Jiayu, if I understand correctly you would like to calculate K-edge XAS at high temperature including the contribution of Fermi functions in the Fermi golden rule. If this is what you would like to do, this is currently not implemented in XSPECTRA, as we always assume the temperature to be negligible with respect to the energy of the electronic excitations (1 eV=11605 Kelvin).
In practice we assume that the XAS spectra is temperature independent, or, better, the only temperature dependence comes from the thermal expansion of the crystal structure. This is generally true except when vibrations contribute to the XAS spectra. Increasing temperature increase atomic vibrations and it is known in some case to wakly affect the spectra in the pre-edge region. However even in this case I guess that the problem can be solved without the need of introducing Fermi functions in the XAS cross section. You will find more details on the XAS equation implemented in Christos Gougoussis, Matteo Calandra, Ari P. Seitsonen, and Francesco Mauri, Phys. Rev. B 80, 075102 (2009) http://link.aps.org/doi/10.1103/PhysRevB.80.075102 Equation 1. What the fermi_level option in XSPECTRA does is simply calculating the Fermi level with a given electronic smearing. The electronic smearing is used in the case of metals to improve the sampling of the Fermi surface when a finite grid of k-points is used. In the case of a metallic system, as your case is, then XSPECTRA does not calculate the Fermi level and stops as this quantity can be simply read from the pw.x scf output that you must have run before XSPECTRA. Finally, note that to calculate the electronic structure and the cross section, any smearing available in pw.x should also work on XSPECTRA. However this is not equivalent in adding Fermi functions to the Fermi golden rule. Matteo -- * * * * Matteo Calandra, Charge de Recherche (CR1) Institut de Min?ralogie et de Physique des Milieux Condens?s de Paris Universit? Pierre et Marie Curie, tour 16, case 115 4 Place Jussieu, 75252 Paris Cedex 05 France Tel: +33-1-44 27 52 16 Fax: +33-1-44 27 37 85 http://www.impmc.jussieu.fr/~calandra
