Class CombinedPotential#

Inheritance Relationships#

Base Type#

Derived Type#

Class Documentation#

class CombinedPotential : public pele::BasePotential#

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

Subclassed by pele::ExtendedPotential

Public Functions

inline CombinedPotential()#
inline virtual ~CombinedPotential()#

destructor: destroy all the potentials in the list

inline virtual void add_potential(std::shared_ptr<BasePotential> potential)#

add a potential to the list

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 get_energy_gradient_hessian(
Array<double> const &x,
Array<double> &grad,
Array<double> &hess
)#

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.

inline virtual void get_hessian(Array<double> const &x, Array<double> &hessian)#

compute the hessian.

If not overloaded it will call get_energy_gradient_hessian