sisl.io.siesta.wfsxSileSiesta
- class sisl.io.siesta.wfsxSileSiesta(filename, mode='r', *args, **kwargs)
Bases:
SileBinSiesta
Binary WFSX file reader for Siesta
The WFSX file assumes that users initialize the object with a parent argument (or one of the other geometry related objects as shown below).
The parent argument is necessary to convert WFSX k-points from 1/Ang to reduced coordinates. When returning EigenstateElectron objects the parent of these objects are the equivalent of the parent argument upon initialization. Therefore please remember to pass a correct parent.
- Parameters:
Methods
base_directory
([relative_to])Retrieve the base directory of the file, relative to the path relative_to
dir_file
([filename, filename_base])File of the current Sile
read
(*args, **kwargs)Generic read method which should be overloaded in child-classes
Reads the basis contained in the WFSX file.
Read the brillouin zone object
read_eigenstate
([k, spin, ktol])Reads a specific eigenstate from the file.
Reads the information for all the k points contained in the file
Reads the sizes related to this WFSX file
write
(*args, **kwargs)Generic write method which should be overloaded in child-classes
Iterates over the states in the WFSX file
File of the current Sile
File of the current Sile
- __init__(filename, mode='r', *args, **kwargs)
Just to pass away the args and kwargs
- base_directory(relative_to='.')
Retrieve the base directory of the file, relative to the path relative_to
- property base_file
File of the current Sile
- dir_file(filename=None, filename_base='')
File of the current Sile
- property file
File of the current Sile
- plot
Handles all plotting possibilities for a class
- read(*args, **kwargs)
Generic read method which should be overloaded in child-classes
- Parameters:
kwargs – keyword arguments will try and search for the attribute
read_<>
and call it with the remaining**kwargs
as arguments.
- read_basis()[source]
Reads the basis contained in the WFSX file.
The WFSX file only contains information about the atom labels, which atom each orbital belongs to and the orbital quantum numbers. It is thus not complete in every sense.
- Returns:
the basis read.
- Return type:
- read_eigenstate(k=(0, 0, 0), spin=0, ktol=0.0001)[source]
Reads a specific eigenstate from the file.
This method iterates over the states until it finds a match. Do not call this method repeatedly. If you want to loop eigenstates, use
yield_eigenstate
.- Parameters:
k (array-like of shape (3,), optional) – The k point of the state you want to find.
spin (integer, optional) – The spin index of the state you want to find. Only meaningful for polarized calculations.
ktol (float, optional) – The threshold value for considering two k-points the same (i.e. to match the query k point with the states k point).
See also
- Returns:
If found, the state that was queried. If not found, returns None. NOTE this may change to an exception in the future
- Return type:
EigenstateElectron or None
- read_info()[source]
Reads the information for all the k points contained in the file
- Returns:
k (array of shape (nk, 3)) – k values of the k points contained in the file.
weight (array of shape (nk,)) – weight of each k point
nwf (array of shape (nspin, nk)) – number of wavefunctions that each kpoint(-spin) contains.
- read_sizes()[source]
Reads the sizes related to this WFSX file
- Returns:
int (number of spin components)
int (number of orbitals in the unit-cell)
int (number of k-points)
bool (True if the file only contains the Gamma-point)
- write(*args, **kwargs)
Generic write method which should be overloaded in child-classes
- Parameters:
**kwargs – keyword arguments will try and search for the attribute write_ and call it with the remaining
**kwargs
as arguments.