rcsb-embedding-model 0.0.2__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rcsb-embedding-model might be problematic. Click here for more details.
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/PKG-INFO +3 -3
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/README.md +1 -1
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/examples/esm_embeddings.py +1 -1
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/pyproject.toml +2 -2
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/src/rcsb_embedding_model/rcsb_structure_embedding.py +8 -4
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/.gitignore +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/LICENSE.md +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/assets/embedding-model-architecture.png +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/src/rcsb_embedding_model/__init__.py +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/src/rcsb_embedding_model/model/layers.py +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/src/rcsb_embedding_model/model/residue_embedding_aggregator.py +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/tests/resources/1acb.cif +0 -0
- {rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/tests/test_model.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rcsb-embedding-model
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: Protein Embedding Model for Structure Search
|
|
5
5
|
Project-URL: Homepage, https://github.com/rcsb/rcsb-embedding-model
|
|
6
6
|
Project-URL: Issues, https://github.com/rcsb/rcsb-embedding-model/issues
|
|
@@ -11,7 +11,7 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3.10
|
|
13
13
|
Requires-Dist: esm>=3.2.0
|
|
14
|
-
Requires-Dist: torch>=2.
|
|
14
|
+
Requires-Dist: torch>=2.2.0
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
|
|
17
17
|
# RCSB Embedding Model: A Deep Learning Approach for 3D Structure Embeddings
|
|
@@ -70,7 +70,7 @@ res_embedding = model.residue_embedding(
|
|
|
70
70
|
)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
### **Generating Protein Structure**
|
|
73
|
+
### **Generating Protein Structure Embeddings**
|
|
74
74
|
Protein 3D structure embedding can be calculated as:
|
|
75
75
|
|
|
76
76
|
```python
|
|
@@ -4,7 +4,7 @@ import torch
|
|
|
4
4
|
from biotite.structure import chain_iter, get_residues, filter_amino_acids
|
|
5
5
|
from biotite.structure.io.pdb import PDBFile
|
|
6
6
|
from biotite.structure.io.pdbx import CIFFile, get_structure, BinaryCIFFile
|
|
7
|
-
from esm.models.esm3 import ESM3, ESM3_OPEN_SMALL
|
|
7
|
+
from esm.models.esm3 import ESM3, ESM3_OPEN_SMALL
|
|
8
8
|
from esm.sdk.api import ESMProtein, SamplingConfig
|
|
9
9
|
from esm.utils.structure.protein_chain import ProteinChain
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "rcsb-embedding-model"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.3"
|
|
4
4
|
authors = [
|
|
5
5
|
{ name="Joan Segura", email="joan.segura@rcsb.org" },
|
|
6
6
|
]
|
|
@@ -15,7 +15,7 @@ license = "BSD-3-Clause"
|
|
|
15
15
|
license-files = ["LICEN[CS]E*"]
|
|
16
16
|
dependencies=[
|
|
17
17
|
"esm >= 3.2.0",
|
|
18
|
-
"torch >= 2.
|
|
18
|
+
"torch >= 2.2.0"
|
|
19
19
|
]
|
|
20
20
|
[project.urls]
|
|
21
21
|
Homepage = "https://github.com/rcsb/rcsb-embedding-model"
|
|
@@ -29,10 +29,7 @@ class RcsbStructureEmbedding:
|
|
|
29
29
|
def load_residue_embedding(self, device=None):
|
|
30
30
|
if not device:
|
|
31
31
|
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
32
|
-
self.__residue_embedding =
|
|
33
|
-
ESM3_OPEN_SMALL,
|
|
34
|
-
device
|
|
35
|
-
)
|
|
32
|
+
self.__residue_embedding = _load_res_model(device)
|
|
36
33
|
|
|
37
34
|
def load_aggregator_embedding(self, device=None):
|
|
38
35
|
if not device:
|
|
@@ -146,3 +143,10 @@ def _load_model(model_path, device=None):
|
|
|
146
143
|
aggregator_model.to(device)
|
|
147
144
|
aggregator_model.eval()
|
|
148
145
|
return aggregator_model
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def _load_res_model(device=None):
|
|
149
|
+
return ESM3.from_pretrained(
|
|
150
|
+
ESM3_OPEN_SMALL,
|
|
151
|
+
device
|
|
152
|
+
)
|
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/assets/embedding-model-architecture.png
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/src/rcsb_embedding_model/__init__.py
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.2 → rcsb_embedding_model-0.0.3}/src/rcsb_embedding_model/model/layers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|