winSileWannier90

class sisl.io.wannier90.winSileWannier90(filename, mode='r', comment=None, *args, **kwargs)[source]

Wannier seedname input file object

This Sile enables easy interaction with the Wannier90 code.

A seedname is the basis of reading all Wannier90 output because every file in Wannier90 is based of the name of the seed.

Hence, if the correct flags are present in the seedname.win file, and the corresponding files are created, then the corresponding quantity may be read.

For instance to read the Wannier-centres you must have this in your seedname.win:

write_xyz = true translate_home_cell = False

while if you want to read the Wannier Hamiltonian you should have this:

write_xyz = true plot_hr = true translate_home_cell = False

Examples

>>> wan90 = get_sile('seedname.win') 
>>> H = wan90.read_hamiltonian() 
>>> H = wan90.read_hamiltonian(dtype=numpy.float64) 
>>> H = wan90.read_hamiltonian(cutoff=0.00001) 

Attributes

base_file File of the current Sile
file File of the current Sile

Methods

__init__(filename[, mode, comment]) Initialize self.
dir_file([filename]) File of the current Sile
exist() Query whether the file exists
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_geometry(*args, **kwargs) Reads a Geometry and creates the Wannier90 cell
read_hamiltonian(*args, **kwargs) Read the electronic structure of the Wannier90 output
read_supercell() Reads a SuperCell and creates the Wannier90 cell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_geometry(geom[, fmt]) Writes the geometry to the contained file
write_supercell(sc[, fmt]) Writes the supercel to the contained file
base_file

File of the current Sile

dir_file(filename=None)

File of the current Sile

exist()

Query whether the file exists

file

File of the current Sile

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_geometry(*args, **kwargs)[source]

Reads a Geometry and creates the Wannier90 cell

read_hamiltonian(*args, **kwargs)[source]

Read the electronic structure of the Wannier90 output

Parameters:
cutoff: float, optional

the cutoff value for the zero Hamiltonian elements, default to 0.00001 eV.

read_supercell()[source]

Reads a SuperCell and creates the Wannier90 cell

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.

write_geometry(geom, fmt='.8f', *args, **kwargs)[source]

Writes the geometry to the contained file

write_supercell(sc, fmt='.8f', *args, **kwargs)[source]

Writes the supercel to the contained file