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
51 ProcessSearchJob(std::unique_ptr<Parameters> parameters, Runtime &rt)
52 : Job(std::move(parameters), rt),
53 fCallsSaddle{0},
54 fCallsMin{0},
56 ProcessSearchJob(std::shared_ptr<Potential> potPassed,
57 const Parameters &parameters)
58 : Job(std::move(potPassed), parameters),
59 fCallsSaddle{0},
60 fCallsMin{0},
62
63 ~ProcessSearchJob() = default;
65 std::vector<std::string> run(void) override;
67 std::shared_ptr<Matter> runFromMatter(std::shared_ptr<Matter> seed);
68
69 std::shared_ptr<Matter> getInitial() const { return initial; }
70 std::shared_ptr<Matter> getSaddle() const { return saddle; }
71 std::shared_ptr<Matter> getMin1() const { return min1; }
72 std::shared_ptr<Matter> getMin2() const { return min2; }
73 double prefactorForward() const { return prefactorsValues[0]; }
74 double prefactorReverse() const { return prefactorsValues[1]; }
75 double barrierForward() const { return barriersValues[0]; }
76 double barrierReverse() const { return barriersValues[1]; }
77
78private:
80 std::shared_ptr<Matter> runPrepared();
82 int doProcessSearch(void);
84 void printEndState(int status);
86 void saveData(int status);
87
89 std::vector<std::string> returnFiles;
90
92
96 std::unique_ptr<SaddleSearchMethod> saddleSearch;
98 std::shared_ptr<Matter> initial;
100 std::shared_ptr<Matter> saddle;
102 std::shared_ptr<Matter> displacement;
104 std::shared_ptr<Matter> min1;
106 std::shared_ptr<Matter> min2;
107
110 double barriersValues[2]{0.0, 0.0};
113 double prefactorsValues[2]{0.0, 0.0};
114
116 size_t fCallsSaddle{0};
118 size_t fCallsMin{0};
121};
122
123} // 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)
Borrow: caller keeps Runtime alive (CLI stack / Python Session).
Definition Job.h:76
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:171