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
//! The one definition of which alternate-conformation labels coexist.
//!
//! Anything that pairs atoms (clash detection, contact search, geometry
//! checks, bonding) must agree on this rule, or atoms from different
//! conformers get paired as if they were present together.
use crateAltId;
/// Whether two atoms with these alternate labels can be present together.
///
/// A blank label marks an atom present in every conformation, so it is
/// compatible with any label, blank or not. Two non-blank labels are
/// compatible only when they are the same label; different non-blank labels
/// are different conformers of the same site and never coexist.
///
/// An atom without any recorded label should be passed as [`AltId::BLANK`].
///
/// Runs in `O(1)` time and allocates no memory.
/// The index pairs `(i, j)` with `i < j` whose labels are compatible.
///
/// Pairs come out in ascending `(i, j)` order, so results are deterministic.
/// Runs in `O(n²)` time over the labels and allocates nothing; use it to
/// filter candidate pairs when `n` is small (one residue, one contact cell),
/// and [`altloc_compatible`] directly when pairs come from a spatial search.
+ '_