pyjess 0.5.2__tar.gz → 0.7.0__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 (149) hide show
  1. {pyjess-0.5.2 → pyjess-0.7.0}/.github/workflows/package.yml +7 -2
  2. {pyjess-0.5.2 → pyjess-0.7.0}/.github/workflows/test.yml +57 -99
  3. {pyjess-0.5.2 → pyjess-0.7.0}/CHANGELOG.md +47 -1
  4. {pyjess-0.5.2 → pyjess-0.7.0}/PKG-INFO +76 -15
  5. {pyjess-0.5.2 → pyjess-0.7.0}/README.md +73 -14
  6. {pyjess-0.5.2 → pyjess-0.7.0}/docs/_static/json/switcher.json +11 -1
  7. {pyjess-0.5.2 → pyjess-0.7.0}/docs/conf.py +4 -0
  8. pyjess-0.7.0/docs/guide/cli.rst +15 -0
  9. {pyjess-0.5.2 → pyjess-0.7.0}/docs/guide/index.rst +2 -0
  10. {pyjess-0.5.2 → pyjess-0.7.0}/docs/guide/install.rst +8 -1
  11. pyjess-0.7.0/docs/guide/optimizations.rst +275 -0
  12. {pyjess-0.5.2 → pyjess-0.7.0}/docs/index.rst +6 -5
  13. {pyjess-0.5.2 → pyjess-0.7.0}/docs/requirements.txt +2 -1
  14. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/atom.pxd +2 -2
  15. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/jess.pxd +4 -3
  16. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/scanner.pxd +2 -2
  17. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/template.pxd +6 -0
  18. pyjess-0.7.0/patches/Annulus.c.patch +149 -0
  19. pyjess-0.7.0/patches/Annulus.h.patch +108 -0
  20. pyjess-0.7.0/patches/Atom.c.patch +13 -0
  21. pyjess-0.7.0/patches/Box.c.patch +57 -0
  22. pyjess-0.7.0/patches/Box.h.patch +86 -0
  23. {pyjess-0.5.2 → pyjess-0.7.0}/patches/CMakeLists.txt.patch +18 -2
  24. {pyjess-0.5.2 → pyjess-0.7.0}/patches/CandidateSet.c.patch +21 -21
  25. {pyjess-0.5.2 → pyjess-0.7.0}/patches/CandidateSet.h.patch +26 -9
  26. pyjess-0.7.0/patches/Jess.c.patch +216 -0
  27. pyjess-0.7.0/patches/Jess.h.patch +47 -0
  28. pyjess-0.7.0/patches/Join.c.patch +216 -0
  29. pyjess-0.7.0/patches/Join.h.patch +145 -0
  30. pyjess-0.7.0/patches/KdTree.c.patch +471 -0
  31. pyjess-0.7.0/patches/KdTree.h.patch +40 -0
  32. pyjess-0.7.0/patches/Main.c.patch +116 -0
  33. {pyjess-0.5.2 → pyjess-0.7.0}/patches/Molecule.c.patch +23 -3
  34. {pyjess-0.5.2 → pyjess-0.7.0}/patches/ResIndex.c.patch +16 -28
  35. {pyjess-0.5.2 → pyjess-0.7.0}/patches/ResIndex.h.patch +4 -4
  36. pyjess-0.7.0/patches/Scanner.c.patch +473 -0
  37. pyjess-0.7.0/patches/Scanner.h.patch +51 -0
  38. {pyjess-0.5.2 → pyjess-0.7.0}/patches/Template.h.patch +18 -6
  39. {pyjess-0.5.2 → pyjess-0.7.0}/patches/TessAtom.c.patch +106 -34
  40. pyjess-0.7.0/patches/TessAtom.h.patch +134 -0
  41. {pyjess-0.5.2 → pyjess-0.7.0}/patches/TessTemplate.c.patch +68 -13
  42. {pyjess-0.5.2 → pyjess-0.7.0}/patches/TessTemplate.h.patch +3 -3
  43. pyjess-0.7.0/patches/qselect.h.patch +96 -0
  44. {pyjess-0.5.2 → pyjess-0.7.0}/pyproject.toml +10 -3
  45. {pyjess-0.5.2 → pyjess-0.7.0}/src/jess/CMakeLists.txt +3 -0
  46. pyjess-0.7.0/src/pyjess/__main__.py +4 -0
  47. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/_jess.pyi +53 -9
  48. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/_jess.pyx +855 -105
  49. pyjess-0.7.0/src/pyjess/cli.py +281 -0
  50. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/__init__.py +2 -0
  51. pyjess-0.7.0/src/pyjess/tests/data/1AMY.cif +6259 -0
  52. pyjess-0.7.0/src/pyjess/tests/data/1sur.qry +26 -0
  53. pyjess-0.7.0/src/pyjess/tests/data/4.1.2.tpl +23 -0
  54. pyjess-0.7.0/src/pyjess/tests/data/5ayx.EF.pdb +63 -0
  55. pyjess-0.7.0/src/pyjess/tests/test_doctest.py +78 -0
  56. pyjess-0.7.0/src/pyjess/tests/test_hit.py +57 -0
  57. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/test_jess.py +124 -3
  58. pyjess-0.7.0/src/pyjess/tests/test_molecule.py +287 -0
  59. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/test_template.py +10 -1
  60. {pyjess-0.5.2 → pyjess-0.7.0}/src/scripts/cmake/CythonExtension.cmake +11 -2
  61. pyjess-0.5.2/patches/Jess.c.patch +0 -69
  62. pyjess-0.5.2/patches/KdTree.c.patch +0 -73
  63. pyjess-0.5.2/patches/Scanner.c.patch +0 -108
  64. pyjess-0.5.2/patches/TessAtom.h.patch +0 -52
  65. pyjess-0.5.2/src/pyjess/tests/test_hit.py +0 -33
  66. pyjess-0.5.2/src/pyjess/tests/test_molecule.py +0 -141
  67. {pyjess-0.5.2 → pyjess-0.7.0}/.github/workflows/requirements.txt +0 -0
  68. {pyjess-0.5.2 → pyjess-0.7.0}/.gitignore +0 -0
  69. {pyjess-0.5.2 → pyjess-0.7.0}/.gitmodules +0 -0
  70. {pyjess-0.5.2 → pyjess-0.7.0}/.readthedocs.yaml +0 -0
  71. {pyjess-0.5.2 → pyjess-0.7.0}/CMakeLists.txt +0 -0
  72. {pyjess-0.5.2 → pyjess-0.7.0}/CONTRIBUTING.md +0 -0
  73. {pyjess-0.5.2 → pyjess-0.7.0}/COPYING +0 -0
  74. {pyjess-0.5.2 → pyjess-0.7.0}/docs/.gitignore +0 -0
  75. {pyjess-0.5.2 → pyjess-0.7.0}/docs/Makefile +0 -0
  76. {pyjess-0.5.2 → pyjess-0.7.0}/docs/_static/css/main.css +0 -0
  77. {pyjess-0.5.2 → pyjess-0.7.0}/docs/_static/js/custom-icon.js +0 -0
  78. {pyjess-0.5.2 → pyjess-0.7.0}/docs/api/index.rst +0 -0
  79. {pyjess-0.5.2 → pyjess-0.7.0}/docs/api/jess.rst +0 -0
  80. {pyjess-0.5.2 → pyjess-0.7.0}/docs/api/molecule.rst +0 -0
  81. {pyjess-0.5.2 → pyjess-0.7.0}/docs/api/template.rst +0 -0
  82. {pyjess-0.5.2 → pyjess-0.7.0}/docs/guide/changes.md +0 -0
  83. {pyjess-0.5.2 → pyjess-0.7.0}/docs/guide/contributing.md +0 -0
  84. {pyjess-0.5.2 → pyjess-0.7.0}/docs/guide/copyright.rst +0 -0
  85. {pyjess-0.5.2 → pyjess-0.7.0}/docs/make.bat +0 -0
  86. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/__init__.pxd +0 -0
  87. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/annulus.pxd +0 -0
  88. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/candidate_set.pxd +0 -0
  89. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/join.pxd +0 -0
  90. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/kdtree.pxd +0 -0
  91. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/molecule.pxd +0 -0
  92. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/region.pxd +0 -0
  93. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/res_index.pxd +0 -0
  94. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/super.pxd +0 -0
  95. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/tess_atom.pxd +0 -0
  96. {pyjess-0.5.2 → pyjess-0.7.0}/include/jess/tess_template.pxd +0 -0
  97. {pyjess-0.5.2 → pyjess-0.7.0}/patches/Atom.h.patch +0 -0
  98. {pyjess-0.5.2 → pyjess-0.7.0}/patches/Molecule.h.patch +0 -0
  99. {pyjess-0.5.2 → pyjess-0.7.0}/patches/Super.c.patch +0 -0
  100. {pyjess-0.5.2 → pyjess-0.7.0}/pkg/aur/PKGBUILD.in +0 -0
  101. {pyjess-0.5.2 → pyjess-0.7.0}/src/CMakeLists.txt +0 -0
  102. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/.gitignore +0 -0
  103. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/CMakeLists.txt +0 -0
  104. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/__init__.py +0 -0
  105. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/py.typed +0 -0
  106. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/1.3.3.tpl +0 -0
  107. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/1AMY+1.3.3.txt +0 -0
  108. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/1AMY.pdb +0 -0
  109. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/__init__.py +0 -0
  110. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/pdb1lnb.pdb +0 -0
  111. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/template_01.qry +0 -0
  112. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/data/template_02.qry +0 -0
  113. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/test_atom.py +0 -0
  114. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/test_template_atom.py +0 -0
  115. {pyjess-0.5.2 → pyjess-0.7.0}/src/pyjess/tests/utils.py +0 -0
  116. {pyjess-0.5.2 → pyjess-0.7.0}/src/scripts/apply_patch.py +0 -0
  117. {pyjess-0.5.2 → pyjess-0.7.0}/src/scripts/cmake/pystate_patch.h +0 -0
  118. {pyjess-0.5.2 → pyjess-0.7.0}/src/scripts/generate_patches.py +0 -0
  119. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/.gitignore +0 -0
  120. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/README.md +0 -0
  121. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/examples/template_01.qry +0 -0
  122. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/examples/template_02.qry +0 -0
  123. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/examples/test_pdbs/pdb1lnb.ent +0 -0
  124. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/filter_output.py +0 -0
  125. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Annulus.c +0 -0
  126. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Annulus.h +0 -0
  127. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Atom.c +0 -0
  128. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Atom.h +0 -0
  129. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Jess.c +0 -0
  130. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Jess.h +0 -0
  131. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Join.c +0 -0
  132. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Join.h +0 -0
  133. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/KdTree.c +0 -0
  134. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/KdTree.h +0 -0
  135. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Main.c +0 -0
  136. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Molecule.c +0 -0
  137. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Molecule.h +0 -0
  138. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Region.c +0 -0
  139. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Region.h +0 -0
  140. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Scanner.c +0 -0
  141. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Scanner.h +0 -0
  142. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Super.c +0 -0
  143. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Super.h +0 -0
  144. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/Template.h +0 -0
  145. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/TessAtom.c +0 -0
  146. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/TessAtom.h +0 -0
  147. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/TessTemplate.c +0 -0
  148. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/TessTemplate.h +0 -0
  149. {pyjess-0.5.2 → pyjess-0.7.0}/vendor/jess/src/jess +0 -0
