Class Scine::Sparrow::nddo::multipole::MultipoleMultipoleTerm

class MultipoleMultipoleTerm

This header-only class defines an object for the calculation of an interaction between two charges in a multipole.

The total interaction between two electrons is approximated by a classical multipole expansion. This class defines an object that calculates the interaction between two charges of said multipoles. The charge interaction is calculated within the Klopman approximation to retrieve the correct 1-center, 2-electrons interaction in the limit of vanishing distance between the charges. The template functions allow for the analytical calculation of all the values up to the second derivative of the repulsion energy.

Public Functions

MultipoleMultipoleTerm(double f, double x1, double y1, double z1, double x2, double y2, double z2)

constructor, sets the coordinates of the two point charges and the value of the two charges multiplied

Parameters
  • f: the result of the multiplication of the two charges

  • x1: x configuration relative to the first multipole center, a scaling factor for the charge separations

  • y1: y configuration relative to the first multipole center, a scaling factor for the charge separations

  • z1: z configuration relative to the first multipole center, a scaling factor for the charge separations

  • x2: x configuration relative to the second multipole center, a scaling factor for the charge separations

  • y2: y configuration relative to the second multipole center, a scaling factor for the charge separations

  • z2: z configuration relative to the second multipole center, a scaling factor for the charge separations

template<Utils::derivOrder O>
Utils::AutomaticDifferentiation::Value1DType<O> calculate(double R, double D1, double d2, double squaredRhos) const

calculates the interaction energy between two charges up to a certain derivative

Return

an Utils::AutomaticDifferentiation::Value1DType<O> object, storing the value of the interaction up to the O-th derivative

Template Parameters
  • O: the required derivative order for the interaction energy

Parameters
  • R: the distance between the two multipole centers

  • D1: the charge separation parameter for the first multipole

  • d2: the charge separation parameter for the second multipole

  • squaredRhos: the squared KlopmanOhno parameters

template<Utils::derivOrder O>
Utils::AutomaticDifferentiation::Value1DType<O> expr(double f, double dz, double invsqrt) const

returns the values up to the O-th derivative order with respect to the inter-multipole distance

Return

an Utils::AutomaticDifferentiation::Value1DType<O> object containing the derivatives of the interaction energy up to the O-th order

Template Parameters
  • O: the required derivative order

Parameters
  • f: the result of the multiplication of the two charges

  • dz: the distance between the two charges along the inter-multipole axis, for the 0-th derivative no dz argument is needed.

  • invsqrt: the denominator of the interaction energy