Bio.PDB.alphafold_db module

A module for interacting with the AlphaFold Protein Structure Database.

See the database website and the API docs.

Bio.PDB.alphafold_db.get_predictions(qualifier: str) Iterator[dict]

Get all AlphaFold predictions for a UniProt accession.

Parameters:

qualifier (str) – A UniProt accession, e.g. P00520

Returns:

The AlphaFold predictions

Return type:

Iterator[dict]

Bio.PDB.alphafold_db.download_cif_for(prediction: dict, directory: str | bytes | PathLike | None = None) str

Download the mmCIF file for an AlphaFold prediction.

Downloads the file to the current working directory if no destination is specified.

Parameters:
  • prediction (dict) – An AlphaFold prediction

  • directory (Union[int, str, bytes, PathLike], optional) – The directory to write the mmCIF data to, defaults to the current working directory

Returns:

The path to the mmCIF file

Return type:

str

Bio.PDB.alphafold_db.get_structural_models_for(qualifier: str, mmcif_parser: MMCIFParser | None = None, directory: str | bytes | PathLike | None = None) Iterator[Structure]

Get the PDB structures for a UniProt accession.

Downloads the mmCIF files to the directory if they are not present.

Parameters:
  • qualifier (str) – A UniProt accession, e.g. P00520

  • mmcif_parser (MMCIFParser, optional) – The mmCIF parser to use, defaults to MMCIFParser()

  • directory (Union[int, str, bytes, PathLike], optional) – The directory to store the mmCIF data, defaults to the current working directory

Returns:

An iterator over the PDB structures

Return type:

Iterator[PDBStructure]