pyjess 0.5.0__cp37-cp37m-macosx_10_12_x86_64.whl → 0.5.1__cp37-cp37m-macosx_10_12_x86_64.whl
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 pyjess might be problematic. Click here for more details.
- pyjess/_jess.cpython-37m-darwin.so +0 -0
- pyjess/_jess.pyx +13 -1
- pyjess/tests/test_jess.py +23 -0
- {pyjess-0.5.0.dist-info → pyjess-0.5.1.dist-info}/METADATA +3 -3
- {pyjess-0.5.0.dist-info → pyjess-0.5.1.dist-info}/RECORD +7 -7
- {pyjess-0.5.0.dist-info → pyjess-0.5.1.dist-info}/WHEEL +0 -0
- {pyjess-0.5.0.dist-info → pyjess-0.5.1.dist-info}/licenses/COPYING +0 -0
|
Binary file
|
pyjess/_jess.pyx
CHANGED
|
@@ -31,6 +31,7 @@ cimport jess.molecule
|
|
|
31
31
|
cimport jess.super
|
|
32
32
|
cimport jess.tess_template
|
|
33
33
|
cimport jess.tess_atom
|
|
34
|
+
cimport jess.res_index
|
|
34
35
|
from jess.atom cimport Atom as _Atom
|
|
35
36
|
from jess.jess cimport Jess as _Jess
|
|
36
37
|
from jess.jess cimport JessQuery as _JessQuery
|
|
@@ -172,6 +173,7 @@ cdef class Molecule:
|
|
|
172
173
|
if self._mol is NULL:
|
|
173
174
|
raise MemoryError("Failed to allocate molecule")
|
|
174
175
|
|
|
176
|
+
self._mol.index = NULL
|
|
175
177
|
self._mol.count = count
|
|
176
178
|
for i in range(count):
|
|
177
179
|
self._mol.atom[i] = NULL
|
|
@@ -184,6 +186,10 @@ cdef class Molecule:
|
|
|
184
186
|
raise MemoryError("Failed to allocate atom")
|
|
185
187
|
memcpy(self._mol.atom[i], atom._atom, sizeof(_Atom))
|
|
186
188
|
|
|
189
|
+
self._mol.index = jess.res_index.ResIndex_create(self._mol.atom, count)
|
|
190
|
+
if self._mol.index is NULL:
|
|
191
|
+
raise MemoryError("Failed to allocate residue index")
|
|
192
|
+
|
|
187
193
|
def __len__(self):
|
|
188
194
|
assert self._mol is not NULL
|
|
189
195
|
return self._mol.count
|
|
@@ -274,6 +280,7 @@ cdef class Molecule:
|
|
|
274
280
|
if copy._mol is NULL:
|
|
275
281
|
raise MemoryError("Failed to allocate molecule")
|
|
276
282
|
# copy molecule attributes
|
|
283
|
+
copy._mol.index = NULL
|
|
277
284
|
copy._mol.count = self._mol.count
|
|
278
285
|
memset(copy._mol.id, b' ', 5)
|
|
279
286
|
# copy molecule atoms
|
|
@@ -282,6 +289,10 @@ cdef class Molecule:
|
|
|
282
289
|
if copy._mol.atom[i] is NULL:
|
|
283
290
|
raise MemoryError("Failed to allocate atom")
|
|
284
291
|
memcpy(copy._mol.atom[i], self._mol.atom[i], sizeof(_Atom))
|
|
292
|
+
# regenerate index
|
|
293
|
+
copy._mol.index = jess.res_index.ResIndex_create(copy._mol.atom, copy._mol.count)
|
|
294
|
+
if copy._mol.index is NULL:
|
|
295
|
+
raise MemoryError("Failed to allocate residue index")
|
|
285
296
|
|
|
286
297
|
copy._id = self._id
|
|
287
298
|
return copy
|
|
@@ -1011,6 +1022,7 @@ cdef class Template:
|
|
|
1011
1022
|
self._tpl.count = jess.tess_template.TessTemplate_count
|
|
1012
1023
|
self._tpl.range = jess.tess_template.TessTemplate_range
|
|
1013
1024
|
self._tpl.check = jess.tess_template.TessTemplate_check
|
|
1025
|
+
self._tpl.candidates = jess.tess_template.TessTemplate_candidates
|
|
1014
1026
|
self._tpl.name = jess.tess_template.TessTemplate_name
|
|
1015
1027
|
self._tpl.logE = jess.tess_template.TessTemplate_logE
|
|
1016
1028
|
self._tpl.distWeight = jess.tess_template.TessTemplate_distWeight
|
|
@@ -1417,7 +1429,7 @@ cdef class Hit:
|
|
|
1417
1429
|
|
|
1418
1430
|
mol = self._molecule.copy()
|
|
1419
1431
|
for k in range(mol._mol.count):
|
|
1420
|
-
atom = mol._mol.atom[
|
|
1432
|
+
atom = mol._mol.atom[k]
|
|
1421
1433
|
for i in range(3):
|
|
1422
1434
|
atom.x[i] = v[i]
|
|
1423
1435
|
for j in range(3):
|
pyjess/tests/test_jess.py
CHANGED
|
@@ -92,6 +92,29 @@ class TestJess(unittest.TestCase):
|
|
|
92
92
|
self.assertEqual(len(jess[:1]), 1)
|
|
93
93
|
self.assertEqual(len(jess[1:]), 0)
|
|
94
94
|
|
|
95
|
+
|
|
96
|
+
@unittest.skipUnless(files, "importlib.resources not available")
|
|
97
|
+
def test_multiple_query_split(self):
|
|
98
|
+
with files(data).joinpath("template_01.qry").open() as f:
|
|
99
|
+
template1 = Template.load(f)
|
|
100
|
+
with files(data).joinpath("template_02.qry").open() as f:
|
|
101
|
+
template2 = Template.load(f)
|
|
102
|
+
j0 = Jess([template1, template2])
|
|
103
|
+
j1 = Jess([template1])
|
|
104
|
+
j2 = Jess([template2])
|
|
105
|
+
|
|
106
|
+
with files(data).joinpath("1AMY.pdb").open() as f:
|
|
107
|
+
molecule = Molecule.load(f)
|
|
108
|
+
|
|
109
|
+
h0 = list(j0.query(molecule, 2, 5, 5))
|
|
110
|
+
h1 = list(j1.query(molecule, 2, 5, 5))
|
|
111
|
+
h2 = list(j2.query(molecule, 2, 5, 5))
|
|
112
|
+
|
|
113
|
+
self.assertEqual(len(h0), len(h1) + len(h2))
|
|
114
|
+
for hit0, hit1 in zip(h0, (*h1, *h2)):
|
|
115
|
+
self.assertEqual(hit0.atoms(), hit1.atoms())
|
|
116
|
+
self.assertEqual(hit0.evalue, hit1.evalue)
|
|
117
|
+
|
|
95
118
|
@unittest.skipUnless(files, "importlib.resources not available")
|
|
96
119
|
def test_query_template_subclass(self):
|
|
97
120
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyjess
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: Cython bindings and Python interface to JESS, a 3D template matching software.
|
|
5
5
|
Keywords: bioinformatics,structure,template,matching
|
|
6
6
|
Author-Email: Martin Larralde <martin.larralde@embl.de>
|
|
@@ -75,7 +75,7 @@ Description-Content-Type: text/markdown
|
|
|
75
75
|
[](https://github.com/althonos/pyjess/issues)
|
|
76
76
|
[](https://pyjess.readthedocs.io)
|
|
77
77
|
[](https://github.com/althonos/pyjess/blob/main/CHANGELOG.md)
|
|
78
|
-
[&style=flat-square&label=downloads&color=303f9f&cacheSeconds=86400)](https://pepy.tech/project/pyjess)
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
## 🗺️ Overview
|
|
@@ -183,7 +183,7 @@ If running Jess in parallel, make sure to use `v0.2.1` or later to use the code
|
|
|
183
183
|
|
|
184
184
|
### ⚠️ Issue Tracker
|
|
185
185
|
|
|
186
|
-
Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/
|
|
186
|
+
Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/pyjess/issues)
|
|
187
187
|
if you need to report or ask something. If you are filing in on a bug,
|
|
188
188
|
please include as much information as you can about the issue, and try to
|
|
189
189
|
recreate the same bug in a simple, easily reproducible situation.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
pyjess-0.5.
|
|
2
|
-
pyjess-0.5.
|
|
3
|
-
pyjess-0.5.
|
|
4
|
-
pyjess-0.5.
|
|
5
|
-
pyjess/_jess.cpython-37m-darwin.so,sha256=
|
|
1
|
+
pyjess-0.5.1.dist-info/RECORD,,
|
|
2
|
+
pyjess-0.5.1.dist-info/WHEEL,sha256=Wsi_lXX_sKLMtJHeb1WxDLuMVTM1ph0TYt9swrajcwI,115
|
|
3
|
+
pyjess-0.5.1.dist-info/METADATA,sha256=PhFPRpjXmBV5buGbsOCI_POYVUNYzVksJ4LSYcBkZn0,11218
|
|
4
|
+
pyjess-0.5.1.dist-info/licenses/COPYING,sha256=gLCfHtBLTrghVX7GkpmZqoozWMNN46502m_OUiYy01Y,1103
|
|
5
|
+
pyjess/_jess.cpython-37m-darwin.so,sha256=b9-ZHzZLwKk1z4AbBIrT7C9SjYP4-VIOxoIO4veSq88,310080
|
|
6
6
|
pyjess/_jess.pyi,sha256=OjbEcgr16eFEnAFbT_zp-jqjd4XME2V_gxuKZJBXVoc,6896
|
|
7
7
|
pyjess/CMakeLists.txt,sha256=Oa0pniEQx9jXyFCJGyrswn9ahWSSVuW1madyeP6StoI,35
|
|
8
8
|
pyjess/__init__.py,sha256=h4XXLdS4FnyVa-MBs_k3eZMG1jWxeiOJnwfBaJA9gyQ,745
|
|
9
9
|
pyjess/.gitignore,sha256=uQBOufp4v50qn0aZKv6zbSo00cjfB-v9KySog7rlmIU,19
|
|
10
|
-
pyjess/_jess.pyx,sha256=
|
|
10
|
+
pyjess/_jess.pyx,sha256=kbAp0zWfxliPvzJ9c5G3oeRUKFcxtedo4oav-1uQotQ,50546
|
|
11
11
|
pyjess/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
pyjess/tests/__init__.py,sha256=MdHWtr6A8S4TBWlkoj4olFK2FXAGc5uJdbWtgFrDLpk,528
|
|
13
13
|
pyjess/tests/test_molecule.py,sha256=RHBE0yL_j71nQOwXJ6t_PzkZi4BaFPY5Q0VwKWM6elk,5311
|
|
14
14
|
pyjess/tests/utils.py,sha256=dsaphex7qomJCvSHWnVy79iYDPGiL59xqGAtRoVAeWc,196
|
|
15
15
|
pyjess/tests/test_atom.py,sha256=omNznNbRXMDt2j1plAUlfWPGCfmtkYpj2jysEX1zQuY,4631
|
|
16
|
-
pyjess/tests/test_jess.py,sha256=
|
|
16
|
+
pyjess/tests/test_jess.py,sha256=lTp_KzkbPF5J0nWewO4LJrKeKuXtSlzj114kPG-54zM,10642
|
|
17
17
|
pyjess/tests/test_template.py,sha256=XMLELYRB4j7xavziZ-ntq15PjhNHNfJJkctUq9BkvEI,4541
|
|
18
18
|
pyjess/tests/test_template_atom.py,sha256=s9tJ_SAgvKeGwbVjaTWY-EtsUeQp3eu4NF5ja3oO_84,3405
|
|
19
19
|
pyjess/tests/data/pdb1lnb.pdb,sha256=E9Jjy4qQ75O1UKIXcVyVJHE1XDNx1Rb7ENPVrehW6N8,270054
|
|
File without changes
|
|
File without changes
|