PAOFLOW.hamiltonian.do_j_to_lm#
Rotate a fully-relativistic Hamiltonian from the J basis to the lm basis.
Fully-relativistic QE calculations (dftSO=True) express the Hamiltonian in
the coupled total-angular-momentum basis |j, m_j>. This module rotates the
PAOFLOW native real-space Hamiltonian into the QE real-spherical-harmonic (lm)
basis, in global_spin_block ordering – all spin-up lm orbitals first, then
all spin-down lm orbitals – which matches the layout produced by
PAOFLOW.adhoc_spin_orbit. After the rotation the orbital character (s/p/d,
m) is well defined, so the orbital-resolved band routines
(orbital_projected_bands(), species_orbital_projected_bands(),
character_projected_bands()) can be used.
Conventions follow Quantum ESPRESSO / projwfc.x:
p orbitals:
p_z, p_x, p_yd orbitals:
d_z2, d_zx, d_zy, d_x2-y2, d_xy
The per-shell transformation matrices below are taken from a validated
notebook (J basis -> QE real harmonics, global_spin_block order) and have
been checked for unitarity. Only s, p and d shells (l = 0, 1, 2) are
implemented.
Attributes#
Functions#
Number of real (lm) orbitals for angular momentum |
|
Spinful dimension of one angular-momentum shell, 2*(2l+1). |
|
|
Reorder rows from |
|
l = 0 block, J basis -> QE real basis. Columns |1/2,-1/2>, |1/2,+1/2>. |
|
l = 1 block, J basis -> QE real basis. QE order p_z, p_x, p_y. |
|
l = 2 block, J basis -> QE real basis. QE order d_z2, d_zx, d_zy, d_x2-y2, d_xy. |
|
Per-shell J -> QE real transformation matrix for l = 0, 1, or 2. |
|
Block-diagonal constructor (complex), without scipy. |
|
Row permutation from shell-by-shell spin blocks to global spin blocks. |
|
Build the full J -> lm transformation matrix for a flat shell list. |
|
Per-column labels of the Hamiltonian before the transform (J basis). |
|
Per-column labels of the Hamiltonian after the transform (lm basis). |
|
Rotate the real-space Hamiltonian from the J basis to the lm basis. |
Module Contents#
- PAOFLOW.hamiltonian.do_j_to_lm.n_real_orbitals_l(l)[source]#
Number of real (lm) orbitals for angular momentum
l.
- PAOFLOW.hamiltonian.do_j_to_lm.shell_dimension(l)[source]#
Spinful dimension of one angular-momentum shell, 2*(2l+1).
- PAOFLOW.hamiltonian.do_j_to_lm.spin_block_to_orbital_spin(U, norb)[source]#
Reorder rows from
[all up][all down]to[orb1 up, orb1 down, ...].
- PAOFLOW.hamiltonian.do_j_to_lm.U_s_QE(output_order='spin_block')[source]#
l = 0 block, J basis -> QE real basis. Columns |1/2,-1/2>, |1/2,+1/2>.
- PAOFLOW.hamiltonian.do_j_to_lm.U_p_QE(output_order='spin_block')[source]#
l = 1 block, J basis -> QE real basis. QE order p_z, p_x, p_y.
- PAOFLOW.hamiltonian.do_j_to_lm.U_d_QE(output_order='spin_block')[source]#
l = 2 block, J basis -> QE real basis. QE order d_z2, d_zx, d_zy, d_x2-y2, d_xy.
- PAOFLOW.hamiltonian.do_j_to_lm.U_l_QE(l, output_order='spin_block')[source]#
Per-shell J -> QE real transformation matrix for l = 0, 1, or 2.
- PAOFLOW.hamiltonian.do_j_to_lm.block_diag(mats)[source]#
Block-diagonal constructor (complex), without scipy.
- PAOFLOW.hamiltonian.do_j_to_lm.global_spin_block_permutation(shells)[source]#
Row permutation from shell-by-shell spin blocks to global spin blocks.
Maps row order
[shell1 up, shell1 down, shell2 up, shell2 down, ...]to[all up orbitals, all down orbitals]. Acts on the rows of the block-diagonalU; the columns stay in the original PAOFLOW/J order.
- PAOFLOW.hamiltonian.do_j_to_lm.build_U_spd(shells, output_order='global_spin_block', check_unitary=True)[source]#
Build the full J -> lm transformation matrix for a flat shell list.
- Parameters:
shells (list of int) – Angular momenta in PAOFLOW/QE block order (0=s, 1=p, 2=d), one entry per (n, l) shell, concatenated over atoms in the Hamiltonian’s atom order.
output_order (str) – ‘global_spin_block’ (default; all up orbitals then all down orbitals, matching
adhoc_spin_orbit), ‘spin_block’, or ‘orbital_spin’.check_unitary (bool) – If True, raise when
Uis not unitary to 1e-12.
- Returns:
U – Satisfies
H_lm = U H_J U^dagger.- Return type:
np.ndarray, shape
(2N, 2N), complex
- PAOFLOW.hamiltonian.do_j_to_lm.j_basis_labels(data_controller)[source]#
Per-column labels of the Hamiltonian before the transform (J basis).
Each entry is
'<site>_<l>_j<j>_mj<mj>'in the column order assumed for the fully-relativisticHRs: atom-major, shell-by-shell, and within each(n,l)shell thej = l-1/2block (2lstates) followed by thej = l+1/2block (2l+2states), each withm_jascending. Length== nawf. Site is'<species><site-index>'to disambiguate equivalent atoms.
- PAOFLOW.hamiltonian.do_j_to_lm.lm_basis_labels(data_controller)[source]#
Per-column labels of the Hamiltonian after the transform (lm basis).
QE real spherical harmonics in
global_spin_blockorder (theadhoc_soclayout): all spin-up lm orbitals first, then all spin-down, each block atom-major and shell-by-shell inORBITALS_QEorder. Length== nawf. Site is'<species><site-index>'.
- PAOFLOW.hamiltonian.do_j_to_lm.j_to_lm_hamiltonian(data_controller, shells=None, check_unitary=True)[source]#
Rotate the real-space Hamiltonian from the J basis to the lm basis.
Transforms
arry['HRs']in place to the QE real-harmonic (lm) basis inglobal_spin_blockordering, refreshesarry['Hks']to stay consistent, and rebuildsarry['basis']as the lm spatial orbitals so the orbital-resolved band routines interpret the new basis correctly.- Parameters:
data_controller (DataController) – Must provide
arry['HRs'](shape(nawf, nawf, nk1, nk2, nk3, nspin)), and – whenshellsis None –arry['atoms']andarry['shells'](dict species -> list of l).shells (list of int, optional) – Flat shell list (0=s, 1=p, 2=d) in the Hamiltonian’s atom/shell order. Defaults to the list built from
arry['atoms']/arry['shells'].check_unitary (bool) – Forwarded to
build_U_spd().
- Returns:
The transformation matrix
Uused (shape(nawf, nawf)).- Return type:
np.ndarray