wangleiofficial / FAPEloss

alphafold FAPE loss
7 stars 1 forks source link

Question about rotation matrix #1

Open psp3dcg opened 1 year ago

psp3dcg commented 1 year ago

Hi, I have read your code and the formula in the supplementary of AlphaFold2, then found a problem. In Algorithm 28 of the supplementary, xij = (Ti ^ -1) ◦ xj, and the (Ti ^ -1) ◦ xj is defined as (Ri ^ -1)(xj - ti) in formula 12. I think the (Ri ^ -1) represents the inverse of rotation matrix R, but I don't see any inverse instructions in your code. Perhaps I misunderstood. If you could provide a response, I would greatly appreciate it. :)

wangleiofficial commented 1 year ago

Hi,I do this via the Einstein summation convention, specifically the summation of kq and k in line 37, so there is no need to explicitly implement the inverse of rotation matrix R.

psp3dcg commented 1 year ago

Hi,I do this via the Einstein summation convention, specifically the summation of kq and k in line 37, so there is no need to explicitly implement the inverse of rotation matrix R.

Sorry to bother you, I have another question. In FAPE loss, do you know why atom coordinates need to rotate and translate based on frames generated by other atoms (e.g., (Ti ^ -1) ◦ xj where i does not equal to j, which means j-th atom coordinate rotates and translates based on the frame generated by i-th atom)? Thank U :)