mcpele
1.0.0
The Monte Carlo Python Energy Landscape Explorer
|
#include <simple_pairwise_potential.h>
Public Member Functions | |
virtual | ~SimplePairwisePotential () |
virtual double | get_energy (Array< double > x) |
virtual double | get_energy_gradient (Array< double > x, Array< double > grad) |
virtual double | get_energy_gradient_hessian (Array< double > x, Array< double > grad, Array< double > hess) |
virtual double | add_energy_gradient (Array< double > x, Array< double > grad) |
virtual double | add_energy_gradient_hessian (Array< double > x, Array< double > grad, Array< double > hess) |
Protected Member Functions | |
SimplePairwisePotential (std::shared_ptr< pairwise_interaction > interaction, std::shared_ptr< distance_policy > dist=NULL) | |
Protected Attributes | |
std::shared_ptr < pairwise_interaction > | _interaction |
std::shared_ptr< distance_policy > | _dist |
Static Protected Attributes | |
static const size_t | _ndim = distance_policy::_ndim |
Define a base class for potentials with simple pairwise interactions that depend only on magnitude of the atom separation
This class loops though atom pairs, computes the distances and get's the value of the energy and gradient from the class pairwise_interaction. pairwise_interaction is a passed parameter and defines the actual potential function.
Definition at line 22 of file simple_pairwise_potential.h.
pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::SimplePairwisePotential | ( | std::shared_ptr< pairwise_interaction > | interaction, |
std::shared_ptr< distance_policy > | dist = NULL |
||
) | [inline, protected] |
Definition at line 29 of file simple_pairwise_potential.h.
virtual pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::~SimplePairwisePotential | ( | ) | [inline, virtual] |
Definition at line 37 of file simple_pairwise_potential.h.
double pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::add_energy_gradient | ( | Array< double > | x, |
Array< double > | grad | ||
) | [inline, virtual] |
compute the energy and gradient, but don't initialize the gradient to zero
Reimplemented from pele::BasePotential.
Definition at line 58 of file simple_pairwise_potential.h.
double pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::add_energy_gradient_hessian | ( | Array< double > | x, |
Array< double > | grad, | ||
Array< double > | hess | ||
) | [inline, virtual] |
compute the energy, gradient, and Hessian, but don't initialize the gradient or hessian to zero
Reimplemented from pele::BasePotential.
Definition at line 99 of file simple_pairwise_potential.h.
double pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::get_energy | ( | Array< double > | x | ) | [inline, virtual] |
Return the energy of configuration x. This is the only function which must be overloaded
Reimplemented from pele::BasePotential.
Definition at line 164 of file simple_pairwise_potential.h.
virtual double pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::get_energy_gradient | ( | Array< double > | x, |
Array< double > | grad | ||
) | [inline, virtual] |
compute the energy and gradient.
If not overloaded it will compute the numerical gradient
Reimplemented from pele::BasePotential.
Definition at line 41 of file simple_pairwise_potential.h.
virtual double pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::get_energy_gradient_hessian | ( | Array< double > | x, |
Array< double > | grad, | ||
Array< double > | hess | ||
) | [inline, virtual] |
compute the energy and gradient and Hessian.
If not overloaded it will compute the Hessian numerically and use get_energy_gradient to get the energy and gradient.
Reimplemented from pele::BasePotential.
Definition at line 46 of file simple_pairwise_potential.h.
std::shared_ptr<distance_policy> pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::_dist [protected] |
Definition at line 27 of file simple_pairwise_potential.h.
std::shared_ptr<pairwise_interaction> pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::_interaction [protected] |
Definition at line 26 of file simple_pairwise_potential.h.
const size_t pele::SimplePairwisePotential< pairwise_interaction, distance_policy >::_ndim = distance_policy::_ndim [static, protected] |
Definition at line 25 of file simple_pairwise_potential.h.