Loading...
Searching...
No Matches
init.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * InterpolatedBandStructureCalculator — eigenvalues along an arbitrary list
5 * of k-points, from a QuantumStateInterpolator.
6 *
7 * Interpolation when the model came from a coarse-mesh construction (Wannier
8 * functions, a Fourier fit): exact at the mesh points, an interpolation
9 * everywhere else, with an error set by the method -- how fast H(R) decays,
10 * how many star functions were fitted. Not interpolation at all when the
11 * model came from real-space integrals in an atomic-orbital basis; then every
12 * k-point is as good as every other. The calculator is the same in both
13 * cases, which is why it is written against the interpolator interface and
14 * not against any one method's model.
15 */
16
17#include <vector>
18
21
22namespace q3 {
23
24/// Eigenvalues along a k-path, one row per k-point.
25struct [[nodiscard]] InterpolatedBandStructure {
26 std::vector<Vector3D> kpoint_coordinates;
27 /// [path_index][band_index], Rydberg, ascending within each row.
28 std::vector<std::vector<Real>> eigenvalues_rydberg;
29};
30
32 public:
34 : interpolator_(interpolator) {}
35
36 /// Eigenvalues at each supplied k-point, in crystal coordinates.
37 [[nodiscard]] InterpolatedBandStructure
38 compute(const std::vector<Vector3D>& kpoint_coordinates) const {
40 bands.kpoint_coordinates = kpoint_coordinates;
41 bands.eigenvalues_rydberg.reserve(kpoint_coordinates.size());
42 for (const Vector3D& kpoint : kpoint_coordinates) {
43 bands.eigenvalues_rydberg.push_back(interpolator_.eigenvalues_at(kpoint));
44 }
45 return bands;
46 }
47
48 private:
49 const QuantumStateInterpolator& interpolator_;
50};
51
52} // namespace q3
InterpolatedBandStructure compute(const std::vector< Vector3D > &kpoint_coordinates) const
Eigenvalues at each supplied k-point, in crystal coordinates.
Definition init.hpp:38
InterpolatedBandStructureCalculator(const QuantumStateInterpolator &interpolator)
Definition init.hpp:33
virtual std::vector< Real > eigenvalues_at(const Vector3D &kpoint) const =0
Ascending eigenvalues in Rydberg at one k-point in crystal coordinates.
Eigenvalues along a k-path, one row per k-point.
Definition init.hpp:25
std::vector< Vector3D > kpoint_coordinates
Definition init.hpp:26
std::vector< std::vector< Real > > eigenvalues_rydberg
[path_index][band_index], Rydberg, ascending within each row.
Definition init.hpp:28