WHATIF.py 文件源码

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

项目:ssbio 作者: SBRG 项目源码 文件源码
def UploadPDB(self, structure):
        """
        Uploads a structure to the Server.
        Allowed input format: Bio.PDB Structure object, PDB formatted string
        Returns id for future services.
        """

        if isinstance(structure, Entity): # SMCRA
            s = self._smcra_to_str(structure)

        elif isinstance(structure, str): # String
            s = structure

        else:
            raise ValueError('Unknown format. Use SMCRA object or string.')

        u = urllib.urlopen("http://www.cmbi.ru.nl/wiwsd/rest/UploadPDB", s)
        x = xml.dom.minidom.parse(u)

        id = x.getElementsByTagName("response")[0].childNodes[0].data

        return id
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号