pythtb.io.w90#

IO utilities for Wannier90 output files.

Classes#

HRBlock

Dataclass representing real-space Hamiltonian block \(H(R)\) with degeneracy.

W90Dataset

Dataclass for Wannier90 data.

Functions#

load_w90_dataset

Gather lattice, centre, and Hamiltonian data into a W90Dataset.

parse_unit_cell_cart

Parse unit_cell_cart into a Cartesian (3×3) lattice matrix.

read_bands_w90

Read Wannier90-interpolated band structure.

read_centres

Read prefix_centres.xyz and return Wannier centres in Cartesian coords.

read_hr

Read prefix_hr.dat returning (num_wan, {R: HRBlock}).

read_kpoint_path

Return the reduced-coordinate nodes declared in the kpoint_path block.

read_win

Return the raw lines from prefix.win.

Exceptions#

W90ConsistencyError

Raised when Wannier90 data are internally inconsistent.

W90ParseError

Raised when a Wannier90 file is missing or cannot be parsed.