diff --git a/image_analysis/structure_refinement/Refinement.cpp b/image_analysis/structure_refinement/Refinement.cpp index 331dce601..2b95f9dd7 100644 --- a/image_analysis/structure_refinement/Refinement.cpp +++ b/image_analysis/structure_refinement/Refinement.cpp @@ -2717,14 +2717,14 @@ RefinementResult RefineOnce(const gemmi::Structure &placed, const std::vector(k); } - // The B factors refined on are a step further on the same weights: kept where they displace where the - // weights ended, as any step. - if (best >= 0) { + // Each is a step further on the same weights: the one chosen is kept where it displaces where the weights + // ended, as any step (at low resolution the B factors refined on may all be worse than B held). + result.adp_model = iso.name; + if (best >= 0 && displaces(outcomes[best].trial, state.trial)) { result.adp_model = outcomes[best].trial.adp; - logger.Info("Refinement: displacement model {}", result.adp_model); - } - if (best > 0 || (best == 0 && displaces(outcomes[0].trial, state.trial))) state = std::move(outcomes[best]); + } + logger.Info("Refinement: displacement model {}", result.adp_model); } for (size_t s = 1; s < trial_slots.size(); s++) ctx.evaluations += trial_slots[s].ctx->evaluations;