@@ -15,6 +15,7 @@ jobs:
15
15
  with:
16
16
  submodules: true
17
17
  - name: Build manylinux wheels
18
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
18
19
  uses: pypa/cibuildwheel@v2.21.3
19
20
  env:
20
21
  CIBW_ARCHS: aarch64
@@ -35,6 +36,7 @@ jobs:
35
36
  with:
36
37
  submodules: true
37
38
  - name: Build manylinux wheels
39
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
38
40
  uses: pypa/cibuildwheel@v2.21.3
39
41
  env:
40
42
  CIBW_ARCHS: x86_64
@@ -55,6 +57,7 @@ jobs:
55
57
  with:
56
58
  submodules: true
57
59
  - name: Build manylinux wheels
60
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
58
61
  uses: pypa/cibuildwheel@v2.21.3
59
62
  env:
60
63
  CIBW_ARCHS: x86_64
@@ -75,6 +78,7 @@ jobs:
75
78
  with:
76
79
  submodules: true
77
80
  - name: Build manylinux wheels
81
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
78
82
  uses: pypa/cibuildwheel@v2.21.3
79
83
  env:
80
84
  CIBW_ARCHS: arm64
@@ -99,6 +103,7 @@ jobs:
99
103
  with:
100
104
  arch: amd64
