#include <python_potential_wrapper.h>
Public Member Functions | |
PythonPotential (PyObject *potential) | |
virtual | ~PythonPotential () |
virtual double | get_energy (Array< double > x) |
virtual double | get_energy_gradient (Array< double > x, Array< double > grad) |
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.
Definition at line 47 of file python_potential_wrapper.h.
pele::PythonPotential::PythonPotential | ( | PyObject * | potential | ) | [inline] |
Definition at line 52 of file python_potential_wrapper.h.
virtual pele::PythonPotential::~PythonPotential | ( | ) | [inline, virtual] |
Definition at line 66 of file python_potential_wrapper.h.
virtual double pele::PythonPotential::get_energy | ( | Array< double > | x | ) | [inline, virtual] |
call the getEnergy method of the python potential
Reimplemented from pele::BasePotential.
Definition at line 74 of file python_potential_wrapper.h.
virtual double pele::PythonPotential::get_energy_gradient | ( | Array< double > | x, |
Array< double > | grad | ||
) | [inline, virtual] |
call the getEnergyGradient method of the python potential
Reimplemented from pele::BasePotential.
Definition at line 118 of file python_potential_wrapper.h.