pyjess 0.4.1__tar.gz → 0.5.1__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 pyjess might be problematic. Click here for more details.

Files changed (126) hide show
  1. {pyjess-0.4.1 → pyjess-0.5.1}/.github/workflows/package.yml +2 -7
  2. {pyjess-0.4.1 → pyjess-0.5.1}/.github/workflows/test.yml +1 -1
  3. {pyjess-0.4.1 → pyjess-0.5.1}/CHANGELOG.md +21 -1
  4. {pyjess-0.4.1 → pyjess-0.5.1}/COPYING +1 -1
  5. {pyjess-0.4.1 → pyjess-0.5.1}/PKG-INFO +48 -36
  6. {pyjess-0.4.1 → pyjess-0.5.1}/README.md +22 -12
  7. {pyjess-0.4.1 → pyjess-0.5.1}/docs/_static/json/switcher.json +6 -1
  8. {pyjess-0.4.1 → pyjess-0.5.1}/docs/index.rst +1 -1
  9. pyjess-0.5.1/include/jess/candidate_set.pxd +15 -0
  10. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/molecule.pxd +3 -1
  11. pyjess-0.5.1/include/jess/res_index.pxd +15 -0
  12. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/template.pxd +3 -1
  13. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/tess_template.pxd +3 -0
  14. pyjess-0.5.1/patches/CMakeLists.txt.patch +35 -0
  15. pyjess-0.5.1/patches/CandidateSet.c.patch +71 -0
  16. pyjess-0.5.1/patches/CandidateSet.h.patch +51 -0
  17. {pyjess-0.4.1 → pyjess-0.5.1}/patches/Jess.c.patch +27 -5
  18. pyjess-0.5.1/patches/Molecule.c.patch +54 -0
  19. pyjess-0.5.1/patches/Molecule.h.patch +35 -0
  20. pyjess-0.5.1/patches/ResIndex.c.patch +168 -0
  21. pyjess-0.5.1/patches/ResIndex.h.patch +52 -0
  22. pyjess-0.5.1/patches/Scanner.c.patch +108 -0
  23. {pyjess-0.4.1 → pyjess-0.5.1}/patches/Super.c.patch +5 -28
  24. pyjess-0.5.1/patches/Template.h.patch +33 -0
  25. pyjess-0.5.1/patches/TessAtom.c.patch +175 -0
  26. pyjess-0.5.1/patches/TessAtom.h.patch +52 -0
  27. {pyjess-0.4.1 → pyjess-0.5.1}/patches/TessTemplate.c.patch +116 -35
  28. {pyjess-0.4.1 → pyjess-0.5.1}/patches/TessTemplate.h.patch +21 -3
  29. {pyjess-0.4.1 → pyjess-0.5.1}/pkg/aur/PKGBUILD.in +1 -1
  30. {pyjess-0.4.1 → pyjess-0.5.1}/pyproject.toml +3 -3
  31. {pyjess-0.4.1 → pyjess-0.5.1}/src/jess/CMakeLists.txt +50 -21
  32. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/_jess.pyi +3 -4
  33. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/_jess.pyx +100 -12
  34. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/test_jess.py +23 -0
  35. {pyjess-0.4.1 → pyjess-0.5.1}/src/scripts/apply_patch.py +7 -1
  36. pyjess-0.5.1/src/scripts/generate_patches.py +49 -0
  37. pyjess-0.4.1/patches/Molecule.c.patch +0 -18
  38. pyjess-0.4.1/patches/Molecule.h.patch +0 -17
  39. pyjess-0.4.1/patches/Template.h.patch +0 -12
  40. pyjess-0.4.1/patches/TessAtom.c.patch +0 -141
  41. pyjess-0.4.1/patches/TessAtom.h.patch +0 -34
  42. {pyjess-0.4.1 → pyjess-0.5.1}/.github/workflows/requirements.txt +0 -0
  43. {pyjess-0.4.1 → pyjess-0.5.1}/.gitignore +0 -0
  44. {pyjess-0.4.1 → pyjess-0.5.1}/.gitmodules +0 -0
  45. {pyjess-0.4.1 → pyjess-0.5.1}/.readthedocs.yaml +0 -0
  46. {pyjess-0.4.1 → pyjess-0.5.1}/CMakeLists.txt +0 -0
  47. {pyjess-0.4.1 → pyjess-0.5.1}/CONTRIBUTING.md +0 -0
  48. {pyjess-0.4.1 → pyjess-0.5.1}/docs/.gitignore +0 -0
  49. {pyjess-0.4.1 → pyjess-0.5.1}/docs/Makefile +0 -0
  50. {pyjess-0.4.1 → pyjess-0.5.1}/docs/_static/css/main.css +0 -0
  51. {pyjess-0.4.1 → pyjess-0.5.1}/docs/_static/js/custom-icon.js +0 -0
  52. {pyjess-0.4.1 → pyjess-0.5.1}/docs/api/index.rst +0 -0
  53. {pyjess-0.4.1 → pyjess-0.5.1}/docs/api/jess.rst +0 -0
  54. {pyjess-0.4.1 → pyjess-0.5.1}/docs/api/molecule.rst +0 -0
  55. {pyjess-0.4.1 → pyjess-0.5.1}/docs/api/template.rst +0 -0
  56. {pyjess-0.4.1 → pyjess-0.5.1}/docs/conf.py +0 -0
  57. {pyjess-0.4.1 → pyjess-0.5.1}/docs/guide/changes.md +0 -0
  58. {pyjess-0.4.1 → pyjess-0.5.1}/docs/guide/contributing.md +0 -0
  59. {pyjess-0.4.1 → pyjess-0.5.1}/docs/guide/copyright.rst +0 -0
  60. {pyjess-0.4.1 → pyjess-0.5.1}/docs/guide/index.rst +0 -0
  61. {pyjess-0.4.1 → pyjess-0.5.1}/docs/guide/install.rst +0 -0
  62. {pyjess-0.4.1 → pyjess-0.5.1}/docs/make.bat +0 -0
  63. {pyjess-0.4.1 → pyjess-0.5.1}/docs/requirements.txt +0 -0
  64. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/__init__.pxd +0 -0
  65. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/annulus.pxd +0 -0
  66. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/atom.pxd +0 -0
  67. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/jess.pxd +0 -0
  68. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/join.pxd +0 -0
  69. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/kdtree.pxd +0 -0
  70. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/region.pxd +0 -0
  71. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/scanner.pxd +0 -0
  72. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/super.pxd +0 -0
  73. {pyjess-0.4.1 → pyjess-0.5.1}/include/jess/tess_atom.pxd +0 -0
  74. {pyjess-0.4.1 → pyjess-0.5.1}/patches/Atom.h.patch +0 -0
  75. {pyjess-0.4.1 → pyjess-0.5.1}/patches/KdTree.c.patch +0 -0
  76. {pyjess-0.4.1 → pyjess-0.5.1}/src/CMakeLists.txt +0 -0
  77. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/.gitignore +0 -0
  78. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/CMakeLists.txt +0 -0
  79. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/__init__.py +0 -0
  80. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/py.typed +0 -0
  81. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/__init__.py +0 -0
  82. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/1.3.3.tpl +0 -0
  83. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/1AMY+1.3.3.txt +0 -0
  84. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/1AMY.pdb +0 -0
  85. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/__init__.py +0 -0
  86. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/pdb1lnb.pdb +0 -0
  87. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/template_01.qry +0 -0
  88. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/data/template_02.qry +0 -0
  89. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/test_atom.py +0 -0
  90. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/test_molecule.py +0 -0
  91. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/test_template.py +0 -0
  92. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/test_template_atom.py +0 -0
  93. {pyjess-0.4.1 → pyjess-0.5.1}/src/pyjess/tests/utils.py +0 -0
  94. {pyjess-0.4.1 → pyjess-0.5.1}/src/scripts/cmake/CythonExtension.cmake +0 -0
  95. {pyjess-0.4.1 → pyjess-0.5.1}/src/scripts/cmake/pystate_patch.h +0 -0
  96. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/.gitignore +0 -0
  97. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/README.md +0 -0
  98. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/examples/template_01.qry +0 -0
  99. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/examples/template_02.qry +0 -0
  100. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/examples/test_pdbs/pdb1lnb.ent +0 -0
  101. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/filter_output.py +0 -0
  102. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Annulus.c +0 -0
  103. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Annulus.h +0 -0
  104. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Atom.c +0 -0
  105. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Atom.h +0 -0
  106. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Jess.c +0 -0
  107. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Jess.h +0 -0
  108. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Join.c +0 -0
  109. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Join.h +0 -0
  110. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/KdTree.c +0 -0
  111. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/KdTree.h +0 -0
  112. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Main.c +0 -0
  113. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Molecule.c +0 -0
  114. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Molecule.h +0 -0
  115. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Region.c +0 -0
  116. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Region.h +0 -0
  117. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Scanner.c +0 -0
  118. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Scanner.h +0 -0
  119. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Super.c +0 -0
  120. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Super.h +0 -0
  121. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/Template.h +0 -0
  122. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/TessAtom.c +0 -0
  123. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/TessAtom.h +0 -0
  124. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/TessTemplate.c +0 -0
  125. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/TessTemplate.h +0 -0
  126. {pyjess-0.4.1 → pyjess-0.5.1}/vendor/jess/src/jess +0 -0
