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
fix(layergroup): fix unique axis of monocli system #209
Conversation
Codecov ReportBase: 85.34% // Head: 85.34% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## develop #209 +/- ##
========================================
Coverage 85.34% 85.34%
========================================
Files 18 18
Lines 1358 1358
========================================
Hits 1159 1159
Misses 199 199 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Could you write more detailed comment? |
2D Delaunay reduction is conducted to transform the oblique face of monoclinic cell, i.e. the face vertical to the two-fold rotation axis, into a Delaunay parallelogram. As in layer group, the unique axis for conventional cell is a or c rather than b, I set a to be unique axis in Lines 986 to 990 in 2b06c29
So for space group parameter unique_axis of del_layer_delaunay_reduce_2D is 1, while for layer group it should be 0.
|
@atztogo I do not fully understand the implementation of 2D Delaunay reduction, so I can only say it seems to make sense. |
2D Delaunay reduction is simply a triangulation. If this PR will not break space group implementation, it is approximately OK for me. We have almost no tests, which is not only layer group. The tests for layer group must be written, too, but since I don't understand its implementation well, it is difficult to tell how to write the test to @site-g right now. In this specific case, I think @site-g has a table how the axes are chosen, so the test should be able be written following the table. @site-g, information about the test in spglib is written here, https://github.com/spglib/spglib/tree/develop/test, which is written by @lan496. Writing tests and docs on code requires some experience. Unless the previous experience on it, it would be uneasy. My plan to make this implementation of the layer group (and also whole spglb) maintainable is
|
@lan496 I am preparing an appendix about Delaunay reduction, comparing the difference in space and layer group case. It may be added to Overleaf tomorrow. @atztogo I am tabulating the axes choice for layer group, too. However, I face some difficulty with the orthorhombic lattice. As shown in seekpath #57, the freedom of the axes is determined by the index of L(g) in N_A(g). I can understand it, but cannot give a rather rigorous derivation. Can you give me some suggestions? I am not familiar with GoogleTest and need time to learn it. That might not be very fast. |
Thanks to site-g's document for Delaunay reduction, I now have read the point group search ( @atztogo As for axes choices, I cannot find a description of |
It's a good point. I haven't planned it. If I remember correctly, this is a little bit tricky. I will look at it, and hope to describe it in another issue. |
If I remember correctly, These information is used to find transformation matrix corresponding to Hall symbol with some constrains. So this is in the step (i) of spglib arxiv manuscript, but as @lan496 pointed out, it is not written. "Some constraints" means controlling order of a,b,c. If Euclidean normalizer allows change of (a,b,c) basis is applied to let, for example, |a|<|b|, |a|<|c|, |b|<|c| as much as possible. In this way, a (transformation matrix P, origin shift p) is determined. But different (P, p) can be obtained by space group operations, therefore, spglib chooses one of equivalent (P, p) under some preference about orientation to make conventinal basis vectors closer to spglib-standardized basis vectors in Cartesian coordinates, and origin shift distance shorter, which is done in the following function, Line 1417 in 2b06c29
|
layer_laue2m
stored the two-fold rotation axis inaxis[0]
, whilelaue2m
store it inaxis[1]
.del_layer_delaunay_reduce_2D
was Delaunay reducing a rectangle surface of the cell for layer group cases before.