-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataset for trigonal spacegroups with multiple settings fails #189
Comments
Hi @abehersan, thank you for supporting this work! For the question you are asking, I tested it with the official Python version of Spglib: import spglib
import numpy as np
basis_v = np.array([[7, -3.5, 0], [0, 6.06218, 0], [0, 0, 19]]).T
positions = [[0.0, 0.0, 1/6]]
atoms = [1]
cell = (basis_v, positions, atoms)
>>> spglib.get_symmetry_dataset(cell, 1e-5)
{'number': 191,
'hall_number': 485,
'international': 'P6/mmm',
'hall': '-P 6 2',
'choice': '',
'transformation_matrix': array([[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1.]]),
'origin_shift': array([0. , 0. , 0.83333333]),
'rotations': array([[[ 1, 0, 0],
[ 0, 1, 0],
[ 0, 0, 1]],
[[-1, 0, 0],
[ 0, -1, 0],
[ 0, 0, -1]],
[[ 1, -1, 0],
[ 1, 0, 0],
[ 0, 0, 1]],
[[-1, 1, 0],
[-1, 0, 0],
[ 0, 0, -1]],
[[ 0, -1, 0],
[ 1, -1, 0],
[ 0, 0, 1]],
[[ 0, 1, 0],
[-1, 1, 0],
[ 0, 0, -1]],
[[-1, 0, 0],
[ 0, -1, 0],
[ 0, 0, 1]],
[[ 1, 0, 0],
[ 0, 1, 0],
[ 0, 0, -1]],
[[-1, 1, 0],
[-1, 0, 0],
[ 0, 0, 1]],
[[ 1, -1, 0],
[ 1, 0, 0],
[ 0, 0, -1]],
[[ 0, 1, 0],
[-1, 1, 0],
[ 0, 0, 1]],
[[ 0, -1, 0],
[ 1, -1, 0],
[ 0, 0, -1]],
[[ 0, -1, 0],
[-1, 0, 0],
[ 0, 0, -1]],
[[ 0, 1, 0],
[ 1, 0, 0],
[ 0, 0, 1]],
[[-1, 0, 0],
[-1, 1, 0],
[ 0, 0, -1]],
[[ 1, 0, 0],
[ 1, -1, 0],
[ 0, 0, 1]],
[[-1, 1, 0],
[ 0, 1, 0],
[ 0, 0, -1]],
[[ 1, -1, 0],
[ 0, -1, 0],
[ 0, 0, 1]],
[[ 0, 1, 0],
[ 1, 0, 0],
[ 0, 0, -1]],
[[ 0, -1, 0],
[-1, 0, 0],
[ 0, 0, 1]],
[[ 1, 0, 0],
[ 1, -1, 0],
[ 0, 0, -1]],
[[-1, 0, 0],
[-1, 1, 0],
[ 0, 0, 1]],
[[ 1, -1, 0],
[ 0, -1, 0],
[ 0, 0, -1]],
[[-1, 1, 0],
[ 0, 1, 0],
[ 0, 0, 1]]], dtype=int32),
'translations': array([[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ],
[0. , 0. , 0.33333333],
[0. , 0. , 0. ]]),
'wyckoffs': ['a'],
'site_symmetry_symbols': ['6/mmm'],
'crystallographic_orbits': array([0], dtype=int32),
'equivalent_atoms': array([0], dtype=int32),
'primitive_lattice': array([[ 7. , 0. , 0. ],
[-3.5 , 6.06218, 0. ],
[ 0. , 0. , 19. ]]),
'mapping_to_primitive': array([0], dtype=int32),
'std_lattice': array([[ 7.00000094, 0. , 0. ],
[-3.50000047, 6.06217864, 0. ],
[ 0. , 0. , 19. ]]),
'std_types': array([1], dtype=int32),
'std_positions': array([[0., 0., 0.]]),
'std_rotation_matrix': array([[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1.]]),
'std_mapping_to_primitive': array([0], dtype=int32),
'pointgroup': '6/mmm'}
>>> basis_v
array([[ 7. , 0. , 0. ],
[-3.5 , 6.06218, 0. ],
[ 0. , 0. , 19. ]]) It also seems to be 485/191. Is it possible the settings you gave is indeed 485/191? Could you double check? The convention is here: https://singularitti.github.io/Spglib.jl/dev/man/definitions/#Atomic-point-coordinates |
Thanks for the reply! If I run The 485/191 spacegroup is incompatible with the cell I try to model, which is 436/148 (trigonal with hexagonal axes chosen). Ideally there would be some Basically: I know a priori what the structure is -- lattice parameters, space group, atom positions and atom species --. I was aiming to use Maybe you have a better idea of how this could be done given the current API? |
Hi! First, off, thanks for the port to Julia! It is super useful for my research! (:
Describe the bug
For a crystal with trigonal spacegroup symmetry,
Spglib
fails to reshape the unit cell to accommodate the symmetry equivalent settings of the spacegroup. Case in point, the spacegroup 148 with setting 1. Hall number 436 according to https://yseto.net/sg/sg1To Reproduce
Steps to reproduce the behavior:
Start Julia REPL
Run:
Note: I have tried relaxing the symmetry precision parameter to no avail.
ERROR: SpglibError: spacegroup search failed!
Expected behavior
The
ds
object should be consistent with what is expected for spacegroup 148 with the rhombohedral setting.Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: