Skip to content

Add CIF template-based generating example notebook #255

Open
sukritsingh wants to merge 12 commits into
aqlaboratory:mainfrom
sukritsingh:add-template-example
Open

Add CIF template-based generating example notebook #255
sukritsingh wants to merge 12 commits into
aqlaboratory:mainfrom
sukritsingh:add-template-example

Conversation

@sukritsingh

Copy link
Copy Markdown

Summary

Following up on conversations with @jandom and @jnwei, this PR provides an example notebook intended to install and run OpenFold3 given a template CIF structure of a kinase (the underlying intention is to generate template-based structures of homologs that may be under-characterized). Ideally, this example notebook can serve two purposes:

  1. How to setup and run OpenFold3 in a colab notebook (although you need a Google subscription to access the needed A100 GPU).
  2. How to generate a templated structure using OpenFold3 given a desired conformational template CIF file (using kinases as an example).

The associated citation for this notebook is a preprint that should be released eminently. Perhaps we can coordinate merging of this notebook in once the DOI is added into the notebook?

Changes

In the examples/ directory there is now a new notebook template_kinase_example_notebook that contains the example .ipynb file!

Related Issues

Two potential flags here:

  1. The comments might be a bit verbose and chaotic as I wrote out issues I found and debugged them! Definitely open to streamlining them!
  2. The only way to run this notebook on Colab is using an A100 instance, which is only available if you have a paid Google subscription that accesses an A100 (and also uses a Triton kernel)

Testing

You could just open this notebook in Colab and run it. I have not added a "Open in Colab" badge yet at the top of the notebook, but that might be the last thing to add (alongside the relevant DOI?)

That said, any other edits and suggested reviews are welcome!

@jnwei jnwei requested a review from jandom June 17, 2026 07:56
@jnwei

jnwei commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@sukritsingh this is great! thank you for this contribution.

A few quick notes:

  • I'll make a PR to add a non-interactive / accept all defaults option to setup_openfold. That should simplify the setup in the notebook, as we discussed.
  • It would be great to have an "open in colab" banner button on the notebook itself. I was able to do this for the OF2 notebook by adding this metadata cell: aqlaboratory/openfold@c587b06

@jandom

jandom commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Sukrit, i had a run through this locally, it all works! Because of github idiosyncrasies, can you add me as a collaborator to your fork so that i can make changes? Otherwise I have to start a new PR

@sukritsingh

Copy link
Copy Markdown
Author

Thanks all for the points!

@jandom I've added you as a collaborator to my fork! Please feel free to do as you see fit (but maybe just let me know so I don't get confused by emails, lol).

@jnwei I want to add the colab banner but actually was just saving it for last in case other changes needed to be made. My main question was (using your example) what the URL is going to look like if we put in that cell? Here's my attempt at what I think the URL might look like?

  "cells": [
	{
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/aqlaboratory/openfold-3/blob/add-template-example/examples/template_kinase_example_notebook/2026_of3_multistate_kinase_generation.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },

Just let me know what to change the URL to and I can add in the banner myself too (or whoever wants to can do it!)

@jnwei

jnwei commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Here's my attempt at what I think the URL might look like?

Yeah that URL is the right idea, it should just update the href. Just remember to use the url with the main branch rather than the current PR branch when you're finished, so:

      "source": [
        "<a href=\"https://colab.research.google.com/github/aqlaboratory/openfold-3/blob/main/examples/template_kinase_example_notebook/2026_of3_multistate_kinase_generation.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]

@sukritsingh

Copy link
Copy Markdown
Author

Right! I forgot I need to add /blob/main to specify the main branch. Thanks for that!

I've updated the notebook with the colab badge and what should be the correct URL at the top. Let me know if this needs changing!

@jandom jandom self-assigned this Jun 23, 2026
@jandom jandom added the safe-to-test Internal only label used to indicate PRs that are ready for automated CI testing. label Jul 4, 2026
@jandom

jandom commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

@sukritsingh I think this is now ready for your cleanup! all the eng bits look a bit better

okay, now i'm really done – it runs locally, i found a colab extension for vscode so the next set of tests i'll be able to run both locally and on colab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe-to-test Internal only label used to indicate PRs that are ready for automated CI testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants