21#include <boost/format.hpp>
41 std::string archive_filename) {
45 std::string tasks_string = options.
get(
".tasks").
as<std::string>();
49 std::vector<std::string> tasks = tokenizedTasks.ToVector();
51 do_guess_ = std::find(tasks.begin(), tasks.end(),
"guess") != tasks.end();
52 do_dft_input_ = std::find(tasks.begin(), tasks.end(),
"input") != tasks.end();
53 do_dft_run_ = std::find(tasks.begin(), tasks.end(),
"dft") != tasks.end();
54 do_dft_parse_ = std::find(tasks.begin(), tasks.end(),
"parse") != tasks.end();
55 do_gwbse_ = std::find(tasks.begin(), tasks.end(),
"gwbse") != tasks.end();
57 std::find(tasks.begin(), tasks.end(),
"localize") != tasks.end();
59 std::find(tasks.begin(), tasks.end(),
"dft_in_dft") != tasks.end();
73 if (options.
exists(
".logging_file")) {
103 logger = &gwbse_engine_logger;
111 <<
"Guess requested, reading molecular orbitals" << flush;
122 throw std::runtime_error(
"\n DFT-run failed. Stopping!");
134 if (!Logfile_parse) {
135 throw std::runtime_error(
"\n Parsing DFT logfile " +
dftlog_file_ +
136 " failed. Stopping!");
139 if (!Orbfile_parse) {
140 throw std::runtime_error(
"\n Parsing DFT orbfile " +
MO_file_ +
141 " failed. Stopping!");
151 throw std::runtime_error(
152 "MO localization not implemented for open-shell systems");
161 <<
"Loading serialized data from " <<
archive_file_ << flush;
164 if (orbitals.
getLMOs().size() == 0) {
165 throw std::runtime_error(
166 "Can't do DFT in DFT embedding without localization");
174 throw std::runtime_error(
175 "DFT-in-DFT not implemented for open-shell systems");
180 throw std::runtime_error(
"\n DFT in DFT embedding failed. Stopping!");
183 if (!Logfile_parse) {
184 throw std::runtime_error(
"\n Parsing DFT logfile " +
dftlog_file_ +
185 " failed. Stopping!");
188 if (!Orbfile_parse) {
189 throw std::runtime_error(
"\n Parsing DFT orbfile " +
MO_file_ +
190 " failed. Stopping!");
200 throw std::runtime_error(
"GWBSE not implemented for open-shell systems");
213 orbitals = orb_embedded;
232 if (!ofs.is_open()) {
233 throw std::runtime_error(
"Bad file handle: " +
logger_file_);
235 ofs << (*pLog) << std::endl;
std::string archive_file_
void WriteLoggerToFile(Logger *pLog)
tools::Property gwbse_options_
void ExcitationEnergies(Orbitals &orbitals)
std::string guess_archiveA_
tools::Property localize_options_
void Initialize(tools::Property &options, std::string archive_filename)
std::string guess_archiveB_
Electronic excitations from GW-BSE.
void addoutput(tools::Property &summary)
void Initialize(tools::Property &options)
void setLogger(Logger *pLog)
Logger is used for thread-safe output of messages.
void setPreface(Log::Level level, const std::string &preface)
Log::Level getReportLevel() const
void setMultithreading(bool maverick)
container for molecular orbitals
Index getNumOfActiveElectrons()
void PrepareDimerGuess(const Orbitals &orbitalsA, const Orbitals &orbitalsB)
Guess for a dimer based on monomer orbitals.
void setNumberOfAlphaElectrons(Index electrons)
const Eigen::MatrixXd & getLMOs() const
void setNumberOfOccupiedLevels(Index occupied_levels)
const tools::EigenSystem & MOs() const
void ReadFromCpt(const std::string &filename)
const tools::EigenSystem & getEmbeddedMOs() const
void computePML(Orbitals &orbitals)
void setLog(Logger *pLog)
bool GuessRequested() const
void setLogFileName(const std::string &log_file_name)
std::string getMOFile() const
virtual bool WriteInputFile(const Orbitals &orbitals)=0
writes a coordinate file WITHOUT taking into account PBCs
virtual bool ParseLogFile(Orbitals &orbitals)=0
virtual bool ParseMOsFile(Orbitals &orbitals)=0
void setMOsFileName(const std::string &mo_file)
std::string getLogFile() const
#define XTP_LOG(level, log)
base class for all analysis tools