7 #ifndef SPARROW_GENERICMETHODWRAPPER_H
8 #define SPARROW_GENERICMETHODWRAPPER_H
19 #include <unordered_map>
26 class AdditiveElectronicContribution;
31 class DipoleMatrixCalculator;
32 class DipoleMomentCalculator;
53 std::unique_ptr<Utils::AtomCollection>
getStructure()
const final;
128 void generateWavefunctionInformation(
const std::string& filename)
final;
129 void generateWavefunctionInformation(std::ostream& out)
final;
131 void loadState(std::shared_ptr<Core::State> state)
override;
132 std::shared_ptr<Core::State> getState()
const final;
135 std::unique_ptr<Utils::Settings> settings_;
141 virtual void assembleResults(
const std::string& description);
143 virtual bool successfulCalculation()
const = 0;
144 virtual bool canCalculateAnalyticalHessian()
const;
146 void checkBasicSettings();
158 virtual bool getZPVEInclusion()
const = 0;
161 virtual void calculateImpl(Utils::Derivative requiredDerivative) = 0;
163 std::unique_ptr<DipoleMomentCalculator> dipoleCalculator_;
164 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:126
void modifyPositions(Utils::PositionCollection newPositions) final
Allows to modify the positions of the underlying Utils::AtomCollection.
Definition: GenericMethodWrapper.cpp:110
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:98
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:55
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:47
std::unique_ptr< Utils::AtomCollection > getStructure() const final
Getter for the underlying element types and positions.
Definition: GenericMethodWrapper.cpp:106
Utils::Derivative highestDerivativeRequired() const
Determines the highest derivative type needed based on the property needed for calculation.
Definition: GenericMethodWrapper.cpp:138
const Utils::PositionCollection & getPositions() const final
Getter for the coordinates of the underlying Utils::AtomCollection.
Definition: GenericMethodWrapper.cpp:118
std::string getStoNGExpansionPath() const
Returns a Sto-6G expansion.
Definition: GenericMethodWrapper.cpp:281
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:296
~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:261
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:39
virtual void applySettings()
Function to apply the settings to the actual calculation method. This method is needed in every calcu...
Definition: GenericMethodWrapper.cpp:355
void setRequiredProperties(const Utils::PropertyList &requiredProperties) final
Sets the properties to calculate.
Definition: GenericMethodWrapper.cpp:122