Skip to content

Commit

Permalink
Merge pull request #248 from kyledmiller/master
Browse files Browse the repository at this point in the history
touching up the new return of splitters by get_transition()
  • Loading branch information
qzhu2017 authored Mar 18, 2024
2 parents 0196a58 + 4673824 commit 4e457fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyxtal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2210,13 +2210,14 @@ def get_transition(self, ref_struc, d_tol=1.0, d_tol2=0.3, N_images=2, max_path=
- displacements:
- cell translation:
- the list of space groups along the path
- the list of splitters along the path
"""
#ref_struc.sort_sites_by_numIons()
#self.sort_sites_by_numIons()
paths = self.group.search_subgroup_paths(ref_struc.group.number)
if len(paths) == 0:
print("No valid paths between the structure pairs")
return None, None, None, None
return None, None, None, None, None
else:
Skipped = len(paths) - max_path
if Skipped > 0: paths = paths[:max_path] #sample(paths, max_path)
Expand All @@ -2239,7 +2240,7 @@ def get_transition(self, ref_struc, d_tol=1.0, d_tol2=0.3, N_images=2, max_path=
(strucs, disp, tran, count, sps) = r
if strucs is not None:
if strucs[-1].disp < d_tol2: #stop
return strucs, disp, tran, p0
return strucs, disp, tran, p0, sps
else:
good_ds.append(strucs[-1].disp)
good_disps.append(disp)
Expand Down

0 comments on commit 4e457fb

Please sign in to comment.