helix.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:isambard 作者: woolfson-group 项目源码 文件源码
def rotate_monomers(self, angle, radians=False):
        """ Rotates each Residue in the Polypeptide.

        Notes
        -----
        Each monomer is rotated about the axis formed between its
        corresponding primitive `PseudoAtom` and that of the 
        subsequent `Monomer`.

        Parameters
        ----------
        angle : float
            Angle by which to rotate each monomer.
        radians : bool
            Indicates whether angle is in radians or degrees.
        """
        if radians:
            angle = numpy.rad2deg(angle)
        for i in range(len(self.primitive) - 1):
            axis = self.primitive[i + 1]['CA'] - self.primitive[i]['CA']
            point = self.primitive[i]['CA']._vector
            self[i].rotate(angle=angle, axis=axis, point=point)
        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号