diff --git a/pyxtal/symmetry.py b/pyxtal/symmetry.py index 01cd55b2..fecdf236 100644 --- a/pyxtal/symmetry.py +++ b/pyxtal/symmetry.py @@ -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 [], [], [] diff --git a/pyxtal/util.py b/pyxtal/util.py index 69ec5182..f6abe1f8 100644 --- a/pyxtal/util.py +++ b/pyxtal/util.py @@ -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