biohub/ESMFold2-Fast
11376k
1---2license:3- mit4license_link: https://github.com/Biohub/esm/blob/main/THIRD_PARTY_NOTICE.md5language: en6tags:7- biology8- esm9- protein10- protein-structure-prediction11- structure-prediction12- protein-design13- 3d-structure14- confidence-estimation15- molecular-dynamics16- transformers17---18 19# ESMFold220 21## Model Details22 23ESMFold2 is a state-of-the-art model for protein structure prediction and design that defines a new frontier for speed and accuracy. The model predicts high-resolution, all-atom 3D protein structures directly from amino acid sequences, with optional multiple sequence alignment (MSA) input for enhanced accuracy on challenging targets. The model outputs comprehensive structural information including all-atom coordinates (backbone and side chains), confidence metrics (pLDDT, pAE, pTM, iPTM), and optional distogram predictions for detailed analysis of predicted structures. Unlike ESMFold, ESMFold2 is able to predict structures for all biomolecules, including small molecules, DNA, RNA, and modified amino acids.24 25ESMFold2 is capable of either single-sequence or MSA conditioned structure prediction for improved accuracy on difficult targets. The ESMFold2-Fast variant is an inference optimized single-sequence structure prediction model and is not MSA conditioned.26 27To run this model with the Biohub Platform API, visit the [Biohub Platform](https://biohub.ai/).28 29Read more about ESMFold2 in our paper [here](https://www.biorxiv.org/content/10.64898/2026.06.03.729735).30 31## Model Variants32 33| Model | MSA Conditioning | Description | Data Cutoff |34| :---- | :---- | :---- | :---- |35| [ESMFold2](https://huggingface.co/biohub/ESMFold2) | Yes | Large model, capable of either single-sequence or MSA conditioned structure prediction for improved accuracy on difficult targets | Sept 2021 |36| [ESMFold2-Fast](https://huggingface.co/biohub/ESMFold2-Fast) | No | Inference optimized single-sequence structure prediction model | Sept 2021 |37 38## Performance Metrics39 40ESMfold2 was evaluated against state-of-the-art single-sequence and MSA-based structure prediction models on the FoldBench benchmark. ESMFold2 meets or exceeds performance by AlphaFold3 on antibody-antigen complex prediction, protein-protein complex prediction and [Runs N' Poses](https://www.biorxiv.org/content/10.1101/2025.02.03.636309v1) benchmarks. Inference-time compute can dramatically improve performance of ESMFold2, especially across antibody-antigen complexes.41 42![][image1]43 44Refer to the [paper](https://www.biorxiv.org/content/10.64898/2026.06.03.729735) for details on additional performance metrics.45 46### Usage47 48Please install `esm` from PyPI:49 50```51pip install esm52```53 54You can fold your first protein with:55 56```py57from transformers.models.esmfold2.modeling_esmfold2 import EsmFold2Model58 59# Ubiquitin (PDB 1UBQ)60sequence = "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"61 62# optionally use "biohub/ESMFold2"63model = EsmFold2Model.from_pretrained("biohub/ESMFold2-Fast", device_map="auto").eval()64output = model.infer_protein(sequence, num_loops=3, num_sampling_steps=50)65 66print(f"pLDDT mean: {float(output['plddt'].mean()):.3f}, pTM: {float(output['ptm'].mean()):.3f}")67```68 69You can also fold complex biomolecules — proteins, DNA/RNA (with modified residues), and small-molecule ligands all at once. Here's an example folding the HhaI DNA methyltransferase + its cognate DNA (with a trapped 5-fluoro-2′-deoxycytidine, CCD `C36`) + the SAH cofactor (PDB [1MHT](https://www.rcsb.org/structure/1MHT)):70 71```py72from esm.models.esmfold2 import (73 DNAInput,74 ESMFold2InputBuilder,75 EsmFold2Model,76 LigandInput,77 Modification,78 ProteinInput,79 StructurePredictionInput,80)81 82HHAI_SEQ = (83 "MIEIKDKQLTGLRFIDLFAGLGGFRLALESCGAECVYSNEWDKYAQEVYEMNFGEKPEGDITQVNEKTIPDH"84 "DILCAGFPCQAFSISGKQKGFEDSRGTLFFDIARIVREKKPKVVFMENVKNFASHDNGNTLEVVKNTMNELD"85 "YSFHAKVLNALDYGIPQKRERIYMICFRNDLNIQNFQFPKPFELNTFVKDLLLPDSEVEHLVIDRKDLVMTN"86 "QEIEQTTPKTVRLGIVGKGGQGERIYSTRGIAITLSAYGGGIFAKTGGYLVNGKTRKLHPRECARVMGYPDS"87 "YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY"88)89 90model = EsmFold2Model.from_pretrained("biohub/ESMFold2", device="cuda").eval()91 92spi = StructurePredictionInput(93 sequences=[94 ProteinInput(id="A", sequence=HHAI_SEQ),95 DNAInput(96 id="B",97 sequence="GATAGCGCTATC",98 modifications=[Modification(position=5, ccd="C36")],99 ),100 DNAInput(101 id="C",102 sequence="TGATAGCGCTATC",103 modifications=[Modification(position=6, ccd="C36")],104 ),105 LigandInput(id="L", ccd=["SAH"]),106 ]107)108 109result = ESMFold2InputBuilder().fold(110 model, spi, num_loops=3, num_sampling_steps=50, num_diffusion_samples=1, seed=0111)112 113print(f"pLDDT mean: {float(result.plddt.mean()):.3f}, pTM: {float(result.ptm):.3f}, ipTM: {float(result.iptm):.3f}")114 115with open("1mht_pred.cif", "w") as f:116 f.write(result.complex.to_mmcif())117```118 119For the Biohub API, first generate an [API key](https://biohub.ai/developer-console/api-keys) and add it to your Biohub account. The code below assumes the environment variable `ESM_API_KEY=$YOUR_API_KEY`.120 121```py122import os123 124from esm.models.esmfold2 import (125 DNAInput,126 LigandInput,127 Modification,128 ProteinInput,129 StructurePredictionInput,130)131from esm.sdk import esmfold2_client132from esm.sdk.api import FoldingConfig133 134HHAI_SEQ = (135 "MIEIKDKQLTGLRFIDLFAGLGGFRLALESCGAECVYSNEWDKYAQEVYEMNFGEKPEGDITQVNEKTIPDH"136 "DILCAGFPCQAFSISGKQKGFEDSRGTLFFDIARIVREKKPKVVFMENVKNFASHDNGNTLEVVKNTMNELD"137 "YSFHAKVLNALDYGIPQKRERIYMICFRNDLNIQNFQFPKPFELNTFVKDLLLPDSEVEHLVIDRKDLVMTN"138 "QEIEQTTPKTVRLGIVGKGGQGERIYSTRGIAITLSAYGGGIFAKTGGYLVNGKTRKLHPRECARVMGYPDS"139 "YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY"140)141 142client = esmfold2_client(model="esmfold2-fast-2026-05", token=os.environ["ESM_API_KEY"])143 144spi = StructurePredictionInput(145 sequences=[146 ProteinInput(id="A", sequence=HHAI_SEQ),147 DNAInput(148 id="B",149 sequence="GATAGCGCTATC",150 modifications=[Modification(position=5, ccd="C36")],151 ),152 DNAInput(153 id="C",154 sequence="TGATAGCGCTATC",155 modifications=[Modification(position=6, ccd="C36")],156 ),157 LigandInput(id="L", ccd=["SAH"]),158 ]159)160 161result = client.fold_all_atom(spi, config=FoldingConfig(num_loops=3, num_sampling_steps=50))162 163print(f"pLDDT mean: {float(result.plddt.mean()):.3f}, pTM: {float(result.ptm):.3f}, ipTM: {float(result.iptm):.3f}")164```165 166For multi-chain complexes (e.g. antibody–antigen), you can supply paired MSAs to take advantage of inter-chain co-evolution. See the [ESMFold2 tutorial](https://github.com/biohub/esm/blob/main/cookbook/tutorials/esmfold2.ipynb) for details.167 168## Training Data169 170ESMfold2 was trained on sequences from the Protein Data Bank (PDB) and the AlphaFold DB (AFDB).171 172## Frontier Safety173 174Biohub has established a safety team to assess the benefits and potential risks of our models and tools prior to release, and develop mitigations where necessary. Risk assessment was conducted for ESMFold2 prior to release. Further details are available in our corresponding paper appendix.175 176Informed by our risk assessments, we are releasing the source code and model weights for ESMFold2.177 178[Biohub.ai](http://Biohub.ai) Platform: We implement guardrails that detect and restrict the use of keywords and sequences corresponding to controlled pathogens and toxins on our freely accessible platform. For further details regarding these guardrails, please refer to our Biohub platform Resources page.179 180## Biases and Limitations181 182- **Dataset biases**: The model may reflect biases present in the training data (PDB, AFDB), including over-representation of certain protein families, experimental conditions, or structural classes. Performance may vary for underrepresented protein types.183- **Dataset limitations:** PDB historically lacks comprehensive data on protein conformations, post-translational modifications, disordered regions, etc. Like all other structure prediction models trained on the PDB, performance may degrade on other biomolecules.184- **Computational demand:** Highest accuracy structure predictions require scaling inference time compute. Predictions made with reduced inference parameters may lead to suboptimal performance.185- **Experimental validation required**: All predictions should be considered hypotheses requiring experimental validation. The model cannot replace experimental structure determination methods (X-ray crystallography, cryo-EM, NMR) for definitive structural characterization.186 187### Out-of-Scope or Unauthorized Use Cases188 189Do not use the model for the following purposes:190 191- Any use that is prohibited by the [Acceptable Use Policy](https://biohub.org/acceptable-use-policy/).192 193### Caveats and Recommendations194 195- Always review and validate outputs generated by the model.196- Treat model outputs as machine-generated hypotheses that require further experimental validation, not as established biological facts.197- We are committed to advancing the responsible development and use of artificial intelligence.198 199Should you have any security or privacy issues or questions related to this model, please reach out to our team at [support@biohub.org](mailto:support@biohub.org).200 201### Citation202 203```204@misc{candido2026language,205 title = {Language Modeling Materializes a World Model of Protein Biology},206 author = {Candido, Salvatore and Hayes, Thomas and Derry, Alexander and Rao, Roshan207 and Lin, Zeming and Verkuil, Robert and Wu, Bryan and Lee, Jin Sub208 and Bruguera, Elise S. and Keval, Jehan A. and Kopylov, Mykhailo209 and Pak, John E. and Wu, Wesley and Thomas, Neil and Mataraso, Samson210 and Hsu, Alvin and Trotman-Grant, Ashton C. and Fatras, Kilian211 and dos Santos Costa, Allan and Badkundri, Rohil and Ak{\i}n, Halil212 and Oktay, Deniz and Deaton, Jonathan and Montabana, Elizabeth213 and Sitwala, Hrishita and Yu, Yue and Wiggert, Marius214 and Carlin, Dylan Alexander and Goering, Anthony W. and Blazejewski, Tomasz215 and Sandora, McCullen and Hla, Michael and Jia, Tina Z.216 and Kloker, Leon H. and Sofroniew, Nicholas J. and Uehara, Masatoshi217 and Pannu, Jassi and Bachas, Sharrol and Liu, Daniel S.218 and Sercu, Tom and Rives, Alexander},219 year = {2026},220 url = {https://www.biorxiv.org/content/10.64898/2026.06.03.729735},221 note = {Preprint}222}223```224 225## Acknowledgements226 227Many people on the Biohub AI Research team and prior EvolutionaryScale team contributed to the development of this model. It would not have been possible without them.228 229[image1]: images/folding_evals.png230 