Skip to content

Commit

Permalink
fix the translation vec
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Aug 14, 2020
1 parent 8130a03 commit 44451ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyxtal/wyckoff_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 44451ce

Please sign in to comment.