From 092634c486dfd7fea71e6715e56b3cfa6993ff4b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 17 Nov 2026 11:14:36 +0100 Subject: [PATCH] Refinement: a TLS trial's start bounded by its own floor, not the slot's last trial's RunTrial applied a TLS hypothesis's bodies (ApplyTls, which bounds each atom's total B by b_floor) before its first refit or restore, so the floor was whatever the slot's previous trial had left: the same trial gave a different result (cytC R-free 0.3492 against 0.3494) depending on which slot ran it and after what. The floor is now the start's (the fit's), the same in any slot. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UqXYdHHZ4cogS1mrGUtfN7 --- image_analysis/structure_refinement/Refinement.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image_analysis/structure_refinement/Refinement.cpp b/image_analysis/structure_refinement/Refinement.cpp index 2bf5d0840..ecceb852d 100644 --- a/image_analysis/structure_refinement/Refinement.cpp +++ b/image_analysis/structure_refinement/Refinement.cpp @@ -2229,6 +2229,8 @@ TrialOutcome RunTrial(TrialSlot slot, const std::vector &refinable, const s PlaceRiders(ctx, topo); ctx.tls = hyp->bodies; ctx.tls_b = hyp->tls_b; + // the bodies' U bounded by the start's floor, not by the one the slot's last trial left + ctx.b_floor = fit != nullptr ? fit->b_floor : B_FLOOR; ctx.ApplyTls(); } else if (kind == AdpHypothesis::Kind::Anisotropic) { if (ctx.aniso.size() != ctx.atoms.size())