gasteigerjo/dimenet

Question about the Calculation of Angles

zetayue opened this issue · 4 comments

I found that the calculations of the angles used in the directional message passing are slightly different from the ones mentioned in your paper. Here the angles are calculated between R1 and R2, which are the angles between m_ji and m_ki:

https://github.com/klicperajo/dimenet/blob/bf725c33755cd6fb87661fe03956b5fb30889742/dimenet/model/dimenet.py#L81-L92

However, the angles defined in the paper are between m_ji and m_kj. I'm wondering which is a better way. Maybe they perform similarly to represent the directional information?

Oh, yes, that is definitely a bug. Great spot! We'll run an experiment with our faster version and see what difference it makes. I'll let you know!

In our experiment the correct version (the one in the paper) indeed performs slightly better. I can't change the code now since it wouldn't work with the pretrained models. For your own experiments I'd recommend using the correct version. I've added a comment in e5d2815 mentioning this.

Hi, @klicperajo , this is a very nice work. But I have the same question about the angles. Intuitively the angular contributions for atom $i$ should comes from the angle between $e_{ij}$ and $e_{ik}$, rather than the angle between $e_{ij}$ and $e_{jk}$. Why the paper use the latter method?

I think if you look at Figure 1 in the paper, this should become clear. :)