Class FlatHarmonic#

Inheritance Relationships#

Base Type#

Class Documentation#

class FlatHarmonic : public pele::BasePotential#

Flat Harmonic Potential.

Flat in one dimension so that the hessian is singular. Useful for testing optimizers where the singularity is handled. The Potential is flat in the x+y direction. and the origin is at 0, 0.

Public Functions

inline FlatHarmonic(double a = 1)#
inline virtual ~FlatHarmonic()#
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.