Skip to content

fix(database): add missing unique axis choices#378

Merged
lan496 merged 1 commit intospglib:developfrom
site-g:develop
Dec 18, 2023
Merged

fix(database): add missing unique axis choices#378
lan496 merged 1 commit intospglib:developfrom
site-g:develop

Conversation

@site-g
Copy link
Copy Markdown

@site-g site-g commented Dec 15, 2023

In ITB, the space group Hall symbols table does not display the cell/axis/setting/origin choices if there is only one choice. This does not cause problem for space groups because the Monoclinic system space groups always have more than one choice. However, this cause problem for layer group 3: p 1 1 2, 4: p 1 1 m and 6:p 1 1 2/m, because the function set_layer_monocli depends on the unique axis choice. The code cannot determine the unique axis and fails to find the standard conventional cell.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8f7f01c) 83.80% compared to head (6262da1) 83.80%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #378   +/-   ##
========================================
  Coverage    83.80%   83.80%           
========================================
  Files           24       24           
  Lines         8167     8167           
========================================
  Hits          6844     6844           
  Misses        1323     1323           
Flag Coverage Δ
c_api 77.18% <ø> (ø)
fortran_api 56.19% <ø> (ø)
python_api 80.47% <ø> (ø)
unit_tests 1.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lan496 lan496 requested a review from atztogo December 16, 2023 00:11
@atztogo
Copy link
Copy Markdown
Collaborator

atztogo commented Dec 16, 2023

I am confused. It seems those are specified for space group dataset in the source code. Why were those for layer group blank?

@site-g
Copy link
Copy Markdown
Author

site-g commented Dec 16, 2023

The axis choice for layer groups 3, 4 and 6 were blank because they only have one choice, i.e. the axis of the symmetry operation along $\mathbf{c}$. So, when I write the Hall symbol table for layer groups, I dropped the choice following the behavior of ITB.

@site-g
Copy link
Copy Markdown
Author

site-g commented Dec 16, 2023

It is my fault. I ignored the caption under the Table A1.4.2.7 Hall symbols of ITB. It says

Where no code is given the first choice listed below applies

Then it listed the default choice for different crystal systems. We did not stipulate the default unique axis for layer groups as it may be $\mathbf{a}$ or $\mathbf{c}$ for different groups (or maybe we imply it to be $\mathbf{c}$?)

Some of the choice specified for space group dataset in the source code are also blank. The most obviously one is P 1, I think it is following ITB, i.e., blank denotes the default choice. Should we fill all of them? I do not think it is a good idea, as something like 'origin choice 1' is also confusing for people not familiar with crystallography.

@atztogo
Copy link
Copy Markdown
Collaborator

atztogo commented Dec 16, 2023

@site-g, thanks for your explanation.

why, for layer group 3: p 1 1 2, 4: p 1 1 m and 6:p 1 1 2/m, were those blank?

@atztogo
Copy link
Copy Markdown
Collaborator

atztogo commented Dec 16, 2023

@site-g, is my understanding correct?

  • SpacegroupType layer_group_types were created based on SpacegroupType spacegroup_types. Or is there any reference?
  • For example of space group No.3, there are three choices for space group, but only one for layer group as shown below. So you didn't specify the choice for the layer group. But now you realized that we have to be specify it to make set_layer_monocli work.

layer group

    {3, "C2^1  ", "p 2             ", "p 1 1 2                        ",
     "p 1 1 2            ", "p112      ", "     ", PRIMITIVE, 3}, /*   3 */

space group

    {3, "C2^1  ", "P 2y            ", "P 2 = P 1 2 1                  ",
     "P 1 2 1            ", "P2        ", "b    ", PRIMITIVE, 3}, /*   3 */
    {3, "C2^1  ", "P 2             ", "P 2 = P 1 1 2                  ",
     "P 1 1 2            ", "P2        ", "c    ", PRIMITIVE, 3}, /*   4 */
    {3, "C2^1  ", "P 2x            ", "P 2 = P 2 1 1                  ",
     "P 2 1 1            ", "P2        ", "a    ", PRIMITIVE, 3}, /*   5 */

@site-g
Copy link
Copy Markdown
Author

site-g commented Dec 17, 2023

SpacegroupType layer_group_types were created based on SpacegroupType spacegroup_types. Or is there any reference?

The reference is Table 1.2.6.1 and Chapter 4 of ITE.

For example of space group No.3, there are three choices for space group, but only one for layer group as shown below. So you didn't specify the choice for the layer group.

For example of layer group No.3 p 1 1 2 , Chapter 4 of ITE only shows one choice for this layer group. So I didn't specify the choice for the layer group. While for layer group No.8 p 2 1 1, Table 1.2.6.1 shows two different choices, so I specified them in SpacegroupType layer_group_types. The three different choices of these two layer groups correspond to the three different choices of space group No.3.

But now you realized that we have to be specify it to make set_layer_monocli work.

That's true.

@atztogo
Copy link
Copy Markdown
Collaborator

atztogo commented Dec 17, 2023

@site-g, thanks. It became clear.

@atztogo
Copy link
Copy Markdown
Collaborator

atztogo commented Dec 17, 2023

@lan496, I approved.

@lan496
Copy link
Copy Markdown
Member

lan496 commented Dec 18, 2023

@lan496
Copy link
Copy Markdown
Member

lan496 commented Dec 18, 2023

Sorry, that force push seems to be blocked by branch protection rule. Now, I have merged this PR.

@lan496 lan496 merged commit 3fa478e into spglib:develop Dec 18, 2023
@LecrisUT LecrisUT added this to the 2.3 milestone Jan 25, 2024
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

Successfully merging this pull request may close these issues.

5 participants