PAOFLOW.inputs.read_upf#

Classes#

UPF

Parser for Unified Pseudopotential Format (UPF) files.

Module Contents#

class PAOFLOW.inputs.read_upf.UPF(filename)[source]#

Parser for Unified Pseudopotential Format (UPF) files.

Supports both UPF version 1 and version 2. On construction the file is read and all relevant header, mesh, local-potential, and pseudo-wavefunction data are stored as instance attributes.

Parameters:

filename (str) – Path to the UPF pseudopotential file.

Variables:
  • version (int) – UPF format version (1 or 2).

  • element (str) – Chemical symbol of the element.

  • ptype (str) – Pseudopotential type ('NC' for norm-conserving, 'US' for ultrasoft).

  • nlcc (bool) – Whether non-linear core correction is present.

  • qexc (str) – Exchange-correlation functional label.

  • val (float) – Number of valence electrons.

  • lmax (int) – Maximum angular momentum quantum number.

  • npoints (int) – Number of radial mesh points.

  • nwfc (int) – Number of pseudo-wavefunctions.

  • nproj (int) – Number of projectors.

  • r (np.ndarray, shape (npoints,)) – Radial mesh (Bohr).

  • rab (np.ndarray, shape (npoints,)) – Radial mesh integration weights.

  • vloc (np.ndarray, shape (npoints,)) – Local pseudopotential (Hartree).

  • pswfc (list of dict) – Pseudo-wavefunctions; each entry has keys 'label', 'occ', and 'wfc'.

  • shells (list of int) – Angular momentum quantum numbers \(l\) of occupied shells.

  • jchia (np.ndarray) – Total angular momentum \(j\) values (spin-orbit case).

  • lchia (np.ndarray) – Angular momentum \(l\) values from the spin-orbit block.

  • atrho (np.ndarray or None) – Atomic charge density, or None if absent.

  • beta (list of dict) – Kleinman–Bylander non-local projectors \(\beta_i(r)\). Each entry has keys 'l' (angular momentum), 'wfc' (the radial function as stored in the UPF file: by QE convention this is \(r\,\beta_l(r)\) sampled on r, padded with zeros beyond cutoff_index), 'cutoff_index' (first index past the projector support, or None if absent), 'cutoff_radius' (Bohr, or None), and 'label' (string identifier). Empty for UPF v1 (not yet parsed).

  • dion (np.ndarray or None, shape (nproj, nproj)) – Kleinman–Bylander coupling matrix \(D_{ij}\) in Hartree (the UPF stores Rydberg; the factor of 2 is applied on read). None for UPF v1 (not yet parsed).

  • qqq (np.ndarray or None, shape (nproj, nproj)) – Integrated augmentation matrix \(q_{ij} = \int Q_{ij}(r)\, d^3 r\) from PP_AUGMENTATION/PP_Q. None for norm-conserving pseudopotentials. Off-diagonal entries between projectors of different \(l_\beta\) are zero by construction.

  • has_augmentation (bool) – Whether the pseudopotential exposes a PP_AUGMENTATION block (true for USPP and PAW).

  • rho_atc (np.ndarray or None, shape (npoints,)) – Smooth pseudo-core density \(n_c(r)\) in \(\mathrm{Bohr}^{-3}\) from PP_NLCC. None when the pseudopotential carries no non-linear core correction.

  • ptype – Pseudopotential type ('NC' / 'US' / 'USPP' / 'PAW'). Alias of type for UPF v2.

version[source]#