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

some queries about the SO3_diffusion_example.ipynb notebook #7

Closed sirius777coder closed 1 year ago

sirius777coder commented 1 year ago

HI,

It is excellent work to implement this series of so3 diffusion codes. I'm curious about one function in the SO3_diffusion_example.ipynb notebook below:

# Exponential map from tangent space at R0 to SO(3) 
def expmap(R0, tangent):
    skew_sym = torch.einsum('...ij,...ik->...jk', R0, tangent)
    return torch.einsum('...ij,...jk->...ik', R0, exp(skew_sym))

This function seems to do an exponential map from tangent space to SO(3). What is the meaning of the input "tangent" tensor? If it refers to a tangent vector of the R0 tangent space, why the shape of this vector in two dimensions is i and k?

blt2114 commented 1 year ago

Hello. This does indeed compute the exponential map from the tangent space at R0 to SO(3). Tangent vectors of SO(3) are represented as 3x3 matrices and so have two dimensions. Does that answer the question?

sirius777coder commented 1 year ago

Great! Your assistance has been incredibly helpful.