How NEURON calculates membrane potential of one compartment

NMODL and the Channel Builder.
Post Reply
Nefeli
Posts: 12
Joined: Fri Jul 27, 2007 10:55 am

How NEURON calculates membrane potential of one compartment

Post by Nefeli »

Hi,

I'm trying to figure out exaclty which equation NEURON is solving to calculate the membrane potential of a single compartment model (only soma).

The reason for that is that I have created a dummy passive cell

soma { diam=10 L=10 Ra=1 cm=1 insert dummy insert pas g_pas=1 e_pas=0}

which receives input from exponential synapses with different weights (mod file attached at the end), and I'm using the membrane potential of the dummy cell (v) to reverse engineer what is the total synaptic input to that cell (Isyn=\sum wij*gj(t) is the input from cells j=1:N to cell i ).

Please note that I've modified the Expsyn so that

Code: Select all

BREAKPOINT {
	SOLVE state METHOD cnexp
	i=ww*g : instead of i = g*(v - e)
}

DERIVATIVE state {
	g' = -g/tau
}

NET_RECEIVE(weight (uS)) {
	g = g + 1/tau : instead of g = g + weight
	ww=weight
}
From the simulations it seems that for values of cm<=1 the following formula is a very good approximation (4s.f.)
Isyn=\sum wij*gj(t)=-(diam*L*PI/100)*vi(t) .

Assuming that the equation NEURON solves is of the format
cm dv/dt +Iion(t)= Isyn(t)
this doesn't make much sense.

Any help would be greatly appreciated.

Code: Select all

TITLE Dummy cell
 
UNITS {
        (mA) = (milliamp)
        (mV) = (millivolt)
	    (S) = (siemens)
}
 
NEURON {
        SUFFIX dummy
        RANGE myv, factor, iv, imyv
 
}
 
PARAMETER {

factor=-3.14159265 :// for diam=10, L=10
iv=0
imyv=0

}
 
STATE {
myv 
}
 
ASSIGNED {
v (mV)
}
 

BREAKPOINT {
     myv=factor*v
          
}
  
INITIAL {
v=iv
myv=imyv
}
ted
Site Admin
Posts: 6389
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How NEURON calculates membrane potential of one compartment

Post by ted »

Step back from all that code and think about the physics of the situation: a resistor R and capacitor C in parallel, driven by a current source i. In the limit as C->0 the capacitive current also -> 0, so all of the synaptic current must flow through the resistor. The "membrane potential" v is therefore simply the product R*i.

Unrelated comments:
Since
i=ww*g
where ww is determined by the weight of the most recent input, delivery of an event whose weight differs from that of previous events will rescale the residual "trace" of those previous inputs. Consequently this mechanism is subject to capricious and probably undesirable "heterosynaptic" effects (and use-dependent homosynaptic effects, if the weight of a single input stream should change in mid run). This doesn't hurt anything as long as the weights events received by any one instance of the mechanism in the course of a simulation are identical to each other--but it's probably not what you intended, and it is likely to cause difficulties for anyone who tries to reuse your code.

This limitation can be removed by making the following changes:

Code: Select all

STATE {
:   g (uS)
   i (nA)
}

BREAKPOINT {
   SOLVE state METHOD cnexp
:   i=ww*g : instead of i = g*(v - e)
}

DERIVATIVE state {
   i' = -i/tau
}

: NET_RECEIVE(weight (uS)) {
NET_RECEIVE(weight (nA-ms)) {
:   g = g + 1/tau : instead of g = g + weight
:   ww=weight
   i = i + weight/tau
}
Nefeli
Posts: 12
Joined: Fri Jul 27, 2007 10:55 am

Re: How NEURON calculates membrane potential of one compartment

Post by Nefeli »

Many thanks for the response.

I do undestand that the
"membrane potential" v is therefore simply the product R*i.
for small cm but why is
R=-(diam*L*PI/100) ?

Regarding the comment about the synapse, ww here is not the weight of the most recent input but rather the equivalent of g_syn.
Since for my problem I have N synapses of N different wws contacting each dummy cell, hence I need

i=ww*g, with g=g+1/tau (with 1/tau being the weight due to the most recent input)

when there is an event.
ted
Site Admin
Posts: 6389
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How NEURON calculates membrane potential of one compartment

Post by ted »

First let me apologize for writing
i = i + ww/tau
in the NET_RECEIVE block. That was carelessness. The correct statement is
i = i + weight/tau
(and I have already made the correction for the benefit of future readers of this thread).
Isyn= -(diam*L*PI/100)*vi(t)
Looks like Ohm's law to me. Your model's membrane has specific conductance 1 S/cm2. Surface area is PI*100 um2. Net conductance of the cell is therefore PIe-6 S. e-6 vanishes because v is in mV and point process currents are in nA. The only thing that doesn't fit is the - sign--where did you get that from?
Regarding the comment about the synapse, ww here is not the weight of the most recent input
In your mind that may be so, but in your code

Code: Select all

NET_RECEIVE(weight (uS)) {
   g = g + 1/tau : instead of g = g + weight
   ww=weight
}
it is the weight of the most recently active synapse. And ww is then used in the BREAKPOINT block in the statement
i=ww*g
so the mechanism does not function as you think it does.

A simple thought experiment should prove the point. Consider your synaptic mechanism with tau = 1, targeted by two inputs, one weak and one strong. Imagine that the weak synapse is activated, and then after 1 ms, the strong synapse is activated. Immediately after activation of the strong synapse, g == 1+exp(-1) and i == (1+exp(-1))*weight_strong. Start over, but this time activate the strong synapse first and the weak synapse second. Once again g == 1+exp(-1) but now i == (1+exp(-1))*weight_weak. Note that g is independent of which synapse is activated first, and that i depends only on the interstimulus interval and the weight of the most recently activated synapse. Is that really how you want this synapse to work?
Post Reply