PAOFLOW.transport.hamiltonian.operator_blc#

Classes#

OperatorBlockView

OperatorBlock

Container for block-structured matrix data used in quantum transport calculations.

Module Contents#

class PAOFLOW.transport.hamiltonian.operator_blc.OperatorBlockView(parent, ik)[source]#
ik[source]#
parent[source]#
H[source]#
S[source]#
aux[source]#
sgm[source]#
name[source]#
dim1[source]#
dim2[source]#
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 H and overlap matrices S defined over k-points

  • Optional self-energy data sgm and auxiliary workspaces aux, sgm_aux

  • Dimensions, 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.

name: str = ''[source]#
dim1: int = 0[source]#
dim2: int = 0[source]#
nkpnts: int = 0[source]#
ne_sgm: int = 1[source]#
nrtot: int = 0[source]#
nrtot_sgm: int = 0[source]#
iunit_sgm: int = -1[source]#
iunit_sgm_opened: bool = False[source]#
ie: int = 0[source]#
ie_buff: int = 0[source]#
ik: int = 0[source]#
dimx_sgm: int = 0[source]#
tag: dict[str, str][source]#
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]#
lhave_aux = False[source]#
lhave_sgm_aux = False[source]#
lhave_ham = False[source]#
lhave_ovp = False[source]#
lhave_corr = False[source]#
ldynam_corr = False[source]#
allocated: bool = False[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.

at_k(ik)[source]#
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.

clear()[source]#

Release all allocated memory for this block.

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.

Parameters:
  • nrtot (int, optional)

  • nrtot_sgm (int, optional)

  • ie (int, optional)

  • ie_buff (int, optional)

  • ik (int, optional)

  • ldynam_corr (bool, optional)

  • tag (str, optional)

  • name (str, optional)

copy_from(other)[source]#

Copy all data and metadata from another OperatorBlock instance.

Parameters:

other (OperatorBlock) – The block to copy from.

copy()[source]#
memusage(memtype='all')[source]#

Estimate memory usage in MB for the specified memory type.

Parameters:

memtype ({"ham", "corr", "all"}) – Type of memory usage to compute.

Returns:

`usage_mb` – Estimated memory usage in megabytes.

Return type:

float

summary()[source]#

Return a human-readable summary of the block’s shape and configuration.

Returns:

`summary` – Multi-line string describing the operator block state.

Return type:

str