coralForge — Sovereign Structure Prediction Engine

Pure Rust f64 AlphaFold2/3 primitives validated against NumPy — the substrate for helixVision's sovereign protein structure prediction.

Architecture-ready Individual AlphaFold primitives are implemented and validated (154 checks, 1e-10 tolerance vs NumPy). The end-to-end structure prediction pipeline is designed but not yet wired — see helixVision for the full pipeline status.


What It Is

coralForge is the structure prediction engine substrate — pure Rust f64 implementations of the mathematical primitives that AlphaFold2 and AlphaFold3 use for protein structure prediction. It is the computational core that helixVision builds upon.

Repository: syntheticChemistry/coralForge (archived — moving to sporeGarden/helixVision) License: scyBorg (AGPL-3.0-or-later + ORC + CC-BY-SA 4.0)


The Isomorphism Theorem

Every “novel” operation in AlphaFold decomposes to six fundamental primitives:

PrimitiveWhat It Computes
GEMMGeneral matrix multiply — the foundation
AttentionScaled dot-product attention (self, cross, triangular)
NormalizationLayerNorm, BatchNorm — signal scaling
NonlinearityGELU, SiLU, ReLU — activation functions
ReductionSum, mean, max across dimensions
GatingSigmoid-modulated signal control

AlphaFold’s Evoformer, IPA (Invariant Point Attention), diffusion module, pairformer, and confidence heads all decompose to compositions of these six primitives. No new mathematical primitive is required.

This is the isomorphism proof: structure prediction is not a new kind of computation. It is a new composition of existing computations. The same barraCuda WGSL shaders that compute molecular dynamics forces also compute attention scores for protein structure prediction.


Dual Pipeline Architecture

AlphaFold2 Path

MSA (Multiple Sequence Alignment)
    -> Evoformer (48 blocks of row/column attention + triangle updates)
    -> Structure Module (IPA iterations -> 3D coordinates)
    -> Confidence (pLDDT, PAE, pTM)

AlphaFold3 Path

Input Embedder (no MSA required for small molecules)
    -> Pairformer (pair representation attention)
    -> Diffusion Module (iterative coordinate refinement)
    -> Confidence (pLDDT, pDE, pAE)

Both paths share the six primitives. Both run in pure Rust f64. Both produce bit-reproducible results across architectures.


Validation

154 checks across three tiers:

TierLanguageChecksWhat It Validates
Python referencePython/NumPy62Correct mathematics (ground truth)
Rust parityRust f6455Rust matches Python to 1e-10
GPU accelerationWGSL/ barraCuda37GPU matches CPU Rust

Cross-tier validation: every Rust result is compared to the Python reference. Every GPU result is compared to the CPU Rust result. The chain is: NumPy -> Rust -> WGSL -> silicon.


LTEE Application

The most compelling application of coralForge is not protein engineering — it is evolutionary biology:

  1. Take frozen stocks from Lenski’s Long-Term Evolution Experiment (LTEE)
  2. Sequence the ancestral and evolved strains ( wetSpring pipeline)
  3. Predict protein structures for ancestral and evolved variants (coralForge)
  4. Compare structural changes to fitness trajectories ( hotSpring)
  5. Identify which structural innovations correspond to adaptive events

This connects computational constrained evolution (the thesis) to biological constrained evolution (the LTEE) — both producing innovation under pressure.


What Makes It Sovereign

PropertycoralForgeAlphaFold (Google)
CodeAGPL-3.0, all RustApache 2.0, Python/JAX
Precisionf64 (double)Mixed precision (float16/32)
DependenciesZero C/C++JAX, CUDA, Python stack
GPUAny Vulkan (NVIDIA, AMD, Intel)NVIDIA only (CUDA)
DataSovereign ( NestGate, no cloud)Cloud inference
ProvenanceguideStone verifiedNone

coralForge is not an AlphaFold clone. It is a proof that structure prediction decomposes to six primitives — and those primitives can run on sovereign hardware, in pure Rust, with full precision, producing science that belongs to the scientist who asked the question.