PAOFLOW.elphon.fold#

Fold the supercell PAO Hamiltonian derivative to the primitive cell (P2).

The finite-difference derivative dV lives in the supercell PAO basis over the supercell real-space grid. Because the supercell is an exact tiling of the primitive cell, every supercell orbital maps to (primitive orbital, cell translation) and every supercell lattice vector combines with the sub-cell translations to a primitive lattice vector. Displacing the reference-cell atom kappa (translation T = 0) therefore gives, after re-indexing,

dV_prim_{ij}(R_p) = d<0, i | H | R_p, j> / du_{kappa, 0},

the primitive real-space electron-phonon derivative on the (denser) primitive grid N_p = diag(S) * N_supercell – i.e. back on the original unit-cell k/R grid. The atom mapping is done in Cartesian coordinates, so it is robust to any difference in lattice orientation or atom ordering between codes.

Only diagonal supercell matrices are handled here (the common isotropic / anisotropic-diagonal case); a general matrix would need a Smith-normal-form enumeration of the sub-cells.

Functions#

supercell_atom_translations(phonon[, tol])

Map each supercell atom to its primitive atom and cell translation.

fold_dV_to_primitive(dV_sc, s2p, translations, ...)

Re-index a supercell derivative into the primitive electron-phonon tensor.

supercell_naw(phonon, configuration, pp_filenames, pp_dir)

PAO orbital count per supercell atom for a basis configuration.

Module Contents#

PAOFLOW.elphon.fold.supercell_atom_translations(phonon, tol=0.0001)[source]#

Map each supercell atom to its primitive atom and cell translation.

Returns:

  • s2p (ndarray, shape (natom_sc,)) – Primitive-atom index (0..nprim-1) of every supercell atom.

  • translations (ndarray, shape (natom_sc, 3), int) – Integer primitive-lattice translation of every supercell atom.

PAOFLOW.elphon.fold.fold_dV_to_primitive(dV_sc, s2p, translations, naw_per_atom, supercell_matrix)[source]#

Re-index a supercell derivative into the primitive electron-phonon tensor.

Displacing atom kappa in supercell cell 0 and reading the supercell matrix element <T_A, i | H | R_sc + T_B, j> gives, by translational invariance, the primitive real-space electron-phonon tensor

g_{ij}(R_e, R_p) = d<0, i | H | R_e, j> / du_{kappa, R_p},

with the electron hopping R_e = S . R_sc + T_B - T_A (primitive grid) and the phonon cell R_p = -T_A (reduced to the sub-cell / commensurate q grid). Using every bra cell T_A (not only the reference cell) recovers the full R_p dependence, i.e. the coupling at all |det S| commensurate q-points.

Parameters:
  • dV_sc (ndarray) – (nawf_sc, nawf_sc, n1, n2, n3, nspin) supercell derivative (FFT-ordered real-space axes).

  • s2p (ndarray) – Output of supercell_atom_translations().

  • translations (ndarray) – Output of supercell_atom_translations().

  • naw_per_atom (array_like, shape (natom_sc,)) – PAO orbitals on each supercell atom (same order as dV_sc).

  • supercell_matrix (array_like) – Diagonal (3, 3) supercell matrix.

Returns:

(nawf_prim, nawf_prim, N1e, N2e, N3e, s1, s2, s3, nspin) electron- phonon tensor: R_e on the primitive grid (Nie = S_ii * n_i) and R_p on the sub-cell grid (si = S_ii).

Return type:

ndarray

PAOFLOW.elphon.fold.supercell_naw(phonon, configuration, pp_filenames, pp_dir)[source]#

PAO orbital count per supercell atom for a basis configuration.