Skip to main content

Module align

Module align 

Source
Expand description

Rigid 2D alignment (Kabsch) — Indigo / no-RDKit fallback.

Template depiction (fix matched atoms and redraw the rest) stays at the language edge via RDKit. This module only rotates/translates point sets so a caller-supplied correspondence lands on a template frame.

Keep in sync with python/xpict/align.py (_kabsch_2d, _apply_transform).

Structs§

RigidTransform
Rigid transform: x' = cos·x ∓ sin·y + tx, y' = sin·x ± cos·y + ty (sign of the sin terms flips when RigidTransform::det is negative).

Functions§

kabsch_2d
Kabsch / Procrustes 2D: map src → dst (paired points).
rigid_align_coords
Align other atom coords onto a template using mapping (other→template).