jasonkyuyim / se3_diffusion

Implementation for SE(3) diffusion model with application to protein backbone generation
https://arxiv.org/abs/2302.02277
MIT License
333 stars 54 forks source link

Question regarding `pad_rigid` #12

Closed amorehead closed 1 year ago

amorehead commented 1 year ago

Hi again. Looking at your pad_rigid function, I am getting a runtime error from OpenFold's utility functions if I don't make the following change to your line of code below.

https://github.com/jasonkyuyim/se3_diffusion/blob/420b1fe6d3da53ff17490e5b599df2acca5039e5/data/utils.py#L221

pad_rigid = rigid_utils.Rigid.identity(
        (pad_amt,), dtype=rigid.dtype, device=rigid.device, requires_grad=False
    )

Is this the case for you all as well?

jasonkyuyim commented 1 year ago

You must have strict pytype checking on which is preventing anything other than the expected tuple. https://github.com/jasonkyuyim/se3_diffusion/blob/master/openfold/utils/rigid_utils.py#L110 It works for me but I've changed this now to be the expected collection type https://github.com/jasonkyuyim/se3_diffusion/commit/fb350b69ca4349d7b29b19044ecc8627815dafce