Class Scine::Sparrow::dftb::SecondOrderFock

class SecondOrderFock : public Scine::Sparrow::dftb::ScfFock

Implementation of FockMatrixCalculator for DFTB2, the SCC-DFTB.

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

Public Functions

SecondOrderFock(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 calling the ScfFock constructor.

void initialize()

Initializes the gamma matrix G and the gamma matrix with the derivatives dG.

double calculateElectronicEnergy() const

Sums up the electronic contributions of the zeroth order Hamiltonian, the gamma matrix and the spin contribution.

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

adds the derivatives for the first, second atomic and second full types.