Substituting a silicon (group IV) site with phosphorus (group V) leaves one extra, weakly-bound electron — a donor with ionization energy ED ≈ 0.045 eV below the conduction band. Substituting with boron (group III) leaves a missing bond — an acceptor that can capture a valence electron and leave a mobile hole, with a comparably shallow EA ≈ 0.045 eV above the valence band.
Each dopant ionizes independently with a temperature-dependent probability derived from Fermi–Dirac statistics for a two-level donor/acceptor system (charge-neutrality solved against the conduction/valence effective density of states NC,V(T) ∝ T1.5):
P_ionized(T) = n_free(T) / N_dopant
solved from: n_free = N_C(T)·y , N_dopant = N_C(T)·y·(1 + g·y·e^(E_ion/k_BT))
which is the same statement as P_ionized ≈ 1 / (1 + g·exp((E_ion − (E_F−E_C))/k_BT))
Every dopant atom is assigned a fixed random threshold r ∈ (0,1) when it is placed. At the current temperature it is drawn as ionized whenever r < Pionized(T), and releases its mobile carrier — this is exactly what "ionization probability" means physically, and it is why the same crystal shows more ionized (bright) dopants as you raise T. At low T almost nothing ionizes (freeze-out); around room temperature Pionized saturates near 1; at very high T the thermally-generated intrinsic carrier density ni(T) = C·T1.5·exp(−Eg/2kBT) overtakes the dopant density and the crystal turns intrinsic again, exactly as in the mass-action law n·p = ni(T)².
The strip under the crystal plots this whole curve — ionized fraction and majority-carrier density swept across T — with a marker at the current slider position and a dot at the actual measured fraction from the simulated dopant ensemble, so you can see the live simulation tracking the closed-form theory.
Controls: pick donor or acceptor doping, set concentration (or click sites directly), sweep temperature to move through freeze-out → saturation → intrinsic, and adjust drift speed. Grey dots are silicon lattice sites; dim green/red rings are un-ionized dopants; bright filled green/red dots are ionized dopants; small cyan particles are free electrons, small orange-red particles are free holes.