101
105
  - name: Build manylinux wheels
106
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
102
107
  uses: pypa/cibuildwheel@v2.21.3
103
108
  env:
104
109
  CIBW_ARCHS: AMD64
@@ -187,7 +192,7 @@ jobs:
187
192
  environment: GitHub Releases
188
193
  runs-on: ubuntu-latest
189
194
  permissions: write-all
190
- if: "!contains(github.ref, 'rc')"
195
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
191
196
  name: Release
192
197
  needs: upload
193
198
  steps:
@@ -201,7 +206,7 @@ jobs:
201
206
  aur:
202
207
  environment: Arch User Repository
203
208
  runs-on: ubuntu-latest
204
- if: "!contains(github.ref, 'rc')"
209
+ if: "!contains(github.ref, 'rc') && !contains(github.ref, 'alpha')"
205
210
  name: Update AUR package
206
211
  needs:
207
212
  - sdist
@@ -14,40 +14,18 @@ jobs:
14
14
  strategy:
15
15
  fail-fast: false
16
16
  matrix:
17
- include:
18
- - python-version: 3.7
19
- python-release: v3.7
20
- python-impl: CPython
21
- - python-version: 3.8
22
- python-release: v3.8
23
- python-impl: CPython
24
- - python-version: 3.9
25
- python-release: v3.9
26
- python-impl: CPython
27
- - python-version: '3.10'
28
- python-release: v3.10
29
- python-impl: CPython
30
- - python-version: 3.11
31
- python-release: v3.11
32
- python-impl: CPython
33
- - python-version: 3.12
34
- python-release: v3.12
35
- python-impl: CPython
36
- - python-version: 3.13
37
- python-release: v3.13
38
- python-impl: CPython
39
- - python-version: pypy-3.7
40
- python-release: v3.7
41
- python-impl: PyPy
42
- - python-version: pypy-3.8
43
- python-release: v3.8
44
- python-impl: PyPy
45
- - python-version: pypy-3.9
46
- python-release: v3.9
47
- python-impl: PyPy
48
- - python-version: pypy-3.10
49
- python-release: v3.10
50
- python-impl: PyPy
17
+ python-version:
18
+ - "3.7"
19
+ - "3.8"
20
+ - "3.9"
21
+ - "3.10"
22
+ - "3.11"
23
+ - "3.12"
24
+ - "3.13"
25
+ - "pypy-3.7"
26
+ - "pypy-3.8"
27
+ - "pypy-3.9"
28
+ - "pypy-3.10"
51
29
  steps:
52
30
  - name: Checkout code
53
31
  uses: actions/checkout@v4
@@ -63,7 +41,13 @@ jobs:
63
41
  run: python -m pip install -r .github/workflows/requirements.txt
64
42
  - name: Build C extension in debug mode
65
43
  run: python -m pip install -e . -vv --no-build-isolation
66
- - name: Test package
44
+ - name: Test package without optional dependencies
45
+ run: python -m unittest pyjess.tests -vv
46
+ - name: Install Python requirements
47
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
48
+ run: python -m pip install gemmi biopython biotite
49
+ - name: Test package with optional dependencies
50
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
67
51
  run: python -m unittest pyjess.tests -vv
