Commit 3b739a2
authored
fix motif drift for symmetric fused-motif designs (#324)
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_ID and 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_ID and guarded by not self.allow_realignment, so it's a no-op for de novo symmetric, unindexed motifs and the non-symmetric sampler.1 parent d6c07df commit 3b739a2
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
384 | 394 | | |
385 | 395 | | |
386 | | - | |
| 396 | + | |
387 | 397 | | |
388 | 398 | | |
389 | 399 | | |
| |||
0 commit comments