38 throw std::runtime_error(
39 "the mean-field record carries no self-consistent potential (a record read "
40 "back from mean-field.q3mf does not store it; export from the run itself)");
43 std::ofstream output_file(file_path, std::ios::binary);
44 if (!output_file.is_open()) {
45 throw std::runtime_error(
"cannot open " + file_path +
" for writing");
50 log::info(
" Wrote BerkeleyGW self-consistent potential file: {}", file_path);
One per-spin field on the charge-density G-set, in RHO's layout; see the file comment.
void write(std::ofstream &output_file) const
Writes header, G-set and field to an open stream; throws if the field is not on the G-set.
Writes VSC from a mean-field record; see the file comment.
BerkeleyGWSelfConsistentPotentialFile(const MeanFieldRecord &&)=delete
See BerkeleyGWChargeDensityFile: this holds a reference.
void write_to_file(const std::string &file_path) const
Writes the file, or throws – before creating it – when the record carries no potential.
BerkeleyGWSelfConsistentPotentialFile(const MeanFieldRecord &record)
void info(spdlog::format_string_t< Args... > fmt, Args &&... args)
std::vector< std::vector< Complex > > self_consistent_potential_g