Scine::Core  3.0.0
Module management and core interface definitions
 All Classes Files Functions Variables Typedefs Pages
CalculatorWithReference.h
1 
7 #ifndef CORE_CALCULATORWITHREFERENCE_H
8 #define CORE_CALCULATORWITHREFERENCE_H
9 /* Internal Includes */
11 #include "Core/ExportControl.h"
12 /* External Includes */
13 #include <Eigen/Core>
14 #include <memory>
15 #include <string>
16 
17 namespace Scine {
18 namespace Utils {
19 class Settings;
20 class Results;
21 } // namespace Utils
22 namespace Core {
23 
24 class Calculator;
25 
33  public:
34  static constexpr const char* interface = "calculator_with_reference";
36  CalculatorWithReference() = default;
38  virtual ~CalculatorWithReference() = default;
45  virtual void setReferenceCalculator(std::shared_ptr<Calculator> referenceCalculator) = 0;
49  virtual void referenceCalculation() = 0;
50 
60  virtual const Core::Calculator& getReferenceCalculator() const = 0;
61 
66  virtual const Utils::Results& calculate() = 0;
67 
72  virtual std::string name() const = 0;
73 
78  virtual Utils::Settings& settings() = 0;
83  virtual const Utils::Settings& settings() const = 0;
87  virtual void applySettings() = 0;
92  virtual Utils::Results& results() = 0;
97  virtual const Utils::Results& results() const = 0;
98 };
99 
100 } // namespace Core
101 } // namespace Scine
102 
103 #endif // CORE_CALCULATORWITHREFERENCE_H
virtual Utils::Results & results()=0
Accessor for the saved instance of Utils::Results.
virtual void applySettings()=0
Method to apply the settings stored in the settings data structure.
virtual void setReferenceCalculator(std::shared_ptr< Calculator > referenceCalculator)=0
Sets the calculator to be used to perform the reference calculation. In the derived classes care must...
Base class for objects with a Log member.
Definition: ObjectWithLog.h:25
virtual std::string name() const =0
Getter for the name of the calculator with reference.
The interface for all classes running electronic structure calculations.
Definition: Calculator.h:30
virtual const Utils::Results & calculate()=0
The main function running the calculation with reference.
virtual ~CalculatorWithReference()=default
Virtual destructor.
virtual Utils::Settings & settings()=0
Accessor for the settings.
CalculatorWithReference()=default
Default constructor.
The interface for all classes running calculations on top of a reference calculation. This can be, for example, excited states calculation (CIS, TD-DFT(B),..) and post-HF.
Definition: CalculatorWithReference.h:32
virtual Core::Calculator & getReferenceCalculator()=0
Accessor for the reference calculator.
virtual void referenceCalculation()=0
Performs a reference calculation.