File AM1TypeMethodWrapper.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
template<class AM1Type>
class AM1TypeMethodWrapper : public Utils::CloneInterface<Utils::Abstract<AM1TypeMethodWrapper<AM1Type>>, NDDOMethodWrapper>
#include <AM1TypeMethodWrapper.h>

A parent class for all AM1-type methods using the same formalism but different parameters (AM1, RM1, PM3).

This class uses the curiously recurrent template pattern to have compile-time resolution of the model names, as well as the use of the right constructor. The constructors are method-dependant, having independent classes would lead to unwanted code duplication.

Public Functions

AM1TypeMethodWrapper()

Constructor initializing the NDDOMethodWrapper with this instance of the class.

~AM1TypeMethodWrapper()

Default Destructor.

std::string name() const

Getter for the name of the method.

Return

Returns the name of the method.

void applySettings()

Function to apply the settings to the underlying method.

Protected Functions

bool successfulCalculation() const
Eigen::MatrixXd getOneElectronMatrix() const
Utils::SpinAdaptedMatrix getTwoElectronMatrix() const
Utils::DensityMatrix getDensityMatrixGuess() const
void initialize()

Initializes a method with the parameter file present in the settings.

Utils::LcaoMethod &getLcaoMethod()
const Utils::LcaoMethod &getLcaoMethod() const
void calculateImpl(Utils::derivativeType requiredDerivative)

Protected Attributes

nddo::AM1Method method_
class AM1MethodWrapper : public Utils::CloneInterface<AM1MethodWrapper, AM1TypeMethodWrapper<AM1MethodWrapper>>

Public Functions

AM1MethodWrapper()
AM1MethodWrapper(const AM1MethodWrapper &rhs)
AM1MethodWrapper &operator=(const AM1MethodWrapper &rhs)
AM1MethodWrapper(AM1MethodWrapper &&rhs)
AM1MethodWrapper &operator=(AM1MethodWrapper &&rhs)
~AM1MethodWrapper()

Default Destructor.

Public Static Attributes

constexpr const char *model = "AM1"
class RM1MethodWrapper : public Utils::CloneInterface<RM1MethodWrapper, AM1TypeMethodWrapper<RM1MethodWrapper>>

Public Functions

RM1MethodWrapper()
RM1MethodWrapper(const RM1MethodWrapper &rhs)
RM1MethodWrapper &operator=(const RM1MethodWrapper &rhs)
RM1MethodWrapper(RM1MethodWrapper &&rhs)
RM1MethodWrapper &operator=(RM1MethodWrapper &&rhs)
~RM1MethodWrapper()

Default Destructor.

Public Static Attributes

constexpr const char *model = "RM1"
class PM3MethodWrapper : public Utils::CloneInterface<PM3MethodWrapper, AM1TypeMethodWrapper<PM3MethodWrapper>>

Public Functions

PM3MethodWrapper()
PM3MethodWrapper(const PM3MethodWrapper &rhs)
PM3MethodWrapper &operator=(const PM3MethodWrapper &rhs)
PM3MethodWrapper(PM3MethodWrapper &&rhs)
PM3MethodWrapper &operator=(PM3MethodWrapper &&rhs)
~PM3MethodWrapper()

Default Destructor.

Public Static Attributes

constexpr const char *model = "PM3"