File OneElectronMatrix.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
namespace nddo
class OneElectronMatrix
#include <OneElectronMatrix.h>

This class generates the one-electron matrix H for semi-empirical methods.

Public Functions

OneElectronMatrix(const Utils::ElementTypeCollection &elements, const Utils::PositionCollection &positions, const Eigen::MatrixXd &densityMatrix, const TwoCenterIntegralContainer &twoCIntegrals, const ElementParameters &elementPar, const Utils::AtomsOrbitalsIndexes &aoIndexes)

Constructor.

void initialize()

Initializes one-electron matrix H and the used data structures.

void calculate(const Utils::MatrixWithDerivatives &S)

Fills the one-electron matrix H by reading and calculating the required integrals.

void calculateSameAtomBlocks()

Calculates all the blocks on the same atoms.

void calculateSameAtomBlock(int a, int startIndex, int nAOs)

Calculates a specific block on an atom.

void calculateDifferentAtomsBlocks(const Utils::MatrixWithDerivatives &S)

Calculates all the blocks on different atom pairs.

void calculateDifferentAtomsBlock(int startRow, int startCol, const AtomicParameters &pA, const AtomicParameters &pB, const Utils::MatrixWithDerivatives &S)

Calculates a block between a specific atom pair.

template<Utils::derivativeType O>
void addDerivatives(Utils::AutomaticDifferentiation::DerivativeContainerType<O> &derivativeContainer, const Utils::MatrixWithDerivatives &S) const

Calculates the derivative contribution up to the order.

Template Parameters
  • O.:

const Eigen::MatrixXd &operator()() const

Getter for the one-electron matrix H.

const Eigen::MatrixXd &getMatrix() const

Private Functions

template<Utils::derivativeType O>
void addDerivativesContribution1(Utils::AutomaticDifferentiation::DerivativeContainerType<O> &derivativeContainer, int a, int startIndex, int nAOs) const
template<Utils::derivativeType O>
void addDerivativesContribution2(Utils::AutomaticDifferentiation::DerivativeContainerType<O> &derivativeContainer, int a, int b, int indexA, int indexB, int nAOsA, int nAOsB, const Utils::MatrixWithDerivatives &S) const

Private Members

const Eigen::MatrixXd &P
const TwoCenterIntegralContainer &twoCenterIntegrals
const ElementParameters &elementParameters
const Utils::AtomsOrbitalsIndexes &aoIndexes_
int nAOs_ = 0
int nAtoms_ = 0
Eigen::MatrixXd H_
const Utils::ElementTypeCollection &elementTypes_
const Utils::PositionCollection &positions_