Page 1 of 2

mixed model of artificial and conduction-based cells

Posted: Tue Apr 09, 2013 12:07 pm
by rth
I'm trying to make a mixed model, where some multicompartment or single-compartment cells may be arbitrarily replaced by Izhikevich model(39948). Conditions of Izh. model should be the same as for conduction-based cells: the same Exp2Syn synapses, InNp noise current generator and so on. I'm not sure that it is possible, because Exp2Syn need voltage and current from segment. I'm wondering, maybe somebody has solved this problem before? If yes, could you please provide any links?

One more question. Is it possible to manipulate with voltage in module (mod file) mechanism? If it is possible, why can we not present quadratic part of Izh. model in right side as non-specific current and use standard approach for voltage and current?

Thanks,
Ruben

Re: mixed model of artificial and conduction-based cells

Posted: Tue Apr 09, 2013 10:52 pm
by wwlytton
Not aware that anyone has done this yet but definitely what i had in mind when i posted the model so i would be happy to help you out with getting this developed and posted.

It would appear that the reason i couldn't use a cell V for the 'v' state variable in izhikevich formlation is that the izhikevich v (called vv in the mod file) is a quadratic form: vv' = e*vv*vv + f*vv + g - u + I - gsyn*(vv-erev)

Because of this discrepancy it would appear to be necessary to create the formula for gsyn within a variant of the izh.mod file, probably by making gsyn a state variable so that it could provide exponential falloff in the manner of the weight var in Exp2Syn.

bill

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 11:39 am
by rth
Thank you, Bill.

Right now I have a question. You use vv, because v is embedded in standard segment. Why can we not use variable v and i in standard segment for Izh. model? We can rewrite his model as v'=(Izh(v)+I)/c and where Izh(v)=e*v*v+f*v+g+u - is the non-specific current, c is equal 1 and u is one more dynamic variable. The problem is that: in this way we have to have access to voltage variable v in a segment to reset it, when it reaches threshold. Is it possible? Maybe it is possible use some c-code insertions to access v for manipulation?

Ruben

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 11:49 am
by wwlytton
sounds like a good idea -- give it a try?

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 5:43 pm
by rth
Well, here is a first shot.
Module for current, izhcur.mod

Code: Select all

TITLE IzhikevichCurrent
COMMENT
It is a dirty trick for implementation of Izhikevich model as a 
non-specific current.

This mod file treats Izhikevich model as
v'=(Iizh(v)+i)/cm
where Iizh=e*v^2+f*v+g-u;
u  is treated as gating variable

Do not forget setup cm in 1mF

scratched by Ruben A. Tikidji-Hamburyan
ENDCOMMENT

NEURON {
	SUFFIX izhcur
	NONSPECIFIC_CURRENT i_izh
	RANGE a,b,c,d,e,f,g
}

PARAMETER {
	a = 0.1		(1)
	b = 0.2		(1)
	c = -65		(mV)
	d = 2		(1)
	e = 0.04	(1)
	f = 5		(1)
	g = 140		(1)
}

UNITS {
	(mV) = (millivolt)
	(mA) = (milliamp)
}

ASSIGNED {
	v (mV)
	i_izh (mA/cm2)
}

STATE { u }

BREAKPOINT {

	SOLVE states METHOD cnexp
	i_izh = -0.000001*(vinfi(v)-u)
	if(v>0.0){
		printf ("spike! t=%g,v=%g, u=%g\n",t,v,u)
		v = c
		u = u+d
	}

}

INITIAL {
	u = 0
}

DERIVATIVE states {
	UNITSOFF
	u'= a*(b*v-u)
	UNITSON
}

FUNCTION vinfi(v (mV)) {
	UNITSOFF

	vinfi = e*v*v + f*v + g
	UNITSON
}
Test example izh.hoc

Code: Select all

create soma
access soma

soma{
	L=1
	diam=10/PI
	nseg=1
	insert izhcur
	cm=0.1
}

objref istim

istim = new IClamp(.5)
istim.del = 200
istim.dur = 500
istim.amp = 0.0001
tstop = 1000
tstep = 0.1

objref g
g = new Graph()
g.size(0,tstop,-80,40)
graphList[0].append(g)
g.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2)
run()
It produces some activity, for example, for regular spiking:

Image

and fast spiking modes

Image

but voltage resetting doesn't work:

Code: Select all


spike! t=206.662,v=0.106934, u=-10.1618
spike! t=206.662,v=0.105934, u=-8.16178
spike! t=206.687,v=0.682722, u=-6.14606
spike! t=206.687,v=0.681722, u=-4.14606
spike! t=206.712,v=1.25796, u=-2.14007
spike! t=206.712,v=1.25696, u=-0.140073
spike! t=206.737,v=1.83267, u=1.8562
spike! t=206.737,v=1.83167, u=3.8562
spike! t=206.762,v=2.40687, u=5.84278
spike! t=206.762,v=2.40587, u=7.84278
spike! t=206.787,v=2.98057, u=9.81969
spike! t=206.787,v=2.97957, u=11.8197
spike! t=206.812,v=3.55378, u=13.787
spike! t=206.812,v=3.55278, u=15.787
spike! t=206.837,v=4.12654, u=17.7446
spike! t=206.837,v=4.12554, u=19.7446
spike! t=206.862,v=4.69885, u=21.6927
spike! t=206.862,v=4.69785, u=23.6927
spike! t=206.887,v=5.27072, u=25.6311
spike! t=206.887,v=5.26972, u=27.6311
spike! t=206.912,v=5.84219, u=29.5601
spike! t=206.912,v=5.84119, u=31.5601
spike! t=206.937,v=6.41325, u=33.4795
spike! t=206.937,v=6.41225, u=35.4795
spike! t=206.962,v=6.98394, u=37.3894
spike! t=206.962,v=6.98294, u=39.3894
spike! t=206.987,v=7.55426, u=41.2898
spike! t=206.987,v=7.55326, u=43.2898
spike! t=207.012,v=8.12424, u=45.1808
spike! t=207.012,v=8.12324, u=47.1808
spike! t=207.037,v=8.69388, u=49.0623
spike! t=207.037,v=8.69288, u=51.0623
spike! t=207.062,v=9.26322, u=52.9345
spike! t=207.062,v=9.26222, u=54.9345
spike! t=207.087,v=9.83226, u=56.7972
spike! t=207.087,v=9.83126, u=58.7972
.......
So, it isn't working model at all! Don't use it, please

