Perturbations
Perturbations module contains classes that take steps around a given space. The perturbations have a separate class for each coordinates class, as molecular and atomistic systems require different changes that respect the bonding framework. These instances are passed to the global optimisation instance to drive its step-taking
- class topsearch.global_optimisation.perturbations.AtomicPerturbation(max_displacement: float, max_atoms: int)
Description
Simple displacement routine applicable to atomic systems. Applies a 3D displacement vector to selected atoms. Perturbs up to max_atoms atoms with a displacement up to max_displacement
- max_displacement
The maximum allowed displacement in a given direction for an atom
- Type:
float
- max_atoms
The maximum number of atoms that can be perturbed at each call
- Type:
int
- perturb(coords: AtomicCoordinates) None
Returns coords perturbed by a displacement to up to max_atoms
- class topsearch.global_optimisation.perturbations.MolecularPerturbation(max_displacement: float, max_bonds: int)
Description
Displacement routine applicable to molecular systems. Needs to retain the bonding framework, which it achieves through rotation of bond dihedrals. Selects a random subset of flexible bond dihedrals and rotates through a random angle up to a specified limit
- max_displacement
The maximum allowed angle change of a given dihedral
- Type:
float
- max_bonds
The maximum number of dihedrals that can be perturbed at each call
- Type:
int
- perturb(coords: MolecularCoordinates) None
Rotate about randomly selected bonds within a molecular system
- class topsearch.global_optimisation.perturbations.StandardPerturbation(max_displacement: float, proportional_distance: bool = False)
Description
Class to perturb a position in Euclidean space for use in global optimisation. For non-atomic systems this is implemented as random displacements
- max_displacement
Maximum allowed perturbation size from the given point
- Type:
float
- proportional_distance
Determines whether max_displacement is an absolute value (if False) or a proportion of the bounds (if True)
- Type:
logical
- perturb(coords: StandardCoordinates) None
Displace the given position by randomly up to specified size
- set_step_sizes(coords: StandardCoordinates) NDArray[Any, Any]
Generate an appropriate step size for the given coordinates