Skip to content

Fix helix segmentation preservation in secondary structure parsing#23

Merged
t03i merged 2 commits intomainfrom
feature/improved-helix
Jul 1, 2025
Merged

Fix helix segmentation preservation in secondary structure parsing#23
t03i merged 2 commits intomainfrom
feature/improved-helix

Conversation

@t03i
Copy link
Owner

@t03i t03i commented Jul 1, 2025

Summary

Fixes visual artifacts in protein helix rendering by preserving original segmentation boundaries from DSSP/CIF files without merging adjacent secondary structure elements.

Problem

When visualizing tetrameric hemoglobin with inertia-based projection, individual chains were projecting to overlapping locations due to helix segments being incorrectly merged during secondary structure processing. Long continuous helix ranges caused visual clutter where distinct helix segments should have been preserved.

Solution

  • Modified Chain's secondary_structure property to preserve original segmentation boundaries from DSSP/CIF parsing
  • Prevents automatic merging of adjacent secondary structure elements of the same type
  • Maintains backward compatibility by providing COIL coverage when no secondary structure is defined
  • Ensures annotation system continues to function properly

Changes

  • Core: Updated secondary structure property logic in Chain class
  • Tests: Updated test expectations to match new segmentation-preserving behavior
  • Parser: Adjusted expected secondary structure definitions in tests

Test Coverage

All 450 tests pass, confirming backward compatibility and proper functionality.

Impact

  • Improves visual quality of protein helix rendering
  • Maintains compatibility with existing workflows
  • Preserves annotation functionality
  • No breaking changes to public API

@t03i t03i merged commit 8fd9cf3 into main Jul 1, 2025
3 checks passed
@t03i t03i deleted the feature/improved-helix branch July 1, 2025 17:02
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