$npx -y skills add adaptyvbio/protein-design-skills --skill solublempnnSolubility-optimized protein sequence design using SolubleMPNN. Use this skill when: (1) Designing for E. coli expression, (2) Optimizing solubility of designed proteins, (3) Reducing aggregation propensity, (4) Need high-yield expression, (5) Avoiding inclusion body formation. F
| 1 | # SolubleMPNN Solubility-Optimized Design |
| 2 | |
| 3 | ## Prerequisites |
| 4 | |
| 5 | | Requirement | Minimum | Recommended | |
| 6 | |-------------|---------|-------------| |
| 7 | | Python | 3.8+ | 3.10 | |
| 8 | | CUDA | 11.0+ | 11.7+ | |
| 9 | | GPU VRAM | 8GB | 16GB (T4) | |
| 10 | | RAM | 8GB | 16GB | |
| 11 | |
| 12 | ## How to run |
| 13 | |
| 14 | > **First time?** See [Getting started](../../docs/getting-started.md) to set up Modal and biomodals. |
| 15 | |
| 16 | ### Option 1: Modal (recommended) |
| 17 | SolubleMPNN is the soluble model type within the LigandMPNN wrapper: |
| 18 | ```bash |
| 19 | cd biomodals |
| 20 | modal run modal_ligandmpnn.py \ |
| 21 | --input-pdb backbone.pdb \ |
| 22 | --params-str "--model_type soluble_mpnn --number_of_batches 16 --temperature 0.1" |
| 23 | ``` |
| 24 | |
| 25 | **GPU**: A10G default | **Timeout**: 900s default |
| 26 | |
| 27 | ### Option 2: Local installation |
| 28 | ```bash |
| 29 | git clone https://github.com/dauparas/ProteinMPNN.git |
| 30 | cd ProteinMPNN |
| 31 | |
| 32 | # The soluble weights are selected with --use_soluble_model, not a model name |
| 33 | python protein_mpnn_run.py \ |
| 34 | --pdb_path backbone.pdb \ |
| 35 | --out_folder output/ \ |
| 36 | --num_seq_per_target 16 \ |
| 37 | --sampling_temp "0.1" \ |
| 38 | --use_soluble_model |
| 39 | ``` |
| 40 | |
| 41 | ## Key parameters |
| 42 | |
| 43 | | Parameter | Default | Description | |
| 44 | |-----------|---------|-------------| |
| 45 | | `--pdb_path` | required | Input structure | |
| 46 | | `--use_soluble_model` | off | Use the solubility-trained weights | |
| 47 | | `--num_seq_per_target` | 1 | Sequences per structure | |
| 48 | | `--sampling_temp` | "0.1" | Temperature (string) | |
| 49 | | `--model_name` | v_48_020 | Noise level (0.20 A); orthogonal to solubility | |
| 50 | |
| 51 | ## Model weights |
| 52 | |
| 53 | `--model_name` sets the training-noise level (v_48_002 = 0.02 A, v_48_010 = 0.10 A, |
| 54 | v_48_020 = 0.20 A), not a solubility tier. Solubility is a separate weight set chosen |
| 55 | with `--use_soluble_model`, available for v_48_010 and v_48_020. Higher noise gives |
| 56 | more sequence diversity. |
| 57 | |
| 58 | ## Output format |
| 59 | |
| 60 | ``` |
| 61 | output/ |
| 62 | ├── seqs/backbone.fa |
| 63 | └── backbone_pdb/backbone_0001.pdb |
| 64 | ``` |
| 65 | |
| 66 | ## Sample output |
| 67 | |
| 68 | ### Successful run |
| 69 | ``` |
| 70 | $ python protein_mpnn_run.py --pdb_path backbone.pdb --use_soluble_model --num_seq_per_target 8 |
| 71 | Loading soluble model weights (v_48_020)... |
| 72 | Designing sequences for backbone.pdb |
| 73 | Generated 8 sequences in 2.1 seconds |
| 74 | |
| 75 | output/seqs/backbone.fa: |
| 76 | >backbone_0001, score=1.31, global_score=1.24, seq_recovery=0.78 |
| 77 | MKTAYIAKQRQISFVKSHFSRQLE... |
| 78 | >backbone_0002, score=1.28, global_score=1.21, seq_recovery=0.81 |
| 79 | MKTAYIAKQRQISFVKSQFSRQLD... |
| 80 | ``` |
| 81 | |
| 82 | **What good output looks like:** |
| 83 | - Score: 1.0-2.0 (lower = more confident) |
| 84 | - Reduced hydrophobic patches compared to standard MPNN |
| 85 | - Improved charge distribution |
| 86 | |
| 87 | ## Decision tree |
| 88 | |
| 89 | ``` |
| 90 | Should I use SolubleMPNN? |
| 91 | │ |
| 92 | ├─ What expression system? |
| 93 | │ ├─ E. coli → SolubleMPNN ✓ |
| 94 | │ ├─ Mammalian → ProteinMPNN (PTMs matter more) |
| 95 | │ └─ Yeast → Either |
| 96 | │ |
| 97 | ├─ History of expression problems? |
| 98 | │ ├─ Yes, aggregation → SolubleMPNN ✓ |
| 99 | │ ├─ Yes, low yield → SolubleMPNN ✓ |
| 100 | │ └─ No → ProteinMPNN is fine |
| 101 | │ |
| 102 | ├─ What's in the binding site? |
| 103 | │ ├─ Small molecule / ligand → Use LigandMPNN |
| 104 | │ └─ Nothing / protein only → SolubleMPNN ✓ |
| 105 | │ |
| 106 | └─ Optimizing for expression? |
| 107 | └─ Add --use_soluble_model to ProteinMPNN |
| 108 | ``` |
| 109 | |
| 110 | ## Typical performance |
| 111 | |
| 112 | | Campaign Size | Time (T4) | Cost (Modal) | Notes | |
| 113 | |---------------|-----------|--------------|-------| |
| 114 | | 100 backbones × 8 seq | 15-20 min | ~$2 | Standard | |
| 115 | | 500 backbones × 8 seq | 1-1.5h | ~$8 | Large campaign | |
| 116 | |
| 117 | **Expected improvement**: +15-30% solubility score vs standard ProteinMPNN. |
| 118 | |
| 119 | --- |
| 120 | |
| 121 | ## Verify |
| 122 | |
| 123 | ```bash |
| 124 | grep -c "^>" output/seqs/*.fa # Should match backbone_count × num_seq_per_target |
| 125 | ``` |
| 126 | |
| 127 | --- |
| 128 | |
| 129 | ## Troubleshooting |
| 130 | |
| 131 | **Still insoluble**: Confirm `--use_soluble_model` is set; redesign more positions or add explicit hydrophobic-residue bias |
| 132 | **Low diversity**: Increase temperature to 0.2 |
| 133 | **Poor folding**: Use standard ProteinMPNN and optimize later |
| 134 | |
| 135 | ### Error interpretation |
| 136 | |
| 137 | | Error | Cause | Fix | |
| 138 | |-------|-------|-----| |
| 139 | | `RuntimeError: CUDA out of memory` | Long protein or large batch | Reduce batch_size | |
| 140 | | `FileNotFoundError: v_48_020` | Missing model weights | Download soluble weights | |
| 141 | |
| 142 | --- |
| 143 | |
| 144 | **Next**: Structure prediction for validation → `protein-qc` for filtering. |