fmilletari-czi commited on
Commit
69869f7
·
verified ·
1 Parent(s): b1324dd

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -45,22 +45,22 @@ Refer to the [paper](https://www.biorxiv.org/content/10.64898/2026.06.03.729735)
45
 
46
  ### Usage
47
 
48
- Please install `esm` from GitHub (a PyPI release is coming soon):
49
 
50
  ```
51
- pip install esm@git+https://github.com/Biohub/esm.git@main
52
  ```
53
 
54
  You can fold your first protein with:
55
 
56
  ```py
57
- from transformers.models.esmfold2.modeling_esmfold2 import ESMFold2Model
58
 
59
  # Ubiquitin (PDB 1UBQ)
60
  sequence = "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
61
 
62
  # optionally use "biohub/ESMFold2"
63
- model = ESMFold2Model.from_pretrained("biohub/ESMFold2-Fast").cuda().eval()
64
  output = model.infer_protein(sequence, num_loops=3, num_sampling_steps=50)
65
 
66
  print(f"pLDDT mean: {float(output['plddt'].mean()):.3f}, pTM: {float(output['ptm'].mean()):.3f}")
@@ -72,12 +72,12 @@ You can also fold complex biomolecules — proteins, DNA/RNA (with modified resi
72
  from esm.models.esmfold2 import (
73
  DNAInput,
74
  ESMFold2InputBuilder,
 
75
  LigandInput,
76
  Modification,
77
  ProteinInput,
78
  StructurePredictionInput,
79
  )
80
- from transformers.models.esmfold2.modeling_esmfold2 import ESMFold2Model
81
 
82
  HHAI_SEQ = (
83
  "MIEIKDKQLTGLRFIDLFAGLGGFRLALESCGAECVYSNEWDKYAQEVYEMNFGEKPEGDITQVNEKTIPDH"
@@ -87,7 +87,7 @@ HHAI_SEQ = (
87
  "YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY"
88
  )
89
 
90
- model = ESMFold2Model.from_pretrained("biohub/ESMFold2").cuda().eval()
91
 
92
  spi = StructurePredictionInput(
93
  sequences=[
 
45
 
46
  ### Usage
47
 
48
+ Please install `esm` from PyPI:
49
 
50
  ```
51
+ pip install esm
52
  ```
53
 
54
  You can fold your first protein with:
55
 
56
  ```py
57
+ from transformers.models.esmfold2.modeling_esmfold2 import EsmFold2Model
58
 
59
  # Ubiquitin (PDB 1UBQ)
60
  sequence = "MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG"
61
 
62
  # optionally use "biohub/ESMFold2"
63
+ model = EsmFold2Model.from_pretrained("biohub/ESMFold2-Fast", device_map="auto").eval()
64
  output = model.infer_protein(sequence, num_loops=3, num_sampling_steps=50)
65
 
66
  print(f"pLDDT mean: {float(output['plddt'].mean()):.3f}, pTM: {float(output['ptm'].mean()):.3f}")
 
72
  from esm.models.esmfold2 import (
73
  DNAInput,
74
  ESMFold2InputBuilder,
75
+ EsmFold2Model,
76
  LigandInput,
77
  Modification,
78
  ProteinInput,
79
  StructurePredictionInput,
80
  )
 
81
 
82
  HHAI_SEQ = (
83
  "MIEIKDKQLTGLRFIDLFAGLGGFRLALESCGAECVYSNEWDKYAQEVYEMNFGEKPEGDITQVNEKTIPDH"
 
87
  "YKVHPSTSQAYKQFGNSVVINVLQYIAYNIGSSLNFKPY"
88
  )
89
 
90
+ model = EsmFold2Model.from_pretrained("biohub/ESMFold2", device="cuda").eval()
91
 
92
  spi = StructurePredictionInput(
93
  sequences=[