#include <base_potential.h>
Public Member Functions | |
virtual | ~BasePotential () |
virtual double | get_energy (Array< double > x) |
virtual double | add_energy_gradient (Array< double > x, Array< double > grad) |
virtual double | get_energy_gradient (Array< double > x, Array< double > grad) |
virtual double | add_energy_gradient_hessian (Array< double > x, Array< double > grad, Array< double > hess) |
virtual double | get_energy_gradient_hessian (Array< double > x, Array< double > grad, Array< double > hess) |
virtual void | numerical_gradient (Array< double > x, Array< double > grad, double eps=1e-6) |
virtual void | get_hessian (Array< double > x, Array< double > hess) |
virtual void | numerical_hessian (Array< double > x, Array< double > hess, double eps=1e-6) |
Definition at line 15 of file base_potential.h.
virtual pele::BasePotential::~BasePotential | ( | ) | [inline, virtual] |
Definition at line 17 of file base_potential.h.
virtual double pele::BasePotential::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 in pele::AtomListPotential< pairwise_interaction, distance_policy >, pele::AtomListPotential< WCA_interaction, cartesian_distance< 3 > >, pele::AtomListPotential< harmonic_interaction, cartesian_distance< 3 > >, pele::AtomListPotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::AtomListPotential< lj_interaction_cut_smooth, cartesian_distance< 3 > >, pele::SimplePairwiseNeighborList< pairwise_interaction, distance_policy >, pele::SimplePairwiseNeighborList< lj_interaction >, pele::SimplePairwiseNeighborList< WCA_interaction >, pele::SimplePairwiseNeighborList< sf_HS_WCA_interaction >, pele::SimplePairwiseNeighborList< harmonic_interaction >, pele::SimplePairwisePotential< pairwise_interaction, distance_policy >, pele::SimplePairwisePotential< InversePower_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< lj_interaction >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 2 > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction_cut_smooth >, pele::SimplePairwisePotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::SimplePairwisePotential< morse_interaction >, pele::SimplePairwisePotential< InversePower_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 2 > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, cartesian_distance< ndim > >, and pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, periodic_distance< ndim > >.
Definition at line 31 of file base_potential.h.
virtual double pele::BasePotential::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 in pele::AtomListPotential< pairwise_interaction, distance_policy >, pele::AtomListPotential< WCA_interaction, cartesian_distance< 3 > >, pele::AtomListPotential< harmonic_interaction, cartesian_distance< 3 > >, pele::AtomListPotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::AtomListPotential< lj_interaction_cut_smooth, cartesian_distance< 3 > >, pele::SimplePairwisePotential< pairwise_interaction, distance_policy >, pele::SimplePairwisePotential< InversePower_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< lj_interaction >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 2 > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction_cut_smooth >, pele::SimplePairwisePotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::SimplePairwisePotential< morse_interaction >, pele::SimplePairwisePotential< InversePower_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 2 > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, cartesian_distance< ndim > >, and pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, periodic_distance< ndim > >.
Definition at line 52 of file base_potential.h.
virtual double pele::BasePotential::get_energy | ( | Array< double > | x | ) | [inline, virtual] |
Return the energy of configuration x. This is the only function which must be overloaded
Reimplemented in pele::RBPotentialWrapper, pele::CellListPotential< pairwise_interaction, distance_policy >, pele::CellListPotential< InversePower_interaction, cartesian_distance< ndim > >, pele::CellListPotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::CellListPotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::CellListPotential< lj_interaction_cut_smooth, periodic_distance< ndim > >, pele::CellListPotential< InversePower_interaction, periodic_distance< ndim > >, pele::FrozenPotentialWrapper< PotentialType >, pele::FrozenPotentialWrapper< LJ >, pele::FrozenPotentialWrapper< HS_WCAPeriodicCellLists< ndim > >, pele::FrozenPotentialWrapper< HS_WCAPeriodic< ndim > >, pele::FrozenPotentialWrapper< HS_WCACellLists< ndim > >, pele::FrozenPotentialWrapper< HS_WCA< ndim > >, pele::LowestEigPotential, pele::PythonPotential, pele::AtomListPotential< pairwise_interaction, distance_policy >, pele::AtomListPotential< WCA_interaction, cartesian_distance< 3 > >, pele::AtomListPotential< harmonic_interaction, cartesian_distance< 3 > >, pele::AtomListPotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::AtomListPotential< lj_interaction_cut_smooth, cartesian_distance< 3 > >, pele::SimplePairwiseNeighborList< pairwise_interaction, distance_policy >, pele::SimplePairwiseNeighborList< lj_interaction >, pele::SimplePairwiseNeighborList< WCA_interaction >, pele::SimplePairwiseNeighborList< sf_HS_WCA_interaction >, pele::SimplePairwiseNeighborList< harmonic_interaction >, pele::SimplePairwisePotential< pairwise_interaction, distance_policy >, pele::SimplePairwisePotential< InversePower_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< lj_interaction >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 2 > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction_cut_smooth >, pele::SimplePairwisePotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::SimplePairwisePotential< morse_interaction >, pele::SimplePairwisePotential< InversePower_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 2 > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, periodic_distance< ndim > >, pele::CombinedPotential, and pele::BaseHarmonic.
Definition at line 23 of file base_potential.h.
virtual double pele::BasePotential::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 in pele::RBPotentialWrapper, pele::CellListPotential< pairwise_interaction, distance_policy >, pele::CellListPotential< InversePower_interaction, cartesian_distance< ndim > >, pele::CellListPotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::CellListPotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::CellListPotential< lj_interaction_cut_smooth, periodic_distance< ndim > >, pele::CellListPotential< InversePower_interaction, periodic_distance< ndim > >, pele::FrozenPotentialWrapper< PotentialType >, pele::FrozenPotentialWrapper< LJ >, pele::FrozenPotentialWrapper< HS_WCAPeriodicCellLists< ndim > >, pele::FrozenPotentialWrapper< HS_WCAPeriodic< ndim > >, pele::FrozenPotentialWrapper< HS_WCACellLists< ndim > >, pele::FrozenPotentialWrapper< HS_WCA< ndim > >, pele::LowestEigPotential, pele::PythonPotential, pele::CombinedPotential, pele::SimplePairwiseNeighborList< pairwise_interaction, distance_policy >, pele::SimplePairwiseNeighborList< lj_interaction >, pele::SimplePairwiseNeighborList< WCA_interaction >, pele::SimplePairwiseNeighborList< sf_HS_WCA_interaction >, pele::SimplePairwiseNeighborList< harmonic_interaction >, pele::SimplePairwisePotential< pairwise_interaction, distance_policy >, pele::SimplePairwisePotential< InversePower_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< lj_interaction >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 2 > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction_cut_smooth >, pele::SimplePairwisePotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::SimplePairwisePotential< morse_interaction >, pele::SimplePairwisePotential< InversePower_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 2 > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, periodic_distance< ndim > >, and pele::BaseHarmonic.
Definition at line 41 of file base_potential.h.
virtual double pele::BasePotential::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 in pele::CellListPotential< pairwise_interaction, distance_policy >, pele::CellListPotential< InversePower_interaction, cartesian_distance< ndim > >, pele::CellListPotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::CellListPotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::CellListPotential< lj_interaction_cut_smooth, periodic_distance< ndim > >, pele::CellListPotential< InversePower_interaction, periodic_distance< ndim > >, pele::FrozenPotentialWrapper< PotentialType >, pele::FrozenPotentialWrapper< LJ >, pele::FrozenPotentialWrapper< HS_WCAPeriodicCellLists< ndim > >, pele::FrozenPotentialWrapper< HS_WCAPeriodic< ndim > >, pele::FrozenPotentialWrapper< HS_WCACellLists< ndim > >, pele::FrozenPotentialWrapper< HS_WCA< ndim > >, pele::CombinedPotential, pele::SimplePairwisePotential< pairwise_interaction, distance_policy >, pele::SimplePairwisePotential< InversePower_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, cartesian_distance< ndim > >, pele::SimplePairwisePotential< lj_interaction >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 2 > >, pele::SimplePairwisePotential< sf_HS_WCA_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, cartesian_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< lj_interaction_cut_smooth >, pele::SimplePairwisePotential< lj_interaction_cut_smooth, periodic_distance< 3 > >, pele::SimplePairwisePotential< morse_interaction >, pele::SimplePairwisePotential< InversePower_interaction, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, cartesian_distance< ndim > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 2 > >, pele::SimplePairwisePotential< WCA_interaction, periodic_distance< 3 > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, periodic_distance< ndim > >, pele::SimplePairwisePotential< InverseHalfIntPower_interaction< POW2 >, cartesian_distance< ndim > >, and pele::SimplePairwisePotential< InverseIntPower_interaction< POW >, periodic_distance< ndim > >.
Definition at line 64 of file base_potential.h.
virtual void pele::BasePotential::get_hessian | ( | Array< double > | x, |
Array< double > | hess | ||
) | [inline, virtual] |
compute the hessian.
If not overloaded it will call get_energy_gradient_hessian
Definition at line 97 of file base_potential.h.
virtual void pele::BasePotential::numerical_gradient | ( | Array< double > | x, |
Array< double > | grad, | ||
double | eps = 1e-6 |
||
) | [inline, virtual] |
compute the numerical gradient
Definition at line 75 of file base_potential.h.
virtual void pele::BasePotential::numerical_hessian | ( | Array< double > | x, |
Array< double > | hess, | ||
double | eps = 1e-6 |
||
) | [inline, virtual] |
compute the numerical gradient
Definition at line 106 of file base_potential.h.