WHATIF.py 文件源码

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

项目:ssbio 作者: SBRG 项目源码 文件源码
def _smcra_to_str(self, smcra, temp_dir='/tmp/'):
        """
        WHATIF's input are PDB format files.
        Converts a SMCRA object to a PDB formatted string.
        """

        temp_path = tempfile.mktemp( '.pdb', dir=temp_dir )

        io = PDBIO()
        io.set_structure(smcra)
        io.save(temp_path)

        f = open(temp_path, 'r')
        string = f.read()
        f.close()

        os.remove(temp_path)

        return string
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号