pymatgen.io.feff.inputs module¶
-
class
Atoms(struct, absorbing_atom, radius)[source]¶ Bases:
monty.json.MSONableAtomic cluster centered around the absorbing atom.
Parameters: - struct (Structure) – input structure
- absorbing_atom (str/int) – Symbol for absorbing atom or site index
- radius (float) – radius of the atom cluster in Angstroms.
-
static
atoms_string_from_file(filename)[source]¶ Reads atomic shells from file such as feff.inp or ATOMS file The lines are arranged as follows:
x y z ipot Atom Symbol Distance Number
with distance being the shell radius and ipot an integer identifying the potential used.
Parameters: filename – File name containing atomic coord data. Returns: Atoms string.
-
cluster¶ Returns the atomic cluster as a Molecule object.
-
static
cluster_from_file(filename)[source]¶ Parse the feff input file and return the atomic cluster as a Molecule object.
Parameters: filename (str) – path the feff input file Returns: - the atomic cluster as Molecule object. The absorbing atom
- is the one at the origin.
Return type: Molecule
-
exception
FeffParserError(msg)[source]¶ Bases:
ExceptionException class for Structure. Raised when the structure has problems, e.g., atoms that are too close.
-
class
Header(struct, source='', comment='')[source]¶ Bases:
monty.json.MSONableCreates Header for the FEFF input file.
Has the following format:
* This feff.inp file generated by pymatgen, www.materialsproject.org TITLE comment: TITLE Source: CoO19128.cif TITLE Structure Summary: (Co2 O2) TITLE Reduced formula: CoO TITLE space group: P1, space number: 1 TITLE abc: 3.297078 3.297078 5.254213 TITLE angles: 90.0 90.0 120.0 TITLE sites: 4 * 1 Co 0.666666 0.333332 0.496324 * 2 Co 0.333333 0.666667 0.996324 * 3 O 0.666666 0.333332 0.878676 * 4 O 0.333333 0.666667 0.378675
Parameters: - struct – Structure object, See pymatgen.core.structure.Structure.
- source – User supplied identifier, i.e. for Materials Project this would be the material ID number
- comment – Comment for first header line
-
formula¶ Formula of structure
-
static
from_cif_file(cif_file, source='', comment='')[source]¶ Static method to create Header object from cif_file
Parameters: - cif_file – cif_file path and name
- source – User supplied identifier, i.e. for Materials Project this would be the material ID number
- comment – User comment that goes in header
Returns: Header Object
-
static
from_string(header_str)[source]¶ Reads Header string and returns Header object if header was generated by pymatgen. Note: Checks to see if generated by pymatgen, if not it is impossible
to generate structure object so it is not possible to generate header object and routine endsParameters: header_str – pymatgen generated feff.inp header Returns: Structure object.
-
static
header_string_from_file(filename='feff.inp')[source]¶ Reads Header string from either a HEADER file or feff.inp file Will also read a header from a non-pymatgen generated feff.inp file
Parameters: filename – File name containing the Header data. Returns: Reads header string.
-
structure_symmetry¶ Returns space number and space group
Returns: Space number and space group list
-
class
Paths(atoms, paths, degeneracies=None)[source]¶ Bases:
monty.json.MSONableSet FEFF scattering paths(‘paths.dat’ file used by the ‘genfmt’ module).
Parameters: - atoms (Atoms) – Atoms object
- paths (list(list)) – list of paths. Each path is a list of atom indices in the atomic cluster(the molecular cluster created by Atoms class). e.g. [[0, 1, 2], [5, 9, 4, 1]] -> 2 paths: one with 3 legs and the other with 4 legs.
- degeneracies (list) – list of degeneracies, one for each path. Set to 1 if not specified.
-
class
Potential(struct, absorbing_atom)[source]¶ Bases:
monty.json.MSONableFEFF atomic potential.
Parameters: - struct (Structure) – Structure object.
- absorbing_atom (str/int) – Absorbing atom symbol or site index
-
static
pot_dict_from_string(pot_data)[source]¶ Creates atomic symbol/potential number dictionary forward and reverse
- Arg:
- pot_data: potential data in string format
Returns: forward and reverse atom symbol and potential number dictionaries.
-
class
Tags(params=None)[source]¶ Bases:
dictFEFF control parameters.
Parameters: params – A set of input parameters as a dictionary. -
diff(other)[source]¶ Diff function. Compares two PARAMETER files and indicates which parameters are the same and which are not. Useful for checking whether two runs were done using the same parameters.
Parameters: other – The other PARAMETER dictionary to compare to. Returns: parameters_that_are_the_same, “Different”: parameters_that_are_different} Note that the parameters are return as full dictionaries of values. Return type: Dict of the format {“Same”
-
static
from_dict(d)[source]¶ Creates Tags object from a dictionary.
Parameters: d – Dict of feff parameters and values. Returns: Tags object
-
static
from_file(filename='feff.inp')[source]¶ Creates a Feff_tag dictionary from a PARAMETER or feff.inp file.
Parameters: filename – Filename for either PARAMETER or feff.inp file Returns: Feff_tag object
-
get_string(sort_keys=False, pretty=False)[source]¶ Returns a string representation of the Tags. The reason why this method is different from the __str__ method is to provide options for pretty printing.
Parameters: - sort_keys – Set to True to sort the Feff parameters alphabetically. Defaults to False.
- pretty – Set to True for pretty aligned output. Defaults to False.
Returns: String representation of Tags.
-