PAOFLOW.projection.augmentation#

Augmented overlap of ultrasoft and PAW pseudopotentials for the internal projections.

The pseudo-wavefunctions of an ultrasoft or PAW calculation are orthonormal in the metric

\[S = 1 + \sum_{a}\sum_{ij} q^{a}_{ij}\,|\beta^{a}_i\rangle\langle\beta^{a}_j|,\]

not in the plain plane-wave one, so the projection of a Bloch state on an atomic orbital is \(\langle\phi|S|\psi\rangle\), the Gram matrix of the atomic orbitals is \(\langle\phi|S|\phi\rangle\) (what projwfc.x uses and writes with lwrite_overlaps) and the bands must not be re-orthonormalised. Re-orthonormalising the truncated set of nbnd pseudo-wavefunctions with the plain overlap, the former workaround of PAOFLOW.projection.do_atwfc_proj.read_QE_wfc(), mixes the bands where the nbnd cut crosses a multiplet and breaks the point symmetry of the PAO Hamiltonian at those k-points (GaAs, October 2026: 0.65 eV at 16 of 4096 grid points, a 5-25 meV spread of the interpolated eigenvalues between equivalent k and a 2-5 % violation of the tensor symmetry of the second-order optical responses).

The projectors \(\beta^{a}_i(\mathbf k+\mathbf G)\) and the integrated augmentation charges \(q^{a}_{ij}\) (PP_Q of the UPF) come from PAOFLOW.elphon.pseudopotential_terms.KleinmanBylanderProjectors.

With spin-orbit coupling (fully relativistic ultrasoft / PAW pseudopotentials, npol = 2) the charges are rotated into the spinor basis, QE’s qq_so,

\[S = 1 + \sum_{a}\sum_{kl}\sum_{s_1 s_2} q^{a,s_1 s_2}_{kl}\, |\beta^{a}_k s_1\rangle\langle\beta^{a}_l s_2|, \qquad q^{s_1 s_2}_{kl} = \sum_{ij}\sum_{s} q_{ij}\, f^{s_1 s}_{ki}\, f^{s s_2}_{jl},\]

with \(f\) the rotation from the real-harmonic projectors to the \(|l\,j\,m_j\rangle\) spinors (QE fcoef), and the inner products run over both spinor components.

Classes#

AugmentedOverlap

The operator S - 1 of a cell: projectors at k + G and the charges q_ij.

Functions#

k_plus_g_vectors(gkspace)

k + G of a wavefunction block (bohr^-1), as built by calc_atwfc_k.

is_augmented(upf)

Whether a pseudopotential (UPF or POTCAR dataset) carries augmentation charges (ultrasoft or PAW).

plain_overlap_warning(data_controller[, requested])

Report that the projections use the plain plane-wave overlap.

build_augmentation(data_controller)

The augmented overlap of the run, or None when the plain overlap is the right one.

Module Contents#

PAOFLOW.projection.augmentation.k_plus_g_vectors(gkspace)[source]#

k + G of a wavefunction block (bohr^-1), as built by calc_atwfc_k.

Parameters:

gkspace (dict) – G-space descriptor of PAOFLOW.projection.do_atwfc_proj.read_QE_wfc() ('xk', 'mill', 'bg' in bohr^-1).

Return type:

ndarray (npw, 3)

PAOFLOW.projection.augmentation.is_augmented(upf)[source]#

Whether a pseudopotential (UPF or POTCAR dataset) carries augmentation charges (ultrasoft or PAW).

class PAOFLOW.projection.augmentation.AugmentedOverlap(kb, tau_alat, tpiba)[source]#

The operator S - 1 of a cell: projectors at k + G and the charges q_ij.

Parameters:
  • kb (KleinmanBylanderProjectors) – Built with require_norm_conserving=False; its Q (scalar relativistic) or Q_so (spin-orbit coupling, spin_orbit=True) holds the block matrix of the integrated augmentation charges.

  • tau_alat (ndarray (nat, 3)) – Atomic positions (Cartesian, alat units).

  • tpiba (float) – 2 pi / alat (bohr^-1).

spin_orbit[source]#
kb[source]#
tau_alat[source]#
tpiba[source]#
property nproj: int[source]#

Number of projectors (all atoms, all m).

beta(k_plus_g)[source]#

beta_p(k+G) on one sphere.

Parameters:

k_plus_g (ndarray (npw, 3)) – k + G (Cartesian, bohr^-1).

Return type:

ndarray (nproj, npw), complex

becp(beta, functions)[source]#

<beta_p|f_i> of a set of functions on one sphere.

Parameters:
  • beta (ndarray (nproj, npw)) – beta() of the sphere.

  • functions (ndarray (nf, npw) or (nf, 2 npw)) – Plane-wave coefficients (rows = functions); with spin-orbit coupling the two spinor components are concatenated (upper then lower, as QE stores them).

Returns:

  • ndarray (nproj, nf), or (2, nproj, nf) with spin-orbit coupling (one block per

  • spinor component), complex

overlap(a, b, beta, becp_a=None, becp_b=None)[source]#

<a_i|S|b_j> for two sets of functions on the same sphere.

Parameters:
  • a (ndarray (na, npw), (nb, npw)) – Plane-wave coefficients (rows = functions); (na, 2 npw) spinors with spin-orbit coupling.

  • b (ndarray (na, npw), (nb, npw)) – Plane-wave coefficients (rows = functions); (na, 2 npw) spinors with spin-orbit coupling.

  • beta (ndarray (nproj, npw)) – beta() on the same sphere.

  • becp_a (ndarray, optional) – becp() of a and b when already available.

  • becp_b (ndarray, optional) – becp() of a and b when already available.

Return type:

ndarray (na, nb), complex

PAOFLOW.projection.augmentation.plain_overlap_warning(data_controller, requested=False)[source]#

Report that the projections use the plain plane-wave overlap.

Parameters:
  • data_controller (DataController) – The run (species, dft).

  • requested (bool, optional) – The user asked for the plain overlap (projections(plain_overlap=True)).

Returns:

Prints a WARNING when any species is ultrasoft / PAW (every VASP run), for which the plain overlap is an approximation; for norm-conserving pseudopotentials, for which it is the exact metric, a note is printed in verbose mode only.

Return type:

None

PAOFLOW.projection.augmentation.build_augmentation(data_controller)[source]#

The augmented overlap of the run, or None when the plain overlap is the right one.

Parameters:

data_controller (DataController) – Required arrays: species, atoms, tau; attributes dft, fpath, ecutwfc, omega, alat, dftSO.

Returns:

None when every species is norm-conserving, when an augmented species comes from a UPF v1 file whose projectors and charges are not parsed, or when the POTCAR datasets of a VASP run are not found (a warning names the problem and the plain-overlap path is kept). With spin-orbit coupling the charges of the fully relativistic pseudopotentials are rotated into the spinor basis (kb.Q_so); a scalar-relativistic species in such a run, and every VASP dataset (scalar relativistic, spin-orbit coupling added by VASP at run time), couples the spins diagonally, as in QE.

Return type:

AugmentedOverlap or None

Notes

VASP datasets are read through PAOFLOW.inputs.pseudopotentials (fpath/POTCAR, attr['potcar_dir'] or $PAOFLOW_POTCAR_DIR); their projectors at k+G come from the reciprocal-space tables of the file, the ones VASP applies with LREAL = .FALSE..