From bb1b53324104eba2a8293362135c317b6d835de7 Mon Sep 17 00:00:00 2001 From: Nick J Fowler Date: Tue, 2 Jun 2026 12:31:53 +0100 Subject: [PATCH] Fixed bug where SS and Rg metrics only computed for subset of diffused atoms The code was set up to always compute SS and Rg metrics for the diffused parts only, regardless of whether `compute_non_clash_metrics_for_diffused_region_only` was set to True/False. --- models/rfd3/src/rfd3/metrics/design_metrics.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/models/rfd3/src/rfd3/metrics/design_metrics.py b/models/rfd3/src/rfd3/metrics/design_metrics.py index 5ac24fbc..833257ee 100644 --- a/models/rfd3/src/rfd3/metrics/design_metrics.py +++ b/models/rfd3/src/rfd3/metrics/design_metrics.py @@ -135,14 +135,13 @@ def get_all_backbone_metrics( ) if verbose: + if compute_non_clash_metrics_for_diffused_region_only: # Subset to diffused region only atom_array = atom_array[~atom_array.is_motif_atom_with_fixed_coord] - # ... Add additional metrics - o |= get_ss_metrics_and_rg( - atom_array[~atom_array.is_motif_atom_with_fixed_coord] - ) + # SS and Rg metrics + o |= get_ss_metrics_and_rg(atom_array) # Basic compositional statistics starts = get_token_starts(atom_array)