nesso / README.md
multimodalart's picture
multimodalart HF Staff
README: note bf16 reproducibility scope
1279e1c verified
|
Raw
History Blame Contribute Delete
2.88 kB

A newer version of the Gradio SDK is available: 6.24.0

Upgrade
metadata
title: Nesso-1 Binding Affinity
emoji: 🧬
colorFrom: gray
colorTo: purple
sdk: gradio
sdk_version: 6.22.0
app_file: app.py
short_description: Protein-ligand binding affinity with Nesso-1
python_version: '3.12'
startup_duration_timeout: 1h
models:
  - recursionpharma/nesso
  - facebook/esm2_t33_650M_UR50D
tags:
  - binding-affinity
  - protein-ligand
  - drug-discovery

Nesso-1 — binding affinity prediction

Predict protein–ligand binding affinity from an amino-acid sequence and a SMILES string — no MSA and no input structure required.

Nesso-1 is a coarse-grained cofolding model from Valence Labs (Recursion), released under Apache-2.0 (code, technical report).

What the Space runs

The app reproduces the reference nesso predict pipeline (docs/prediction.md) directly in-process, so the numbers match the CLI:

  • RDKit ETKDG conformer generation for the ligand and CCD-backed protein tokenisation,
  • ESM-2 650M (facebook/esm2_t33_650M_UR50D) single-sequence embeddings,
  • Nesso-1 trunk with 5 recycling steps, two-stage pocket refinement (refine_protein_cutoff=22 Å, 256-token budget), affinity_protein_cutoff=15 Å,
  • bf16-mixed precision, and the model's own predict_step / affinity.json scalars.

cuEquivariance kernels are not installed (they are CUDA-12 only), so the triangle updates run on Nesso's reference pure-PyTorch path — the --no_kernels equivalent. Numbers can therefore differ marginally from a kernel-accelerated run. Predictions are exactly reproducible for a given seed within one GPU session; because inference runs in bf16, values can shift slightly (≈0.01–0.02 in affinity_pred_value) between different GPU allocations.

Reading the output

affinity_pred_value is log₁₀(IC₅₀ / µM): −3 ≈ 1 nM (strong binder), 0 ≈ 1 µM, +2 ≈ 100 µM (weak / non-binder). affinity_probability_binary is the binder classification probability. entropy_crop_pl is the model's confidence in the predicted protein–ligand interface — 0.0 means the ligand could not be confidently placed and the prediction should not be trusted.

Research use only. Not for clinical or diagnostic use.

Examples

  • Nesso tutorial complex + L-tyrosine — the authors' own example from tutorial/smiles.yaml (Apache-2.0).
  • ABL1 / EGFR kinase domains and CDK2 — sequences from UniProt (P00519, P00533, P24941; CC-BY 4.0).
  • Imatinib, gefitinib, staurosporine and caffeine SMILES from PubChem (public domain).