Skip to content

Add python interface for space-group type: moyopy.SpaceGroupType #65

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

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

lan496
Copy link
Member

@lan496 lan496 commented Feb 3, 2025

Closes #52

This PR introduces moyopy.SpaceGroupType to enable python interface to access space group labels and their classifications.

from moyopy import SpaceGroupType

s = SpaceGroupType(15)  # ITA space group number (1 - 230)
assert s.hm_short == "C 2/c"
assert s.crystal_system == "Monoclinic"

print(s)
# -> PySpaceGroupType { number: 15, hm_short: "C 2/c", hm_full: "C 1 2/c 1", arithmetic_number: 8, arithmetic_symbol: "2/mC", geometric_crystal_class: "2/m", crystal_system: "Monoclinic", bravais_class: "mC", lattice_system: "Monoclinic", crystal_family: "Monoclinic" }

@lan496 lan496 marked this pull request as draft February 3, 2025 02:05
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 7.57576% with 122 lines in your changes missing coverage. Please review.

Project coverage is 87.85%. Comparing base (4748c80) to head (2559486).

Files with missing lines Patch % Lines
moyo/src/data/classification.rs 0.00% 81 Missing ⚠️
moyopy/src/data/space_group_type.rs 0.00% 40 Missing ⚠️
moyopy/src/lib.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
- Coverage   89.74%   87.85%   -1.90%     
==========================================
  Files          44       45       +1     
  Lines        5636     5763     +127     
==========================================
+ Hits         5058     5063       +5     
- Misses        578      700     +122     

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

@lan496 lan496 changed the title Add python interface for space-group type information Add python interface for space-group type information: moyopy.SpaceGroupType Feb 3, 2025
@lan496 lan496 changed the title Add python interface for space-group type information: moyopy.SpaceGroupType Add python interface for space-group type: moyopy.SpaceGroupType Feb 3, 2025
@lan496 lan496 added the enhancement New feature or request label Feb 3, 2025
@lan496 lan496 marked this pull request as ready for review February 3, 2025 02:46
@lan496 lan496 merged commit f25223d into main Feb 3, 2025
16 checks passed
@lan496 lan496 deleted the space-group-type-interface branch February 3, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python interface for classifications of space group types
2 participants