openfold.utils.geometry.rotation_matrix

Rot3Array Matrix Class.

Classes

Rot3Array(xx, xy, xz, yx, yy, yz, zx, zy, zz)

Rot3Array Matrix in 3 dimensional Space implemented as struct of arrays.

class Rot3Array(xx, xy, xz, yx, yy, yz, zx, zy, zz)

Rot3Array Matrix in 3 dimensional Space implemented as struct of arrays.

Parameters:
apply_inverse_to_point(point)

Applies inverse Rot3Array to point.

Parameters:

point (Vec3Array)

Return type:

Vec3Array

apply_to_point(point)

Applies Rot3Array to point.

Parameters:

point (Vec3Array)

Return type:

Vec3Array

classmethod cat(rots, dim)
Parameters:
Return type:

Rot3Array

classmethod from_array(array)

Construct Rot3Array Matrix from array of shape. […, 3, 3].

Parameters:

array (Tensor)

Return type:

Rot3Array

classmethod from_quaternion(w, x, y, z, normalize=True, eps=1e-06)

Construct Rot3Array from components of quaternion.

Parameters:
Return type:

Rot3Array

classmethod from_two_vectors(e0, e1)

Construct Rot3Array from two Vectors.

Rot3Array is constructed such that in the corresponding frame ‘e0’ lies on the positive x-Axis and ‘e1’ lies in the xy plane with positive sign of y.

Parameters:
Returns:

Rot3Array

Return type:

Rot3Array

classmethod identity(shape, device)

Returns identity of given shape.

Return type:

Rot3Array

inverse()

Returns inverse of Rot3Array.

Return type:

Rot3Array

map_tensor_fn(fn)
Return type:

Rot3Array

reshape(new_shape)
stop_gradient()
Return type:

Rot3Array

to_tensor()

Convert Rot3Array to array of shape […, 3, 3].

Return type:

Tensor

unsqueeze(dim)
Parameters:

dim (int)

xx: Tensor
xy: Tensor
xz: Tensor
yx: Tensor
yy: Tensor
yz: Tensor
zx: Tensor
zy: Tensor
zz: Tensor