Exploratory notebooks for teaching and prototyping PyRosetta workflows: membrane protein modeling, enzyme design, symmetry setup, active-site analysis, structural alignment, and early ideas for a full online book chapter.
This repository is best read as a curated lab notebook. Some examples are polished chapter prototypes; others preserve useful experiments from older PyRosetta bindings so the reasoning and implementation details remain available.
The membrane-protein notebook demonstrates a visual workflow for opening a membrane protein in PyRosetta, introducing a metal, and sampling nearby residues with repacking over a sequence of steps.
- Notebook: Membrane 1 - Moving Metals.ipynb
- Supporting files: 1bl8.span, 1bl8.nometal.pdb
| Histidine tautomer example | Alternate tautomer example |
|---|---|
![]() |
![]() |
The prototype chapter explores how to break down Rosetta packing behavior into readable data tables, then uses that visibility to build and debug a simple protein-design algorithm. It is the clearest example of the larger book format this repository was originally exploring.
- Notebook: Prototype of PyRosetta Jupyter Notebook.ipynb
- Section notes: prototype/README.md
| Section | Status | What it covers |
|---|---|---|
| membrane_proteins_moving_metals | Featured, PyRosetta 4 | Membrane setup, metal placement, residue repacking, and animated sampling output. |
| prototype | Featured prototype | A book-chapter style walkthrough for extracting energies into dataframes and writing a simple design algorithm. |
| enzymedesign_in_pyrosetta | Working example | Enzyme-design setup in PyRosetta using Bagel/Foldit supporting files. |
| activesiteenergycalc | Archival example | Active-site RMSD and energy calculations against a reference structure. |
| poses_and_dataframes | Archival example, older bindings | Accessing pose energies with pandas and comparing Rosetta/PyRosetta scoring. |
| symmetry | Archival example, older bindings | Building symmetry setup logic directly in PyRosetta. |
| getting_tmalign_to_work_w_ligands | Archival example, older bindings | Using TMalign-style superposition for proteins with different sequences. |
.
|-- README.md
|-- resources/
| |-- images/ # Shared README and notebook visuals
| `-- protein_structures/ # Shared structure inputs
|-- membrane_proteins_moving_metals/
|-- prototype/
|-- enzymedesign_in_pyrosetta/
|-- activesiteenergycalc/
|-- poses_and_dataframes/
|-- symmetry/
|-- getting_tmalign_to_work_w_ligands/
`-- sjb_util.py # Helper utilities used by some legacy demos
These notebooks were written across multiple PyRosetta eras. The featured membrane and prototype notebooks expect PyRosetta 4-era APIs, while several archival examples use older bindings and may need small updates before running on a modern installation.
General setup:
- Install PyRosetta using the license and platform-specific instructions from RosettaCommons.
- Create a Python environment with Jupyter, pandas, matplotlib, and seaborn.
- Launch Jupyter from the repository root so relative paths to PDB, params, span, image, and XML files resolve correctly.
A later RosettaCommons effort produced the broad PyRosetta notebook collection this project originally hoped would exist. This repository now serves as a smaller companion archive of experiments, chapter prototypes, and teaching ideas.
- Official notebooks: https://github.com/RosettaCommons/PyRosetta.notebooks
- Associated preprint: https://www.preprints.org/manuscript/202002.0097/v1
- PyRosetta and Rosetta are distributed under RosettaCommons licensing terms; this repository does not include PyRosetta itself.
sjb_util.pyis retained for examples that depend on it, but it has not been cleaned up as a public API.- Data files are included only where needed to make individual notebooks easier to inspect and reproduce.


