Scine::Sparrow  5.0.0
Library for fast and agile quantum chemical calculations with semiempirical methods.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Scine::Sparrow::GenericMethodWrapper Class Referenceabstract

A MethodWrapper running Generic calculations. More...

#include <GenericMethodWrapper.h>

Inheritance diagram for Scine::Sparrow::GenericMethodWrapper:
Inheritance graph
Collaboration diagram for Scine::Sparrow::GenericMethodWrapper:
Collaboration graph

Public Member Functions

 GenericMethodWrapper ()
 Default Constructor.
 
 ~GenericMethodWrapper () override
 Default Destructor.
 
 GenericMethodWrapper (const GenericMethodWrapper &rhs)
 Copy Constructor.
 
void setStructure (const Utils::AtomCollection &structure) final
 Sets new structure and initializes the underlying method with the parameter given in the settings. More...
 
std::unique_ptr
< Utils::AtomCollection
getStructure () const final
 Getter for the underlying element types and positions.
 
void modifyPositions (Utils::PositionCollection newPositions) final
 Allows to modify the positions of the underlying Utils::AtomCollection. More...
 
const Utils::PositionCollectiongetPositions () const final
 Getter for the coordinates of the underlying Utils::AtomCollection.
 
void setRequiredProperties (const Utils::PropertyList &requiredProperties) final
 Sets the properties to calculate. More...
 
Utils::PropertyList getRequiredProperties () const final
 Gets the properties to calculate. More...
 
Utils::PropertyList possibleProperties () const override
 
const Utils::Resultscalculate (std::string description) final
 The main function running calculations (dummy). More...
 
virtual Utils::DensityMatrix getDensityMatrixGuess () const =0
 Getter for the initial density matrix guess. More...
 
Utils::Settingssettings () final
 Accessor for the Settings used in this method wrapper. More...
 
const Utils::Settingssettings () const final
 Const accessor for the Settings used in this method wrapper. More...
 
Utils::Resultsresults () final
 Accessor for the Results stored in this method wrapper. More...
 
const Utils::Resultsresults () const final
 Const accessor for the Results used in this method wrapper. More...
 
virtual void addElectronicContribution (std::shared_ptr< Utils::AdditiveElectronicContribution > contribution)=0
 Interface method to add an electronic contribution to the Hamiltonian.
 
bool supportsMethodFamily (const std::string &methodFamily) const final
 Whether the calculator supports a method family In this library, every calculator supports just one "method family": itself. More...
 
virtual Utils::LcaoMethodgetLcaoMethod ()=0
 Get the underlying LcaoMethod.
 
virtual const Utils::LcaoMethodgetLcaoMethod () const =0
 
std::string getStoNGExpansionPath () const
 Returns a Sto-6G expansion.
 
std::unordered_map< int,
Utils::AtomicGtos
getAtomicGtosMap () const
 get map of GTOs of each element in the calculated structure with Z as key
 
void generateWavefunctionInformation (const std::string &filename) final
 
void generateWavefunctionInformation (std::ostream &out) final
 
void loadState (std::shared_ptr< Core::State > state) override
 
std::shared_ptr< Core::StategetState () const final
 
- Public Member Functions inherited from Scine::Utils::CloneInterface< Utils::Abstract< GenericMethodWrapper >, Core::Calculator >
std::shared_ptr
< Utils::Abstract
< GenericMethodWrapper > > 
clone () const
 
- Public Member Functions inherited from Scine::Core::StateHandableObject
virtual void loadState (std::shared_ptr< State > state)=0
 

Protected Member Functions

virtual void initialize ()=0
 Initializes a method with the parameter file present in the settings.
 
Utils::Derivative 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
 
void checkBasicSettings ()
 
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::Derivative requiredDerivative)=0
 Method-dependent implementation of the calculate member function.
 

Protected Attributes

std::unique_ptr< Utils::Settingssettings_
 
Utils::Results results_
 
std::unique_ptr
< DipoleMomentCalculator
dipoleCalculator_
 
std::unique_ptr
< DipoleMatrixCalculator
dipoleMatrixCalculator_
 
Utils::PropertyList requiredProperties_
 

Detailed Description

A MethodWrapper running Generic calculations.

Member Function Documentation

const Utils::Results & Scine::Sparrow::GenericMethodWrapper::calculate ( std::string  description)
final

The main function running calculations (dummy).

Parameters
dummyA dummy parameter.
Returns
double Return the result of the calculation.
virtual Utils::DensityMatrix Scine::Sparrow::GenericMethodWrapper::getDensityMatrixGuess ( ) const
pure virtual

Getter for the initial density matrix guess.

Returns
The initial density matrix guess.
Utils::PropertyList Scine::Sparrow::GenericMethodWrapper::getRequiredProperties ( ) const
final

Gets the properties to calculate.

Returns
requiredProperties a Utils::PropertyList object, contains an enum class that work as a bitset, switching on and off the bits representing a property.
void Scine::Sparrow::GenericMethodWrapper::modifyPositions ( Utils::PositionCollection  newPositions)
finalvirtual

Allows to modify the positions of the underlying Utils::AtomCollection.

Parameters
newPositionsthe new positions to be assigned to the underlying Utils::AtomCollection

Implements Scine::Core::ObjectWithStructure.

Utils::Results & Scine::Sparrow::GenericMethodWrapper::results ( )
final

Accessor for the Results stored in this method wrapper.

Returns
Utils::Results& The results of the previous calculation.
const Utils::Results & Scine::Sparrow::GenericMethodWrapper::results ( ) const
final

Const accessor for the Results used in this method wrapper.

Returns
const Utils::Results& The results of the previous calculation.
void Scine::Sparrow::GenericMethodWrapper::setRequiredProperties ( const Utils::PropertyList requiredProperties)
final

Sets the properties to calculate.

Parameters
requiredPropertiesa Utils::PropertyList object, contains an enum class that work as a bitset, switching on and off the bits representing a property.
void Scine::Sparrow::GenericMethodWrapper::setStructure ( const Utils::AtomCollection structure)
finalvirtual

Sets new structure and initializes the underlying method with the parameter given in the settings.

Parameters
structureThe structure to be assigned.

Implements Scine::Core::ObjectWithStructure.

Utils::Settings & Scine::Sparrow::GenericMethodWrapper::settings ( )
finalvirtual

Accessor for the Settings used in this method wrapper.

Returns
Utils::Settings& The Settings.

Implements Scine::Core::WavefunctionOutputGenerator.

const Utils::Settings & Scine::Sparrow::GenericMethodWrapper::settings ( ) const
finalvirtual

Const accessor for the Settings used in this method wrapper.

Returns
const Utils::Settings& The Settings.

Implements Scine::Core::WavefunctionOutputGenerator.

bool Scine::Sparrow::GenericMethodWrapper::supportsMethodFamily ( const std::string &  methodFamily) const
final

Whether the calculator supports a method family In this library, every calculator supports just one "method family": itself.

Parameters
methodFamilyidentifier for the method family
Returns
whether the calculator supports a method family

The documentation for this class was generated from the following files: