Skip to content

Commit

Permalink
fix the call in generate_wp_lib
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Feb 23, 2024
1 parent d70aeb4 commit f6c4888
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions pyxtal/symmetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,22 +390,26 @@ def is_valid_combination(self, sites):
return False
return True

def list_wyckoff_combinations(self, numIons, quick=False, max_wp=None, min_wp=None, Nmax=10000000):
def list_wyckoff_combinations(self, numIons, quick=False, numWp=(None, None), Nmax=10000000):
"""
List all possible wyckoff combinations for the given formula. Note this
is really designed for a light weight calculation. If the solution space
is big, set quick as True.
Args:
numIons: [12, 8]
quick: Boolean, quickly generate some solutions
numIons (list): [12, 8]
quick ()Boolean): quickly generate some solutions
numWp (tuple): (min_wp, max_wp)
Nmax: maximumly allowed combinations
Returns:
Combinations: list of possible sites
has_freedom: list of boolean numbers
indices: list of wp indices
"""

numIons = np.array(numIons)
(min_wp, max_wp) = numWp
# Must be greater than the number of smallest wp multiplicity
if numIons.min() < self[-1].multiplicity:
return [], [], []
Expand Down
3 changes: 1 addition & 2 deletions pyxtal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,7 @@ def generate_wp_lib(spg_list, composition,
count = 0
for i in range(max_fu, min_fu-1, -1):
letters, _, wp_ids = g.list_wyckoff_combinations(
composition*i, max_wp=max_wp,
min_wp=min_wp, Nmax=100000)
composition*i, num_wp=(min_wp, max_wp), Nmax=100000)
for j, wp in enumerate(wp_ids):
wp_dofs = 0
num = 0
Expand Down

0 comments on commit f6c4888

Please sign in to comment.