Skip to content

Navigation Menu

Sign in
Sign up

CaviTracer more robust automatization and removal of similar channel alternatives - #2274

Open
briza81 wants to merge 20 commits into
prody:main from
briza81:CaviTracer-more-robust-automatization
Open

CaviTracer more robust automatization and removal of similar channel alternatives #2274
briza81 wants to merge 20 commits into
prody:main from
briza81:CaviTracer-more-robust-automatization

Conversation

@briza81

@briza81 briza81 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Making the calculations and its default robust wrt to different structures, limiting the need for specific parameter adjustments. Also, similar tunnel variants are better pruned.

Measured over the 21-structure testing corpus (MOLE2 + CAVER reference sets, a porin and two protonated dehalogenases), each version with its own defaults:

main (32bd69e) this branch
channels reported, whole corpus 278 147
widest bottleneck - equal or wider in 19 of 21 cases (2fgq 0.83 -> 2.20 Å, 2bg9 1.98 -> 7.64 Å); 1grm 1.43 -> 1.34 and 2ace 2.00 -> 1.99 are the exceptions
corpus wall time 206.5 s 148.5 s (1.39x; 1m56 alone 62.4 -> 16.9 s)

Eighteen of the 21 cases report fewer channels while the widest bottleneck holds or improves. Two separate things cause that, and the companion document separates them by running main's own algorithm a third time at the branch's inner_radius and surf_radius: 278 -> 212 -> 147, so the recalibrated defaults account for -66 and the deduplication for -65. The two cases that report more are the wide-pore ones, from surf_radius.

Major changes

  • One channel per way out. A surface opening is now a mouth's inscribed ball instead of the tetrahedron at its centre - mouths are one tetrahedron thick, so a route could walk around one and surface again a few Angstrom away, and
    the two were then compared as distinct exits. A search stops at the first opening it enters, the two mouths of a pair are compared symmetrically, and duplicates are merged on how far they diverge in Angstrom (scaled by the local clearance = surface distance) . When two routes merge, the better ending is reported - a wider mouth or a wider bottleneck, with neither bought by narrowing the other.
  • Seeding from a user start point. The seed's depth floor was the anchor's own depth, but a start_point is usually placed on a ligand or a catalytic residue, deeper than the widest part of its pocket - so nothing was eligible, the seed stayed on the narrow cell nearest the point, and every channel of that site was silently capped at its radius (3eyx reported 1.30 Å twice; the routes are 1.78 and 1.65 Å). Every automatic seed is now printed as a pasteable start_point.
  • Centerline in Angstrom. The spline was parameterized by tetrahedron index, and tetrahedra are not evenly spaced, so it spent equal parameter on unequal distances. The two curves never part by more than 0.36 Å anywhere in the corpus - the route is the same - but the old one reverses direction between consecutive samples, up to 178°, and that zig-zag inflated every reported length by 1.8-9.9 % per case (17.8 % on one channel). It is now centripetal in distance, with a PCHIP radius profile.
  • Protonation-aware input check. The old test asked only whether any hydrogen was present, so a structure with polar hydrogens only passed as protonated and could be probed below water size. Hydrogens per heavy atom are now scored per chain type (protein ~1.0, nucleic acid ~0.55); a mixed structure counts as protonated only when every chain type in it is, and the message names whichever is short. Nucleic acid is named in the composition report.

Altered defaults

main this branch
surf_radius 3 15
inner_radius 0.9 1.2 - the smallest probe giving similar channels with and without explicit hydrogens
sparsity 1 6, now in Angstrom: the smallest centre-to-centre distance at which two openings count as separate
similarity, route_tolerance 0.8, 1.0 replaced by route_divergence=0.2

