File Calculator.h¶
- Copyright
This code is licensed under the 3-clause BSD license.
Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.
See LICENSE.txt for details.
-
namespace
Scine¶ -
namespace
Core¶ -
class
Calculator: public Scine::Core::StateHandableObject, public Scine::Core::ObjectWithStructure - #include <Calculator.h>
The interface for all classes running electronic structure calculations.
Public Functions
-
Calculator() Default constructor.
-
virtual
~Calculator() Default destructor.
-
virtual void
setRequiredProperties(const Utils::PropertyList &requiredProperties) = 0 Sets the properties to calculate.
- Parameters
requiredProperties: A Utils::PropertyList, a sequence of bits that represent the properties that must be calculated.
-
virtual Utils::PropertyList
getRequiredProperties() const = 0 Gets the current properties to calculate.
-
virtual Utils::PropertyList
possibleProperties() const = 0 Returns the list of the possible properties to calculate analytically.
By some method analytical hessian calculation is not possible. In this case the hessian calculation is done seminumerically.
-
virtual const Utils::Results &
calculate(std::string description = "") = 0 The main function running calculations.
- Return
Utils::Result Return the result of the calculation. The object contains the properties that were given as requirement by the Calculator::setRequiredProperties function.
- Parameters
description: The calculation description.
-
virtual std::string
name() const = 0 Getter for the name of the Calculator.
- Return
Returns the name of the Calculator.
-
std::unique_ptr<Core::Calculator>
clone() const Method allowing to clone the derived class into a Core::Calculator The derived, leaf class needs to inherit from Utils::CloneInterface and, if needed, implement a custom copy constructor.
This reduces boilerplate code.
-
virtual Utils::Settings &
settings() = 0 Accessor for the settings.
- Return
Utils::Settings& The settings.
-
virtual const Utils::Settings &
settings() const = 0 Constant accessor for the settings.
- Return
const Utils::Settings& The settings.
-
virtual Utils::Results &
results() = 0 Accessor for the saved instance of Utils::Results.
- Return
Utils::Results& The results of the previous calculation.
-
virtual const Utils::Results &
results() const = 0 Constant accessor for the Utils::Results.
- Return
const Utils::Results& The results of the previous calculation.
-
virtual bool
supportsMethodFamily(const std::string &methodFamily) const = 0 Whether the calculator supports a method family.
- Return
whether the calculator supports a method family
- Parameters
methodFamily: identifier for the method family
Public Static Functions
-
static auto
supports(const std::string &methodFamily) Predicate-generator for ModuleManager’s get<Interface, UnaryPredicate> function.
- Return
A lambda capturing the method family that checks passed interface pointer objects for method family support
- Parameters
methodFamily: The method family to check support for
Public Static Attributes
-
constexpr const char *
interface= "calculator"¶
Private Functions
-
virtual Core::Calculator *
cloneImpl() const = 0¶
-
-
class
-
namespace