xnn.trfnn.models.equiformer_v2.edge_rotation#

xnn.trfnn.models.equiformer_v2.edge_rotation(vec)[source]#

The minimal rotation taking each edge direction onto the y axis, (E, 3, 3).

R = c I + [v]_x + v v^T / (1 + c) with c = n_y and v = n x e_y, smooth everywhere except at n = -e_y, where the rotation by pi about x is used (the model is invariant to the remaining roll up to the sphere sampling).

Parameters:

vec (Tensor) – Edge vectors (E, 3).

Returns:

Rotation matrices with R n = e_y.

Return type:

Tensor