68
52
  # - name: Upload to Codecov
69
53
  # if: matrix.python-impl == 'CPython'
@@ -82,34 +66,18 @@ jobs:
82
66
  strategy:
83
67
  fail-fast: false
84
68
  matrix:
85
- include:
86
- - python-version: 3.8
87
- python-release: v3.8
88
- python-impl: CPython
89
- - python-version: 3.9
90
- python-release: v3.9
91
- python-impl: CPython
92
- - python-version: '3.10'
93
- python-release: v3.10
94
- python-impl: CPython
95
- - python-version: '3.11'
96
- python-release: v3.11
97
- python-impl: CPython
98
- - python-version: '3.12'
99
- python-release: v3.12
100
- python-impl: CPython
101
- - python-version: 3.13
102
- python-release: v3.13
103
- python-impl: CPython
104
- - python-version: pypy-3.8
105
- python-release: v3.8
106
- python-impl: PyPy
107
- - python-version: pypy-3.9
108
- python-release: v3.9
109
- python-impl: PyPy
110
- - python-version: pypy-3.10
111
- python-release: v3.10
112
- python-impl: PyPy
69
+ python-version:
70
+ - "3.7"
71
+ - "3.8"
72
+ - "3.9"
73
+ - "3.10"
74
+ - "3.11"
75
+ - "3.12"
76
+ - "3.13"
77
+ - "pypy-3.7"
78
+ - "pypy-3.8"
79
+ - "pypy-3.9"
80
+ - "pypy-3.10"
113
81
  steps:
114
82
  - name: Checkout code
115
83
  uses: actions/checkout@v4
@@ -129,7 +97,13 @@ jobs:
129
97
  run: python -m pip install -r .github/workflows/requirements.txt
130
98
  - name: Build C extension in debug mode
131
99
  run: python -m pip install -e . -vv --no-build-isolation
132
- - name: Test package
100
+ - name: Test package without optional dependencies
101
+ run: python -m unittest pyjess.tests -vv
102
+ - name: Install Python requirements
103
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
104
+ run: python -m pip install gemmi biopython biotite
105
+ - name: Test package with optional dependencies
106
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
133
107
  run: python -m unittest pyjess.tests -vv
134
108
  # - name: Upload to Codecov
135
109
  # if: matrix.python-impl == 'CPython'
@@ -148,40 +122,18 @@ jobs:
148
122
  strategy:
149
123
  fail-fast: false
150
124
  matrix:
151
- include:
152
- - python-version: 3.7
153
- python-release: v3.7
154
- python-impl: CPython
155
- - python-version: 3.8
156
- python-release: v3.8
157
- python-impl: CPython
158
- - python-version: 3.9
159
- python-release: v3.9
160
- python-impl: CPython
161
- - python-version: '3.10'
162
- python-release: v3.10
163
- python-impl: CPython
164
- - python-version: '3.11'
165
- python-release: v3.11
166
- python-impl: CPython
167
- - python-version: '3.12'
168
- python-release: v3.12
169
- python-impl: CPython
170
- - python-version: 3.13
171
- python-release: v3.13
172
- python-impl: CPython
173
- - python-version: pypy-3.7
174
- python-release: v3.7
175
- python-impl: PyPy
176
- - python-version: pypy-3.8
177
- python-release: v3.8
178
- python-impl: PyPy
179
- - python-version: pypy-3.9
180
- python-release: v3.9
181
- python-impl: PyPy
182
- - python-version: pypy-3.10
183
- python-release: v3.10
184
- python-impl: PyPy
125
+ python-version:
126
+ - "3.7"
127
+ - "3.8"
128
+ - "3.9"
129
+ - "3.10"
130
+ - "3.11"
131
+ - "3.12"
132
+ - "3.13"
133
+ - "pypy-3.7"
134
+ - "pypy-3.8"
135
+ - "pypy-3.9"
136
+ - "pypy-3.10"
185
137
  steps:
186
138
  - name: Checkout code
187
139
  uses: actions/checkout@v4
@@ -198,5 +150,11 @@ jobs:
198
150
  run: python -m pip install -r .github/workflows/requirements.txt
199
151
  - name: Build C extension
200
152
  run: python -m pip install . -vv --no-build-isolation
201
- - name: Test without coverage
153
+ - name: Test package without optional dependencies
154
+ run: python -m unittest pyjess.tests -vv
155
+ - name: Install Python requirements
156
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
157
+ run: python -m pip install gemmi biopython biotite
158
+ - name: Test package with optional dependencies
159
+ if: ${{ !startsWith(matrix.python-version, 'pypy') }}
202
160
  run: python -m unittest pyjess.tests -vv