@@ -9,16 +9,11 @@ jobs:
9
9
 
10
10
  wheel-linux-aarch64:
11
11
  name: Build Linux wheels (Aarch64)
12
- runs-on: ubuntu-22.04
12
+ runs-on: ubuntu-22.04-arm
13
13
  steps:
14
14
  - uses: actions/checkout@v3
15
15
  with:
16
16
  submodules: true
17
- - name: Set up QEMU
18
- id: qemu
19
- uses: docker/setup-qemu-action@v3
20
- with:
21
- platforms: arm64
22
17
  - name: Build manylinux wheels
23
18
  uses: pypa/cibuildwheel@v2.21.3
24
19
  env:
@@ -94,7 +89,7 @@ jobs:
94
89
 
95
90
  wheel-win32-x86_64:
96
91
  name: Build Windows wheels (x86-64)
97
- runs-on: windows-2019
92
+ runs-on: windows-latest
98
93
  steps:
99
94
  - uses: actions/checkout@v4
100
95
  with:
@@ -76,7 +76,7 @@ jobs:
76
76
 
77
77
  test_osx:
78
78
  name: Test (OSX)
79
- runs-on: macos-latest
79
+ runs-on: macos-13
80
80
  env:
81
81
  OS: OSX
82
82
  strategy:
