Skip to content

Commit

Permalink
fix the bug in generating tabular reps
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Sep 6, 2024
1 parent e8f7a8d commit 997341b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pyxtal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3652,7 +3652,7 @@ def get_tabular_representations(self, N_max=30, N_wp=8, normalize=False, perturb
self.get_xtal_string())
for sites_id in ids:
rep = self.get_tabular_representation(
sites_id, normalize, N_wp, perturb, eps=eps)
sites_id, normalize, N_wp, perturb, eps=eps, standardize=False)
reps.append(rep)
return reps

Expand All @@ -3665,6 +3665,7 @@ def get_tabular_representation(
max_abc=50.0,
max_angle=np.pi,
eps=0.05,
standardize=True,
):
"""
Convert the xtal to a 1D reprsentation organized as
Expand Down Expand Up @@ -3715,8 +3716,10 @@ def get_tabular_representation(
rep[count] /= len(self.group)
xyz = site.coords[id] # position
xyz -= np.floor(xyz)
free_xyzs = site.wp.get_free_xyzs(xyz, perturb=perturb, eps=0.05)
xyz = site.wp.get_position_from_free_xyzs(free_xyzs)
if standardize:
free_xyzs = site.wp.get_free_xyzs(
xyz, perturb=perturb, eps=eps)
xyz = site.wp.get_position_from_free_xyzs(free_xyzs)
rep[count + 1: count + 4] = xyz
count += 4
return rep
Expand Down Expand Up @@ -3892,5 +3895,3 @@ def from_prototype(self, prototype):
['Cs', 'Cl'])
else:
raise ValueError("Cannot support the input prototype", prototype)


0 comments on commit 997341b

Please sign in to comment.