mcpele  1.0.0
The Monte Carlo Python Energy Landscape Explorer
 All Classes Namespaces Functions Variables Typedefs
Public Member Functions
pele::PythonPotential Class Reference

#include <python_potential_wrapper.h>

Inheritance diagram for pele::PythonPotential:
pele::BasePotential

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs