mindchemistry.e3.o3.xyz_to_angles

View Source On Gitee
mindchemistry.e3.o3.xyz_to_angles(xyz)[source]

Convert a point \(\vec r = (x, y, z)\) on the sphere into angles \((\alpha, \beta)\).

\[\vec r = R(\alpha, \beta, 0) \vec e_z\]
Parameters

xyz (Tensor) – The point \((x, y, z)\) on the sphere. The shape of Tensor is \((..., 3)\).

Returns

alpha (Tensor) - The alpha Euler angles. The shape of Tensor is \((...)\). beta (Tensor) - The beta Euler angles. The shape of Tensor is \((...)\).

Supported Platforms:

Ascend

Examples

>>> import mindspore as ms
>>> from mindchemistry.e3.o3 import xyz_to_angles
>>> input = ms.Tensor([3, 3, 3])
>>> m = xyz_to_angles(input)
>>> print(m)
(Tensor(shape=[], dtype=Float32, value= 0.785398), Tensor(shape=[], dtype=Float32, value= 0.955318))