diff --git a/image_analysis/scale_merge/SearchSpaceGroup.h b/image_analysis/scale_merge/SearchSpaceGroup.h index 1c7bd85f6..9bf15f789 100644 --- a/image_analysis/scale_merge/SearchSpaceGroup.h +++ b/image_analysis/scale_merge/SearchSpaceGroup.h @@ -635,7 +635,19 @@ struct SearchSpaceGroupOptions { // exists to avoid. A thin monoclinic sweep reaching only three 0k0-odd reflections loses its // 2(1) to this. Lowering the floor to 7.7e-4 would let three through; that is a recalibration // and needs its own battery. - double min_screw_absence_evidence = 20.0; + // + // Recalibrated on the zones themselves rather than on the probe crystals: every single-axis + // candidate of every primitive-lattice set of a 230-set battery (open, in-house and private), + // labelled against the deposited group. A false zone with no violation reads at most +4 nats + // (a row that is weak, not dead, adds at most +6 to a group that is eligible without it), and the + // one false zone above that, +30.5, is a row that is genuinely present at a few percent of its + // neighbours under a pseudo-translation - no bound separates it from a true screw, whose rows + // read from +10 up. The true zones under 20 are all short rows: a 2(1) along a monoclinic axis of + // 25-30 A reaches four to six odd reflections inside the search's resolution range, and on weak + // data those sit at a few percent of their row, not at the floor - 10.0 to 16.3 nats, refused at + // 20 on every one of five such crystals. The bound sits in the measured gap. Two absences can now clear it if both are below about 2% of + // their row. + double min_screw_absence_evidence = 8.0; // ---- Glide planes (small-molecule space groups) ------------------------------------------- // Offer the NON-SOHNCKE space groups of the same proper-rotation set as candidates, so a glide diff --git a/tests/SearchSpaceGroupTest.cpp b/tests/SearchSpaceGroupTest.cpp index 59b912021..846e410cc 100644 --- a/tests/SearchSpaceGroupTest.cpp +++ b/tests/SearchSpaceGroupTest.cpp @@ -279,6 +279,31 @@ TEST_CASE("SearchSpaceGroup weighs a screw's absences by evidence, not by how ma CHECK(result.best_space_group->short_name() == "P21"); } + // A short monoclinic axis on weak data: four 0k0-odd reflections in range, each at 2% of its row + // rather than at the floor. That zone reads ~11 nats - refused under the old bound of 20 on five + // crystals that are P2_1 - and must be claimed; the same four at a fifth of their row must not. + SECTION("four absences at a few percent of a short row: the screw is found, at a fifth it is not") { + for (const auto& [fraction, expected] : {std::pair{0.02, "P21"}, std::pair{0.2, "P2"}}) { + auto merged = GenerateMergedReflectionsForSpaceGroup(sg, 18); + int kept = 0; + std::erase_if(merged, [&](MergedReflection& r) { + if (!gops.is_systematically_absent(gemmi::Op::Miller{{r.h, r.k, r.l}})) + return false; + if (kept >= 4) + return true; + ++kept; + r.I = static_cast(fraction * 350.0); + return false; + }); + REQUIRE(kept == 4); + + const auto result = SearchSpaceGroup(merged, opt); + INFO(SearchSpaceGroupResultToText(result)); + REQUIRE(result.best_space_group.has_value()); + CHECK(result.best_space_group->short_name() == expected); + } + } + SECTION("a uniformly weak axial row decides nothing, however many absences it holds") { // The whole 0k0 row badly measured: the predicted-absent reflections are weak, but so is the // rest of their row, so there is no contrast and no screw to claim. A violation count cannot