pengzhangzhi / ab_opt

Official implementation of Generative Diffusion Models for Antibody Design, Docking, and Optimization.
Apache License 2.0
41 stars 6 forks source link

Does optimize_ab.py support multiple CDRs? #5

Open TangYiChing opened 1 month ago

TangYiChing commented 1 month ago

Hello,

Could you suggest a way to optimize multiple CDRs? I've tried two options, but I need help to get them to work.

  1. --design_contig "95-102"
  2. (all)
File "/ab_opt/AbDock/src/tools/relax/pyrosetta_relaxer.py", line 97, in __call__
    if flexible_residue_first[-1] == ' ':
TypeError: 'NoneType' object is not subscriptable
!python optimize_ab.py \
    --num_gpus 1 \
    --process_per_gpu 1 \
    --docked_pose_dir "results/dock_multi/4o58.pdb_/MultipleCDRs" \
    --seq_design_dir "results/seq_design_fixed_pos/mutation/4o58_MultipleCDRs" \
    --design_model_ckpt "reproduction/seq_design_fixed_pos/300000.pt" \
    --screen_dir "results/screening/seq_design_fixed_pos/mutation/4o58_MultipleCDRs" \
    --dock_model_ckpt "reproduction/dock_multi_cdrs/300000.pt" \
    --heavy_chain_id "H" \
    --nums 10 \
    --pdb_suffix "4o58_rosetta"
pengzhangzhi commented 1 month ago

Thanks for trying the pipeline but unfortunately, the official implementation only support optimizing CDR3. While you can hack it to optimize other CDRs, you would have to re-train the whole system to make it optimizing all CDRs because it wasn't how the model being trained.

TangYiChing commented 1 month ago

I see.

By the way, could you describe each checkpoint in the reproduction folder? Most of them have a descriptive name, but some are not intuitive.

pengzhangzhi commented 1 month ago

Some of the checkpoints were designed for specific experiments. For example in your snippet, the "reproduction/seq_design_fixed_pos/300000.pt" was used for sequence design. All the useful ckpts are listed in the README, which you can just follow the instructions for specific usage such as sequence design and optimization. In general, the ckpt that starts with seq_design means given a backbone, designing the CDR sequence.