sisl.io package¶
Subpackages¶
- sisl.io.bigdft package
- sisl.io.gulp package
- sisl.io.scaleup package
- sisl.io.siesta package
- Submodules
- sisl.io.siesta.bands module
- sisl.io.siesta.binaries module
- sisl.io.siesta.fdf module
- sisl.io.siesta.out module
- sisl.io.siesta.setup module
- sisl.io.siesta.siesta module
- sisl.io.siesta.siesta_grid module
- sisl.io.siesta.sile module
- sisl.io.siesta.tbtrans module
- sisl.io.siesta.tbtrans_av module
- sisl.io.siesta.tbtrans_proj module
- sisl.io.siesta.xv module
- sisl.io.siesta.bands module
- Module contents
- Submodules
- sisl.io.vasp package
- sisl.io.wannier package
Submodules¶
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
childAn 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 classParameters: file : str
the file to be quried for a correct
Sile
object. This file name may contain {<class-name>} which setscls
in casecls
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 correspondingSile
Parameters: file : str
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
-
-
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
-
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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
-
classmethod
isDataset
(obj)[source]¶ Return true if
obj
is an instance of the NetCDF4Dataset
typeThis is just a wrapper for
isinstance(obj, netCDF4.Dataset)
.
-
classmethod
isDimension
(obj)[source]¶ Return true if
obj
is an instance of the NetCDF4Dimension
typeThis is just a wrapper for
isinstance(obj, netCDF4.Dimension)
.
-
classmethod
isGroup
(obj)[source]¶ Return true if
obj
is an instance of the NetCDF4Group
typeThis is just a wrapper for
isinstance(obj, netCDF4.Group)
.
-
classmethod
isRoot
(obj)¶ Return true if
obj
is an instance of the NetCDF4Dataset
typeThis is just a wrapper for
isinstance(obj, netCDF4.Dataset)
.
-
classmethod
isVariable
(obj)[source]¶ Return true if
obj
is an instance of the NetCDF4Variable
typeThis 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:
- Group
- Dimensions in group
- 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
instancesdimension :
bool
(True
)whether the iterator yields
Dimension
instancesvariable :
bool
(True
)whether the iterator yields
Variable
instanceslevels :
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). Ifmode
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
-
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).
-
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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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). Ifmode
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
-
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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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_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_hessian
(*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_geometry_key
(key)Overwrites internal key lookup value for the geometry vectors set_hessian_key
(key)Overwrites internal key lookup value for the dynamical matrix 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_geometry
(*args, **kwargs)¶
-
read_hamiltonian
(*args, **kwargs)¶
-
read_hessian
(*args, **kwargs)¶
-
read_super
(*args, **kwargs)¶
-
read_supercell
(*args, **kwargs)¶
-
set_dyn_key
(key)¶ Overwrites internal key lookup value for the dynamical matrix 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_es
(*args, **kwargs)Deprecated function which is superseeded by read_hamiltonian
read_geom
(*args, **kwargs)Deprecated function which is superseeded by read_geometry
read_hessian
(*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_hessian
(*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)-
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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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). Ifmode
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
-
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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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). Ifmode
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). Ifmode
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
-
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 filereadline
([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 filereadline
([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)
-
includes
(*args, **kwargs)¶
-
read_geometry
(*args, **kwargs)[source]¶ Returns Geometry object from the FDF file
NOTE: Interaction range of the Atoms are currently not read.
-
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 alist
it will be a %block.keep :
bool
whether old flags will be kept in the fdf file.
-
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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_density_matrix
(**kwargs)Returns a density matrix from the underlying NetCDF file read_energy_density_matrix
(**kwargs)Returns energy density matrix from the underlying NetCDF file 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_hessian
(**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
(H, **kwargs)Writes Hamiltonian model to file write_hessian
(H, **kwargs)Writes Hessian 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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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_density_matrix
(**kwargs)Returns a density matrix from the underlying NetCDF file read_energy_density_matrix
(**kwargs)Returns energy density matrix from the underlying NetCDF file 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_hessian
(**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
(H, **kwargs)Writes Hamiltonian model to file write_hessian
(H, **kwargs)Writes Hessian model to file write_sc
(*args, **kwargs)Deprecated function which is superseeded by write_supercell
-
read_energy_density_matrix
(**kwargs)[source]¶ Returns energy density matrix from the underlying NetCDF 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
-
write_hamiltonian
(H, **kwargs)[source]¶ Writes Hamiltonian model to file
Parameters: H :
Hamiltonian
modelthe 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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
-
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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
-
Elecs
¶ List of electrodes
-
Electrodes
¶ List of electrodes
-
T
(elec_from, elec_to, avg=True)¶ Return the transmission from
from
toto
.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
electrodeParameters: 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
toto
.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 Unlikeorbital_current
this may not beNone
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 viaGeometry.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 viaGeometry.sc_index
.
-
cell
¶ Unit cell in file
-
current
(elec_from, elec_to, avg=True)[source]¶ Return the current from
from
toto
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
-
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
-
transmission
(elec_from, elec_to, avg=True)[source]¶ Return the transmission from
from
toto
.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
electrodeParameters: 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
toto
.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 beNone
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_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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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
(H, **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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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
(H, **kwargs)Writes Hamiltonian model to file write_sc
(*args, **kwargs)Deprecated function which is superseeded by write_supercell
-
write_hamiltonian
(H, **kwargs)[source]¶ Writes Hamiltonian model to file
Parameters: H :
Hamiltonian
modelthe 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
-
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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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
toto
.Tbulk
(elec[, avg])Return the bulk transmission in the elec
electrodeTeig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
toto
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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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 fileread_sc
(*args, **kwargs)Deprecated function which is superseeded by read_supercell
read_supercell
()Returns SuperCell
object from a .TBT.nc filetransmission
(elec_from, elec_to[, avg])Return the transmission from from
toto
.transmission_bulk
(elec[, avg])Return the bulk transmission in the elec
electrodetransmission_eig
(elec_from, elec_to[, avg])Return the transmission eigenvalues from from
toto
.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
-
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
-
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 levellvl
. Ifmode
is in read-mode (r) the compression level is ignored.The final
access
parameter sets how the file should be open and subsequently accessed.- means direct file access for every variable read
- 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 NetCDF4Dataset
typeisDimension
(obj)Return true if obj
is an instance of the NetCDF4Dimension
typeisGroup
(obj)Return true if obj
is an instance of the NetCDF4Group
typeisRoot
(obj)Return true if obj
is an instance of the NetCDF4Dataset
typeisVariable
(obj)Return true if obj
is an instance of the NetCDF4Variable
typeiter
([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). Ifmode
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
-
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 = truewhile if you want to read the Wannier Hamiltonian you should have this:
write_xyz = true plot_hr = trueExamples
>>> 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 cellread_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 cellreadline
([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.
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_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
-
read_geometry
(*args, **kwargs)¶
-
write_geometry
(*args, **kwargs)¶
-