Installation

antibody-utils requires Python 3.11 or later.

With uv

Add antibody-utils to a uv project:

uv add antibody-utils

With pip

pip install antibody-utils

Optional extras

numbering

Number raw sequences and structures with ANARCII. This pulls in PyTorch, which is a large download.

uv add "antibody-utils[numbering]"
pip install "antibody-utils[numbering]"

Tip

On Linux, the default PyTorch wheels from PyPI bundle CUDA libraries, a download of several gigabytes. To get the build that suits your machine (CPU-only, or your CUDA or ROCm version):

  • With uv’s pip interface, let uv detect your hardware:

    uv pip install --torch-backend=auto "antibody-utils[numbering]"
    

    uv add has no such flag; in a uv project, point torch at the right PyTorch index in your pyproject.toml instead, as described in uv’s PyTorch guide.

  • pip cannot detect your hardware, so install PyTorch first from the PyTorch index for your platform, e.g. CPU-only:

    pip install torch --index-url https://download.pytorch.org/whl/cpu
    pip install "antibody-utils[numbering]"
    

Installing for development

Clone the repository, fetch the BLOSUM62 matrix (not tracked in git) and install the development environment with uv:

git clone https://github.com/oxpig/antibody-utils.git
cd antibody-utils
uv run --no-project python scripts/fetch_blosum62.py
uv sync
uv run pytest