Class PoweredCosineSum#
Defined in File rosenbrock.hpp
Inheritance Relationships#
Base Type#
public pele::BasePotential(Class BasePotential)
Class Documentation#
-
class PoweredCosineSum : public pele::BasePotential#
Negative cosine sum function for testing basin volume calculations.
Yields a hypercubic basin with volume period^dim. We also add a power to the energy to ensure that the hessian isn’t diagonal. The full potential is given by
The offset ensures that the hessian is smooth if power goes below 0.\[V(x) = \left(\mathrm{offset} + \sum_i \left[1-\cos(2\pi x_i/\mathrm{period})\right]\right)^{\mathrm{power}} \]Public Functions
- inline PoweredCosineSum(
- size_t dim,
- double period = 1,
- double pow = 0.5,
- double offset = 1.0
-
inline virtual ~PoweredCosineSum()#
-
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 add_energy_gradient( )#
compute the energy and gradient, but don’t initialize the gradient to zero
- inline virtual double get_energy_gradient( )#
compute the energy and gradient.
If not overloaded it will compute the numerical gradient
- inline virtual double add_energy_gradient_hessian( )#
compute the energy, gradient, and Hessian, but don’t initialize the gradient or hessian to zero