PAOFLOW.transport.conductor_energy_loop#

Classes#

ParallelGridGeometry

Local (per-MPI-rank) k-point and real-space grid geometry.

ConductorAccumulators

Transport observable accumulators updated across the (E, k) grid.

Functions#

initialize_kpoint_operator_buffers(*, data, nkpts_par, ...)

Allocate per-energy k-resolved operator buffers.

compute_kpoint_conductor_quantities(*, data, ...)

Compute conductor operators at one energy and one k-point.

transform_k_to_r_at_energy(*, data, ie_g, gC_k, ...)

Transform local k-space operators to real-space operators at one energy.

process_energy_point(*, data, blc_blocks, egrid, ...)

Process all k-points for one local energy index.

reduce_conductor_results(*, comm, data, acc)

Reduce distributed transport results across MPI ranks.

Module Contents#

class PAOFLOW.transport.conductor_energy_loop.ParallelGridGeometry[source]#

Local (per-MPI-rank) k-point and real-space grid geometry.

Variables:
  • nkpts_par (int) – Number of local k-points.

  • nrtot_par (int) – Number of local real-space vectors.

  • dimC (int) – Conductor block dimension.

  • vkpt_par3D (NDArray[np.float64]) – Local k-point coordinates, shape (3, nkpts_par).

  • vr_par3D (NDArray[np.float64]) – Local real-space vectors, shape (nrtot_par, 3).

  • wk_par (NDArray[np.float64]) – Local k-point weights, shape (nkpts_par,).

nkpts_par: int[source]#
nrtot_par: int[source]#
dimC: int[source]#
vkpt_par3D: numpy.typing.NDArray[numpy.float64][source]#
vr_par3D: numpy.typing.NDArray[numpy.float64][source]#
wk_par: numpy.typing.NDArray[numpy.float64][source]#
class PAOFLOW.transport.conductor_energy_loop.ConductorAccumulators[source]#

Transport observable accumulators updated across the (E, k) grid.

Variables:
  • conduct (NDArray[np.float64]) – Total conductance and optional eigenchannels, shape (1 + neigchn, ne).

  • dos (NDArray[np.float64]) – Total DOS, shape (ne,).

  • conduct_k (NDArray[np.float64]) – k-resolved conductance, shape (1 + neigchn, nkpts_par, ne).

  • dos_k (NDArray[np.float64]) – k-resolved DOS, shape (ne, nkpts_par).

  • gf_out (NDArray[np.complex128] or None) – Real-space Green’s function accumulator, shape (ne, nrtot_par, dimC, dimC), or None when not requested.

  • rsgmL_out (NDArray[np.complex128] or None) – Real-space left self-energy accumulator, same shape, or None.

  • rsgmR_out (NDArray[np.complex128] or None) – Real-space right self-energy accumulator, same shape, or None.

conduct: numpy.typing.NDArray[numpy.float64][source]#
dos: numpy.typing.NDArray[numpy.float64][source]#
conduct_k: numpy.typing.NDArray[numpy.float64][source]#
dos_k: numpy.typing.NDArray[numpy.float64][source]#
gf_out: numpy.typing.NDArray[numpy.complex128] | None = None[source]#
rsgmL_out: numpy.typing.NDArray[numpy.complex128] | None = None[source]#
rsgmR_out: numpy.typing.NDArray[numpy.complex128] | None = None[source]#
PAOFLOW.transport.conductor_energy_loop.initialize_kpoint_operator_buffers(*, data, nkpts_par, dimC)[source]#

Allocate per-energy k-resolved operator buffers.

Parameters:
  • data (ConductorData) – Validated transport input and runtime flags.

  • nkpts_par (int) – Number of local k-points.

  • dimC (int) – Conductor block dimension.

Returns:

(gC_k, sgmL_k, sgmR_k) where each entry is a complex128 array of shape (nkpts_par, dimC, dimC) when requested by output flags, otherwise None.

Return type:

tuple

PAOFLOW.transport.conductor_energy_loop.compute_kpoint_conductor_quantities(*, data, blc_blocks, egrid, delta, ie_g, ik)[source]#

