> ## Documentation Index
> Fetch the complete documentation index at: https://proto.evodesign.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AlphaFold DB

> The [AlphaFold Protein Structure Database](https://alphafold.ebi.ac.uk/) is a public archive of protein structures predicted by [AlphaFold2](https://deepmind.google/science/alphafold/), maintained by Google DeepMind and EMBL-EBI and indexed by UniProt accession. The `alphafold-db-fetch` tool retrieves a single prediction record from the AlphaFold DB REST API, returning a parsed `Structure` (PLDDT B-factors, per-residue pLDDT and optional pAE on `structure.metrics`), the predicted sequence, organism and gene metadata, and the full JSON record. It runs on CPU and requires only network access.

<div class="page-hero"><img class="page-hero-banner" src="https://proto-bio.github.io/proto-assets/images/tool/alphafold_db/hero.png" alt="AlphaFold DB" /><div class="tool-org-badges page-hero-badges"><a href="/docs/tools/organizations/google-deepmind" class="tool-org-badge" style={{background: "#1a237e"}} title="Google DeepMind"><img src="https://mintcdn.com/bio-pro/_UGa2jUMKeVPCbLk/assets/images/cached/170f4f446634.png?fit=max&auto=format&n=_UGa2jUMKeVPCbLk&q=85&s=c925c2862540b2476392ff2a71a0dba8" alt="" class="tool-org-badge-logo" width="200" height="200" data-path="assets/images/cached/170f4f446634.png" /> Google DeepMind</a> <a href="/docs/tools/organizations/embl-ebi" class="tool-org-badge" style={{background: "#007C82"}} title="EMBL-EBI"><img src="https://mintcdn.com/bio-pro/UeudeF7pW-Dj-pIN/assets/images/cached/d6be4d3bc893.png?fit=max&auto=format&n=UeudeF7pW-Dj-pIN&q=85&s=3f3eaae432293c6ed9a25a58e369baa3" alt="" class="tool-org-badge-logo" width="200" height="200" data-path="assets/images/cached/d6be4d3bc893.png" /> EMBL-EBI</a></div></div>

<Note>
  **License:** AlphaFold DB retrieves data from the AlphaFold Protein Structure Database, distributed under CC-BY-4.0. Attribution to the AlphaFold Protein Structure Database is required when the data is redistributed. The client wrapper code is MIT-licensed. Please refer to [the data terms](https://alphafold.ebi.ac.uk/faq) for full terms.
</Note>

<p class="entity-disclaimer">Proto is not affiliated with Google DeepMind and EMBL-EBI. This toolkit is open source and builds on the implementations produced by these organizations. Product names, logos, and trademarks are the property of their respective owners.</p>

<hr class="entity-rule" />

<input type="radio" name="tab-alphafold-db" id="none-alphafold-db" class="tab-radio-input" />

<input type="radio" name="tab-alphafold-db" id="github-alphafold-db" class="tab-radio-input" defaultChecked />

<input type="radio" name="tab-alphafold-db" id="paper-alphafold-db" class="tab-radio-input" />

<input type="radio" name="tab-alphafold-db" id="cite-alphafold-db" class="tab-radio-input" />

<input type="radio" name="tab-alphafold-db" id="source-alphafold-db" class="tab-radio-input" />

<input type="radio" name="tab-alphafold-db" id="notebook-alphafold-db" class="tab-radio-input" />

<input type="radio" name="tab-alphafold-db" id="proto-alphafold-db" class="tab-radio-input" />

<div class="tool-tab-bar">
  <span class="tool-tab-wrap"><label for="github-alphafold-db" class="tool-tab tab-open badge-github"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> GitHub</label><label for="none-alphafold-db" class="tool-tab tab-close badge-github"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> GitHub</label></span> <span class="tool-tab-wrap"><label for="paper-alphafold-db" class="tool-tab tab-open badge-paper"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></svg> Publication</label><label for="none-alphafold-db" class="tool-tab tab-close badge-paper"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></svg> Publication</label></span> <span class="tool-tab-wrap"><label for="cite-alphafold-db" class="tool-tab tab-open badge-cite"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z" /><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z" /></svg> Cite</label><label for="none-alphafold-db" class="tool-tab tab-close badge-cite"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z" /><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z" /></svg> Cite</label></span> <span class="tool-tab-wrap"><label for="source-alphafold-db" class="tool-tab tab-open badge-source"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Tool Source</label><label for="none-alphafold-db" class="tool-tab tab-close badge-source"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Tool Source</label></span> <span class="tool-tab-wrap"><label for="notebook-alphafold-db" class="tool-tab tab-open badge-notebook"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" /><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" /></svg> Open as Notebook</label><label for="none-alphafold-db" class="tool-tab tab-close badge-notebook"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" /><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" /></svg> Open as Notebook</label></span> <span class="tool-tab-wrap"><label for="proto-alphafold-db" class="tool-tab tab-open badge-proto"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" /></svg> Open on Proto</label><label for="none-alphafold-db" class="tool-tab tab-close badge-proto"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" /></svg> Open on Proto</label></span>
</div>

<a href="https://github.com/google-deepmind/alphafold" target="_blank" class="tab-panel github-panel" data-tab="github-alphafold-db">
  <div class="gh-card-wrap">
    <img src="https://opengraph.githubassets.com/1/google-deepmind/alphafold" class="gh-card-img img-fallback" alt="google-deepmind/alphafold" />

    <div class="gh-card-fallback">
      <div class="gh-fallback-org"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> google-deepmind/alphafold</div>
    </div>
  </div>

  <span class="panel-goto-btn gh-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> View repo</span></span>
</a>

<a href="https://doi.org/10.1093/nar/gkab1061" target="_blank" class="tab-panel paper-panel" data-tab="paper-alphafold-db">
  <div class="paper-info">
    <div class="paper-title">AlphaFold Protein Structure Database: massively expanding the structural coverage of protein-sequence space with high-accuracy models</div>
    <div class="paper-meta">Mihaly Varadi, Stephen Anyango, ... Sameer Velankar</div>
    <div class="paper-meta paper-venue">Nucleic Acids Research (2022)</div>
  </div>

  <span class="panel-goto-btn pub-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></svg> Read paper</span></span>
</a>

<div class="tab-panel cite-panel" data-tab="cite-alphafold-db">
  <div class="cite-code-wrap">
    ```bibtex theme={null}
    @article{varadi2022alphafold,
      title={AlphaFold Protein Structure Database: massively expanding the structural coverage of protein-sequence space with high-accuracy models},
      author={Varadi, Mihaly and Anyango, Stephen and Deshpande, Mandar and Nair, Sreenath and Natassia, Cindy and Yordanova, Galabina and Yuan, David and Stroe, Oana and Wood, Gemma and Laydon, Agata and {\v{Z}}{\'\i}dek, Augustin and Green, Tim and Tunyasuvunakool, Kathryn and Petersen, Stig and Jumper, John and Clancy, Ellen and Green, Richard and Vora, Ankur and Lutfi, Mira and Figurnov, Michael and Cowie, Andrew and Hobbs, Nicole and Kohli, Pushmeet and Kleywegt, Gerard and Birney, Ewan and Hassabis, Demis and Velankar, Sameer},
      journal={Nucleic Acids Research},
      volume={50},
      number={D1},
      pages={D439--D444},
      year={2022},
      publisher={Oxford University Press},
      doi={10.1093/nar/gkab1061}
    }
    ```
  </div>

  <span class="panel-goto-btn cite-copy-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z" /><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z" /></svg> Copy citation</span></span>
</div>

<a href="https://github.com/evo-design/proto-tools/tree/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db" target="_blank" class="tab-panel source-panel" data-tab="source-alphafold-db">
  <div class="source-info">
    <img src="https://github.com/evo-design.png?size=40" class="source-avatar" width="36" height="36" />

    <span class="source-path">evo-design/proto-tools<span class="source-subpath">/proto\_tools/tools/database\_retrieval/alphafold\_db</span></span>
  </div>

  <span class="panel-goto-btn source-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> View source</span></span>
</a>

<a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db/examples/example.ipynb" target="_blank" class="tab-panel notebook-panel" data-tab="notebook-alphafold-db">
  <div class="notebook-info">
    <span class="notebook-icon">
      <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
        <path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />

        <path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
      </svg>
    </span>

    <span class="notebook-label">Open Notebook</span>
  </div>

  <span class="panel-goto-btn notebook-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" /><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" /></svg> Open notebook</span></span>
</a>

<div class="tab-panel proto-panel" data-tab="proto-alphafold-db">
  <div class="proto-info">
    <div class="proto-cloud">
      <svg class="proto-cloud-bg" viewBox="0 0 640 512" xmlns="http://www.w3.org/2000/svg">
        <path d="M0 336c0 79.5 64.5 144 144 144H512c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z" />
      </svg>

      <img noZoom src="https://mintcdn.com/bio-pro/KVh0EKV-IKblvXR8/assets/logo/evo-logo-light.svg?fit=max&auto=format&n=KVh0EKV-IKblvXR8&q=85&s=0cb66034ba45618505501aee6ea5f5c1" class="proto-panel-logo block dark:hidden" alt="Proto" width="198" height="151" data-path="assets/logo/evo-logo-light.svg" />

      <img noZoom src="https://mintcdn.com/bio-pro/KVh0EKV-IKblvXR8/assets/logo/evo-logo-dark.svg?fit=max&auto=format&n=KVh0EKV-IKblvXR8&q=85&s=2c9e23a14635e60384a434e220788f54" class="proto-panel-logo hidden dark:block" alt="Proto" width="198" height="151" data-path="assets/logo/evo-logo-dark.svg" />
    </div>
  </div>

  <div class="proto-actions">
    <a href="https://proto.evodesign.org/tools/alphafold-db-fetch" target="_blank" class="proto-action-btn"><span>AlphaFold DB Fetch</span><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7" /><polyline points="7 7 17 7 17 17" /></svg></a>
  </div>
</div>

<div class="entity-contributors"><span class="entity-contributors-label">Toolkit contributors</span><span class="entity-contributors-people"><a class="entity-contributor" href="https://github.com/bviggiano" target="_blank" rel="noopener" title="bviggiano: 11 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/21143637?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">bviggiano</span></a><a class="entity-contributor" href="https://github.com/dguo8412" target="_blank" rel="noopener" title="dguo8412: 10 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/46211285?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">dguo8412</span></a><a class="entity-contributor" href="https://github.com/leba01" target="_blank" rel="noopener" title="leba01: 1 commit"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/124846286?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">leba01</span></a></span></div>

| Function                   | Description                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| -------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_alphafold_db_fetch()` | Fetch predicted structure (PDB/mmCIF), per-residue pLDDT, and PAE matrix from the AlphaFold Prote... | <a href="#api-run-alphafold-db-fetch" class="func-table-btn func-api-btn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" /></svg> Docs</a> <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db/alphafold_db_fetch.py#L359" target="_blank" class="func-table-btn func-source-btn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a> |

## Background

The AlphaFold Protein Structure Database (AFDB) ([Varadi et al., 2022](https://doi.org/10.1093/nar/gkab1061)) is a freely accessible archive of protein structures predicted by AlphaFold2 (Jumper et al., 2021), maintained by [Google DeepMind](https://deepmind.google/) and [EMBL-EBI](https://www.ebi.ac.uk/). It hosts predicted atomic coordinates for the UniProt reference proteomes. Each entry carries a per-residue confidence score (pLDDT, 0 to 100) and a pairwise predicted aligned error (pAE) matrix in angstroms. AFDB hosts AlphaFold2 single-chain predictions only. Multi-chain complexes are produced by separate pipelines and are not part of this database.

Internally, the tool issues a GET request to the AFDB prediction endpoint at `https://alphafold.ebi.ac.uk/api/prediction/{accession}`, which returns a JSON list of prediction records. It selects the canonical record (`AF-{accession}-F1`) by default, or the record matching the requested isoform, then follows the URLs carried in that record: `pdbUrl` or `cifUrl` for the structure body, `plddtDocUrl` for the per-residue pLDDT array, `paeDocUrl` for the pAE matrix, and `msaUrl` for the input multiple-sequence alignment (an A3M file). The mean pLDDT is read from the record's `globalMetricValue` field. Records and their provenance come directly from the official AlphaFold DB REST API. Results reflect the live database, which always serves the latest version of each prediction.

### Learning Resources

* [AlphaFold DB FAQ](https://alphafold.ebi.ac.uk/faq) (EMBL-EBI) - official guidance on coverage, confidence interpretation, versioning, and downloads.
* [AlphaFold DB API documentation](https://alphafold.ebi.ac.uk/api-docs) (EMBL-EBI) - the REST API specification for prediction records and artifact URLs.
* [AlphaFold Protein Structure Database](https://www.ebi.ac.uk/training/online/courses/alphafold/) (EMBL-EBI Training) - a guided introduction to the database and how to interpret its predictions.

## Tools

<a name="api-run-alphafold-db-fetch" />

<div class="tool-section-card tool-section-card--fetch">
  ### AlphaFold DB Fetch (`alphafold-db-fetch`)

  Retrieves a single AlphaFold DB prediction record by UniProt accession and returns the predicted sequence and its 1-indexed coordinates, gene and organism metadata, mean pLDDT, the AFDB artifact URLs, the full JSON record, and an optional parsed `Structure` carrying per-residue pLDDT and optional pAE on `structure.metrics`.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db/alphafold_db_fetch.py#L42" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a>

    <Accordion title="Input: AlphaFoldDBFetchInput">
      <ParamField path="uniprot_id" type="string" required>
        UniProt accession to look up (e.g. 'P04637').
      </ParamField>

      <ParamField path="isoform" type="integer">
        Isoform number to select from the multi-record AFDB response. `None` (default) returns the canonical entry (`AF-{accession}-F1`); `2` selects `AF-{accession}-2-F1`, etc. AFDB typically exposes isoforms 2-9 for human proteins. Raises `ValueError` if the requested isoform doesn't exist.
      </ParamField>
    </Accordion>
  </div>

  <div class="api-model-section api-config-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db/alphafold_db_fetch.py#L63" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a>

    <Accordion title="Config: AlphaFoldDBFetchConfig">
      <ParamField path="structure_format" type="enum" default="pdb">
        Structure file format.

        Available options: `pdb`, `cif`
      </ParamField>

      <ParamField path="include_structure" type="boolean" default="True">
        If True (default), fetch the structure body and the per-residue pLDDT array, returning a parsed `Structure` on the output. Set to False for metadata-only probes (URLs, mean pLDDT, gene, sequence) — saves \~100-500 KB per call, meaningful for batch sweeps.
      </ParamField>

      <ParamField path="include_pae" type="boolean" default="False">
        If True, also fetch the PAE (predicted aligned error) matrix and attach it to `output.structure.metrics["pae"]`. Disabled by default — PAE files can be tens of MB for long proteins. No-op when `include_structure=False`.
      </ParamField>

      <ParamField path="include_msa" type="boolean" default="False">
        If True, fetch the A3M MSA used as input to the AlphaFold prediction. Disabled by default — A3M files can be hundreds of KB to several MB for highly conserved proteins.
      </ParamField>

      <ParamField path="verbose" type="integer" default="0">
        Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). `True` is coerced to `1` and `False` to `0`.
      </ParamField>

      <ParamField path="device" type="string" default="cpu">
        Device to run the tool on.
      </ParamField>

      <ParamField path="timeout" type="integer" default="3600">
        Maximum execution time in seconds. `None` waits indefinitely.
      </ParamField>

      <ParamField path="seed" type="integer">
        Random seed. When set, tools run reproducibly up to small GPU float noise (see `BaseToolOutput.approx_equal`), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
      </ParamField>
    </Accordion>
  </div>

  <div class="api-model-section api-output-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db/alphafold_db_fetch.py#L148" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a>

    <Accordion title="Output: AlphaFoldDBFetchOutput">
      <ResponseField name="uniprot_accession" type="string" required>
        Primary UniProt accession that was looked up.
      </ResponseField>

      <ResponseField name="entry_id" type="string" required>
        AlphaFold entry identifier (e.g. 'AF-P04637-F1').
      </ResponseField>

      <ResponseField name="gene" type="string">
        Gene symbol from the AlphaFold record.
      </ResponseField>

      <ResponseField name="organism_scientific_name" type="string">
        Source organism scientific name.
      </ResponseField>

      <ResponseField name="tax_id" type="integer">
        NCBI taxonomy ID.
      </ResponseField>

      <ResponseField name="sequence" type="string" required>
        Amino-acid sequence covered by the prediction.
      </ResponseField>

      <ResponseField name="sequence_length" type="integer" required>
        Length of the predicted sequence.
      </ResponseField>

      <ResponseField name="sequence_start" type="integer" required>
        1-indexed start residue of the prediction (relative to the full UniProt sequence; >1 only for non-first fragments of very long proteins).
      </ResponseField>

      <ResponseField name="sequence_end" type="integer" required>
        1-indexed inclusive end residue of the prediction.
      </ResponseField>

      <ResponseField name="latest_version" type="integer" required>
        Latest version of the AlphaFold DB prediction (this is the version of the served prediction; AlphaFold DB always serves the latest).
      </ResponseField>

      <ResponseField name="model_created_date" type="string">
        ISO 8601 timestamp when this prediction was generated.
      </ResponseField>

      <ResponseField name="mean_plddt" type="number">
        Mean per-residue pLDDT for the prediction (AlphaFold DB's globalMetricValue field). Always populated from the metadata response, regardless of `include_structure`; when `include_structure=True` it is also mirrored at `structure.metrics["avg_plddt"]`.
      </ResponseField>

      <ResponseField name="pdb_url" type="string" required>
        URL to the PDB structure file on AlphaFold DB.
      </ResponseField>

      <ResponseField name="cif_url" type="string" required>
        URL to the mmCIF structure file on AlphaFold DB.
      </ResponseField>

      <ResponseField name="bcif_url" type="string">
        URL to the BinaryCIF structure file; `None` on legacy entries that predate the bcif export.
      </ResponseField>

      <ResponseField name="pae_doc_url" type="string" required>
        URL to the PAE JSON document on AlphaFold DB.
      </ResponseField>

      <ResponseField name="plddt_doc_url" type="string" required>
        URL to the per-residue pLDDT JSON document on AlphaFold DB.
      </ResponseField>

      <ResponseField name="pae_image_url" type="string" required>
        URL to the rendered PAE PNG on AlphaFold DB.
      </ResponseField>

      <ResponseField name="msa_url" type="string">
        URL to the MSA A3M used for prediction, when present.
      </ResponseField>

      <ResponseField name="am_annotations_url" type="string">
        AlphaMissense pathogenicity CSV URL (sequence coords); None for non-human or unscored entries.
      </ResponseField>

      <ResponseField name="am_annotations_hg19_url" type="string">
        AlphaMissense annotations on GRCh37.
      </ResponseField>

      <ResponseField name="am_annotations_hg38_url" type="string">
        AlphaMissense annotations on GRCh38.
      </ResponseField>

      <ResponseField name="sequence_checksum" type="string">
        CRC64 checksum of the predicted sequence.
      </ResponseField>

      <ResponseField name="structure" type="Structure">
        Parsed AlphaFold structure (PDB or mmCIF body in `structure_format`, `b_factor_type=BFactorType.PLDDT`) with an :class:`AlphaFoldDBMetrics` `metrics` container carrying `avg_plddt`, `plddt_per_residue`, and (when `include_pae=True`) `pae`. None when `include_structure=False`.
      </ResponseField>

      <ResponseField name="msa_a3m" type="string">
        A3M-format MSA contents used as input to the AlphaFold prediction. None when `include_msa` is False or when the entry has no associated MSA URL.
      </ResponseField>

      <ResponseField name="source_url" type="string" required>
        AlphaFold DB API URL used for the metadata lookup.
      </ResponseField>

      <ResponseField name="raw_entry" type="Dict[string, any]">
        Complete AlphaFold DB JSON record for advanced programmatic access.
      </ResponseField>

      **Metrics**

      | Metric              | Type                | Range        | Availability           |
      | ------------------- | ------------------- | ------------ | ---------------------- |
      | `avg_plddt`         | float               | 0.0 to 100.0 | always                 |
      | `plddt_per_residue` | list\[float]        | 0.0 to 100.0 | always                 |
      | `pae`               | list\[list\[float]] | ≥ 0.0        | when include\_pae=True |
    </Accordion>
  </div>

  #### Applications

  Use this to pull an AlphaFold-predicted structure into a pipeline when no experimental entry is needed: fetch a target by accession before inverse folding, docking, or binder design, screen accessions for AFDB coverage with metadata-only requests, or assess per-residue and pairwise confidence before structure-based work. The returned `Structure` feeds directly into structure-consuming tools such as TM-align, US-align, and structure scoring. The [UniProt](https://bio-pro.mintlify.app/tools/database-retrieval/uniprot) tool supplies the UniProt accession from a gene name and organism, and the [PDB](https://bio-pro.mintlify.app/tools/database-retrieval/pdb) tool provides the experimental counterpart when one exists.

  #### Usage Tips

  * **Coverage is broad but not universal.** When AFDB has no prediction for an accession the tool raises `ValueError`. Catch that error and fall back to predicting the structure from sequence.
  * **A high `mean_plddt` can hide locally unreliable regions.** Inspect the per-residue pLDDT on `structure.metrics` before trusting any specific residue.
  * **`latest_version` advances when AFDB refreshes a prediction.** Cache it alongside any structure you persist and refetch when it moves past the cached value.
  * **Multiple records signal isoforms or fragments.** The canonical record is selected by default and a warning lists the alternatives. To select a non-canonical isoform, pass the `isoform` input, and check `entry_id`, `sequence_start`, and `sequence_end` to confirm which record was returned.
  * **Low-confidence regions are usually real disorder, not a prediction error.** Disordered or flexibly linked regions get very low per-residue confidence (pLDDT) and high predicted aligned error (pAE) between regions because they have no single fixed shape. Find those residue ranges from the per-residue pLDDT array and trim or down-weight just those residues. Do not throw away the whole prediction, because the confident domains are still reliable.
</div>

## Toolkit Notes

These apply to every AlphaFold DB tool in this toolkit (`alphafold-db-fetch`).

* **Requires network access.** The tool calls the live AlphaFold DB REST API. It does not run offline and keeps no local copy of the database.
* **Subject to AlphaFold DB rate limits.** The EMBL-EBI API is unauthenticated and applies per-IP fair-use limits ([EMBL-EBI Terms of Use](https://www.ebi.ac.uk/about/terms-of-use/)). Space out high-volume requests.

<Tip>
  **Example notebook:** See the [full working example](https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/database_retrieval/alphafold_db/examples/example.ipynb) for a copy-paste-ready walkthrough.
</Tip>

## Infrastructure Guides

The following guides cover how to run tools efficiently and at scale.

<CardGroup cols={2}>
  <Card title="Tool Persistence" icon="repeat" href="/docs/tools/guides/tool-persistence">Keep a tool's model warm across calls instead of reloading it every invocation.</Card>
  <Card title="Device Management" icon="cpu" href="/docs/tools/guides/device-management">How GPUs are allocated to tools and how to target specific devices.</Card>
  <Card title="Parallel Execution" icon="layers" href="/docs/tools/guides/parallel-execution">Fan a batch of inputs out across multiple GPUs.</Card>
</CardGroup>
