drugforge.data.services.rcsb.rcsb_download.download_pdb_structure

drugforge.data.services.rcsb.rcsb_download.download_pdb_structure(pdb_id: str, directory: str | PathLike, file_format: str = 'pdb')[source]

Download a structure, using the specified format/type.

Copied with some changes from kinoml.databases.pdb.

Parameters:
  • pdb_id (str) – The PDB ID of interest.

  • directory (str or Path, default=user_cache_dir) – The directory for saving the downloaded structure.

  • file_format (str, default=”pdb”) – Indicates whether you would like to download the entry in pdb (“pdb”) or cif format (“cif”), or the first biological assembly in cif format (“cif1”). Defaults to “pdb”.

Returns:

file_path – The path to the downloaded file if successful, else False.

Return type:

Path or False