RFdiffusion icon indicating copy to clipboard operation
RFdiffusion copied to clipboard

How to use the trb file in combination with ProteinMPNN

Open wangdoc2002 opened this issue 2 years ago • 5 comments

Hi, RF diffusion team, I am inpainting a protein with varied AA length. For a fixed length of design, I can use --fixed_positions_jsonl function in ProteinMPNN.

For a varied length of designs, the .trb file outputs which residues were fixed during RFdiffusion nicely. Is there a way I can fed this trb information to ProteinMPNN?

wangdoc2002 avatar Oct 05 '23 01:10 wangdoc2002

Yes! So the trb file contains the mappings of where residues were in the input, and where they ended up in the output. These are "con_ref_idx0" and "con_hal_idx0" (named such for historical reasons). Everything in "con_ref_idx0" are residues that were fixed in the input contig. "con_hal_idx0" contains the corresponding 0-indexed position of those residues in the output. This can then quite easily be used to then make the fixed_position dictionary inputs to ProteinMPNN. We have scripts for doing this - if you have any difficulties we can probably share these

joewatchwell avatar Nov 03 '23 06:11 joewatchwell

@joewatchwell that script would be very helpful! Could you share it? Many thanks!

noah-c-noah-do avatar Mar 06 '24 16:03 noah-c-noah-do

If that script is available, can you please share a link? Thanks either way!

BaylenRavenscraft avatar Apr 16 '24 18:04 BaylenRavenscraft