Skip to main content

Lightweight antibody structure prediction tool

Project description

Ibex 🐐

Ibex is a lightweight antibody and TCR structure prediction model.

Installation

Ibex can be installed through pip with

pip install prescient-ibex

Alternatively, you can use uv and create a new virtual environment

uv venv --python 3.10
source .venv/bin/activate
uv pip install -e .

Usage

The simplest way to run inference is through the ibex command, e.g.

ibex --fv-heavy EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS --fv-light DIQMTQSPSSLSASVGDRVTITCRASQDVNTAVAWYQQKPGKAPKLLIYSASFLYSGVPSRFSGSRSGTDFTLTISSLQPEDFATYYCQQHYTTPPTFGQGTKVEIK --output prediction.pdb

You can provide a csv (with the --csv argument) or a parquet file (with the --parquet argument) and run a batched inference writing the output into a specified directory with

ibex --csv sequences.csv --output predictions

where sequences.csv should contain a fv_heavy and fv_light column with heavy and light chain sequences, and optionally an id column with a string that will be used as part of the output PDB filenames.

By default, structures are predicted in the holo conformation. To predict the apo state, use the --apo flag.

To run a refinement step on the predicted structures, use the --refine option. Additional checks to fix cis-isomers and D-stereoisomers during refinement can be activated with --refine-checks.

Instead of running Ibex, you can use --abodybuilder3 to run inference with the ABodyBuilder3 model.

To run Ibex programmatically, you can use

from ibex import Ibex, checkpoint_path, inference
ckpt = checkpoint_path("ibex")
ibex_model = Ibex.load_from_ensemble_checkpoint(ckpt)
inference(ibex_model, fv_heavy, fv_light, "prediction.pdb")

to predict structures for multiple sequence pairs, batch_inference is recommended instead of inference.

Predictions on nanobodies and TCRs

To predict nanobody structures, leave out the fv_light argument, or set it as "" or None in the csv column.

For inference on TCRs, you should provide the variable beta chain sequence as fv_heavy and the alpha chain as fv_light. Ibex has not been trained on gamma and delta chains.

License

The codebase and the ABodyBuilder3 model weights are available under Apache 2.0 license.

The model weights for Ibex are available under Genentech Apache 2.0 Non-Commercial license.

Ibex uses as input representation embeddings from ESMC 300M, which is licensed under the EvolutionaryScale Cambrian Open License Agreement.

Citation

If this code is useful to you please cite our paper using the following bibtex entry,

@article{ibex,
    author = {Dreyer et al.},
    title = "{Conformation-Aware Structure Prediction of Antigen-Recognizing Immune Proteins}",
    year = {2025},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prescient_ibex-0.1.1.tar.gz (422.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prescient_ibex-0.1.1-py3-none-any.whl (86.6 kB view details)

Uploaded Python 3

File details

Details for the file prescient_ibex-0.1.1.tar.gz.

File metadata

  • Download URL: prescient_ibex-0.1.1.tar.gz
  • Upload date:
  • Size: 422.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for prescient_ibex-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9eab3c3c5bff83933065a3a2b07e0da35f661d4fa4007bec99861d70bf45ec30
MD5 37ad5f49ca317aa5920b15c526ddf2ec
BLAKE2b-256 c4dd4a381b2c5ef989422fb08e648e28d72d01ab4425481641f6806a33e56d6c

See more details on using hashes here.

File details

Details for the file prescient_ibex-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: prescient_ibex-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 86.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for prescient_ibex-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df11aa023f8a9a240367efe2ee0429d34cc9ff3e53b6c046d9b8b7b02bb831d9
MD5 abf4996f09b01df962f0cfdfad9fe647
BLAKE2b-256 c5372ea2c30cf5f2bb2718165e0aabc9317789c42e35cb236e2fef952beb8f34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page