60 : settings_(std::move(settings)) {}
73 const WannierGauge gauge = choice->choose(inputs, subspace);
103 log::info(
"Wigner-Seitz supercell: {} lattice vectors, total weight {:.6f} (expected {})",
108 std::vector<LocalOrbitalLatticeVector> domain;
109 std::vector<IntegerVector3D> translations;
113 domain.push_back({entry.lattice_translation,
115 1.0 /
static_cast<Real>(entry.degeneracy)});
116 translations.push_back(entry.lattice_translation);
119 std::vector<std::vector<Complex>> hamiltonian_at_kpoints;
120 hamiltonian_at_kpoints.reserve(
static_cast<std::size_t
>(number_of_kpoints));
121 for (
int kpoint_index = 0; kpoint_index < number_of_kpoints; kpoint_index++) {
122 const KPointBandClassification& entry =
123 classification.
kpoints[
static_cast<std::size_t
>(kpoint_index)];
124 std::vector<Real> kept_eigenvalues;
125 kept_eigenvalues.reserve(entry.kept_bands.size());
126 for (
const int band : entry.kept_bands) {
129 const DenseMatrix<Complex>& frame = frames[
static_cast<std::size_t
>(kpoint_index)];
133 frame.scaled_rows(kept_eigenvalues))
137 LocalOrbitalHamiltonian hamiltonian;
144 WannierConstructionSettings settings_;
const std::vector< T > & raw() const
Read-only: a caller that could resize the buffer could break rows() x columns().
WannierConstruction build(const WannierInputs &record, const Matrix3x3 &real_lattice) const
WannierHamiltonianBuilder(WannierConstructionSettings settings={})
The defaults are an isolated manifold in the projection gauge: what a record alone supports.
int number_of_lattice_vectors() const
const std::vector< WignerSeitzLatticeVector > & lattice_vectors() const
void compute(const Matrix3x3 &lattice_vectors, int grid_dimension_x, int grid_dimension_y, int grid_dimension_z, Real distance_tolerance=1e-6)
Real total_weight() const
void info(spdlog::format_string_t< Args... > fmt, Args &&... args)
std::unique_ptr< SubspaceSelection > create_subspace_selection(const WannierConstructionSettings &settings)
std::unique_ptr< GaugeChoice > create_gauge_choice(const WannierConstructionSettings &settings, const WannierConstructionInputs &inputs)
DenseMatrix< Complex > multiply(MatrixOperation left_operation, const DenseMatrix< Complex > &left, MatrixOperation right_operation, const DenseMatrix< Complex > &right, Complex alpha=Complex(1.0, 0.0))
alpha * op(left) * op(right), as a new matrix of the product's shape.
Every k-point's verdict, and the summary of the whole.
std::vector< KPointBandClassification > kpoints
static HamiltonianDecay measured_on(const LocalOrbitalHamiltonian &hamiltonian)
3×3 matrix stored row-major: row i = mat[i]
DisentanglementReport disentanglement
HamiltonianDecay hamiltonian_decay
How far H(R) has decayed by the edge of its Wigner-Seitz domain.
LocalOrbitalHamiltonian hamiltonian
WannierConstructionReport report
std::vector< DenseMatrix< Complex > > frames
BandClassification classification
DisentanglementReport report
One retained lattice vector with the number of images it ties with.