#include <reader.hpp>
Classes | |
| struct | EigenvalueData |
| struct | NeighborEntry |
| struct | NeighborListData |
| struct | OverlapData |
| struct | ProjectionData |
Static Public Member Functions | |
| static EigenvalueData | read_eigenvalues (const std::string &file_path) |
| static NeighborListData | read_neighbor_list (const std::string &file_path) |
| static OverlapData | read_overlaps (const std::string &file_path) |
| static ProjectionData | read_projections (const std::string &file_path) |
Static Public Attributes | |
| static constexpr Real | electron_volts_per_rydberg = constants::RY_TO_EV |
eV per Rydberg; .eig is eV, WannierInputs is Rydberg. | |
Definition at line 76 of file reader.hpp.
|
inlinestatic |
.eig carries no header, so the dimensions come from the indices present and the index set must then be exactly the full rectangle – a dropped line is an error, never a hole left at zero.
operator>> stops at the first character it cannot use and reports success for the prefix it did use. A Fortran D-exponent value such as -0.557929D+01 therefore reads as -0.557929 – wrong by a power of ten, with no error – unless the remainder of the line is checked.
The table is sized from the largest indices seen, so check that the lines present can fill it before allocating it: a single line "1 2000000000 -5.0" would otherwise ask for a 100 GB table and die of std::bad_alloc instead of this diagnosis.
Definition at line 333 of file reader.hpp.
References q3::Wannier90FormatReader::EigenvalueData::eigenvalues_rydberg, electron_volts_per_rydberg, q3::Wannier90FormatReader::EigenvalueData::number_of_bands, and q3::Wannier90FormatReader::EigenvalueData::number_of_kpoints.
Referenced by q3::import_wannier90_files().
|
inlinestatic |
Read the real_lattice, recip_lattice and kpoints blocks of a .nnkp. The neighbour table itself is not read here: the interpolation path needs only the lattice (for the Wigner-Seitz construction) and the k-point list (for the Fourier transform), while the neighbour table is already carried by the .mmn whose overlaps it labels.
Definition at line 134 of file reader.hpp.
References q3::Wannier90FormatReader::NeighborListData::kpoints, q3::Wannier90FormatReader::NeighborListData::real_lattice, q3::Wannier90FormatReader::NeighborListData::reciprocal_lattice, q3::Vector3D::x, q3::Vector3D::y, and q3::Vector3D::z.
Referenced by q3::import_wannier90_files().
|
inlinestatic |
Blocks must sweep k-points in order with nntot neighbours each – the file carries no other statement of which block belongs to which k-point, so a writer that reordered them would silently mis-associate every overlap.
m fastest in the file, and WannierInputs stores M column-major with the k-side band index fastest – the same order, so the elements land in sequence with no transpose.
Definition at line 182 of file reader.hpp.
References q3::Wannier90FormatReader::OverlapData::neighbors, q3::Wannier90FormatReader::OverlapData::number_of_bands, q3::Wannier90FormatReader::OverlapData::number_of_kpoints, q3::Wannier90FormatReader::OverlapData::number_of_neighbors, q3::Wannier90FormatReader::OverlapData::overlaps, q3::internal::wannier90_format::require_plausible_element_count(), q3::IntegerVector3D::x, q3::IntegerVector3D::y, and q3::IntegerVector3D::z.
|
inlinestatic |
Every element carries its own (m, n, k) triple, so nothing is assumed about ordering: fill by index, then require that every slot was written exactly once. A duplicated triple leaves another slot silently at zero, which this catches.
Definition at line 262 of file reader.hpp.
References q3::Wannier90FormatReader::ProjectionData::number_of_bands, q3::Wannier90FormatReader::ProjectionData::number_of_kpoints, q3::Wannier90FormatReader::ProjectionData::number_of_wannier_functions, q3::Wannier90FormatReader::ProjectionData::projections, and q3::internal::wannier90_format::require_plausible_element_count().
Referenced by q3::import_wannier90_files().
|
staticconstexpr |
eV per Rydberg; .eig is eV, WannierInputs is Rydberg.
Definition at line 125 of file reader.hpp.
Referenced by read_eigenvalues().