dHncSileTBtrans¶
-
class
sisl.io.tbtrans.
dHncSileTBtrans
(filename, mode='r', lvl=0, access=1, _open=True)[source]¶ TBtrans delta-H file object (deprecated by
deltancSileTBtrans
)This class is not made globally visible through get_sile because of its deprecation. If required please use
sisl.io.dHncSileTBtrans
explicitly.Attributes
file
Filename of the current Sile Methods
__init__
(filename[, mode, lvl, access, _open])Creates/Opens a SileCDF close
()exist
()Query whether the file exists 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_delta
(**kwargs)Reads a delta model from the file read_geometry
(*args, **kwargs)Returns the Geometry object from this file read_supercell
()Returns the SuperCell object from this file write
(*args, **kwargs)Generic write method which should be overloaded in child-classes write_delta
(delta, **kwargs)Writes a \(\delta\) term write_geometry
(geom)Creates the NetCDF file and writes the geometry information write_hamiltonian
(H, **kwargs)Writes Hamiltonian model to file write_supercell
(sc)Creates the NetCDF file and writes the supercell information -
close
()¶
-
exist
()¶ Query whether the file exists
-
file
¶ Filename of the current Sile
-
isDataset
(obj)¶ Return true if
obj
is an instance of the NetCDF4Dataset
typeThis is just a wrapper for
isinstance(obj, netCDF4.Dataset)
.
-
isDimension
(obj)¶ Return true if
obj
is an instance of the NetCDF4Dimension
typeThis is just a wrapper for
isinstance(obj, netCDF4.Dimension)
.
-
isGroup
(obj)¶ Return true if
obj
is an instance of the NetCDF4Group
typeThis is just a wrapper for
isinstance(obj, netCDF4.Group)
.
-
isRoot
(obj)¶ Return true if
obj
is an instance of the NetCDF4Dataset
typeThis is just a wrapper for
isinstance(obj, netCDF4.Dataset)
.
-
isVariable
(obj)¶ 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)¶ 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 instances
dimension :
bool
(True)whether the iterator yields Dimension instances
variable :
bool
(True)whether the iterator yields Variable instances
levels :
int
(-1)number of levels to traverse, with respect to
root
variable, i.e. number of sub-groups this iterator will return.root :
str
(None)the base root to start iterating from.
Examples
Script for looping and checking each instance.
>>> for gv in self.iter(): ... if self.isGroup(gv): ... # is group ... elif self.isDimension(gv): ... # is dimension ... elif self.isVariable(gv): ... # is variable
-
read
(*args, **kwargs)¶ Generic read method which should be overloaded in child-classes
Parameters: **kwargs :
keyword arguments will try and search for the attribute
read_<>
and call it with the remaining**kwargs
as arguments.
-
read_delta
(**kwargs)¶ Reads a delta model from the file
-
read_geometry
(*args, **kwargs)¶ Returns the Geometry object from this file
-
read_supercell
()¶ Returns the SuperCell object from this file
-
write
(*args, **kwargs)¶ Generic write method which should be overloaded in child-classes
Parameters: **kwargs :
keyword arguments will try and search for the attribute write_ and call it with the remaining
**kwargs
as arguments.
-
write_delta
(delta, **kwargs)¶ Writes a \(\delta\) term
This term may be of
- level-1: no E or k dependence
- level-2: k-dependent
- level-3: E-dependent
- level-4: k- and E-dependent
Parameters: delta : SparseOrbitalBZSpin
the model to be saved in the NC file
k : array_like, optional
a specific k-point \(\delta\) term. I.e. only save the \(\delta\) term for the given k-point. May be combined with E for a specific k and energy point.
E : float, optional
a specific energy-point \(\delta\) term. I.e. only save the \(\delta\) term for the given energy. May be combined with k for a specific k and energy point.
-
write_geometry
(geom)¶ Creates the NetCDF file and writes the geometry information
-
write_hamiltonian
(H, **kwargs)[source]¶ Writes Hamiltonian model to file
Parameters: H : Hamiltonian
the model to be saved in the NC file
spin : int, optional
the spin-index of the Hamiltonian object that is stored. Default is the first index.
-
write_supercell
(sc)¶ Creates the NetCDF file and writes the supercell information
-