Loading...
Searching...
No Matches
SaddleSearchJob.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 "HelperFunctions.h"
16#include "Job.h"
17#include "Matter.h"
18#include "MinModeSaddleSearch.h"
19#include "Parameters.h"
20#include "SaddleSearchMethod.h"
21
22namespace eonc {
23
40
44
45class SaddleSearchJob : public Job {
46public:
48
51 SaddleSearchJob(std::unique_ptr<Parameters> parameters, Runtime &rt)
52 : Job(std::move(parameters), rt),
53 fCallsSaddle{0} {}
54
55 ~SaddleSearchJob(void) = default;
57 std::vector<std::string> run(void) override;
59 std::shared_ptr<Matter> runFromMatter(std::shared_ptr<Matter> seed);
60
61private:
62 std::shared_ptr<Matter> runPrepared(const AtomMatrix &mode);
64 int doSaddleSearch();
66 void printEndState(int status);
68 void saveData(int status);
69
71 std::vector<std::string> returnFiles;
72
74 std::unique_ptr<SaddleSearchMethod> saddleSearch;
76 std::shared_ptr<Matter> initial;
78 std::shared_ptr<Matter> saddle;
80 std::shared_ptr<Matter> displacement;
81
84
86};
87
88} // namespace eonc
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
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
Move-only composition root for process resources (dlopen loaders and the potential registry).
Definition Runtime.h:27
std::unique_ptr< SaddleSearchMethod > saddleSearch
Initializes a ref SaddleSearchMethod (base class for polymorphism).
std::vector< std::string > returnFiles
Container for the results of the run.
std::shared_ptr< Matter > runFromMatter(std::shared_ptr< Matter > seed)
In-process entry: seed reactant Matter, no pos.con.
std::shared_ptr< Matter > saddle
Configuration used during the saddle point search.
eonc::log::Scoped log
SaddleSearchJob(std::unique_ptr< Parameters > parameters, Runtime &rt)
Saddle Search job constructor.
std::vector< std::string > run(void) override
Kicks off the Saddle Search.
int doSaddleSearch()
Runs the correct saddle search; also checks if the run was successful.
int fCallsSaddle
Force calls to find the saddle.
~SaddleSearchJob(void)=default
Saddle Search Job Deconstructor.
std::shared_ptr< Matter > displacement
Configuration used during the saddle point search.
void saveData(int status)
Writes the results from the run to file.
void printEndState(int status)
Logs the run status and makes sure the run was successful.
std::shared_ptr< Matter > initial
Initial configuration.
std::shared_ptr< Matter > runPrepared(const AtomMatrix &mode)
RAII resource manager for the ARTn C library with global synchronization.
RAII helper for class-scoped logging.
Definition EonLogger.h:171