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

#include <combine_potentials.h>

Inheritance diagram for pele::CombinedPotential:
pele::BasePotential

List of all members.

Public Member Functions

 CombinedPotential ()
virtual ~CombinedPotential ()
virtual void add_potential (std::shared_ptr< BasePotential > potential)
virtual double get_energy (Array< double > x)
virtual double get_energy_gradient (Array< double > x, Array< double > grad)
virtual double get_energy_gradient_hessian (Array< double > x, Array< double > grad, Array< double > hess)

Protected Attributes

std::list< std::shared_ptr
< BasePotential > > 
_potentials

Detailed Description

Potential wrapper which wraps multiple potentials to act as one potential. This can be used to implement multiple types of interactions, e.g. a system with two types atoms

Definition at line 15 of file combine_potentials.h.


Constructor & Destructor Documentation

Definition at line 20 of file combine_potentials.h.

virtual pele::CombinedPotential::~CombinedPotential ( ) [inline, virtual]

destructor: destroy all the potentials in the list

Definition at line 25 of file combine_potentials.h.


Member Function Documentation

virtual void pele::CombinedPotential::add_potential ( std::shared_ptr< BasePotential potential) [inline, virtual]

add a potential to the list

Definition at line 30 of file combine_potentials.h.

virtual double pele::CombinedPotential::get_energy ( Array< double >  x) [inline, virtual]

Return the energy of configuration x. This is the only function which must be overloaded

Reimplemented from pele::BasePotential.

Definition at line 35 of file combine_potentials.h.

virtual double pele::CombinedPotential::get_energy_gradient ( Array< double >  x,
Array< double >  grad 
) [inline, virtual]

compute the energy and gradient.

If not overloaded it will compute the numerical gradient

Reimplemented from pele::BasePotential.

Definition at line 44 of file combine_potentials.h.

virtual double pele::CombinedPotential::get_energy_gradient_hessian ( Array< double >  x,
Array< double >  grad,
Array< double >  hess 
) [inline, virtual]

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.

Reimplemented from pele::BasePotential.

Definition at line 59 of file combine_potentials.h.


Member Data Documentation

std::list<std::shared_ptr<BasePotential> > pele::CombinedPotential::_potentials [protected]

Definition at line 17 of file combine_potentials.h.


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