pyjess 0.7.0a1__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.7.0a1 → pyjess-0.7.0a2}/CHANGELOG.md +13 -1
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/PKG-INFO +3 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/README.md +2 -1
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/jess.pxd +2 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/scanner.pxd +2 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/template.pxd +6 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Jess.c.patch +3 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Jess.h.patch +5 -3
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Main.c.patch +39 -12
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/ResIndex.c.patch +7 -11
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Scanner.c.patch +5 -3
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Scanner.h.patch +3 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Template.h.patch +15 -5
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/TessAtom.c.patch +40 -12
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/TessAtom.h.patch +23 -6
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/TessTemplate.c.patch +34 -9
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/TessTemplate.h.patch +2 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/pyproject.toml +1 -1
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/_jess.pyi +2 -2
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/_jess.pyx +88 -29
- 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.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/test_jess.py +62 -1
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/.github/workflows/package.yml +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/.github/workflows/requirements.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/.github/workflows/test.yml +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/.gitignore +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/.gitmodules +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/.readthedocs.yaml +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/CMakeLists.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/CONTRIBUTING.md +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/COPYING +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/.gitignore +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/Makefile +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/_static/css/main.css +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/_static/js/custom-icon.js +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/_static/json/switcher.json +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/api/index.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/api/jess.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/api/molecule.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/api/template.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/conf.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/guide/changes.md +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/guide/contributing.md +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/guide/copyright.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/guide/index.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/guide/install.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/guide/optimizations.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/index.rst +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/make.bat +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/docs/requirements.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/__init__.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/annulus.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/atom.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/candidate_set.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/join.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/kdtree.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/molecule.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/region.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/res_index.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/super.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/tess_atom.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/include/jess/tess_template.pxd +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Annulus.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Annulus.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Atom.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Box.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Box.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/CMakeLists.txt.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/CandidateSet.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/CandidateSet.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Join.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Join.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/KdTree.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/KdTree.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Molecule.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Molecule.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/ResIndex.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/Super.c.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/patches/qselect.h.patch +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/pkg/aur/PKGBUILD.in +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/CMakeLists.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/jess/CMakeLists.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/.gitignore +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/CMakeLists.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/__init__.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/py.typed +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/__init__.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/1.3.3.tpl +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/1AMY+1.3.3.txt +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/1AMY.pdb +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/1sur.qry +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/__init__.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/pdb1lnb.pdb +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/template_01.qry +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/data/template_02.qry +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/test_atom.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/test_hit.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/test_molecule.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/test_template.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/test_template_atom.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/pyjess/tests/utils.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/scripts/apply_patch.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/scripts/cmake/CythonExtension.cmake +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/scripts/cmake/pystate_patch.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/src/scripts/generate_patches.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/.gitignore +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/README.md +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/examples/template_01.qry +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/examples/template_02.qry +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/examples/test_pdbs/pdb1lnb.ent +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/filter_output.py +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Annulus.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Annulus.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Atom.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Atom.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Jess.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Jess.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Join.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Join.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/KdTree.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/KdTree.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Main.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Molecule.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Molecule.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Region.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Region.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Scanner.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Scanner.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Super.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Super.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/Template.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/TessAtom.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/TessAtom.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/TessTemplate.c +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/TessTemplate.h +0 -0
- {pyjess-0.7.0a1 → pyjess-0.7.0a2}/vendor/jess/src/jess +0 -0
|
@@ -6,7 +6,18 @@ 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.7.0-alpha.
|
|
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.
|
|
10
21
|
|
|
11
22
|
|
|
12
23
|
## [v0.7.0-alpha.1] - 2025-09-02
|
|
@@ -14,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
14
25
|
|
|
15
26
|
### Fixed
|
|
16
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.
|
|
17
29
|
|
|
18
30
|
### Changed
|
|
19
31
|
- **breaking**: Set the `max_candidates` default value to `None` in `Jess.query`, disabling max candidates filtering by default.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: pyjess
|
|
3
|
-
Version: 0.7.
|
|
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,7 @@ 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
25
|
int JessQuery_nextTemplate(JessQuery*)
|
|
26
26
|
Template* JessQuery_template(JessQuery*)
|
|
27
27
|
const Molecule* JessQuery_molecule(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 @@
|
|
@@ -162,7 +162,8 @@ index e81bda0..44fa672 100644
|
|
|
162
162
|
+ return (Q->node) ? 1 : 0;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
-int JessQuery_next(JessQuery *Q, int ignore_chain)
|
|
166
|
+
+int JessQuery_next(JessQuery *Q, IgnoreType ignore_chain)
|
|
166
167
|
{
|
|
167
168
|
Template *T;
|
|
168
169
|
Atom **A;
|
|
@@ -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,16 @@ index c90abe6..704b5e8 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);
|
|
38
40
|
+extern int JessQuery_nextTemplate(JessQuery*);
|
|
39
41
|
+extern Template *JessQuery_template(const JessQuery*);
|
|
40
42
|
+extern const Molecule *JessQuery_molecule(const JessQuery*);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/Main.c b/src/Main.c
|
|
2
|
-
index dff22b9..
|
|
2
|
+
index dff22b9..5baeb17 100644
|
|
3
3
|
--- a/src/Main.c
|
|
4
4
|
+++ b/src/Main.c
|
|
5
5
|
@@ -14,6 +14,7 @@
|
|
@@ -10,12 +10,21 @@ index dff22b9..476cb01 100644
|
|
|
10
10
|
|
|
11
11
|
// ==================================================================
|
|
12
12
|
// Global constants
|
|
13
|
-
@@ -
|
|
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(
|
|
14
23
|
A->charge
|
|
15
24
|
);
|
|
16
25
|
}
|
|
17
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)
|
|
18
|
-
+static void search(const char *filename,Jess *J,double tRmsd,double tDistance,double max_total_threshold,int no_transform,
|
|
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)
|
|
19
28
|
{
|
|
20
29
|
Molecule *M;
|
|
21
30
|
Superposition *sup;
|
|
@@ -24,7 +33,16 @@ index dff22b9..476cb01 100644
|
|
|
24
33
|
Atom **A;
|
|
25
34
|
FILE *file;
|
|
26
35
|
JessQuery *Q;
|
|
27
|
-
@@ -
|
|
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
|
|
28
46
|
return;
|
|
29
47
|
}
|
|
30
48
|
|
|
@@ -39,8 +57,8 @@ index dff22b9..476cb01 100644
|
|
|
39
57
|
T=JessQuery_template(Q);
|
|
40
58
|
+ // printf("current template: %s\n", T->name(T));
|
|
41
59
|
+
|
|
42
|
-
+
|
|
43
|
-
+ if(
|
|
60
|
+
+ candidates = (T!=Tprev) ? 0 : candidates + 1;
|
|
61
|
+
+ if(candidates == MAX_CANDIDATES)
|
|
44
62
|
+ {
|
|
45
63
|
+ JessQuery_nextTemplate(Q);
|
|
46
64
|
+ continue;
|
|
@@ -48,7 +66,7 @@ index dff22b9..476cb01 100644
|
|
|
48
66
|
|
|
49
67
|
count=T->count(T);
|
|
50
68
|
sup = JessQuery_superposition(Q);
|
|
51
|
-
@@ -193,7 +
|
|
69
|
+
@@ -193,7 +206,8 @@ static void search(const char *filename,Jess *J,double tRmsd,double tDistance,do
|
|
52
70
|
|
|
53
71
|
printf("ENDMDL\n\n");
|
|
54
72
|
}
|
|
@@ -58,23 +76,32 @@ index dff22b9..476cb01 100644
|
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
JessQuery_free(Q);
|
|
61
|
-
@@ -
|
|
62
|
-
int
|
|
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;
|
|
63
85
|
int write_filename=0;
|
|
64
86
|
int ignore_endmdl=0;
|
|
65
87
|
+ int fastScan=0;
|
|
66
88
|
|
|
67
89
|
if(argc<7 || argc>8) help();
|
|
68
90
|
|
|
69
|
-
@@ -
|
|
70
|
-
|
|
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;
|
|
71
98
|
else if(*s=='q') write_filename=1;
|
|
72
99
|
else if(*s=='e') ignore_endmdl=1;
|
|
73
100
|
+ else if(*s=='s') fastScan=1;
|
|
74
101
|
else help();
|
|
75
102
|
}
|
|
76
103
|
}
|
|
77
|
-
@@ -388,10 +
|
|
104
|
+
@@ -388,10 +405,11 @@ int main(int argc, char **argv)
|
|
78
105
|
if(strlen(s)==0) continue;
|
|
79
106
|
|
|
80
107
|
if(feedbackQ) fprintf(stderr,"%s\n",s);
|
|
@@ -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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/TessTemplate.c b/src/TessTemplate.c
|
|
2
|
-
index 1eb6914..
|
|
2
|
+
index 1eb6914..eb635cf 100644
|
|
3
3
|
--- a/src/TessTemplate.c
|
|
4
4
|
+++ b/src/TessTemplate.c
|
|
5
5
|
@@ -5,13 +5,21 @@
|
|
@@ -99,11 +99,11 @@ index 1eb6914..27539c8 100644
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
-static int TessTemplate_check(const Template *T, Atom **A, int k, int ignore_chain)
|
|
102
|
-
+int TessTemplate_check(const Template *T, Atom **A, int *order, int k,
|
|
102
|
+
+int TessTemplate_check(const Template *T, Atom **A, int *order, int k, IgnoreType ignore_chain)
|
|
103
103
|
{
|
|
104
104
|
const TessTemplate *J = (const TessTemplate*)&T[1];
|
|
105
105
|
int i;
|
|
106
|
-
@@ -98,
|
|
106
|
+
@@ -98,44 +86,45 @@ static int TessTemplate_check(const Template *T, Atom **A, int k, int ignore_cha
|
|
107
107
|
// Compare chain ids
|
|
108
108
|
|
|
109
109
|
//Riziotis edit
|
|
@@ -114,7 +114,26 @@ index 1eb6914..27539c8 100644
|
|
|
114
114
|
//c = A[i]->chainID-A[k-1]->chainID;
|
|
115
115
|
//d = TessAtom_chainID(J->atom[i])-TessAtom_chainID(J->atom[k-1]);
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
- if(ignore_chain==1)
|
|
118
|
+
- {
|
|
119
|
+
- c=0;
|
|
120
|
+
- d=0;
|
|
121
|
+
- }
|
|
122
|
+
-
|
|
123
|
+
- if(c==0 && d!=0) return 0;
|
|
124
|
+
- if(c!=0 && d==0) return 0;
|
|
125
|
+
-
|
|
126
|
+
- if(c!=0)
|
|
127
|
+
+ if(ignore_chain==ignoreNone)
|
|
128
|
+
{
|
|
129
|
+
- continue;
|
|
130
|
+
+ if(c==0 && d!=0) return 0;
|
|
131
|
+
+ if(c!=0 && d==0) return 0;
|
|
132
|
+
+ if(c!=0)
|
|
133
|
+
+ {
|
|
134
|
+
+ continue;
|
|
135
|
+
+ }
|
|
136
|
+
}
|
|
118
137
|
|
|
119
138
|
// Compare residue sequence numbers
|
|
120
139
|
|
|
@@ -125,7 +144,13 @@ index 1eb6914..27539c8 100644
|
|
|
125
144
|
|
|
126
145
|
if(a==0 && b!=0) return 0;
|
|
127
146
|
if(a!=0 && b==0) return 0;
|
|
128
|
-
|
|
147
|
+
+
|
|
148
|
+
+ if(ignore_chain!=ignoreAtoms)
|
|
149
|
+
+ {
|
|
150
|
+
+ if(a==0 && c!=0) return 0;
|
|
151
|
+
+ }
|
|
152
|
+
}
|
|
153
|
+
|
|
129
154
|
return 1;
|
|
130
155
|
}
|
|
131
156
|
|
|
@@ -141,7 +166,7 @@ index 1eb6914..27539c8 100644
|
|
|
141
166
|
{
|
|
142
167
|
const TessTemplate *J = (const TessTemplate*)&T[1];
|
|
143
168
|
const double logA = -8.5;
|
|
144
|
-
@@ -149,11 +
|
|
169
|
+
@@ -149,11 +138,73 @@ static double TessTemplate_logE(const Template *T,double rmsd, int n)
|
|
145
170
|
return logA + alpha*rmsd + beta*(double)J->dim + log((double)n);
|
|
146
171
|
}
|
|
147
172
|
|
|
@@ -216,7 +241,7 @@ index 1eb6914..27539c8 100644
|
|
|
216
241
|
{
|
|
217
242
|
TessTemplate *J;
|
|
218
243
|
int i;
|
|
219
|
-
@@ -224,7 +
|
|
244
|
+
@@ -224,7 +275,7 @@ Template *TessTemplate_create(FILE *file,const char *sym)
|
|
220
245
|
// No errors thus far - add the atom template
|
|
221
246
|
// to the list we're creating...
|
|
222
247
|
|
|
@@ -225,7 +250,7 @@ index 1eb6914..27539c8 100644
|
|
|
225
250
|
n->succ=head;
|
|
226
251
|
head=n;
|
|
227
252
|
n->atom=A;
|
|
228
|
-
@@ -269,6 +
|
|
253
|
+
@@ -269,6 +320,7 @@ Template *TessTemplate_create(FILE *file,const char *sym)
|
|
229
254
|
T->name=TessTemplate_name;
|
|
230
255
|
T->logE=TessTemplate_logE;
|
|
231
256
|
T->distWeight=TessTemplate_distWeight;
|
|
@@ -233,7 +258,7 @@ index 1eb6914..27539c8 100644
|
|
|
233
258
|
|
|
234
259
|
// Set up the data fields
|
|
235
260
|
|
|
236
|
-
@@ -333,4 +
|
|
261
|
+
@@ -333,4 +385,78 @@ Template *TessTemplate_create(FILE *file,const char *sym)
|
|
237
262
|
return T;
|
|
238
263
|
}
|
|
239
264
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/src/TessTemplate.h b/src/TessTemplate.h
|
|
2
|
-
index 1e597f2..
|
|
2
|
+
index 1e597f2..eb7c2ec 100644
|
|
3
3
|
--- a/src/TessTemplate.h
|
|
4
4
|
+++ b/src/TessTemplate.h
|
|
5
5
|
@@ -9,8 +9,57 @@
|
|
@@ -46,7 +46,7 @@ index 1e597f2..8dd8f06 100644
|
|
|
46
46
|
+extern int TessTemplate_range(const Template *T,int i,int j,double *a,double *b);
|
|
47
47
|
+extern const double *TessTemplate_position(const Template *T, int k);
|
|
48
48
|
+extern double TessTemplate_distWeight(const Template *T, int k);
|
|
49
|
-
+extern int TessTemplate_check(const Template *T, Atom **A, int *order, int k,
|
|
49
|
+
+extern int TessTemplate_check(const Template *T, Atom **A, int *order, int k, IgnoreType ignore_chain);
|
|
50
50
|
+extern void TessTemplate_candidates(const Template *T, const Molecule *M, int k, CandidateSet** S);
|
|
51
51
|
+extern const char *TessTemplate_name(const Template *T);
|
|
52
52
|
+extern double TessTemplate_logE(const Template *T,double rmsd, int n);
|