pele.mindist.minpermdist_stochastic#
- class pele.mindist.minpermdist_stochastic.MinPermDistCluster[source]
-
class MinPermDistCluster:Minimize the distance between two clusters.
- Parameters:
- niterint
the number of basinhopping iterations to perform
- verboseboolean
whether to print status information
- accuracy :float, optional
accuracy for standard alignment which determines if the structures are identical
- tolfloat, optional
tolerance for an exact match to stop iterations
- transform
Transform policy which tells MinpermDist how to transform the given coordinates
- measure
measure policy which tells minpermdist how to perform certains measures on the coordinates.
See also
Notes
The following symmetries will be accounted for:
Translational symmetry
Global rotational symmetry
Permutational symmetry
Point inversion symmetry
The algorithm here to find the best distance is:
for rotation in standardalignments: optimize permutation optimize rotation check_match for i in range(niter): random_rotation optimize permutations align rotation check_match
The minpermdist algorithm is generic and can act on various types of coordinates, e.g. carthesian, angle axis, …. The transform and measure policies define and interface to manipulate and analyze a given set of coordinates. If the coordinates don’t have a standard format, custom policies can be specified. As an example see the angle axis minpermdist routines.
- MinPermDistCluster.check_match()[source]
-
def check_match(self, x1, x2, rot, invert):check a given rotation for a match
- MinPermDistCluster.finalize_best_match()[source]
-
def finalize_best_match(self, x1):do final processing of the best match
- MinPermDistCluster.align_structures()[source]
-
def align_structures(self, coords1, coords2):- Parameters:
- coords1, coords2np.array
the structures to align. X2 will be aligned with X1, both the center of masses will be shifted to the origin
- Returns:
- a triple of (dist, coords1, coords2). coords1 are the unchanged coords1
- and coords2 are brought in best alignment with coords2