PAOFLOW.spectrum.do_site_projected_bands#
Functions#
|
Write site-projected band weights to a data file. |
Module Contents#
- PAOFLOW.spectrum.do_site_projected_bands.site_projeted_bands(data_controller)[source]#
Write site-projected band weights to a data file.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:v_k(shape(nkpi, nawf, bnd, nspin)),E_k(shape(nkpi, bnd, nspin)),site_proj(1-D int array of site indices to project onto),naw(number of atomic orbitals per atom). Required attributes:nawf,do_spin_orbit. Attributeopathis used for output.- Returns:
Writes one text file per spin channel to
{opath}/site-projected-bands_{ispin}.dat. Each line contains three whitespace-separated values: k-point index (int), band energy (float, eV), and the site-projected spectral weight (float).- Return type:
None
Notes
For each selected site in
site_proj, the orbital indices \([\text{idx}, \text{fdx})\) belonging to that site are identified using the cumulative sum ofnaw. A complex mask is applied to the eigenvector arrayv_kto retain only those orbital components, and the spectral weight is computed as \(\sum_\mu |v^\mu_{nk}|^2\).When
do_spin_orbitis enabled, the spin-orbit-doubled basis is accounted for by also including the upper spin sector \([\text{idx}+s, \text{fdx}+s)\) where \(s = N_{\text{wf}}/2\).