diff --git a/pyxtal/wyckoff_site.py b/pyxtal/wyckoff_site.py index 0e84c17f..97c04ac6 100644 --- a/pyxtal/wyckoff_site.py +++ b/pyxtal/wyckoff_site.py @@ -106,6 +106,7 @@ def _get_coords_and_species(self, absolute=False, add_PBC=False, first=False): coord0 = self.mol.cart_coords.dot(self.orientation.matrix.T) # wp_atomic_sites = [] wp_atomic_coords = None + for point_index, op2 in enumerate(self.wp.ops): # Obtain the center in absolute coords center_relative = op2.operate(self.position) @@ -115,8 +116,10 @@ def _get_coords_and_species(self, absolute=False, add_PBC=False, first=False): #op2_m = self.wp.generators_m[point_index] op2_m = self.wp.generators_m[point_index] rot = op2_m.affine_matrix[0:3][:, 0:3].T - #tau = op2_m.affine_matrix[0:3][:, 3] - tau = op2.translation_vector + if self.diag and self.wp.index > 0: + tau = op2.translation_vector + else: + tau = op2_m.affine_matrix[0:3][:, 3] tmp = np.dot(coord0, rot) + tau # Add absolute center to molecule tmp += center_absolute