1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Geometric hydrogen-bond criterion.
//!
//! Ported from the reference implementation `CHBond` (`src/hbond.cpp`, the `m_frAD` / `m_frAH` /
//! `m_fwinkel` gate around lines 914–961): a D–H···A bond requires the
//! acceptor–donor distance `rAD` below a cutoff, the acceptor–hydrogen distance
//! `rAH` below a cutoff, and an angle test on `cos(winkel)` where `winkel` is the
//! angle **at the donor** between the D→A and D→H vectors (reference implementation default
//! ≤ 30° from collinear).
//!
//! **Documented deviation (per the spec's acceptance contract):** molrs gates on
//! the Luzar–Chandler **D–H···A angle at the hydrogen** (Luzar & Chandler,
//! *Nature* **1996**, 379, 55), with the common defaults r(D···A) ≤ 3.5 Å and
//! ∠(D–H···A) ≥ 150° (i.e. ≤ 30° from the linear 180°). Both conventions encode
//! the same near-linear-bond intent; molrs uses the angle-at-H form because that
//! is the quantity the spec and the downstream lifetime TCFs reference.
use F;
/// Which interatomic distance the cutoff applies to when pairing candidates.
/// Frozen geometric parameters for hydrogen-bond detection.
///
/// `Default` is the Luzar–Chandler water convention: r(D···A) ≤ 3.5 Å,
/// ∠(D–H···A) ≥ 150°.