From 5527fd0aa2e901e6d41dd2ed6ce899cf749a3a7a Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Fri, 20 Feb 2026 18:15:17 +0100 Subject: [PATCH] IndexAndRefine: For the moment - symmetry is enforced only if space group and unit cell are both provided --- image_analysis/IndexAndRefine.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 8605b232..db41ad43 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -65,17 +65,14 @@ IndexAndRefine::IndexingOutcome IndexAndRefine::DetermineLatticeAndSymmetry(Data auto latt = indexer_result.lattice[0]; auto sg = experiment.GetGemmiSpaceGroup(); - // If space group provided => always enforce symmetry in refinement + // If space group and cell provided => always enforce symmetry in refinement // If space group not provided => guess symmetry - if (sg) { - // If space group provided but no unit cell fixed, it is better to keep triclinic for now - if (experiment.GetUnitCell()) { - outcome.symmetry = LatticeMessage{ - .centering = sg->centring_type(), - .niggli_class = 0, - .crystal_system = sg->crystal_system() - }; - } + if (sg && experiment.GetUnitCell()) { + outcome.symmetry = LatticeMessage{ + .centering = sg->centring_type(), + .niggli_class = 0, + .crystal_system = sg->crystal_system() + }; outcome.lattice_candidate = latt; } else { auto sym_result = LatticeSearch(latt);