rdmc.mathlib.greedymin#
Modules for finding local minima on the scanned potential energy surface by a greedy algorithm. Need to parallelize this.
- rdmc.mathlib.greedymin.compare_to_adjacent_point(coord: List[Tuple], energies: ndarray, unchecked_points: List[Tuple], filters: List[Tuple]) Tuple #
Compare the energy of current point and those of other points.
- Parameters:
coord (list of tuples) – The coordinate of the current point.
energies (np.ndarray) – The energies of all points.
unchecked_points (list of tuples) – The points that have not been checked.
filters (list of tuples) – The filters for searching adjacent points.
- Returns:
The coordinate of the adjacent point with the lowest energy.
- rdmc.mathlib.greedymin.get_energy(coord: List[Tuple], energies: ndarray) float #
Get the energies of adjacent points considering periodic boundary condition.
- Parameters:
coord – The coordinate of a point.
energies – The energies of all points.
- Returns:
float – The energy of the point.
- rdmc.mathlib.greedymin.get_step_to_adjacent_points(fsize: int, dim: int = 2, cutoff: float = inf) generator #
Get a generator containing the adjacent points.
- Parameters:
fsize – The filter size as positive integer.
dim – The dimension of the PES. Default is 2.
cutoff – The cutoff distance. only consider steps with distance smaller than the cutoff. Default is infinity, meaning no cutoff is applied.
- Returns:
A generator containing the adjacent coordinates.
- rdmc.mathlib.greedymin.search_for_a_minimum(coord: tuple, energies: ndarray, unchecked_points: List[Tuple], filters: List[Tuple]) Tuple #
Search a local minimum on a given PES.
- Parameters:
coord (tuple) – The coordinate of the current point.
energies (np.ndarray) – The energies of all points.
unchecked_points (list of tuples) – The points that have not been checked.
filters (list of tuples) – The filters for searching adjacent points.
minimum. (The coordinate of a local) –
- rdmc.mathlib.greedymin.search_minimum(energies: ndarray, fsize: int, cutoff: float = inf) List[Tuple] #
Search all the minimums on a given PES.
- Parameters:
energies (np.ndarray) – The energies of all points.
fsize (int) – The filter size as positive integer.
cutoff (float) – The cutoff distance. only consider steps with distance smaller than the cutoff. Default is infinity, meaning no cutoff is applied.
- Returns:
A list of coordinates of the minimums.