Skip to content

Fix HBond conflict and stabilize tempdir usage#231

Open
Chen-Jie7 wants to merge 4 commits intoRosettaCommons:productionfrom
Chen-Jie7:hbond_fix
Open

Fix HBond conflict and stabilize tempdir usage#231
Chen-Jie7 wants to merge 4 commits intoRosettaCommons:productionfrom
Chen-Jie7:hbond_fix

Conversation

@Chen-Jie7
Copy link

@Chen-Jie7 Chen-Jie7 commented Feb 25, 2026

Summary

  • deleted old version of hbonds and only keep HBPlus
  • keep temporary-directory handling explicit so HBPlus output/files are isolated per run
  • fix partially unfix ligands, removes them from set_origin zero, random center argumentation, and high noise

Chen-Jie7 and others added 4 commits January 22, 2026 12:42
When a user specifies select_fixed_atoms for a ligand with only a subset
of its atoms, the unfixed atoms were ending up physically disconnected
from the fixed ones (e.g., C11-C12 bond at 5-11A instead of ~1.5A).

Three root causes were addressed:

1. _set_origin() zeroed coordinates for ALL unfixed atoms including
   ligand atoms, placing them at the origin. Now excludes ligand atoms
   (identified via atom_array.hetero) from zeroing.

2. centre_random_augment_around_motif() applied centering asymmetrically
   when centering_affects_motif=False, pulling unfixed ligand atoms away
   from fixed ones. Now accepts an is_ligand_atom mask and excludes
   ligand atoms from asymmetric centering.

3. Both initial noise (_get_initial_structure) and per-step noise
   (epsilon_L) were applied at full scale to unfixed ligand atoms,
   placing them ~160A away. Now zeroes noise for unfixed ligand atoms so
   they stay near their original positions while the model can still
   softly adjust them through denoising predictions.

To support this, is_ligand_atom is now extracted as an atom-level feature
in AddIsXFeats and propagated through the diffusion pipeline to the
inference sampler.

Verified with biotin_2.json partial fix (16/21 atoms fixed): C11-C12
bond improved from 5-11A to ~2.5A.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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