Skip to content

Fix: Hotspot Index Out-of-Bounds Error in Nanobody Sampling#28

Open
RicardoZF wants to merge 1 commit into
Mingchenchen:v0from
RicardoZF:fix/hotspot-index-out-of-bounds
Open

Fix: Hotspot Index Out-of-Bounds Error in Nanobody Sampling#28
RicardoZF wants to merge 1 commit into
Mingchenchen:v0from
RicardoZF:fix/hotspot-index-out-of-bounds

Conversation

@RicardoZF
Copy link
Copy Markdown

Problem:

  • hotspot_index was calculated on the full structure (including non-standard residues)
  • Data is later filtered by modeled_idx (keeping only standard amino acids)
  • Saved hotspot indices were not mapped to the filtered space
  • This caused IndexError when indices exceeded the filtered array size

Example:

  • Original structure: 196 residues
  • After filtering: 188 residues (modeled_seq_len)
  • Hotspot indices: [146, 157, 173, 179] (based on original structure)
  • Error: index 179 > 188, out of bounds

Solution:
Map hotspot indices to the modeled_idx space before saving to metadata.

Problem:
- hotspot_index was calculated on the full structure (including non-standard residues)
- Data is later filtered by modeled_idx (keeping only standard amino acids)
- Saved hotspot indices were not mapped to the filtered space
- This caused IndexError when indices exceeded the filtered array size

Example:
- Original structure: 196 residues
- After filtering: 188 residues (modeled_seq_len)
- Hotspot indices: [146, 157, 173, 179] (based on original structure)
- Error: index 179 > 188, out of bounds

Solution:
Map hotspot indices to the modeled_idx space before saving to metadata.

Co-Authored-By: RicardoZF <1370174361@qq.com>
y1zhou added a commit to y1zhou/PPIFlow that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant