octavian-ganea / equidock_public

EquiDock: geometric deep learning for fast rigid 3D protein-protein docking
MIT License
233 stars 58 forks source link

Matrix Product Error in Kabsh Model #15

Open smiles724 opened 2 years ago

smiles724 commented 2 years ago

Hi, dear authors of Equidock, I feel really sad to hear the news that Ganea passed away without fully showing his extraordinary genius.

I came across the calculation of the Kabsh Model and found that the computation of the rotation matrix is somehow misleading. To be specific, U, S, Vt = np.linalg.svd(H) gives us the U, S, V^T, which corresponds to U2, S, U1^T in the paper. Next, the rotation matrix is obtained via R = Vt.T @ U.T, which is different from what is described in the text. Instead, R = U2 @ U^T, which should be R = U @ Vt in the code. Do you agree with me?

AxelGiottonini commented 1 year ago

Hey !

So if we take their code, we get Rc = Vt.T @ U.T = (U @ Vt).T. In the article, they make the correspondances U2->U, U1.T->Vt and the rotation matrix is thus defined as Ra = U2 @ U1.T = U @ Vt = Rc.T. The rotation matrix used in the code Rc is thus the inverse of the rotation matrix used in the article Ra. So yes, I agree with you.

Have you tried changing the function and if so did it present different results from what was obtained in the article ?