This is a public repository for our paper Anfinsen Goes Neural: a Graphical Model for Conditional Antibody Design.
# clone project
git clone https://github.com/lkny123/AGN.git
cd AGN
# setup environment
source scripts/install.sh
- Download
all_structures.zip
from the SAbDab download page. - Move
all_structures.zip
toAGN/MEAN
- Unzip with
unzip all_structures.zip
We use the data-preprocessing scripts provided by MEAN.
cd MEAN # in AGN/MEAN directory
bash scripts/prepare_data_kfold.sh summaries/sabdab_summary.tsv all_structures/imgt
bash scripts/prepare_data_rabd.sh summaries/rabd_summary.jsonl all_structures/imgt summaries/sabdab_all.json
bash scripts/prepare_data_skempi.sh summaries/skempi_v2_summary.jsonl all_structures/imgt summaries/sabdab_all.json
# copy data splits to AGN/data
mkdir -p ../data && \
rsync -avm --include='*/' \
--include='train.json' \
--include='valid.json' \
--include='test.json' \
--include='*.pdb' \
--exclude='*' \
summaries/ ../data/
# data pre-processing for ESM2
cd ../ # in AGN directory
bash scripts/prepare_data_kfold.sh
bash scripts/prepare_data_rabd.sh
bash scripts/prepare_data_skempi.sh
We first fine-tune/evaluate the sequence design model ESM2, then use its sequence predictions \hat{s} to train/evaluate the structure prediction model MEAN.
# Step 1: Sequence design
bash scripts/k_fold_train.sh # training sequence design model
bash scripts/k_fold_eval.sh # evaluate AAR
# Step 2: Structure prediction
bash scripts/generate_seqs_kfold.sh # generate sequence -- i.e., the input of the structure prediction model
cd MEAN # in AGN/MEAN directory
GPU=0 bash scripts/k_fold_train.sh summaries 111 mean 9901
GPU=0 bash scripts/k_fold_eval.sh summaries 111 mean 0
# Step 1: Sequence design
bash scripts/task2_train.sh # training sequence design model
bash scripts/task2_eval.sh # evaluate AAR and CoSim
# Step 2: Structure prediction (MEAN)
bash scripts/generate_seqs_rabd.sh # generate sequence -- i.e., the input of the structure prediction model
cd MEAN # in AGN/MEAN directory
GPU=0 MODE=111 DATA_DIR=summaries/cdrh3 bash train.sh mean 3
GPU=0 MODE=111 DATA_DIR=summaries/cdrh3 bash rabd_test.sh 0
We deeply appreciate the following works/repositories, on which our project heavily relies.
- Structure-informed Language Models Are Protein Designers
- MEAN: Conditional Antibody Design as 3D Equivariant Graph Translation
- Evolutionary Scale Modeling
- Deep Learning-Guided Optimization of Human Antibody Against SARS-CoV-2 Variants with Broad Neutralization
- Scoring function for automated assessment of protein structure template quality
- E(n) Equivariant Graph Neural Networks
- ANARCI: antigen receptor numbering and receptor classification