iMut-CDR-GC / DeepCDR-3D /README.md
linbuliao's picture
Release evaluated DeepCDR-3D
7b84963 verified
|
Raw History Blame Contribute Delete
3.55 kB
---
language: en
tags:
- biology
- antibody
- protein
- pytorch
- graph-neural-network
---
# DeepCDR-3D
DeepCDR-3D scores antibody–antigen pairs from an antibody CDR graph and an
antigen-pocket graph. It is the structure-based interaction scorer used in
[iMut-CDR-GC](https://github.com/linbuliao/iMut-CDR-GC), an
affinity-maturation-inspired antibody-design workflow.
## Files and implementation
- `model.pt`: the evaluated PyTorch tensor state dictionary, 24,285,608 bytes.
- `amino_acid_vectors_30dim.json`: the exact residue-feature mapping.
- `release_manifest.json`: file hashes and the source-code revision.
The model has 6,068,845 parameters. Separate graph-convolution branches encode
the antigen pocket and antibody CDRs; their pooled representations feed a
sigmoid classifier. Residue graphs use 30-dimensional features and CA contacts
strictly below 5 Å. The antigen enters the first branch and the antibody enters
the second. Preserve these input roles and the documented graph construction.
Source code and input preparation are provided by the
[iMut-CDR-GC scoring package](https://github.com/linbuliao/iMut-CDR-GC/blob/main/docs/scoring.md).
## Download and load
```bash
pip install "imut-cdr-gc[structure] @ git+https://github.com/linbuliao/iMut-CDR-GC@23dc11908d6e09b6e40feca2da4c503e9228d5c8" huggingface_hub
```
```python
import hashlib
from pathlib import Path
import torch
from huggingface_hub import snapshot_download
from imut_cdr_gc.scoring._vendor.deepcdr3d_model import DeepCDR3DNet
repository = Path(snapshot_download(
repo_id="linbuliao/iMut-CDR-GC",
local_dir="assets/imut_cdr_gc",
allow_patterns=["DeepCDR-3D/*"],
))
directory = repository / "DeepCDR-3D"
weights = directory / "model.pt"
expected = "35dd2b41dc4765ec08fd2cb09006811c6078c389845205b7772a76030c262672"
assert hashlib.sha256(weights.read_bytes()).hexdigest() == expected
model = DeepCDR3DNet()
model.load_state_dict(torch.load(weights, map_location="cpu", weights_only=True), strict=True)
model.eval()
```
For scoring, use `imut_cdr_gc.scoring.score_3d` with the candidate's actual
numbered antibody fold, its H/L sequences, the antigen pocket, and the pinned
feature mapping. The linked documentation defines these inputs. This folder
contains a custom-network state dictionary, not a Transformers `AutoModel`.
## Training and evaluation scope
The retained processed training pool comprises 5,846 cognate pairs and 35,076
constructed mismatched pairs. Mismatches are training negatives, not
experimentally measured nonbinders. Historical random validation does not
establish antibody-, antigen- or homology-disjoint performance.
Native/portable graph and forward-output agreement was checked on 60 actual
antibody/pocket pairs. This checks implementation equivalence; it is not an
experimental affinity evaluation. The output is an interaction-classifier
score, not a measured binding affinity. Applicability and score distributions
must be checked for each target; near-constant scores do not provide useful
within-target ranking.
## Related resources
- [iMut-CDR-GC code and reproducibility documentation](https://github.com/linbuliao/iMut-CDR-GC)
- [DeepCDR-ESM2](https://github.com/haiping1010/DeepCDR_esm2), the sequence-based scorer used in the workflow.
- [DeepGCN_Anti](https://github.com/haiping1010/DeepGCN_Anti), related dual-graph code provenance.
The model weights are released by the project authors. Public hosting does not
assign a new license to third-party code or dependencies; retain their terms.