File GenericMethodWrapper.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
Sparrow
-
class
GenericMethodWrapper
: public Utils::CloneInterface<Utils::Abstract<GenericMethodWrapper>, Core::Calculator> - #include <GenericMethodWrapper.h>
A MethodWrapper running Generic calculations.
Public Functions
-
GenericMethodWrapper
() Default Constructor.
-
~GenericMethodWrapper
() Default Destructor.
-
void
setStructure
(const Utils::AtomCollection &structure) Sets new structure and initializes the underlying method with the parameter given in the settings.
- Parameters
structure
: The structure to be assigned.
-
std::unique_ptr<Utils::AtomCollection>
getStructure
() const Getter for the underlying element types and positions.
-
void
modifyPositions
(Utils::PositionCollection newPositions) Allows to modify the positions of the underlying Utils::AtomCollection.
- Parameters
newPositions
: the new positions to be assigned to the underlying Utils::AtomCollection
-
const Utils::PositionCollection &
getPositions
() const Getter for the coordinates of the underlying Utils::AtomCollection.
-
void
setRequiredProperties
(const Utils::PropertyList &requiredProperties) Sets the properties to calculate.
- Parameters
requiredProperties
: a Utils::PropertyList object, contains an enum class that work as a bitset, switching on and off the bits representing a property.
-
Utils::PropertyList
possibleProperties
() const¶
-
const Utils::Results &
calculate
(std::string description) The main function running calculations (dummy).
- Return
double Return the result of the calculation.
- Parameters
dummy
: A dummy parameter.
-
virtual Utils::DensityMatrix
getDensityMatrixGuess
() const = 0 Getter for the initial density matrix guess.
- Return
The initial density matrix guess.
-
Utils::Settings &
settings
() Accessor for the Settings used in this method wrapper.
- Return
Utils::Settings& The Settings.
-
const Utils::Settings &
settings
() const Const accessor for the Settings used in this method wrapper.
- Return
const Utils::Settings& The Settings.
-
Utils::StatesHandler &
statesHandler
() Accessor for the StatesHandler used in this method wrapper.
- Return
Utils::StatesHandler& The StatesHandler.
-
const Utils::StatesHandler &
statesHandler
() const Const accessor for the StatesHandler used in this method wrapper.
- Return
const Utils::StatesHandler& The StatesHandler.
Protected Functions
-
virtual void
initialize
() = 0 Initializes a method with the parameter file present in the settings.
-
virtual Utils::LCAOMethod &
getLCAOMethod
() = 0 Get the underlying LCAOMethod.
-
virtual const Utils::LCAOMethod &
getLCAOMethod
() const = 0¶
-
Utils::derivativeType
highestDerivativeRequired
() const Determines the highest derivative type needed based on the property needed for calculation.
-
virtual void
applySettings
() = 0 Function to apply the settings to the actual calculation method.
This method is needed in every calculator as the modification of the settings object does not cause a direct propagation to the underlying calculation method. It is not part of the public interface as an external user should not have to decide when/where to use this. In the implementation of a calculator care must be taken that at calculation time the settings have correcly been propagated to the underlying calculator method.
-
virtual void
calculateImpl
(Utils::derivativeType requiredDerivative) = 0 Method-dependent implementation of the calculate member function.
Protected Attributes
-
std::unique_ptr<Utils::StatesHandler>
statesHandler_
¶
-
std::unique_ptr<DipoleMomentCalculator>
dipoleCalculator_
¶
-
std::unique_ptr<DipoleMatrixCalculator>
dipoleMatrixCalculator_
¶
-
Utils::PropertyList
requiredProperties_
¶
-
-
class
-
namespace