Skip to content

Commit

Permalink
Merge pull request #47 from spglib/msg-db
Browse files Browse the repository at this point in the history
Magnetic Hall symbol DB
  • Loading branch information
lan496 authored Jan 11, 2025
2 parents 3dedfda + 080d6b3 commit a631f87
Show file tree
Hide file tree
Showing 9 changed files with 8,201 additions and 72 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ RUST_LOG=debug cargo test -- --nocapture
## Acknowledgments

We thank Dr. Yusuke Seto for providing the crystallographic database.
We thank Juan Rodríguez-Carvajal for providing the magnetic space-group database.
3 changes: 2 additions & 1 deletion moyo/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ pub use error::MoyoError;
pub use lattice::Lattice;
pub use magnetic_cell::{Collinear, MagneticCell, MagneticMoment, NonCollinear};
pub use operation::{
MagneticOperation, MagneticOperations, Operation, Operations, Rotation, Rotations, Translation,
MagneticOperation, MagneticOperations, Operation, Operations, Rotation, Rotations,
TimeReversal, Translation,
};
pub use permutation::Permutation;
pub use tolerance::AngleTolerance;
Expand Down
2 changes: 2 additions & 0 deletions moyo/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ mod centering;
mod classification;
mod hall_symbol;
mod hall_symbol_database;
mod magnetic_hall_symbol_database;
mod magnetic_space_group;
mod point_group;
mod setting;
mod wyckoff;
Expand Down
18 changes: 18 additions & 0 deletions moyo/src/data/centering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,21 @@ impl Centering {
}
}
}

#[cfg(test)]
mod tests {
use strum::IntoEnumIterator;

use super::*;
use crate::base::Transformation;

#[test]
fn test_conventional_transformation_matrix() {
for centering in Centering::iter() {
assert_eq!(
Transformation::from_linear(centering.linear()).size,
centering.order()
);
}
}
}
Loading

0 comments on commit a631f87

Please sign in to comment.