FabianFuchsML / se3-transformer-public

code for the SE3 Transformers paper: https://arxiv.org/abs/2006.10503
475 stars 69 forks source link

Order of spherical harmonics in the last dimension #20

Closed ufimtsev closed 2 years ago

ufimtsev commented 3 years ago

Hi!

Please help me figure out the order of spherical harmonics in the 'd'-dimension (there are 2*l-1 of them). I have a function that outputs spherical harmonic coefficients, and I wanted to plug them directly to the transformer as inputs. In what order? In the code there are commented out chunks that would shuffle xyz to zxy for type-1 features for instance. Seeing this made me nervous a bit. But still it seems the type-1 order is XYZ, what about type-2, 3, and 4? Thanks!

FabianFuchsML commented 3 years ago

I have a function that outputs spherical harmonic coefficients, and I wanted to plug them directly to the transformer as inputs.

Could you please specify what you mean by 'spherical harmonics coefficients'? Do you have vectors which are equivalent to our hidden vectors? Like for type 2, do you have a 5 dimensional vector which rotates according to a Wigner-D matrix?

ufimtsev commented 2 years ago

Hi Fabian,

Sorry, I overlooked your reply. My problem is simple -- I have graph nodes in 3D and I can compute 0th, 1st, 2nd, etc moments of the node distribution around each node. Then I want to send this information to the transformer. 0th and 1st moments are trivial -- these are just type-0 and type-1 features. Do you have a suggestion about how to deal with the higher moments? For instance, there are 6 different terms in the second moment, xx, yy, zz, xy, yz, zx, which need to be combined into a 5-dimensional type-2 feature in some particular order. How to do that? Maybe use real harmonics like xy, yz, 2zz-xx-yy, xz, xx-yy? Thanks!