examples/Hydrogen/README.md
This project simulates the electron probability distribution of a hydrogen atom’s 1s orbital using Monte Carlo sampling. The data is streamed over UDP for real-time visualization in Serial Studio.
This is not a classical orbit model. Instead, it displays probabilistic electron positions derived from quantum mechanics, visualized as a dynamic 3D cloud.
Note: This project uses features available only under a paid license. Visit serial-studio.com for more information.
The electron's radial distance from the nucleus, denoted by r, is sampled using the probability distribution for the 1s orbital:
$$ P(r) \propto r^2 \cdot e^{-2r / a_0} $$
Where:
Electron positions are computed in spherical coordinates, then converted to Cartesian $$(x, y, z)$$.
Each UDP frame contains five comma-separated values:
x, y, z, psi2, r
Where:
x, y, z: Electron position in Cartesian coordinates (in units of $$a_0$$).psi2: Probability density $$\psi^2(r) = |\psi(r)|^2$$.r: Radial distance from the nucleus (in units of $$a_0$$).Example:
-0.283291,0.453772,0.125448,0.038142,0.621987
Run the simulation:
python3 hydrogen.py
In Serial Studio:
Hydrogen.ssproj project file.9000.hydrogen.py: Python script for simulation and UDP streaming.Hydrogen.ssproj: Serial Studio project file.README.md: Project documentation.doc/screenshot.png: Screenshot of the visualization.