phtsencSilePHtrans¶
-
class
sisl.io.tbtrans.
phtsencSilePHtrans
(filename, mode='r', lvl=0, access=1, *args, **kwargs)¶ Bases:
sisl.io.tbtrans.tbtsencSileTBtrans
PHtrans file object
Attributes
Sampled energy-points in file
_E2eV
__dict__
__doc__
__module__
__weakref__
list of weak references to the object (if defined)
_cmp_args
Returns the compression arguments for the NetCDF file
_trans_type
_write_default
_write_default_only
Atomic indices (0-based) of device atoms
Atomic indices (0-based) of device atoms (sorted)
File of the current Sile
Unit cell in file
List of electrodes
File of the current Sile
The associated geometry from this file
The associated geometry from this file
Sampled k-points in file
Sampled k-points in file
Last orbital of corresponding atom
Number of energy-points in file
Returns number of atoms in the cell
Number of atoms in the buffer region
Number of atoms in the buffer region
Number of atoms in the device region
Number of atoms in the device region
Returns number of atoms in the cell
Number of energy-points in file
Number of k-points in file
Number of k-points in file
Returns number of orbitals in the cell
Number of orbitals in the device region
Returns number of orbitals in the cell
Orbital indices (0-based) of device orbitals (sorted)
Weights of k-points in file
Weights of k-points in file
Atomic coordinates in file
Atomic coordinates in file
Methods
Eindex
(E)Return the closest energy index corresponding to the energy
E
_ArgumentParser_args_single
()Default arguments for the Sile
__delattr__
Implement delattr(self, name).
__dir__
Default dir() implementation.
__enter__
()Opens the output file and returns it self
__eq__
Return self==value.
__exit__
(type, value, traceback)__format__
Default object formatter.
__ge__
Return self>=value.
__getattr__
(name)Override to check the handle
__getattribute__
Return getattr(self, name).
__gt__
Return self>value.
__hash__
Return hash(self).
__init__
(filename[, mode, lvl, access])Initialize self.
__init_subclass__
This method is called when a class is subclassed.
__iter__
([group, dimension, variable, …])Iterator on all groups, variables and dimensions.
__le__
Return self<=value.
__lt__
Return self<value.
__ne__
Return self!=value.
__new__
Create and return a new object.
__reduce__
Helper for pickle.
__reduce_ex__
Helper for pickle.
__repr__
Return repr(self).
__setattr__
Implement setattr(self, name, value).
__sizeof__
Size of object in memory, in bytes.
__str__
()Return a representation of the Sile
__subclasshook__
Abstract classes can override this to customize issubclass().
_base_file
(f)Make f refer to the file with the appropriate base directory
_base_setup
(*args, **kwargs)Setup the Sile after initialization
_crt_dim
(n, name, l)_crt_grp
(n, name)_crt_var
(n, name, *args, **kwargs)_dimension
(name[, tree])Local method for obtaing the dimension in a certain tree
_dimensions
(n, name[, tree])Retrieve method to get the NetCDF variable
_elec
(elec)Converts a string or integer to the corresponding electrode name
_setup
(*args, **kwargs)Setup the Sile after initialization
_value
(name[, tree])Local method for obtaining the data from the SileCDF.
_variable
(name[, tree])Local method for obtaining the data from the SileCDF.
_variables
(n, name[, tree])Retrieve method to get the NetCDF variable
a2p
(atoms[, elec])Return the pivoting orbital indices (0-based) for the atoms, possibly on an electrode
a_down
(elec[, bulk])Down-folding atomic indices for a given electrode
a_elec
(elec)Electrode atomic indices for the full geometry (sorted)
bloch
(elec)Bloch-expansion coefficients for an electrode
btd
([elec])Block-sizes for the BTD method in the device/electrode region
chemical_potential
(elec)Return the chemical potential associated with the electrode elec
close
()dir_file
([filename])File of the current Sile
electron_temperature
(elec)Electron bath temperature [Kelvin]
eta
([elec])The imaginary part used when calculating the self-energies in eV (or for the device
exist
()Query whether the file exists
info
([elec])Information about the self-energy file available for extracting in this file
iter
([group, dimension, variable, levels, root])Iterator on all groups, variables and dimensions.
kT
(elec)Electron bath temperature [eV]
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
([elec])Number of blocks in the BTD partioning
no_down
(elec)Number of orbitals in the downfolding region (plus device downfolded region)
o2p
(orbitals[, 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 (in the device region) or the device
pivot_down
(elec)Pivoting orbitals for the downfolding region of a given electrode
read
(*args, **kwargs)Generic read method which should be overloaded in child-classes
read_geometry
(*args, **kwargs)Returns Geometry object from this file
Returns SuperCell object from this file
scattering_matrix
(elec, E[, k, sort])Return the scattering matrix from the electrode elec
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
-
property
E
¶ Sampled energy-points in file
-
Eindex
(E)¶ Return the closest energy index corresponding to the energy
E
-
a2p
(atoms, elec=None)¶ Return the pivoting orbital indices (0-based) for the atoms, possibly on an electrode
This is equivalent to:
>>> p = self.o2p(self.geometry.a2o(atom, True))
Will warn if an atom requested is not in the device list of atoms.
-
property
a_buf
¶ Atomic indices (0-based) of device atoms
-
property
a_dev
¶ Atomic indices (0-based) of device atoms (sorted)
-
a_down
(elec, bulk=False)¶ Down-folding atomic indices for a given electrode
-
a_elec
(elec)¶ Electrode atomic indices for the full geometry (sorted)
-
property
base_file
¶ File of the current Sile
-
bloch
(elec)¶ Bloch-expansion coefficients for an electrode
-
btd
(elec=None)¶ Block-sizes for the BTD method in the device/electrode region
-
property
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
-
property
elecs
¶ List of electrodes
-
eta
(elec=None)¶ The imaginary part used when calculating the self-energies in eV (or for the device
-
exist
()¶ Query whether the file exists
-
property
file
¶ File of the current Sile
-
property
geom
¶ The associated geometry from this file
-
property
geometry
¶ The associated geometry from this file
-
info
(elec=None)¶ Information about the self-energy file available for extracting in 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
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 toroot
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
-
property
k
¶ Sampled k-points in file
-
kT
(elec)¶ Electron bath temperature [eV]
See also
electron_temperature
bath temperature in [K]
-
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 or int) – the queried k-point in reduced coordinates \(]-0.5;0.5]\). If
int
return it-self.
-
property
kpt
¶ Sampled k-points in file
-
property
lasto
¶ Last orbital of corresponding atom
-
mu
(elec)¶ Return the chemical potential associated with the electrode elec
-
property
nE
¶ Number of energy-points in file
-
n_btd
(elec=None)¶ Number of blocks in the BTD partioning
-
property
na
¶ Returns number of atoms in the cell
-
property
na_b
¶ Number of atoms in the buffer region
-
property
na_buffer
¶ Number of atoms in the buffer region
-
property
na_d
¶ Number of atoms in the device region
-
property
na_dev
¶ Number of atoms in the device region
-
property
na_u
¶ Returns number of atoms in the cell
-
property
ne
¶ Number of energy-points in file
-
property
nk
¶ Number of k-points in file
-
property
nkpt
¶ Number of k-points in file
-
property
no
¶ Returns number of orbitals in the cell
-
property
no_d
¶ Number of orbitals in the device region
-
no_down
(elec)¶ Number of orbitals in the downfolding region (plus device downfolded region)
-
property
no_u
¶ Returns number of orbitals in the cell
-
o2p
(orbitals, elec=None)¶ Return the pivoting indices (0-based) for the orbitals, possibly on an electrode
Will warn if an orbital requested is not in the device list of orbitals.
-
property
o_dev
¶ Orbital indices (0-based) of device orbitals (sorted)
See also
pivot
retrieve the device orbitals, non-sorted
-
pivot
(elec=None, in_device=False, sort=False)¶ Return the pivoting indices for a specific electrode (in the device region) or the device
- Parameters
elec (str or int) – the corresponding electrode to return the pivoting indices from
in_device (bool, optional) – If
True
the pivoting table will be translated to the device region orbitals. If sort is also true, this would correspond to the orbitals directly translated to the geometryself.geometry.sub(self.a_dev)
.sort (bool, optional) – Whether the returned indices are sorted. Mostly useful if you want to handle the device in a non-pivoted order.
Examples
>>> se = tbtncSileTBtrans(...) >>> 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]
See also
pivot_down
for the pivot table for electrodes down-folding regions
-
pivot_down
(elec)¶ Pivoting orbitals for the downfolding region of a given electrode
-
read
(*args, **kwargs)¶ Generic read method which should be overloaded in child-classes
- Parameters
kwargs – keyword arguments will try and search for the attribute
read_<>
and call it with the remaining**kwargs
as arguments.
-
read_geometry
(*args, **kwargs)¶ Returns Geometry object from this file
-
read_supercell
()¶ Returns SuperCell object from this file
-
scattering_matrix
(elec, E, k=0, sort=False)¶ Return the scattering matrix from the electrode elec
The scattering matrix is calculated as:
\[\Gamma(E) = i [\Sigma(E) - \Sigma^\dagger(E)]\]- Parameters
elec (str or int) – the corresponding electrode to return the scattering matrix from
E (float or int) – energy to retrieve the scattering matrix 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
True
the returned scattering matrix will be sorted according to the order of the orbitals in the non-pivoted geometry, otherwise the scattering matrix will be returned according to the pivoted orbitals in the device region.
-
self_energy
(elec, E, k=0, 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
True
the returned self-energy will be sorted according to the order of the orbitals in the non-pivoted geometry, otherwise the self-energy will be returned according to the pivoted orbitals in the device region.
-
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
True
the returned self-energy will be sorted according to the order of the orbitals in the non-pivoted geometry, otherwise the self-energy will be returned according to the pivoted orbitals in the device region.
-
property
wk
¶ Weights of k-points in file
-
property
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
**kwargs
as arguments.
-
property
xa
¶ Atomic coordinates in file
-
property
xyz
¶ Atomic coordinates in file
-
property