Skip to content

ivpeykov/reprogrammable-protein-chassis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protein Chassis Reprogrammability Pipeline

A computational pipeline for measuring how much a protein's interior chemistry can be varied while its exterior fold is preserved. I call this the reprogrammability score — a metric for evaluating proteins as chassis candidates for molecular engineering applications.

The Core Idea

Proteins have two distinct regions: an exterior surface that the rest of the cell sees, and a buried interior that holds the fold together from the inside.

These regions have different evolutionary pressures. Surface residues define whether the protein is stable, whether it folds correctly, whether it's recognised by other molecules. Interior residues contribute to packing and stability but don't directly contact anything outside. The question this project asks is: how much can the interior chemistry change before the exterior fold is disrupted?

If the answer is "a lot" — if you can substantially vary the interior while the exterior stays fixed — then that protein is a chassis: a stable scaffold where fold stability is solved once and interior chemistry can be iterated independently. This matters for protein engineering because currently, designing a protein with slightly different properties means starting from scratch each time.

What I Found

Testing three proteins across three growth temperatures with the same pipeline revealed a clear stability-freedom tradeoff:

Protein Organism Interior residues Unique configs Avg distance RMSD Reprogrammability
2RH5 (adenylate kinase) Aquifex aeolicus (95°C) 46 4/20 0.8 pos 0.55 Å 0.20
1ZIP (adenylate kinase) G. stearothermophilus (60°C) 56 9/20 1.8 pos 0.40–0.54 Å 0.45
1TIM (triosephosphate isomerase) Gallus gallus (37°C) 85 20/20 6.9 pos 0.70 Å 1.00

Key results:

  • Zero surface violations across all 60 variants across three proteins
  • All variants confirmed by AlphaFold2 structure prediction (pTM > 0.88, RMSD < 0.75 Å)
  • 1TIM variants change 50+ interior residues yet exterior is preserved to 0.70 Å
  • Thermostable extremophile (2RH5) has rigid interior — only 4 unique configurations
  • Mesophilic protein (1TIM) has flexible interior — 20 unique configurations, maximum diversity
  • GSAK (60°C) RMSD of 0.40–0.54 Å sits between the other two, consistent with intermediate thermostability

Hypothesis confirmed computationally across three data points: Interior/exterior decoupling exists and correlates monotonically with organism growth temperature. More thermostable proteins have less interior design freedom.

Worked Example: 1TIM End-to-End

Triosephosphate isomerase from Gallus gallus (PDB: 1TIM) — the most reprogrammable protein in the study. 247 residues, works at 37°C.

Step 0 — Get the PDB files

The pipeline needs two structures for each protein:

  1. Apo structure — the protein alone, no ligand. This is what ProteinMPNN redesigns. If only a ligand-bound structure exists, it still works; the pipeline strips the ligand in step 1.

  2. Substrate-bound structure — the same protein crystallised with its substrate (or a close analogue) sitting in the active site. This is used only to identify which residues to lock as the active site.

Both are downloaded from RCSB Protein Data Bank.

Finding structures on RCSB:

  1. Search for your protein by name or PDB ID
  2. On the structure page, check Macromolecules for chain IDs and Small Molecules for ligand codes (three-letter codes like PGH, AP5)
  3. For a substrate-bound structure, look at the Similar Structures tab or search for the protein name + "substrate" or "inhibitor"
  4. Download each structure as a PDB file: Download Files → PDB Format

Place both files in the data/ directory.

What you need to note before running the pipeline:

  • Chain ID of your protein in the apo PDB (commonly A)
  • Chain ID containing the ligand in the substrate-bound PDB (check the RCSB page — it is not always chain A)
  • Three-letter ligand code of the substrate (shown under Small Molecules on the RCSB page)

Step 1 — Run the pipeline

python scripts/pipeline.py \
    --name 1TIM \
    --design_pdb data/1TIM.pdb \
    --chain A \
    --ligand_pdb data/1TPH.pdb \
    --ligand_chain 1 \
    --ligand_name PGH

This single command runs the full characterisation pipeline. Internally it:

  1. Extracts chain A from the apo PDB (strips waters and ligands)
  2. Extracts the substrate-bound structure and identifies active site residues within 4.5 Å of the PGH ligand
  3. Classifies all residues as surface or interior by SASA (threshold 20 Ų), locking active site residues regardless of burial
  4. Parses the structure for ProteinMPNN and generates the fixed-positions file
  5. Runs ProteinMPNN at temperature 0.2, generating 20 interior variants
  6. Runs variant analysis and diversity analysis

Pipeline output (printed on completion):

SUMMARY
  Interior residues (designable): 85
  Surface residues (locked):      162
  Unique configurations:          20/20
  Avg pairwise distance:          6.9 positions
  Reprogrammability score:        1.00

