Loading...
Searching...
No Matches
q3::internal::wannier_payload Namespace Reference

Functions

WannierInputs read (std::istream &stream)
 
void write (std::ostream &stream, const WannierInputs &record)
 

Detailed Description

The Wannier method's payload inside an interpolation record: WannierInputs to bytes and back.

Split from the envelope in io/interpolation/checkpoint.hpp because it is the one part of that file that knows a method. The envelope holds what every record has – magic, version, method name, lattice, Fermi level – and dispatches to a payload; a second method adds a file beside this one and a case there, and touches nothing else.

wannier/ is the METHOD, not the file format: wannier90/ beside it holds the interchange format that another code reads. This payload is Q3's own .q3ip layout and is not interchangeable with anything.

Layout, in order: the grid, band, trial-orbital and spin counts, the Fermi level, the k-points, the neighbour directions, the overlaps, the projections, the eigenvalues, the projectabilities, the trial-orbital centres. Anything added here is a format change and needs the envelope's version bumped: a field added without one decodes as garbage in a consumer far from the mistake.

Function Documentation

◆ read()

WannierInputs q3::internal::wannier_payload::read ( std::istream &  stream)
inline

Every per-k array either covers the k-point list or is absent – an imported record carries no overlaps – and nothing in between; a partial one would misassign k-points silently downstream.

Shapes inside each k-point, too. A file whose layout drifted from this reader's (a field added without a version bump, a truncated write) decodes into plausible-looking counts with impossible blocks; refusing here names the file, where a consumer's later out-of-range access would name nothing.

Definition at line 82 of file payload.hpp.

References q3::WannierInputs::eigenvalues_rydberg, q3::WannierInputs::fermi_energy_rydberg, q3::KPointNeighborDirection::grid_step, q3::WannierInputs::kpoint_coordinates, q3::WannierInputs::kpoint_grid_dimensions, q3::WannierInputs::neighbor_directions, q3::WannierInputs::number_of_bands, q3::WannierInputs::number_of_spin_components, q3::WannierInputs::number_of_trial_orbitals, q3::WannierInputs::overlap_matrices, q3::WannierInputs::projectabilities, q3::WannierInputs::projection_matrices, q3::internal::interpolation_stream::read_vector3d(), q3::KPointNeighborDirection::reciprocal_lattice_translation, q3::internal::interpolation_stream::require_bytes_available(), q3::WannierInputs::trial_orbital_centers_bohr, q3::KPointNeighborDirection::weight, q3::IntegerVector3D::x, q3::IntegerVector3D::y, and q3::IntegerVector3D::z.

Referenced by q3::read_interpolation_record().

◆ write()