Class Scine::Core::Calculator¶
-
class
Calculator
¶ The interface for all classes running electronic structure calculations.
Public Functions
-
Calculator
()¶ Default Constructor.
-
virtual
~Calculator
()¶ Default Destructor.
-
virtual void
setStructure
(const Utils::AtomCollection &structure) = 0¶ Changes the molecular structure to calculate.
- Parameters
structure
: A new Utils::AtomCollection to save.
-
virtual std::unique_ptr<Utils::AtomCollection>
getStructure
() const = 0¶ Gets the molecular structure as a const Utils::AtomCollection&.
- Return
a const Utils::AtomCollection&.
-
virtual void
modifyPositions
(Utils::PositionCollection newPositions) = 0¶ Allows to modify the positions of the underlying Utils::AtomCollection.
- Parameters
newPositions
: the new positions to be assigned to the underlying Utils::AtomCollection
-
virtual const Utils::PositionCollection &
getPositions
() const = 0¶ Getter for the coordinates of the underlying Utils::AtomCollection.
-
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
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 (dummy).
- 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::StatesHandler &
statesHandler
() = 0¶ Accessor for the StatesHandler.
- Return
Utils::StatesHandler& The StatesHandler.
-
virtual const Utils::StatesHandler &
statesHandler
() const = 0¶ Constant accessor for the StatesHandler.
- Return
const Utils::StatesHandler& The StatesHandler.
-