#include <combine_potentials.h>
Public Member Functions | |
CombinedPotential () | |
virtual | ~CombinedPotential () |
virtual void | add_potential (std::shared_ptr< BasePotential > potential) |
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) |
Protected Attributes | |
std::list< std::shared_ptr < BasePotential > > | _potentials |
Potential wrapper which wraps multiple potentials to act as one potential. This can be used to implement multiple types of interactions, e.g. a system with two types atoms
Definition at line 15 of file combine_potentials.h.
pele::CombinedPotential::CombinedPotential | ( | ) | [inline] |
Definition at line 20 of file combine_potentials.h.
virtual pele::CombinedPotential::~CombinedPotential | ( | ) | [inline, virtual] |
destructor: destroy all the potentials in the list
Definition at line 25 of file combine_potentials.h.
virtual void pele::CombinedPotential::add_potential | ( | std::shared_ptr< BasePotential > | potential | ) | [inline, virtual] |
add a potential to the list
Definition at line 30 of file combine_potentials.h.
virtual double pele::CombinedPotential::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 35 of file combine_potentials.h.
virtual double pele::CombinedPotential::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 44 of file combine_potentials.h.
virtual double pele::CombinedPotential::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 59 of file combine_potentials.h.
std::list<std::shared_ptr<BasePotential> > pele::CombinedPotential::_potentials [protected] |
Definition at line 17 of file combine_potentials.h.