I am trying to translate the Gentiletti et al. model (https://senselab.med.yale.edu/modeldb/S ... hoc#tabs-2) to netpyne and I have some problems with the inhibitory synapse.
In this model, the mod file is not Exp2Syn.mod but is.mod and it require a pointer with the interneuron ecl.
Below is the is mod file :
Code: Select all
TITLE is :Inhibitory synapse in the pyramidal cell
NEURON {
POINT_PROCESS is
RANGE tau1, tau2, i, g
USEION cl READ ecl WRITE icl VALENCE -1
POINTER e
}
PARAMETER {
tau1 = 2 (ms)
tau2 = 6 (ms)
}
ASSIGNED {
v (mV)
e (mV)
ecl (mV)
icl (nanoamp)
g (microsiemens)
factor
}
STATE {
A (microsiemens)
B (microsiemens)
}
INITIAL {
LOCAL tp
if (tau1/tau2 > .9999) {
tau1 = .9999*tau2
}
A = 0
B = 0
tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1)
factor = -exp(-tp/tau1) + exp(-tp/tau2)
factor = 1/factor
}
BREAKPOINT {
SOLVE state METHOD cnexp
g = B - A
icl = g*(v - e)
}
DERIVATIVE state {
A' = -A/tau1
B' = -B/tau2
}
NET_RECEIVE(weight (microsiemens)) {
A = A + weight*factor
B = B + weight*factor
}
Code: Select all
//Inhibitory synapse (GABA_A)
objref ncl
ncl = new List()
objref syn
psoma syn = new is(0.5)
setpointer syn.e, psoma.ecl(0.5)
syn.tau2 = 6
syn.tau1 = 2
soma ncl.append(new NetCon(&v(1),syn,-10,0,0.003))
Code: Select all
netParams.synMechParams['inhE'] = {'mod': 'is', 'tau1': 0.25, 'tau2': 5.0}
I also tried to import the mechanism directly with the cell :
Code: Select all
netParams.importCellParams(label='PyrCell_rule', conds={'cellType': 'PYR', 'cellModel': 'PyrCell'},
fileName='PyrCell2.py', cellName='PyrCellClass', importSynMechs=True, cellArgs={'Complex_PyrCell':True})
print netParams.synMechParams
Code: Select all
class Cell(object):
def __init__(self, Complex_PyrCell):
self.synlist = []
self.createSections()
self.buildTopology()
self.defineGeometry()
self.defineBiophysics(Complex_PyrCell)
self.createSynapses(Complex_PyrCell)
self.nclist = []
def createSections(self):
pass
def buildTopology(self):
pass
def defineGeometry(self):
pass
def defineBiophysics(self):
pass
def createSynapses(self,Complex_PyrCell):
if Complex_PyrCell :
self.synE = h.Exp2Syn(self.soma(0.5))
self.synE.e = 0
self.synE.tau1 = 0.4
self.synE.tau2 = 2
self.synI=h.isyn(0.5, sec=self.soma)
self.synI.tau1 = 0.25
self.synI.tau2 = 5
h.setpointer(self.soma(.5)._ref_ecl,'e',self.synI)
else :
self.synE = h.Exp2Syn(self.soma(0.5))
self.synE.e = 0
self.synE.tau1 = 0.2
self.synE.tau2 = 1
self.synI = h.Exp2Syn(self.soma(0.5))
self.synI.e = -80
self.synI.tau1 = 0.25
self.synI.tau2 = 5
def createNetcon(self, thresh=10):
""" created netcon to record spikes """
nc = h.NetCon(self.soma(0.5)._ref_v, None, sec = self.soma)
nc.threshold = thresh
return nc
class PyrCellClass(Cell):
def createSections(self):
"""Create the sections of the cell."""
self.soma=h.Section(name='soma')
self.dend1=h.Section(name='dend1')
self.dend2=h.Section(name='dend2')
self.sections=[self.soma, self.dend1, self.dend2]
def defineGeometry(self):
"""Set the 3D geometry of the cell."""
self.soma.nseg=1
self.soma.L=20
self.soma.diam=15
self.dend1.nseg=1
self.dend1.L=300
self.dend1.diam=1.9
self.dend2.nseg=1
self.dend2.L=150
self.dend2.diam=6.2
def defineBiophysics(self,Complex_PyrCell):
"""Assign the membrane properties across the cell."""
# Insert active Hodgkin-Huxley current in the soma
for ss in self.sections:
#these settings are the same for all sections of interneuron and pyramidal cell
ss.insert('leak')
ss.Ra=100
ss.cm=1
# insert mechanisms only for soma
self.soma.insert('pnas')
self.soma.gna_pnas=0.025
self.soma.insert('pkdrs')
self.soma.gkdr_pkdrs=0.05
# insert mechanisms only for dend1
self.dend1.insert('pnad')
self.dend1.gna_pnad=0.0045
self.dend1.insert('pkdrd')
self.dend1.gkdr_pkdrd=0.00185
# insert mechanisms only for dend2
self.dend2.insert('pnad')
self.dend2.gna_pnad=0.0045
self.dend2.insert('pkdrd')
self.dend2.gkdr_pkdrd=0.00185
if Complex_PyrCell :
for ss in self.sections:
#these settings are the same for all sections of interneuron and pyramidal cell
ss.insert('nakpump')
ss.km_k_nakpump=2
ss.km_na_nakpump=10
#these settings are the same for all sections of the pyramidal cell
ss.insert('kcc2')
ss.insert('singleaccum') # modified accum for a single cell
ss.insert('cal')
ss.gcal_cal=0.00015
ss.insert('kahp')
ss.gkahp_kahp=0.0001
ss.insert('kc')
ss.gkc_kc=0.196
# insert mechanisms only for soma
self.soma.insert('nap')
self.soma.gna_nap=0.0002
self.soma.insert('km')
self.soma.gkm_km=0.0035
def buildTopology(self):
self.dend1.connect(self.soma(0),1)
self.soma.connect(self.dend2(0),1)
Code: Select all
{PyrCellClass_isyn_0: {tau2: 5.0, tau1: 0.25, mod: 'isyn'}, PyrCellClass_Exp2Syn_1: {tau2: 2.0, tau1: 0.4, e: 0.0, mod: 'Exp2Syn'}}
Code: Select all
Creating network of 20 cell populations on 1 hosts...
Number of cells on node 0: 20
Done; cell creation time = 0.01 s.
Making connections...
Number of connections on node 0: 25
Done; cell connection time = 0.01 s.
Recording 8 traces of 4 types on node 0
Noémie