Merge branch 'rc186-lcys-fix' into rc186-merge

This commit is contained in:
leonarski_f committed 2026-11-12 00:26:29 +01:00
commit 1a76339fa3
1 file changed
+8 -1
@@ -333,7 +333,14 @@ void RotationIndexer::RunIndexingLocked() {
// promotion of the same kind, so it is not applied here.
if (demote_class && ClassImposesLengthEquality(ls.system))
return LatticeSearch(cand, /*dist_tolerance=*/0.0);
if (!IsHexagonalSystem(ls.system) && IsMetricallyHexagonal(ls.primitive_reduced)) {
// A primitive hexagonal lattice is written in ONE setting, the one derived from its reduced
// cell, whichever route named the class. Its twelve equivalent settings are the same
// lattice, but the run is not indifferent to which it gets: the fractional-index gates of
// the refinement and the axial-row count of the two-pass quality guard are not invariant
// under them, so a setting chosen afresh from each pass's strained cell lets the two
// passes differ in setting and the guard compare rows that are not the same rows.
if ((ls.system == gemmi::CrystalSystem::Hexagonal && ls.centering == 'P')
|| (!IsHexagonalSystem(ls.system) && IsMetricallyHexagonal(ls.primitive_reduced))) {
ls.conventional = HexagonalConventional(ls.primitive_reduced);
ls.system = gemmi::CrystalSystem::Hexagonal;
ls.centering = 'P';