NudgedElasticBandStepFinder
__init__(self, func, jacobian, hessian=None, spring_constants=0.1, distance_function=None, step_finder='gradient-descent', logger=None, **opts):
LLM Docstring
Initialize a nudged-elastic-band (NEB) step finder with spring couplings between neighbouring images.
func:Callablethe per-image objective
jacobian:Callablethe per-image gradient
hessian:Callable | Nonethe per-image Hessian
spring_constants:float | np.ndarrayspring constant(s) between images
distance_function:Callable | Noneoptional custom inter-image distance
step_finder:strthe base per-image method
logger:object | Noneoptional logger
opts:Anyextra options for the base step finder
get_dist(self, p1, p2):
LLM Docstring
Return the Euclidean distance between two image geometries.
p1:np.ndarraythe first geometry
p2:np.ndarraythe second geometry
:returns:np.ndarraythe distance
get_tangent(self, guess, mask, cur, prev, next):
LLM Docstring
Compute the (normalized) NEB path tangent at an image, using the energy-weighted tangent scheme based on the neighbouring image energies.
guess:np.ndarraythe full chain
mask:np.ndarrayactive-member indices
cur:intcurrent image index
prev:intprevious image index
next:intnext image index
:returns:np.ndarraythe unit path tangent
adjust_jacobian(self, jac, guess, mask, cur, prev, next):
LLM Docstring
Project the tangential component out of the per-image gradient (the NEB nudging), caching the current path tangent.
jac:np.ndarraythe base gradient
guess:np.ndarraythe full chain
mask:np.ndarrayactive-member indices
cur:intcurrent image index
prev:int | Noneprevious image index
next:int | Nonenext image index
:returns:np.ndarraythe nudged gradient
climbing_node_step(self, guess, mask, gradient_modifer=None, projector=None):
LLM Docstring
Take a climbing-image step: invert the tangential force component so the image climbs toward the saddle along the path.
guess:np.ndarraythe climbing-image parameters
mask:np.ndarrayactive-member indices
gradient_modifer:Callable | Noneoptional gradient transformation
projector:np.ndarray | Noneoptional projector
:returns:tuple(step, gradient)
image_pairwise_contribution(self, guess, mask, cur, prev, next, order=0):
LLM Docstring
Compute the NEB spring contribution to the objective/gradient/Hessian from the difference of the distances to the two neighbouring images.
guess:np.ndarraythe full chain
mask:np.ndarrayactive-member indices
cur:intcurrent image index
prev:int | Noneprevious image index
next:int | Nonenext image index
order:intderivative order (
0=value,1=gradient,2=Hessian):returns:np.ndarray | intthe spring contribution