pele.mindist.periodic_exact_match#

class pele.mindist.periodic_exact_match.MeasurePeriodic[source]

Source

class MeasurePeriodic(MeasurePolicy):

interface for possible measurements on a set of coordinates with periodic boundary conditions

Parameters:
box_lengthsarray

vector defining the box

permlistlist of lists

list of lists of identical atoms

Notes

this is only implemented for a rectangular box

MeasurePeriodic.get_dist()[source]

Source

def get_dist(self, X1, X2, with_vector=False):

calculate the distance between 2 sets of coordinates

class pele.mindist.periodic_exact_match.TransformPeriodic[source]

Source

class TransformPeriodic(TransformPolicy):

interface for possible transformations on a set of coordinates

The transform policy tells minpermdist how to perform transformations, i.e. a translation, rotation and inversion on a specific set of coordinates. This class is necessary since in general a coordinate array does not carry any information on the type of coordinate, e.g. if it’s a site coordinate, atom coordinate or angle axis vector.

All transformation act in place, that means they change the current coordinates and do not make a copy.

TransformPeriodic.can_invert()[source]

Source

def can_invert(self):

returns True or False if an inversion can be performed

TransformPeriodic.permute()[source]

Source

def permute(self, X, perm):

return the permuted coordinates

note: this leaves the input X unchanged, different behavior than the TransformAtomicCluster.permute(). This function should probably change to conform with TransformAtomicCluster.permute()

class pele.mindist.periodic_exact_match.ExactMatchPeriodic[source]

Source

class ExactMatchPeriodic:

Deterministic check if 2 structures are a perfect match

Notes

assume there are permutable atoms, because if there are not then the problem is trivial. if even one atom is not permutable, then it is greatly simplified. if there are two atoms not permutable it becomes trivial.

we have two structures, A and B.

  1. Choose an atom iA in structure A.

  2. Choose an atom iB in structure B

  3. align the structures based on the assumption iA == iB.

  4. if the structures are not the same, repeat for all atoms iB in B

..note:

This ignores any reflection / rotation symmetries

ExactMatchPeriodic.check_match()[source]

Source

def check_match(self, x1, x2, iA, iB):

overlay structures with atom iA == atom iB and check for exact match