{"id":28700522,"url":"https://github.com/deepgraphlearning/gearbind","last_synced_at":"2025-06-14T11:08:16.822Z","repository":{"id":254118404,"uuid":"832969828","full_name":"DeepGraphLearning/GearBind","owner":"DeepGraphLearning","description":"Pretrainable geometric graph neural network for antibody affinity maturation","archived":false,"fork":false,"pushed_at":"2025-03-18T05:36:19.000Z","size":1313,"stargazers_count":49,"open_issues_count":6,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-18T06:32:02.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/DeepGraphLearning.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":"2024-07-24T05:24:26.000Z","updated_at":"2025-03-18T05:36:22.000Z","dependencies_parsed_at":"2024-08-21T14:50:31.018Z","dependency_job_id":null,"html_url":"https://github.com/DeepGraphLearning/GearBind","commit_stats":null,"previous_names":["deepgraphlearning/gearbind"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DeepGraphLearning/GearBind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepGraphLearning%2FGearBind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepGraphLearning%2FGearBind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepGraphLearning%2FGearBind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepGraphLearning%2FGearBind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepGraphLearning","download_url":"https://codeload.github.com/DeepGraphLearning/GearBind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepGraphLearning%2FGearBind/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259804865,"owners_count":22913903,"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":"2025-06-14T11:08:09.126Z","updated_at":"2025-06-14T11:08:16.817Z","avatar_url":"https://github.com/DeepGraphLearning.png","language":"Python","readme":"# GearBind\n\nFor the latest version of GearBind code and the link to the datasets, please refer to https://github.com/DeepGraphLearning/GearBind.\n\n## Overview\n\nGearBind is a pretrainable geometric graph neural network for protein-protein binding affinity change (ddG_bind) prediction.\nIt is pretrained on CATH using contrastive learning and fine-tuned on SKEMPI with a regression loss.\nHere we provide the inference code of GearBind.\n\nThis codebase is based on PyTorch and [TorchDrug]. It supports training and inference with multiple GPUs or multiple machines.\n\n[TorchDrug]: https://github.com/DeepGraphLearning/torchdrug\n\n## Installation\n\nYou may install the dependencies via either conda or pip. Generally, GearBind works\nwith Python 3.8/3.9 and PyTorch version \u003e= 1.8.0.\n\nWindows, Mac OS X and Linux should all be supported.\n\n### From Conda\n\nIf internet connection is smooth, the installation should be completed within 15 minutes.\n[Using mamba as the conda solver](https://www.anaconda.com/blog/a-faster-conda-for-a-growing-community) can potentially speed up the installation process.\n\n```bash\nconda install pyg pytorch=1.8.0 cudatoolkit=11.1 torchdrug -c pyg -c pytorch -c conda-forge\nconda install rdkit easydict pyyaml biopython gdown -c conda-forge\n```\n\n\n## Inference on HER2 and CR3022\n\nNow we show how to use our (pre-)trained models for inference on new wild-type proteins.\nHere we take the HER2 and CR3022 proteins used in the paper as examples.\nFirst, you need to download the checkpoints to the `./checkpoints` directory.\nNote that we can not provide FoldX-generated HER2 and CR3022 mutant structures due to license restrictions.\nPlease prepare the wild-type and mutant structures yourself.\nThe prepared dataset should have the following file structure:\n\n- `data.csv`: a csv file with columns \"pdb_id\", \"mutation\", \"chain_a\", \"chain_b\", \"wt_protein\", \"mt_protein\", where\n    - \"pdb_id\" is the stem of the protein complex structure file name\n    - \"mutation\" is the comma-separated mutation list\n    - \"chain_a\" and \"chain_b\" are interacting chains in the complex (e.g., HL and C),\n    - \"wt_protein\" and \"mt_protein\" are the file names of the wild-type and mutant structures, respectively.\n- `data`: folder storing the wild-type and mutant structures.\n\nThe PDB structures used to prepare the HER2 (`1n8z.pdb`) and CR3022 dataset (`6xc3_wt.pdb`) are provided in the `data` directory.\n`6xc3_ba4.pdb` and `6xc3_ba11.pdb` are the PDB structures of CR3022 against the RBD of BA.4 and BA.1.1 strains of SARS-CoV-2, respectively, modelled by SWISS-MODEL.\n\n```bash\n# Downloading model checkpoints\ncd checkpoints\ngdown 1nFEjbjdlRWFwYz7LUNv_D6oLnEsZ5beJ\nunzip new-gearbind-model-weights.zip\nmv new-gearbind-model-weights/*.pth ./\nrm -rf new-gearbind-model-weights\ncd ..\n```\n\nWe have prepared the config file in the `./config/predict` directory.\nTo get the prediction results of the pre-trained models on different variants, you can run the following commands.\n\n```bash\n# Run GearBind-P models on CR3022 datasets\npython script/predict.py -c config/predict/CR3022_GearBindP.yaml\n\n# Run GearBind models on HER2 datasets\npython script/predict.py -c config/predict/HER2_GearBind.yaml\n```\n\nThe inference should take about 2 minutes on a single A100 GPU. The expected output for HER2 binders are stored in `results/GearBind_HER2_1n8z_renum.pdb_HL_C.csv`.\nAfter finishing the prediction, you are expected to get an output file called `\u003cmodel_class\u003e_\u003cdataset_class\u003e_\u003ctest_split\u003e.csv`.\nFor the second case, the name of the output file is `GearBind_HER2_1n8z_renum.pdb_HL_C.csv`.\nYou can compare this output with the results we provide in `./results`.\n\nTo run the model on your own protein complexes, you need to\n1. prepare the dataset with FoldX\n2. write a customized dataset class following `dataset.HER2` and `dataset.CR3022`\n3. add a `.yaml` file by modifying the configuration of the dataset class\n\n\n## SKEMPI preprocesssing\n\nThe following commands process SKEMPI from raw data, including downloading the raw data, processing the data so that it is ready for FoldX mutagenesis.\n\n```bash\npython script/process_skempi.py --csv-path $SKEMPI_CSV_PATH --pdb-dir $SKEMPI_PDB_DIR --output-csv-path $PROCESSED_SKEMPI_CSV_PATH --output-pdb-dir $PROCESSED_SKEMPI_PDB_DIR --no-repair\n```\n\nwhere\n- `SKEMPI_CSV_PATH`: the path to the raw SKEMPI csv file.\n- `SKEMPI_PDB_DIR`: the directory containing the raw SKEMPI pdb files.\n- `PROCESSED_SKEMPI_CSV_PATH`: the path to the processed SKEMPI csv file.\n- `PROCESSED_SKEMPI_PDB_DIR`: the directory to store the processed SKEMPI pdb files.\n\nThe processed SKEMPI dataset and all model predictions can be found in `data/skempi_v2_with_all_results_0415.csv`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgraphlearning%2Fgearbind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepgraphlearning%2Fgearbind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepgraphlearning%2Fgearbind/lists"}