File HessianUtilities.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

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
class HessianUtilities
#include <HessianUtilities.h>

A utility class for Hessians allowing easier access to eigenvalues and eigenvectors of transformed versions.

Parameters
  • hessian: Hessian in cartesian coordinates (not mass-weighted, also not if massWeighted is set to true)

  • massWeighted: If supposed to yield mass-weighted results set to true This results into all getter functions returning mass weighted properties

Public Functions

HessianUtilities(const Eigen::MatrixXd &hessian, const ElementTypeCollection &elements, const PositionCollection &positions, bool massWeighted)
void hessianUpdate()

Brief signals that the referenced Hessian has changed and deletes cached data.

void hessianUpdate(const HessianMatrix &hessian)

Replaces the current Hessian and deletes cached data.

Parameters
  • hessian: The new Hessian reference.

const Eigen::MatrixXd &getTransformationMatrix() const

Get the transformation matrix removing rotational and translational contributions.

Return

const Eigen::MatrixXd& The transformation matrix.

const Eigen::VectorXd &getInternalEigenvalues()

Getter for the eigenvalues of the transformed Matrix.

The eigenvalues are lazily evaluated and cached internally.

Return

const Eigen::VectorXd&

const Eigen::MatrixXd &getInternalEigenvectors()

Getter for the eigenvectors of the transformed Matrix.

The eigenvectors are lazily evaluated and cached internally.

Return

const Eigen::MatrixXd&

Eigen::MatrixXd getBackTransformedInternalEigenvectors()

Get the back-transformed internal eigenvectors without rotation and translation modes.

Return

Eigen::MatrixXd

Eigen::MatrixXd getInternalHessian() const

Returns the transformed (pseudo-internal coordinates) Hessian.

Return

const Eigen::MatrixXd& The Hessian.

Private Functions

void calculateInternal()

Private Members

bool _massWeighted
std::reference_wrapper<const Eigen::MatrixXd> _hessian
const ElementTypeCollection &_elements
const PositionCollection &_positions
Eigen::MatrixXd _transformation
std::unique_ptr<Eigen::VectorXd> _internalEValues
std::unique_ptr<Eigen::MatrixXd> _internalEVectors