Class PythonPotential#

Inheritance Relationships#

Base Type#

Class Documentation#

class PythonPotential : public pele::BasePotential#

This class wraps a get_energy function and a get_energy_gradient function in a class that derives from BasePotential.

This is necessary to be able to use the functions in the pele c++ interface. This is a backup method, the preferred method is to define a class separately for each potential, which eliminates the need to pass around the void * userdata parameter. This class derives from the c++ BasePotential, but wraps a pure python potential This is necessary to be able to use the functions in the pele c++ interface.

Public Functions

inline PythonPotential(PyObject *potential)#
inline virtual ~PythonPotential()#
inline virtual double get_energy(Array<double> const &x)#

call the getEnergy method of the python potential

inline virtual double get_energy_gradient(
Array<double> const &x,
Array<double> &grad
)#

call the getEnergyGradient method of the python potential