mindchemistry.e3.o3.compose_angles
- mindchemistry.e3.o3.compose_angles(a1, b1, c1, a2, b2, c2)[source]
Computes the composed Euler angles of two sets of Euler angles.
\[R(a, b, c) = R(a_1, b_1, c_1) \circ R(a_2, b_2, c_2)\]Note
The second set of Euler angles 'a2, b2, c2' are applied first, while the first set of Euler angles a2, b2, c2' are applied Second. The elements of Euler angles should be one of the following types: float, float32, np.float32.
- Parameters
a1 (Union[Tensor[float32], List[float], Tuple[float], ndarray[np.float32], float]) – The second applied alpha Euler angles.
b1 (Union[Tensor[float32], List[float], Tuple[float], ndarray[np.float32], float]) – The second applied beta Euler angles.
c1 (Union[Tensor[float32], List[float], Tuple[float], ndarray[np.float32], float]) – The second applied gamma Euler angles.
a2 (Union[Tensor[float32], List[float], Tuple[float], ndarray[np.float32], float]) – The first applied alpha Euler angles.
b2 (Union[Tensor[float32], List[float], Tuple[float], ndarray[np.float32], float]) – The first applied beta Euler angles.
c2 (Union[Tensor[float32], List[float], Tuple[float], ndarray[np.float32], float]) – The first applied gamma Euler angles.
- Returns
alpha (Tensor), The composed alpha Euler angles.
beta (Tensor), The composed beta Euler angles.
gamma (Tensor), The composed gamma Euler angles.
- Supported Platforms:
Ascend
Examples
>>> from mindchemistry.e3.o3 import compose_angles >>> m = compose_angles(0.4, 0.5, 0.6, 0.7, 0.8, 0.9) >>> print(m) (Tensor(shape=[], dtype=Float32, value= 1.34227), Tensor(shape=[], dtype=Float32, value= 1.02462), Tensor(shape=[], dtype=Float32, value= 1.47115))