pele.potentials.potential#

Module source

this module holds the base classes for potentials

class pele.potentials.potential.BasePotential[source]

Source

class BasePotential:

Base class for all potentials

Derived classes must overload getEnergy(). It is also highly recommended to overload getEnergyGradient(), otherwise gradients will be calculated numerically

getEnergyGradient()

BasePotential.getEnergy()[source]

Source

def getEnergy(self, coords):

return the energy at the given coordinates

BasePotential.getEnergyGradient()[source]

Source

def getEnergyGradient(self, coords):

return the energy and gradient at the given coordinates

BasePotential.NumericalDerivative()[source]

Source

def NumericalDerivative(self, coords, eps=1e-6):

return the gradient calculated numerically

BasePotential.getGradient()[source]

Source

def getGradient(self, coords):

return the gradient at the given coordinates

BasePotential.NumericalHessian()[source]

Source

def NumericalHessian(self, coords, eps=1e-6):

return the Hessian matrix of second derivatives computed numerically

this takes 2*len(coords) calls to getGradient

BasePotential.getEnergyGradientHessian()[source]

Source

def getEnergyGradientHessian(self, coords):

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

BasePotential.getHessian()[source]

Source

def getHessian(self, coords):

return the hessian

BasePotential.test_potential()[source]

Source

def test_potential(self, coords, eps=1e-6):

print some information testing whether the analytical gradients are correct

class pele.potentials.potential.potential[source]

Source

class potential(BasePotential):

for backward compatibility

class pele.potentials.potential.BasePotentialAtomistic[source]

Source

class BasePotentialAtomistic:

Base class for all potentials that can use interaction lists

See also

BasePotential
BasePotentialAtomistic.getEnergyList()[source]

Source

def getEnergyList(self, coords, ilist):

the energy of select interactions defined in ilist

Parameters:
coordsarray
ilistarray, shape (*,2)

a numpy array containing pairs of atoms (ilist[i,:]).

BasePotentialAtomistic.getEnergyGradientList()[source]

Source

def getEnergyGradientList(self, coords, ilist):

return the energy and gradient of select interactions defined in ilist

Parameters:
coordsarray
ilistarray, shape (*,2)

a numpy array containing pairs of atoms (ilist[i,:]).