What this means: Out of 247 residues, 162 surface residues and all active site residues were locked. ProteinMPNN had 85 interior positions to redesign. All 20 generated variants had unique interior fingerprints.

Step 2 — Inspect variant analysis

output/1TIM/variant_analysis.json has per-variant detail. Sample from variant 1 (of 20):

interior_changes:  52   (out of 85 designable positions)
surface_changes:    0   (exterior lock held)
surface_violations: 0
property_changes:  21   (residues that changed chemical class)
seq_recovery:    0.39   (39% sequence identity to wildtype)

Property changes include shifts like hydrophobic → charged (G→E, V→D), polar → hydrophobic (T→L), and positive → hydrophobic (H→I). The interior chemistry changes substantially while the surface sequence is identical to wildtype.

All 20 variants show zero surface violations. Interior changes range from 50 to 57 positions per variant.

Step 3 — Inspect diversity analysis

output/1TIM/diversity_analysis.json:

{
  "n_variants": 20,
  "n_interior_positions": 85,
  "unique_configurations": 20,
  "avg_pairwise_distance": 6.88,
  "max_pairwise_distance": 12,
  "min_nonzero_distance": 2
}

Every one of the 20 variants is chemically distinct. Pairs of variants differ by up to 12 interior positions from each other.

Step 4 — Extract top variants for structure prediction

The pipeline selects the top 5 variants by ProteinMPNN score and writes them to FASTA for ColabFold:

output/1TIM/top5_variants.fasta

The file contains the original wildtype sequence and 5 variants. Each variant has the same surface residues as wildtype; only interior positions differ.

Step 5 — Run ColabFold

ColabFold is not called automatically. Take top5_variants.fasta and run AlphaFold2 structure prediction on it — either locally or via Google Colab.

Place the results in output/1TIM/colabfold_results/.

Step 6 — Compute RMSD

python scripts/compute_rmsd.py output/1TIM/colabfold_results/ data/1TIM_chainA.pdb

Results are written to output/1TIM/rmsd_results.json. Actual results from this run:

Variant pTM pLDDT RMSD (Cα) Passed
original (wildtype) 0.94 96.4
sample10 0.91 94.1 0.72 Å yes
sample15 0.93 94.8 0.74 Å yes
sample18 0.93 94.9 0.67 Å yes
sample19 0.92 94.4 0.67 Å yes
sample4 0.92 94.8 0.67 Å yes

All 5 variants pass. RMSD of 0.67–0.74 Å against the wildtype crystal structure. For reference, crystallising the same protein twice in two independent experiments typically gives 0.3–0.5 Å RMSD from measurement noise alone. These variants differ by 50+ interior residues and still fold to within barely more than experimental noise of the original structure.

Pipeline

One command characterises any protein:

python scripts/pipeline.py \
    --name PROTEIN \
    --design_pdb data/protein_apo.pdb \
    --chain A \
    --ligand_pdb data/protein_substrate_bound.pdb \
    --ligand_chain A \
    --ligand_name LIG

Output includes:

  • Interior vs surface residue classification (SASA-based)
  • Precise active site locking from substrate contact distances
  • 20 ProteinMPNN interior variants
  • Per-variant chemical property change analysis
  • Pairwise diversity matrix
  • Reprogrammability score (unique configs / total variants)

What This Does NOT Prove

This is a computational result. No proteins have been synthesized or expressed.

  • I have not shown physical fold preservation — only AlphaFold2 predictions
  • I have not shown functional difference between interior variants
  • I have not shown this is general across all protein families
  • Active site locking is based on substrate contact distances — may miss allosteric residues

Wet lab validation would require: synthesis of top variants, circular dichroism (fold verification), thermal shift assay (stability), and functional assay (catalytic rate comparison between variants).

Potential Applications

If wet lab validation holds, the chassis concept enables:

  • Biosensors: same stable exterior, different interior detection logic
  • Drug delivery: same stable carrier, different payload release mechanism
  • Industrial enzymes: validate stability once, vary substrate specificity

Prerequisites

  • Python 3.11 (via conda recommended)
  • Git
  • ~20 GB free disk space (ColabFold MSA data)
  • NVIDIA GPU with CUDA 12.x (optional — required for ProteinMPNN locally; ColabFold can use CPU or Google Colab)

Installation

Linux (recommended)

conda create -n proteinwork python=3.11
conda activate proteinwork
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install numpy biopython
pip install "colabfold[alphafold]"
pip install "jax[cuda12]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Tested on: GTX 1660 6GB, Arch Linux, CUDA 13.0, Python 3.11

macOS (CPU only)

CUDA is not supported on macOS. ProteinMPNN runs on CPU (~5 min per run vs ~30 sec on GPU). ColabFold uses remote servers for MSA and local CPU for structure prediction.

