martinpacesa / BindCraft

User friendly and accurate binder design pipeline
MIT License
214 stars 44 forks source link

Question about intuition behind AF2 monomer for validation #70

Open eswan01 opened 1 day ago

eswan01 commented 1 day ago

Thanks for sharing this great binder generation pipeline! I have a few questions about the MPNN redesign/re-prediction step:

In your paper, you state: "These [MPNN-]optimized sequences are then re-predicted using the AF2 monomer model, with 3 recycles and 2-template based models in single sequence mode, to ensure robust and unbiased complex assessment." I'm finding that for some target/binder pairs, my trajectories produce good-looking binders, but they fail on monomer validation, specifically on iptm, as they're poorly docked by the monomer model. Could you please elaborate on the intuition behind using the AF2 monomer weights to fold the designed complex?

Supposing that I only use multimer weights in design and validation, do you think one could achieve similar "robustness" by using models [0, 1, 2] for design and [3, 4] for validation?

The complex and binder prediction models are defined and prepared in https://github.com/martinpacesa/BindCraft/blob/d2d3cd0b5d6b02d12d24afa59e640717e36f552c/bindcraft.py#L194-L203 The complex prediction model is then called in https://github.com/martinpacesa/BindCraft/blob/d2d3cd0b5d6b02d12d24afa59e640717e36f552c/bindcraft.py#L223-L228 When I dig into the masked_binder_predict code, it doesn't look to me like the templates are being masked, since by default in the advanced settings, rm_template_seq_predict and rm_template_sc_predict are both false. Could you please elaborate on the intention behind masked_binder_predict (beyond just refolding with different weights) and how it's being used here?

Best, Erik

martinpacesa commented 8 hours ago

Hi there! BindCraft was built to be robust, our goal was to make a pipeline where every binder would be potentially working in the lab, rather than having to screen hundreds experimentally, that's why some of the steps might seem over the top. So there is definitely a trade off between design accuracy and success, and certain targets might be failing or even some good binders might be filtered out. That's why in the end we use the monomer model to filter, which has never seen complexes, because if that model thinks it is likely to form a complex it's a more confident prediction than with multimer which has the propensity to form complexes to begin with. Also, with multimer we design with 5 models, rather than 2 if we used monomer, which reduces the chances of making adverserial sequences. Therefore I would avoid using multimer for both design and validation as you might end up with sequences that look good to AF2 but might be overfitted to please the model.

Yeah the masked binder predict needs to be renamed, we used to do masking but moved away from it.