pymatgen.io.feff.sets module

class AbstractFeffInputSet[source]

Bases: monty.json.MSONable

Abstract base class representing a set of Feff input parameters. The idea is that using a FeffInputSet, a complete set of input files (feffPOT, feffXANES, feffEXAFS, ATOMS, feff.inp)set_ can be generated in an automated fashion for any structure.

all_input()[source]

Returns all input files as a dict of {filename: feffio object}

atoms

Returns Atoms string from a structure that goes in feff.inp file.

Returns:Atoms object.
header()[source]

Returns header to be used in feff.inp file from a pymatgen structure

potential

Returns POTENTIAL section used in feff.inp from a structure.

tags

Returns standard calculation parameters.

write_input(output_dir='.', make_dir_if_not_present=True)[source]

Writes a set of FEFF input to a directory.

Parameters:
  • output_dir – Directory to output the FEFF input files
  • make_dir_if_not_present – Set to True if you want the directory ( and the whole path) to be created if it is not present.
class FEFFDictSet(absorbing_atom, structure, radius, config_dict, edge='K', spectrum='EXAFS', nkpts=1000, user_tag_settings=None)[source]

Bases: pymatgen.io.feff.sets.AbstractFeffInputSet

Standard implementation of FeffInputSet, which can be extended by specific implementations.

Parameters:
  • absorbing_atom (str/int) – absorbing atom symbol or site index
  • structure (Structure) – input structure
  • radius (float) – cluster radius
  • config_dict (dict) – control tag settings dict
  • edge (str) – absorption edge
  • spectrum (str) – type of spectrum to calculate, available options : EXAFS, XANES, DANES, XMCD, ELNES, EXELFS, FPRIME, NRIXS, XES. The default is EXAFS.
  • nkpts (int) – Total number of kpoints in the brillouin zone. Used only when feff is run in the reciprocal space mode.
  • user_tag_settings (dict) – override default tag settings. To delete tags, set the key ‘_del’ in the user_tag_settings. eg: user_tag_settings={“_del”: [“COREHOLE”, “EXCHANGE”]}
atoms

absorber + the rest

Returns:Atoms
header(source='', comment='')[source]

Creates header string from structure object

Parameters:
  • source – Source identifier used to create structure, can be defined however user wants to organize structures, calculations, etc. example would be Materials Project material ID number.
  • comment – comment to include in header
Returns:

Header

potential

FEFF potential

Returns:Potential
tags

FEFF job parameters.

Returns:Tags
class MPEELSDictSet(absorbing_atom, structure, edge, spectrum, radius, beam_energy, beam_direction, collection_angle, convergence_angle, config_dict, user_eels_settings=None, nkpts=1000, user_tag_settings=None)[source]

Bases: pymatgen.io.feff.sets.FEFFDictSet

FeffDictSet for ELNES spectroscopy.

Parameters:
  • absorbing_atom (str/int) – absorbing atom symbol or site index
  • structure (Structure) – input structure
  • edge (str) – absorption edge
  • spectrum (str) – ELNES or EXELFS
  • radius (float) – cluster radius in Angstroms.
  • beam_energy (float) – Incident beam energy in keV
  • beam_direction (list) – Incident beam direction. If None, the cross section will be averaged.
  • collection_angle (float) – Detector collection angle in mrad.
  • convergence_angle (float) – Beam convergence angle in mrad.
  • user_eels_settings (dict) – override default EELS config. See MPELNESSet.yaml for supported keys.
  • nkpts (int) – Total number of kpoints in the brillouin zone. Used only when feff is run in the reciprocal space mode.
  • user_tag_settings (dict) – override default tag settings
class MPELNESSet(absorbing_atom, structure, edge='K', radius=10.0, beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, nkpts=1000, user_tag_settings=None)[source]

Bases: pymatgen.io.feff.sets.MPEELSDictSet

FeffDictSet for ELNES spectroscopy.

Parameters:
  • absorbing_atom (str/int) – absorbing atom symbol or site index
  • structure (Structure) – input structure
  • edge (str) – absorption edge
  • radius (float) – cluster radius in Angstroms.
  • beam_energy (float) – Incident beam energy in keV
  • beam_direction (list) – Incident beam direction. If None, the cross section will be averaged.
  • collection_angle (float) – Detector collection angle in mrad.
  • convergence_angle (float) – Beam convergence angle in mrad.
  • user_eels_settings (dict) – override default EELS config. See MPELNESSet.yaml for supported keys.
  • nkpts (int) – Total number of kpoints in the brillouin zone. Used only when feff is run in the reciprocal space mode.
  • user_tag_settings (dict) – override default tag settings
