PAOFLOW.hamiltonian.two_center_blocks#

Vectorised two-centre overlap and dipole blocks between two atom-centred orbital sets.

The element-wise primitives of PAOFLOW.hamiltonian._two_center evaluate one \((l_A m_A, l_B m_B)\) matrix element at a time, with a Simpson quadrature per \((\text{channel}_A, \text{channel}_B, L)\) and a Python loop over \((L, M)\) and the Gaunt coefficients. For a basis with many shells and hundreds of lattice pairs this costs tens of seconds (Si, 44 orbitals: \(1.4\times10^5\) quadratures, \(2.5\times10^6\) angular terms). This module evaluates the same expressions for a whole pair of sites at once:

\[S_{(a m_a)(b m_b)}(\mathbf d) = 8 \sum_L i^{\,l_a - l_b - L}\, I^{ab}_L(d) \sum_M G(l_a m_a; l_b m_b; L M)\, Y_{LM}(\hat{\mathbf d}), \qquad I^{ab}_L(d) = \int_0^\infty q^2 J^a_{l_a}(q) J^b_{l_b}(q)\, j_L(q d)\, dq,\]

with the radial integrals of every channel pair and every \(L\) from one Simpson call on a (channels, L, q) array, and the angular sums as contractions of precomputed Gaunt tensors with the vector \(Y_{LM}(\hat{\mathbf d})\). The dipole block uses the modified bra \(g_a(r) = r R_a(r)\) at \(L' = l_a \pm 1\) and the product expansion \(Y_{1 m_\alpha} Y_{l_a m_a} = \sum G(1 m_\alpha; l_a m_a; L' M') Y_{L' M'}\) of two_center_dipole_overlap(). Rows and columns follow PAOFLOW’s orbital order (channel-major, Quantum ESPRESSO magnetic order), and the numbers agree with the element-wise primitives to rounding.

Functions#

gaunt_tensor(l_a, l_b, big_l)

Real Gaunt coefficients \(G(l_a m_a; l_b m_b; L M)\) as an array (2l_a+1, 2l_b+1, 2L+1).

qe_order(l)

Positions of the standard m = -l..l harmonics in PAOFLOW's (Quantum ESPRESSO) order.

two_center_pair_blocks(bra_channels, ket_channels, ...)

Overlap and intrinsic-dipole blocks of all orbitals of two sites at one displacement.

Module Contents#

PAOFLOW.hamiltonian.two_center_blocks.gaunt_tensor(l_a, l_b, big_l)[source]#

Real Gaunt coefficients \(G(l_a m_a; l_b m_b; L M)\) as an array (2l_a+1, 2l_b+1, 2L+1).

Magnetic indices run from \(-l\) to \(+l\) along each axis.

PAOFLOW.hamiltonian.two_center_blocks.qe_order(l)[source]#

Positions of the standard m = -l..l harmonics in PAOFLOW’s (Quantum ESPRESSO) order.

PAOFLOW.hamiltonian.two_center_blocks.two_center_pair_blocks(bra_channels, ket_channels, displacement, q_grid, *, include_dipole=True)[source]#

Overlap and intrinsic-dipole blocks of all orbitals of two sites at one displacement.

Parameters:
  • bra_channels (list of (l, J_l(q), J_g_by_Lp)) – Radial channels of the bra site: angular momentum, radial Bessel transform \(J_l(q)\) of \(R(r)\) on q_grid, and (for the dipole) the transforms of the modified bra \(g(r) = r R(r)\) keyed by \(L' \in \{|l-1|, l+1\}\) (None if include_dipole is false).

  • ket_channels (list of (l, J_l(q))) – Radial channels of the ket site.

  • displacement (ndarray, shape (3,)) – \(\mathbf d = \boldsymbol\tau_{\rm ket} + \Delta\mathbf R - \boldsymbol\tau_{\rm bra}\) (bohr).

  • q_grid (ndarray, shape (n_q,)) – Reciprocal-space Simpson grid shared by all transforms.

  • include_dipole (bool, optional) – Also build the dipole block (origin on the bra site).

Returns:

  • overlap (ndarray, shape (n_bra, n_ket)) – \(\langle \varphi_a | \varphi_b(\cdot - \mathbf d)\rangle\) for every (channel, m) of the bra rows and ket columns, channel-major, QE magnetic order.

  • dipole (ndarray, shape (3, n_bra, n_ket)) – \(\langle \varphi_a | r_\alpha | \varphi_b(\cdot - \mathbf d)\rangle\) with \(\mathbf r\) measured from the bra centre (bohr); zeros when include_dipole is false.