pele.potentials.potential#
this module holds the base classes for potentials
- class pele.potentials.potential.BasePotential[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]
-
def getEnergy(self, coords):return the energy at the given coordinates
- BasePotential.getEnergyGradient()[source]
-
def getEnergyGradient(self, coords):return the energy and gradient at the given coordinates
- BasePotential.NumericalDerivative()[source]
-
def NumericalDerivative(self, coords, eps=1e-6):return the gradient calculated numerically
- BasePotential.getGradient()[source]
-
def getGradient(self, coords):return the gradient at the given coordinates
- BasePotential.NumericalHessian()[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]
-
def getEnergyGradientHessian(self, coords):return the energy, gradient, and Hessian at the given coordinates
- BasePotential.test_potential()[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]
-
class potential(BasePotential):for backward compatibility
- class pele.potentials.potential.BasePotentialAtomistic[source]
-
class BasePotentialAtomistic:Base class for all potentials that can use interaction lists
See also
- BasePotentialAtomistic.getEnergyList()[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,:]).