{"id":18983129,"url":"https://github.com/rosettacommons/af2_peptide_hallucination","last_synced_at":"2025-11-01T10:07:54.621Z","repository":{"id":213531768,"uuid":"734327203","full_name":"RosettaCommons/AF2_peptide_hallucination","owner":"RosettaCommons","description":"Code for designing binders to flexible peptides with AlphaFold2 Hallucination","archived":false,"fork":false,"pushed_at":"2023-12-21T12:54:27.000Z","size":2150,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T12:46:46.144Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RosettaCommons.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}},"created_at":"2023-12-21T12:07:25.000Z","updated_at":"2025-02-27T02:40:09.000Z","dependencies_parsed_at":"2023-12-21T15:45:05.354Z","dependency_job_id":"9a7627f9-701b-4f54-97de-2d4d2c507b52","html_url":"https://github.com/RosettaCommons/AF2_peptide_hallucination","commit_stats":null,"previous_names":["rosettacommons/af2_peptide_hallucination"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RosettaCommons%2FAF2_peptide_hallucination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RosettaCommons%2FAF2_peptide_hallucination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RosettaCommons%2FAF2_peptide_hallucination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RosettaCommons%2FAF2_peptide_hallucination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RosettaCommons","download_url":"https://codeload.github.com/RosettaCommons/AF2_peptide_hallucination/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249246230,"owners_count":21237012,"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-11-08T16:16:02.407Z","updated_at":"2025-11-01T10:07:54.575Z","avatar_url":"https://github.com/RosettaCommons.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlphaFold2 Hallucination for Flexible Peptide Binding\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./.img/Convergence.png\" alt=\"alt text\" width=\"1100px\" align=\"middle\"/\u003e\n\u003c/p\u003e\n\n## Description\n\nCode for generating binders to flexible peptides using Hallucination (Activation Maximisation) with AlphaFold2.\n\nFrom [Vazquez-Torres, S., Leung, P.J.Y., Venkatesh, P. *et al*., De novo design of high-affinity binders of bioactive helical peptides, *Nature* 2023](https://www.nature.com/articles/s41586-023-06953-1).\n\nThe code is very heavily based upon, and uses much of the code from Basile Wicky and Lukas Milles' [Oligomer Hallucination](https://github.com/bwicky/oligomer_hallucination) code,\ndescribed in [Wicky, B.I.M., Milles, L.F. Courbet, A. *et al*., Hallucinating symmetric protein assemblies, *Science* 2022](https://www.science.org/doi/10.1126/science.add1964).\n\nThe underlying method relies on the [AlphaFold2 structure prediction network](https://github.com/google-deepmind/alphafold) from Google Deepmind,\ndescribed in [Jumper, J. *et al*., Highly accurate protein structure prediction with AlphaFold, *Nature* 2021](https://www.nature.com/articles/s41586-021-03819-2). \n\nAuthor: Joseph L. Watson; joewatchwell.\n\n## Important Note\n\nAs demonstrated in the Nature article, binders can be generated to flexible peptides using RFdiffusion, which produces higher quality outputs and is several orders of magnitude more compute-efficient.\nThis code is provided for reproducibility purposes only.\n\n[RFdiffusion](https://github.com/RosettaCommons/RFdiffusion) was originally described in [Watson, J.L., Juergens, D., Bennett, N.R., Trippe, B.L., Yim, J., Eisenach, H.E., Ahern W. *et al*.,\nDe novo design of protein structure and function with RFdiffusion, *Nature* 2023](https://www.nature.com/articles/s41586-023-06415-8).\n\n\n----\n\n# Table of contents\n\n- [AlphaFold2 Hallucination for Flexible Peptide Binding](#alphafold2-hallucination-for-flexible-peptide-binding)\n  - [Description](#description)\n  - [Important Note](#important-note)\n- [Table of contents](#table-of-contents)\n- [Getting started / installation](#getting-started--installation)\n- [Designing binders with AF2 Hallucination](#designing-binders-with-af2-hallucination)\n  - [Modifying the loss parameters](#modifying-the-loss-parameters)\n  - [Modifying Hallucination parameters](#modifying-hallucination-parameters)\n- [Downstream steps](#downstream-steps)\n- [Acknowledgements](#acknowledgements)\n\n# Getting started / installation\n\nYou'll first need to clone the repository and its submodules:\n\n```\ngit clone --recursive https://github.com/RosettaCommons/AF2_peptide_hallucination.git\n```\n\nEnsure that you have either [Anaconda or Miniconda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) installed.\nYou can then create a conda environment from the provided `.yml` file\n```\nconda env create -f env/SE3_PEPTIDE\nconda activate SE3_PEPTIDE\n```\nBy default, we clone the AlphaFold2 repository. If you already have AlphaFold2 installed locally, you can skip this step, but if not:\n\n```\ncd submodules/alpahafold\npython setup.py install\n```\n\n# Designing binders with AF2 Hallucination\n\nOnce you have installed everything, you're ready to go!\nThe goal of this project was to be able to design binders to flexible peptides (helical peptides in the Nature article).\nThe flexibility of the peptides means that there is no single static structure that the peptides adopt, and hence, we want to be able to design binders to a variety of the possible states.\nWe leveraged the fact that AF2 is a structure prediction network to simultaneously design binders while predicting the structure of the peptide sequence.\nTherefore, the only required input is a peptide sequence and the length of the binder you want to Hallucinate.\nThe arguments are provided through Hydra configs. The default configuration can be found in  `config/base.yaml`. You can either build a new config file, or specify arguments at the command line.\n\n```\npython run.py input.target_sequence=QEDIIRNIARHLAQVGDSMDRSIPPG input.binder_length=100\n```\n\nYou probably want to change the output path:\n\n```\noutput.out_dir=length_100_binders output.out_prefix=Bid_binders\n```\n\nBy default, we won't override existing files, but this behaviour can be turned off:\n\n```\noutput.cautious=False\n```\n\n## Modifying the loss parameters\n\nFor simplicity, the losses implemented in this repository are just those used to design binders in the Nature article, with very minor performance improvements.\nThe default weights on each loss, as defined in the config file, are those used in the article. These can be modified trivially however. At the command line, you could, for example, provide:\n\n```\nloss.plddt=5 loss.ptm=0\n```\nThis would upweight the `plddt` loss (from its default value of 1) and turn off the `pTM` loss.\n\nThese losses are defined in `util/losses.py`. It is very simple to add additional losses, if you so desire.\n\n## Modifying Hallucination parameters\n\nThe hallucination parameters are taken directly from the [Oligomer Hallucination](https://github.com/bwicky/oligomer_hallucination) repository. You can easily modify things like the Softmax temperature and half-life. For example:\n\n```\nhallucination.T_init=0.05 hallucination.half_life=500\n```\nWould start with a higher temperature (so higher chance of accepting a \"bad\" mutation) but a shorter half life (so this chance decays faster).\n\n## Optimising an existing binder\n\nYou can also try to optimise an existing binder. Here, we provide a specific starting sequence (rather than generating a random one).\n\n```\ninput.binder_sequence=EELTIEVRIEGVDPETAARIEAIFKSVWEPRAKKLSLEGQKALVEALARALVAALKEHGIDARVHVKLIKDGEVVHELEF\n```\n\n# Downstream steps\n\nOnce you have run some Hallucination trajectories, you'll want to do some downstream processing before ordering.\nFollowing [Wicky, B.I.M., Milles, L.F., Courbet, A. *et al*., *Science* 2022](https://www.science.org/doi/10.1126/science.add1964), who noted that the sequences that AF2 Hallucination produces are generally insoluble,\nin the Nature article we redesigned the sequence of the binders with [ProteinMPNN](https://github.com/dauparas/ProteinMPNN),\ndescribed in [Dauparas, J. *et al*, Robust deep learning–based protein sequence design using ProteinMPNN, *Science* 2022](https://www.science.org/doi/10.1126/science.add2187).\n\nWe then filtered these sequences based on AF2 pLDDT, pTM, RMSD to the design model, RMSD of the monomer to the binder model (without the peptide), and Rosetta ddg. \n\n# Acknowledgements\n\nThis work was made possible by the following separate libraries and packages:\n\n* [Oligomer Hallucination](https://github.com/bwicky/oligomer_hallucination)\n* [AlphaFold2](https://github.com/deepmind/alphafold)\n* [ProteinMPNN](https://github.com/dauparas/ProteinMPNN)\n*\t[Rosetta](https://www.rosettacommons.org/software)\n*\t[PyRosetta](https://www.pyrosetta.org/)\n\nThank you all their contributors and maintainers!\n\n# Get in touch\n\nQuestions and comments are welcome:\n\n* Joseph Watson: [jwatson3@uw.edu](mailto:jwatson3@uw.edu)\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosettacommons%2Faf2_peptide_hallucination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosettacommons%2Faf2_peptide_hallucination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosettacommons%2Faf2_peptide_hallucination/lists"}