@@ -6,7 +6,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
 
8
8
  ## [Unreleased]
9
- [Unreleased]: https://github.com/althonos/pyjess/compare/v0.4.1...HEAD
9
+ [Unreleased]: https://github.com/althonos/pyjess/compare/v0.5.1...HEAD
10
+
11
+
12
+ ## [v0.5.1] - 2025-08-20
13
+ [v0.5.1]: https://github.com/althonos/pyjess/compare/v0.5.0...v0.5.1
14
+
15
+ ### Fixed
16
+ - Typo in `Hit.molecule` returning incorrect coordinates when transformation is required.
17
+
18
+ ### Changed
19
+ - Implement an index to quickly access atoms by residue names in a `Molecule`, and accelerate initial candidate set creation for compatible match modes.
20
+
21
+
22
+ ## [v0.5.0] - 2025-04-09
23
+ [v0.5.0]: https://github.com/althonos/pyjess/compare/v0.4.1...v0.5.0
24
+
25
+ ### Fixed
26
+ - Remove invalid `platform` key from `pyproject.toml`.
27
+
28
+ ### Changed
29
+ - `Hit.molecule` is now a method and can optionally rotate the hit molecule.
10
30
 
11
31
 
12
32
  ## [v0.4.1] - 2024-11-29
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Martin Larralde <martin.larralde@embl.de>
3
+ Copyright (c) 2024-2025 Martin Larralde <martin.larralde@embl.de>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,30 +1,31 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pyjess
3
- Version: 0.4.1
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>
7
7
  License: MIT License
8
-
9
- Copyright (c) 2024 Martin Larralde <martin.larralde@embl.de>
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
8
+
9
+ Copyright (c) 2024-2025 Martin Larralde <martin.larralde@embl.de>
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
28
29
  Classifier: Development Status :: 4 - Beta
29
30
  Classifier: Intended Audience :: Developers
30
31
  Classifier: Intended Audience :: Science/Research
@@ -46,11 +47,12 @@ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
46
47
  Classifier: Typing :: Typed
47
48
  Project-URL: Homepage, https://github.com/althonos/pyjess/
48
49
  Project-URL: Documentation, https://pyjess.readthedocs.io/en/stable/
49
- Project-URL: Bug tracker, https://github.com/althonos/pyjess/issues
50
+ Project-URL: Bug Tracker, https://github.com/althonos/pyjess/issues
50
51
  Project-URL: Changelog, https://github.com/althonos/pyjess/blob/master/CHANGELOG.md
51
52
  Project-URL: Coverage, https://codecov.io/gh/althonos/pyjess/
52
53
  Project-URL: Builds, https://github.com/althonos/pyjess/actions
53
- Project-URL: Pypi, https://pypi.org/project/pyjess
54
+ Project-URL: PyPI, https://pypi.org/project/pyjess
55
+ Project-URL: PiWheels, https://piwheels.org/project/pyjess/
54
56
  Requires-Python: >=3.7
55
57
  Provides-Extra: test
56
58
  Requires-Dist: importlib-resources; python_version < "3.9" and extra == "test"
