Class Scine::Utils::AdditiveElectronicContribution¶
-
class
AdditiveElectronicContribution
¶ This class represents an additive electronic contribution.
On one sides it stores the matrix with the matrix elements, on the other side it is an interface for the addDerivatives<Utils::derivativeType O> methods in the derived classes.
Public Functions
-
virtual
~AdditiveElectronicContribution
()¶ Virtual destructor.
-
virtual bool
isDensityDependent
() const = 0¶ Function to identify the density dependence of the electronic contribution.
-
virtual bool
isValid
() const¶ Function to check if a contribution is already present.
Does not check for correctness.
-
virtual bool
hasMatrixContribution
() const¶ Function to check if a contribution in form of matrix is present.
-
void
invalidate
()¶ Invalidates the contribution, which has to be set again.
-
void
setElectronicContribution
(const SpinAdaptedMatrix &contribution)¶ Setter function.
- Parameters
contribution
: The matrix containing the electronic contributions.
-
const SpinAdaptedMatrix &
getElectronicContribution
() const¶ Getter for the electronic contributions.
-
virtual double
getElectronicEnergyContribution
() const = 0¶ Returns the energy contribution.
It needs the density matrix for the contraction of the matrix elements.
-
virtual void
calculate
(const DensityMatrix &densityMatrix, derivOrder order) = 0¶ Calculates the energy contribution.
For example, calculates the dipole-field interaction energy.
-
virtual void
addDerivatives
(AutomaticDifferentiation::DerivativeContainerType<derivativeType::first> &derivativeContainer) const = 0¶ Functions to calculate the first derivatives of the electronic contribution.
- Parameters
derivativeContainer
: A container for the derivatives up to the first order.
-
virtual void
addDerivatives
(AutomaticDifferentiation::DerivativeContainerType<derivativeType::second_atomic> &derivativeContainer) const = 0¶ Functions to calculate the atomic second derivatives of the electronic contribution.
- Parameters
derivativeContainer
: A container for the atomic derivatives up to the second order.
-
virtual void
addDerivatives
(AutomaticDifferentiation::DerivativeContainerType<derivativeType::second_full> &derivativeContainer) const = 0¶ Functions to calculate the second derivatives of the electronic contribution.
- Parameters
derivativeContainer
: A container for the derivatives up to the second order.
-
virtual