mkt.databases.alphafold.AlphaFoldStructure

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”).

__init__(*args: Any, **kwargs: Any) None

Methods

__eq__(other)

Return self==value.

__post_init__()

_download_cif()

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

_stamp_from_response(res)

Record query datetime + cache provenance from a requests-cache response.

_stamp_now()

Record current UTC datetime; cache provenance unknown.

check_response(res)

Check the response status code for errors.

query_api()

Query the AlphaFold prediction endpoint and populate _json.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

__pydantic_config__

_cif

mmCIF file content downloaded from AlphaFold.

_json

JSON response from the AlphaFold API.

from_cache

Whether the most recent response was served from requests-cache.

headers

Header for the API request.

query_datetime

UTC datetime the underlying network query was made (cache creation time if served from cache).

url

Base URL for the AlphaFold EBI API.

uniprot_id

UniProt accession to query.

_download_cif() None[source]

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

Returns:

None