示例#1
0
    def _determine_inversion(self, permlist):
        x = np.array(self.atom_positions)
        xi = -x
        exact = ExactMatchAtomicCluster(permlist=permlist, can_invert=False)

        for rot, invert in exact.standard_alignments(x, xi):
            if exact.check_match(x, xi, rot, invert):
                self.inversion = exact._last_checked_rotation
                return
示例#2
0
文件: rigidbody.py 项目: js850/PyGMIN
 def _determine_inversion(self, permlist):
     x = np.array(self.atom_positions)
     xi = -x
     exact = ExactMatchAtomicCluster(permlist=permlist, can_invert=False)
     
     for rot, invert in exact.standard_alignments(x, xi):
         if exact.check_match(x, xi, rot, invert):
             self.inversion = exact._last_checked_rotation
             return 
示例#3
0
 def _determine_rotational_symmetry(self, permlist):
     x = np.array(self.atom_positions)
     exact = ExactMatchAtomicCluster(permlist=permlist, can_invert=False)
     for rot, invert in exact.standard_alignments(x, x):
         if exact.check_match(x, x, rot, invert):
             rot = exact._last_checked_rotation
             exists = False
             for rot2 in self.symmetries:
                 if np.linalg.norm(rot2 - rot) < 1e-6:
                     exists = True
                     break
             if not exists:
                 self.symmetries.append(rot)
示例#4
0
文件: rigidbody.py 项目: js850/PyGMIN
 def _determine_rotational_symmetry(self, permlist):
     x = np.array(self.atom_positions)
     exact = ExactMatchAtomicCluster(permlist=permlist, can_invert=False)
     for rot, invert in exact.standard_alignments(x, x):
         if exact.check_match(x, x, rot, invert):
             rot = exact._last_checked_rotation
             exists=False
             for rot2 in self.symmetries:
                 if np.linalg.norm(rot2 - rot) < 1e-6:
                     exists=True
                     break
             if not exists:
                 self.symmetries.append(rot)
示例#5
0
 def get_compare_exact(self, **kwargs):
     permlist = [range(self.natoms)]
     return ExactMatchAtomicCluster(permlist=permlist, **kwargs)
示例#6
0
 def get_compare_exact(self, **kwargs):
     """this function quickly determines whether two clusters are identical
     given translational, rotational and permutational symmeties
     """
     permlist = self.get_permlist()
     return ExactMatchAtomicCluster(permlist=permlist, **kwargs)
示例#7
0
 def get_compare_exact(self, **kwargs):
     permlist = self.get_permlist()
     return ExactMatchAtomicCluster(permlist=permlist, **kwargs)