{"id":13958715,"url":"https://github.com/luost26/diffab","last_synced_at":"2025-10-29T16:31:57.090Z","repository":{"id":62690225,"uuid":"546420091","full_name":"luost26/diffab","owner":"luost26","description":"✌🏻 Antigen-Specific Antibody Design and Optimization with Diffusion-Based Generative Models for Protein Structures (NeurIPS 2022)","archived":false,"fork":false,"pushed_at":"2023-06-29T07:04:04.000Z","size":2996,"stargazers_count":302,"open_issues_count":18,"forks_count":45,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-07T13:10:03.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luost26.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-06T03:42:57.000Z","updated_at":"2025-02-06T07:45:24.000Z","dependencies_parsed_at":"2025-01-03T22:02:13.042Z","dependency_job_id":null,"html_url":"https://github.com/luost26/diffab","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"c3e2966601bf8025025ab87717b31b08fdd4834e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luost26%2Fdiffab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luost26%2Fdiffab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luost26%2Fdiffab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luost26%2Fdiffab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luost26","download_url":"https://codeload.github.com/luost26/diffab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238852804,"owners_count":19541534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-08T13:01:49.149Z","updated_at":"2025-10-29T16:31:51.387Z","avatar_url":"https://github.com/luost26.png","language":"Python","readme":"# DiffAb\n\n![cover-large](./assets/cover-large.png)\n\nAntigen-Specific Antibody Design and Optimization with Diffusion-Based Generative Models for Protein Structures (NeurIPS 2022) \n\n[[Paper]](https://www.biorxiv.org/content/10.1101/2022.07.10.499510.abstract)[[Demo]](https://huggingface.co/spaces/luost26/DiffAb)\n\n## Install\n\n### Environment\n\n```bash\nconda env create -f env.yaml -n diffab\nconda activate diffab\n```\n\nThe default `cudatoolkit` version is 11.3. You may change it in [`env.yaml`](./env.yaml).\n\n### Datasets and Trained Weights\n\nProtein structures in the `SAbDab` dataset can be downloaded [**here**](https://opig.stats.ox.ac.uk/webapps/newsabdab/sabdab/archive/all/). Extract `all_structures.zip` into the `data` folder. \n\nThe `data` folder contains a snapshot of the dataset index (`sabdab_summary_all.tsv`). You may replace the index with the latest version [**here**](https://opig.stats.ox.ac.uk/webapps/newsabdab/sabdab/summary/all/).\n\nTrained model weights are available [**here** (Hugging Face)](https://huggingface.co/luost26/DiffAb/tree/main) or [**here** (Google Drive)](https://drive.google.com/drive/folders/15ANqouWRTG2UmQS_p0ErSsrKsU4HmNQc?usp=sharing).\n\n### [Optional] HDOCK\n\nHDOCK is required to design CDRs for antigens without bound antibody frameworks. Please download HDOCK [**here**](http://huanglab.phys.hust.edu.cn/software/hdocklite/) and put the `hdock` and `createpl` programs into the [`bin`](./bin) folder.\n\n### [Optional] PyRosetta\n\nPyRosetta is required to relax the generated structures and compute binding energy. Please follow the instruction [**here**](https://www.pyrosetta.org/downloads) to install.\n\n### [Optional] Ray\n\nRay is required to relax and evaluate the generated antibodies. Please install Ray using the following command:\n\n```bash\npip install -U ray\n```\n\n## Design Antibodies\n\n5 design modes are available. Each mode corresponds to a config file in the `configs/test` folder:\n\n| Config File              | Description                                                  |\n| ------------------------ | ------------------------------------------------------------ |\n| `codesign_single.yml`    | Sample both the **sequence** and **structure** of **one** CDR. |\n| `codesign_multicdrs.yml` | Sample both the **sequence** and **structure** of **all** the CDRs simultaneously. |\n| `abopt_singlecdr.yml`    | Optimize the **sequence** and **structure** of **one** CDR.  |\n| `fixbb.yml`              | Sample only the **sequence** of **one** CDR (fix-backbone sequence design). |\n| `strpred.yml`            | Sample only the **structure** of **one** CDR (structure prediction). |\n\n### Antibody-Antigen Complex\n\nBelow is the usage of `design_pdb.py`. It samples CDRs for antibody-antigen complexes. The full list of options can be found in [`diffab/tools/runner/design_for_pdb.py`](diffab/tools/runner/design_for_pdb.py).\n\n```bash\npython design_pdb.py \\\n\t\u003cpath-to-pdb\u003e \\\n\t--heavy \u003cheavy-chain-id\u003e \\\n\t--light \u003clight-chain-id\u003e \\\n\t--config \u003cpath-to-config-file\u003e\n```\n\nThe `--heavy` and  `--light` options can be omitted as the script can automatically identify them with AbNumber and ANARCI.\n\nThe below example designs the six CDRs separately for the `7DK2_AB_C` antibody-antigen complex.\n\n```bash\npython design_pdb.py ./data/examples/7DK2_AB_C.pdb \\\n\t--config ./config/test/codesign_single.yml\n```\n\n### Antigen Only\n\nHDOCK is required to design antibodies for antigens without bound antibody structures (see above for instructions on installing HDOCK). Below is the usage of `design_dock.py`. \n\n```bash\npython design_dock.py \\\n\t--antigen \u003cpath-to-antigen-pdb\u003e \\\n\t--antibody \u003cpath-to-antibody-template-pdb\u003e \\\n\t--config \u003cpath-to-config-file\u003e\n```\n\nThe `--antibody` option is optional and the default antibody template is [`3QHF_Fv.pdb`](data/examples/3QHF_Fv.pdb). The full list of options can be found in the script.\n\nBelow is an example that designs antibodies for SARS-CoV-2 Omicron RBD.\n\n```python\npython design_dock.py \\\n\t--antigen ./data/examples/Omicron_RBD.pdb \\\n\t--config ./config/test/codesign_multicdrs.yml\n```\n\n## Train\n\n```bash\npython train.py ./configs/train/\u003cconfig-file-name\u003e\n```\n\n## Reference\n\n```bibtex\n@inproceedings{luo2022antigenspecific,\n  title={Antigen-Specific Antibody Design and Optimization with Diffusion-Based Generative Models for Protein Structures},\n  author={Shitong Luo and Yufeng Su and Xingang Peng and Sheng Wang and Jian Peng and Jianzhu Ma},\n  booktitle={Advances in Neural Information Processing Systems},\n  editor={Alice H. Oh and Alekh Agarwal and Danielle Belgrave and Kyunghyun Cho},\n  year={2022},\n  url={https://openreview.net/forum?id=jSorGn2Tjg}\n}\n```\n","funding_links":[],"categories":["其他_生物医药"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluost26%2Fdiffab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluost26%2Fdiffab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluost26%2Fdiffab/lists"}