7 #ifndef SPARROW_GENERICMETHODWRAPPER_H
8 #define SPARROW_GENERICMETHODWRAPPER_H
19 #include <unordered_map>
26 class AdditiveElectronicContribution;
31 class DipoleMatrixCalculator;
32 class DipoleMomentCalculator;
55 std::unique_ptr<Utils::AtomCollection>
getStructure()
const final;
130 void generateWavefunctionInformation(
const std::string& filename)
final;
131 void generateWavefunctionInformation(std::ostream& out)
final;
133 void loadState(std::shared_ptr<Core::State> state)
override;
134 std::shared_ptr<Core::State> getState()
const final;
137 std::unique_ptr<Utils::Settings> settings_;
143 virtual void assembleResults(
const std::string& description);
145 virtual bool successfulCalculation()
const = 0;
146 virtual bool canCalculateAnalyticalHessian()
const;
148 void checkBasicSettings();
160 virtual bool getZPVEInclusion()
const = 0;
163 virtual void calculateImpl(Utils::Derivative requiredDerivative) = 0;
165 std::unique_ptr<DipoleMomentCalculator> dipoleCalculator_;
166 std::unique_ptr<DipoleMatrixCalculator> dipoleMatrixCalculator_;
virtual void initialize()=0
Initializes a method with the parameter file present in the settings.
GenericMethodWrapper()
Default Constructor.
A MethodWrapper running Generic calculations.
Definition: GenericMethodWrapper.h:38
Utils::PropertyList getRequiredProperties() const final
Gets the properties to calculate.
Definition: GenericMethodWrapper.cpp:129
void modifyPositions(Utils::PositionCollection newPositions) final
Allows to modify the positions of the underlying Utils::AtomCollection.
Definition: GenericMethodWrapper.cpp:113
void setStructure(const Utils::AtomCollection &structure) final
Sets new structure and initializes the underlying method with the parameter given in the settings...
Definition: GenericMethodWrapper.cpp:101
virtual void calculateImpl(Utils::Derivative requiredDerivative)=0
Method-dependent implementation of the calculate member function.
virtual void addElectronicContribution(std::shared_ptr< Utils::AdditiveElectronicContribution > contribution)=0
Interface method to add an electronic contribution to the Hamiltonian.
const Utils::Results & calculate(std::string description) final
The main function running calculations (dummy).
Definition: GenericMethodWrapper.cpp:58
virtual Utils::DensityMatrix getDensityMatrixGuess() const =0
Getter for the initial density matrix guess.
Utils::Results & results() final
Accessor for the Results stored in this method wrapper.
Definition: GenericMethodWrapper.cpp:50
std::unique_ptr< Utils::AtomCollection > getStructure() const final
Getter for the underlying element types and positions.
Definition: GenericMethodWrapper.cpp:109
Utils::Derivative highestDerivativeRequired() const
Determines the highest derivative type needed based on the property needed for calculation.
Definition: GenericMethodWrapper.cpp:141
const Utils::PositionCollection & getPositions() const final
Getter for the coordinates of the underlying Utils::AtomCollection.
Definition: GenericMethodWrapper.cpp:121
std::string getStoNGExpansionPath() const
Returns a Sto-6G expansion.
Definition: GenericMethodWrapper.cpp:284
std::unordered_map< int, Utils::AtomicGtos > getAtomicGtosMap() const
get map of GTOs of each element in the calculated structure with Z as key
Definition: GenericMethodWrapper.cpp:299
~GenericMethodWrapper() override
Default Destructor.
bool supportsMethodFamily(const std::string &methodFamily) const final
Whether the calculator supports a method family In this library, every calculator supports just one "...
Definition: GenericMethodWrapper.cpp:264
virtual Utils::LcaoMethod & getLcaoMethod()=0
Get the underlying LcaoMethod.
Utils::Settings & settings() final
Accessor for the Settings used in this method wrapper.
Definition: GenericMethodWrapper.cpp:42
virtual void applySettings()
Function to apply the settings to the actual calculation method. This method is needed in every calcu...
Definition: GenericMethodWrapper.cpp:358
void setRequiredProperties(const Utils::PropertyList &requiredProperties) final
Sets the properties to calculate.
Definition: GenericMethodWrapper.cpp:125