If anybody has any idea how to reset voltage, I'll appreciate.
Ruben

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 5:51 pm
by wwlytton
as above

you need to use a WATCH statement

looks like you are not doing so

bill

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 6:03 pm
by rth
yes Bill, because NET_RECEIVE section can exist only in POINT_PROCESS module.

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 6:16 pm
by rth
maybe we can insert two modules, one for current and the other one for threshold (POINT_PROCESS), but how the latter one will reach the u variable in current module, I don't know....

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 7:07 pm
by wwlytton
yes, this needs to be a POINT_PROCESS which is what it was before

Re: mixed model of artificial and conduction-based cells

Posted: Wed Apr 10, 2013 7:32 pm
by wwlytton
@ insert two modules -- just 1 module; this is as it was before; start with the orig and edit that
NEURON {
POINT_PROCESS IZH

Re: mixed model of artificial and conduction-based cells

Posted: Thu Apr 11, 2013 2:36 pm
by rth
Bill,
It seems it works. Here alpha version for testing. Please take a look. I didn't check all 21 modes, but what I've checked works perfect. I'll appreciate for any comments and tests.

file izhcur.mod:

Code: Select all

TITLE IzhikevichCurrent

COMMENT

This dirty trick implements Izhikevich model as a  non-specific current.

This module reats Izhikevich model as
v'=(Iizh(v)+i)/cm
where Iizh=e*v^2+f*v+g-u is a inward current and u  is treated as gating variable

Do not forget setup:
 cm in 1uF
 L in 1um
 diam in 10/PI

Here an example, who to use it in hoc file.

objref izh
soma{
	L=1
	diam=10/PI
	nseg=1
	izh = new izhcur(0.5)
	cm=1
}


Authors: Ruben Tikidji-Hamburyan rtikid at lsuhsc.edu, rth at nisms.krinc.ru
Code partially based on izh.mod file written by William Lytton [billl at neurosim.downstate.edu];

ENDCOMMENT

NEURON {
	POINT_PROCESS izhcur
	NONSPECIFIC_CURRENT i_izh
	RANGE a,b,c,d,e,f,g
}

PARAMETER {
	a = 0.01	(1)
	b = 0.2		(1)
	c = -65		(mV)
	d = 2		(1)
	e = 0.04	(1)
	f = 5		(1)
	g = 140		(1)
}

UNITS {
	(mV) = (millivolt)
	(mA) = (milliamp)
}

ASSIGNED {
	v (mV)
	i_izh (mA)
}

STATE { u }

BREAKPOINT {
	SOLVE states METHOD cnexp
	i_izh = -1e-5*(vinfi(v)-u)	:minus, because it is inward current
}

INITIAL {
	u = -14.0
	net_send(0,1)					:we have to send first event
}

DERIVATIVE states {
	UNITSOFF
	u'= a*(b*v-u)
	UNITSON
}

FUNCTION vinfi(v (mV)) {
	UNITSOFF
	vinfi = e*v*v + f*v + g
	UNITSON
}

NET_RECEIVE (w) {
	if (flag == 1) {
		WATCH (v > 30.0) 2
	} else {
		net_event(t)
		v = c
		u = u+d
  }
}
Simple example, who to use it:

Code: Select all

create soma
access soma

objref izh
soma{
	L=1
	diam=10/PI
	nseg=1
	izh = new izhcur(0.5)
	cm=1

}

objref istim

istim = new IClamp(.5)
istim.del = 200
istim.dur = 500
istim.amp = 0.0001
tstop = 1000
tstep = 0.1

objref g
g = new Graph()
g.size(0,tstop,-80,40)
graphList[0].append(g)
g.addexpr("v(.5)", 1, 1, 0.8, 0.9, 2)
run()
The results for regular spiking mode:

Image

for fast spiking

Image

Ruben

Re: mixed model of artificial and conduction-based cells

Posted: Thu Apr 11, 2013 3:15 pm
by rth
correction: diam should be 1/PI

Re: mixed model of artificial and conduction-based cells

Posted: Thu Apr 11, 2013 4:05 pm
by wwlytton
please place (replace mine) on modeldb and i will download and run -- not sure how to download from this site

Re: mixed model of artificial and conduction-based cells

Posted: Thu Apr 11, 2013 4:07 pm
by wwlytton
have you tried connecting 2 of them? -- that would be nice as a demo that this now is useable in the network context
would also be a good thing to add to the modeldb demo

Re: mixed model of artificial and conduction-based cells

Posted: Thu Apr 11, 2013 4:08 pm
by wwlytton
btw,great job