Skip to content

Commit

Permalink
Merge pull request #23 from yuzie007/fix-count-configurations
Browse files Browse the repository at this point in the history
Fix place of `count_configurations`
  • Loading branch information
yuzie007 authored Aug 6, 2024
2 parents ecbfe98 + 2552ccd commit 55c4541
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions ikdsplit/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ def recur_run(
) -> None:
"""Run each subgroup recursively."""
print_group(group, level, end=" ")
order = find_point_group_order(find_crystal_class(group))
print(f"(order: {order})", end=" ")
ncs = count_configurations()
print(f"({ncs} configurations)", end=" ")
if order < criteria["min_order"] or ncs > criteria["max_configurations"]:
print("... skipped")
return
else:
print()

dn = pathlib.Path(f"{group:03d}")
dn.mkdir(parents=True, exist_ok=True)
with cd(dn):
order = find_point_group_order(find_crystal_class(group))
print(f"(order: {order})", end=" ")
ncs = count_configurations()
print(f"({ncs} configurations)", end=" ")
if order < criteria["min_order"]:
print("... skipped")
return
if ncs > criteria["max_configurations"]:
print("... skipped")
return
print()

fill()

regress()
Expand Down

0 comments on commit 55c4541

Please sign in to comment.