Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

fix(core): Correctly Parameterize System-Extracted Rotamers#30

Merged
TKanX merged 5 commits intomainfrom
bugfix/29-crash-on-placement-when-include-input-conformation-is-enabled
Aug 14, 2025
Merged

fix(core): Correctly Parameterize System-Extracted Rotamers#30
TKanX merged 5 commits intomainfrom
bugfix/29-crash-on-placement-when-include-input-conformation-is-enabled

Conversation

@TKanX
Copy link
Member

@TKanX TKanX commented Aug 14, 2025

Summary:

Fixes a critical crash that occurred when using the include-input-conformation option. The root cause was that rotamers extracted from the live system were not being parameterized, leaving them without essential data like atom roles and cached forcefield parameters, which led to failures in subsequent placement and scoring operations. The fix ensures these system-derived rotamers are fully parameterized, making them consistent with those loaded from the library. Additionally, the extraction logic has been made more robust.

Changes:

  • Parameterized System-Extracted Rotamers:

    • The include_system_conformations function in the RotamerLibrary now accepts a Parameterizer instance.
    • It now explicitly runs the full parameterization process on each newly extracted rotamer, assigning correct atom roles, VDW parameters, delta values, and H-bond types.
  • Improved Rotamer Extraction Logic:

    • The extract_rotamer_from_system function was refactored for greater robustness.
    • It now correctly handles residues where atoms may serve multiple topological roles (e.g., as both an anchor and a sidechain atom in Glycine).
    • The extraction process now safely skips conformations that are missing mandatory anchor or sidechain atoms as defined in the topology, preventing panics with incomplete structures.

@TKanX TKanX self-assigned this Aug 14, 2025
Copilot AI review requested due to automatic review settings August 14, 2025 15:19
@TKanX TKanX added the bug 🐛 Something isn't working label Aug 14, 2025
@TKanX TKanX linked an issue Aug 14, 2025 that may be closed by this pull request
10 tasks
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a critical crash when using the include-input-conformation option by ensuring that rotamers extracted from the live system are properly parameterized. The root cause was that system-derived rotamers lacked essential data like atom roles and forcefield parameters, leading to failures in placement and scoring operations.

  • Moved the system conformation inclusion logic to occur after the Parameterizer is created, allowing proper parameterization of extracted rotamers
  • Enhanced the include_system_conformations method to accept a Parameterizer instance and explicitly parameterize each extracted rotamer
  • Improved the robustness of the rotamer extraction process to handle edge cases and missing atoms more gracefully

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/scream-core/src/workflows/place.rs Moved system conformation inclusion after parameterizer creation and updated function signatures
crates/scream-core/src/core/rotamers/library.rs Added parameterization to extracted rotamers and improved extraction logic with better error handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@TKanX TKanX merged commit 035e074 into main Aug 14, 2025
2 checks passed
@TKanX TKanX deleted the bugfix/29-crash-on-placement-when-include-input-conformation-is-enabled branch August 14, 2025 17:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on Placement when include-input-conformation is Enabled

2 participants