sisl.io.siesta.tshsSileSiesta
- class sisl.io.siesta.tshsSileSiesta(filename, mode='r', *args, **kwargs)
Bases:
onlysSileSiesta
Geometry, Hamiltonian and overlap matrix file
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
Query the Fermi-level contained in the file
read_geometry
([basis])Returns Geometry object from a TranSiesta file
read_hamiltonian
([geometry])Electronic structure from the siesta.TSHS file
Returns a Lattice object from a TranSiesta file
read_overlap
(**kwargs)Returns the overlap matrix from the TranSiesta file
write
(*args, **kwargs)Generic write method which should be overloaded in child-classes
write_hamiltonian
(H, **kwargs)Writes the Hamiltonian to a siesta.TSHS file
File of the current Sile
File of the current Sile
Handles all plotting possibilities for a class
The version of the file
- __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_fermi_level() float
Query the Fermi-level contained in the file
- Returns:
fermi-level of the system
- Return type:
- read_geometry(basis: Atoms | None = None)
Returns Geometry object from a TranSiesta file
- Parameters:
basis (Atoms | None)
- read_hamiltonian(geometry=None, **kwargs) Hamiltonian [source]
Electronic structure from the siesta.TSHS file
The TSHS file format does not contain exact orbital information. When reading the Hamiltonian directly using this class one will find wrong orbital information. In such cases it may be beneficial to pass the geometry argument to override the contained geometry.
The orbital order is unaltered but the atomic and orbital information will be somewhat arbitrary.
- Parameters:
geometry (Geometry, optional) – override the contained geometry in the returned Hamiltonian. Useful when reading files directly using this class.
- Return type:
Examples
Reading the Hamiltonian using the
tshsSileSiesta
backend through the fdf sile. Since the fdf file will try and read the basis sets using other files than the TSHS.>>> H = sisl.get_sile("RUN.fdf").read_hamiltonian(order="TSHS")
An equivalent, but different way would be:
>>> geom = sisl.get_sile("RUN.fdf").read_geometry() >>> H = sisl.get_sile("siesta.TSHS").read_hamiltonian(geometry=geom)
- 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.