PAOFLOW.projection.projection_operator#

Functions#

orbital_array(data_controller)

Count the number of spin-orbit orbitals per atom.

do_projection_operator(data_controller, proj_array)

Build the site-projected identity operator for selected atoms.

Module Contents#

PAOFLOW.projection.projection_operator.orbital_array(data_controller)[source]#

Count the number of spin-orbit orbitals per atom.

Parameters:

data_controller (DataController) – Object providing data_arrays and data_attributes. Required array: atoms (list of element labels). Required dictionary: shells (maps element label to a list of angular momentum quantum numbers \(l\)). Required attribute: dftSO (bool).

Returns:

Number of spinor orbitals per atom: \(2(2l+1)\) per shell (\(l=0 \to 2\), \(l=1 \to 6\), \(l=2 \to 10\), \(l=3 \to 14\)).

Return type:

np.ndarray, shape (natoms,), int

Notes

When dftSO is False the function returns an array of zeros.

PAOFLOW.projection.projection_operator.do_projection_operator(data_controller, proj_array)[source]#

Build the site-projected identity operator for selected atoms.

Parameters:
  • data_controller (DataController) – Object providing data_arrays and data_attributes. Required arrays: naw (shape (natoms,) — number of orbitals per atom). Required attribute: nawf.

  • proj_array (np.ndarray of int) – Indices (0-based) of the atoms whose orbitals are to be included in the projection operator.

Returns:

Block-diagonal projection matrix \(P\) with identity blocks in the orbital sub-spaces of the selected atoms and zeros elsewhere.

Return type:

np.ndarray, shape (nawf, nawf), float

Notes

For each atom index i in proj_array the corresponding \(n_{aw}[i] \times n_{aw}[i]\) identity block is placed at the appropriate diagonal position in \(P\).