This module defines classes for parsing the FEFF output files.

Currently supports the xmu.dat, ldos.dat output files are for non-spin case.

class Eels(data)[source]

Bases: MSONable

Parse’eels.dat’ file.


() (data) – Eels data.


Returns dict representations of Xmu object

property atomic_background[source]

atomic background.



property energies[source]

Returns the energies in eV.

property fine_structure[source]

Fine structure of EELS.



static from_file(eels_dat_file='eels.dat')[source]

Parse eels spectrum.


eels_dat_file (str) – filename and path for eels.dat


Eels object

property total_spectrum[source]

Returns the total eels spectrum.

class LDos(complete_dos, charge_transfer)[source]

Bases: MSONable

Parser for ldos files ldos01, ldos02, …..

  • complete_dos (CompleteDos) – complete dos object

  • charge_transfer (dict) – computed charge transfer between atoms dictionary

static charge_transfer_from_file(feff_inp_file, ldos_file)[source]

Get charge transfer from file.

  • feff_inp_file (str) – name of feff.inp file for run

  • ldos_file (str) – ldos filename for run, assume consecutive order, i.e., ldos01.dat, ldos02.dat….


dictionary of dictionaries in order of potential sites ({“p”: 0.154, “s”: 0.078, “d”: 0.0, “tot”: 0.232}, …)


Returns charge transfer as string

static from_file(feff_inp_file='feff.inp', ldos_file='ldos')[source]

Creates LDos object from raw Feff ldos files by by assuming they are numbered consecutively, i.e. ldos01.dat ldos02.dat…

  • feff_inp_file (str) – input file of run to obtain structure

  • ldos_file (str) – output ldos file of run to obtain dos info, etc.

class Xmu(header, parameters, absorbing_atom, data)[source]

Bases: MSONable

Parser for data in ‘xmu.dat’ file. The file ‘xmu.dat’ contains XANES, EXAFS or NRIXS data depending on the situation; \mu, \mu_0, and \chi = \chi * \mu_0/ \mu_0/(edge+50eV) as functions of absolute energy E, relative energy E - E_f and wave number k.

Default attributes:

xmu: Photon absorption cross section of absorbing atom in material Energies: Energies of data point relative_energies: E - E_fermi wavenumber: k=\sqrt(E -E_fermi) mu: The total absorption cross-section. mu0: The embedded atomic background absorption. chi: fine structure. Edge: Aborption Edge Absorbing atom: Species of absorbing atom Material: Formula of material Source: Source of structure Calculation: Type of Feff calculation performed

  • header – Header object

  • parameters – Tags object

  • absorbing_atom (str/int) – absorbing atom symbol or index

  • data (numpy.ndarray, Nx6) – cross_sections


Returns dict representations of Xmu object

property calc[source]

Returns type of Feff calculation, XANES or EXAFS

property chi[source]

Returns the normalized fine structure.

property e_fermi[source]

Returns the fermi level in eV.

property edge[source]

Returns excitation edge.

property energies[source]

Returns the absolute energies in eV.

static from_file(xmu_dat_file='xmu.dat', feff_inp_file='feff.inp')[source]

Get Xmu from file.

  • xmu_dat_file (str) – filename and path for xmu.dat

  • feff_inp_file (str) – filename and path of feff.inp input file


Xmu object

property material_formula[source]

Returns chemical formula of material from feff.inp file

property mu[source]

Returns the total absorption cross-section.

property mu0[source]

Returns the embedded atomic background absorption.

property relative_energies[source]

Returns energy with respect to the fermi level. E - E_f

property source[source]

Returns source identification from Header file

property wavenumber[source]

Returns The wave number in units of \AA^-1. k=\sqrt(E - E_f) where E is the energy and E_f is the Fermi level computed from electron gas theory at the average interstitial charge density.