@@ -6,7 +6,53 @@ 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.5.2...HEAD
9
+ [Unreleased]: https://github.com/althonos/pyjess/compare/v0.7.0...HEAD
10
+
11
+
12
+ ## [v0.7.0] - 2025-09-13
13
+ [v0.7.0]: https://github.com/althonos/pyjess/compare/v0.6.0...v0.7.0
14
+
15
+ ### Added
16
+ - Command Line Interface with the same features as the Jess CLI.
17
+ - `Molecule.from_biopython`, `Molecule.from_biotite` and `Molecule.from_gemmi` to create a `Molecule` with objects from other libraries.
18
+ - `Hit.dump` and `Hit.dumps` methods to write a hit to PDB format.
19
+ - `Molecule.load` option to skip parsing of `HETATM` from PDB files.
20
+ - Support for [Selenocysteine](https://en.wikipedia.org/wiki/Selenocysteine) and [Pyrrolysine](https://en.wikipedia.org/wiki/Pyrrolysine) residues in `TemplateAtom`.
21
+ - Support for parsing `Molecule` objects from CIF files using [`gemmi`](https://gemmi.readthedocs.io/).
22
+
23
+ ### Fixed
24
+ - **breaking**: Incorrect handling of `max_candidates` in `Jess.query`, causing PyJess to erroneously ignore some templates.
25
+ - `Template.dimension` reporting incorrect numbers for identical residues across different residues.
26
+ - Issue with alignment of atom names in `TemplateAtom`.
27
+ - Validate data in PDB parser to ensure it is not parsing a mmCIF file.
28
+ - Parsing of mmCIF files with atoms missing occupancy values.
29
+ - Incorrect alignment of `TemplateAtom` names for names of less than 4 characters.
30
+ - `max_candidates` causing `Query` to stop before reaching the actual number of maximum candidates.
31
+
32
+ ### Changed
33
+ - **breaking**: Set the `max_candidates` default value to `None` in `Jess.query`, disabling max candidates filtering by default.
34
+ - **breaking**: Use string variants instead of `bool` to control the behaviour of `ignore_chain` argument.
35
+ - **breaking**: Make `id` and `ignore_endmdl` arguments of `Molecule.load` and `Molecule.loads` keyword-only.
36
+ - Use unrolled string comparison to compare atom names instead of `strcasecmp` in Jess code.
37
+ - Make `altloc` and `insertion_code` arguments of `Atom` optional.
38
+ - Setup deployment of Limited API wheels for CPython 3.8 onwards.
39
+ - Implement format detection between PDB and mmCIF in `Molecule.load`.
40
+ - Implement `Template.copy` and `TemplateAtom.copy` using C-level API rather than Python copy.
41
+
42
+
43
+ ## [v0.6.0] - 2025-09-01
44
+ [v0.6.0]: https://github.com/althonos/pyjess/compare/v0.5.2...v0.6.0
45
+
46
+ ### Added
47
+ - Several [algorithmic optimizations](https://pyjess.readthedocs.io/en/v0.6.0/guide/optimizations.html) to Jess, greatly improving runtime:
48
+ - Use QuickSelect ($O(n)$) instead of QuickSort ($O(nlog(n))$) to select the medians used for space partitioning on k-d tree initialization.
49
+ - Use approximate intersection on bounding boxes rather than exact code involving multiple annuli when querying the k-d tree for atoms.
50
+ - **breaking**: Reorder the matching order of template atoms to reduce the amount of backtracking and k-d tree querying performed in the average and worst case.
51
+ - `reorder` argument to `Jess.query` to support disabling template atom reordering if needed for Jess 1-to-1 consistency.
52
+
53
+ ### Changed
54
+ - Hardcode space dimensions to 3 to encourage compilers to unroll loops over dimensions.
55
+ - Recycle memory between templates within a query to reduce total amount of allocation/deallocation in hot paths.
10
56
 
11
57
 
12
58
  ## [v0.5.2] - 2025-08-26
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyjess
3
- Version: 0.5.2
3
+ Version: 0.7.0
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>
@@ -56,6 +56,8 @@ Project-URL: PiWheels, https://piwheels.org/project/pyjess/
56
56
  Requires-Python: >=3.7
57
57
  Provides-Extra: test
58
58
  Requires-Dist: importlib-resources; python_version < "3.9" and extra == "test"
59
+ Provides-Extra: cif
60
+ Requires-Dist: gemmi~=0.7.0; extra == "cif"
59
61
  Description-Content-Type: text/markdown
60
62
 
61
63
  # 🐍🔍 PyJess [![Stars](https://img.shields.io/github/stars/althonos/pyjess.svg?style=social&maxAge=3600&label=Star)](https://github.com/althonos/pyjess/stargazers)
@@ -93,7 +95,9 @@ during his PhD in the [Thornton group](https://www.ebi.ac.uk/research/thornton/)
93
95
  PyJess is a Python module that provides bindings to Jess using
94
96
  [Cython](https://cython.org/). It allows creating templates, querying them
95
97
  with protein structures, and retrieving the hits using a Python API without
96
- performing any external I/O.
98
+ performing any external I/O. It's also more than 10x faster than Jess thanks to
99
+ [algorithmic optimizations](https://pyjess.readthedocs.io/en/latest/guide/optimizations.html)
100
+ added to improve the original Jess code while producing consistent results.
97
101
 
98
102
 
99
103
  ## 🔧 Installing
@@ -113,7 +117,7 @@ package:
113
117
  $ conda install -c bioconda pyjess
114
118
  ```
115
119
 
116
- Check the [*install* page](https://pyjess.readthedocs.io/en/stable/install.html)
120
+ Check the [*install* page](https://pyjess.readthedocs.io/en/stable/guide/install.html)
117
121
  of the documentation for other ways to install PyJess on your machine.
118
122
 
119
123
 
@@ -127,7 +131,10 @@ Jess if you are using it in an academic work, for instance as:
127
131
 
128
132
  ## 💡 Example
129
133
 
130
- Load templates to be used as references from different template files:
134
+ #### Prepare templates
135
+
136
+ Load [`Template`](https://pyjess.readthedocs.io/en/latest/api/template.html#pyjess.Template)
137
+ objects to be used as references from different template files:
131
138
 
132
139
  ```python
133
140
  import pathlib
@@ -135,19 +142,49 @@ import pyjess
135
142
 
136
143
  templates = []
137
144
  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))
145
+ templates.append(pyjess.Template.load(path, id=path.stem))
140
146
  ```
141
147
 
142
- Create a `Jess` instance and use it to query a molecule (a PDB structure)
143
- against the stored templates:
148
+ #### Prepare query structures
149
+
150
+ Load a [`Molecule`](https://pyjess.readthedocs.io/en/latest/api/molecule.html#pyjess.Molecule)
151
+ (a PDB structure) from a PDB file, create one with the Python API, or
152
+ convert it from a [`Bio.Model`](https://biopython.org/docs/1.76/api/Bio.PDB.Model.html),
153
+ [`gemmi.Model`](https://gemmi.readthedocs.io/en/latest/mol.html#model),
154
+ or [`biotite.structure.AtomArray`](https://www.biotite-python.org/latest/apidoc/biotite.structure.AtomArray.html)
155
+ object:
144
156
 
145
157
  ```python
146
- jess = pyjess.Jess(templates)
158
+ # load from PDB file or mmCIF file
147
159
  mol = pyjess.Molecule.load("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
160
+
161
+ # load with BioPython
162
+ parser = Bio.PDB.PDBParser()
163
+ structure = parser.get_structure('pdb1a0p', "vendor/jess/examples/test_pdbs/pdb1a0p.ent")
164
+ mol = Molecule.from_biopython(structure, id="1a0p")
165
+
166
+ # load with Gemmi
167
+ structure = gemmi.read_pdb_string("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
168
+ mol = Molecule.from_gemmi(structure[0], id="1a0p")
169
+
170
+ # load with Biotite
171
+ pdb_file = biotite.structure.io.pdb.PDBFile.read(f)
172
+ structure = pdb_file.get_structure(altloc="all", extra_fields=["atom_id", "b_factor", "occupancy", "charge"])
173
+ mol = Molecule.from_biotite(structure[0])
174
+ ```
175
+
176
+ ### Match templates
177
+
178
+ Create a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
179
+ instance and use it to query a against the stored templates:
180
+
181
+ ```python
182
+ jess = pyjess.Jess(templates)
148
183
  query = jess.query(mol, rmsd_threshold=2.0, distance_cutoff=3.0, max_dynamic_distance=3.0)
149
184
  ```
150
185
 
186
+ ### Process hits
187
+
151
188
  The hits are computed iteratively, and the different output statistics are
152
189
  computed on-the-fly when requested:
153
190
 
@@ -158,12 +195,20 @@ for hit in query:
158
195
  print(atom.name, atom.x, atom.y, atom.z)
159
196
  ```
160
197
 
198
+ Hits can also be rendered in PDB format like in the original Jess output,
199
+ either by writing to a file directly, or to a Python string:
200
+ ```python
201
+ for hit in query:
202
+ hit.dump(sys.stdout, format="pdb")
203
+ ```
161
204
 
162
205
  ## 🧶 Thread-safety
163
206
 
164
- Once a `Jess` instance has been created, the templates cannot be edited anymore,
165
- making the `Jess.query` method re-entrant. This allows querying several
166
- molecules against the same templates in parallel using a thread pool:
207
+ Once a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
208
+ instance has been created, the templates cannot be edited anymore,
209
+ making the [`Jess.query`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess.query) method re-entrant and thread-safe. This allows querying
210
+ several molecules against the same templates in parallel using e.g a
211
+ [`ThreadPool`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.ThreadPool):
167
212
 
168
213
  ```python
169
214
  molecules = []
@@ -177,8 +222,23 @@ with multiprocessing.ThreadPool() as pool:
177
222
  *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
178
223
  If running Jess in parallel, make sure to use `v0.2.1` or later to use the code patched with re-entrant functions*.
179
224
 
180
- <!-- ## ⏱️ Benchmarks -->
225
+ ## ⏱️ Benchmarks
226
+
227
+ The following table reports the runtime of PyJess to match N=132 protein
228
+ structures to the M=7607 templates of
229
+ [EnzyMM](https://github.com/RayHackett/enzymm), using J=12 threads to parallelize.
230
+
231
+ | Version | Runtime (s) | Match Speed (N * M / s * J) | Speedup |
232
+ | ----------- | ----------- | --------------------------- | ----------- |
233
+ | ``v0.4.2`` | 618.1 | 135.4 | N/A |
234
+ | ``v0.5.0`` | 586.3 | 142.7 | x1.05 |
235
+ | ``v0.5.1`` | 365.6 | 228.9 | x1.69 |
236
+ | ``v0.5.2`` | 327.2 | 255.7 | x1.88 |
237
+ | ``v0.6.0`` | 54.5 | 1535.4 | x11.34 |
238
+ | ``v0.7.0`` | 52.4 | 1597.5 | **x11.80** |
181
239
 
240
+ *Benchmarks were run on a quiet [i7-1255U](https://www.intel.com/content/www/us/en/products/sku/226259/intel-core-i71255u-processor-12m-cache-up-to-4-70-ghz/specifications.html)
241
+ CPU running @4.70GHz with 10 physical cores / 12 logical cores.*
182
242
 
183
243
  ## 💭 Feedback
184
244
 
@@ -206,12 +266,13 @@ in the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
206
266
 
207
267
  ## ⚖️ License
208
268
 
209
- This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/). The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
269
+ This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/).
270
+ The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
210
271
 
211
272
  *This project is in no way not affiliated, sponsored, or otherwise endorsed
212
273
  by the JESS authors. It was developed
213
274
  by [Martin Larralde](https://github.com/althonos/) during his PhD project
214
- at the [European Molecular Biology Laboratory](https://www.embl.de/) in
275
+ at the [Leiden University Medical Center](https://www.lumc.nl/en/) in
215
276
  the [Zeller team](https://github.com/zellerlab).*
216
277
 
217
278
 
@@ -33,7 +33,9 @@ during his PhD in the [Thornton group](https://www.ebi.ac.uk/research/thornton/)
33
33
  PyJess is a Python module that provides bindings to Jess using
34
34
  [Cython](https://cython.org/). It allows creating templates, querying them
35
35
  with protein structures, and retrieving the hits using a Python API without
36
- performing any external I/O.
36
+ performing any external I/O. It's also more than 10x faster than Jess thanks to
37
+ [algorithmic optimizations](https://pyjess.readthedocs.io/en/latest/guide/optimizations.html)
38
+ added to improve the original Jess code while producing consistent results.
37
39
 
38
40
 
39
41
  ## 🔧 Installing
@@ -53,7 +55,7 @@ package:
53
55
  $ conda install -c bioconda pyjess
54
56
  ```
55
57
 
56
- Check the [*install* page](https://pyjess.readthedocs.io/en/stable/install.html)
58
+ Check the [*install* page](https://pyjess.readthedocs.io/en/stable/guide/install.html)
57
59
  of the documentation for other ways to install PyJess on your machine.
58
60
 
59
61
 
@@ -67,7 +69,10 @@ Jess if you are using it in an academic work, for instance as:
67
69
 
68
70
  ## 💡 Example
69
71
 
70
- Load templates to be used as references from different template files:
72
+ #### Prepare templates
73
+
74
+ Load [`Template`](https://pyjess.readthedocs.io/en/latest/api/template.html#pyjess.Template)
75
+ objects to be used as references from different template files:
71
76
 
72
77
  ```python
73
78
  import pathlib
@@ -75,19 +80,49 @@ import pyjess
75
80
 
76
81
  templates = []
77
82
  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))
83
+ templates.append(pyjess.Template.load(path, id=path.stem))
80
84
  ```
81
85
 
82
- Create a `Jess` instance and use it to query a molecule (a PDB structure)
83
- against the stored templates:
86
+ #### Prepare query structures
87
+
88
+ Load a [`Molecule`](https://pyjess.readthedocs.io/en/latest/api/molecule.html#pyjess.Molecule)
89
+ (a PDB structure) from a PDB file, create one with the Python API, or
90
+ convert it from a [`Bio.Model`](https://biopython.org/docs/1.76/api/Bio.PDB.Model.html),
91
+ [`gemmi.Model`](https://gemmi.readthedocs.io/en/latest/mol.html#model),
92
+ or [`biotite.structure.AtomArray`](https://www.biotite-python.org/latest/apidoc/biotite.structure.AtomArray.html)
93
+ object:
84
94
 
85
95
  ```python
86
- jess = pyjess.Jess(templates)
96
+ # load from PDB file or mmCIF file
87
97
  mol = pyjess.Molecule.load("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
98
+
99
+ # load with BioPython
100
+ parser = Bio.PDB.PDBParser()
101
+ structure = parser.get_structure('pdb1a0p', "vendor/jess/examples/test_pdbs/pdb1a0p.ent")
102
+ mol = Molecule.from_biopython(structure, id="1a0p")
103
+
104
+ # load with Gemmi
105
+ structure = gemmi.read_pdb_string("vendor/jess/examples/test_pdbs/pdb1a0p.ent")
106
+ mol = Molecule.from_gemmi(structure[0], id="1a0p")
107
+
108
+ # load with Biotite
109
+ pdb_file = biotite.structure.io.pdb.PDBFile.read(f)
110
+ structure = pdb_file.get_structure(altloc="all", extra_fields=["atom_id", "b_factor", "occupancy", "charge"])
111
+ mol = Molecule.from_biotite(structure[0])
112
+ ```
113
+
114
+ ### Match templates
115
+
116
+ Create a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
117
+ instance and use it to query a against the stored templates:
118
+
119
+ ```python
120
+ jess = pyjess.Jess(templates)
88
121
  query = jess.query(mol, rmsd_threshold=2.0, distance_cutoff=3.0, max_dynamic_distance=3.0)
89
122
  ```
90
123
 
124
+ ### Process hits
125
+
91
126
  The hits are computed iteratively, and the different output statistics are
92
127
  computed on-the-fly when requested:
93
128
 
@@ -98,12 +133,20 @@ for hit in query:
98
133
  print(atom.name, atom.x, atom.y, atom.z)
99
134
  ```
100
135
 
136
+ Hits can also be rendered in PDB format like in the original Jess output,
137
+ either by writing to a file directly, or to a Python string:
138
+ ```python
139
+ for hit in query:
140
+ hit.dump(sys.stdout, format="pdb")
141
+ ```
101
142
 
102
143
  ## 🧶 Thread-safety
103
144
 
104
- Once a `Jess` instance has been created, the templates cannot be edited anymore,
105
- making the `Jess.query` method re-entrant. This allows querying several
106
- molecules against the same templates in parallel using a thread pool:
145
+ Once a [`Jess`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess)
146
+ instance has been created, the templates cannot be edited anymore,
147
+ making the [`Jess.query`](https://pyjess.readthedocs.io/en/latest/api/jess.html#pyjess.Jess.query) method re-entrant and thread-safe. This allows querying
148
+ several molecules against the same templates in parallel using e.g a
149
+ [`ThreadPool`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.ThreadPool):
107
150
 
108
151
  ```python
109
152
  molecules = []
@@ -117,8 +160,23 @@ with multiprocessing.ThreadPool() as pool:
117
160
  *⚠️ Prior to PyJess `v0.2.1`, the Jess code was running some thread-unsafe operations which have now been patched.
118
161
  If running Jess in parallel, make sure to use `v0.2.1` or later to use the code patched with re-entrant functions*.
119
162
 
120
- <!-- ## ⏱️ Benchmarks -->
163
+ ## ⏱️ Benchmarks
164
+
165
+ The following table reports the runtime of PyJess to match N=132 protein
166
+ structures to the M=7607 templates of
167
+ [EnzyMM](https://github.com/RayHackett/enzymm), using J=12 threads to parallelize.
168
+
169
+ | Version | Runtime (s) | Match Speed (N * M / s * J) | Speedup |
170
+ | ----------- | ----------- | --------------------------- | ----------- |
171
+ | ``v0.4.2`` | 618.1 | 135.4 | N/A |
172
+ | ``v0.5.0`` | 586.3 | 142.7 | x1.05 |
173
+ | ``v0.5.1`` | 365.6 | 228.9 | x1.69 |
174
+ | ``v0.5.2`` | 327.2 | 255.7 | x1.88 |
175
+ | ``v0.6.0`` | 54.5 | 1535.4 | x11.34 |
176
+ | ``v0.7.0`` | 52.4 | 1597.5 | **x11.80** |
121
177
 
178
+ *Benchmarks were run on a quiet [i7-1255U](https://www.intel.com/content/www/us/en/products/sku/226259/intel-core-i71255u-processor-12m-cache-up-to-4-70-ghz/specifications.html)
179
+ CPU running @4.70GHz with 10 physical cores / 12 logical cores.*
122
180
 
123
181
  ## 💭 Feedback
124
182
 
@@ -146,12 +204,13 @@ in the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
146
204
 
147
205
  ## ⚖️ License
148
206
 
149
- This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/). The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
207
+ This library is provided under the [MIT License](https://choosealicense.com/licenses/mit/).
208
+ The JESS code is distributed under the [MIT License](https://choosealicense.com/licenses/mit/) as well.
150
209
 
151
210
  *This project is in no way not affiliated, sponsored, or otherwise endorsed
152
211
  by the JESS authors. It was developed
153
212
  by [Martin Larralde](https://github.com/althonos/) during his PhD project
154
- at the [European Molecular Biology Laboratory](https://www.embl.de/) in
213
+ at the [Leiden University Medical Center](https://www.lumc.nl/en/) in
155
214
  the [Zeller team](https://github.com/zellerlab).*
156
215
 
157
216
 
@@ -1,6 +1,16 @@
1
1
  [
2
2
  {
3
- "name": "v0.5 (latest)",
3
+ "name": "v0.7 (latest)",
4
+ "version": "0.7.0",
5
+ "url": "https://pyjess.readthedocs.io/en/v0.7.0/"
6
+ },
7
+ {
8
+ "name": "v0.6",
9
+ "version": "0.6.0",
10
+ "url": "https://pyjess.readthedocs.io/en/v0.6.0/"
11
+ },
12
+ {
13
+ "name": "v0.5",
4
14
  "version": "0.5.2",
5
15
  "url": "https://pyjess.readthedocs.io/en/v0.5.2/"
6
16
  },
@@ -74,6 +74,7 @@ extensions = [
74
74
  "sphinx.ext.extlinks",
75
75
  "sphinx_design",
76
76
  "sphinxcontrib.jquery",
77
+ "sphinxarg.ext",
77
78
  "nbsphinx",
78
79
  "recommonmark",
79
80
  "IPython.sphinxext.ipython_console_highlighting",
@@ -190,6 +191,9 @@ autosummary_generate = []
190
191
  # Example configuration for intersphinx: refer to the Python standard library.
191
192
  intersphinx_mapping = {
192
193
  "python": ("https://docs.python.org/3/", None),
194
+ "biopython": ("https://biopython.org/docs/latest/", None),
195
+ "biotite": ("https://www.biotite-python.org/latest/", None),
196
+ "gemmi": ("https://gemmi.readthedocs.io/en/latest/", None),
193
197
  }
194
198
 
195
199
  # -- Options for recommonmark extension --------------------------------------