File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -643,7 +643,7 @@ def get_aflow_strs_from_iso_and_composition(
643
643
anom_ele_to_wyk = dict (zip (anom_amt_dict .keys (), wyckoffs ))
644
644
anonymous_formula = RE_ANONYMOUS .sub (RE_SUBST_ONE_PREFIX , anonymous_formula )
645
645
646
- result = []
646
+ result = set ()
647
647
for t in translations :
648
648
wyckoff_part = "_" .join (
649
649
RE_WYCKOFF .sub (RE_SUBST_ONE_PREFIX , anom_ele_to_wyk [t [elem ]])
@@ -655,9 +655,9 @@ def get_aflow_strs_from_iso_and_composition(
655
655
aflow_str = (
656
656
f"{ proto_formula } _{ pearson } _{ spg } _{ canonicalized_wyckoff } :{ chemical_system } "
657
657
)
658
- result .append (aflow_str )
658
+ result .add (aflow_str )
659
659
660
- return result
660
+ return list ( result )
661
661
662
662
663
663
def count_distinct_wyckoff_letters (aflow_str : str ) -> int :
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def test_get_aflow_strs_from_iso_and_composition(
112
112
aflows = get_aflow_strs_from_iso_and_composition (
113
113
isopointal_proto , Composition (composition )
114
114
)
115
- assert aflows == expected .split (" " )
115
+ assert set ( aflows ) == set ( expected .split (" " ) )
116
116
117
117
# check the round trip
118
118
assert all (
You can’t perform that action at this time.
0 commit comments