HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
477 stars 109 forks source link

Questions about SE(3)-equivariant #40

Closed Surviveagainsttheodds closed 2 years ago

Surviveagainsttheodds commented 2 years ago

Hi,

I'm still a newbie in ligand-receptor binding. I did an experiment on translation equivariance in the 5ol3 complex in PDBBind dataset. I experimented with a translation of both ligand and receptor of the 5ol3 complex by shifting1 Å along the y-axis and shifting for the ligand only. However, the results showed that the binding poses were different for no shifting (the control group), shifting ligand, and shifting both ligand and receptor. The figure below shows the conformations of the molecules which inferenced by the model. It does not look like the model guarantees SE(3)-equivariant. I would like to understand the reason why these three conformations are not similar.

Many Thanks!

5ol3_ligand_inferenced_by_equibind
HannesStark commented 2 years ago

Hi! Thanks for digging into the model! Did the different predictions arise in your scenario of shifting the ligand inputs or when shifting the ligand and receptor inputs?

HannesStark commented 2 years ago

I just reran my se3 invariance checks (invariant to the initial ligand placement) and when substracting the output coordinates all tensors were only zeros. Can you describe your setup in more detail so I can try to reproduce this?

Surviveagainsttheodds commented 2 years ago

I reran the test too and found that I made some mistakes in the first test. The rerun results are as follows.

The output of the baseline and shifting ligand only are the same. But the result of shifting both receptor and ligand is different from the first two. Besides, I did another test for shifting receptor only. I found that the output changes only if the receptor is shifted.

I attached my test files and the inference configuration file. 5ol3_se3_test.zip

Also, could you please tell me how the check_se3_invariance parameter works? I searched the repo for the code about check_se3_invariance, but I find nothing about the specific implementation.

Thank you very much for taking the time to reply to me!

HannesStark commented 2 years ago

Great that everything works!

It is expected that changing the receptor position will change the position of the final prediction in the same way. That is what is meant with equivariance.

The check_se3_invariance flag is a remnant of my checks that I forgot to remove from the public repository. I will remove it soon. Thanks for pointing it out!