microsoft / protein-frame-flow

Fast protein backbone generation with SE(3) flow matching.
MIT License
200 stars 13 forks source link

About the motif guidance implementation #22

Closed Kirito-Ausna closed 1 week ago

Kirito-Ausna commented 4 months ago

Hi! Thanks for your awesome work! I noticed that you will calculate the following: image I am a little confused about calculating the SO(3) norm. And the IPA module includes the torch.linalg.eigh() operation, which is known to be highly unstable when back-propagating. I am concerned that the gradient in the motif guidance will contain a lot of NaNs and be meaningless. I am very curious about how I can resolve this issue. Could you kindly give me some guidance?

Thanks a lot!

jasonkyuyim commented 4 months ago

Hi, yes we find occassional of NaNs in the gradients due to the instability. In our code we set these to 0. The code will be released following the paper update.

Kirito-Ausna commented 4 months ago

Hi Jason! Thanks for your response! Could you please tell me how to calculate the SO(3) norm and its weights? Since the paper didn't contain enough details to reproduce. Or could you share your schedule to release the official codes? Thanks a lot!

jasonkyuyim commented 1 month ago

This has been added. (Sorry for the delay. The paper was accepted this week at TMLR.) https://github.com/microsoft/protein-frame-flow/blob/motif_scaffolding/data/interpolant.py#L327