PAOFLOW.transport.hamiltonian.operator_blc#
Classes#
Container for block-structured matrix data used in quantum transport calculations. |
Module Contents#
- class PAOFLOW.transport.hamiltonian.operator_blc.OperatorBlock(name='')[source]#
Container for block-structured matrix data used in quantum transport calculations.
This class manages related matrix data and metadata associated with a specific Hamiltonian or overlap block, including:
Hamiltonian matrices
Hand overlap matricesSdefined over k-pointsOptional self-energy data
sgmand auxiliary workspacesaux,sgm_auxDimensions, indexing information, and optional lattice vector metadata
Flags that control which types of data are active
It supports explicit allocation and cleanup of memory for these arrays, based on the simulation’s dimensionality and configuration.
- Parameters:
name (str) – Descriptive name of the operator block.
- H: numpy.ndarray | None = None[source]#
- S: numpy.ndarray | None = None[source]#
- sgm: numpy.ndarray | None = None[source]#
- aux: numpy.ndarray | None = None[source]#
- sgm_aux: numpy.ndarray | None = None[source]#
- icols: numpy.ndarray | None = None[source]#
- irows: numpy.ndarray | None = None[source]#
- icols_sgm: numpy.ndarray | None = None[source]#
- irows_sgm: numpy.ndarray | None = None[source]#
- ivr: numpy.ndarray | None = None[source]#
- ivr_sgm: numpy.ndarray | None = None[source]#
- allocate(dim1, dim2, nkpnts, ne_sgm=1, nrtot=0, nrtot_sgm=0, lhave_aux=True, lhave_sgm_aux=False, lhave_ham=True, lhave_ovp=True, lhave_corr=False)[source]#
Allocate memory for matrix blocks and auxiliary data.
- Parameters:
dim1 (int) – Number of rows in the block.
dim2 (int) – Number of columns in the block.
nkpnts (int) – Number of k-points.
ne_sgm (int) – Number of energy grid points for self-energy.
nrtot (int) – Number of real-space lattice vectors for H and S.
nrtot_sgm (int) – Number of real-space lattice vectors for Sigma.
lhave_aux (bool) – Whether to allocate auxiliary matrix.
lhave_sgm_aux (bool) – Whether to allocate auxiliary Sigma matrix.
lhave_ham (bool) – Whether to allocate the Hamiltonian matrix H.
lhave_ovp (bool) – Whether to allocate the overlap matrix S.
lhave_corr (bool) – Whether to allocate correlation self-energy Sigma.
- deallocate()[source]#
Deallocate all internal arrays and reset the OperatorBlock state.
This releases memory and resets allocation flags, mirroring the behavior of the Fortran operator_blc_deallocate routine.
- update(nrtot=None, nrtot_sgm=None, ie=None, ie_buff=None, ik=None, ldynam_corr=None, tag=None, name=None)[source]#
Update metadata associated with the operator block.
- copy_from(other)[source]#
Copy all data and metadata from another OperatorBlock instance.
- Parameters:
other (OperatorBlock) – The block to copy from.