PAOFLOW.sparse.bands#
Band structure along a high-symmetry path, sparse iterative version.
Mirrors spectrum.do_bands scaffolding exactly — same k-path generation
(kpnts_interpolation_mesh, including the Angstrom/Bohr alat dance
and the in-place rotation of kq to Cartesian by b_vectors), same
MPI k-scatter — but replaces the dense Fourier sum + eigh with the
fixed-pattern sparse assembly (sign=+1, the band-path phase
convention) and the iterative solve_lowest, computing only the lowest
nsel bands. Eigenvectors are used solely to warm-start the next
k-point and are never stored.
Convention note: the dense path diagonalizes the upper triangle of a
slightly non-Hermitian interpolated H(k) (eigh(lower=False)); the
sparse path solves the exactly Hermitian interpolant (Nyquist-split, the
zero_pad convention). The two differ by O(|H(R)| at the Nyquist
shell), far below plotting resolution for converged R grids.
Attributes#
Functions#
|
Compute the band structure along the interpolation path. |
Module Contents#
- PAOFLOW.sparse.bands.do_bands_sparse(data_controller, sparse_h, nsel, verbose=False, hk_solver='auto', ehi=None, interior=None)[source]#
Compute the band structure along the interpolation path.
- Parameters:
data_controller (DataController) – Run state. Supplies the k-path (or the parameters to build one) and receives
arrays['E_k'], this rank’s slice of the bands, shaped(nkpi_local, nsel, nspin)as in the dense pipeline.sparse_h (SparseHamiltonian) – Bond list the Bloch Hamiltonian is assembled from at each k-point.
nsel (int) – Number of lowest bands to compute. Ignored when
interioris given.verbose (bool, optional) – Log progress every few percent of this rank’s k-points.
hk_solver ({'auto', 'sparse', 'dense'}, optional) – Per-k-point kernel, chosen once for the whole path (see
select_hk_solver()).ehi (float or None, optional) – Top of the energy window
nselwas sized for (eV). Enables the same window-coverage guard the mesh pass uses: a path k-point whose highest computed band falls belowehiis counted, and a non-zero global count raises after the loop.interior ((float, float) or None, optional) – Energy window
(elo, ehi)in eV. Solves inside the window instead of from the bottom of the spectrum.
- Returns:
Results are written into
data_controllerarrays, matching the dense layout.- Return type:
None
Notes
A band structure is the eigenvalue spectrum of \(H(\mathbf{k})\) sampled along a path through the Brillouin zone. Each k-point is an independent Hermitian eigenproblem, so the path is scattered across MPI ranks and solved point by point; nothing couples neighbouring k-points except the warm start.
Two pieces of unit and frame bookkeeping are inherited verbatim from the dense
do_bands, because the path generator and the assembler expect them.alatis converted from Bohr to Angstrom around the call that builds the path and converted back afterwards, and the resulting fractional k-points are rotated into Cartesian coordinates in place with the reciprocal lattice vectors — the sparse assembler consumes Cartesian k on the band path (cart=True), in units of \(2\pi/a\).Neighbouring points on a path are close in k, so their lowest eigenvectors are nearly the same vector. The previous point’s ground state is therefore handed to the iterative solver as its starting vector, which shortens the Krylov iteration measurably; it is a pure convergence aid and never affects the converged result. Apart from that, the eigenvectors are discarded — a band plot needs only energies.
Under
interiorthe number of states inside the window is a property of the band structure at that k-point, so it varies along the path (a band crossing an edge is in at one point and out at the next). The output is padded to the global maximum with NaN, unlike the mesh pass, which pads with a far-away energy because its consumers evaluate smearing kernels there. Here the numbers are written straight tobands_*.datand plotted, so a missing state must read as missing rather than as a band at some plausible-looking energy. The columns are then no longer band indices.