mkt.databases.alphafold

Client for retrieving AlphaFold structure predictions.

Provides AlphaFoldPrediction and AlphaFoldStructure, REST clients that fetch AlphaFold model metadata and downloadable structure files for a given UniProt accession.

Classes

AlphaFoldPrediction(uniprot_id[, url, ...])

Class to query the AlphaFold EBI prediction API for a given UniProt accession.

AlphaFoldStructure(uniprot_id[, url, ...])

Class to download the mmCIF file from the AlphaFold EBI server.

class mkt.databases.alphafold.AlphaFoldPrediction(uniprot_id: str, url: str = 'https://alphafold.ebi.ac.uk/api', headers: str = "{'Accept': 'application/json'}", _json: dict | None = None)[source]

Bases: RESTAPIClient

Class to query the AlphaFold EBI prediction API for a given UniProt accession.

Parameters:

uniprot_idstr

UniProt accession (e.g. “P00533”).

headers: str = "{'Accept': 'application/json'}"

Header for the API request.

query_api() None[source]

Query the AlphaFold prediction endpoint and populate _json.

Returns:

None

uniprot_id: str

UniProt accession to query.

url: str = 'https://alphafold.ebi.ac.uk/api'

Base URL for the AlphaFold EBI API.

class mkt.databases.alphafold.AlphaFoldStructure(uniprot_id: str, url: str = 'https://alphafold.ebi.ac.uk/api', headers: str = "{'Accept': 'application/json'}", _json: dict | None = None, _cif: str | None = None)[source]

Bases: AlphaFoldPrediction

Class to download the mmCIF file from the AlphaFold EBI server.

Inherits from AlphaFoldPrediction and uses the cifUrl from the prediction JSON to download and store the CIF content.

Parameters:

uniprot_idstr

UniProt accession (e.g. “P00533”).

_download_cif() None[source]

Download the mmCIF file from the cifUrl in the prediction JSON.

Returns:

None