34 const std::string& directory,
35 const std::string& prefix)
const override {
36 if (record.
method !=
"wannier") {
37 throw std::invalid_argument(
"Wannier90Exporter: the record was built by the '" +
39 "' method and carries no Wannier interface matrices");
42 Matrix3x3 reciprocal_lattice_inverse_angstrom;
43 for (
int row = 0; row < 3; row++) {
44 real_lattice_angstrom[row] =
46 reciprocal_lattice_inverse_angstrom[row] =
49 std::filesystem::create_directories(directory);
50 const std::string seedname = directory +
"/" + prefix;
55 log::warn(
"wrote {}.amn and .eig only: this record carries no neighbour table or "
56 "overlaps (it was imported from projections and eigenvalues), so no .nnkp "
57 "or .mmn is written -- the files it was imported from are those",
63 real_lattice_angstrom,
64 reciprocal_lattice_inverse_angstrom);
66 log::info(
"wrote {}.mmn, .amn, .eig and .nnkp", seedname);
69 [[nodiscard]] std::string
name()
const override {
std::string name() const override
Format name as accepted by the input ("none", "wannier90", ...).
void export_to_directory(const InterpolationRecord &record, const std::string &directory, const std::string &prefix) const override
constexpr Real ANGSTROM_TO_BOHR
Ångström → Bohr (ANGSTROM_AU)
constexpr Real BOHR_RADIUS_ANGSTROM
Bohr radius in Ångströms (BOHR_RADIUS_SI * 1e10; BOHR_RADIUS_ANGSTROM)
void warn(spdlog::format_string_t< Args... > fmt, Args &&... args)
void info(spdlog::format_string_t< Args... > fmt, Args &&... args)
WannierInputs wannier
Payload for method == "wannier": interface matrices on the full k-grid.
Matrix3x3 real_lattice_bohr
Rows a1, a2, a3, Cartesian, in bohr.
std::string method
The method that built the payload: "wannier".
Matrix3x3 reciprocal_lattice_inverse_bohr
Rows b1, b2, b3, Cartesian, in inverse bohr, with the 2 pi included.
3×3 matrix stored row-major: row i = mat[i]