Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Scine::Swoose::MockQmCalculator Class Referencefinal

Mock class for a QM calculator to use in QM/MM tests. More...

#include <MockQmCalculator.h>

Inheritance diagram for Scine::Swoose::MockQmCalculator:
Inheritance graph
Collaboration diagram for Scine::Swoose::MockQmCalculator:
Collaboration graph

Public Member Functions

 MockQmCalculator ()
 Default Constructor.
 
 ~MockQmCalculator () final=default
 Default Destructor.
 
 MockQmCalculator (const MockQmCalculator &rhs)
 Copy Constructor.
 
void setStructure (const Utils::AtomCollection &structure) override
 Changes the molecular structure to calculate. More...
 
std::unique_ptr
< Utils::AtomCollection
getStructure () const override
 Gets the molecular structure as a std::unique_ptr<AtomCollection>. More...
 
void modifyPositions (Utils::PositionCollection newPositions) override
 Allows to modify the positions of the underlying AtomCollection. More...
 
const Utils::PositionCollectiongetPositions () const override
 Getter for the coordinates of the underlying AtomCollection.
 
void setRequiredProperties (const Utils::PropertyList &requiredProperties) override
 Sets the properties to calculate. More...
 
Utils::PropertyList getRequiredProperties () const override
 Getter for the properties to calculate.
 
Utils::PropertyList possibleProperties () const override
 Returns the list of the possible properties to calculate analytically. By some method analytical hessian calculation is not possible. In this case the hessian calculation is done seminumerically.
 
const Utils::Resultscalculate (std::string description) override
 The main function running calculations (dummy). More...
 
std::string name () const override
 Getter for the name of the Calculator. More...
 
Utils::Settingssettings () override
 Accessor for the settings. More...
 
const Utils::Settingssettings () const override
 Constant accessor for the settings. More...
 
std::shared_ptr< Core::StategetState () const final
 Implements Core::StateHandableObject::getState(). More...
 
void loadState (std::shared_ptr< Core::State > state) final
 Implements Core::StateHandableObject::loadState(). More...
 
Utils::Resultsresults () override
 Accessor for the saved instance of Results. More...
 
const Utils::Resultsresults () const override
 Constant accessor for the Results. More...
 
std::string getFileNameBase () const
 Getter for the file name base string.
 
std::string getCalculationDirectory () const
 Getter for the calculation directory.
 
bool supportsMethodFamily (const std::string &methodFamily) const override
 Whether the calculator supports a method family. More...
 
bool allowsPythonGILRelease () const override
 Whether the calculator has no underlying Python code and can therefore release the global interpreter lock in Python bindings.
 
- Public Member Functions inherited from Scine::Utils::CloneInterface< MockQmCalculator, Core::Calculator, Core::Calculator >
std::shared_ptr< MockQmCalculator > clone () const
 

Static Public Attributes

static constexpr const char * model = "MOCK-QM"
 

Detailed Description

Mock class for a QM calculator to use in QM/MM tests.

Member Function Documentation

const Utils::Results & Scine::Swoose::MockQmCalculator::calculate ( std::string  description)
override

The main function running calculations (dummy).

Parameters
descriptionThe calculation description.
Returns
Result Return the result of the calculation. The object contains the properties that were given as requirement by the Calculator::setRequiredProperties function.
std::shared_ptr< Core::State > Scine::Swoose::MockQmCalculator::getState ( ) const
final

Implements Core::StateHandableObject::getState().

Returns
std::shared_ptr<Core::State> The current state
std::unique_ptr< Utils::AtomCollection > Scine::Swoose::MockQmCalculator::getStructure ( ) const
override

Gets the molecular structure as a std::unique_ptr<AtomCollection>.

Returns
std::unique_ptr<AtomCollection>
void Scine::Swoose::MockQmCalculator::loadState ( std::shared_ptr< Core::State state)
final

Implements Core::StateHandableObject::loadState().

Parameters
stateThe new state.
void Scine::Swoose::MockQmCalculator::modifyPositions ( Utils::PositionCollection  newPositions)
override

Allows to modify the positions of the underlying AtomCollection.

Parameters
newPositionsthe new positions to be assigned to the underlying AtomCollection
std::string Scine::Swoose::MockQmCalculator::name ( ) const
override

Getter for the name of the Calculator.

Returns
Returns the name of the Calculator.
Utils::Results & Scine::Swoose::MockQmCalculator::results ( )
override

Accessor for the saved instance of Results.

Returns
Results& The results of the previous calculation.
const Utils::Results & Scine::Swoose::MockQmCalculator::results ( ) const
override

Constant accessor for the Results.

Returns
const Results& The results of the previous calculation.
void Scine::Swoose::MockQmCalculator::setRequiredProperties ( const Utils::PropertyList requiredProperties)
override

Sets the properties to calculate.

Parameters
requiredPropertiesA PropertyList, a sequence of bits that represent the properties that must be calculated.
void Scine::Swoose::MockQmCalculator::setStructure ( const Utils::AtomCollection structure)
override

Changes the molecular structure to calculate.

Parameters
structureA new AtomCollection to save.
Utils::Settings & Scine::Swoose::MockQmCalculator::settings ( )
override

Accessor for the settings.

Returns
Settings& The settings.
const Utils::Settings & Scine::Swoose::MockQmCalculator::settings ( ) const
override

Constant accessor for the settings.

Returns
const Settings& The settings.
bool Scine::Swoose::MockQmCalculator::supportsMethodFamily ( const std::string &  methodFamily) const
override

Whether the calculator supports a method family.

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: