sisl.io package

Module contents

IO imports

sisl.io.add_sile(ending, cls, case=True, gzip=False, _parent_cls=None)[source]

Public for attaching lookup tables for allowing users to attach files for the IOSile function call

Parameters:

ending : str

The file-name ending, it can be several file endings (.TBT.nc)

cls : BaseSile child

An object that is associated with the respective file. It must be inherited from a BaseSile.

case : bool, (True)

Whether case sensitivity is applicable for determining file.

gzip : bool, (False)

Whether files with .gz endings can be read. This option should only be given to files with ASCII text output. It will automatically call:

>>> add_sile(ending+'.gz',...,gzip=False)

to add the gzipped file to the list of possible files.

sisl.io.get_sile_class(file, *args, **kwargs)[source]

Guess the Sile class corresponding to the input file and return the class

Parameters:

file : str

the file to be quried for a correct Sile object. This file name may contain {<class-name>} which sets cls in case cls is not set. For instance:

water.xyz

will return an XYZSile.

cls : class

In case there are several files with similar file-suffixes you may query the exact base-class that should be chosen. If there are several ``Sile``s with similar file-endings this function returns a random one.

sisl.io.get_sile(file, *args, **kwargs)[source]

Guess the Sile corresponding to the input file and return an open object of the corresponding Sile

Parameters:

file : str

the file to be quried for a correct Sile object. This file name may contain {<class-name>} which sets cls in case cls is not set. For instance:

water.dat{XYZSile}

will read the file water.dat as an XYZSile.

cls : class

In case there are several files with similar file-suffixes you may query the exact base-class that should be chosen. If there are several `Sile`s with similar file-endings this function returns a random one.

sisl.io.get_siles(attrs=[None])[source]

Returns all siles with a specific attribute (or all)

Parameters:

attrs : list of attribute names

limits the returned sile-objects to those that have the given attributes hasattr(sile, attrs)

class sisl.io.BaseSile[source]

Bases: object

Base class for the Siles

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(parser=None, *args, **kwargs)[source]

Returns the arguments that may be available for this Sile

Parameters:

parser: ArgumentParser

the argument parser to add the arguments to.

ArgumentParser_out(parser=None, *args, **kwargs)[source]

Appends additional arguments based on the output of the file

Parameters:

parser: ArgumentParser

the argument parser to add the arguments to.

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

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

Deprecated function which is superseeded by read_hamiltonian

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

Deprecated function which is superseeded by read_geometry

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

Deprecated function which is superseeded by read_supercell

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

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

Deprecated function which is superseeded by write_hamiltonian

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

Deprecated function which is superseeded by write_geometry

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

Deprecated function which is superseeded by write_supercell

class sisl.io.Sile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.BaseSile

Class to contain a file with easy access

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
file

File of the current Sile

static is_keys(keys)[source]

Returns true if isinstance(keys,(list,np.ndarray))

static key2case(key, case)[source]

Converts str/list of keywords to proper case

static keys2case(keys, case)[source]

Converts str/list of keywords to proper case

static line_has_key(line, key, case=True)[source]
static line_has_keys(line, keys, case=True)[source]
readline(comment=False)[source]

Reads the next line of the file

step_either(keywords, case=True)[source]

Steps the file-handle until the keyword is found in the input

step_to(keywords, case=True, reread=True)[source]

Steps the file-handle until the keyword is found in the input

class sisl.io.SileCDF(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.sile.BaseSile

Class to contain a file with easy access The file format for this file is the NetCDF file format

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
file

Filename of the current Sile

classmethod isDataset(obj)[source]

Return true if obj is an instance of the NetCDF4 Dataset type

This is just a wrapper for isinstance(obj, netCDF4.Dataset).

classmethod isDimension(obj)[source]

Return true if obj is an instance of the NetCDF4 Dimension type

This is just a wrapper for isinstance(obj, netCDF4.Dimension).

classmethod isGroup(obj)[source]

Return true if obj is an instance of the NetCDF4 Group type

This is just a wrapper for isinstance(obj, netCDF4.Group).

classmethod isRoot(obj)

Return true if obj is an instance of the NetCDF4 Dataset type

This is just a wrapper for isinstance(obj, netCDF4.Dataset).

classmethod isVariable(obj)[source]

Return true if obj is an instance of the NetCDF4 Variable type

This is just a wrapper for isinstance(obj, netCDF4.Variable).

iter(group=True, dimension=True, variable=True, levels=-1, root=None)[source]

Iterator on all groups, variables and dimensions.

This iterator iterates through all groups, variables and dimensions in the Dataset

The generator sequence will _always_ be:

  1. Group
  2. Dimensions in group
  3. Variables in group

As the dimensions are generated before the variables it is possible to copy groups, dimensions, and then variables such that one always ensures correct dependencies in the generation of a new SileCDF.

Parameters:

group : bool (True)

whether the iterator yields Group instances

dimension : bool (True)

whether the iterator yields Dimension instances

variable : bool (True)

whether the iterator yields Variable instances

levels : int (-1)

number of levels to traverse, with respect to root variable, i.e. number of sub-groups this iterator will return.

root : str (None)

the base root to start iterating from.

Examples

Script for looping and checking each instance. >>> for gv in self.iter(): >>> if self.isGroup(gv): >>> # is group >>> elif self.isDimension(gv): >>> # is dimension >>> elif self.isVariable(gv): >>> # is variable

class sisl.io.SileBin(filename, mode='r')[source]

Bases: sisl.io.sile.BaseSile

Class to contain a file with easy access The file format for this file is a binary format.

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Creates/Opens a SileBin

Opens a SileBin with mode (b). If mode is in read-mode (r).

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
file

File of the current Sile

exception sisl.io.SileError(value, obj=None)[source]

Bases: exceptions.IOError

Define an error object related to the Sile objects

sisl.io.Sile_fh_open(func)[source]

Method decorator for objects to directly implement opening of the file-handle upon entry (if it isn’t already).

sisl.io.sile_raise_write(self)[source]
sisl.io.sile_raise_read(self)[source]
class sisl.io.SileBigDFT(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileCDFBigDFT(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.sile.SileCDF

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileBinBigDFT(filename, mode='r')[source]

Bases: sisl.io.sile.SileBin

Creates/Opens a SileBin

Opens a SileBin with mode (b). If mode is in read-mode (r).

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.ASCIISileBigDFT(filename, mode='r', comment='#')[source]

Bases: sisl.io.bigdft.sile.SileBigDFT

ASCII file object for BigDFT

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

read_geometry(*args, **kwargs)
write_geometry(*args, **kwargs)
class sisl.io.CUBESile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

CUBE file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_grid(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_grid(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_geometry(*args, **kwargs)
read_grid(*args, **kwargs)
read_supercell(*args, **kwargs)
write_geometry(*args, **kwargs)
write_grid(*args, **kwargs)
class sisl.io.SileGULP(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileCDFGULP(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.sile.SileCDF

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.gotSileGULP(filename, mode='r', comment='#')[source]

Bases: sisl.io.gulp.sile.SileGULP

GULP output file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_dynmat(*args, **kwargs)
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_hamiltonian(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_super(*args, **kwargs)
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
set_dyn_key(key) Overwrites internal key lookup value for the dynamical matrix vectors
set_es_key(key) Overwrites internal key lookup value for the dynamical matrix vectors
set_geometry_key(key) Overwrites internal key lookup value for the geometry vectors
set_key(segment, key) Sets the segment lookup key
set_supercell_key(key) Overwrites internal key lookup value for the cell vectors
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_dynmat(*args, **kwargs)
read_geometry(*args, **kwargs)
read_hamiltonian(*args, **kwargs)
read_super(*args, **kwargs)
read_supercell(*args, **kwargs)
set_dyn_key(key)[source]

Overwrites internal key lookup value for the dynamical matrix vectors

set_es_key(key)

Overwrites internal key lookup value for the dynamical matrix vectors

set_geometry_key(key)[source]

Overwrites internal key lookup value for the geometry vectors

set_key(segment, key)[source]

Sets the segment lookup key

set_supercell_key(key)[source]

Overwrites internal key lookup value for the cell vectors

class sisl.io.HessianSileGULP(filename, mode='r', comment='#')[source]

Bases: sisl.io.gulp.sile.SileGULP

GULP output file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_dynamicalmatrix(*args, **kwargs)
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_dynamicalmatrix(*args, **kwargs)
class sisl.io.HamiltonianSile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Hamiltonian file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_hamiltonian(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_hamiltonian(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_geometry(*args, **kwargs)
read_hamiltonian(*args, **kwargs)
write_geometry(*args, **kwargs)
write_hamiltonian(*args, **kwargs)
class sisl.io.MoldenSile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Molden file object

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs)
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

write_geometry(*args, **kwargs)
write_sc(*args, **kwargs)
class sisl.io.SileScaleUp(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileCDFScaleUp(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.sile.SileCDF

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileBinScaleUp(filename, mode='r')[source]

Bases: sisl.io.sile.SileBin

Creates/Opens a SileBin

Opens a SileBin with mode (b). If mode is in read-mode (r).

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.orboccSileScaleUp(filename, mode='r', comment='#')[source]

Bases: sisl.io.scaleup.sile.SileScaleUp

orbocc file object for ScaleUp

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_atom(*args, **kwargs)
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_atom(*args, **kwargs)
class sisl.io.REFSileScaleUp(filename, mode='r', comment='#')[source]

Bases: sisl.io.scaleup.sile.SileScaleUp

REF file object for ScaleUp

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

read_geometry(*args, **kwargs)
read_supercell(*args, **kwargs)
write_geometry(*args, **kwargs)
class sisl.io.restartSileScaleUp(filename, mode='r', comment='#')[source]

Bases: sisl.io.scaleup.ref.REFSileScaleUp

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_geometry(*args, **kwargs)
class sisl.io.rhamSileScaleUp(filename, mode='r', comment='#')[source]

Bases: sisl.io.scaleup.sile.SileScaleUp

rham file object for ScaleUp

This file contains the real-space Hamiltonian for a ScaleUp simulation

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_hamiltonian(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_hamiltonian(*args, **kwargs)
class sisl.io.SileSiesta(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileCDFSIESTA(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.sile.SileCDF

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileBinSIESTA(filename, mode='r')[source]

Bases: sisl.io.sile.SileBin

Creates/Opens a SileBin

Opens a SileBin with mode (b). If mode is in read-mode (r).

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.bandsSileSiesta(filename, mode='r', comment='#')[source]

Bases: sisl.io.siesta.sile.SileSiesta

bands SIESTA file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs)
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(parser=None, *args, **kwargs)
read_data(*args, **kwargs)
class sisl.io.TSHSSileSiesta(filename, mode='r')[source]

Bases: sisl.io.siesta.sile.SileBinSIESTA

TranSIESTA file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry() Returns Geometry object from a siesta.TSHS file
read_hamiltonian(**kwargs) Returns the electronic structure from the siesta.TSHS file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns a SuperCell object from a siesta.TSHS file
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Creates/Opens a SileBin

Opens a SileBin with mode (b). If mode is in read-mode (r).

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry() Returns Geometry object from a siesta.TSHS file
read_hamiltonian(**kwargs) Returns the electronic structure from the siesta.TSHS file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns a SuperCell object from a siesta.TSHS file
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_geometry()[source]

Returns Geometry object from a siesta.TSHS file

read_hamiltonian(**kwargs)[source]

Returns the electronic structure from the siesta.TSHS file

read_supercell()[source]

Returns a SuperCell object from a siesta.TSHS file

class sisl.io.fdfSileSiesta(filename, mode='r', base=None)[source]

Bases: sisl.io.siesta.sile.SileSiesta

FDF file object

Attributes

file Return the current file name (without the directory prefix)

Methods

ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
get(key[, unit, default, with_unit]) Retrieve fdf-keyword from the file
includes(*args, **kwargs)
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key(key) Return the key as written in the fdf-file.
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
print(key, value) Return a string which is pretty-printing the key+value
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from the FDF file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs) Returns SuperCell object from the FDF file
readline([comment]) Reads the next line of the file
set(key, value[, keep]) Add the key and value to the FDF file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
type(key) Return the type of the fdf-keyword
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Initialize an FDF file from the filename

By supplying base you can reference files in other directories. By default the base is the directory given in the file name.

Attributes

file Return the current file name (without the directory prefix)

Methods

ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
get(key[, unit, default, with_unit]) Retrieve fdf-keyword from the file
includes(*args, **kwargs)
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key(key) Return the key as written in the fdf-file.
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
print(key, value) Return a string which is pretty-printing the key+value
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from the FDF file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs) Returns SuperCell object from the FDF file
readline([comment]) Reads the next line of the file
set(key, value[, keep]) Add the key and value to the FDF file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
type(key) Return the type of the fdf-keyword
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(parser=None, *args, **kwargs)
file

Return the current file name (without the directory prefix)

get(key, unit=None, default=None, with_unit=False)[source]

Retrieve fdf-keyword from the file

includes(*args, **kwargs)
key(key)[source]

Return the key as written in the fdf-file. If not found, returns None.

static print(key, value)[source]

Return a string which is pretty-printing the key+value

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

Returns Geometry object from the FDF file

NOTE: Interaction range of the Atoms are currently not read.

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

Returns SuperCell object from the FDF file

readline(comment=False)[source]

Reads the next line of the file

set(key, value, keep=True)[source]

Add the key and value to the FDF file

Parameters:

key : str

the fdf-key value to be set in the fdf file

value : str/list

the value of the string. If a str is passed a regular fdf-key is used, if a list it will be a %block.

keep : bool

whether old flags will be kept in the fdf file.

type(key)[source]

Return the type of the fdf-keyword

write_geometry(*args, **kwargs)
class sisl.io.outSileSiesta(filename, mode='r', comment='#')[source]

Bases: sisl.io.siesta.sile.SileSiesta

SIESTA output file object

This enables reading the output quantities from the SIESTA output.

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific content in the SIESTA out file
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_force(*args, **kwargs)
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_moment(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_species(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_data(*args, **kwargs)[source]

Read specific content in the SIESTA out file

The currently implemented things are denoted in the parameters list. Note that the returned quantities are in the order of keywords, so:

>>> read_data(geometry=True, force=True)
<geom>, <forces>
>>> read_data(force=True,geometry=True)
<forces>, <geom>
Parameters:

geom: bool

return the last geometry in the outSileSiesta

force: bool

return the last force in the outSileSiesta

moment: bool

return the last moments in the outSileSiesta (only for spin-orbit coupling calculations)

read_force(*args, **kwargs)
read_geometry(*args, **kwargs)
read_moment(*args, **kwargs)
read_species(*args, **kwargs)
class sisl.io.ncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.sile.SileCDFSIESTA

SIESTA file object

Attributes

file Filename of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
grids() Return a list of available grids in this file.
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry() Returns Geometry object from a SIESTA.nc file
read_grid(name[, idx]) Reads a grid in the current SIESTA.nc file
read_hamiltonian(**kwargs) Returns a tight-binding model from the underlying NetCDF file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns a SuperCell object from a SIESTA.nc file
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(geom) Creates the NetCDF file and writes the geometry information
write_hamiltonian(ham, **kwargs) Writes Hamiltonian model to file
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
grids() Return a list of available grids in this file.
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry() Returns Geometry object from a SIESTA.nc file
read_grid(name[, idx]) Reads a grid in the current SIESTA.nc file
read_hamiltonian(**kwargs) Returns a tight-binding model from the underlying NetCDF file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns a SuperCell object from a SIESTA.nc file
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(geom) Creates the NetCDF file and writes the geometry information
write_hamiltonian(ham, **kwargs) Writes Hamiltonian model to file
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

grids()[source]

Return a list of available grids in this file.

read_geometry()[source]

Returns Geometry object from a SIESTA.nc file

NOTE: Interaction range of the Atoms are currently not read.

read_grid(name, idx=0)[source]

Reads a grid in the current SIESTA.nc file

Enables the reading and processing of the grids created by SIESTA

read_hamiltonian(**kwargs)[source]

Returns a tight-binding model from the underlying NetCDF file

read_supercell()[source]

Returns a SuperCell object from a SIESTA.nc file

write_geometry(geom)[source]

Creates the NetCDF file and writes the geometry information

write_hamiltonian(ham, **kwargs)[source]

Writes Hamiltonian model to file

Parameters:

ham : Hamiltonian model

the model to be saved in the NC file

Ef : double=0

the Fermi level of the electronic structure (in eV)

class sisl.io.gridncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.sile.SileCDFSIESTA

SIESTA Grid file object

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_grid([name, idx]) Reads a grid in the current SIESTA.grid.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns a SuperCell object from a SIESTA.grid.nc file
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_grid([name, idx]) Reads a grid in the current SIESTA.grid.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns a SuperCell object from a SIESTA.grid.nc file
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
read_grid(name='gridfunc', idx=0, *args, **kwargs)[source]

Reads a grid in the current SIESTA.grid.nc file

Enables the reading and processing of the grids created by SIESTA

read_supercell()[source]

Returns a SuperCell object from a SIESTA.grid.nc file

class sisl.io.tbtncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.sile.SileCDFSIESTA

TBtrans file object

This SileCDF implements the TBtrans output *.TBT.nc sile which contains calculated quantities related to the NEGF code TBtrans.

Although the TBtrans code is in fortran and the resulting NetCDF file variables are in fortran indexing (1-based), everything is returned as Python indexing (0-based) when scripting.

This is vital when using this Sile.

Note that when using the command-line utility sdata the indexing is fortran based because the data handlers are meant for _easy_ use.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output
ADOS(elec, E=None, avg=True, atom=None)[source]

Return the DOS of the spectral function from elec (1/eV).

Parameters:

elec: ``str``

electrode originating spectral function

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

atom : array_like, int (_all_)

only return for a given set of atoms (Python based indices)

ArgumentParser(parser=None, *args, **kwargs)
BDOS(elec, E=None, avg=True)[source]

Return the bulk DOS of elec (1/eV).

Parameters:

elec: ``str``

electrode where the bulk DOS is returned

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

BulkDOS(elec, E=None, avg=True)

Return the bulk DOS of elec (1/eV).

Parameters:

elec: ``str``

electrode where the bulk DOS is returned

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

DOS(E=None, avg=True, atom=None)[source]

Return the Green function DOS (1/eV).

Parameters:

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

atom : array_like, int (_all_)

only return for a given set of atoms (Python based indices)

DOS_A(elec, E=None, avg=True, atom=None)

Return the DOS of the spectral function from elec (1/eV).

Parameters:

elec: ``str``

electrode originating spectral function

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

atom : array_like, int (_all_)

only return for a given set of atoms (Python based indices)

DOS_Gf(E=None, avg=True, atom=None)

Return the Green function DOS (1/eV).

Parameters:

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

atom : array_like, int (_all_)

only return for a given set of atoms (Python based indices)

DOS_bulk(elec, E=None, avg=True)

Return the bulk DOS of elec (1/eV).

Parameters:

elec: ``str``

electrode where the bulk DOS is returned

E : int (None)

optionally only return the DOS of atoms at a given energy point

avg: ``bool`` (`True`)

whether the returned DOS is k-averaged

E

Sampled energy-points in file

Eindex(E)[source]

Return the closest energy index corresponding to the energy E

Elecs

List of electrodes

Electrodes

List of electrodes

T(elec_from, elec_to, avg=True)

Return the transmission from from to to.

The transmission between two electrodes may be retrieved from the Sile.

Parameters:

elec_from: ``str``

the originating electrode

elec_to: ``str``

the absorbing electrode (different from elec_from)

avg: ``bool`` (`True`)

whether the returned transmission is k-averaged

Tbulk(elec, avg=True)

Return the bulk transmission in the elec electrode

Parameters:

elec: ``str``

the bulk electrode

avg: ``bool`` (`True`)

whether the returned transmission is k-averaged

Teig(elec_from, elec_to, avg=True)

Return the transmission eigenvalues from from to to.

The transmission eigenvalues between two electrodes may be retrieved from the Sile.

Parameters:

elec_from: ``str``

the originating electrode

elec_to: ``str``

the absorbing electrode (different from elec_from)

avg: ``bool`` (`True`)

whether the returned eigenvalues are k-averaged

a2p(atom)[source]

Return the pivoting indices (0-based) for the atoms

Parameters:

atom : array_like, int

atomic indices (0-based)

a_d

Atomic indices (1-based) of device atoms

a_dev

Atomic indices (1-based) of device atoms

atom_current(elec, E, avg=True, activity=True)[source]

Return the atom-current of atoms.

This should not be confused with the bond-currents.

Parameters:

elec: ``str``

the electrode of originating electrons

E: float or int

the energy or energy index of the atom current.

avg: ``bool`` (`True`)

whether the atom current returned is k-averaged

activity: ``bool`` (`True`)

whether the activity current is returned. This is defined using these two equations:

\[J_I^{|a|} &=\frac{1}{2} \sum_J \big| \sum_{\nu\in I}\sum_{\mu\in J} J_{\nu\mu} \big| J_I^{|o|} &=\frac{1}{2} \sum_J \sum_{\nu\in I}\sum_{\mu\in J} \big| J_{\nu\mu} \big|\]

If activity = False it returns

\[J_I^{|a|}\]

and if activity = True it returns

\[J_I^{\mathcal A} = \sqrt{ J_I^{|a|} J_I^{|o|} }\]
atom_current_from_orbital(Jij, activity=True)[source]

Return the atom-current of atoms.

This takes a sparse matrix with size self.geom.no, self.geom.no_s as argument with the associated orbital currents.

Please note that this returns the atomic current by folding all orbital currents into the unit-cell.

Parameters:

Jij: ``scipy.sparse.*_matrix``

the orbital currents as retrieved from orbital_current

activity: ``bool`` (`True`)

whether the activity current is returned. This is defined using these two equations:

\[J_I^{|a|} &=\frac{1}{2} \sum_J \big| \sum_{\nu\in I}\sum_{\mu\in J} J_{\nu\mu} \big| J_I^{|o|} &=\frac{1}{2} \sum_J \sum_{\nu\in I}\sum_{\mu\in J} \big| J_{\nu\mu} \big|\]

If activity = False it returns

\[J_I^{|a|}\]

and if activity = True it returns

\[J_I^{\mathcal A} = \sqrt{ J_I^{|a|} J_I^{|o|} }\]
bond_current(elec, E, avg=True, isc=None, sum='+', uc=False)[source]

Return the bond-current between atoms (sum of orbital currents)

Parameters:

elec : str

the electrode of originating electrons

E : float or int

A float for energy in eV, int for explicit energy index Unlike orbital_current this may not be None as the down-scaling of the orbital currents may not be equivalent for all energy points.

avg : bool (True)

whether the bond current returned is k-averaged

isc : array_like ([0, 0, 0])

the returned bond currents from the unit-cell ([0, 0, 0]) to the given supercell. If [None, None, None] is passed all bond currents are returned.

sum : str ('+')

this value may be “+”/”-“/”all” If “+” is supplied only the positive orbital currents are used, for “-”, only the negative orbital currents are used, else return the sum of both.

uc : bool (False)

whether the returned bond-currents are only in the unit-cell. If True this will return a sparse matrix of .shape = (self.na, self.na), else, it will return a sparse matrix of .shape = (self.na, self.na * self.n_s). One may figure out the connections via Geometry.sc_index.

bond_current_from_orbital(Jij, sum='+', uc=None)[source]

Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.

Parameters:

Jij : scipy.sparse.*_matrix

the orbital currents as retrieved from orbital_current

sum : str ('+')

this value may be “+”/”-“/”all” If “+” is supplied only the positive orbital currents are used, for “-”, only the negative orbital currents are used, else return both.

uc : bool (Jij.shape[0] == Jij.shape[1])

whether the returned bond-currents are only in the unit-cell. If True this will return a sparse matrix of .shape = (self.na, self.na), else, it will return a sparse matrix of .shape = (self.na, self.na * self.n_s). One may figure out the connections via Geometry.sc_index.

cell

Unit cell in file

chemical_potential(elec)[source]

Return the chemical potential associated with the electrode elec

current(elec_from, elec_to, avg=True)[source]

Return the current from from to to using the weights in the file.

elecs

List of electrodes

electrodes

List of electrodes

electronic_temperature(elec)[source]

Return temperature of the electrode electronic distribution in Kelvin

geom

Returns the associated geometry from the TBT file

kT(elec)[source]

Return temperature of the electrode electronic distribution in eV

kpt

Sampled k-points in file

lasto

Last orbital of corresponding atom

mu(elec)

Return the chemical potential associated with the electrode elec

nE

Number of energy-points in file

na

Returns number of atoms in the cell

na_d

Number of atoms in the device region

na_dev

Number of atoms in the device region

na_u

Returns number of atoms in the cell

ne

Number of energy-points in file

nkpt

Number of k-points in file

no

Returns number of orbitals in the cell

no_d

Number of orbitals in the device region

no_u

Returns number of orbitals in the cell

o2p(orbital)[source]

Return the pivoting indices (0-based) for the orbitals

Parameters:

orbital : array_like, int

orbital indices (0-based)

orbital_current(elec, E, avg=True, isc=None)[source]

Return the orbital current originating from elec.

This will return a sparse matrix (scipy.sparse.csr_matrix). The sparse matrix may be interacted with like a normal matrix although it enables extremely big matrices.

Parameters:

elec: str

the electrode of originating electrons

E: float or int

the energy or the energy index of the orbital current. If an integer is passed it is the index, otherwise the index corresponding to Eindex(E) is used.

avg: bool, optional

whether the orbital current returned is k-averaged, default to True

isc: array_like (`[0, 0, 0]`)

the returned bond currents from the unit-cell ([0, 0, 0]) to the given supercell, the default is only orbital currents in the unitcell.

pivot

Pivot table of device orbitals to obtain input sorting

pvt

Pivot table of device orbitals to obtain input sorting

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

Read specific type of data.

This is a generic routine for reading different parts of the data-file.

Parameters:

geom: ``bool``

return the geometry

atom_current: ``bool``

return the atomic current flowing through an atom (the activity current)

vector_current: ``bool``

return the orbital currents as vectors

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

Returns Geometry object from a .TBT.nc file

read_supercell()[source]

Returns SuperCell object from a .TBT.nc file

transmission(elec_from, elec_to, avg=True)[source]

Return the transmission from from to to.

The transmission between two electrodes may be retrieved from the Sile.

Parameters:

elec_from: ``str``

the originating electrode

elec_to: ``str``

the absorbing electrode (different from elec_from)

avg: ``bool`` (`True`)

whether the returned transmission is k-averaged

transmission_bulk(elec, avg=True)[source]

Return the bulk transmission in the elec electrode

Parameters:

elec: ``str``

the bulk electrode

avg: ``bool`` (`True`)

whether the returned transmission is k-averaged

transmission_eig(elec_from, elec_to, avg=True)[source]

Return the transmission eigenvalues from from to to.

The transmission eigenvalues between two electrodes may be retrieved from the Sile.

Parameters:

elec_from: ``str``

the originating electrode

elec_to: ``str``

the absorbing electrode (different from elec_from)

avg: ``bool`` (`True`)

whether the returned eigenvalues are k-averaged

vector_current(elec, E, avg=True)[source]

Return the atom-current with vector components of atoms.

Parameters:

elec: ``str``

the electrode of originating electrons

E: float or int

the energy or energy index of the vector current. Unlike orbital_current this may not be None as the down-scaling of the orbital currents may not be equivalent for all energy points.

avg: ``bool`` (`True`)

whether the vector current returned is k-averaged

vector_current_from_orbital(Jij)[source]

Return the atom-current with vector components of atoms.

This takes a sparse matrix with size self.geom.no, self.geom.no_s as argument with the associated orbital currents.

Parameters:

Jij: ``scipy.sparse.*_matrix``

the orbital currents as retrieved from orbital_current

wkpt

Weights of k-points in file

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

This is not meant to be used

write_tbtav(**kwargs)[source]

Write the TBT.AV.nc equivalent of this TBtrans output

This will create/overwrite the file with the ending TBT.AV.nc and thus will not take notice of any older files.

xa

Atomic coordinates in file

xyz

Atomic coordinates in file

class sisl.io.phtncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.tbtrans.tbtncSileSiesta

PHtrans file object

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output
class sisl.io.dHncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.sile.SileCDFSIESTA

TBtrans delta-H file object

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(geom) Creates the NetCDF file and writes the geometry information
write_hamiltonian(ham, **kwargs) Writes Hamiltonian model to file
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(geom) Creates the NetCDF file and writes the geometry information
write_hamiltonian(ham, **kwargs) Writes Hamiltonian model to file
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_geometry(geom)[source]

Creates the NetCDF file and writes the geometry information

write_hamiltonian(ham, **kwargs)[source]

Writes Hamiltonian model to file

Parameters:

ham : Hamiltonian model

the model to be saved in the NC file

spin : int, 0

the spin-index of the Hamiltonian object that is stored.

class sisl.io.tbtavncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.tbtrans.tbtncSileSiesta

TBtrans average file object

This SileCDF implements the writing of the TBtrans output *.TBT.AV.nc sile which contains the k-averaged quantities related to the NEGF code TBtrans.

Although the TBtrans code is in fortran and the resulting NetCDF file variables are in fortran indexing (1-based), everything is returned as Python indexing (0-based) when scripting.

This is vital when using this Sile.

Note that when using the command-line utility sdata the indexing is fortran based because the data handlers are meant for _easy_ use.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Always return 1, this is to signal other routines
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(*args, **kwargs) Wrapper for writing the k-averaged TBT.AV.nc file.

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Always return 1, this is to signal other routines
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(*args, **kwargs) Wrapper for writing the k-averaged TBT.AV.nc file.
nkpt

Always return 1, this is to signal other routines

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

Wrapper for writing the k-averaged TBT.AV.nc file.

This write _requires_ the TBT.nc Sile object passed as the first argument, or as the keyword from=tbt argument.

Parameters:

from : tbtncSileSiesta

the TBT.nc file object that has the k-sampled quantities.

class sisl.io.phtavncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.tbtrans_av.tbtavncSileSiesta

PHtrans file object

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Always return 1, this is to signal other routines
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(*args, **kwargs) Wrapper for writing the k-averaged TBT.AV.nc file.

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Always return 1, this is to signal other routines
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(*args, **kwargs) Wrapper for writing the k-averaged TBT.AV.nc file.
class sisl.io.tbtprojncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.tbtrans.tbtncSileSiesta

TBtrans projection file object

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output
class sisl.io.phtprojncSileSiesta(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.siesta.tbtrans_proj.tbtprojncSileSiesta

PHtrans projection file object

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

E Sampled energy-points in file
Elecs List of electrodes
Electrodes List of electrodes
a_d Atomic indices (1-based) of device atoms
a_dev Atomic indices (1-based) of device atoms
cell Unit cell in file
elecs List of electrodes
electrodes List of electrodes
file Filename of the current Sile
geom Returns the associated geometry from the TBT file
kpt Sampled k-points in file
lasto Last orbital of corresponding atom
nE Number of energy-points in file
na Returns number of atoms in the cell
na_d Number of atoms in the device region
na_dev Number of atoms in the device region
na_u Returns number of atoms in the cell
ne Number of energy-points in file
nkpt Number of k-points in file
no Returns number of orbitals in the cell
no_d Number of orbitals in the device region
no_u Returns number of orbitals in the cell
pivot Pivot table of device orbitals to obtain input sorting
pvt Pivot table of device orbitals to obtain input sorting
wkpt Weights of k-points in file
xa Atomic coordinates in file
xyz Atomic coordinates in file

Methods

ADOS(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
ArgumentParser([parser])
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
BDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
BulkDOS(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
DOS([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_A(elec[, E, avg, atom]) Return the DOS of the spectral function from elec (1/eV).
DOS_Gf([E, avg, atom]) Return the Green function DOS (1/eV).
DOS_bulk(elec[, E, avg]) Return the bulk DOS of elec (1/eV).
Eindex(E) Return the closest energy index corresponding to the energy E
T(elec_from, elec_to[, avg]) Return the transmission from from to to.
Tbulk(elec[, avg]) Return the bulk transmission in the elec electrode
Teig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
a2p(atom) Return the pivoting indices (0-based) for the atoms
atom_current(elec, E[, avg, activity]) Return the atom-current of atoms.
atom_current_from_orbital(Jij[, activity]) Return the atom-current of atoms.
bond_current(elec, E[, avg, isc, sum, uc]) Return the bond-current between atoms (sum of orbital currents)
bond_current_from_orbital(Jij[, sum, uc]) Return the bond-current between atoms (sum of orbital currents) by passing the orbital currents.
chemical_potential(elec) Return the chemical potential associated with the electrode elec
current(elec_from, elec_to[, avg]) Return the current from from to to using the weights in the file.
electronic_temperature(elec) Return temperature of the electrode electronic distribution in Kelvin
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
kT(elec) Return temperature of the electrode electronic distribution in eV
mu(elec) Return the chemical potential associated with the electrode elec
o2p(orbital) Return the pivoting indices (0-based) for the orbitals
orbital_current(elec, E[, avg, isc]) Return the orbital current originating from elec.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_data(*args, **kwargs) Read specific type of data.
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs) Returns Geometry object from a .TBT.nc file
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Returns SuperCell object from a .TBT.nc file
transmission(elec_from, elec_to[, avg]) Return the transmission from from to to.
transmission_bulk(elec[, avg]) Return the bulk transmission in the elec electrode
transmission_eig(elec_from, elec_to[, avg]) Return the transmission eigenvalues from from to to.
vector_current(elec, E[, avg]) Return the atom-current with vector components of atoms.
vector_current_from_orbital(Jij) Return the atom-current with vector components of atoms.
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs) This is not meant to be used
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_tbtav(**kwargs) Write the TBT.AV.nc equivalent of this TBtrans output
class sisl.io.XVSileSiesta(filename, mode='r', comment='#')[source]

Bases: sisl.io.siesta.sile.SileSiesta

XV file object

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

read_geometry(*args, **kwargs)
read_supercell(*args, **kwargs)
write_geometry(*args, **kwargs)
class sisl.io.TableSile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Table file object

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_data(data[, header, footer, newline, ...]) Write tabular data to the file with optional header.
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
write_data(data, header=None, footer=None, newline='\n', fmt='%.5e', comment=None, delimiter='\t')[source]

Write tabular data to the file with optional header.

class sisl.io.SileVASP(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileCDFVASP(filename, mode='r', lvl=0, access=1, _open=True)[source]

Bases: sisl.io.sile.SileCDF

Creates/Opens a SileCDF

Opens a SileCDF with mode and compression level lvl. If mode is in read-mode (r) the compression level is ignored.

The final access parameter sets how the file should be open and subsequently accessed.

  1. means direct file access for every variable read
  2. means stores certain variables in the object.

Attributes

file Filename of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
isDataset(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isDimension(obj) Return true if obj is an instance of the NetCDF4 Dimension type
isGroup(obj) Return true if obj is an instance of the NetCDF4 Group type
isRoot(obj) Return true if obj is an instance of the NetCDF4 Dataset type
isVariable(obj) Return true if obj is an instance of the NetCDF4 Variable type
iter([group, dimension, variable, levels, root]) Iterator on all groups, variables and dimensions.
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileBinVASP(filename, mode='r')[source]

Bases: sisl.io.sile.SileBin

Creates/Opens a SileBin

Opens a SileBin with mode (b). If mode is in read-mode (r).

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.CARSileVASP(filename, mode='r', comment='#')[source]

Bases: sisl.io.vasp.sile.SileVASP

CAR file object This file-object handles both POSCAR and CONTCAR files

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

read_geometry(*args, **kwargs)
read_supercell(*args, **kwargs)
write_geometry(*args, **kwargs)
class sisl.io.POSCARSileVASP(filename, mode='r', comment='#')[source]

Bases: sisl.io.vasp.car.CARSileVASP

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.CONTCARSileVASP(filename, mode='r', comment='#')[source]

Bases: sisl.io.vasp.car.CARSileVASP

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell(*args, **kwargs)
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.SileW90(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

Attributes

file File of the current Sile

Methods

ArgumentParser([parser]) Returns the arguments that may be available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
class sisl.io.winSileW90(filename, mode='r', comment='#')[source]

Bases: sisl.io.wannier.sile.SileW90

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

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

write_xyz = true plot_hr = true

Examples

>>> H = win90.read_hamiltonian()
>>> H = win90.read_hamiltonian(dtype=numpy.float64) # only read real-part
>>> H = win90.read_hamiltonian(cutoff=0.00001) # explicitly set the cutoff for the elements

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
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_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
read_supercell() Reads a SuperCell and creates the Wannier90 cell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

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, 0.00001)

the cutoff value for the zero Hamiltonian elements

read_supercell()[source]

Reads a SuperCell and creates the Wannier90 cell

class sisl.io.XSFSile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

XSF file object

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out(p, *args, **kwargs) Adds arguments only if this file is an output file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

ArgumentParser_out(p, *args, **kwargs)[source]

Adds arguments only if this file is an output file

Parameters:

p : argparse.ArgumentParser

the parser which gets amended the additional output options.

read_geometry(*args, **kwargs)
write_geometry(*args, **kwargs)
class sisl.io.XYZSile(filename, mode='r', comment='#')[source]

Bases: sisl.io.sile.Sile

XYZ file object

Attributes

file File of the current Sile

Methods

ArgumentParser(*args, **kwargs) Returns the arguments that is available for this Sile
ArgumentParser_out([parser]) Appends additional arguments based on the output of the file
is_keys(keys) Returns true if isinstance(keys,(list,np.ndarray))
key2case(key, case) Converts str/list of keywords to proper case
keys2case(keys, case) Converts str/list of keywords to proper case
line_has_key(line, key[, case])
line_has_keys(line, keys[, case])
read(*args, **kwargs) Generic read method which should be overloaded in child-classes
read_es(*args, **kwargs) Deprecated function which is superseeded by read_hamiltonian
read_geom(*args, **kwargs) Deprecated function which is superseeded by read_geometry
read_geometry(*args, **kwargs)
read_sc(*args, **kwargs) Deprecated function which is superseeded by read_supercell
readline([comment]) Reads the next line of the file
step_either(keywords[, case]) Steps the file-handle until the keyword is found in the input
step_to(keywords[, case, reread]) Steps the file-handle until the keyword is found in the input
write(*args, **kwargs) Generic write method which should be overloaded in child-classes
write_es(*args, **kwargs) Deprecated function which is superseeded by write_hamiltonian
write_geom(*args, **kwargs) Deprecated function which is superseeded by write_geometry
write_geometry(*args, **kwargs)
write_sc(*args, **kwargs) Deprecated function which is superseeded by write_supercell
ArgumentParser(*args, **kwargs)[source]

Returns the arguments that is available for this Sile

read_geometry(*args, **kwargs)
write_geometry(*args, **kwargs)