Skip to content

Commit

Permalink
Merge pull request #299 from andaero/master
Browse files Browse the repository at this point in the history
Support tuples for random_crystal
  • Loading branch information
qzhu2017 authored Jan 13, 2025
2 parents 8dc7dfe + dbdcf73 commit 0cf3921
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyxtal/crystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ def _check_consistency(self, site, numIon):
if isinstance(s, dict):
for key in s:
num += int(key[:-1])
elif isinstance(s, tuple):
(letter, x, y, z) = s
num += int(letter[:-1])
else:
num += int(s[:-1])
if numIon == num:
Expand Down

0 comments on commit 0cf3921

Please sign in to comment.