sponge.function.calc_torsion_by_vectors
============================================

.. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg
    :target: https://gitee.com/mindspore/mindscience/blob/master/MindSPONGE/docs/api/api_python/function/sponge.function.calc_torsion_by_vectors.rst
    :alt: 查看源文件


.. py:function:: sponge.function.calc_torsion_by_vectors(vector1: Tensor, vector2: Tensor, axis_vector: Tensor = None, keepdims: bool = False)

    计算由三个向量形成的扭转角。

    参数:
        - **vector1** (Tensor) - 向量1,shape为 :math:`(..., D)` ,D是模拟系统的维度。
        - **vector2** (Tensor) - 向量2,shape为 :math:`(..., D)` 。
        - **axis_vector** (Tensor) - 轴向量,shape为 :math:`(..., D)` 。
        - **keepdims** (bool) - 设置为 ``True`` 的话,最后一个维度会保留,默认值 ``False`` 。

    返回:
        Tensor。计算所得扭转角。shape为 :math:`(...)` 或 :math:`(..., 1)` 。