phtsencSileTBtrans¶
-
class
sisl.io.tbtrans.phtsencSileTBtrans(filename, mode='r', lvl=0, access=1, *args, **kwargs)[source]¶ PHtrans file object
Attributes
ESampled energy-points in file a_bufAtomic indices (0-based) of device atoms a_devAtomic indices (0-based) of device atoms base_fileFile of the current Sile cellUnit cell in file elecsList of electrodes fileFile of the current Sile geomThe associated geometry from this file geometryThe associated geometry from this file kSampled k-points in file kptSampled k-points in file lastoLast orbital of corresponding atom nENumber of energy-points in file naReturns number of atoms in the cell na_bNumber of atoms in the buffer region na_bufferNumber of atoms in the buffer region na_dNumber of atoms in the device region na_devNumber of atoms in the device region na_uReturns number of atoms in the cell neNumber of energy-points in file nkNumber of k-points in file nkptNumber of k-points in file noReturns number of orbitals in the cell no_dNumber of orbitals in the device region no_uReturns number of orbitals in the cell o_devOrbital indices (0-based) of device orbitals wkWeights of k-points in file wkptWeights of k-points in file xaAtomic coordinates in file xyzAtomic coordinates in file Methods
Eindex(E)Return the closest energy index corresponding to the energy E__init__(filename[, mode, lvl, access])Initialize self. a2p(atom[, elec])Return the pivoting orbital indices (0-based) for the atoms, possibly on an electrode btd()Block-sizes for the BTD method in the device region chemical_potential(elec)Return the chemical potential associated with the electrode elec close()dir_file([filename])File of the current Sile eta(elec)The imaginary part used when calculating the self-energies in eV exist()Query whether the file exists iter([group, dimension, variable, levels, root])Iterator on all groups, variables and dimensions. kindex(k)Return the index of the k-point that is closests to the queried k-point (in reduced coordinates) mu(elec)Return the chemical potential associated with the electrode elec n_btd()Number of blocks in the BTD partioning in the device region o2p(orbital[, elec])Return the pivoting indices (0-based) for the orbitals, possibly on an electrode pivot([elec, in_device, sort])Return the pivoting indices for a specific electrode read(*args, **kwargs)Generic read method which should be overloaded in child-classes read_geometry(*args, **kwargs)Returns Geometry object from this file read_supercell()Returns SuperCell object from this file self_energy(elec, E, k[, sort])Return the self-energy from the electrode elec self_energy_average(elec, E[, sort])Return the k-averaged average self-energy from the electrode elec write(*args, **kwargs)Generic write method which should be overloaded in child-classes write_geometry(*args, **kwargs)This is not meant to be used -
E¶ Sampled energy-points in file
-
Eindex(E)¶ Return the closest energy index corresponding to the energy
EParameters: - E : float or int
if
int, return it-self, else return the energy index which is closests to the energy.
-
a2p(atom, elec=None)¶ Return the pivoting orbital indices (0-based) for the atoms, possibly on an electrode
This is equivalent to:
>>> p = self.o2p(self.geom.a2o(atom, True))
Parameters: - atom : array_like or int
atomic indices (0-based)
- elec : str or int or None
electrode to return pivoting indices of (if None it is the device pivoting indices).
-
a_buf¶ Atomic indices (0-based) of device atoms
-
a_dev¶ Atomic indices (0-based) of device atoms
-
base_file¶ File of the current Sile
-
btd()¶ Block-sizes for the BTD method in the device region
-
cell¶ Unit cell in file
-
chemical_potential(elec)¶ Return the chemical potential associated with the electrode elec
-
close()¶
-
dir_file(filename=None)¶ File of the current Sile
-
elecs¶ List of electrodes
-
eta(elec)¶ The imaginary part used when calculating the self-energies in eV
-
exist()¶ Query whether the file exists
-
file¶ File of the current Sile
-
geom¶ The associated geometry from this file
-
geometry¶ The associated geometry from this file
-
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
DatasetThe 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
rootvariable, 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
-
k¶ Sampled k-points in file
-
kindex(k)¶ Return the index of the k-point that is closests to the queried k-point (in reduced coordinates)
Parameters: - k : array_like of float
the queried k-point in reduced coordinates \(]-0.5;0.5]\).
-
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
-
n_btd()¶ Number of blocks in the BTD partioning in the device region
-
na¶ Returns number of atoms in the cell
-
na_b¶ Number of atoms in the buffer region
-
na_buffer¶ Number of atoms in the buffer region
-
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
-
nk¶ Number of k-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, elec=None)¶ Return the pivoting indices (0-based) for the orbitals, possibly on an electrode
Parameters: - orbital : array_like or int
orbital indices (0-based)
- elec : str or int or None
electrode to return pivoting indices of (if None it is the device pivoting indices).
-
o_dev¶ Orbital indices (0-based) of device orbitals
-
pivot(elec=None, in_device=False, sort=False)¶ Return the pivoting indices for a specific electrode
Parameters: - elec : str or int
the corresponding electrode to return the self-energy from
- in_device : bool, optional
If
Truethe pivoting table will be translated to the device region orbitals- sort : bool, optional
Whether the returned indices are sorted. Mostly useful if the self-energies are returned sorted as well.
Examples
>>> se = tbtsencSileTBtrans(...) >>> se.pivot() [3, 4, 6, 5, 2] >>> se.pivot(sort=True) [2, 3, 4, 5, 6] >>> se.pivot(0) [2, 3] >>> se.pivot(0, in_device=True) [4, 0] >>> se.pivot(0, in_device=True, sort=True) [0, 1] >>> se.pivot(0, sort=True) [2, 3]
-
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**kwargsas arguments.
-
read_geometry(*args, **kwargs)¶ Returns Geometry object from this file
-
read_supercell()¶ Returns SuperCell object from this file
-
self_energy(elec, E, k, sort=False)¶ Return the self-energy from the electrode elec
Parameters: - elec : str or int
the corresponding electrode to return the self-energy from
- E : float or int
energy to retrieve the self-energy at, if a floating point the closest energy value will be found and returned, if an integer it will correspond to the exact index
- k : array_like or int
k-point to retrieve, if an integer it is the k-index in the file
- sort : bool, optional
if
Truethe returned self-energy will be sorted (equivalent to pivoting the self-energy)
-
self_energy_average(elec, E, sort=False)¶ Return the k-averaged average self-energy from the electrode elec
Parameters: - elec : str or int
the corresponding electrode to return the self-energy from
- E : float or int
energy to retrieve the self-energy at, if a floating point the closest energy value will be found and returned, if an integer it will correspond to the exact index
- sort : bool, optional
if
Truethe returned self-energy will be sorted but not necessarily consecutive in the device region.
-
wk¶ Weights of k-points in file
-
wkpt¶ Weights of k-points in 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
**kwargsas arguments.
-
write_geometry(*args, **kwargs)¶ This is not meant to be used
-
xa¶ Atomic coordinates in file
-
xyz¶ Atomic coordinates in file
-