conda create -n proteinwork python=3.11
conda activate proteinwork
pip install torch torchvision torchaudio          # CPU-only build
pip install numpy biopython
pip install "colabfold[alphafold]"
pip install jax                                   # CPU-only

Windows (WSL2 required)

Native Windows is not supported. Install WSL2 with Ubuntu 22.04, then follow the Linux instructions inside the WSL2 terminal.

WSL2 installation guide: https://learn.microsoft.com/en-us/windows/wsl/install

Install ProteinMPNN

ProteinMPNN is the sequence design engine — it generates interior variants while holding the backbone and surface residues fixed. It is not a Python package and must be cloned separately into the project root directory (so that ProteinMPNN/protein_mpnn_run.py exists relative to where you run the pipeline):

# run this from inside the reprogrammable-protein-chassis directory
git clone https://github.com/dauparas/ProteinMPNN

To verify it works before running the full pipeline:

conda activate proteinwork
python ProteinMPNN/protein_mpnn_run.py --help

You should see the ProteinMPNN argument list with no errors. If you see ModuleNotFoundError: No module named 'torch', your conda environment is not activated.

Scripts

Script Purpose
scripts/pipeline.py Full pipeline — one command per protein
scripts/extract_chain.py Extract single chain, strip waters
scripts/find_contact_residues.py Identify active site from substrate-bound structure
scripts/calc_sasa.py SASA classification with precise active site locking
scripts/analyse_variants.py Per-variant chemical property analysis
scripts/diversity_analysis.py Pairwise diversity and reprogrammability score
scripts/extract_top_variants.py Extract top N variants for ColabFold
scripts/compute_rmsd.py Backbone RMSD vs original from ColabFold results

All Three Proteins — Commands

# 2RH5 — Adenylate kinase, Aquifex aeolicus (95°C)
python scripts/pipeline.py \
    --name 2RH5 \
    --design_pdb data/2RH5.pdb \
    --chain A \
    --ligand_pdb data/2RGX.pdb \
    --ligand_chain A \
    --ligand_name AP5

# GSAK — Adenylate kinase, G. stearothermophilus (57°C)
python scripts/pipeline.py \
    --name GSAK \
    --design_pdb data/1ZIP.pdb \
    --chain A \
    --ligand_pdb data/2RGX.pdb \
    --ligand_chain A \
    --ligand_name AP5

# 1TIM — Triosephosphate isomerase, Gallus gallus (37°C)
python scripts/pipeline.py \
    --name 1TIM \
    --design_pdb data/1TIM.pdb \
    --chain A \
    --ligand_pdb data/1TPH.pdb \
    --ligand_chain 1 \
    --ligand_name PGH

After each pipeline run, run ColabFold on the top5_variants.fasta output, place results in output/NAME/colabfold_results/, then compute RMSD:

python scripts/compute_rmsd.py output/NAME/colabfold_results/ data/NAME_chainA.pdb

Results Structure

output/
├── 2RH5/                    # Adenylate kinase results
│   ├── mpnn_temp02/         # ProteinMPNN run temp=0.2
│   ├── mpnn_run2_temp03/    # ProteinMPNN run temp=0.3
│   ├── colabfold_results/   # AlphaFold2 predictions
│   ├── rmsd_results.json    # RMSD comparison
│   ├── diversity_analysis.json
│   └── variant_analysis.json
├── 1TIM/                    # Triosephosphate isomerase results
│   ├── mpnn_temp02/
│   ├── colabfold_results/
│   ├── rmsd_results.json
│   ├── diversity_analysis.json
│   └── variant_analysis.json
└── GSAK/                    # Adenylate kinase (G. stearothermophilus) results
    ├── mpnn_temp02/
    ├── colabfold_results/
    ├── rmsd_results.json
    ├── diversity_analysis.json
    └── variant_analysis.json

Citation / Priority

This work was initiated on March 16, 2026. See LICENSE for terms. See CITATIONS.md for all tool and paper citations.

The chassis reprogrammability framing and the stability-freedom tradeoff hypothesis are original contributions of this project. The underlying tools (ProteinMPNN, ColabFold/AlphaFold2) are from their respective authors.

Next Steps for Collaborators

If you are a wet lab researcher interested in validating this computationally:

  1. Top 3 variants for 1TIM (samples 10, 18, 19) are in output/1TIM/top5_variants.fasta
  2. Suggested synthesis vendor: Twist Bioscience or IDT
  3. Expression system: E. coli BL21, standard His-tag protocol
  4. Key assays: circular dichroism, thermal shift (Tm), TIM activity assay
  5. Expected result if hypothesis holds: similar Tm to wildtype, different kcat

Open an issue or contact via GitHub if interested in collaboration.

About

Computational pipeline for measuring protein interior reprogrammability. Identifies chassis candidates where exterior fold is preserved while interior chemistry varies.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages