Skip to content

Commit

Permalink
Fix construct type identification
Browse files Browse the repository at this point in the history
  • Loading branch information
lan496 committed Jan 4, 2025
1 parent aa6a6b7 commit 53933f5
Show file tree
Hide file tree
Showing 7 changed files with 274 additions and 86 deletions.
2 changes: 2 additions & 0 deletions moyo/src/base/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ pub enum MoyoError {
ArithmeticCrystalClassIdentificationError,
#[error("Space group type identification failed")]
SpaceGroupTypeIdentificationError,
#[error("Construct type identification failed")]
ConstructTypeIdentificationError,
#[error("Magnetic space group type identification failed")]
MagneticSpaceGroupTypeIdentificationError,
#[error("Standardization failed")]
Expand Down
4 changes: 3 additions & 1 deletion moyo/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ pub use arithmetic_crystal_class::ArithmeticNumber;
pub use centering::Centering;
pub use hall_symbol::{HallSymbol, MagneticHallSymbol};
pub use hall_symbol_database::{hall_symbol_entry, HallNumber, HallSymbolEntry, Number};
pub use magnetic_space_group::{ConstructType, UNINumber, NUM_MAGNETIC_SPACE_GROUP_TYPES};
pub use magnetic_space_group::{
get_magnetic_space_group_type, ConstructType, UNINumber, NUM_MAGNETIC_SPACE_GROUP_TYPES,
};
pub use setting::Setting;

pub(super) use arithmetic_crystal_class::{
Expand Down
1 change: 1 addition & 0 deletions moyo/src/data/magnetic_hall_symbol_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub fn magnetic_hall_symbol_entry(uni_number: UNINumber) -> Option<MagneticHallS
.cloned()
}

// For type-IV MSG, we assume their Magnetic Hall symbol explicitly contains the anti-translation operation.
const MAGNETIC_HALL_SYMBOL_DATABASE: [MagneticHallSymbolEntry; NUM_MAGNETIC_SPACE_GROUP_TYPES] = [
MagneticHallSymbolEntry::new("P 1", 1),
MagneticHallSymbolEntry::new("P 1 1'", 2),
Expand Down
2 changes: 1 addition & 1 deletion moyo/src/data/magnetic_space_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::ops::RangeInclusive;

use once_cell::sync::Lazy;

use super::{hall_symbol_database::Number, HallNumber};
use super::hall_symbol_database::Number;

pub const NUM_MAGNETIC_SPACE_GROUP_TYPES: usize = 1651;

Expand Down
Loading

0 comments on commit 53933f5

Please sign in to comment.