feat: Add atom-wise RASA conditioning for ligand orientation design #35
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.
Summary
This PR implements atom-wise RASA conditioning for ligands, enabling precise control over which atoms should be buried or exposed. This allows fine-grained control of ligand orientation during protein-ligand design.
Key Point: The model was already trained with atom-level RASA features (
rf_diffusion/sasa.pycomputes SASA per atom). This PR simply exposes that capability to users at inference time, ensuring backward compatibility with existing global RASA specifications.Changes
rasa='global_rasa,ATOM1:value1,ATOM2:value2,...'to control individual atomsone_hot_buckets()functionTechnical Details
Usage Examples
Control ligand orientation by specifying which atoms should be exposed:
4yhy_m3l.pdb
Inward Orientation
→ M3L backbone faces outward (backbone atoms have high RASA values)
Outward Orientation
→ M3L side chain faces outward (side chain atoms have high RASA values)
Why This Matters
Validated with successful test cases (see examples above). Happy to address any feedback!