Skip to content

Add Colab tutorial notebooks - #12

Merged
andrewfavor95 merged 20 commits into
mainfrom
colab_tutorial
Nov 17, 2026
Merged

andrewfavor95 merged 20 commits into
mainfrom
colab_tutorial

Conversation

@andrewfavor95

Copy link
Copy Markdown
Collaborator

Merges the two interactive Colab tutorials into main so users can find and run them from the front page.

What this adds

  • tutorials/demo01_general_design.ipynb — polymer-class contigs, sequence–structure codesign, nucleic acid secondary structure conditioning (dot-bracket strings, paired-region lists, symmetry, strand orientation, multi-base contacts), and motif scaffolding of DNA-binding proteins.
  • tutorials/demo02_ensemble_modeling.ipynb — motif scaffolding around a nucleotide ligand, conformational ensembles via partial diffusion, and multi-state sequence design with tied NA-MPNN.
  • Figure assets and the input PDBs the notebooks reference, under tutorials/assets/ and rf_diffusion/test_data/.
  • tutorials/README.md plus a Tutorials table in the top-level README, both linking straight to Colab.

Code changes outside the tutorials

Two small inference changes that demo02 depends on:

  • inference.keep_input_seq_partial (new, defaults to False): during partial diffusion, keeps the input sequence instead of masking it. demo02 uses this both to bias ensemble sampling toward a reference state and to hold NA-MPNN-designed sequences fixed during the short refinement runs.
  • multi_polymer.yaml default input_pdb changed from test_data/DBP035.pdb to rf_diffusion/test_data/DBP035.pdb, so the default resolves when running from the repository root. Worth a look during review — this is a relative path either way, so it changes which working directory the default works from.

Cleanup done in the last commit

The notebooks themselves were tested recently; this pass fixed static problems rather than behavior:

  • Self-references (Colab badges, git clone -b, raw figure URLs) now point at main instead of colab_tutorial, so they keep working once this merges and the branch is deleted.
  • Removed RFDpoly_inference_tutorial.ipynb, a leftover duplicate of demo01 differing only in its badge URL.
  • Removed a stray !rm -r mpnn_designs/ cell in demo02 that sat between the NA-MPNN run and the cell visualizing its output.
  • Fixed the Example 3(A) viewer in demo01, which pointed at an example5a prefix no cell writes.
  • Replaced demo01's table of contents, which linked into a private Google Drive copy of the notebook.
  • Corrected the ASR1 contig string in demo02's prose to match the command below it, and pointed the input-motif description at the file that actually ships in the repo.
  • Dropped empty cells, commented-out dead code and stale TODOs; fixed typos.

No cell outputs are stored in either notebook.

🤖 Generated with Claude Code

andrewfavor95 and others added 20 commits December 4, 2025 13:26
Add cloning of original sequence for partial input handling.
Static cleanup of the two tutorial notebooks ahead of merging them into
main:

- Point every self-reference (Colab badges, `git clone`, raw figure URLs)
  at `main` rather than the `colab_tutorial` branch, so the links keep
  working once this merges and the branch goes away.
- Delete `RFDpoly_inference_tutorial.ipynb`, a leftover duplicate of
  demo01 that differed only in its Colab badge URL.
- demo02: remove a stray `!rm -r mpnn_designs/` cell that sat between the
  NA-MPNN design run and the cell that visualizes its output.
- demo01: fix the Example 3(A) viewer, which pointed at an
  `example5a` prefix no cell writes.
- demo01: replace a table of contents linking into a private Google Drive
  copy of the notebook with plain section listings.
- demo02: correct the ASR1 contig string in the prose to match the
  command below it, and point the input-motif description at the file
  that actually ships in `rf_diffusion/test_data/`.
- Drop empty cells, commented-out dead code, and stale TODOs; fix typos.

Also add `tutorials/README.md` and a Tutorials table in the top-level
README so the notebooks are findable from the front page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@andrewfavor95
andrewfavor95 merged commit 55a9802 into main Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants