divelab / DIG

A library for graph deep learning research
https://diveintographs.readthedocs.io/
GNU General Public License v3.0
1.85k stars 281 forks source link

Question about spherenet #232

Closed StefanIsSmart closed 9 months ago

StefanIsSmart commented 9 months ago

Thank you for your work! I really want to understand the details of your work. Why don‘t use the distance, angle, and torsion directly? (That can got from the xyz_2_dat function) Why embed them by the 'bessel_funcs' and the 'sph_funcs' ? (In fact, i don't know that, this very confused me.) Could you give a more detailed explanation?

limei0307 commented 9 months ago

Hi @StefanIsSmart,

Thanks for your interest in our work!

In SphereNet, we first compute distance, angle, and torsion for each edge using the xyz_2_dat function.

Next, we want to incorporate the distance, angle, and torsion into the neural network. This step is non-trivial since the distance etc. are only scalar values. Therefore, we use basis functions to embed scalar values into physically meaningful vector features. The dimension of the embedded features is the same as the number of basis functions.

For example, spherical harmonics can be used to embed angle and torsion. Here $l$ and $m$ are hyperparameters that can determine the number of basis functions we use.

In addition, using basis functions to embed distances and angles etc. are commonly used in many methods such as SchNet and DimeNet. You can also try to directly embed these distances and angles using MLP, but the performance should be worse than using physically meaningful basis functions.

Let us know if you have other questions. Thanks.