def add_P2Xreceptors(self, compartment, time, g): ''' Adds P2X3 receptors Parameters ---------- compartment: section of NEURON cell part of neuron x: int x - coordinate of ATP application time: int (ms) time of ATP application g: float receptor conductance ''' x = [8300, 13485, 13485] y = [0, 1800, -1800] z = [0, 0, 0] if self.fast_diff: for i in range(len(x)): diff = h.AtP_42(compartment(0.5)) # if i > 0: # y = y*(-1) diff.h = self.distance(compartment, x[i], y[i], z[i]) print(compartment) print(diff.h) diff.tx1 = time + i * self.dt diff.Deff = 0.8 diff.c0cleft = 1 diff.k = 0.001 rec = h.p2x3(compartment(0.5)) rec.gmax = g rec.Ev = 5 rec2 = h.p2x2(compartment(0.5)) rec2.gmax = 0 rec2.Ev = -7 h.setpointer(diff._ref_atp, 'patp', rec) self.recs.append(rec) h.setpointer(diff._ref_atp, 'patp', rec2) self.recs.append(rec2) self.diffs.append(diff) else: diff = h.AtP_slow(compartment(0.5)) diff.h = self.distance(compartment, x[0], y[0], z[0]) diff.tx1 = time + 0 + (diff.h / 1250) * 1000 diff.c0cleft = 100 # self.diffusions.update({diff: compartment}) rec = h.p2x3(compartment(0.5)) rec.gmax = g rec.Ev = 5 h.setpointer(diff._ref_atp, 'patp', rec) self.recs.append(rec) self.diffs.append(diff)
def add_P2Xreceptors(self, compartment, time, g): ''' Adds P2X3 receptors Parameters ---------- compartment: section of NEURON cell part of neuron x: int x - coordinate of ATP application time: int (ms) time of ATP application g: float receptor conductance ''' if self.fast_diff: diff = h.AtP_42(compartment(0.5)) diff.h = self.distances.get(compartment) diff.tx1 = time diff.Deff = 0.8 if self.numofmodel == 4 or self.numofmodel == 5: diff.c0cleft = 10 else: diff.c0cleft = 1 if self.numofmodel == 1: diff.k = 0 elif self.numofmodel == 3: diff.k = 0.6 else: diff.k = 0.01 else: diff = h.AtP_slow(compartment(0.5)) diff.h = self.distances.get(compartment) diff.tx1 = time + 0 + (diff.h / 1250) * 1000 diff.c0cleft = 100 self.diffusions.update({diff: compartment}) rec = h.p2x3(compartment(0.5)) rec.gmax = g rec.Ev = 5 if self.numofmodel == 4 or self.numofmodel == 5: rec2 = h.p2x2(compartment(0.5)) rec2.Ev = -7 rec2.gmax = 1 h.setpointer(diff._ref_atp, 'patp', rec2) self.recs.append(rec2) if self.numofmodel == 4: rec.gmax = 0 if self.numofmodel == 5: rec.gmax = 0.2 rec2.gmax = 0.2 h.setpointer(diff._ref_atp, 'patp', rec) self.recs.append(rec) self.diffs.append(diff)
def add_P2Xreceptors(self, compartment, time, g): ''' Adds P2X3 receptors Parameters ---------- compartment: section of NEURON cell part of neuron x: int x - coordinate of ATP application time: int (ms) time of ATP application g: float receptor conductance ''' if self.fast_diff: for i in range(10): diff = h.AtP_42(compartment(0.5)) diff.h = self.distances.get(compartment) diff.tx1 = time + i * 70 diff.Deff = 0.8 diff.c0cleft = 25 diff.k = 0.0 #1 rec = h.p2x3(compartment(0.5)) rec.gmax = g rec.Ev = 2 rec2 = h.p2x2(compartment(0.5)) rec2.gmax = 0 rec2.Ev = -7 h.setpointer(diff._ref_atp, 'patp', rec) self.recs.append(rec) h.setpointer(diff._ref_atp, 'patp', rec2) self.recs.append(rec2) self.diffs.append(diff) else: diff = h.AtP_slow(compartment(0.5)) diff.h = self.distances.get(compartment) diff.tx1 = time + 0 + (diff.h / 1250) * 1000 diff.c0cleft = 100 # self.diffusions.update({diff: compartment}) rec = h.p2x3(compartment(0.5)) rec.gmax = g rec.Ev = 5 h.setpointer(diff._ref_atp, 'patp', rec) self.recs.append(rec) self.diffs.append(diff)
def define_biophysics(self): ''' Adds channels and their parameters ''' for sec in self.all: # 'all' defined in build_subsets sec.Ra = 35 # Axial resistance in Ohm * cm sec.cm = 1 # Membrane capacitance in micro Farads / cm^2 sec.insert('navv1p8') sec.insert('extrapump') sec.insert('koi') sec.insert('naoi') sec.insert('nakpump') sec.insert('nattxs') sec.insert('kdr') sec.insert('iKCa') sec.insert('kad') sec.insert('kap') sec.insert('leak') sec.insert('Nav1_3') sec.insert('iCaL') sec.insert('CaIntraCellDyn') sec.insert('extracellular') ap_diff = h.AtP_slow(sec(0.5)) ap_diff.h = self.distances.get(sec) ap_diff.tx1 = 1000 + 0 + (ap_diff.h / 1250) * 1000 ap_diff.c0cleft = 100 self.diffs.append(ap_diff) for seg in sec: h.setpointer(ap_diff._ref_atp, 'im', seg.kdr) h.setpointer(ap_diff._ref_atp, 'im', seg.kad) h.setpointer(ap_diff._ref_atp, 'im', seg.kap) if self.numofmodel == 8 or self.numofmodel >= 11: sec.gbar_navv1p8 = 0.2 elif self.numofmodel == 7: sec.gbar_navv1p8 = 0.1 else: sec.gbar_navv1p8 = 0 sec.gbar_kdr = 0.01 sec.gbar_kad = 0.1 sec.gbar_kap = 0.1 sec.gbar_iKCa = 0.0015 sec.depth_CaIntraCellDyn = 0.1 sec.cai_tau_CaIntraCellDyn = 2.0 sec.cai_inf_CaIntraCellDyn = 50.0e-6 sec.pcabar_iCaL = 0.0001 if self.numofmodel == 6: sec.gbar_nattxs = 0.2 else: sec.gbar_nattxs = 0.1 sec.gbar_Nav1_3 = 0.2 sec.smalla_nakpump = -0.0047891 sec.theta_naoi = 0.029 sec.theta_koi = 0.029 sec.celsiusT_nattxs = 37 sec.celsiusT_navv1p8 = 37 sec.celsiusT_nakpump = 37 for sec in self.stimsec: if self.numofmodel == 13 or self.numofmodel == 14: self.add_5HTreceptors(sec, 10, 1) else: self.add_P2Xreceptors(sec, 100, 3)