Compute conductor operators at one energy and one k-point.

Parameters:
  • data (ConductorData) – Validated transport input data and runtime flags.

  • blc_blocks (Mapping[str, Any]) – Dictionary of block operators. Required keys include blc_00C, blc_00L, blc_01L, blc_00R, blc_01R, blc_LC, and blc_CR.

  • egrid (NDArray[np.float64]) – Energy grid in eV, shape (ne,).

  • delta (float) – Positive infinitesimal broadening added to the retarded Green’s function denominator.

  • ie_g (int) – Global energy index into egrid.

  • ik (int) – Local k-point index.

Returns:

(gC, sigma_L, sigma_R, niter_sum), where gC is the conductor retarded Green’s function, sigma_L and sigma_R are lead self-energies, and niter_sum is the total Sancho-Rubio iteration count used to converge the transfer matrices.

Return type:

tuple[NDArray[np.complex128], NDArray[np.complex128], NDArray[np.complex128], int]

Notes

The sequence is:

  1. Update k-resolved Hamiltonian blocks at the selected energy.

  2. Compute lead self-energies from block couplings.

  3. Build the conductor Green’s function

    \[G_C^r = \left[\left(E + i\delta\right)I - H_C - \Sigma_L - \Sigma_R\right]^{-1}.\]
PAOFLOW.transport.conductor_energy_loop.transform_k_to_r_at_energy(*, data, ie_g, gC_k, sgmL_k, sgmR_k, acc, geom)[source]#

Transform local k-space operators to real-space operators at one energy.

Parameters:
  • data (ConductorData) – Validated transport input and runtime flags.

  • ie_g (int) – Global energy index.

  • gC_k (NDArray[np.complex128] or None) – k-resolved conductor Green’s function, shape (nkpts_par, dimC, dimC).

  • sgmL_k (NDArray[np.complex128] or None) – k-resolved left self-energy, shape (nkpts_par, dimC, dimC).

  • sgmR_k (NDArray[np.complex128] or None) – k-resolved right self-energy, shape (nkpts_par, dimC, dimC).

  • acc (ConductorAccumulators) – Observable accumulators; the real-space gf_out, rsgmL_out, and rsgmR_out arrays are updated in place for ie_g.

  • geom (ParallelGridGeometry) – Local k-point and real-space grid geometry.

Returns:

Updates acc.gf_out, acc.rsgmL_out, and acc.rsgmR_out in place for ie_g when the corresponding output flags are enabled.

Return type:

None

PAOFLOW.transport.conductor_energy_loop.process_energy_point(*, data, blc_blocks, egrid, delta, ie_g, ie_start, ie_end, rank, geom, acc)[source]#

Process all k-points for one local energy index.

Parameters:
  • data (ConductorData) – Validated transport input and runtime flags.

  • blc_blocks (Mapping[str, Any]) – Block-operator dictionary for Hamiltonian and coupling terms.

  • egrid (NDArray[np.float64]) – Energy grid in eV, shape (ne,).

  • delta (float) – Broadening parameter used in retarded quantities.

  • ie_g (int) – Global energy index being processed.

  • ie_start (int) – First energy index owned by this rank.

  • ie_end (int) – Last energy index owned by this rank.

  • rank (int) – MPI rank.

  • geom (ParallelGridGeometry) – Local k-point and real-space grid geometry.

  • acc (ConductorAccumulators) – Observable accumulators updated in place for ie_g.

Returns:

Updates acc.conduct, acc.dos, acc.conduct_k, acc.dos_k and optional real-space operator arrays in place for ie_g.

Return type:

None

PAOFLOW.transport.conductor_energy_loop.reduce_conductor_results(*, comm, data, acc)[source]#

Reduce distributed transport results across MPI ranks.

Parameters:
  • comm (MPI.Comm) – MPI communicator used for collective reductions.

  • data (ConductorData) – Validated transport input and runtime flags.

  • acc (ConductorAccumulators) – Observable accumulators reduced in place across ranks.

Returns:

Applies in-place MPI.Allreduce with MPI.SUM to all enabled arrays.

Return type:

None