pyjess 0.6.0__tar.gz → 0.7.0a2__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.
- {pyjess-0.6.0 → pyjess-0.7.0a2}/.github/workflows/package.yml +7 -2
- {pyjess-0.6.0 → pyjess-0.7.0a2}/CHANGELOG.md +23 -1
- {pyjess-0.6.0 → pyjess-0.7.0a2}/PKG-INFO +3 -2
- {pyjess-0.6.0 → pyjess-0.7.0a2}/README.md +2 -1
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/jess.pxd +3 -2
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/scanner.pxd +2 -2
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/template.pxd +6 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Jess.c.patch +15 -4
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Jess.h.patch +6 -3
- pyjess-0.7.0a2/patches/Main.c.patch +116 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/ResIndex.c.patch +7 -11
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Scanner.c.patch +5 -3
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Scanner.h.patch +3 -2
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Template.h.patch +15 -5
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/TessAtom.c.patch +40 -12
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/TessAtom.h.patch +23 -6
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/TessTemplate.c.patch +34 -9
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/TessTemplate.h.patch +2 -2
- {pyjess-0.6.0 → pyjess-0.7.0a2}/pyproject.toml +1 -1
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/_jess.pyi +4 -4
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/_jess.pyx +123 -23
- pyjess-0.7.0a2/src/pyjess/tests/data/1sur.qry +26 -0
- pyjess-0.7.0a2/src/pyjess/tests/data/4.1.2.tpl +23 -0
- pyjess-0.7.0a2/src/pyjess/tests/data/5ayx.EF.pdb +63 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/test_jess.py +62 -1
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/test_template.py +9 -1
- pyjess-0.6.0/patches/Main.c.patch +0 -60
- {pyjess-0.6.0 → pyjess-0.7.0a2}/.github/workflows/requirements.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/.github/workflows/test.yml +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/.gitignore +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/.gitmodules +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/.readthedocs.yaml +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/CMakeLists.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/CONTRIBUTING.md +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/COPYING +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/.gitignore +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/Makefile +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/_static/css/main.css +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/_static/js/custom-icon.js +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/_static/json/switcher.json +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/api/index.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/api/jess.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/api/molecule.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/api/template.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/conf.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/guide/changes.md +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/guide/contributing.md +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/guide/copyright.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/guide/index.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/guide/install.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/guide/optimizations.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/index.rst +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/make.bat +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/docs/requirements.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/__init__.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/annulus.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/atom.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/candidate_set.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/join.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/kdtree.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/molecule.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/region.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/res_index.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/super.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/tess_atom.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/include/jess/tess_template.pxd +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Annulus.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Annulus.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Atom.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Box.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Box.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/CMakeLists.txt.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/CandidateSet.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/CandidateSet.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Join.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Join.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/KdTree.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/KdTree.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Molecule.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Molecule.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/ResIndex.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/Super.c.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/patches/qselect.h.patch +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/pkg/aur/PKGBUILD.in +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/CMakeLists.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/jess/CMakeLists.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/.gitignore +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/CMakeLists.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/__init__.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/py.typed +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/__init__.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/1.3.3.tpl +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/1AMY+1.3.3.txt +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/1AMY.pdb +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/__init__.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/pdb1lnb.pdb +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/template_01.qry +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/data/template_02.qry +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/test_atom.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/test_hit.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/test_molecule.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/test_template_atom.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/pyjess/tests/utils.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/scripts/apply_patch.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/scripts/cmake/CythonExtension.cmake +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/scripts/cmake/pystate_patch.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/src/scripts/generate_patches.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/.gitignore +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/README.md +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/examples/template_01.qry +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/examples/template_02.qry +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/examples/test_pdbs/pdb1lnb.ent +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/filter_output.py +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Annulus.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Annulus.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Atom.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Atom.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Jess.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Jess.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Join.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Join.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/KdTree.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/KdTree.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Main.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Molecule.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Molecule.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Region.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Region.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Scanner.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Scanner.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Super.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Super.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/Template.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/TessAtom.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/TessAtom.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/TessTemplate.c +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/vendor/jess/src/TessTemplate.h +0 -0
- {pyjess-0.6.0 → pyjess-0.7.0a2}/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
|
|
@@ -6,7 +6,29 @@ 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.
|
|
9
|
+
[Unreleased]: https://github.com/althonos/pyjess/compare/v0.7.0-alpha.2...HEAD
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## [v0.7.0-alpha.2] - 2025-09-02
|
|
13
|
+
[v0.7.0-alpha.2]: https://github.com/althonos/pyjess/compare/v0.7.0-alpha.1...v0.7.0-alpha.2
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- `max_candidates` causing `Query` to stop before reaching the actual number of maximum candidates.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **breaking**: Use string variants instead of `bool` to control the behaviour of `ignore_chain` argument.
|
|
20
|
+
- Use unrolled string comparison to compare atom names instead of `strcasecmp` in Jess code.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [v0.7.0-alpha.1] - 2025-09-02
|
|
24
|
+
[v0.7.0-alpha.1]: https://github.com/althonos/pyjess/compare/v0.6.0...v0.7.0-alpha.1
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- **breaking**: Incorrect handling of `max_candidates` in `Jess.query`, causing PyJess to erroneously ignore some templates.
|
|
28
|
+
- `Template.dimension` reporting incorrect numbers for identical residues across different residues.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- **breaking**: Set the `max_candidates` default value to `None` in `Jess.query`, disabling max candidates filtering by default.
|
|
10
32
|
|
|
11
33
|
|
|
12
34
|
## [v0.6.0] - 2025-09-01
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pyjess
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0a2
|
|
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>
|
|
@@ -193,7 +193,8 @@ structures to the $m=7607$ templates of
|
|
|
193
193
|
| ``v0.5.0`` | 586.3 | 142.7 | x1.05 |
|
|
194
194
|
| ``v0.5.1`` | 365.6 | 228.9 | x1.69 |
|
|
195
195
|
| ``v0.5.2`` | 327.2 | 255.7 | x1.88 |
|
|
196
|
-
| ``v0.6.0`` | 54.5 | 1535.4 |
|
|
196
|
+
| ``v0.6.0`` | 54.5 | 1535.4 | x11.34 |
|
|
197
|
+
| ``v0.7.0`` | 52.4 | 1597.5 | **x11.80** |
|
|
197
198
|
|
|
198
199
|
*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) CPU running @4.70GHz with 10 physical cores / 12 logical
|
|
199
200
|
cores.*
|
|
@@ -133,7 +133,8 @@ structures to the $m=7607$ templates of
|
|
|
133
133
|
| ``v0.5.0`` | 586.3 | 142.7 | x1.05 |
|
|
134
134
|
| ``v0.5.1`` | 365.6 | 228.9 | x1.69 |
|
|
135
135
|
| ``v0.5.2`` | 327.2 | 255.7 | x1.88 |
|
|
136
|
-
| ``v0.6.0`` | 54.5 | 1535.4 |
|
|
136
|
+
| ``v0.6.0`` | 54.5 | 1535.4 | x11.34 |
|
|
137
|
+
| ``v0.7.0`` | 52.4 | 1597.5 | **x11.80** |
|
|
137
138
|
|
|
138
139
|
*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) CPU running @4.70GHz with 10 physical cores / 12 logical
|
|
139
140
|
cores.*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from .atom cimport Atom
|
|
2
2
|
from .molecule cimport Molecule
|
|
3
3
|
from .super cimport Superposition
|
|
4
|
-
from .template cimport Template
|
|
4
|
+
from .template cimport Template, IgnoreType
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
cdef extern from "Jess.h" nogil:
|
|
@@ -21,7 +21,8 @@ cdef extern from "Jess.h" nogil:
|
|
|
21
21
|
JessQuery* Jess_query(Jess*, Molecule*, double, double, bint)
|
|
22
22
|
|
|
23
23
|
void JessQuery_free(JessQuery*)
|
|
24
|
-
int JessQuery_next(JessQuery*,
|
|
24
|
+
int JessQuery_next(JessQuery*, IgnoreType)
|
|
25
|
+
int JessQuery_nextTemplate(JessQuery*)
|
|
25
26
|
Template* JessQuery_template(JessQuery*)
|
|
26
27
|
const Molecule* JessQuery_molecule(JessQuery*)
|
|
27
28
|
Atom** JessQuery_atoms(JessQuery*)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from .molecule import Molecule
|
|
2
|
-
from .template import Template
|
|
2
|
+
from .template import Template, IgnoreType
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
cdef extern from "Scanner.h" nogil:
|
|
@@ -10,6 +10,6 @@ cdef extern from "Scanner.h" nogil:
|
|
|
10
10
|
|
|
11
11
|
Scanner* Scanner_create(Molecule*, Template*, double, double)
|
|
12
12
|
void Scanner_free(Scanner*)
|
|
13
|
-
Atom** Scanner_next(Scanner*,
|
|
13
|
+
Atom** Scanner_next(Scanner*, IgnoreType)
|
|
14
14
|
double Scanner_rmsd(Scanner*)
|
|
15
15
|
|
|
@@ -5,6 +5,12 @@ from .candidate_set cimport CandidateSet
|
|
|
5
5
|
cdef extern from "Template.h" nogil:
|
|
6
6
|
|
|
7
7
|
ctypedef _Template Template
|
|
8
|
+
|
|
9
|
+
ctypedef enum IgnoreType:
|
|
10
|
+
ignoreNone
|
|
11
|
+
ignoreResidues
|
|
12
|
+
ignoreAtoms
|
|
13
|
+
|
|
8
14
|
cdef struct _Template:
|
|
9
15
|
void (*free)(Template*) nogil
|
|
10
16
|
int (*count)(const Template*) nogil
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/Jess.c b/src/Jess.c
|
|
2
|
-
index e81bda0..
|
|
2
|
+
index e81bda0..a0929cd 100644
|
|
3
3
|
--- a/src/Jess.c
|
|
4
4
|
+++ b/src/Jess.c
|
|
5
5
|
@@ -4,15 +4,18 @@
|
|
@@ -96,7 +96,7 @@ index e81bda0..5601c07 100644
|
|
|
96
96
|
|
|
97
97
|
return Q;
|
|
98
98
|
}
|
|
99
|
-
@@ -129,74 +151,
|
|
99
|
+
@@ -129,74 +151,90 @@ void JessQuery_free(JessQuery *Q)
|
|
100
100
|
{
|
|
101
101
|
Scanner_free(Q->scanner);
|
|
102
102
|
Superposition_free(Q->super);
|
|
@@ -150,9 +150,20 @@ index e81bda0..5601c07 100644
|
|
|
150
150
|
|
|
151
151
|
- return Q->super;
|
|
152
152
|
+ return super;
|
|
153
|
+
+}
|
|
154
|
+
+
|
|
155
|
+
+int JessQuery_nextTemplate(JessQuery *Q)
|
|
156
|
+
+{
|
|
157
|
+
+ Q->scan=false;
|
|
158
|
+
+ Superposition_free(Q->super);
|
|
159
|
+
+ Q->super=NULL;
|
|
160
|
+
+ Q->atoms=NULL;
|
|
161
|
+
+ Q->node=Q->node->next;
|
|
162
|
+
+ return (Q->node) ? 1 : 0;
|
|
153
163
|
}
|
|
154
164
|
|
|
155
|
-
|
|
165
|
+
-int JessQuery_next(JessQuery *Q, int ignore_chain)
|
|
166
|
+
+int JessQuery_next(JessQuery *Q, IgnoreType ignore_chain)
|
|
156
167
|
{
|
|
157
168
|
Template *T;
|
|
158
169
|
Atom **A;
|
|
@@ -191,7 +202,7 @@ index e81bda0..5601c07 100644
|
|
|
191
202
|
}
|
|
192
203
|
|
|
193
204
|
if((A=Scanner_next(Q->scanner, ignore_chain)))
|
|
194
|
-
@@ -207,8 +
|
|
205
|
+
@@ -207,8 +245,9 @@ int JessQuery_next(JessQuery *Q, int ignore_chain)
|
|
195
206
|
return 1;
|
|
196
207
|
}
|
|
197
208
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/Jess.h b/src/Jess.h
|
|
2
|
-
index c90abe6..
|
|
2
|
+
index c90abe6..4361958 100644
|
|
3
3
|
--- a/src/Jess.h
|
|
4
4
|
+++ b/src/Jess.h
|
|
5
5
|
@@ -8,6 +8,8 @@
|
|
@@ -27,14 +27,17 @@ index c90abe6..f5e3dd4 100644
|
|
|
27
27
|
|
|
28
28
|
// ==================================================================
|
|
29
29
|
// Methods of type JessQuery
|
|
30
|
-
@@ -
|
|
30
|
+
@@ -49,11 +51,12 @@ extern JessQuery *Jess_query(Jess*,Molecule*,double,double);
|
|
31
|
+
// ==================================================================
|
|
31
32
|
|
|
32
33
|
extern void JessQuery_free(JessQuery*);
|
|
33
|
-
|
|
34
|
+
-extern int JessQuery_next(JessQuery*, int);
|
|
34
35
|
-extern Template *JessQuery_template(JessQuery*);
|
|
35
36
|
-extern const Molecule *JessQuery_molecule(JessQuery*);
|
|
36
37
|
-extern Atom **JessQuery_atoms(JessQuery*);
|
|
37
38
|
-extern Superposition *JessQuery_superposition(JessQuery*);
|
|
39
|
+
+extern int JessQuery_next(JessQuery*, IgnoreType);
|
|
40
|
+
+extern int JessQuery_nextTemplate(JessQuery*);
|
|
38
41
|
+extern Template *JessQuery_template(const JessQuery*);
|
|
39
42
|
+extern const Molecule *JessQuery_molecule(const JessQuery*);
|
|
40
43
|
+extern Atom **JessQuery_atoms(const JessQuery*);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
diff --git a/src/Main.c b/src/Main.c
|
|
2
|
+
index dff22b9..5baeb17 100644
|
|
3
|
+
--- a/src/Main.c
|
|
4
|
+
+++ b/src/Main.c
|
|
5
|
+
@@ -14,6 +14,7 @@
|
|
6
|
+
#include <ctype.h>
|
|
7
|
+
#include <errno.h>
|
|
8
|
+
#include <stdarg.h>
|
|
9
|
+
+#include <stdint.h>
|
|
10
|
+
|
|
11
|
+
// ==================================================================
|
|
12
|
+
// Global constants
|
|
13
|
+
@@ -21,6 +22,8 @@
|
|
14
|
+
// atomFormat The format of a PDB ATOM record (for printf)
|
|
15
|
+
// ==================================================================
|
|
16
|
+
|
|
17
|
+
+#define MAX_CANDIDATES -1
|
|
18
|
+
+
|
|
19
|
+
static const char *atomFormat =
|
|
20
|
+
"ATOM %5i%5s%c%-3s%c%c%4i%-4c%8.3f%8.3f%8.3f%6.2f%6.2f\n"; //Riziotis edit
|
|
21
|
+
//"ATOM %5i%5s%c%-3s%c%c%4i%-4c%8.3f%8.3f%8.3f\n"; //Riziotis edit
|
|
22
|
+
@@ -116,11 +119,11 @@ static void output(
|
|
23
|
+
A->charge
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
-static void search(const char *filename,Jess *J,double tRmsd,double tDistance,double max_total_threshold,int no_transform,int ignore_chain,int write_filename,int ignore_endmdl, float conservation_cutoff)
|
|
27
|
+
+static void search(const char *filename,Jess *J,double tRmsd,double tDistance,double max_total_threshold,int no_transform,IgnoreType ignore_chain,int write_filename,int ignore_endmdl, float conservation_cutoff, bool fastScan)
|
|
28
|
+
{
|
|
29
|
+
Molecule *M;
|
|
30
|
+
Superposition *sup;
|
|
31
|
+
- Template *T;
|
|
32
|
+
+ Template *T, *Tprev;
|
|
33
|
+
Atom **A;
|
|
34
|
+
FILE *file;
|
|
35
|
+
JessQuery *Q;
|
|
36
|
+
@@ -128,7 +131,7 @@ static void search(const char *filename,Jess *J,double tRmsd,double tDistance,do
|
|
37
|
+
const double *P,*c[2];
|
|
38
|
+
double det;
|
|
39
|
+
double logE;
|
|
40
|
+
- int killswitch = 0;
|
|
41
|
+
+ int candidates = 0;
|
|
42
|
+
|
|
43
|
+
if(!(file=fopen(filename,"r")))
|
|
44
|
+
{
|
|
45
|
+
@@ -145,11 +148,21 @@ static void search(const char *filename,Jess *J,double tRmsd,double tDistance,do
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
- Q=Jess_query(J,M,tDistance,max_total_threshold);
|
|
50
|
+
+ Q=Jess_query(J,M,tDistance,max_total_threshold,fastScan);
|
|
51
|
+
+ T=JessQuery_template(Q);
|
|
52
|
+
|
|
53
|
+
- while(JessQuery_next(Q, ignore_chain) && killswitch<1000)
|
|
54
|
+
+ while(JessQuery_next(Q, ignore_chain))
|
|
55
|
+
{
|
|
56
|
+
+ Tprev=T;
|
|
57
|
+
T=JessQuery_template(Q);
|
|
58
|
+
+ // printf("current template: %s\n", T->name(T));
|
|
59
|
+
+
|
|
60
|
+
+ candidates = (T!=Tprev) ? 0 : candidates + 1;
|
|
61
|
+
+ if(candidates == MAX_CANDIDATES)
|
|
62
|
+
+ {
|
|
63
|
+
+ JessQuery_nextTemplate(Q);
|
|
64
|
+
+ continue;
|
|
65
|
+
+ }
|
|
66
|
+
|
|
67
|
+
count=T->count(T);
|
|
68
|
+
sup = JessQuery_superposition(Q);
|
|
69
|
+
@@ -193,7 +206,8 @@ static void search(const char *filename,Jess *J,double tRmsd,double tDistance,do
|
|
70
|
+
|
|
71
|
+
printf("ENDMDL\n\n");
|
|
72
|
+
}
|
|
73
|
+
- killswitch+=1;
|
|
74
|
+
+
|
|
75
|
+
+ Superposition_free(sup);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
JessQuery_free(Q);
|
|
79
|
+
@@ -336,9 +350,10 @@ int main(int argc, char **argv)
|
|
80
|
+
int count;
|
|
81
|
+
//Riziotis edit
|
|
82
|
+
int no_transform=0;
|
|
83
|
+
- int ignore_chain=0;
|
|
84
|
+
+ IgnoreType ignore_chain=ignoreNone;
|
|
85
|
+
int write_filename=0;
|
|
86
|
+
int ignore_endmdl=0;
|
|
87
|
+
+ int fastScan=0;
|
|
88
|
+
|
|
89
|
+
if(argc<7 || argc>8) help();
|
|
90
|
+
|
|
91
|
+
@@ -351,9 +366,11 @@ int main(int argc, char **argv)
|
|
92
|
+
if(*s=='f') feedbackQ=1;
|
|
93
|
+
//Riziotis edit
|
|
94
|
+
else if(*s=='n') no_transform=1;
|
|
95
|
+
- else if(*s=='i') ignore_chain=1;
|
|
96
|
+
+ else if(*s=='i') ignore_chain=ignoreAtoms;
|
|
97
|
+
+ else if(*s=='I') ignore_chain=ignoreResidues;
|
|
98
|
+
else if(*s=='q') write_filename=1;
|
|
99
|
+
else if(*s=='e') ignore_endmdl=1;
|
|
100
|
+
+ else if(*s=='s') fastScan=1;
|
|
101
|
+
else help();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
@@ -388,10 +405,11 @@ int main(int argc, char **argv)
|
|
105
|
+
if(strlen(s)==0) continue;
|
|
106
|
+
|
|
107
|
+
if(feedbackQ) fprintf(stderr,"%s\n",s);
|
|
108
|
+
- search(buf,J,tRmsd,tDistance,max_total_threshold,no_transform,ignore_chain,write_filename,ignore_endmdl,conservation_cutoff);
|
|
109
|
+
+ search(buf,J,tRmsd,tDistance,max_total_threshold,no_transform,ignore_chain,write_filename,ignore_endmdl,conservation_cutoff,fastScan);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
fclose(file);
|
|
113
|
+
+ Jess_free(J);
|
|
114
|
+
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
diff --git a/src/ResIndex.c b/src/ResIndex.c
|
|
2
2
|
new file mode 100644
|
|
3
|
-
index 0000000..
|
|
3
|
+
index 0000000..ed907f4
|
|
4
4
|
--- /dev/null
|
|
5
5
|
+++ b/src/ResIndex.c
|
|
6
|
-
@@ -0,0 +1,
|
|
6
|
+
@@ -0,0 +1,163 @@
|
|
7
7
|
+// ==================================================================
|
|
8
8
|
+// HashMap.h
|
|
9
9
|
+// Copyright (c) Martin Larralde, 2025
|
|
@@ -18,18 +18,14 @@ index 0000000..0010445
|
|
|
18
18
|
+#include <stdio.h>
|
|
19
19
|
+
|
|
20
20
|
+#include "Atom.h"
|
|
21
|
+
+#include "TessAtom.h"
|
|
21
22
|
+#include "ResIndex.h"
|
|
22
23
|
+
|
|
23
|
-
+#ifdef _MSC_VER
|
|
24
|
-
+#define strncasecmp _strnicmp
|
|
25
|
-
+#define strcasecmp _stricmp
|
|
26
|
-
+#endif
|
|
27
|
-
+
|
|
28
24
|
+static int ResNames_compare(const void *pa, const void *pb)
|
|
29
25
|
+{
|
|
30
26
|
+ const Atom *a = **((const Atom***)pa);
|
|
31
27
|
+ const Atom *b = **((const Atom***)pb);
|
|
32
|
-
+ int result =
|
|
28
|
+
+ int result = TessAtom_compareName(&a->resName[0], &b->resName[0]);
|
|
33
29
|
+ if (result != 0)
|
|
34
30
|
+ return result;
|
|
35
31
|
+ return a->serial - b->serial;
|
|
@@ -75,7 +71,7 @@ index 0000000..0010445
|
|
|
75
71
|
+
|
|
76
72
|
+ numRes = 1;
|
|
77
73
|
+ for (i = 1; i < n; i++)
|
|
78
|
-
+ numRes += (
|
|
74
|
+
+ numRes += (TessAtom_compareName((*tmp[i-1])->resName, (*tmp[i])->resName) != 0);
|
|
79
75
|
+
|
|
80
76
|
+ // Allocate data for residues
|
|
81
77
|
+
|
|
@@ -100,7 +96,7 @@ index 0000000..0010445
|
|
|
100
96
|
+
|
|
101
97
|
+ for (i = 1, j = 4, k = 1; i < n; i++) {
|
|
102
98
|
+
|
|
103
|
-
+ if (
|
|
99
|
+
+ if (TessAtom_compareName((*tmp[i-1])->resName, (*tmp[i])->resName) != 0) {
|
|
104
100
|
+ memcpy(names, (*tmp[i])->resName, 4*sizeof(char));
|
|
105
101
|
+ names += 4;
|
|
106
102
|
+
|
|
@@ -133,7 +129,7 @@ index 0000000..0010445
|
|
|
133
129
|
+
|
|
134
130
|
+ while (start < end) {
|
|
135
131
|
+ mid = (start + end) / 2;
|
|
136
|
-
+ cmp =
|
|
132
|
+
+ cmp = TessAtom_compareName(&I->names[4*mid], resName);
|
|
137
133
|
+ if(cmp < 0) {
|
|
138
134
|
+ start = (mid == start) ? mid + 1 : mid;
|
|
139
135
|
+ } else if (cmp > 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/Scanner.c b/src/Scanner.c
|
|
2
|
-
index 19a35a7..
|
|
2
|
+
index 19a35a7..2d0e528 100644
|
|
3
3
|
--- a/src/Scanner.c
|
|
4
4
|
+++ b/src/Scanner.c
|
|
5
5
|
@@ -5,41 +5,37 @@
|
|
@@ -201,7 +201,7 @@ index 19a35a7..d796132 100644
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
return S;
|
|
204
|
-
@@ -119,
|
|
204
|
+
@@ -119,36 +184,16 @@ Scanner *Scanner_create(Molecule *M, Template *T,double r, double s)
|
|
205
205
|
|
|
206
206
|
void Scanner_free(Scanner *S)
|
|
207
207
|
{
|
|
@@ -228,7 +228,9 @@ index 19a35a7..d796132 100644
|
|
|
228
228
|
free(S);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
|
|
232
|
+
-Atom **Scanner_next(Scanner *S, int ignore_chain)
|
|
233
|
+
+Atom **Scanner_next(Scanner *S, IgnoreType ignore_chain)
|
|
232
234
|
{
|
|
233
235
|
int j,k;
|
|
234
236
|
double min,max;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/Scanner.h b/src/Scanner.h
|
|
2
|
-
index d775ce7..
|
|
2
|
+
index d775ce7..8a83fbc 100644
|
|
3
3
|
--- a/src/Scanner.h
|
|
4
4
|
+++ b/src/Scanner.h
|
|
5
5
|
@@ -11,27 +11,43 @@
|
|
@@ -31,7 +31,8 @@ index d775ce7..e049f40 100644
|
|
|
31
31
|
+extern Scanner *Scanner_create(Molecule*,Template*,ScannerData*,double,double,bool);
|
|
32
32
|
+extern Scanner *Scanner_reuse(Scanner*,Molecule*,Template*,ScannerData*,double,double,bool);
|
|
33
33
|
extern void Scanner_free(Scanner*);
|
|
34
|
-
|
|
34
|
+
-extern Atom **Scanner_next(Scanner*, int);
|
|
35
|
+
+extern Atom **Scanner_next(Scanner*, IgnoreType);
|
|
35
36
|
extern double Scanner_rmsd(Scanner*);
|
|
36
37
|
|
|
37
38
|
+// ==================================================================
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
diff --git a/src/Template.h b/src/Template.h
|
|
2
|
-
index 13f68f1..
|
|
2
|
+
index 13f68f1..8cb0ee7 100644
|
|
3
3
|
--- a/src/Template.h
|
|
4
4
|
+++ b/src/Template.h
|
|
5
|
-
@@ -9,
|
|
5
|
+
@@ -9,14 +9,17 @@
|
|
6
6
|
#define TEMPLATE_H
|
|
7
7
|
|
|
8
8
|
#include "Atom.h"
|
|
@@ -10,7 +10,17 @@ index 13f68f1..21e12c8 100644
|
|
|
10
10
|
|
|
11
11
|
// ==================================================================
|
|
12
12
|
// Forward declarations
|
|
13
|
-
|
|
13
|
+
// ==================================================================
|
|
14
|
+
// Template The template interface
|
|
15
|
+
+// IgnoreChainType The type of ignore_chain in check
|
|
16
|
+
// ==================================================================
|
|
17
|
+
|
|
18
|
+
typedef struct _Template Template;
|
|
19
|
+
+typedef enum { ignoreNone,ignoreResidues,ignoreAtoms } IgnoreType;
|
|
20
|
+
|
|
21
|
+
// ==================================================================
|
|
22
|
+
// type Template
|
|
23
|
+
@@ -26,6 +29,7 @@ typedef struct _Template Template;
|
|
14
24
|
// match(T,k,A) True if A matches atom k of T
|
|
15
25
|
// range(T,i,j,a,b) [*a,*b] <- range of |atom i - atom j|
|
|
16
26
|
// check(T,A,k,ignore_chain) Check n-ary rules on atom k-1 and 0,...,k-2
|
|
@@ -18,12 +28,12 @@ index 13f68f1..21e12c8 100644
|
|
|
18
28
|
// position(T,i) Position of atom i (example position)
|
|
19
29
|
// name(T) Returns the symbolic name for the template
|
|
20
30
|
// logE(T,x,n) Provide an estimate of logE for a hit
|
|
21
|
-
@@ -37,11 +
|
|
31
|
+
@@ -37,11 +41,13 @@ struct _Template
|
|
22
32
|
int (*count)(const Template*);
|
|
23
33
|
int (*match)(const Template*,int,const Atom*);
|
|
24
34
|
int (*range)(const Template*,int,int,double*,double*);
|
|
25
35
|
- int (*check)(const Template*,Atom**,int,int);
|
|
26
|
-
+ int (*check)(const Template*,Atom**,int*,int,
|
|
36
|
+
+ int (*check)(const Template*,Atom**,int*,int,IgnoreType);
|
|
27
37
|
+ void (*candidates)(const Template*, const Molecule*, int, CandidateSet**);
|
|
28
38
|
const double *(*position)(const Template*,int);
|
|
29
39
|
const char *(*name)(const Template*);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
diff --git a/src/TessAtom.c b/src/TessAtom.c
|
|
2
|
-
index e1cce1a..
|
|
2
|
+
index e1cce1a..9ba021e 100644
|
|
3
3
|
--- a/src/TessAtom.c
|
|
4
4
|
+++ b/src/TessAtom.c
|
|
5
|
-
@@ -7,
|
|
5
|
+
@@ -7,40 +7,13 @@
|
|
6
6
|
|
|
7
7
|
#include "TessAtom.h"
|
|
8
8
|
#include "Atom.h"
|
|
@@ -41,14 +41,11 @@ index e1cce1a..324347d 100644
|
|
|
41
41
|
- double pos[3];
|
|
42
42
|
- double distWeight;
|
|
43
43
|
-};
|
|
44
|
-
|
|
45
|
-
+#define strncasecmp _strnicmp
|
|
46
|
-
+#define strcasecmp _stricmp
|
|
47
|
-
+#endif
|
|
48
|
-
|
|
44
|
+
-
|
|
49
45
|
// ==================================================================
|
|
50
46
|
// Methods of type TessAtom (ARGGH!!!)
|
|
51
|
-
|
|
47
|
+
// ==================================================================
|
|
48
|
+
@@ -91,7 +64,7 @@ TessAtom *TessAtom_create(const char *s)
|
|
52
49
|
int rq;
|
|
53
50
|
const char *q;
|
|
54
51
|
const char *tmp;
|
|
@@ -57,7 +54,7 @@ index e1cce1a..324347d 100644
|
|
|
57
54
|
|
|
58
55
|
|
|
59
56
|
// 0. Parse the record as a standard PDB atom. We must
|
|
60
|
-
@@ -157,8 +
|
|
57
|
+
@@ -157,8 +130,8 @@ TessAtom *TessAtom_create(const char *s)
|
|
61
58
|
// Set up all the pointers to the
|
|
62
59
|
// residue name and atom name fields
|
|
63
60
|
|
|
@@ -68,7 +65,7 @@ index e1cce1a..324347d 100644
|
|
|
68
65
|
p+=sizeof(char*)*ac;
|
|
69
66
|
for(m=0; m<ac; m++)
|
|
70
67
|
{
|
|
71
|
-
@@ -166,7 +
|
|
68
|
+
@@ -166,7 +139,7 @@ TessAtom *TessAtom_create(const char *s)
|
|
72
69
|
p+=5;
|
|
73
70
|
}
|
|
74
71
|
|
|
@@ -77,7 +74,7 @@ index e1cce1a..324347d 100644
|
|
|
77
74
|
p+=sizeof(char*)*rc;
|
|
78
75
|
for(m=0; m<rc; m++)
|
|
79
76
|
{
|
|
80
|
-
@@ -259,41 +
|
|
77
|
+
@@ -259,41 +232,7 @@ TessAtom *TessAtom_create(const char *s)
|
|
81
78
|
}
|
|
82
79
|
|
|
83
80
|
//Riziotis edit
|
|
@@ -119,7 +116,38 @@ index e1cce1a..324347d 100644
|
|
|
119
116
|
static int TessAtom_isCarbon(const Atom *A)
|
|
120
117
|
{
|
|
121
118
|
return A->name[0]=='_' && A->name[1]=='C' ? 1:0;
|
|
122
|
-
@@ -
|
|
119
|
+
@@ -327,9 +266,9 @@ static int TessAtom_isInSamePosition(const TessAtom *T, const Atom *A)
|
|
120
|
+
|
|
121
|
+
static int TessAtom_isMainChain(const Atom *A)
|
|
122
|
+
{
|
|
123
|
+
- if(strcasecmp(A->name,"_CA_")==0) return 1;
|
|
124
|
+
- if(strcasecmp(A->name,"_N__")==0) return 1;
|
|
125
|
+
- if(strcasecmp(A->name,"_O__")==0) return 1;
|
|
126
|
+
+ if(TessAtom_compareName(A->name,"_CA_")==0) return 1;
|
|
127
|
+
+ if(TessAtom_compareName(A->name,"_N__")==0) return 1;
|
|
128
|
+
+ if(TessAtom_compareName(A->name,"_O__")==0) return 1;
|
|
129
|
+
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
@@ -340,7 +279,7 @@ static int TessAtom_matchName(const TessAtom *T, const Atom *A)
|
|
133
|
+
|
|
134
|
+
for(k=0; k<T->nameCount; k++)
|
|
135
|
+
{
|
|
136
|
+
- if(strcasecmp(A->name,T->name[k])==0) return 1;
|
|
137
|
+
+ if(TessAtom_compareName(A->name,T->name[k])==0) return 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return 0;
|
|
141
|
+
@@ -352,7 +291,7 @@ static int TessAtom_matchResName(const TessAtom *T, const Atom *A)
|
|
142
|
+
|
|
143
|
+
for(k=0; k<T->resNameCount; k++)
|
|
144
|
+
{
|
|
145
|
+
- if(strcasecmp(A->resName,T->resName[k])==0) return 1;
|
|
146
|
+
+ if(TessAtom_compareName(A->resName,T->resName[k])==0) return 1;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return 0;
|
|
150
|
+
@@ -507,5 +446,65 @@ int TessAtom_match(const TessAtom *T, const Atom *A)
|
|
123
151
|
}
|
|
124
152
|
}
|
|
125
153
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/TessAtom.h b/src/TessAtom.h
|
|
2
|
-
index 6480d8b..
|
|
2
|
+
index 6480d8b..8ec3618 100644
|
|
3
3
|
--- a/src/TessAtom.h
|
|
4
4
|
+++ b/src/TessAtom.h
|
|
5
5
|
@@ -9,6 +9,7 @@
|
|
@@ -46,12 +46,16 @@ index 6480d8b..648f55f 100644
|
|
|
46
46
|
// ==================================================================
|
|
47
47
|
// Methods of type TessAtom
|
|
48
48
|
// ==================================================================
|
|
49
|
-
@@ -30,16 +60,
|
|
49
|
+
@@ -30,16 +60,79 @@ typedef struct _TessAtom TessAtom;
|
|
50
50
|
// ==================================================================
|
|
51
51
|
|
|
52
52
|
extern TessAtom *TessAtom_create(const char*);
|
|
53
53
|
-extern void TessAtom_free(TessAtom*);
|
|
54
54
|
-extern const double *TessAtom_position(const TessAtom*);
|
|
55
|
+
+extern TessAtom* TessAtom_copy(const TessAtom*);
|
|
56
|
+
extern int TessAtom_match(const TessAtom*,const Atom*);
|
|
57
|
+
-extern int TessAtom_resSeq(const TessAtom*);
|
|
58
|
+
+extern double TessAtom_distance(const TessAtom*, const TessAtom*);
|
|
55
59
|
+
|
|
56
60
|
+static inline void TessAtom_free(TessAtom *A)
|
|
57
61
|
+{
|
|
@@ -63,8 +67,22 @@ index 6480d8b..648f55f 100644
|
|
|
63
67
|
+ return A->pos;
|
|
64
68
|
+}
|
|
65
69
|
+
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
+#ifndef TessAtom_toupper
|
|
71
|
+
+#define TessAtom_toupper(c) ((( c >= 'a' ) && (c <= 'z')) ? c & (~0x20) : c);
|
|
72
|
+
+#endif
|
|
73
|
+
+
|
|
74
|
+
+static int TessAtom_compareName(const char* restrict a, const char* restrict b)
|
|
75
|
+
+{
|
|
76
|
+
+ for(int i=0; i<4;i++)
|
|
77
|
+
+ {
|
|
78
|
+
+ char ca = TessAtom_toupper(a[i]);
|
|
79
|
+
+ char cb = TessAtom_toupper(b[i]);
|
|
80
|
+
+ int cmp = ca - cb;
|
|
81
|
+
+ if(cmp != 0) return cmp;
|
|
82
|
+
+ }
|
|
83
|
+
+ return 0;
|
|
84
|
+
+}
|
|
85
|
+
+
|
|
68
86
|
+
|
|
69
87
|
+static inline int TessAtom_resSeq(const TessAtom *A)
|
|
70
88
|
+{
|
|
@@ -109,8 +127,7 @@ index 6480d8b..648f55f 100644
|
|
|
109
127
|
+ return A->code;
|
|
110
128
|
+}
|
|
111
129
|
+
|
|
112
|
-
+
|
|
113
|
-
+extern double TessAtom_distance(const TessAtom*, const TessAtom*);
|
|
130
|
+
+
|
|
114
131
|
+
|
|
115
132
|
// ==================================================================
|
|
116
133
|
|