@@ -74,7 +76,7 @@ Description-Content-Type: text/markdown
74
76
  [![Issues](https://img.shields.io/github/issues/althonos/pyjess.svg?style=flat-square&maxAge=600)](https://github.com/althonos/pyjess/issues)
75
77
  [![Docs](https://img.shields.io/readthedocs/pyjess/latest?style=flat-square&maxAge=600)](https://pyjess.readthedocs.io)
76
78
  [![Changelog](https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=2678400&style=flat-square)](https://github.com/althonos/pyjess/blob/main/CHANGELOG.md)
77
- [![Downloads](https://img.shields.io/pypi/dm/pyjess?style=flat-square&color=303f9f&maxAge=86400&label=downloads)](https://pepy.tech/project/pyjess)
79
+ [![Downloads](https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fpepy.tech%2Fprojects%2Fpyjess&search=%5B0-9%5D%2B.%5B0-9%5D%2B(k%7CM)&style=flat-square&label=downloads&color=303f9f&cacheSeconds=86400)](https://pepy.tech/project/pyjess)
78
80
 
79
81
 
80
82
  ## 🗺️ Overview
@@ -83,8 +85,8 @@ Jess is an algorithm for constraint-based structural template matching
83
85
  proposed by Jonathan Barker *et al.*[\[1\]](#ref1). It can be used to identify
84
86
  catalytic residues from a known template inside a protein structure. Jess
85
87
  is an evolution of TESS, a geometric hashing algorithm developed by
86
- Andrew Wallace *et al.*[\[2\]](#ref2), removing some pre-computation and
87
- structural requirements from the original algorithm. Jess was further
88
+ Andrew Wallace *et al.*[\[2\]](#ref2), removing some pre-computation and
89
+ structural requirements from the original algorithm. Jess was further
88
90
  updated and maintained by [Ioannis Riziotis](https://github.com/iriziotis)
89
91
  during his PhD in the [Thornton group](https://www.ebi.ac.uk/research/thornton/).
90
92
 
@@ -105,34 +107,44 @@ as well as the code required to compile from source with Cython:
105
107
  $ pip install pyjess
106
108
  ```
107
109
 
108
- <!-- Otherwise, PyJess is also available as a [Bioconda](https://bioconda.github.io/)
110
+ Otherwise, PyJess is also available as a [Bioconda](https://bioconda.github.io/)
109
111
  package:
110
112
  ```console
111
113
  $ conda install -c bioconda pyjess
112
- ``` -->
114
+ ```
113
115
 
114
116
  Check the [*install* page](https://pyjess.readthedocs.io/en/stable/install.html)
115
117
  of the documentation for other ways to install PyJess on your machine.
116
118
 
119
+
120
+ ## 🔖 Citation
121
+
122
+ PyJess is scientific software, and builds on top of Jess. Please cite
123
+ Jess if you are using it in an academic work, for instance as:
124
+
125
+ > PyJess, a Python library binding to Jess (Barker *et al.*, 2003).
126
+
127
+
117
128
  ## 💡 Example
118
129
 
119
130
  Load templates to be used as references from different template files:
120
131
 
121
132
  ```python
122
- import glob
133
+ import pathlib
123
134
  import pyjess
124
135
 
125
136
  templates = []
126
- for path in sorted(glob.iglob("vendor/jess/examples/template_*.qry")):
127
- templates.append(Template.load(path, id=os.path.basename(path)))
137
+ for path in sorted(pathlib.Path("vendor/jess/examples").glob("template_*.qry")):
138
+ with path.open() as file:
139
+ templates.append(pyjess.Template.load(file, id=path.stem))
128
140
  ```
129
141
 
130
142
  Create a `Jess` instance and use it to query a molecule (a PDB structure)
131
143
  against the stored templates:
132
144
 
133
145
  ```python
134
- jess = Jess(templates)
135
- mol = Molecule("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
146
+ jess = pyjess.Jess(templates)
147
+ mol = pyjess.Molecule.load("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
136
148
  query = jess.query(mol, rmsd_threshold=2.0, distance_cutoff=3.0, max_dynamic_distance=3.0)
137
149
  ```
138
150
 
@@ -162,7 +174,7 @@ with multiprocessing.ThreadPool() as pool:
162
174
  hits = pool.map(jess.query, molecules)
163
175
  ```
164
176
 
165
- *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
177
+ *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
166
178
  If running Jess in parallel, make sure to use `v0.2.1` or later to use the code patched with re-entrant functions*.
167
179
 
168
180
  <!-- ## ⏱️ Benchmarks -->
@@ -172,7 +184,7 @@ If running Jess in parallel, make sure to use `v0.2.1` or later to use the code
172
184
 
173
185
  ### ⚠️ Issue Tracker
174
186
 
175
- Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/[pyjess]/issues)
187
+ Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/pyjess/issues)
176
188
  if you need to report or ask something. If you are filing in on a bug,
177
189
  please include as much information as you can about the issue, and try to
178
190
  recreate the same bug in a simple, easily reproducible situation.
@@ -16,7 +16,7 @@
16
16
  [![Issues](https://img.shields.io/github/issues/althonos/pyjess.svg?style=flat-square&maxAge=600)](https://github.com/althonos/pyjess/issues)
17
17
  [![Docs](https://img.shields.io/readthedocs/pyjess/latest?style=flat-square&maxAge=600)](https://pyjess.readthedocs.io)
18
18
  [![Changelog](https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=2678400&style=flat-square)](https://github.com/althonos/pyjess/blob/main/CHANGELOG.md)
19
- [![Downloads](https://img.shields.io/pypi/dm/pyjess?style=flat-square&color=303f9f&maxAge=86400&label=downloads)](https://pepy.tech/project/pyjess)
19
+ [![Downloads](https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fpepy.tech%2Fprojects%2Fpyjess&search=%5B0-9%5D%2B.%5B0-9%5D%2B(k%7CM)&style=flat-square&label=downloads&color=303f9f&cacheSeconds=86400)](https://pepy.tech/project/pyjess)
20
20
 
21
21
 
22
22
  ## 🗺️ Overview
@@ -25,8 +25,8 @@ Jess is an algorithm for constraint-based structural template matching
25
25
  proposed by Jonathan Barker *et al.*[\[1\]](#ref1). It can be used to identify
26
26
  catalytic residues from a known template inside a protein structure. Jess
27
27
  is an evolution of TESS, a geometric hashing algorithm developed by
28
- Andrew Wallace *et al.*[\[2\]](#ref2), removing some pre-computation and
29
- structural requirements from the original algorithm. Jess was further
28
+ Andrew Wallace *et al.*[\[2\]](#ref2), removing some pre-computation and
29
+ structural requirements from the original algorithm. Jess was further
30
30
  updated and maintained by [Ioannis Riziotis](https://github.com/iriziotis)
31
31
  during his PhD in the [Thornton group](https://www.ebi.ac.uk/research/thornton/).
32
32
 
@@ -47,34 +47,44 @@ as well as the code required to compile from source with Cython:
47
47
  $ pip install pyjess
48
48
  ```
49
49
 
50
- <!-- Otherwise, PyJess is also available as a [Bioconda](https://bioconda.github.io/)
50
+ Otherwise, PyJess is also available as a [Bioconda](https://bioconda.github.io/)
51
51
  package:
52
52
  ```console
53
53
  $ conda install -c bioconda pyjess
54
- ``` -->
54
+ ```
55
55
 
56
56
  Check the [*install* page](https://pyjess.readthedocs.io/en/stable/install.html)
57
57
  of the documentation for other ways to install PyJess on your machine.
58
58
 
59
+
60
+ ## 🔖 Citation
61
+
62
+ PyJess is scientific software, and builds on top of Jess. Please cite
63
+ Jess if you are using it in an academic work, for instance as:
64
+
65
+ > PyJess, a Python library binding to Jess (Barker *et al.*, 2003).
66
+
67
+
59
68
  ## 💡 Example
60
69
 
61
70
  Load templates to be used as references from different template files:
62
71
 
63
72
  ```python
64
- import glob
73
+ import pathlib
65
74
  import pyjess
66
75
 
67
76
  templates = []
68
- for path in sorted(glob.iglob("vendor/jess/examples/template_*.qry")):
69
- templates.append(Template.load(path, id=os.path.basename(path)))
77
+ for path in sorted(pathlib.Path("vendor/jess/examples").glob("template_*.qry")):
78
+ with path.open() as file:
79
+ templates.append(pyjess.Template.load(file, id=path.stem))
70
80
  ```
71
81
 
72
82
  Create a `Jess` instance and use it to query a molecule (a PDB structure)
73
83
  against the stored templates:
74
84
 
75
85
  ```python
76
- jess = Jess(templates)
77
- mol = Molecule("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
86
+ jess = pyjess.Jess(templates)
87
+ mol = pyjess.Molecule.load("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
78
88
  query = jess.query(mol, rmsd_threshold=2.0, distance_cutoff=3.0, max_dynamic_distance=3.0)
79
89
  ```
80
90
 
@@ -104,7 +114,7 @@ with multiprocessing.ThreadPool() as pool:
104
114
  hits = pool.map(jess.query, molecules)
105
115
  ```
106
116
 
107
- *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
117
+ *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
108
118
  If running Jess in parallel, make sure to use `v0.2.1` or later to use the code patched with re-entrant functions*.
109
119
 
110
120
  <!-- ## ⏱️ Benchmarks -->
@@ -114,7 +124,7 @@ If running Jess in parallel, make sure to use `v0.2.1` or later to use the code
114
124
 
115
125
  ### ⚠️ Issue Tracker
116
126
 
117
- Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/[pyjess]/issues)
127
+ Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/pyjess/issues)
118
128
  if you need to report or ask something. If you are filing in on a bug,
119
129
  please include as much information as you can about the issue, and try to
120
130
  recreate the same bug in a simple, easily reproducible situation.
@@ -1,6 +1,11 @@
1
1
  [
2
2
  {
3
- "name": "v0.4 (latest)",
3
+ "name": "v0.5.1",
4
+ "version": "0.5.1",
5
+ "url": "https://pyjess.readthedocs.io/en/v0.5.1/"
6
+ },
7
+ {
8
+ "name": "v0.4",
4
9
  "version": "0.4.1",
5
10
  "url": "https://pyjess.readthedocs.io/en/v0.4.1/"
6
11
  },
@@ -65,7 +65,7 @@ PyJess |Stars|
65
65
  :target: https://github.com/althonos/pyjess/blob/main/CHANGELOG.md
66
66
  :class: dark-light
67
67
 
68
- .. |Downloads| image:: https://img.shields.io/pypi/dm/pyjess?style=flat-square&color=303f9f&maxAge=3600&label=downloads
68
+ .. |Downloads| image:: https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fpepy.tech%2Fprojects%2Fpyjess&search=%5B0-9%5D%2B.%5B0-9%5D%2B(k%7CM)&style=flat-square&label=downloads&color=303f9f&cacheSeconds=86400
69
69
  :target: https://pepy.tech/project/pyjess
70
70
  :class: dark-light
71
71
 
@@ -0,0 +1,15 @@
1
+ from .atom cimport Atom
2
+ from .molecule cimport Molecule
3
+
4
+
5
+ cdef extern from "CandidateSet.h" nogil:
6
+
7
+ struct _CandidateSet:
8
+ int count
9
+ Atom **atom
10
+ double **coord
11
+
12
+ ctypedef _CandidateSet CandidateSet
13
+
14
+ CandidateSet *CandidateSet_create(const Molecule *M)
15
+ void CandidateSet_free(CandidateSet*)
@@ -1,6 +1,7 @@
1
1
  from libc.stdio cimport FILE
2
2
 
3
3
  from .atom cimport Atom
4
+ from .res_index cimport ResIndex
4
5
 
5
6
 
6
7
  cdef extern from "Molecule.h" nogil:
@@ -8,6 +9,7 @@ cdef extern from "Molecule.h" nogil:
8
9
  cdef struct _Molecule:
9
10
  int count
10
11
  char[5] id
12
+ ResIndex* index
11
13
  Atom** atom
12
14
 
13
15
  ctypedef _Molecule Molecule
@@ -15,5 +17,5 @@ cdef extern from "Molecule.h" nogil:
15
17
  Molecule* Molecule_create(FILE*, int, double)
16
18
  void Molecule_free(Molecule*)
17
19
  int Molecule_count(const Molecule*)
18
- Atom* Molecule_atom(const Molecule*, int)
20
+ const Atom* Molecule_atom(const Molecule*, int)
19
21
  const char* Molecule_id(const Molecule*)
@@ -0,0 +1,15 @@
1
+ from .atom cimport Atom
2
+
3
+
4
+ cdef extern from "ResIndex.h" nogil:
5
+
6
+ struct _ResIndex:
7
+ int count
8
+ Atom **atom
9
+ double **coord
10
+
11
+ ctypedef _ResIndex ResIndex
12
+
13
+ extern ResIndex* ResIndex_create(Atom**, int)
14
+ extern Atom** ResIndex_get(ResIndex*, const char[4])
15
+ extern void ResIndex_free(ResIndex*)
@@ -1,5 +1,6 @@
1
1
  from .atom cimport Atom
2
-
2
+ from .molecule cimport Molecule
3
+ from .candidate_set cimport CandidateSet
3
4
 
4
5
  cdef extern from "Template.h" nogil:
5
6
 
@@ -10,6 +11,7 @@ cdef extern from "Template.h" nogil:
10
11
  int (*match)(const Template*, int, const Atom*) nogil
11
12
  int (*range)(const Template*, int, int, double*, double*) nogil
12
13
  int (*check)(const Template*, Atom**, int, int) nogil
14
+ CandidateSet* (*candidates)(const Template*, const Molecule*, int);
13
15
  const double* (*position)(const Template*, int) nogil
14
16
  const char* (*name)(const Template*) nogil
15
17
  double (*logE)(const Template*, double, int) nogil
@@ -3,6 +3,8 @@ from libc.stdio cimport FILE
3
3
  from .atom cimport Atom
4
4
  from .tess_atom cimport TessAtom
5
5
  from .template cimport Template
6
+ from .molecule cimport Molecule
7
+ from .candidate_set cimport CandidateSet
6
8
 
7
9
 
8
10
  cdef extern from "TessTemplate.h" nogil:
@@ -22,6 +24,7 @@ cdef extern from "TessTemplate.h" nogil:
22
24
  const double *TessTemplate_position(const Template *T, int k)
23
25
  double TessTemplate_distWeight(const Template *T, int k)
24
26
  int TessTemplate_check(const Template *T, Atom **A, int k, int ignore_chain)
27
+ CandidateSet* TessTemplate_candidates(const Template *T, const Molecule *M, int k)
25
28
  const char *TessTemplate_name(const Template *T)
26
29
  double TessTemplate_logE(const Template *T,double rmsd, int n)
27
30
  void TessTemplate_free(Template *T)
@@ -0,0 +1,35 @@
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ new file mode 100644
3
+ index 0000000..b34b6e7
4
+ --- /dev/null
5
+ +++ b/CMakeLists.txt
6
+ @@ -0,0 +1,29 @@
7
+ +cmake_minimum_required(VERSION 3.10)
8
+ +project(Jess)
9
+ +
10
+ +include(CheckSymbolExists)
11
+ +check_symbol_exists(alloca "alloca.h" HAVE_ALLOCA)
12
+ +
13
+ +add_library(jess)
14
+ +target_sources(jess PRIVATE
15
+ + src/Annulus.c
16
+ + src/Join.c
17
+ + src/Molecule.c
18
+ + src/Super.c
19
+ + src/Atom.c
20
+ + src/KdTree.c
21
+ + src/Region.c
22
+ + src/TessAtom.c
23
+ + src/Jess.c
24
+ + src/Scanner.c
25
+ + src/TessTemplate.c
26
+ + src/CandidateSet.c
27
+ + src/ResIndex.c)
28
+ +if(HAVE_ALLOCA)
29
+ + target_compile_definitions(jess PUBLIC -DHAVE_ALLOCA)
30
+ +endif()
31
+ +
32
+ +add_executable(jess_bin)
33
+ +target_sources(jess_bin PRIVATE src/Main.c)
34
+ +target_link_libraries(jess_bin jess m)
35
+ +set_property(TARGET jess_bin PROPERTY OUTPUT_NAME jess)
@@ -0,0 +1,71 @@
1
+ diff --git a/src/CandidateSet.c b/src/CandidateSet.c
2
+ new file mode 100644
3
+ index 0000000..a67e878
4
+ --- /dev/null
5
+ +++ b/src/CandidateSet.c
6
+ @@ -0,0 +1,65 @@
7
+ +// ==================================================================
8
+ +// CandidateSet.h
9
+ +// Copyright (c) Jonathan Barker, 2002
10
+ +// Copyright (c) Martin Larralde, 2025
11
+ +// ==================================================================
12
+ +// Implementation of type CandidateSet.
13
+ +// ==================================================================
14
+ +
15
+ +#include <stdlib.h>
16
+ +
17
+ +#include "CandidateSet.h"
18
+ +#include "Atom.h"
19
+ +#include "Molecule.h"
20
+ +#include "Template.h"
21
+ +
22
+ +// ==================================================================
23
+ +// Methods of local type CandidateSet
24
+ +// ==================================================================
25
+ +
26
+ +CandidateSet *CandidateSet_create(const Molecule *M)
27
+ +{
28
+ + CandidateSet *S;
29
+ + Atom *A;
30
+ + int n = Molecule_count(M);
31
+ + int m;
32
+ +
33
+ + S = (CandidateSet*)calloc(1,sizeof(CandidateSet));
34
+ + if(!S) return NULL;
35
+ +
36
+ + S->atom=(Atom**)calloc(n,sizeof(Atom*));
37
+ + S->coord = NULL;
38
+ + S->count = 0;
39
+ +
40
+ + return S;
41
+ +}
42
+ +
43
+ +void CandidateSet_addAtom(CandidateSet *S, Atom *A)
44
+ +{
45
+ + S->atom[S->count]=A;
46
+ + S->count++;
47
+ +}
48
+ +
49
+ +void CandidateSet_recordCoordinates(CandidateSet *S)
50
+ +{
51
+ + int m;
52
+ +
53
+ + S->atom=(Atom**)realloc(S->atom,sizeof(Atom*)*S->count);
54
+ + S->coord=(double**)calloc(S->count,sizeof(double*));
55
+ +
56
+ + for(m=0; m<S->count; m++)
57
+ + S->coord[m]=S->atom[m]->x;
58
+ +}
59
+ +
60
+ +
61
+ +void CandidateSet_free(CandidateSet *S)
62
+ +{
63
+ + if(S)
64
+ + {
65
+ + if(S->atom) free(S->atom);
66
+ + if(S->coord) free(S->coord);
67
+ + free(S);
68
+ + }
69
+ +}
70
+ +
71
+ +// ==================================================================
@@ -0,0 +1,51 @@
1
+ diff --git a/src/CandidateSet.h b/src/CandidateSet.h
2
+ new file mode 100644
3
+ index 0000000..9b12e6e
4
+ --- /dev/null
5
+ +++ b/src/CandidateSet.h
6
+ @@ -0,0 +1,44 @@
7
+ +// ==================================================================
8
+ +// CandidateSet.h
9
+ +// Copyright (c) Jonathan Barker, 2002
10
+ +// Copyright (c) Martin Larralde, 2025
11
+ +// ==================================================================
12
+ +// Declaration of type CandidateSet.
13
+ +// ==================================================================
14
+ +
15
+ +#ifndef CANDIDATESET_H
16
+ +#define CANDIDATESET_H
17
+ +
18
+ +#include "Atom.h"
19
+ +#include "Molecule.h"
20
+ +
21
+ +// ==================================================================
22
+ +// Local type CandidateSet
23
+ +// ==================================================================
24
+ +// count Number of atoms in the set
25
+ +// atom[k] Points to ATOM record for kth candidate
26
+ +// coord[k] Points to coordinates for kth candidate
27
+ +// ==================================================================
28
+ +
29
+ +struct _CandidateSet
30
+ +{
31
+ + int count;
32
+ + Atom **atom;
33
+ + double **coord;
34
+ +};
35
+ +
36
+ +typedef struct _CandidateSet CandidateSet;
37
+ +
38
+ +// ==================================================================
39
+ +// Declaration of methods of local type CandidateSet
40
+ +// ==================================================================
41
+ +// create(M,T,k) Create from molecule M, atom k of T
42
+ +// free(S) Free candidate set
43
+ +// ==================================================================
44
+ +
45
+ +CandidateSet *CandidateSet_create(const Molecule*);
46
+ +void CandidateSet_addAtom(CandidateSet*, Atom*);
47
+ +void CandidateSet_recordCoordinates(CandidateSet*);
48
+ +void CandidateSet_free(CandidateSet*);
49
+ +
50
+ +#endif
51
+
@@ -1,8 +1,30 @@
1
1
  diff --git a/src/Jess.c b/src/Jess.c
2
- index e81bda0..6d44558 100644
2
+ index e81bda0..c4e581b 100644
3
3
  --- a/src/Jess.c
4
4
  +++ b/src/Jess.c
5
- @@ -91,8 +91,10 @@ void Jess_free(Jess *J)
5
+ @@ -4,15 +4,17 @@
6
+ // Implementation of types Jess and JessQuery.
7
+ // ==================================================================
8
+
9
+ +#include <stdio.h>
10
+ +#include <stdlib.h>
11
+ +#include <math.h>
12
+ +#include <string.h>
13
+ +
14
+ #include "Jess.h"
15
+ #include "Molecule.h"
16
+ #include "Scanner.h"
17
+ #include "TessTemplate.h"
18
+ #include "Super.h"
19
+ -#include <stdio.h>
20
+ -#include <stdlib.h>
21
+ -#include <math.h>
22
+ -#include <string.h>
23
+ +
24
+
25
+ // ==================================================================
26
+ // Forward declarations of local types
27
+ @@ -91,8 +93,10 @@ void Jess_free(Jess *J)
6
28
  n=J->head->next;
7
29
  T=J->head->template;
8
30
  if(T) T->free(T);
@@ -13,13 +35,13 @@ index e81bda0..6d44558 100644
13
35
  }
14
36
  }
15
37
 
16
- @@ -157,26 +159,26 @@ Superposition *JessQuery_superposition(JessQuery *Q)
38
+ @@ -156,27 +160,25 @@ Superposition *JessQuery_superposition(JessQuery *Q)
39
+ int count;
17
40
  Template *T;
18
41
  Atom **A;
19
-
42
+ -
20
43
  - if(Q->super) return Q->super;
21
44
  + Superposition* super;
22
- + // if(Q->super) return Q->super;
23
45
 
24
46
  A = Q->atoms;
25
47
  T = Q->node->template;