briza81 added 20 commits August 28, 2026 13:07
min_depth is an absolute length, while being past an opening is set by the opening's own radius. The two part company once a wide opening is retained, which is what a large surf_radius does - and that is what a pore-containing structure needs. A seed left inside such a mouth costs the whole site: every route out of it leaves by that one opening, the dedup cuts them all against it, and the chamber reports a single stub, and no pore at all since pores are built from channels sharing a seed. The floor is now max(min_depth, widest opening of the cavity), by the same clearance the dedup calls an opening radius, falling back to min_depth where a chamber holds nothing that deep. Ordinary mouths are narrower than min_depth, so the reported channels are unchanged wherever no opening was wide enough to swallow the seed.
surf_radius says what counts as the outside, and the local peel that follows
decides where the erosion stops, so above about 3.5 A the reported channels stop
moving - identical channel for channel from 3.5 to 20 across the test set, at no
extra cost. The old default of 3 sat just below that plateau. What the value has
to be large enough for is a wide pore: a probe smaller than the pore passes
through it, so the lumen is taken for outside and carved away and only the
pockets around it are reported, with nothing to show that anything went wrong.
1.2 A is the smallest probe that gives similar channels with and without
explicit hydrogens, so the default no longer sits in the range it warns about.
...ening test asked whether one exit fell inside the other's mouth sphere, which reported one tunnel as several: sibling exits sit about a mouth radius apart, so nearly coincident openings were called distinct and the corridor test never ran. Now we compare the two mouths symmetrically instead. Sparsity now reads as the smallest centre-to-centre distance at which two openings count as separate with default 6 A.
...orm a layer one tetrahedron thick, so dropping their outgoing edges did not fully stop a route walking around a mouth through the shell behind it and surfacing elsewhere ->duplicates. An opening is now a mouth's inscribed ball rather than the tetrahedron at its centre: the search stops at the first one a route enters, routes are deduplicated there on their interior corridors, and the survivors leave by the cheapest mouth of that same opening. Their exits are compared once more, so sparsity and similarity apply as before. The reported route is the seed's own path to that mouth, not two searches spliced at the arrival.
The centerline spline gave every tetrahedron one unit of parameter however far
apart consecutive circumcenters sat, so the cubic overshot the long steps and swung back. The parameter now advances by the square root of the step, which measured closest to the polyline through the same points and wandered least off it; plain chord length was worse than the index at abrupt turns. Coincident circumcenters collapse to one knot, at the separation the twin-tetrahedron test already uses. The radius profile is now shape-preserving, so the written spheres can no longer be narrower than the bottleneck reported beside them, nor wider than the widest gate.
...d of strictly cheapest variant, we now selecte whichever offers the better ending: a wider mouth or a wider bottleneck, with neither bought by narrowing the other, no more
locally buried, not merely a continuation past the mouth already reached, and no more than 30% expensive on the tail past the fork where the two channel variants deviate.
...nelCalculator.findBiggestTetrahedron, which nothing has called since seeding moved to selectSeedTetrahedron/findDeepestTetrahedra.
...to calcChannelSurfaceOverlaps - both were accepted and documented but never passed on, so the occupancy map was always built at the default 0.5 A on the default 2 processes, unlike the sibling scanSurfaceCavityParameters which forwards both.
...floor was the anchor's own depth, so a point placed on a ligand or catalytic residue - deeper than the widest part of its pocket - left nothing eligible and the seed stayed on the narrow cell nearest the point, silently capping every channel of the site at that radius. The floor is now min_depth raised to the cavity's widest mouth, as the chamber pass already did for automatic seeds. start_point_search is a requirement rather than a search budget: the anchor search was an unbounded argmin, so a point that missed the void was answered with channels through whatever cavity lay nearest. Where no cavity has a tetrahedron within it, no channels are computed and a warning gives the nearest one's distance and coordinates. 0 still seeds the nearest tetrahedron as-is.
...said which void a search started from but never where, so an automatically placed seed could not be reproduced or adjusted. Each row now carries the seed's Voronoi vertex, formatted to be pasted straight back as start_point, between the site tag and the void it names so the link notes still end the row.
...hecks asked only whether any H was present, so a structure carrying its polar hydrogens and nothing else passed as protonated and could be probed below water size. Newly this test is moved to _reportAtomsInputComposition, which already reports what the input is made of, and score each kind of chain against the hydrogens per heavy atom it should carry: near 1.0 for protein, near 0.55 for nucleic acid. A mixed structure counts as protonated only when every kind of chain in it is, and the message names whichever is short. Below 70% of the expected count a probe under 1.2 A is warned about; the reverse mismatch is noted as well suggesting smaller prove fore likely fully protonated structures. Additionally, nucleic acid is also named in the composition report rather than counted among the components to warn about: so when analyzing protin-nucleic acid complex we no longer advise the user to select the protein alone.
...much they overlap, this reduces similarity/route_tolerance args with a single route_divergence
...d calcPoresFromChannels now leave a vis_channels.py next to the files they write, when the run was told a directory, and never overwriting one that is already there:
pymol vis_channels.py -- <protein>.pdb "chl*.pqr"

briza81 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@karolamik13 pls heave a look, attaching also a bit more detailed descriptions
details.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /