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), tolerance{0.01} {}
26 ~TestJob() = default;
27 std::vector<std::string> run();
28
29private:
30 double tolerance{0.01};
31 void checkFullSearch();
32 void checkPotentials();
33 double getEnergyDiff(const std::string &potTag, double refEnergy);
34 double getForceDiff(const std::string &potTag, double refForce);
35};
36
37} // 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
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:30
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:95
RAII resource manager for the ARTn C library with global synchronization.