MHCXGraph.utils.tools.triad_chirality_with_cb

MHCXGraph.utils.tools.triad_chirality_with_cb(ca_a: ndarray, ca_b: ndarray, ca_c: ndarray, cb_a: ndarray, cb_b: ndarray, cb_c: ndarray, *, weights: tuple[float, float, float] | None = None, outward_normal: ndarray | None = None, majority_only: bool = True) dict[str, Any][source]

Compute the chirality of a residue triad using Cα and Cβ atoms.

The method estimates a pose-invariant but mirror-sensitive chirality signature based on side-chain orientation relative to the triangle defined by three Cα atoms.

Parameters:
  • ca_a (ndarray of shape (3,)) – Cartesian coordinates of Cα atoms.

  • ca_b (ndarray of shape (3,)) – Cartesian coordinates of Cα atoms.

  • ca_c (ndarray of shape (3,)) – Cartesian coordinates of Cα atoms.

  • cb_a (ndarray of shape (3,)) – Cartesian coordinates of Cβ atoms.

  • cb_b (ndarray of shape (3,)) – Cartesian coordinates of Cβ atoms.

  • cb_c (ndarray of shape (3,)) – Cartesian coordinates of Cβ atoms.

  • weights (tuple[float, float, float], optional) – Optional per-residue weights applied when averaging side-chain direction vectors.

  • outward_normal (ndarray of shape (3,), optional) – Reference outward direction used to orient side-chain vectors.

  • majority_only (bool, default=True) – If True, only side chains consistent with the majority orientation relative to the triangle normal contribute to the final direction.

Returns:

result – Dictionary containing chirality information, including handedness bit, score, side-chain consistency, and intermediate geometric vectors.

Return type:

dict