-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Background
I've been exploring RFdiffusion2 for small molecule binder design and noticed what appears to be a discrepancy between the paper's claims and the open source implementation. I'd appreciate help from the community to understand if I'm missing something or if this feature needs implementation.
Paper Claim vs. Implementation
The RFdiffusion2 paper states:
"First, to provide finer control over the depth at which each reactant and/or cofactor is buried within the protein, we enable users to specify the RASA of each atom"
However, in my analysis of the codebase, I only found molecule-level RASA conditioning. Am I looking in the wrong place, or is this feature not yet implemented?
What I Found
Current RASA Implementation
File: rf_diffusion/conditions/v2.py (lines 135-141)
def get_relative_sasa_inference(indep, feature_conf, feature_inference_conf, cache, **kwargs):
if not feature_inference_conf.active:
return {'t1d':torch.zeros((indep.length(), feature_conf.n_bins + 1))}
rasa = torch.full((indep.length(),), feature_inference_conf.rasa) # Single scalar
is_feature_applicable = indep.is_sm # Applied to ALL small molecule atoms
# ... rest applies same RASA to all ligand atomsCurrent Configuration
# rf_diffusion/config/inference/base.yaml
relative_sasa_v2:
active: False
rasa: -1 # Single value - no per-atom specificationAtomic-Level Control Exists Elsewhere
Interestingly, I found the partially_fixed_ligand system does support atomic-level control:
# This works for structural fixing:
inference.partially_fixed_ligand="{BCA:[C6B,C5B,C7B,C4B,O2B]}"Questions for the Community
-
Am I missing something? Is there another configuration parameter or method for atomic-level RASA that I haven't found?
-
Is this a known limitation? Should the paper's claim be interpreted differently?
-
Implementation pathway? If this needs to be implemented, would extending the existing patterns (similar to
partially_fixed_ligand) be the right approach? -
Workaround exists? Is there a current method to achieve per-atom RASA control that I'm not aware of?
Potential Implementation Ideas
Please let me know if this approach makes sense or if there's a better way:
# Hypothetical per-atom RASA syntax:
inference.per_atom_rasa:
LIG:
OH: 0.8 # Highly buried hydroxyl
C1: 0.3 # Partially exposed carbon
C2: 0.1 # Surface-exposed carbonThe architecture seems to exist since partially_fixed_ligand successfully:
- Parses per-atom specifications
- Maps atom names to internal indices
- Validates atom existence
- Applies individual control per atom
My Analysis Could Be Wrong
I want to emphasize that I might be:
- Looking in the wrong files
- Misunderstanding the configuration system
- Missing a parameter that enables this functionality
- Misinterpreting the paper's claims
Any guidance, corrections, or insights would be greatly appreciated!
Environment
- RFdiffusion2 open source repository
- Analyzed primarily
rf_diffusion/conditions/v2.pyand config files - Used standard configuration files without modification
If this is indeed a missing feature, I'd be happy to contribute to its implementation with guidance from maintainers and the community.