Skip to content
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

Exact deduplication of atoms in Rhombohedral cells #44

Open
janbridley opened this issue Mar 18, 2025 · 0 comments
Open

Exact deduplication of atoms in Rhombohedral cells #44

janbridley opened this issue Mar 18, 2025 · 0 comments

Comments

@janbridley
Copy link
Collaborator

janbridley commented Mar 18, 2025

Description

Certain rhombohedral unit cells will contain duplicate sets of points, typically in the ratio n_points/n_expected=3, with a few isolated examples of n_p/n_e ∈ {3/2, 7/6}. In the 3x case, the replicated atoms each form a complete, valid unit cell for the crystal with a different translational center but otherwise equivalent spacing: the obverse and reverse settings of the cell. In these cases, we are building a complete hexagonal structure even if the underlying crystal is more simply represented as a rhombohedral one.

Note that this is different from the issue reported in #42 in which numerical precision was the primary driver of duplicate atoms. While this also occurred in a rhombohedral crystal (due to the representation of 1/3 and 2/3 in limited precision), this underlying issue is slightly different.

It is possible to convert to a rhombohedral setting and doing so could aid in particle deduplication. However, it is not trivial to apply periodic boundaries in non-orthorhombic boxes and by changing the cell type we change the fractional coordinates (which can no longer be trivially wrapped).

For now: please let me know if anyone needs the ability to convert between rhombohedral and hexagonal settings. Until that point, I will work to improve the standard deduplication procedure.

hR10-SiC:

Image 1 Image 2

I believe that the non-3x ratios of atoms mentioned above arise from portions of the alternate settings being deduplicated under the standard procedure when they probably should note be.

It is useful to note that this problem is not unique to parsnip - gemmi and ASE show the same behavior with the same structures (+/- about 5 files per thousand that happen to break a uniqueness check).

Work is in progress for a new approach that solves this problem - this issue is here for clarity and progress updates!

To reproduce

_space_group_symop_operation_xyz
1 x,y,z
2 -y,x-y,z
3 -x+y,-x,z
4 y,x,-z
5 -x,-x+y,-z
6 x-y,-y,-z
7 -x,-y,-z
8 y,-x+y,-z
9 x-y,x,-z
10 -y,-x,z
11 x,x-y,z
12 -x+y,y,z
13 x+1/3,y+2/3,z+2/3
14 -y+1/3,x-y+2/3,z+2/3
15 -x+y+1/3,-x+2/3,z+2/3
16 y+1/3,x+2/3,-z+2/3
17 -x+1/3,-x+y+2/3,-z+2/3
18 x-y+1/3,-y+2/3,-z+2/3
19 -x+1/3,-y+2/3,-z+2/3
20 y+1/3,-x+y+2/3,-z+2/3
21 x-y+1/3,x+2/3,-z+2/3
22 -y+1/3,-x+2/3,z+2/3
23 x+1/3,x-y+2/3,z+2/3
24 -x+y+1/3,y+2/3,z+2/3
25 x+2/3,y+1/3,z+1/3
26 -y+2/3,x-y+1/3,z+1/3
27 -x+y+2/3,-x+1/3,z+1/3
28 y+2/3,x+1/3,-z+1/3
29 -x+2/3,-x+y+1/3,-z+1/3
30 x-y+2/3,-y+1/3,-z+1/3
31 -x+2/3,-y+1/3,-z+1/3
32 y+2/3,-x+y+1/3,-z+1/3
33 x-y+2/3,x+1/3,-z+1/3
34 -y+2/3,-x+1/3,z+1/3
35 x+2/3,x-y+1/3,z+1/3
36 -x+y+2/3,y+1/3,z+1/3



loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_symmetry_multiplicity
_atom_site_Wyckoff_label
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
K1 K 3  a 0.00000 0.00000 0.00000 1.00000
N1 N 3  b 0.00000 0.00000 0.50000 1.00000
O1 O 18 h 0.13000 0.87000 0.47500 0.50000
>>> CifFile("KNO3_hR8.cif").build_unit_cell().shape
(24, 3) # Should be (8, 3) in the rhombohedral setting
@janbridley janbridley changed the title Exact deduplication of atoms Exact deduplication of atoms in Rhombohedral cells Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant