Cornell Potential Simulation
A Rust simulation that learns the Cornell potential and visualizes Deep Inelastic Scattering electron trajectories.
- Role
- Rust Developer
- Year
- 2026
- Status
- Completed
- Field
- Rust / machine learning / physics

System brief.
The project combines a four-layer neural network approximation of the Cornell potential with an interactive three-panel view of training loss, theoretical comparison and simulated electron scattering.
- Cornell potential approximation with a neural network
- Deep Inelastic Scattering trajectory simulation
- Interactive training, potential and scattering views
- Timestamped JSON session save and load
Stack.
- 01Rust
- 02Candle
- 03egui / eframe
- 04Plotters
- 05Serde
Learning a documented potential
The documented network maps three inputs through 128, 64 and 32-unit hidden layers to one output. It is configured to train on 3,000 generated samples for 8,000 epochs using Candle.
From potential to scattering paths
The Deep Inelastic Scattering stage launches twenty simulated electrons toward a quark target and integrates their trajectories from the force derived from the potential.
Reviewable sessions
Each run can write training, potential and scattering plots alongside serialized session data. A saved session can be reopened without retraining the model.