CONFIG = {'CONTROL': '1 1 1 1 1 1', 'PRINT': '1 0 0 0 0 0', 'EDGE': 'K', 'COREHOLE': 'FSR', 'S02': 0.0, 'EXCHANGE': '0 0.0 0.0 2', 'SCF': '6.0 0 30 0.2 1', 'FMS': '7.5 0', 'LDOS': '-20.0 20.0 0.1', 'ELNES': {'ENERGY': '4 0.04 0.1', 'BEAM_ENERGY': '100 0 1 1', 'BEAM_DIRECTION': '0 1 0', 'ANGLES': '1 1', 'MESH': '50 1', 'POSITION': '0.0 0.0'}}
class MPEXAFSSet(absorbing_atom, structure, edge='K', radius=10.0, nkpts=1000, user_tag_settings=None)[source]

Bases: pymatgen.io.feff.sets.FEFFDictSet

FeffDictSet for EXAFS spectroscopy.

Parameters:
  • absorbing_atom (str/int) – absorbing atom symbol or site index
  • structure (Structure) – input structure
  • edge (str) – absorption edge
  • radius (float) – cluster radius in Angstroms.
  • nkpts (int) – Total number of kpoints in the brillouin zone. Used only when feff is run in the reciprocal space mode.
  • user_tag_settings (dict) – override default tag settings
CONFIG = {'CONTROL': '1 1 1 1 1 1', 'PRINT': '1 0 0 0 0 0', 'EDGE': 'K', 'COREHOLE': 'FSR', 'S02': 0.0, 'SCF': '4.5 0 30 .2 1', 'RPATH': 10, 'EXAFS': 20}
class MPEXELFSSet(absorbing_atom, structure, edge='K', radius=10.0, beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, nkpts=1000, user_tag_settings=None)[source]

Bases: pymatgen.io.feff.sets.MPEELSDictSet

FeffDictSet for EXELFS spectroscopy.

Parameters:
  • absorbing_atom (str/int) – absorbing atom symbol or site index
  • structure (Structure) – input structure
  • edge (str) – absorption edge
  • radius (float) – cluster radius in Angstroms.
  • beam_energy (float) – Incident beam energy in keV
  • beam_direction (list) – Incident beam direction. If None, the cross section will be averaged.
  • collection_angle (float) – Detector collection angle in mrad.
  • convergence_angle (float) – Beam convergence angle in mrad.
  • user_eels_settings (dict) – override default EELS config. See MPEXELFSSet.yaml for supported keys.
  • nkpts (int) – Total number of kpoints in the brillouin zone. Used only when feff is run in the reciprocal space mode.
  • user_tag_settings (dict) – override default tag settings
CONFIG = {'CONTROL': '1 1 1 1 1 1', 'PRINT': '1 0 0 0 0 0', 'EDGE': 'K', 'COREHOLE': 'FSR', 'S02': 0.0, 'EXCHANGE': '0 0.0 0.0 2', 'SCF': '5.0 0 30 0.2 1', 'RPATH': 10, 'EXELFS': {'ENERGY': 20, 'BEAM_ENERGY': '100 0 1 1', 'BEAM_DIRECTION': '0 1 0', 'ANGLES': '1 1', 'MESH': '50 1', 'POSITION': '0.0 0.0'}}
class MPXANESSet(absorbing_atom, structure, edge='K', radius=10.0, nkpts=1000, user_tag_settings=None)[source]

Bases: pymatgen.io.feff.sets.FEFFDictSet

FeffDictSet for XANES spectroscopy.

Parameters:
  • absorbing_atom (str/int) – absorbing atom symbol or site index
  • structure (Structure) – input
  • edge (str) – absorption edge
  • radius (float) – cluster radius in Angstroms.
  • nkpts (int) – Total number of kpoints in the brillouin zone. Used only when feff is run in the reciprocal space mode.
  • user_tag_settings (dict) – override default tag settings
CONFIG = {'CONTROL': '1 1 1 1 1 1', 'PRINT': '1 0 0 0 0 0', 'EDGE': 'K', 'COREHOLE': 'FSR', 'S02': 0.0, 'EXCHANGE': '0 0.0 0.0 2', 'SCF': '4.5 0 30 .2 1', 'FMS': '7.5 0', 'LDOS': '-30. 15. .1', 'XANES': '3.7 .04 .1'}