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__(self, filename[, mode, comment])

Initialize self.

dir_file(self[, filename])

File of the current Sile

exist(self)

Query whether the file exists

read(self, \*args, \*\*kwargs)

Generic read method which should be overloaded in child-classes

read_geometry(self, \*args, \*\*kwargs)

Reads a Geometry and creates the Wannier90 cell

read_hamiltonian(self, \*args, \*\*kwargs)

Read the electronic structure of the Wannier90 output

read_supercell(self)

Reads a SuperCell and creates the Wannier90 cell

write(self, \*args, \*\*kwargs)

Generic write method which should be overloaded in child-classes

write_geometry(self, geom[, fmt])

Writes the geometry to the contained file

write_supercell(self, sc[, fmt])

Writes the supercell to the contained file

property base_file

File of the current Sile

dir_file(self, filename=None)

File of the current Sile

exist(self)

Query whether the file exists

property file

File of the current Sile

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

Reads a Geometry and creates the Wannier90 cell

read_hamiltonian(self, *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(self)[source]

Reads a SuperCell and creates the Wannier90 cell

write(self, *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(self, geom, fmt='.8f', *args, **kwargs)[source]

Writes the geometry to the contained file

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

Writes the supercell to the contained file