File MultipoleMultipoleInteraction.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
namespace Sparrow
namespace nddo
namespace multipole
class MultipoleMultipoleInteraction
#include <MultipoleMultipoleInteraction.h>

This header-only class performs the actual calculation of the multipole-multipole interaction.

First all the charge-charge configurations between two multipoles (MultipoleMultipoleTerm) are inferred and stored in a list, then they are calculated by calling MultipoleMultipoleTerm::calculate(…)

Public Functions

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

calculates the complete interaction between two multipoles whose single interactions have been stored in the private member std::list<MultipoleMultipoleTerms> terms_

Return

an Utils::AutomaticDifferentiation::Value1D<O>, i.e. a collection of all the derivative orders up to the O-th for a 1-dimensional object

Template Parameters
  • O: order of the desired derivative, for the value this is 0.

Parameters
  • R: the distance between the centers of the multipoles

  • D1: the charge separation on the first multipole

  • d2: the charge separation on the second multipole

  • squaredRhos: the KlopmanOhno parameters to compute the repulsion in the Klopman approximation

void add(const MultipoleMultipoleTerm &m)

add an interaction between two charges in the multipoles to the total interaction

Parameters

unsigned int size() const

gets the current size of the std::list<MultipoleMultipoleTerm> containing the charge configurations

Private Members

std::list<MultipoleMultipoleTerm> terms_