RFdiffusion icon indicating copy to clipboard operation
RFdiffusion copied to clipboard

Modifying Binder Length when using fold conditioning

Open okanders opened this issue 2 years ago • 3 comments

Hi @joewatchwell , I noticed that when fold conditioning is used to create a secondary structure and adjacency matrix that the binder length is based on the size of the 1st dimension / length of the ss. Is it possible to alter the binder length when using a secondary structure and adjacency matrix on our target, or will we have to crop out target further? Thanks!

okanders avatar Aug 02 '23 19:08 okanders

There are a few ways to do this. One way would be to used the scaffoldguided.sampled_insertion/sampled_N/sampled_C flags, which basically randomly sample length up to what you provide, and insert this many "mask" tokens into the secondary structure and adjacency matrix of the binder (allowing length extension). Alternatively, you could manually make the secondary structure string and adjacency matrices for a range of lengths, and sample from this set.

joewatchwell avatar Aug 03 '23 07:08 joewatchwell

@joewatchwell, Thanks so much for the help! Currently, I am using the SS of my target, but I would like my binder to be smaller... how would you recommend I shrink my binder without losing information from the SS? Or is the only possible route to make an alternative SS that specifies less information? I'm facing incompatibility in this due to the scaffold SS sampled, and so I am experimenting with downsampling the provided scaffold SS to fit my desired binder length, will this hurt my final binder ultimately? Is there a way to sample a scaffold binder ss that is of desired length? Thanks so much!

okanders avatar Aug 03 '23 17:08 okanders

I think you can probably truncate the input, by e.g. reducing the length of secondary structure elements in the binder. For sure you risk making something implausible, but it should be possible. You would need to make your own input files, however, as we don't have a way of doing this within the current codebase

joewatchwell avatar Nov 03 '23 07:11 joewatchwell