Class Scine::Utils::FullSecondDerivativeCollection

class FullSecondDerivativeCollection

Container class for full second derivatives (Hessian matrix + first derivatives).

Public Functions

FullSecondDerivativeCollection(int N = 0)

Constructor.

Parameters
  • N: Size of the container (number of atoms).

const FullSecondDerivativeCollection &operator+=(const FullSecondDerivativeCollection &dc)

Add another FullSecondDerivativeCollection.

void setZero()

Reset all the derivatives to zero.

GradientCollection generateGradients(const DisplacementCollection &displacements) const

Generate a GradientCollection from the full second derivatives and the displacements.

Gradient generateGradient(int idx, const DisplacementCollection &displacements) const

Generate a Gradient from the full second derivatives and the displacements.

void addDerivative(int a, int b, const AutomaticDifferentiation::Second3D &v)

Add a derivative object for the pair a->b.

const HessianMatrix &getHessianMatrix() const

Getter for the Hessian Matrix.

Return

HessianMatrix This ist just a type alias for Eigen::MatrixXd.

const GradientCollection &getReferenceGradients() const

Return the reference gradients.

Return

GradientCollection This ist just a type alias for Eigen::Matrix<double, Eigen::Dynamic, 3, Eigen::RowMajor>.