Similarity

Similarity module contains classes that evaluate the similarity of two different points in a space. The class StandardSimilarity is the base class from which atomic and molecular equivalents build

class topsearch.similarity.similarity.StandardSimilarity(distance_criterion: float, energy_criterion: float, proportional_distance: bool = False)

Description

Base class for assessing the similarity between two configurations. The base class deals with non-atomic systems, which are considerably simpler than atomic systems due to the absence of permutation and rotation. The distance can simply be the L2 norm between vectors.

distance_criterion

The distance under which two minima are considered the same, for proportional_distance set to True this is not an absolute value, but the proportion of the total function range

Type:

float

energy_criterion

The value that the difference in function values must be below to be considered the same

Type:

float

proportional_distance

Set if the distance_criterion is an absolute value or a proportion of the function bounds range

Type:

logical

centre(coords1: StandardCoordinates) NDArray[Any, Any]

Returns coords again, included for ease with other classes

closest_distance(coords1: StandardCoordinates, coords2: NDArray[Any, Any]) float

Returns the closest distance between coords1 and coords2. Just the Euclidean distance for non-atomic systems

distance(coords1: NDArray[Any, Any], coords2: NDArray[Any, Any]) float

Returns Euclidean distance between two configurations

is_new_minimum(ktn: KineticTransitionNetwork, min_coords: StandardCoordinates, min_energy: float) tuple[bool, NDArray]

Compare to all existing minima and add if different to all minima currently in network return True

is_new_ts(ktn: KineticTransitionNetwork, ts_coords: StandardCoordinates, ts_energy: float) tuple[bool, NDArray]

Compare transition state to all other currently in the network G and return False if same as any of them

optimal_alignment(coords1: StandardCoordinates, coords2: NDArray[Any, Any]) tuple[float, NDArray[Any, Any], NDArray[Any, Any]]

Placeholder method to allow the same routines to be used in atomic classes, does nothing in this case

test_new_minimum(ktn: KineticTransitionNetwork, min_coords: StandardCoordinates, min_energy: float) None

Evaluate if a minimum is different to all current minima, check the minimum passes the required tests, and if both are True then add to network

test_new_ts(ktn: KineticTransitionNetwork, ts_coords: StandardCoordinates, ts_energy: float, min_plus_coords: NDArray, e_plus: float, min_minus_coords: NDArray, e_minus: float) None

Evaluate if the transition state is not a repeat, and that all stationary points are valid. If they are then add transition state to network with indices of connected minima

test_same(coords1: StandardCoordinates, coords2: NDArray[Any, Any], energy1: float, energy2: float) bool

Returns logical that specifies if two points are the same