rcsb-embedding-model 0.0.8__tar.gz → 0.0.10__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.8 → rcsb_embedding_model-0.0.10}/PKG-INFO +2 -2
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/README.md +1 -1
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/pyproject.toml +1 -1
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/dataset/esm_prot_from_structure.py +3 -2
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/utils/structure_parser.py +3 -2
- rcsb_embedding_model-0.0.10/tests/test_remote_inference.py +28 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/.gitignore +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/LICENSE.md +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/assets/embedding-model-architecture.png +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/examples/esm_embeddings.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/__init__.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/cli/args_utils.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/cli/inference.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/dataset/esm_prot_from_chain.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/dataset/resdiue_assembly_embedding_from_structure.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/dataset/residue_assembly_embedding_from_tensor_file.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/dataset/residue_embedding_from_tensor_file.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/inference/assembly_inferece.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/inference/chain_inference.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/inference/esm_inference.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/inference/structure_inference.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/model/layers.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/model/residue_embedding_aggregator.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/modules/chain_module.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/modules/esm_module.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/modules/structure_module.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/rcsb_structure_embedding.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/types/api_types.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/utils/data.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/utils/model.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/utils/structure_provider.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/writer/batch_writer.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/1acb.A.pt +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/1acb.B.pt +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/2uzi.A.pt +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/2uzi.B.pt +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/2uzi.C.pt +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/esm-from-chain-inference.csv +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/pdb/1acb.cif +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/pdb/2uzi.cif +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/test_embedding_model.py +0 -0
- {rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/test_inference.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.10
|
|
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
|
|
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
|
|
|
18
18
|
|
|
19
19
|
# RCSB Embedding Model
|
|
20
20
|
|
|
21
|
-
**Version** 0.0.
|
|
21
|
+
**Version** 0.0.10
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
## Overview
|
|
@@ -33,8 +33,9 @@ class EsmProtFromStructure(EsmProtFromChain):
|
|
|
33
33
|
super().__init__(
|
|
34
34
|
src_stream=self.__get_chains(src_stream),
|
|
35
35
|
src_location=SrcLocation.stream,
|
|
36
|
-
structure_location=
|
|
37
|
-
structure_format=structure_format
|
|
36
|
+
structure_location=structure_location,
|
|
37
|
+
structure_format=structure_format,
|
|
38
|
+
structure_provider=structure_provider
|
|
38
39
|
)
|
|
39
40
|
|
|
40
41
|
def __get_chains(self, src_stream):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from biotite.structure import filter_amino_acids, chain_iter, get_chains, get_residues, AtomArray
|
|
1
|
+
from biotite.structure import filter_amino_acids, filter_polymer, chain_iter, get_chains, get_residues, AtomArray
|
|
2
2
|
from biotite.structure.io.pdb import PDBFile, get_structure as get_pdb_structure, get_assembly as get_pdb_assembly, list_assemblies as list_pdb_assemblies
|
|
3
3
|
from biotite.structure.io.pdbx import CIFFile, get_structure, get_assembly, BinaryCIFFile, list_assemblies
|
|
4
4
|
|
|
@@ -30,7 +30,8 @@ def get_structure_from_src(
|
|
|
30
30
|
def get_protein_chains(structure, min_res_n=0):
|
|
31
31
|
chain_ids = []
|
|
32
32
|
for atom_ch in chain_iter(structure):
|
|
33
|
-
atom_res = atom_ch[
|
|
33
|
+
atom_res = atom_ch[filter_polymer(atom_ch)]
|
|
34
|
+
atom_res = atom_res[filter_amino_acids(atom_res)]
|
|
34
35
|
if len(atom_res) > 0 and len(get_residues(atom_res)) > min_res_n:
|
|
35
36
|
chain_ids.append(str(get_chains(atom_res)[0]))
|
|
36
37
|
return tuple(chain_ids)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from rcsb_embedding_model.types.api_types import SrcLocation, SrcProteinFrom, StructureLocation, StructureFormat, \
|
|
4
|
+
Accelerator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TestRemoteInference(unittest.TestCase):
|
|
8
|
+
|
|
9
|
+
def test_esm_inference_from_structure(self):
|
|
10
|
+
from rcsb_embedding_model.inference.esm_inference import predict
|
|
11
|
+
|
|
12
|
+
esm_embeddings = predict(
|
|
13
|
+
src_stream=[
|
|
14
|
+
("3jce", "https://files.rcsb.org/download/3jce.cif", "3jce"),
|
|
15
|
+
("9qxy", "https://files.rcsb.org/download/9qxy.cif", "9qxy")
|
|
16
|
+
],
|
|
17
|
+
src_location=SrcLocation.stream,
|
|
18
|
+
src_from=SrcProteinFrom.structure,
|
|
19
|
+
structure_location=StructureLocation.remote,
|
|
20
|
+
structure_format=StructureFormat.mmcif,
|
|
21
|
+
accelerator=Accelerator.cpu
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
self.assertEqual(len(esm_embeddings), 52)
|
|
25
|
+
shapes = ((208, 1536), (207, 1536), (152, 1536), (104, 1536), (153, 1536), (131, 1536), (129, 1536), (100, 1536), (119, 1536), (125, 1536), (116, 1536), (102, 1536), (90, 1536), (84, 1536), (82, 1536), (57, 1536), (81, 1536), (87, 1536), (53, 1536), (220, 1536), (58, 1536), (52, 1536), (48, 1536), (66, 1536), (40, 1536), (236, 1536), (272, 1536), (211, 1536), (203, 1536), (179, 1536), (178, 1536), (151, 1536), (143, 1536), (144, 1536), (124, 1536), (145, 1536), (138, 1536), (122, 1536), (118, 1536), (116, 1536), (119, 1536), (105, 1536), (112, 1536), (95, 1536), (104, 1536), (96, 1536), (81, 1536), (79, 1536), (65, 1536), (60, 1536), (588, 1536), (208, 1536))
|
|
26
|
+
for idx, shape in enumerate(shapes):
|
|
27
|
+
self.assertEqual(tuple(esm_embeddings[idx][0][0].shape), shape)
|
|
28
|
+
|
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/assets/embedding-model-architecture.png
RENAMED
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/cli/inference.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/model/layers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/utils/data.py
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/src/rcsb_embedding_model/utils/model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/1acb.A.pt
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/1acb.B.pt
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/2uzi.A.pt
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/2uzi.B.pt
RENAMED
|
File without changes
|
{rcsb_embedding_model-0.0.8 → rcsb_embedding_model-0.0.10}/tests/resources/embeddings/2uzi.C.pt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|