picogl.examples.utils.bond_detection

Lightweight covalent bond heuristics for PDB examples (no ElMo / Qt deps).

Attributes

BOND_LENGTHS_SIMPLE

BIO_ELEMENTS

METALS

HALOGENS

Functions

_normalize_elements(atom1, atom2) → tuple[str, str] | None

_within_tolerance(distance, expected[, tol]) → bool

atoms_should_bond(atom1, atom2, distance) → bool

Return True when distance is consistent with a covalent bond between atom1 and atom2.

Module Contents

picogl.examples.utils.bond_detection.BOND_LENGTHS_SIMPLE: dict[tuple[str, str], float][source]
picogl.examples.utils.bond_detection.BIO_ELEMENTS[source]
picogl.examples.utils.bond_detection.METALS[source]
picogl.examples.utils.bond_detection.HALOGENS[source]
picogl.examples.utils.bond_detection._normalize_elements(atom1: Any, atom2: Any) → tuple[str, str] | None[source]
picogl.examples.utils.bond_detection._within_tolerance(distance: float, expected: float, tol: float = 0.25) → bool[source]
picogl.examples.utils.bond_detection.atoms_should_bond(atom1: Any, atom2: Any, distance: float) → bool[source]

Return True when distance is consistent with a covalent bond between atom1 and atom2.