diff --git a/tests/TranslationalNCSTest.cpp b/tests/TranslationalNCSTest.cpp index 0ca30d949..1e478ba88 100644 --- a/tests/TranslationalNCSTest.cpp +++ b/tests/TranslationalNCSTest.cpp @@ -254,13 +254,21 @@ TEST_CASE("A near-extinct class is reported as a sub-lattice", "[tncs]") { const gemmi::UnitCell cell = Cell(70.0, 85.0, 110.0); const gemmi::SpaceGroup *sg = gemmi::find_spacegroup_by_name("P 1 2 1"); const std::array u{0.0, 0.425, 0.5}; // no p/q with q <= 6 fits the whole vector - const auto merged = Synthetic(cell, "P 1 2 1", &u, 0.96); // weak class at 2% of the strong + // The weak class at 1% of the strong reads a modulation of 26x, clear of the 20x gate; at 2% it + // read 20.0x, on the gate itself, and the FFT's rounding decided the outcome. + const auto merged = Synthetic(cell, "P 1 2 1", &u, 0.98); const auto r = AnalyzeTranslationalNCS(merged, cell, sg); REQUIRE(r.measurable); REQUIRE(r.detected); CHECK_FALSE(r.commensurate); CHECK(r.near_extinct_class); CHECK(TranslationalNCSToText(r).find("supercell candidate") != std::string::npos); + + // A deep but genuine pseudo-symmetry - the weak class at 5% of the strong, a 12x modulation - is + // not one. + const auto deep = AnalyzeTranslationalNCS(Synthetic(cell, "P 1 2 1", &u, 0.90), cell, sg); + REQUIRE(deep.detected); + CHECK_FALSE(deep.near_extinct_class); } // The vector is not only reported: the L-test picks its partner steps with it and the twin-immune