PAOFLOW.topology.do_wave_function_site_projection#
Functions#
|
Write real-space site-projected wavefunction weights to a data file. |
Module Contents#
- PAOFLOW.topology.do_wave_function_site_projection.wave_function_site_projection(data_controller)[source]#
Write real-space site-projected wavefunction weights to a data file.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:tau(shape(natoms, 3)in Bohr radii),naw(number of orbitals per atom),v_k(shape(nkpnts, nawf, bnd, nspin)),bands_proj(list of band indices to project). Required attributes:nawf,do_spin_orbit,dimension,k_proj(k-point index for the projection),opath.- Returns:
Writes one text file per band index in
bands_projto{opath}/site-projected-wave-function-{bnd_idx}.dat. Each line contains the atomic position coordinates followed by the total site weight plus a small offset (0.0001) for plotting. The number of coordinate columns depends ondimension: 3 columns for 3-D, 2 columns for 2-D and 1-D systems.- Return type:
None
Notes
For each atom \(n\) and selected band index \(b\), the site-projected wavefunction weight at a fixed k-point is
\[w_n = \sum_{\mu \in n} |v^\mu_{bk}|^2\]where the sum runs over all orbital indices \(\mu\) belonging to atom \(n\). Atomic positions are converted from Bohr radii to Ångström using
ANGSTROM_AUbefore writing.When spin–orbit coupling is active (
do_spin_orbit), the wavefunction basis is doubled and both the spin-up sector \([\text{idx}, \text{fdx})\) and spin-down sector \([\text{idx}+s, \text{fdx}+s)\) (with \(s = N_{\text{wf}}/2\)) are included in the weight sum.This function is valid only for non-magnetic or non-collinear calculations (spin channel 0 is used exclusively).