Open baigeiguai opened 3 months ago
I tried following your procedure and could not convert the file using ASE 3.23
File "/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py", line 876, in spacegroup_from_data
spg = Spacegroup(symbol, None, datafile)
File "/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py", line 132, in __init__
_read_datafile(self, spacegroup, setting, fd)
File "/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py", line 692, in _read_datafile
_skip_to_blank(f, spacegroup, setting)
File "/home/wladerer/.local/lib/python3.10/site-packages/ase/spacegroup/spacegroup.py", line 593, in _skip_to_blank
raise SpacegroupNotFoundError(
ase.spacegroup.spacegroup.SpacegroupNotFoundError: invalid spacegroup `P6 m m m`, setting `None` not found in data base
Also, as a general note, depending on the tolerance you set for ase, pymatgen, phonopy, etc, you get a different result. If your precision is 0.001 you get P6/mmm and if your precision is 0.0001 then you get P6/m.
from pymatgen.core import Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
structure = Structure.from_file('787088.cif')
high_sym_spacegroup = SpacegroupAnalyzer(structure, symprec=0.0001).get_space_group_symbol()
low_sym_spacegroup = SpacegroupAnalyzer(structure, symprec=0.01).get_space_group_symbol()
print(high_sym_spacegroup) # P6/m
print(low_sym_spacegroup) # P6/mmm
Python version
3.11.4
Pymatgen version
2023.12.18
Operating system version
Rocky Linux 9.2
Current behavior
The cif file of the crystal YUTYOC is recognized as the P/6mmm space group category when it is parsed, but the P6mm space group category is marked in the cif file.My code is following.
Expected Behavior
unknown,maybe P6mm or P/6mmm. I want to know why P/6mmm and is it right ?
Minimal example
Relevant files to reproduce this bug
YUTYOC CIF download link: https://www.ccdc.cam.ac.uk/structures/Search?Ccdcid=787088&DatabaseToSearch=Published