qzhu2017 / PyXtal

A code to generate atomic structure with symmetry
MIT License
234 stars 59 forks source link

A bug in k_subgroup_split #252

Closed qzhu2017 closed 1 month ago

qzhu2017 commented 1 month ago
from pyxtal import pyxtal
print("test diamond")
xtal = pyxtal()
xtal.from_spg_wps_rep(227, ['8a'], [3.6], ['C'])
xtal1 = xtal.subgroup_once(H=210, group_type='t+k')
print(xtal1.get_xtal_string())
xtal1 = xtal1.subgroup_once(group_type='k')
print(xtal1.get_xtal_string())
test diamond
*  8   1  210 F4132          3.42 8b 
wp2_lists [Wyckoff position 4a in space group 212 with site symmetry .32
1/8, 1/8, 1/8
3/8, 7/8, 5/8
7/8, 5/8, 3/8
5/8, 3/8, 7/8]
G1_orbits []
G2_orbits []
Traceback (most recent call last):
  File "/Users/qzhu8/GitHub/PyXtal/test_subgroup.py", line 8, in <module>
    xtal1 = xtal1.subgroup_once(group_type='k')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/qzhu8/GitHub/PyXtal/pyxtal/__init__.py", line 798, in subgroup_once
    splitter = wyckoff_split(G=self.group.number, wp1=sites, idx=id, group_type=gtype)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/qzhu8/GitHub/PyXtal/pyxtal/wyckoff_split.py", line 81, in __init__
    G1_orbits, G2_orbits = self.split_k(wp1, self.wp2_lists[i])
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/qzhu8/GitHub/PyXtal/pyxtal/wyckoff_split.py", line 396, in split_k
    raise ValueError('inconsistent G1_orbits and wp2_lists')
ValueError: inconsistent G1_orbits and wp2_lists