Scine::Readuct  6.0.0
This is the SCINE module ReaDuct.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Scine::Readuct::Task Class Referenceabstract

The base class for all tasks in Readuct. More...

#include <Task.h>

Inheritance diagram for Scine::Readuct::Task:
Inheritance graph
Collaboration diagram for Scine::Readuct::Task:
Collaboration graph

Public Types

using SystemsMap = std::map< std::string, std::shared_ptr< Core::Calculator >>
 

Public Member Functions

 Task (std::vector< std::string > input, std::vector< std::string > output, std::shared_ptr< Core::Log > logger=nullptr)
 Construct a new Task. More...
 
virtual std::string name () const =0
 Getter for the tasks name. More...
 
virtual bool run (SystemsMap &systems, Utils::UniversalSettings::ValueCollection taskSettings, bool test=false, std::vector< std::function< void(const int &, const Utils::AtomCollection &, const Utils::Results &, const std::string &)>> observers={}) const =0
 Executes the actual task represented by this class. More...
 
const std::vector< std::string > & input () const
 Getter for the expected names of the input systems. More...
 
const std::vector< std::string > & output () const
 Getter for the names of the output systems generated by this task. More...
 
void warningIfMultipleInputsGiven () const
 Warn if more than one input system was specified.
 
void warningIfMultipleOutputsGiven () const
 Warn if more than one output system was specified.
 
bool stopOnErrorExtraction (Utils::UniversalSettings::ValueCollection &taskSettings) const
 

Static Public Member Functions

static std::shared_ptr
< Core::Calculator
copyCalculator (SystemsMap &systems, const std::string &name, const std::string &taskName)
 
static std::string falseTaskSettingsErrorMessage (const std::string &name)
 

Protected Attributes

const std::vector< std::string > _input
 
const std::vector< std::string > _output
 
std::shared_ptr< Core::Log_logger
 

Detailed Description

The base class for all tasks in Readuct.

Constructor & Destructor Documentation

Scine::Readuct::Task::Task ( std::vector< std::string >  input,
std::vector< std::string >  output,
std::shared_ptr< Core::Log logger = nullptr 
)
inline

Construct a new Task.

Parameters
inputThe input system names for the task.
outputThe output system names for the task.
loggerThe logger to/through which all text output will be handled.

Member Function Documentation

const std::vector<std::string>& Scine::Readuct::Task::input ( ) const
inline

Getter for the expected names of the input systems.

Returns
const std::vector<std::string>& The names of all systems expected as inputs.
const std::vector<std::string>& Scine::Readuct::Task::output ( ) const
inline

Getter for the names of the output systems generated by this task.

Returns
const std::vector<std::string>& The names of all systems generated as output.
virtual bool Scine::Readuct::Task::run ( SystemsMap &  systems,
Utils::UniversalSettings::ValueCollection  taskSettings,
bool  test = false,
std::vector< std::function< void(const int &, const Utils::AtomCollection &, const Utils::Results &, const std::string &)>>  observers = {} 
) const
pure virtual

Executes the actual task represented by this class.

Parameters
systemsA map for all current and new systems.
taskSettingsThe settings for this run of the task.
testIf true does not run task, but checks input.
observersAdds these additional observers to optimization algorithms.
Returns
true If successful.
false If not successful.

Implemented in Scine::Readuct::IntegralTask, Scine::Readuct::TsOptimizationTask, Scine::Readuct::SinglePointTask, Scine::Readuct::GeometryOptimizationTask, Scine::Readuct::HessianTask, Scine::Readuct::IrcTask, Scine::Readuct::AfirOptimizationTask, Scine::Readuct::BondOrderTask, Scine::Readuct::NtOptimization2Task, and Scine::Readuct::NtOptimizationTask.


The documentation for this class was generated from the following file: