Potential

Potential module contains the base Potential class. This class provides the function that can be explored and gives the numerical first and second derivatives. All other potential class inherit the numerical derivatives from this class

class topsearch.potentials.potential.Potential

Description

Class to specify the optimisable function, and provide methods to compute its value, first and second derivatives given a position in space, and any necessary information such as training data

check_valid_minimum(coords: StandardCoordinates) bool

Determines if a point is a minimum based on its eigenvalues

check_valid_ts(coords: StandardCoordinates) bool

Check if position is a valid transition state with only one negative eigenvalue of the Hessian matrix

function(position: NDArray[Any, Any]) float

Evaluate the function at a given point

function_gradient(position: NDArray[Any, Any]) Tuple[float, NDArray[Any, Any]]

Evaluate both function and derivative in single method for optimiser Returns function value and gradient vector

gradient(position: NDArray[Any, Any], displacement: float = 1e-06) NDArray[Any, Any]

Evaluate the numerical gradient of the function a point coords. Useful default to fall on if no analytical derivatives. Returns 1d array with gradient w.r.t all components

hessian(position: NDArray[Any, Any], displacement: float = 0.0001) NDArray[Any, Any]

Compute the matrix of second derivatives numerically Returns 2d array of second derivatives