chemrust_core/data/symmetry/
mod.rs

1use crystallographic_group::{
2    database::{LookUpSpaceGroup, DEFAULT_SPACE_GROUP_SYMBOLS},
3    hall_symbols::HallSymbolNotation,
4};
5
6pub trait SymmetryInfo {
7    fn make_symmetry(&self) -> bool;
8    /// 1-230
9    fn get_space_group_it_num(&self) -> u8;
10    fn get_space_group_hall_symbol(&self) -> HallSymbolNotation {
11        let num = self.get_space_group_it_num() - 1;
12        let hall_symbol = DEFAULT_SPACE_GROUP_SYMBOLS
13            .get_hall_symbol(num as usize)
14            .expect("Should have hall symbol result from it num");
15        HallSymbolNotation::try_from_str(hall_symbol)
16            .expect("Hall symbol from `crystallographic_group`")
17    }
18}