Package: igfold
IgFoldOfficial repository forIgFold: Fast, accurate antibody structure prediction from deep learning on massive set of natural antibodies.The code and pre-trained models from this work are made available for non-commercial use (including at commercial entities) under the terms of theJHU Academic Software License Agreement. For commercial inquiries, please contact Johns Hopkins Tech Ventures atawichma2@jhu.edu.Try antibody structure prediction inGoogle Colab.UpdatesUpdating to IgFold v0.4.0 is strongly recommended for proper PDB output formatting.- Version 0.4.0
   - Fix PDB output formatting issuesInstallFor easiest use,create a conda environmentand install IgFold via PyPI:$pipinstalligfoldTo access the latest version of the code, clone and install the repository:$gitclonegit@github.com:Graylab/IgFold.git$pipinstallIgFoldRefinementTwo refinement methods are supported for IgFold predictions. To follow the manuscript, PyRosetta should be installed following the instructionshere. If PyRosetta is not installed, refinement with OpenMM will be attempted. For this option, OpenMM must be installed and configured before running IgFold as follows:$condainstall-cconda-forgeopenmm==7.7.0pdbfixerRenumberingAntibody renumbering requires installation of AbNumber. To install AbNumber, run the following command:$condainstall-cbiocondaabnumberUsageAntibody structure prediction from sequencePaired antibody sequences can be provided as a dictionary of sequences, where the keys are chain names and the values are the sequences.fromigfoldimportIgFoldRunnerfromigfold.refine.pyrosetta_refimportinit_pyrosettainit_pyrosetta()sequences={"H":"EVQLVQSGPEVKKPGTSVKVSCKASGFTFMSSAVQWVRQARGQRLEWIGWIVIGSGNTNYAQKFQERVTITRDMSTSTAYMELSSLRSEDTAVYYCAAPYCSSISCNDGFDIWGQGTMVTVS","L":"DVVMTQTPFSLPVSLGDQASISCRSSQSLVHSNGNTYLHWYLQKPGQSPKLLIYKVSNRFSGVPDRFSGSGSGTDFTLKISRVEAEDLGVYFCSQSTHVPYTFGGGTKLEIK"}pred_pdb="my_antibody.pdb"igfold=IgFoldRunner()igfold.fold(pred_pdb,# Output PDB filesequences=sequences,# Antibody sequencesdo_refine=True,# Refine the antibody structure with PyRosettado_renum=True,# Renumber predicted antibody structure (Chothia))To predict a nanobody structure (or an individual heavy or light chain), simply provide one sequence:fromigfoldimportIgFoldRunnerfromigfold.refine.pyrosetta_refimportinit_pyrosettainit_pyrosetta()sequences={"H":"QVQLQESGGGLVQAGGSLTLSCAVSGLTFSNYAMGWFRQAPGKEREFVAAITWDGGNTYYTDSVKGRFTISRDNAKNTVFLQMNSLKPEDTAVYYCAAKLLGSSRYELALAGYDYWGQGTQVTVS"}pred_pdb="my_nanobody.pdb"igfold=IgFoldRunner()igfold.fold(pred_pdb,# Output PDB filesequences=sequences,# Nanobody sequencedo_refine=True,# Refine the antibody structure with PyRosettado_renum=True,# Renumber predicted antibody structure (Chothia))To predict a structure without refinement, setdo_refine=False:fromigfoldimportIgFoldRunnersequences={"H":"QVQLQESGGGLVQAGGSLTLSCAVSGLTFSNYAMGWFRQAPGKEREFVAAITWDGGNTYYTDSVKGRFTISRDNAKNTVFLQMNSLKPEDTAVYYCAAKLLGSSRYELALAGYDYWGQGTQVTVS"}pred_pdb="my_nanobody.pdb"igfold=IgFoldRunner()igfold.fold(pred_pdb,# Output PDB filesequences=sequences,# Nanobody sequencedo_refine=False,# Refine the antibody structure with PyRosettado_renum=True,# Renumber predicted antibody structure (Chothia))Predicted RMSD for antibody structuresRMSD estimates are calculated per-residue and recorded in the B-factor column of the output PDB file. These values are also returned from thefoldmethod.fromigfoldimportIgFoldRunnerfromigfold.refine.pyrosetta_refimportinit_pyrosettainit_pyrosetta()sequences={"H":"EVQLVQSGPEVKKPGTSVKVSCKASGFTFMSSAVQWVRQARGQRLEWIGWIVIGSGNTNYAQKFQERVTITRDMSTSTAYMELSSLRSEDTAVYYCAAPYCSSISCNDGFDIWGQGTMVTVS","L":"DVVMTQTPFSLPVSLGDQASISCRSSQSLVHSNGNTYLHWYLQKPGQSPKLLIYKVSNRFSGVPDRFSGSGSGTDFTLKISRVEAEDLGVYFCSQSTHVPYTFGGGTKLEIK"}pred_pdb="my_antibody.pdb"igfold=IgFoldRunner()out=igfold.fold(pred_pdb,# Output PDB filesequences=sequences,# Antibody sequencesdo_refine=True,# Refine the antibody structure with PyRosettado_renum=True,# Renumber predicted antibody structure (Chothia))out.prmsd# Predicted RMSD for each residue's N, CA, C, CB atoms (dim: 1, L, 4)Antibody sequence embeddingRepresentations from IgFold may be useful as features for machine learning models. Theembedmethod can be used to surface a variety of antibody representations from the model:fromigfoldimportIgFoldRunnersequences={"H":"EVQLVQSGPEVKKPGTSVKVSCKASGFTFMSSAVQWVRQARGQRLEWIGWIVIGSGNTNYAQKFQERVTITRDMSTSTAYMELSSLRSEDTAVYYCAAPYCSSISCNDGFDIWGQGTMVTVS","L":"DVVMTQTPFSLPVSLGDQASISCRSSQSLVHSNGNTYLHWYLQKPGQSPKLLIYKVSNRFSGVPDRFSGSGSGTDFTLKISRVEAEDLGVYFCSQSTHVPYTFGGGTKLEIK"}igfold=IgFoldRunner()emb=igfold.embed(sequences=sequences,# Antibody sequences)emb.bert_embs# Embeddings from AntiBERTy final hidden layer (dim: 1, L, 512)emb.gt_embs# Embeddings after graph transformer layers (dim: 1, L, 64)emb.structure_embs# Embeddings after template incorporation IPA (dim: 1, L, 64)Extra optionsRefinement with OpenMM can be prioritized over PyRosetta by settinguse_openmm=True.fromigfoldimportIgFoldRunnersequences={"H":"EVQLVQSGPEVKKPGTSVKVSCKASGFTFMSSAVQWVRQARGQRLEWIGWIVIGSGNTNYAQKFQERVTITRDMSTSTAYMELSSLRSEDTAVYYCAAPYCSSISCNDGFDIWGQGTMVTVS","L":"DVVMTQTPFSLPVSLGDQASISCRSSQSLVHSNGNTYLHWYLQKPGQSPKLLIYKVSNRFSGVPDRFSGSGSGTDFTLKISRVEAEDLGVYFCSQSTHVPYTFGGGTKLEIK"}pred_pdb="my_antibody.pdb"igfold=IgFoldRunner()igfold.fold(pred_pdb,# Output PDB filesequences=sequences,# Antibody sequencesdo_refine=True,# Refine the antibody structure with PyRosettause_openmm=True,# Use OpenMM for refinementdo_renum=True,# Renumber predicted antibody structure (Chothia))Synthetic antibody structuresTo demonstrate the capabilities of IgFold for large-scale prediction of antibody structures, we applied the model to two sets of natural paired antibody sequences.The first set contains 104K non-redundant paired antibody sequences from the Observed Antibody Space database. These predicted structures are made available for useonline.$wgethttps://data.graylab.jhu.edu/OAS_paired.tar.gzThe second set contains 1.3M unique paired antibodies from four human donors, collected byJaffe et al.. These predicted structures are made available for useonline.$wgethttps://data.graylab.jhu.edu/Jaffe2022.tar.gzBug reportsIf you run into any problems while using IgFold, please create aGithub issuewith a description of the problem and the steps to reproduce it.Citing this work@article{ruffolo2023fast,title={Fast, accurate antibody structure prediction from deep learning on massive set of natural antibodies},author={Ruffolo, Jeffrey A and Chu, Lee-Shin and Mahajan, Sai Pooja and Gray, Jeffrey J},journal={Nature communications},volume={14},number={1},pages={2389},year={2023},publisher={Nature Publishing Group UK London}}@article{ruffolo2021deciphering,title={Deciphering antibody affinity maturation with language models and weakly supervised learning},author={Ruffolo, Jeffrey A and Gray, Jeffrey J and Sulam, Jeremias},journal={arXiv},year={2021}}