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

Class representing a repulsion calculator between (classical) nuclei.

Unnamed Group

virtual void addRepulsionDerivatives(AutomaticDifferentiation::DerivativeContainerType<derivativeType::first> &derivatives) const

Method to collect the energy derivatives contributions stored in the PairwiseCoreRepulsion classes.

virtual void addRepulsionDerivatives(AutomaticDifferentiation::DerivativeContainerType<derivativeType::second_atomic> &derivatives) const
virtual void addRepulsionDerivatives(AutomaticDifferentiation::DerivativeContainerType<derivativeType::second_full> &derivatives) const

Public Functions

RepulsionCalculator(const ElementTypeCollection &elements, const PositionCollection &positions)
virtual ~RepulsionCalculator()
virtual void initialize()

Initializes a vector containing the classes computing the pairwise interactions between cores.

virtual void calculateRepulsion(derivOrder order)

Method to calculate the pairwise core-core repulsion.

This functions dispatches the call to the right PairwiseCoreRepulsion class computing the interaction between two cores up to the derivative order specified.

virtual double getRepulsionEnergy() const

Method to collect the energy contributions stored in the PairwiseCoreRepulsion classes.

Protected Functions

template<derivOrder order>
AutomaticDifferentiation::Value1DType<order> calculatePairwiseCoreRepulsion(double distance, double repulsionConstant)

Use AutomaticDifferentiation to get the right values for the energy derivatives.

Protected Attributes

const ElementTypeCollection &elements_
const PositionCollection &positions_
double repulsionEnergy_
GradientCollection repulsionGradients_
std::map<std::pair<int, int>, AutomaticDifferentiation::Second3D> repulsionHessian_