Views
No views yet
dG: absolute protein-protein binding affinity estimate in kcal/mol-like training units.ddG: mutation effect estimate; negative values indicate predicted stabilizing mutations and positive values indicate predicted destabilizing mutations.best_model_checkpoint.ptv15_fix2_selected0.51910.59940.55640.41570.37540.4959 and test ddG 0.5739. Keep this distinction when reporting the training/search history in a paper or supplement.--live-esm. If this Twin Peaks model repository is private, users also need access to this repository.predict_binding.py run loads the ESM model once, not once per CSV row. Embeddings are cached in embeddings_cache by sequence hash and reused when the same WT or mutant sequence appears again. Large mutation scans can still be slow because each unique mutant sequence needs its own embedding the first time.1pip install -r requirements.txt
2export HF_TOKEN=your_huggingface_token
3python predict_binding.py \
4 --checkpoint best_model_checkpoint.pt \
5 --seq1 "ACDE..." \
6 --seq2 "FGHI..." \
7 --source-type protein_complex \
8 --live-esm \
9 --output predictions.csv1python predict_binding.py \
2 --checkpoint best_model_checkpoint.pt \
3 --task ddg \
4 --seq1-wt "ACDE..." \
5 --seq2 "FGHI..." \
6 --positions "42" \
7 --indexing 1-indexed \
8 --chain 1 \
9 --mutate-to A \
10 --source-type mutation \
11 --live-esm \
12 --output ddg_predictions.csvseq1_mut_effective and seq2_mut_effective, which report the exact mutant sequences evaluated by the model.--positions is 1-indexed by default, so position 1 means the first amino acid. Use --indexing 0-indexed only if your input positions start at 0.ddG command writes one CSV row by design. For a multi-row alanine scan and plots, use --task scan as shown below.1python predict_binding.py \
2 --checkpoint best_model_checkpoint.pt \
3 --task scan \
4 --seq1-wt "ACDE..." \
5 --seq2 "FGHI..." \
6 --scan-chain both \
7 --scan-mode alanine \
8 --source-type mutation \
9 --live-esm \
10 --output scan_predictions.csv \
11 --plot-stabilizing-output scan_top10_stabilizing.png \
12 --plot-destabilizing-output scan_top10_destabilizing.png \
13 --plot-max-rows 101name,seq1,seq2
2pair_1,ACDE...,FGHI...
3pair_2,KLMN...,QRST...examples/batch_scan_input.csv.1python predict_binding.py \
2 --checkpoint best_model_checkpoint.pt \
3 --task scan \
4 --input batch_scan_input.csv \
5 --scan-chain both \
6 --scan-mode alanine \
7 --source-type mutation \
8 --live-esm \
9 --output batch_scan_predictions.csv \
10 --plot-stabilizing-output batch_scan_top10_stabilizing.png \
11 --plot-destabilizing-output batch_scan_top10_destabilizing.png \
12 --plot-max-rows 10--scan-mode all. --scan-top-k is optional and truncates the scan CSV, so omit it when you want the full scan output.--residue-summary-output and optionally --residue-plot-output. The residue summary groups scan rows by chain and residue position, then reports the largest absolute predicted ddG, the strongest destabilizing mutation, and the strongest stabilizing mutation for each residue. Residue labels use readable labels such as Chain 1 Y42, and the plot includes the top mutation driving each residue score. The default --residue-rank impact ranks residues by largest absolute predicted ddG; use destabilizing when alanine-scan hotspot interpretation should prioritize mutations that weaken binding.1name,seq1,seq2
2example_pair,ACDE...,FGHI...1name,seq1_wt,seq2,positions,indexing,chain,mutate_to
2example_mut,ACDE...,FGHI...,42,1-indexed,1,Apositions is also 1-indexed by default unless an indexing column says 0-indexed.1name,seq1_wt,seq2_wt,seq1_mut,seq2_mut,block1_mut_positions,block2_mut_positions
2example_mut,ACDE...,FGHI...,ACAE...,FGHI...,"[2]","[]"seq1_mut / seq2_mut are provided without mutation-position columns, the script infers changed positions from the WT and mutant sequences. WT and mutant sequences must have the same length for automatic position inference.block1_mut_positions / block2_mut_positions are provided, they follow the row indexing value or the CLI --indexing default.--source-type is an internal learned conditioning flag, not a model selector.protein_complex for absolute dG prediction.mutation for ddG prediction and whole-protein mutation scans.protein_complex: general protein-protein complexes.mutation: SKEMPI/BindingGym-like mutation effects.antibody_cdr: antibody CDR-style variants.1You need a Hugging Face token for live ESM-C/ESM embedding generation.
2If this model repository is private, your Hugging Face account must also have access to the repository.
3For public repositories, the same token is still needed for ESM/live embedding generation.best_model_checkpoint.pt: model weights plus embedded training config.predict_binding.py: strict inference CLI.architectures.py, esm3bedding.py, base.py, utils.py: loader/runtime support.examples/: small example CSV schemas.notebooks/twin_peaks_final_inference_colab.ipynb: Colab starter notebook.release_manifest.json: release manifest and provenance details.