I have used pointer to connect instances of my artificial cells with gaps with
setpointer ICOcells.ICO.Vgap, ICOcells[i+1].ICO.V
and included POINTER Vgap in the mod file.
The problem is that although I can plot ICOcells.ICO.Vgap at the hoc level, I can not use the variable Vgap within the mod file, for example include it in the differential equation for the membrane potential V.
I should note that I use a batch file of the style:
Code: Select all
integrate() {
finitialize()
fcurrent()
while (t<tstop) {
fadvance()
(save data commands here)
}
doEvents()
}
Please find the mod code below:
Code: Select all
TITLE LIF model for Coupled Oscillator net
NEURON {
POINT_PROCESS Oscillator
RANGE I, we, wi, VV, refrac, event, inh, exc, nspike, tau, ggap
GLOBAL ae, ai, epse, epsi, Vreset
POINTER Vgap
}
UNITS {
(uA)= (microamp)
(mV)= (millivolt)
(uF)= (microfarad)
(mS)= (millisiemens)
}
PARAMETER {
:INPUT
I=1 :(uA/cm2)
tau=1
:SYNAPTIC PARAMETERS-RECURRENT
ae=0.2
ai=0.2
epse=1
epsi=1
we=1
wi=-1
:Initial values
VV=-1
Vreset=-1
refrac=0
:Gaps
ggap=1
}
ASSIGNED {
event
inh
exc
nspike
Vgap
}
STATE { V gi si ge se Iexc Iinh Igap}
BREAKPOINT {
SOLVE states METHOD runge
}
INITIAL {
V=VV
Iexc=0
Igap=0
}
DERIVATIVE states {
:CELL
V' = -V/tau + epse*we*ge + epsi*wi*gi + I : + Vgap
:SYN
si'=-2*ai*si - ai*ai*gi
gi'=si
se'=-2*ae*se - ae*ae*ge
ge'=se
}
NET_RECEIVE (w) {
if (w==-1) { si=si+ai*ai
inh=t
}
if (w==1) { se=se+ae*ae
exc=t
}
if (w==17) { event=t
net_event(t+refrac)
nspike = nspike + 1
V=Vreset
}
}