Loading...
Searching...
No Matches
TestJob.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
14#include "Job.h"
15#include "Parameters.h"
16
17#include <memory>
18#include <utility>
19
20namespace eonc {
21
22class TestJob : public Job {
23public:
24 TestJob(std::unique_ptr<Parameters> params, Runtime &rt)
25 : Job(std::move(params), rt),
26 tolerance{0.01} {}
27 ~TestJob() = default;
28 std::vector<std::string> run();
29
30private:
31 double tolerance{0.01};
32 void checkFullSearch();
33 void checkPotentials();
34 double getEnergyDiff(const std::string &potTag, double refEnergy);
35 double getForceDiff(const std::string &potTag, double refForce);
36};
37
38} // 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
Parameters params
Definition Job.h:58
Move-only composition root for process resources (dlopen loaders and the potential registry).
Definition Runtime.h:27
TestJob(std::unique_ptr< Parameters > params, Runtime &rt)
Definition TestJob.h:24
~TestJob()=default
double tolerance
Definition TestJob.h:31
void checkPotentials()
Definition TestJob.cpp:46
void checkFullSearch()
Definition TestJob.cpp:41
double getEnergyDiff(const std::string &potTag, double refEnergy)
Definition TestJob.cpp:78
std::vector< std::string > run()
Virtual run; used solely for dynamic dispatch.
Definition TestJob.cpp:35
double getForceDiff(const std::string &potTag, double refForce)
Definition TestJob.cpp:94
RAII resource manager for the ARTn C library with global synchronization.