I'm attempting to translate a neuron hoc model to python which uses a detailed kinetic representation of AMPA receptors. The model consists of a hoc synapse model and mod files for hh2, caL, rel and AMPA5. Below is the relevant hoc code;
Code: Select all
create PRE,POST
forall {
insert pas
}
access PRE
insert hh2
insert caL
insert rel
//----------------------------------------------------------------------------
// insert postsynaptic mechanisms
//----------------------------------------------------------------------------
objectvar c
c = new AMPA5() // create synapse
POST c.loc(0.5) // assign postsynaptic compartment
setpointer c.C, PRE.T_rel(0.5) // assign presynaptic compartment
Code: Select all
from neuron import *
from nrn import *
PRE=Section()
POST=Section()
soma1.insert('hh2') #hh2 is a custom hh mechanism by the author
soma1.insert('caL')
soma1.insert('pas')
soma1.insert('rel')
soma2.insert('hh2')
soma2.insert('pas')
#synapse
soma2 = cas()
synapse = h.AMPA5()
synapse.loc(0.5)
synapse.C= h.setpointer(soma1(0.5).T_rel, 'ampa', synapse.AMPA5) #error causing code
Could anyone clarify what the three arguments for h.setpointer should be? I'm aware that assigning synapse.C may also be incorrect, but placing synapse.C anywhere within the h.setpointer arguments leads to a segmentation fault. Any help/insight would be greatly appreciated!
The model I follow is;
http://webcache.googleusercontent.com/s ... en&ct=clnk
(the website does occasionally go offline...)
The mod file for the AMPA5 object is printed below;
Code: Select all
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
NEURON {
POINT_PROCESS AMPA5
POINTER C
RANGE C0, C1, C2, D1, D2, O
RANGE g, gmax, rb
GLOBAL Erev
GLOBAL Rb, Ru1, Ru2, Rd, Rr, Ro, Rc
GLOBAL vmin, vmax
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(pS) = (picosiemens)
(umho) = (micromho)
(mM) = (milli/liter)
(uM) = (micro/liter)
}
PARAMETER {
Erev = 0 (mV) : reversal potential
gmax = 500 (pS) : maximal conductance
vmin = -120 (mV)
vmax = 100 (mV)
: Rates
Rb = 13 (/mM /ms): binding
: diffusion limited (DO NOT ADJUST)
Ru1 = 0.0059 (/ms) : unbinding (1st site)
Ru2 = 86 (/ms) : unbinding (2nd site)
Rd = 0.9 (/ms) : desensitization
Rr = 0.064 (/ms) : resensitization
Ro = 2.7 (/ms) : opening
Rc = 0.2 (/ms) : closing
}
ASSIGNED {
v (mV) : postsynaptic voltage
i (nA) : current = g*(v - Erev)
g (pS) : conductance
C (mM) : pointer to glutamate concentration
rb (/ms) : binding
}
STATE {
: Channel states (all fractions)
C0 : unbound
C1 : single glu bound
C2 : double glu bound
D1 : single glu bound, desensitized
D2 : double glu bound, desensitized
O : open state 2
}
INITIAL {
C0=1
C1=0
C2=0
D1=0
D2=0
O=0
}
BREAKPOINT {
SOLVE kstates METHOD sparse
g = gmax * O
i = (1e-6) * g * (v - Erev)
}
KINETIC kstates {
rb = Rb * C
~ C0 <-> C1 (rb,Ru1)
~ C1 <-> C2 (rb,Ru2)
~ C1 <-> D1 (Rd,Rr)
~ C2 <-> D2 (Rd,Rr)
~ C2 <-> O (Ro,Rc)
CONSERVE C0+C1+C2+D1+D2+O = 1
}