Skip to content

Commit

Permalink
add the get_all_polar_space_groups function
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Jan 14, 2022
1 parent edc2ec4 commit 9908cc2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pyxtal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,10 @@ def get_transition_by_path(self, ref_struc, path, d_tol, d_tol2=0.5, N_images=2)
for site in _sites:
_site = []
for label in site:
index = string.ascii_lowercase.index(label[-1])
try:
index = string.ascii_lowercase.index(label[-1])
except ValueError: #8A
index = 26
_site.extend(relation[index])
_sites0.append(_site)
_sites = _sites0
Expand Down
10 changes: 9 additions & 1 deletion pyxtal/symmetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3181,4 +3181,12 @@ def para2ferro(pg):
#return ['1', 'm(s)', 'm(p)', 'mm2', '4mm', '3m']
return ['1', 'm', 'mm2', '4mm', '3m']


def get_all_polar_space_groups():
ps, nps = [], []
for i in range(1,231):
g = Group(i, quick=True)
if g.polar:
ps.append(i)
else:
nps.append(i)
return ps, nps

0 comments on commit 9908cc2

Please sign in to comment.