Skip to content

Conversation

pcazade
Copy link
Contributor

@pcazade pcazade commented Oct 2, 2024

I added a simple Fortran wrapper for spg_get_symmetry_from_database based on spg_get_symmetry wrapper.

Copy link
Collaborator

@LecrisUT LecrisUT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's fine. It's not ideal that you need to do the transpose manually on the Fortran side, but it's the fastest way around it.

@LecrisUT LecrisUT changed the title Adding Fortran wrapper for pg_get_symmetry_from_database. Expose spg_get_symmetry_from_database in the Fortran interface Oct 2, 2024
@LecrisUT
Copy link
Collaborator

LecrisUT commented Oct 2, 2024

One final change if you may, between the lines:

spglib/ChangeLog.md

Lines 12 to 14 in d9c572d

## \[Unreleased\]
## v2.5.0 (9 Jul. 2024)

Can you add a small snippet like:

### Fortran API

- Expose `spg_get_symmetry_from_database`.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.12%. Comparing base (d9c572d) to head (c893e5c).
Report is 11 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #530   +/-   ##
========================================
  Coverage    84.12%   84.12%           
========================================
  Files           26       26           
  Lines         8122     8122           
  Branches      1702     1698    -4     
========================================
  Hits          6833     6833           
  Misses        1289     1289           
Flag Coverage Δ
c_api 75.39% <ø> (ø)
fortran_api 56.29% <ø> (ø)
python_api 81.39% <ø> (ø)
unit_tests 13.48% <ø> (ø)

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.

@pcazade
Copy link
Contributor Author

pcazade commented Oct 2, 2024 via email

@atztogo
Copy link
Collaborator

atztogo commented Oct 3, 2024

it seemed the most natural to use as a comparison.

For example spg_get_symmetry, too, the data is just passed without rearranging the data order in memory.

@pcazade
Copy link
Contributor Author

pcazade commented Oct 4, 2024 via email

@LecrisUT
Copy link
Collaborator

LecrisUT commented Oct 4, 2024

Indeed, consistency wise it is fine, it's just the usability point it is not ideal because we are putting a burden on the user to do such transposition. This is of course something that should be handled by us more generally. I will finally have more time as my contract ends, and I'll come back to contribute more to the project and provide a more modern object orientated interface.

For this PR, it's only the Changelog.md snippet and we can merge it :)

@pcazade
Copy link
Contributor Author

pcazade commented Oct 4, 2024

I added the comment in the Changelog.md as you asked.

I agree with you that, ideally, the end users should not have to think about the array arrangement within the library. That said, it is not always bad to have the matrices already transposed, depending on the linear algebra operations done with them.

Thanks for your help.

@LecrisUT
Copy link
Collaborator

LecrisUT commented Oct 4, 2024

@lan496 can you overwrite the test requirement? I am not sure why F39 failed there, but it will be EOL in a few weeks, so you can just those test requirements.

@lan496
Copy link
Member

lan496 commented Oct 7, 2024

@LecrisUT
Sorry for being late. I've removed F39 for test requirements
image

@LecrisUT LecrisUT merged commit 0c1fca6 into spglib:develop Oct 7, 2024
57 of 59 checks passed
@lan496 lan496 added this to the 2.6 milestone Jan 19, 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

Successfully merging this pull request may close these issues.

4 participants