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>, public WavefunctionOutputGenerator - #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
getRequiredProperties() const Gets the properties to calculate.
- Return
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::Results &
results() Accessor for the Results stored in this method wrapper.
- Return
Utils::Results& The results of the previous calculation.
-
const Utils::Results &
results() const Const accessor for the Results used in this method wrapper.
- Return
const Utils::Results& The results of the previous calculation.
-
bool
supportsMethodFamily(const std::string &methodFamily) const Whether the calculator supports a method family In this library, every calculator supports just one “method family”: itself.
- Return
whether the calculator supports a method family
- Parameters
methodFamily: identifier for the method family
-
virtual Utils::LcaoMethod &
getLcaoMethod() = 0 Get the underlying LcaoMethod.
-
virtual const Utils::LcaoMethod &
getLcaoMethod() const = 0¶
-
std::string
getStoNGExpansionPath() const Returns a Sto-6G expansion.
-
void
generateWavefunctionInformation(const std::string &filename)¶
-
void
generateWavefunctionInformation(std::ostream &out)¶
Protected Functions
-
virtual void
initialize() = 0 Initializes a method with the parameter file present in the settings.
-
Utils::derivativeType
highestDerivativeRequired() const Determines the highest derivative type needed based on the property needed for calculation.
-
virtual void
assembleResults(const std::string &description)¶
-
virtual bool
successfulCalculation() const = 0¶
-
virtual bool
canCalculateAnalyticalHessian() const¶
-
virtual void
applySettings() 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 correctly been propagated to the underlying calculator method.
-
virtual bool
getZPVEInclusion() const = 0¶
-
virtual void
calculateImpl(Utils::derivativeType requiredDerivative) = 0 Method-dependent implementation of the calculate member function.
Protected Attributes
-
std::unique_ptr<DipoleMomentCalculator>
dipoleCalculator_¶
-
std::unique_ptr<DipoleMatrixCalculator>
dipoleMatrixCalculator_¶
-
Utils::PropertyList
requiredProperties_¶
-
-
class
-
namespace