use molframe_core::{Diagnostic, Structure};
#[cfg(feature = "crystal")]
pub(super) fn attach_pdb_symmetry(
structure: Structure,
findings: Vec<Diagnostic>,
) -> (Structure, Vec<Diagnostic>) {
let Some(symbol) = structure.data().entry.space_group.clone() else {
return (structure, findings);
};
match molframe_xtal::space_group_by_hermann_mauguin(&symbol) {
Ok(setting) => (
structure.with_extension(molframe_xtal::SYMMETRY_EXTENSION, setting.symmetry_set()),
findings,
),
Err(_) => (structure, findings),
}
}
#[cfg(not(feature = "crystal"))]
pub(super) fn attach_pdb_symmetry(
structure: Structure,
findings: Vec<Diagnostic>,
) -> (Structure, Vec<Diagnostic>) {
(structure, findings)
}