Template Class SimplePairwiseNeighborList#

Inheritance Relationships#

Base Type#

Class Documentation#

template<typename pairwise_interaction, typename distance_policy = cartesian_distance<3>>
class SimplePairwiseNeighborList : public pele::PairwisePotentialInterface#

This class loops though atom pairs, computes the distances and gets the value of the energy and gradient from the class pairwise_interaction.

pairwise_interaction is a passed parameter and defines the actual potential function.

Public Functions

inline virtual ~SimplePairwiseNeighborList()#
inline virtual double get_energy(Array<double> const &x)#

Return the energy of configuration x.

This is the only function which must be overloaded

inline virtual double get_energy_gradient(
Array<double> const &x,
Array<double> &grad
)#

compute the energy and gradient.

If not overloaded it will compute the numerical gradient

inline virtual double add_energy_gradient(
Array<double> const &x,
Array<double> &grad
)#

compute the energy and gradient, but don’t initialize the gradient to zero

Protected Functions

inline SimplePairwiseNeighborList(
std::shared_ptr<pairwise_interaction> interaction,
Array<size_t> const &neighbor_list,
const Array<double> radii,
std::shared_ptr<distance_policy> dist = NULL
)#
inline SimplePairwiseNeighborList(
std::shared_ptr<pairwise_interaction> interaction,
Array<size_t> const &neighbor_list,
std::shared_ptr<distance_policy> dist = NULL
)#