sisl.io.siesta.tshsSileSiesta
- class sisl.io.siesta.tshsSileSiesta(filename, mode='r', *args, **kwargs)
Bases:
onlysSileSiesta
Geometry, Hamiltonian and overlap matrix file
Methods
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
([geometry])Returns Geometry object from a TranSiesta file
read_hamiltonian
([geometry])Electronic structure from the siesta.TSHS file
read_overlap
(**kwargs)Returns the overlap matrix from the TranSiesta file
Returns a SuperCell object from a 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
The version of the file
- __init__(filename, mode='r', *args, **kwargs)
- 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()
Query the Fermi-level contained in the file
- Returns
Ef
- Return type
fermi-level of the system
- read_geometry(geometry=None)
Returns Geometry object from a TranSiesta file
- read_hamiltonian(geometry=None, **kwargs)[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.
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)
- read_overlap(**kwargs)
Returns the overlap matrix from the TranSiesta file
- read_supercell()
Returns a SuperCell object from a TranSiesta file
- to_json()
- 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.