winSileWannier90

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

Bases: sisl.io.wannier90.sile.SileWannier90

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

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)

_write_default

_write_default_only

base_file

File of the current Sile

file

File of the current Sile

Methods

_ArgumentParser_args_single()

Default arguments for the Sile

__delattr__

Implement delattr(self, name).

__dir__

Default dir() implementation.

__enter__()

Opens the output file and returns it self

__eq__

Return self==value.

__exit__(type, value, traceback)

__format__

Default object formatter.

__ge__

Return self>=value.

__getattr__(name)

Override to check the handle

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(filename[, mode, comment])

Initialize self.

__init_subclass__

This method is called when a class is subclassed.

__iter__()

Iterator for file

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__

Create and return a new object.

__reduce__

Helper for pickle.

__reduce_ex__

Helper for pickle.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__

Size of object in memory, in bytes.

__str__()

Return a representation of the Sile

__subclasshook__

Abstract classes can override this to customize issubclass().

_base_file(f)

Make f refer to the file with the appropriate base directory

_base_setup(*args, **kwargs)

Setup the Sile after initialization

_open()

_read_geometry(sc, *args, **kwargs)

Defered routine

_read_geometry_centres(*args, **kwargs)

Defered routine

_read_hamiltonian(geom[, dtype])

Reads a Hamiltonian

_read_supercell()

Deferred routine

_set_file([suffix])

Update readed file

_setup(*args, **kwargs)

Setup winSileWannier90 after initialization

_write(*args, **kwargs)

Wrapper to default the write statements

_write_geometry(geom[, fmt])

Writes the geometry to the contained file

_write_supercell(sc[, fmt])

Writes the supercel to the contained file

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 supercell to the contained file

property base_file

File of the current Sile

dir_file(filename=None)

File of the current Sile

exist()

Query whether the file exists

property 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 supercell to the contained file