> ## 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.

# AlphaFold2

> AlphaFold2 (AF2) is Google DeepMind's second-generation AlphaFold, widely regarded as the first method to predict protein structures from sequence at near-experimental accuracy. This toolkit runs AF2 through [ColabDesign](https://github.com/sokrypton/ColabDesign), the open-source JAX implementation from [Sergey Ovchinnikov's group](https://www.solab.org/), to predict 3D structures of proteins and complexes and to score and differentiate binders against a fixed target.

<div class="page-hero"><img class="page-hero-banner" src="https://proto-bio.github.io/proto-assets/images/tool/alphafold2/hero.png" alt="AlphaFold2" /><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></div></div>

<Note>
  **License:** AlphaFold2 uses Apache-2.0 for code and CC-BY-4.0 for model weights and may require explicit attribution when utilized. Please refer to the [code license](https://github.com/google-deepmind/alphafold/blob/main/LICENSE) and [model weights license](https://github.com/google-deepmind/alphafold#model-parameters-license) for full terms.
</Note>

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

<hr class="entity-rule" />

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

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

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

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

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

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

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

<div class="tool-tab-bar">
  <span class="tool-tab-wrap"><label for="github-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2" 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-alphafold2">
  <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.1038/s41586-021-03819-2" target="_blank" class="tab-panel paper-panel" data-tab="paper-alphafold2">
  <div class="paper-info">
    <div class="paper-title">Highly accurate protein structure prediction with AlphaFold</div>
    <div class="paper-meta">John Jumper, Richard Evans, ... Anna Potapenko</div>
    <div class="paper-meta paper-venue">Nature (2021)</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-alphafold2">
  <div class="cite-code-wrap">
    ```bibtex theme={null}
    @article{jumper2021alphafold2,
      title={Highly accurate protein structure prediction with AlphaFold},
      author={Jumper, John and Evans, Richard and Pritzel, Alexander and Green, Tim and Figurnov, Michael and Ronneberger, Olaf and Tunyasuvunakool, Kathryn and Bates, Russ and {\v{Z}}{\'\i}dek, Augustin and Potapenko, Anna and others},
      journal={Nature},
      volume={596},
      number={7873},
      pages={583--589},
      year={2021},
      publisher={Nature Publishing Group},
      doi={10.1038/s41586-021-03819-2}
    }
    ```
  </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/structure_prediction/alphafold2" target="_blank" class="tab-panel source-panel" data-tab="source-alphafold2">
  <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/structure\_prediction/alphafold2</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/structure_prediction/alphafold2/examples/example.ipynb" target="_blank" class="tab-panel notebook-panel" data-tab="notebook-alphafold2">
  <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-alphafold2">
  <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/alphafold2-gradient" target="_blank" class="proto-action-btn"><span>AlphaFold2 Gradient</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>
    <a href="https://proto.evodesign.org/tools/alphafold2-prediction" target="_blank" class="proto-action-btn"><span>AlphaFold2 Structure Prediction</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/dguo8412" target="_blank" rel="noopener" title="dguo8412: 46 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/bviggiano" target="_blank" rel="noopener" title="bviggiano: 38 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/brianhie" target="_blank" rel="noopener" title="brianhie: 3 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/6365340?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">brianhie</span></a><a class="entity-contributor" href="https://github.com/leba01" target="_blank" rel="noopener" title="leba01: 3 commits"><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><a class="entity-contributor" href="https://github.com/adititm" target="_blank" rel="noopener" title="adititm: 1 commit"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/61667248?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">adititm</span></a></span></div>

| Function                    | Description                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_alphafold2_gradient()` | Differentiable AlphaFold2 scoring of a binder against a fixed target. Returns loss, Structure, an... (GPU) | <a href="#api-run-alphafold2-gradient" 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/structure_prediction/alphafold2/alphafold2_gradient.py#L381" 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> |
| `run_alphafold2()`          | Protein structure prediction using AlphaFold2 via ColabDesign (GPU)                                        | <a href="#api-run-alphafold2" 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/structure_prediction/alphafold2/alphafold2.py#L262" 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

AlphaFold2 ([Jumper et al., 2021](https://doi.org/10.1038/s41586-021-03819-2)) predicts a protein's 3D structure from its amino-acid sequence, and was introduced at the CASP14 structure-prediction assessment in 2020. AF2 takes a multiple-sequence alignment (MSA) as a primary input. The MSA carries an evolutionary signal: residues that lie close together in the folded structure tend to mutate in a correlated way across related proteins. AF2 reads these covariation patterns to infer which parts of the chain are in contact. Because the signal comes from the alignment itself, accuracy scales with the depth and diversity of the MSA, and proteins with few detectable homologs are harder to fold.

Internally, AlphaFold2 maintains two representations: an MSA representation and a pairwise representation over residue pairs. The Evoformer network repeatedly exchanges information between the two, using attention together with triangle-based updates on the pairwise representation that enforce geometric consistency among the inferred residue-residue distances. A structure module then turns these representations into an explicit 3D model, placing each residue as a rigid backbone frame with its own position and orientation. This whole process is recycled through the network several times, each pass refining the previous prediction. Along with the coordinates, AlphaFold2 emits two calibrated confidence measures: the per-residue predicted local distance difference test (pLDDT), which scores the model's confidence in each residue's local structure, and the predicted aligned error (PAE), which estimates the expected error in one residue's position when the structure is aligned on another.

This toolkit runs the original AlphaFold2 model through the [ColabDesign](https://github.com/sokrypton/ColabDesign) JAX implementation rather than the full DeepMind or ColabFold pipeline. There is no template-search stage, and multiple-sequence alignments are optional: they can be generated by a ColabFold search, supplied precomputed, or skipped to run in single-sequence mode. Beyond folding, the same model exposes a per-residue gradient, which gradient-based binder-design methods use to optimize a binder sequence against a frozen target.

### Learning Resources

* [AlphaFold: a solution to a 50-year-old grand challenge in biology](https://deepmind.google/discover/blog/alphafold-a-solution-to-a-50-year-old-grand-challenge-in-biology/) (Google DeepMind) - a general-audience blog post explaining the protein-folding problem and how AlphaFold2 approaches it, published alongside the CASP14 result.

## Tools

<a name="api-run-alphafold2" />

<div class="tool-section-card tool-section-card--predict">
  ### AlphaFold2 Structure Prediction (`alphafold2-prediction`)

  Predicts the 3D structure of one or more protein chains. Each input complex (a single chain, or several chains folded together) is run through the ColabDesign AlphaFold2 model, returning a predicted `Structure` per complex with confidence metrics: per-residue pLDDT, pTM, interface pTM for multi-chain complexes, and predicted aligned error.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/structure_prediction/alphafold2/alphafold2.py#L36" 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: AlphaFold2Input">
      <ParamField path="complexes" type="List[Complex]" required>
        List of complexes to predict structures for. Inherited from `StructurePredictionInput`. Each complex can contain one or more protein chains.

        <Expandable title="Complex">
          <ParamField path="chains" type="List[Chain | Fragment]" required>
            Chains in the complex, in input order.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="msas" type="array">
        Pre-computed MSAs, one entry per complex. Each entry is a `ComplexMSAs` (per-chain MSAs keyed by chain index); `paired=True` marks rows taxonomy-aligned across chains. Populated by preprocess() or supplied directly.
      </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/structure_prediction/alphafold2/alphafold2.py#L157" 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: AlphaFold2Config">
      <ParamField path="num_recycles" type="integer" default="3">
        Number of recycling iterations through the model. Higher values can improve accuracy at the cost of computation time.
      </ParamField>

      <ParamField path="model_num" type="integer" default="1">
        Which AlphaFold2 model parameter set to use (1-5). AF2 ships 5 independently trained parameter sets. Different sets can produce different predictions. Mutually exclusive with `num_ensemble_models > 1`; set one or the other. Default: 1.
      </ParamField>

      <ParamField path="num_ensemble_models" type="integer" default="1">
        Number of model parameter sets to run and average. Running multiple models and averaging their outputs can improve prediction quality at the cost of increased computation time. Mutually exclusive with `model_num`; when ensembling, models are selected from the full pool (models 1 through N). Range: 1-5. Default: 1.
      </ParamField>

      <ParamField path="verbose" type="integer" default="0">
        Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). Inherited from `BaseConfig`. Default: `0`.
      </ParamField>

      <ParamField path="device" type="string" default="cuda">
        Device to run the model on (`"cuda"`, `"cpu"`). Inherited from `StructurePredictionConfig`. Default: `"cuda"`.
      </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>

      <ParamField path="include_pae_matrix" type="boolean" default="False">
        Inherited. Default: `False`.
      </ParamField>

      <ParamField path="use_msa" type="boolean" default="True">
        Whether to generate and use Multiple Sequence Alignments (MSAs) for protein chains using MMseqs2 homology search. Supplied MSAs are always used and override `use_msa=False`. Inherited from `MSAStructurePredictionConfig`. Default: `True`.
      </ParamField>

      <ParamField path="msa_search_config" type="Mmseqs2HomologySearchConfig">
        Configuration for MMseqs2 homology search (MSA generation). Only used when `use_msa=True`. Inherited from `MSAStructurePredictionConfig`. Default: `None`.
      </ParamField>

      <ParamField path="pair_heterocomplex_msas" type="boolean" default="True">
        Whether heterocomplex protein chains should use taxonomy-paired MSA generation. Inherited from `MSAStructurePredictionConfig`. Default: `True`.
      </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/structure_prediction/alphafold2/alphafold2.py#L147" 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: AlphaFold2Output">
      <ResponseField name="structures" type="List[Structure]" required>
        Predicted structures, each carrying an :class:`AlphaFold2Metrics` instance on `.metrics`.

        <Expandable title="Structure">
          <ResponseField name="structure" type="string" required>
            Raw structure content in PDB or CIF format.
          </ResponseField>

          <ResponseField name="structure_format" type="string">
            Format of the content string (auto-detected if omitted).
          </ResponseField>

          <ResponseField name="b_factor_type" type="BFactorType">
            What the B-factor column represents.
          </ResponseField>

          <ResponseField name="source" type="string">
            Optional source identifier (filepath or tool name).
          </ResponseField>

          <ResponseField name="metrics" type="Metrics">
            Associated metrics (e.g., pLDDT, pTM scores, per-chain lists, pairwise matrices). None values are stripped at construction.
          </ResponseField>
        </Expandable>
      </ResponseField>

      **Metrics** (one set per `structures` item)

      | Metric      | Type                | Range      | Availability                   |
      | ----------- | ------------------- | ---------- | ------------------------------ |
      | `avg_plddt` | float               | 0.0 to 1.0 | always                         |
      | `ptm`       | float               | 0.0 to 1.0 | always                         |
      | `iptm`      | float               | 0.0 to 1.0 | multi-chain input only         |
      | `avg_pae`   | float               | ≥ 0.0      | always                         |
      | `pae`       | list\[list\[float]] | ≥ 0.0      | when include\_pae\_matrix=True |
    </Accordion>
  </div>

  #### Applications

  This tool folds a protein sequence into a 3D model for structural analysis, docking, or as input to downstream structure tools. Running it on a multi-chain complex additionally estimates how confidently the chains are placed relative to each other through the interface pTM and PAE, which is informative for assessing predicted protein-protein interfaces.

  #### Usage Tips

  * **`use_msa` defaults to `True`.** An MSA is then generated by a ColabFold search for each protein chain; set it `False` for single-sequence prediction (faster, usually lower accuracy), or attach precomputed MSAs to the input to skip the search.
  * **`model_num` and `num_ensemble_models` are mutually exclusive.** `model_num` (default `1`) selects one of AlphaFold2's five trained parameter sets; `num_ensemble_models` runs several and averages them for higher accuracy at higher cost. Setting both raises an error.
  * **Confidence is reported as pLDDT, pTM, ipTM, and PAE.** Average pLDDT (0 to 1) is the primary per-structure quality metric; ipTM is populated only for multi-chain complexes. Set `include_pae_matrix` to attach the full per-residue PAE matrix.
  * **Protein sequences only.** DNA, RNA, and ligands are not supported; `X` is allowed for unknown residues.

  <a name="api-run-alphafold2-gradient" />
</div>

<div class="tool-section-card tool-section-card--gradient">
  ### AlphaFold2 Gradient (`alphafold2-gradient`)

  Scores and differentiates a binder against a frozen target structure. Given a target-plus-binder template, it runs AlphaFold2 (through ColabDesign's binder-design path) on the binder against the fixed target and returns the design loss, the predicted `Structure`, and, by default, the gradient of the loss with respect to the binder sequence logits.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/structure_prediction/alphafold2/alphafold2_gradient.py#L58" 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: AlphaFold2GradientInput">
      <ParamField path="target_pdb" type="Structure" required>
        Target+binder template PDB. Accepts a file path, raw PDB/CIF content string, `Structure` object, or a dict in the shape produced by `Structure.model_dump(mode='json')`.

        <Expandable title="Structure">
          <ParamField path="structure" type="string" required>
            Raw structure content in PDB or CIF format.
          </ParamField>

          <ParamField path="structure_format" type="string">
            Format of the content string (auto-detected if omitted).
          </ParamField>

          <ParamField path="b_factor_type" type="BFactorType" default="unspecified">
            What the B-factor column represents.
          </ParamField>

          <ParamField path="source" type="string">
            Optional source identifier (filepath or tool name).
          </ParamField>

          <ParamField path="metrics" type="Metrics">
            Associated metrics (e.g., pLDDT, pTM scores, per-chain lists, pairwise matrices). None values are stripped at construction.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="target_chain" type="string" default="A">
        Chain ID(s) of the frozen target in the PDB.
      </ParamField>

      <ParamField path="target_hotspot" type="string">
        Comma-separated hotspot residue indices on the target.
      </ParamField>

      <ParamField path="binder_chain" type="string">
        Binder template chain to redesign; None (default) designs de novo.
      </ParamField>

      <ParamField path="design_positions" type="array">
        Zero-based binder residue indices for loss focus (e.g. CDR loops). Germinal backend only.
      </ParamField>

      <ParamField path="logits" type="List[array]" required>
        Inherited — relaxed sequence logits (L x 20).
      </ParamField>

      <ParamField path="temperature" type="number" default="1.0">
        Inherited — softmax temperature.
      </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/structure_prediction/alphafold2/alphafold2_gradient.py#L122" 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: AlphaFold2GradientConfig">
      <ParamField path="include_pae_matrix" type="boolean" default="False">
        Attach full per-residue PAE matrix. Default: `False`.
      </ParamField>

      <ParamField path="bias_redesign" type="number">
        Persistent softmax bias toward wildtype at non-design positions. Germinal backend only.
      </ParamField>

      <ParamField path="omit_aas" type="array">
        Amino acids to ban (e.g. `["C", "W"]`).
      </ParamField>

      <ParamField path="num_recycles" type="integer" default="3">
        AF2 recycling iterations.
      </ParamField>

      <ParamField path="recycle_mode" type="enum" default="last">
        Which recycle's output is used for loss/gradient. `"last"` matches Germinal's VHH default; `"average"` averages across recycles; `"sample"` picks one uniformly; `"first"` uses only recycle 0.

        Available options: `last`, `sample`, `average`, `first`
      </ParamField>

      <ParamField path="model_num" type="integer" default="1">
        AF2 parameter set (1-5).
      </ParamField>

      <ParamField path="sample_models" type="boolean" default="False">
        Randomly sample model sets each forward pass.
      </ParamField>

      <ParamField path="use_multimer" type="boolean" default="True">
        Use AlphaFold multimer parameters for binder protocol.
      </ParamField>

      <ParamField path="rm_target_seq" type="boolean" default="True">
        Mask target template sequence in `prep_inputs`.
      </ParamField>

      <ParamField path="rm_target_sc" type="boolean" default="False">
        Mask target template side chains in `prep_inputs`.
      </ParamField>

      <ParamField path="rm_template_ic" type="boolean" default="True">
        Mask inter-chain template contacts in `prep_inputs`.
      </ParamField>

      <ParamField path="soft" type="number" default="1.0">
        ColabDesign softmax blending (0=raw logits, 1=full softmax). Passed per-step by the gradient optimizer.
      </ParamField>

      <ParamField path="hard" type="number" default="0.0">
        ColabDesign hard-sequence blending (0=relaxed, 1=straight-through argmax).
      </ParamField>

      <ParamField path="backend" type="enum" default="base">
        `"base"` (upstream ColabDesign) or `"germinal"` (Germinal fork with alpha, bias, framework contacts, extension losses).

        Available options: `base`, `germinal`
      </ParamField>

      <ParamField path="compute_gradient" type="boolean" default="True">
        Run backward pass and return gradient; `False` for forward-only scoring (returns `gradient=None`).
      </ParamField>

      <ParamField path="starting_binder_seq" type="string">
        Optional one-letter AA string used to seed the binder before gradient updates. Germinal backend only; length must equal `len(logits)`.
      </ParamField>

      <ParamField path="loss_weights" type="Dict[string, number]">
        Binder-objective weights. Base keys: plddt, i\_plddt, pae, i\_pae, con, i\_con, exp\_res, rmsd, dgram\_cce, fape. Germinal extension keys: rg, i\_ptm, NC, helix, beta\_strand.
      </ParamField>

      <ParamField path="intra_contact_num" type="integer" default="2">
        Intra-chain contacts per residue.
      </ParamField>

      <ParamField path="intra_contact_cutoff" type="number" default="14.0">
        Intra-chain distance cutoff (Å).
      </ParamField>

      <ParamField path="inter_contact_num" type="integer" default="1">
        Interface contacts per residue.
      </ParamField>

      <ParamField path="inter_contact_cutoff" type="number" default="21.6875">
        Interface distance cutoff (Å).
      </ParamField>

      <ParamField path="framework_contact_offset" type="number" default="1.0">
        Framework contact penalty offset in the Germinal inter-chain contact loss. Germinal backend only.
      </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="cuda">
        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/structure_prediction/alphafold2/alphafold2_gradient.py#L316" 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: AlphaFold2GradientOutput">
      <ResponseField name="structure" type="Structure" required>
        Predicted target+binder complex from the forward pass. B-factors are at the raw 0-100 PDB scale; `b_factor_type=PLDDT` means `Structure.per_residue_plddt` normalizes them to `[0, 1]`.

        <Expandable title="Structure">
          <ResponseField name="structure" type="string" required>
            Raw structure content in PDB or CIF format.
          </ResponseField>

          <ResponseField name="structure_format" type="string">
            Format of the content string (auto-detected if omitted).
          </ResponseField>

          <ResponseField name="b_factor_type" type="BFactorType">
            What the B-factor column represents.
          </ResponseField>

          <ResponseField name="source" type="string">
            Optional source identifier (filepath or tool name).
          </ResponseField>

          <ResponseField name="metrics" type="Metrics">
            Associated metrics (e.g., pLDDT, pTM scores, per-chain lists, pairwise matrices). None values are stripped at construction.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="gradient" type="array">
        Gradient matrix matching the input logits shape, or `None` when `compute_gradient=False`.
      </ResponseField>

      <ResponseField name="loss" type="number" required>
        Scalar objective value.
      </ResponseField>

      <ResponseField name="metrics" type="Dict[string, any]">
        Scalar auxiliary metrics (avg\_plddt, ptm, iptm, avg\_pae, plus per-loss values for every weighted ColabDesign loss term).
      </ResponseField>

      <ResponseField name="vocab" type="List[string]" required>
        Amino-acid column ordering.
      </ResponseField>

      **Metrics**

      | Metric      | Type                | Range      | Availability                   |
      | ----------- | ------------------- | ---------- | ------------------------------ |
      | `avg_plddt` | float               | 0.0 to 1.0 | always                         |
      | `ptm`       | float               | 0.0 to 1.0 | always                         |
      | `iptm`      | float               | 0.0 to 1.0 | multi-chain input only         |
      | `avg_pae`   | float               | ≥ 0.0      | always                         |
      | `pae`       | list\[list\[float]] | ≥ 0.0      | when include\_pae\_matrix=True |
    </Accordion>
  </div>

  #### Applications

  This tool supplies the loss and gradient signal that gradient-based binder-design methods optimize against a chosen target. With `compute_gradient=False` it instead provides forward-only scoring of a candidate binder (loss, metrics, and predicted structure) for ranking or filtering.

  #### Usage Tips

  * **Use this for protein binder objectives, not ligand generation.** The input
    binder is an amino-acid chain and the returned losses describe a predicted
    protein-protein interface. For small-molecule compounds, choose
    chemistry-aware ligand tools instead.
  * **One binder configuration per call; this tool is not an optimization loop.** It evaluates a single binder against the fixed target. Drive it from a binder-design optimizer, or call it repeatedly, to actually design a binder.
  * **`compute_gradient` defaults to `True`.** It runs a forward and backward pass and returns the gradient with respect to the binder logits; set it `False` for forward-only scoring (`gradient=None`). The loss, metrics, and predicted structure are identical in both modes.
  * **`backend` selects the loss set.** `"base"` (the default) uses the upstream ColabDesign losses; `"germinal"` adds the Germinal fork's alpha, bias, framework-contact, and extension losses. `starting_binder_seq` is only valid with `"germinal"`.
  * **`target_hotspot` focuses the design on chosen target residues.** Supply comma-separated residue indices on the target to bias the binder toward a specific epitope; `loss_weights` (only the validated keys) tunes the objective terms.
</div>

## Toolkit Notes

These apply to every AlphaFold2 tool in this toolkit (`alphafold2-prediction`, `alphafold2-gradient`).

* **Requires a GPU.** Both tools run AlphaFold2 through a JAX backend and need an NVIDIA GPU; CPU execution is not practical.
* **Runs the original AlphaFold2 through ColabDesign, not the full DeepMind pipeline.** There is no template-search stage; multiple-sequence alignments are optional and are used only by `alphafold2-prediction`.
* **`num_recycles` (default `3`) applies to both tools.** Each recycling iteration refines the structure; raising it improves accuracy at higher runtime.

<Tip>
  **Example notebook:** See the [full working example](https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/structure_prediction/alphafold2/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>
