Virtual run; used solely for dynamic dispatch.
31 {
33
34 std::vector<std::string> returnFiles;
35
36 auto matter = std::make_unique<Matter>(
pot,
params);
37
40 throw std::runtime_error("failed to load " + matter_in);
41 }
42
44
45
46
48 matter.get(),
params.hessian_options().phva_atoms);
49 const bool no_mobile = mobile.size() == 0;
50 bool freqs_ok = false;
51 bool modes_ok = false;
52 if (!no_mobile) {
53 const VectorXd freqs = hessian.getFreqs(matter.get(), mobile);
54 freqs_ok = freqs.size() > 0;
55 if (freqs_ok &&
params.hessian_options().write_modes) {
57 "modes.con");
58 if (!modes_ok) {
60 }
61 }
62 }
63
64 std::string results_file("results.dat");
65 returnFiles.push_back(results_file);
66
67 const auto status =
70 status,
params.potential_options().potential,
72 env.job_type = "hessian";
73 env.extras.emplace_back("force_calls", static_cast<double>(env.force_calls));
74 env.writeResultsDat(results_file);
75 if (std::filesystem::exists("hessian.dat")) {
76 returnFiles.push_back("hessian.dat");
77 }
78 if (modes_ok) {
79 returnFiles.push_back("modes.con");
80 }
81
82 return returnFiles;
83}
#define EONC_LOG_ERROR(...)
#define EONC_LOG_CRITICAL(...)
std::shared_ptr< Potential > pot
static PotRegistry & get() noexcept
Process-lifetime singleton.
size_t total_force_calls() const noexcept
std::string getRelevantFile(std::string filename)
constexpr bool io_ok(IoStatus s) noexcept
VectorXi resolveMobileAtoms(const Matter *matter, const std::string &atomList)
PHVA-class mobile set for FD Hessian and matrix-free Krylov (Lanczos / Davidson).
bool writeNormalModes(Matter &matter, const VectorXi &atoms, const VectorXd &eigenvalues, const MatrixXd &modes, const std::string &path)
Writes one frame of matter per mode to path, the mode as the displacements section and mode_eigenvalu...
static JobResultEnvelope fromMinimization(RunStatus status, PotType pot, std::uint64_t fcalls, bool hasE, double energy)