mindsponge.common.initial_affine ================================ .. 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/common/mindsponge.common.initial_affine.rst :alt: 查看源文件 .. py:function:: mindsponge.common.initial_affine(num_residues, use_numpy=False) 初始化仿射变换后的四元数,旋转矩阵,平移向量。 参数: - **num_residues** (int) - 氨基酸残基数量。 - **use_numpy** (bool) - 是否使用numpy计算,默认值: ``False``。 返回: 返回初始化后仿射变换结果 - 四元数 (tensor),shape为 :math:`(N_{res}, 4)` 。 - 旋转矩阵 (tuple) :math:`(xx, xy, xz, yx, yy, yz, zx, zy, zz)` ,每个元素shape为 :math:`(N_{res}, )` 。 - 平移向量 (tuple) :math:`(x, y, z)` ,每个元素shape为 :math:`(N_{res}, )` 。