コード例 #1
0
ファイル: rigidbody.py プロジェクト: yfyh2013/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
コード例 #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
ファイル: rigidbody.py プロジェクト: yfyh2013/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)
コード例 #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
ファイル: mypotential.py プロジェクト: yfyh2013/PyGMIN
 def get_compare_exact(self, **kwargs):
     permlist = [range(self.natoms)]
     return ExactMatchAtomicCluster(permlist=permlist, **kwargs)
コード例 #6
0
ファイル: cluster.py プロジェクト: yfyh2013/PyGMIN
 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)