Skip to main content

FlashABB: modelling antibody structures at the speed of language

Inference speed comparison

Installation:

pip install flash-abb

Or from source:

git clone git@github.com:oxpig/FlashABB.git
cd FlashABB
pip install .

Structure prediction

The following is also in example.py and can be used to create the structures in sample_preds.

Predictions apply the Dropout-LayerNorm Correction (DLC) by default, which improves accuracy at no extra cost (preprint); disable it with pretrained(dlc_correction=False).

from flash_abb import pretrained
import torch

flabb = pretrained(device='cuda')

# Sequences in heavy|light format
seqs = [
    'EVQLLESGGEVKKPGASVKVSCRASGYTFRNYGLTWVRQAPGQGLEWMGWISAYNGNTNYAQKFQGRVTLTTDTSTSTAYMELRSLRSDDTAVYFCARDVPGHGAAFMDVWGTGTTVTVSS|DIQLTQSPLSLPVTLGQPASISCRSSQSLEASDTNIYLSWFQQRPGQSPRRLIYKISNRDSGVPDRFSGSGSGTHFTLRISRVEADDVAVYYCMQGTHWPPAFGQGTKVDIK',
    'EVQLLESGGEVKKPGASVKVSCRASGYTFRNYGLTWVRQAPGQGLEWMGWISAYNGNTNYAQKFQGRVTLTTDTSTSTAYMELRSLRSDDTAVYFCARDVPGHGAAFMDVWGTGTTVTVS|DIQLTQSPLSLPVTLGQPASISCRSSQSLEASDTNIYLSWFQQRPGQSPRRLIYKISNRDSGVPDRFSGSGSGTHFTLRISRVEADDVAVYYCMQGTHWPPAFGQGTKVDIK',
]

with torch.no_grad():
    result = flabb(seqs)

print(result.coords.shape)          # (2, n_residues, 14, 3)
print(result.bb_coords.shape)       # (2, n_residues, 4, 3)

result.to_pdbs(['ab1', 'ab2'], pdb_dir='sample_preds')

Developability scoring (FlashTAP)

FlashTAP predicts four TAP developability scores: PSH, PPC, PNC, and SFvCSP.

from flash_abb import pretrained_tap

tap = pretrained_tap(device='cuda')

seqs = [
    'EVQLLESGGEVKKPGASVKVSCRASGYTFRNYGLTWVRQAPGQGLEWMGWISAYNGNTNYAQKFQGRVTLTTDTSTSTAYMELRSLRSDDTAVYFCARDVPGHGAAFMDVWGTGTTVTVSS|DIQLTQSPLSLPVTLGQPASISCRSSQSLEASDTNIYLSWFQQRPGQSPRRLIYKISNRDSGVPDRFSGSGSGTHFTLRISRVEADDVAVYYCMQGTHWPPAFGQGTKVDIK',
]

result = tap(seqs)
print(result.scores)        # [{'PSH': ..., 'PPC': ..., 'PNC': ..., 'SFvCSP': ...}]
print(result.tensor)        # (1, 4) raw score tensor
print(result.flag_probs)    # [{'PSH': 0.12, 'PPC': 0.03, 'PNC': 0.05, 'SFvCSP': 0.41}]
print(result.any_flag_prob) # [0.47]

Structure-aware embeddings (FlashABB-SSS)

FlashABB-SSS (seq2struct2seq) produces per-residue embeddings that combine sequence and predicted 3D structure. These can be used as features for downstream tasks.

from flash_abb import pretrained_sss

sss = pretrained_sss(device='cuda')

seqs = [
    'EVQLLESGGEVKKPGASVKVSCRASGYTFRNYGLTWVRQAPGQGLEWMGWISAYNGNTNYAQKFQGRVTLTTDTSTSTAYMELRSLRSDDTAVYFCARDVPGHGAAFMDVWGTGTTVTVSS|DIQLTQSPLSLPVTLGQPASISCRSSQSLEASDTNIYLSWFQQRPGQSPRRLIYKISNRDSGVPDRFSGSGSGTHFTLRISRVEADDVAVYYCMQGTHWPPAFGQGTKVDIK',
]

result = sss(seqs)
print(result.embeddings.shape)  # (1, n_residues, 128)
print(result.mask.shape)        # (1, n_residues)

Citation

@article{ellmen_modelling_2026,
    title = {Modelling antibody structures at the speed of language},
    author = {Ellmen, Isaac and Errington, David and Raybould, Matthew I. J. and Deane, Charlotte M.},
    year = {2026},
    url = {https://www.biorxiv.org/content/10.64898/2026.06.03.729879v1},
}

@article{ellmen_correcting_2026,
    title = {Correcting the Dropout-LayerNorm Expectation Gap Improves Protein Structure Models},
    author = {Ellmen, Isaac and Errington, David and Raybould, Matthew I. J. and Deane, Charlotte M.},
    year = {2026},
    url = {https://arxiv.org/abs/2609.32062},
}

Metadata

Release files for flash-abb 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flash-abb 0.0.5
File Size Uploaded Provenance Actions
flash_abb-0.0.5.tar.gz 78.7 MB With provenance Details for flash_abb-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flash-abb 0.0.5
File Interpreter ABI Platform Actions
flash_abb-0.0.5-py3-none-any.whl Python 3 none any Details for flash_abb-0.0.5-py3-none-any.whl

Total release size: 157.4 MB

Release files / flash_abb-0.0.5.tar.gz

Download URL flash_abb-0.0.5.tar.gz
Size 78.7 MB
Tags Source
SHA-256 checksum
How to use checksums
dd95815759e53cc632308e6961afe3cd1538f5a7daf5c40e57b1cb2fb06b830f
BLAKE2b-256 checksum
How to use checksums
b6c9f4a0332ca436f2b852cf9c68232c630b44f79db8ed5bec948b645271e968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / flash_abb-0.0.5-py3-none-any.whl

Download URL flash_abb-0.0.5-py3-none-any.whl
Size 78.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
97f1c067fa2d9d05c192a4f4678d56daff793dc6221323b847741c04cda7c7e2
BLAKE2b-256 checksum
How to use checksums
81e6349689cd3e88c0c5418a8be81f590b0dd3e7effbe754e522d57d07f15688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for flash-abb 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flash_abb-0.0.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page