Loading...
Searching...
No Matches
ProcessSearchJob.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13#include "EonLogger.h"
14
15#include "Job.h"
16#include "Matter.h"
17#include "MinModeSaddleSearch.h"
18#include "Parameters.h"
19
20namespace eonc {
21
40
44
45class ProcessSearchJob : public Job {
46public:
48
52 ProcessSearchJob(std::unique_ptr<Parameters> parameters, Runtime &rt)
53 : Job(std::move(parameters), rt), fCallsSaddle{0}, fCallsMin{0},
55 ProcessSearchJob(std::shared_ptr<Potential> potPassed,
56 const Parameters &parameters)
57 : Job(std::move(potPassed), parameters), fCallsSaddle{0}, fCallsMin{0},
59
60 ~ProcessSearchJob() = default;
62 std::vector<std::string> run(void) override;
64 std::shared_ptr<Matter> runFromMatter(std::shared_ptr<Matter> seed);
65
66 std::shared_ptr<Matter> getInitial() const { return initial; }
67 std::shared_ptr<Matter> getSaddle() const { return saddle; }
68 std::shared_ptr<Matter> getMin1() const { return min1; }
69 std::shared_ptr<Matter> getMin2() const { return min2; }
70 double prefactorForward() const { return prefactorsValues[0]; }
71 double prefactorReverse() const { return prefactorsValues[1]; }
72 double barrierForward() const { return barriersValues[0]; }
73 double barrierReverse() const { return barriersValues[1]; }
74
75private:
77 std::shared_ptr<Matter> runPrepared();
79 int doProcessSearch(void);
81 void printEndState(int status);
83 void saveData(int status);
84
86 std::vector<std::string> returnFiles;
87
89
93 std::unique_ptr<SaddleSearchMethod> saddleSearch;
95 std::shared_ptr<Matter> initial;
97 std::shared_ptr<Matter> saddle;
99 std::shared_ptr<Matter> displacement;
101 std::shared_ptr<Matter> min1;
103 std::shared_ptr<Matter> min2;
104
107 double barriersValues[2]{0.0, 0.0};
110 double prefactorsValues[2]{0.0, 0.0};
111
113 size_t fCallsSaddle{0};
115 size_t fCallsMin{0};
118};
119
120} // namespace eonc
The job class is used to serve as an abstract class for all jobs, as well as to call a job at runtime...
Job(std::unique_ptr< Parameters > parameters, Runtime &rt, ExclusivePotential)
Definition Job.h:71
std::shared_ptr< Matter > displacement
Configuration used during the saddle point search.
size_t fCallsPrefactors
Force calls to find the prefactors.
eonc::log::Scoped log
size_t fCallsMin
Force calls to minimize.
std::shared_ptr< Matter > min1
First minimum from the saddle.
std::shared_ptr< Matter > getInitial() const
std::vector< std::string > returnFiles
Container for the results of the run.
double barrierForward() const
~ProcessSearchJob()=default
Process Search job De-constructor.
void printEndState(int status)
Logs the run status and makes sure the run was successful.
std::shared_ptr< Matter > min2
Second minimum from the saddle.
std::shared_ptr< Matter > saddle
Configuration used during the saddle point search.
std::vector< std::string > run(void) override
Kicks off the Process Search.
std::shared_ptr< Matter > getMin1() const
std::shared_ptr< Matter > getSaddle() const
double prefactorForward() const
std::shared_ptr< Matter > initial
Initial configuration.
std::shared_ptr< Matter > getMin2() const
std::unique_ptr< SaddleSearchMethod > saddleSearch
Pulled from parameters.
ProcessSearchJob(std::shared_ptr< Potential > potPassed, const Parameters &parameters)
size_t fCallsSaddle
Force calls to find the saddle.
void saveData(int status)
Writes the results from the run to file.
std::shared_ptr< Matter > runFromMatter(std::shared_ptr< Matter > seed)
In-process entry: seed reactant Matter, no pos.con.
std::shared_ptr< Matter > runPrepared()
double barrierReverse() const
ProcessSearchJob(std::unique_ptr< Parameters > parameters, Runtime &rt)
Process Search job Constructor.
int doProcessSearch(void)
Runs the correct saddle search; also checks if the run was successful.
double prefactorReverse() const
Move-only composition root for process resources (dlopen loaders and the potential registry).
Definition Runtime.h:27
RAII resource manager for the ARTn C library with global synchronization.
RAII helper for class-scoped logging.
Definition EonLogger.h:238