This simulator models a chemical synapse: an action potential triggers Ca²⁺-dependent vesicle fusion at the presynaptic terminal, releasing neurotransmitter that diffuses across the ~20 nm synaptic cleft, binds postsynaptic receptors, and produces an EPSP or IPSP. Release is stochastic rather than all-or-nothing — a higher release probability makes a large multi-vesicle burst more likely on any given spike, while reuptake transporters continuously clear free neurotransmitter from the cleft.
Vesicles burst from the presynaptic terminal, drift by Brownian motion plus a diffusive push across the cleft, and either bind a receptor (turning it gold and nudging the postsynaptic potential) or get pulled back into the terminal by reuptake. A live trace plots the resulting PSP in millivolts, decaying back toward zero after each event.
Switch the neurotransmitter type between glutamate (excitatory) and GABA (inhibitory), then tune release probability, reuptake rate and receptor density with the sliders. Set an automatic stimulation rate in Hz or fire single spikes with the "Fire AP" button, and toggle "Block receptors" to see how an antagonist abolishes the postsynaptic response.
Real synaptic vesicle release is genuinely probabilistic — even a strong action potential doesn't guarantee neurotransmitter release, which is why the simulation rolls a random release-probability check on every fired spike rather than always releasing a fixed amount.
An EPSP (excitatory postsynaptic potential) is produced by glutamate binding, pushing the simulated PSP value positive toward +70 mV. An IPSP (inhibitory postsynaptic potential) is produced by GABA binding, pushing the PSP negative toward −70 mV. You can flip between the two with the neurotransmitter type dropdown and watch the PSP trace change sign.
Each time an action potential fires, the code draws a random number and compares it to the release probability (0.1–1.0). If the roll succeeds, a larger burst of 3–7 vesicles is released; if it fails, only 1–2 are released. Raising the slider makes the large, reliable burst the more likely outcome.
Two things remove a particle: it can be captured by reuptake transporters back at the presynaptic membrane (governed by the reuptake rate slider) or it can simply drift too long and get culled. Only particles that reach a receptor's binding radius while receptors aren't blocked actually bind and contribute to the PSP.
This simulates a receptor antagonist. Bound receptors are marked with a red cross and no longer accept neurotransmitter, so vesicles can still be released and diffuse across the cleft but no PSP is generated — a simplified model of how drugs like curare or bicuculline block synaptic transmission.
The simulation applies an exponential decay to the accumulated PSP every frame, mimicking how postsynaptic membrane potential relaxes back toward its resting level once ion channels close and receptor binding times out, rather than staying permanently displaced after a single event.