A question with respect to the implement of DimeNet

Hi, I want to use DGL to implement DimeNet.

However, I have a question about how to calculate the angle of the two edges connected three nodes in the model with DGL. I’m not sure are there some implemented functions in DGL could finish this step? Thank you.

It seems that DimeNet uses angle information as follows. For each edge (j, i), it needs to compute the angle between edges (k, j) and (j, i) for each k\in\mathcal{N}_j\setminus\{i\}. I don’t think there are some built-in functions for implementing this. My intuition is that you can probably use g.edges and g.predecessors for some graph query, but the main implementation will be based on tensor operations.

Thank you for your response. I will read these functions and have a try.