pele.potentials.GMINPotential#

class pele.potentials.GMINPotential(GMIN)[source]#

Interface to fortran GMIN potential

Potentials implemented in GMIN can be called from python if GMIN is compiled with the flag WITH_PYTHON enabled. This creates python modules (dynamic libraries). However, the interface is still very rough and GMINPotential provides a wrapper for easy access to GMIN.

The imported GMIN module requires a data file to be present in the current directory. All parameters except for the ones responsible to setup the potential will be ignored and can be skipped. The first call after importing the module should be initialize.

Attributes:
GMIN

reference to the gmin module

Examples

The following example imports the GMIN python interface and evaluates the energy

>>> import gmin_
>>>
>>> gmin_.initialize() # finish gmin initialization
>>> pot = GMINPotential(gmin_)
>>>
>>> coords = pot.getCoords()
>>> pot.getEnergy(coords)

Methods

NumericalDerivative(coords[, eps])

return the gradient calculated numerically

NumericalHessian(coords[, eps])

return the Hessian matrix of second derivatives computed numerically

getCoords()

getEnergy(coords)

return the energy at the given coordinates

getEnergyGradient(coords)

return the energy and gradient at the given coordinates

getEnergyGradientHessian(coords)

return the energy, gradient, and Hessian at the given coordinates

getEnergyGradientNumerical(coords)

getGradient(coords)

return the gradient at the given coordinates

getHessian(coords)

return the hessian

test_potential(coords[, eps])

print some information testing whether the analytical gradients are correct

Attributes