def _determine_inversion(self, permlist): x = np.array(self.atom_positions).flatten() 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
def _determine_rotational_symmetry(self, permlist): x = np.array(self.atom_positions).flatten() 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)
def _determine_rotational_symmetry(self, permlist): x = np.array(self.atom_positions).flatten() 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)