fix motif drift for symmetric fused-motif designs#324
Open
TanushGoel wants to merge 1 commit into
Open
Conversation
69e0940 to
69c0e53
Compare
69c0e53 to
0d12c2c
Compare
|
facts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
When scaffolding a fused/contiguous motif under symmetry (
inference_sampler.kind=symmetry), the motif drifts over the trajectory so the output no longer matches the input motif.Symmetric inference applies a per-step COM recenter, then rebuilds the symmetric copies from the ASU. A fused motif is part of the generated chain, so it isn't marked
FIXED_ENTITY_IDand nothing corrects for the shift. The recenter, propagated through the symmetry transforms, moves the motif off its input pose and the error accumulates over the trajectory.Fix
In
SampleDiffusionWithSymmetry.apply_symmetry_to_X_L, we skip the COM recenter when a contiguous motif is present, so it stays put and the symmetric copies rebuild from it correctly.Scope
Scoped to
is_motif_atom_with_fixed_coord & is_sym_asu & ~FIXED_ENTITY_IDand guarded bynot self.allow_realignment, so it's a no-op for de novo symmetric, unindexed motifs, and the non-symmetric sampler.