From d3673d17fc56528a9c3a00fd6cc03a53bda280f6 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 25 Oct 2026 04:04:51 +0100 Subject: [PATCH] RefinementTest: the GPU restraint check on an engine made for a cell its gather takes The restraints do not read the cell; the 14 A cell that makes the symmetry contacts is too narrow for the gather's boxes, so the engine was refused. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu (cherry picked from commit a6e00e10ce1798a97d1f054c7553cc9eb6b5cf4b) --- tests/RefinementTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/RefinementTest.cpp b/tests/RefinementTest.cpp index ace1d7659..926aa3254 100644 --- a/tests/RefinementTest.cpp +++ b/tests/RefinementTest.cpp @@ -305,9 +305,11 @@ TEST_CASE("RefinementRestraints_gradient", "[Refinement]") { #ifdef JFJOCH_USE_CUDA if (get_gpu_count() > 0) { // the GPU's float evaluation of the same set - std::vector merged = asu_reflections(cell, *st.find_spacegroup(), 3.0); - RefinementReflections refl = PrepareRefinementReflections(merged, cell, *st.find_spacegroup(), 3.0); - auto gpu = MakeRefinementEngineGPU(0, cell, *st.find_spacegroup(), 3.0, refl, st.models[0], 100.0, SIZE_MAX); + // (the engine is made for a cell wide enough for its gather; the restraints do not read the cell) + const gemmi::UnitCell wide_cell(40, 40, 40, 90, 90, 90); + std::vector merged = asu_reflections(wide_cell, *st.find_spacegroup(), 3.0); + RefinementReflections refl = PrepareRefinementReflections(merged, wide_cell, *st.find_spacegroup(), 3.0); + auto gpu = MakeRefinementEngineGPU(0, wide_cell, *st.find_spacegroup(), 3.0, refl, st.models[0], 100.0, SIZE_MAX); REQUIRE(gpu); gpu->SetRestraints(0, set); std::vector> ggpu;