Minor simplification of trim_cell#347
Minor simplification of trim_cell#347atztogo merged 2 commits intospglib:developfrom atztogo:trim-with-tmat
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #347 +/- ##
===========================================
- Coverage 83.56% 83.55% -0.01%
===========================================
Files 24 24
Lines 8157 8154 -3
===========================================
- Hits 6816 6813 -3
Misses 1341 1341
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
|
I also agree to use integer matrices as possible. BTW, can you write a description for |
|
@lan496, thanks for your review. I added some descriptions.
Do you mean the word trim is not intuitive? |
| // @param tensor_rank rank of site tensors for magnetic symmetry. Set -1 if | ||
| // not used. |
There was a problem hiding this comment.
My line length setting is considered different from the original code. Do we have a formatter to make it same?
There was a problem hiding this comment.
Are you using clang-format by default? I'm not sure on VSCode, but on CLion there is an option to use clang-format instead of the built-in
There was a problem hiding this comment.
Thanks for your info. @LecrisUT. I use VSCode, and my current setting is like below,
"C_Cpp.clang_format_style": "{BasedOnStyle: Google, IndentWidth: 4}",
I found some information, https://code.visualstudio.com/docs/cpp/cpp-ide#_code-formatting . I should read this in detail.
Yes, I felt nonintuitive because |
|
Sorry, I missed the returned |
|
Clearly the code is confusing and we should refactor it, but not in this PR. |
The nearest integer matrix of
axis_invistmat_p_iat line ~520 in functiontranslate_atoms_in_trimmed_lattice. I prefer the later because I want to have a transformation matrix to be an integer matrix or inverse of an integer matrix whenever possible.Actually,
axis_invis unnecessary to be computed intranslate_atoms_in_trimmed_latticebecause it is same astmp_matin functiontrim_cellthat callstranslate_atoms_in_trimmed_latticeandtranslate_atoms_in_trimmed_latticeis called only fromtrim_cell.Although
axis_invandtmat_p_ican be slightly different if the input cell is distorted, I would like to suggest this change.