Class Scine::Sparrow::dftb::ThirdOrderFock

class ThirdOrderFock : public Scine::Sparrow::dftb::ScfFock

Implementation of FockMatrixCalculator for DFTB3.

It calculates the electronic contributions to the energy and their derivatives with respect to the nuclear cartesian coordinates.

Public Functions

ThirdOrderFock(ZeroOrderMatricesCalculator &matricesCalculator, const Utils::ElementTypeCollection &elements, const Utils::PositionCollection &positions, const DFTBCommon::AtomicParameterContainer &atomicPar, const DFTBCommon::DiatomicParameterContainer &diatomicPar, const Utils::DensityMatrix &densityMatrix, const Eigen::MatrixXd &energyWeightedDensityMatrix, std::vector<double> &atomicCharges, const std::vector<double> &coreCharges, const Utils::AtomsOrbitalsIndexes &aoIndexes, const Eigen::MatrixXd &overlapMatrix, const bool &unrestrictedCalculationRunning)

Constructor, calls the ScfFock constructor and sets zeta to 4.0.

void initialize()

Calls ScfFock::initialize() and initializes the gamma, Gamma and the matrices containing the derivatives.

double calculateElectronicEnergy() const

Sums up the electronic energy contributions of the zeroth, first and second order Hamiltonian corrections.

void addDerivatives(Utils::AutomaticDifferentiation::DerivativeContainerType<Utils::derivativeType::first> &derivatives) const

calculates automatically the derivatives of the energy with respect to the nuclear cartesian coordinates.