Chemistry & Materials

River Chemical Prediction

Bond-electron matrix reaction prediction system with guaranteed conservation of mass, electrons, and atoms through flow matching transformers

Chemically-Valid Reaction Prediction

River predicts chemical reactions by modeling electron redistribution between atoms using bond-electron matrix representation. Unlike traditional sequence-to-sequence models, River guarantees conservation laws and predicts complete mechanistic pathways.

The system enables efficient fine-tuning for new reaction types and samples multiple pathways to explore alternative reaction routes with full transparency.

Technology Stack

Architecture Graph Transformer
Parameters ~7M (Efficient)
Framework PyTorch 2.0+
Chemistry RDKit Integration

Core Capabilities

Conservation Laws

100% guaranteed conservation of mass, electrons, and atoms by design. No hallucinated atoms or molecules.

Flow Matching Engine

Continuous generative process modeling electron flow with zero-sum constraint for conservation.

BE Matrix Representation

Symmetric matrix encoding electron distribution with diagonal lone pairs and off-diagonal bonds.

Multiple Pathways

Sample and explore alternative reaction routes with configurable temperature and sampling.

Fine-tuning Ready

Adapt to new reaction types with minimal data. Efficient 7M parameter model enables quick training.

Web Interface

Flask-based API and interactive web interface for reaction prediction and pathway analysis.

Technical Specifications

Framework
PyTorch 2.0+
Chemistry Library
RDKit 2023+
Model Architecture
Graph Transformer
Parameters
~7M (Efficient)
Prediction Speed
10-50ms (GPU)
Conservation
100% Guaranteed
Dataset Compatible
USPTO-Full (1.4M+)
Web API
Flask RESTful

Getting Started

Quick setup guide for River Chemical Prediction

1

Install Dependencies

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
2

Initialize Predictor

from river.prediction import ReactionPredictor
predictor = ReactionPredictor()
3

Predict Reactions

reactants = "CCO.CC(=O)O"
products = predictor.predict(reactants)
print(products['smiles'])
4

Start Web Interface

python web/app.py
# Access http://localhost:5000

Ready to Predict Chemical Reactions?

Leverage bond-electron matrix flow matching for chemically-valid predictions