AlphaSynapse dynamics

Particularly useful chunks of hoc and/or NMODL code. May be pedestrian or stunningly brilliant, may make you gasp or bring tears to your eyes, but always makes you think "I wish I had written that; I'm sure going to steal it."
Post Reply
VENOM
Posts: 7
Joined: Tue Jun 18, 2024 12:02 pm

AlphaSynapse dynamics

Post by VENOM »

Hello NEURON community:

This post talks about the underlying equation of AlphaSynapse. https://www.sas.upenn.edu/LabManuals/BB ... phasyn.htm

I am wondering if the "v", postsynaptic voltage, is constant (and set as resting voltage) or should change during current injection. Biologically, it should be the latter as driving force changes as current is injected; but is the current computed during simulation (thus can know how postsynaptic voltage changes) or precomputed (thus have no idea how postsynaptic voltage changes)?
ted
Site Admin
Posts: 6388
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: AlphaSynapse dynamics

Post by ted »

VENOM wrote: Fri May 23, 2025 8:48 am Hello NEURON community:

This post talks about the underlying equation of AlphaSynapse. https://www.sas.upenn.edu/LabManuals/BB ... phasyn.htm

I am wondering if the "v", postsynaptic voltage, is constant (and set as resting voltage) or should change during current injection. Biologically, it should be the latter as driving force changes as current is injected; but is the current computed during simulation (thus can know how postsynaptic voltage changes) or precomputed (thus have no idea how postsynaptic voltage changes)?
Well, that reveals several embarrassing problems with documentation. But first I will answer your question.

You'll find the NMODL source code for the AlphaSynapse class at https://github.com/neuronsimulator/nrn/ ... oc/syn.mod. Ignore the stuff in the COMMENT block. What counts is the actual code, especially in the BREAKPOINT block (which is where currents generated by NMODL-specified mechanisms are calculated), and in particular this statement: i = g*(v - e). Here's an important fact: v is a reserved name in NMODL, and it always means "local membrane potential". And local membrane potential is computed by NEURON's computational engine by numerical integration of the discretized charge balance equation
C*dv/dt = (sum of all currents flowing into this segment from adjacent segments) + (sum of all currents injected into this segment by electrodes (e.g. patch or sharp electrodes)) + (net transmembrane current for this segment).
where C is the membrane capacitance of the segment in question.

So v may vary with time, and the statement "v (mV) is the resting potential" at https://www.sas.upenn.edu/LabManuals/BB ... phasyn.htm is correct only if the postsynaptic cell has been at rest for a long time, so that v will have settled to resting potential. It would be much better if the statement were revised to read something like this: "v (mV) is the membrane potential in the postsynaptic cell at the location where the synapse is attached"

Another issue with that page is in this formula
g = gmax * (t - onset)/tau * exp[-(t - onset - tau)/tau] for t > onset
which should instead be
g = gmax * (t - onset)/tau * exp[-(t - onset )/tau] for t > onset
This error is a bit embarrassing because it is straight from syn.mod's COMMENT block, and it has been there for some time. I have edited syn.mod's entry at github accordingly and submitted a pull request; we'll see how long it takes for that revision to be accepted.
Post Reply