Extended AbFold package for AbDiff inference workflows
Project description
AbFold Extended
AbFold Extended packages the abfold Python modules used by the AbDiff
pipeline. The PyPI distribution name is abfold-extended, while the Python
import package remains abfold for compatibility with existing AbDiff code.
This repository is based on the original HK-GSAS/AbFold implementation, with engineering changes for packaging and AbDiff integration.
Installation
Install the package from PyPI:
pip install abfold-extended==0.2.0
Code should continue to import abfold:
from abfold.config import config
from abfold.model import AbFold
For the AbDiff H3-mask stage, install the optional ANARCI extra:
pip install "abfold-extended[h3]==0.2.0"
Optional extras:
pip install "abfold-extended[diffusion]==0.2.0"
pip install "abfold-extended[train]==0.2.0"
pip install "abfold-extended[all]==0.2.0"
Package Scope
This MVP package is intended to make AbDiff's AbFold-facing imports stable:
from abfold.config import config
from abfold.model import AbFold
from abfold.data.data_process import process_repr, process_fasta
from abfold.data.data_process import get_CDRs_mask_with_anarci
from abfold.np import protein
from abfold.np.residue_constants import str_sequence_to_aatype
from abfold.train_ema import tensor_dict_to_device
from abfold.training_config import config as training_config
The package does not include pretrained checkpoints, benchmark data, AF2
representations, IgFold embeddings, or a standalone predict.py entry point.
Those assets must be supplied by the calling workflow.
AbDiff Usage
AbDiff can depend on this package by installing abfold-extended while keeping
its existing source imports as from abfold ....
For a full AbDiff pipeline environment, use the optional extras needed by the stages you run. In particular, Stage 4 requires ANARCI:
pip install "abfold-extended[h3]==0.2.0"
Development Checks
Run the lightweight smoke tests:
python -m unittest discover -s tests -v
Run the wheel build and install smoke test:
ABFOLD_WHEEL_SMOKE=1 python -m unittest discover -s tests -v
On Windows PowerShell:
$env:ABFOLD_WHEEL_SMOKE = "1"
python -m unittest discover -s tests -v
Notes
- The distribution name and import name are intentionally different:
pip install abfold-extended, thenimport abfold. - Optional dependencies such as
diffusers,deepspeed, andanarciare loaded only by the features that need them. - Published PyPI files are immutable. If a release is flawed, publish a new version and yank the flawed release instead of trying to replace it.
Citation
@article{abfold,
title = {AbFold -- an AlphaFold Based Transfer Learning Model for Accurate Antibody Structure Prediction},
author = {Peng, Chao and Wang, Zelong and Zhao, Peize and Ge, Weifeng and Huang, Charles},
journal = {bioRxiv},
year = {2023}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abfold_extended-0.2.0.tar.gz.
File metadata
- Download URL: abfold_extended-0.2.0.tar.gz
- Upload date:
- Size: 137.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
740adc2d593b6a7f80778c6c93c96212f16aaf1ca40f892a59367ea6ab3944e7
|
|
| MD5 |
49f04fe7760cdc3015d3da853ff11c0e
|
|
| BLAKE2b-256 |
ee8bdacc12cf9002419007b0282ed384692e4f2fcfb854bb860a5a5dd8858722
|
File details
Details for the file abfold_extended-0.2.0-py3-none-any.whl.
File metadata
- Download URL: abfold_extended-0.2.0-py3-none-any.whl
- Upload date:
- Size: 158.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55e3193ecb767b3f095017537d0f12fdcbd4b6cce266d265f6f6d2ac9b851eb7
|
|
| MD5 |
844f0f9b504eb7824f6811d428c59cc5
|
|
| BLAKE2b-256 |
e39d057202d16f7f67307b8037fc0cb69c194c5c9caa80cdc5cdfb51c40ff6a0
|