pele.transition_states._find_lowest_eig#
tools for finding the smallest eigenvalue and associated eigenvector using Rayleigh-Ritz minimization
- class pele.transition_states._find_lowest_eig.LowestEigPot[source]
-
class LowestEigPot(BasePotential):Potential wrapper for use in an optimizer for finding the eigenvector Notes ----- here the energy corresponds to the eigenvalue, and the coordinates to be optimized is the eigenvector Parameters ----------- coords : array The point in space where we want to compute the lowest eigenvector pot : potential object The potential of the system. i.e. pot.getEnergyGradient(coords) gives the energy and gradient orthogZeroEigs : callable The function which makes a vector orthogonal to the known eigenvectors with zero eigenvalues. The default assumes global translational and rotational symmetry dx : float the local curvature is approximated using points separated by dx first_order : bool use the first order forward finite differences approximation for the curvature rather than the second order central differences approximation. This is less accurate, but requires one fewer potential call per iteration. gradient : float array the true gradient at coords. If first_order is true and gradient is not None then one potential call will be saved.
- LowestEigPot.update_coords()[source]
-
def update_coords(self, coords, gradient=None):update the position at which the curvature is computed
- LowestEigPot.getEnergy()[source]
-
def getEnergy(self, vec_in):return the ‘energy’ a.k.a. the curvature at coords along the direction vec_in
- LowestEigPot.getEnergyGradient()[source]
-
def getEnergyGradient(self, vec_in):return the curvature and the gradient of the curvature w.r.t. vec_in
- vec_inarray
A guess for the lowest eigenvector. It should be normalized
- class pele.transition_states._find_lowest_eig.FindLowestEigenVector[source]
-
class FindLowestEigenVector:A class to compute the lowest eigenvector of the Hessian using Rayleigh-Ritz minimization
- Parameters:
- coordsfloat array
the point in space at which to compute the lowest eigenvector
- potPotential object
the potential energy function
- eigenvec0float array
the initial guess for the lowest eigenvector
- orthogZeroEigscallable
The function which makes a vector orthogonal to the known eigenvectors with zero eigenvalues. The default assumes global translational and rotational symmetry
- dxfloat
the local curvature is approximated using points separated by dx
- first_orderbool
use the first order forward finite differences approximation for the curvature rather than the second order central differences approximation. This is less accurate, but requires one fewer potential call per iteration.
- gradientfloat array
the true gradient at coords. If first_order is true and gradient is not None then one potential call will be saved.
- cpp_lbfgsbool
minimize with the C++ LBFGS (LBFGS_CPP) rather than MYLBFGS. MYLBFGS accepts steps by the relative change in curvature, which rejects every step when the lowest curvature is close to zero and then raises LineSearchError.
- minimizer_kwargskwargs
these kwargs are passed to the optimizer which finds the direction of least curvature
- FindLowestEigenVector.stop_criterion_satisfied()[source]
-
def stop_criterion_satisfied(self):test if the stop criterion is satisfied
- FindLowestEigenVector.update_coords()[source]
-
def update_coords(self, coords, energy=None, gradient=None):update the position at which to compute the eigenvector
- FindLowestEigenVector.one_iteration()[source]
-
def one_iteration(self):do one iteration of the minimizer
- FindLowestEigenVector.run()[source]
-
def run(self, niter=None):do niter iterations, or until the stop criterion is satisfied
- pele.transition_states._find_lowest_eig.findLowestEigenVector()[source]
-
def findLowestEigenVector( coords, pot, eigenvec0=None, H0=None, orthogZeroEigs=0, dx=1e-3, first_order=True, gradient=None, **minimizer_kwargs ):
Compute the lowest eigenvector of the Hessian using Rayleigh-Ritz minimization
*orthogZeroEigs is system dependent, don’t forget to set it*
- Parameters:
- coords
the coordinates at which to find the lowest eigenvector
- pot
potential object
- eigenvec0
the initial guess for the lowest eigenvector (will be random if not passed)
- H0float
the initial guess for the diagonal component of the inverse Hessian
- orthogZeroEigscallable
this function makes a vector orthogonal to the known zero eigenvectors:
orthogZeroEigs=0 : default behavior, assume translational and rotational symmetry orthogZeroEigs=None : the vector is unchanged
- first_orderbool
use the first order forward finite differences approximation for the curvature rather than the second order central differences approximation. This is less accurate, but requires one fewer potential call per iteration.
- gradientfloat array
the true gradient at coords. If first_order is true and gradient is not None then one potential call will be saved.
- minimizer_kwargs
any additional keyword arguments are passed to the minimizer
See also
FindTransitionStateuses this class