Virtual run; used solely for dynamic dispatch.
24 {
25 std::vector<std::string> returnFiles;
27 std::string resultsFilename("results.dat");
28
29 auto pos = std::make_unique<Matter>(
pot,
params);
31 QUILL_LOG_CRITICAL(
log,
"Failed to load {}", posInFilename);
32 throw std::runtime_error("failed to load " + posInFilename);
33 }
34
35 QUILL_LOG_DEBUG(
log,
"Energy: {:.12f}", pos->getPotentialEnergy());
36 std::stringstream freeForcesStream;
37 freeForcesStream << pos->getForcesFree();
38 QUILL_LOG_DEBUG(
log,
"(free) Forces:\n{}", freeForcesStream.str());
39 QUILL_LOG_DEBUG(
log,
"Max atom force: {:.12f}", pos->maxForce());
40
41
42
43
47 env.job_type = "point";
48 env.extras.emplace_back("Energy", pos->getPotentialEnergy());
49 env.extras.emplace_back("Max_Force", pos->maxForce());
50 env.writeResultsDat(resultsFilename);
51 returnFiles.push_back(resultsFilename);
52
53 return returnFiles;
54}
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
static JobResultEnvelope fromMinimization(RunStatus status, PotType pot, std::uint64_t fcalls, bool hasE, double energy)