localpdb/PDBDownloader.py
def __gen__url(self, file_type='', version=None):
        """
        Generates download url for given file type based on the selected PDB mirror defined in the config file
        @param file_type: file type
        @return: url to download the file
        """
        root = self.config['url']
        proto = self.config['download_proto']
        if file_type in ['entries', 'entries_type', 'bundles', 'resolution', 'seqres']:
            ext = self.config['ftp_locs'][file_type]
            url = f'{proto}://{root}/{ext}'
        elif file_type in ['added', 'modified', 'obsolete']:
            ext = self.config['ftp_locs'][file_type]
            if version is None:
                raise ValueError('PDB version needs to be specified!')
            url = f'{proto}://{root}/{ext}/{version}/{file_type}.pdb'
        else:
            raise ValueError('Unknown file type, cannot generate download url!')
        return url

        Generates download url for given file type based on the selected PDB mirror defined in the config file
        @param file_type: file type
        @return: url to download the file
        
Generates download url for given file type based on the selected PDB mirror defined in the config file
Generates download url for given file type based on the selected PDB mirror defined in the config file
def __gen__url(self, file_type='', version=None):
        root = self.config['url']
        proto = self.config['download_proto']
        if file_type in ['entries', 'entries_type', 'bundles', 'resolution', 'seqres']:
            ext = self.config['ftp_locs'][file_type]
            url = f'{proto}://{root}/{ext}'
        elif file_type in ['added', 'modified', 'obsolete']:
            ext = self.config['ftp_locs'][file_type]
            if version is None:
                raise ValueError('PDB version needs to be specified!')
            url = f'{proto}://{root}/{ext}/{version}/{file_type}.pdb'
        else:
            raise ValueError('Unknown file type, cannot generate download url!')
        return url
def __gen__url ( self , file_type = '' , version = None ) : root = self . config [ 'url' ] proto = self . config [ 'download_proto' ] if file_type in [ 'entries' , 'entries_type' , 'bundles' , 'resolution' , 'seqres' ] : ext = self . config [ 'ftp_locs' ] [ file_type ] url = f'{proto}://{root}/{ext}' elif file_type in [ 'added' , 'modified' , 'obsolete' ] : ext = self . config [ 'ftp_locs' ] [ file_type ] if version is None : raise ValueError ( 'PDB version needs to be specified!' ) url = f'{proto}://{root}/{ext}/{version}/{file_type}.pdb' else : raise ValueError ( 'Unknown file type, cannot generate download url!' ) return url
Generates download url for given file type based on the selected PDB mirror defined in the config file
Generates download url for given file type based on the selected PDB mirror defined in the config file
"""
        Generates download url for given file type based on the selected PDB mirror defined in the config file
        @param file_type: file type
        @return: url to download the file
        """
url to download the file
url to download the file
self
file_type
None
version