Conformal geometric algebra
Module: sci_form::cga (core since 2026-10-14; alpha::cga re-export) Feature flag: none (core); alpha-cga kept as no-op alias
Validation and limits
| Question | Answer |
|---|---|
| Compared with | Rodrigues closed form + clifford Cl(4,1) |
| Measured separation | motors 3.4e-15; dihedral rotation 6.6e-15 (16 rigid motions) |
| Confidence region | small rigid motions, seed 42 |
| Main limitation | refine_torsion_cga vs the matrix method and MOF assembly are not covered |
The raw rows and the exact tolerances are in the full validation matrix.
Overview
Replaces the internal geometry engine (separate quaternions + vectors) with Conformal Geometric Algebra
Theory
G(4,1) Multivector
The conformal model embeds 3D Euclidean space into a 5D space with signature
A general multivector has
Motors
A Motor is the composition of a rotor (rotation) and translator:
- Rotor:
- Translator:
- Motor:
Objects transform via the sandwich product
Point Embedding
3D coordinates lift to conformal points:
Coordinates are recovered from the transformed multivector by extracting the Euclidean components and normalizing.
API
use sci_form::cga::*;
// Motor from axis-angle
let motor = Motor::rotor([0.0, 0.0, 1.0], std::f64::consts::FRAC_PI_2);
// Transform a point
let rotated = motor.transform_point([1.0, 0.0, 0.0]); // ≈ [0, 1, 0]
// Dihedral rotation about the a→b bond axis
let dm = dihedral_motor([0.0, 0.0, 0.0], [1.0, 0.0, 0.0], 1.047);Applications
- Conformer generation: Dihedral torsion scans using CGA motors instead of rotation matrices
- MOF assembly: Unit cell lattice vectors as translation motors, SBU placement via motor composition
- Supercell construction: Motor exponentiation
Validation (F81, 2026-10-14)
External gate tests/alpha_cga_validation.rs (no feature needed) vs scripts/validation/oracle_cga.py (Rodrigues closed form + clifford Cl(4,1) sandwich, seed 42): motors 3.4e-15 on 16 rigid motions (validates the bitmask blade encoding, incl. the e31 sign), dihedral rotation 6.6e-15, subtree isolation bit-exact, dihedral angle exact up to the documented mirror convention (ours ≡ −numpy mod 2π). Gaps: refine_torsion_cga vs matrix method and materials assembly vs real MOF structures unmet.
Tests
cargo test --features "beta-cpm alpha-cga" --test experimental_gates -- test_cga20 integration tests (tests/experimental/test_cga.rs) covering: multivector algebra, motor construction, point embedding round-trips, dihedral rotations, and materials assembly comparison.
These tests live in the experimental_gates target — see Overview for the full command matrix.