Exemple #1
0
 def add_5HTreceptors(self, compartment, x, time, g):
     '''
     Adds 5HT receptors
     Parameters
     ----------
     compartment: section of NEURON cell
         part of neuron 
     x: int
         x - coordinate of serotonin application
     time: int (ms)
         time of serotonin application
     g: float
         receptor conductance 
     '''
     if self.fast_diff:
         diff = h.diff_5HT(compartment(0.5))
         diff.h = math.sqrt((x-self.coordinates.get(compartment).get('x'))**2 + (0-self.coordinates.get(compartment).get('y'))**2 + (0.001-self.coordinates.get(compartment).get('z'))**2)
         diff.tx1 = time
         #diff.a = 1000
         #diff.Deff = 0.0004
         #diff.c0cleft = 2
     else:
         diff = h.slow_5HT(compartment(0.5))
         diff.h = math.sqrt((x-self.coordinates.get(compartment).get('x'))**2 + (0-self.coordinates.get(compartment).get('y'))**2 + (0.001-self.coordinates.get(compartment).get('z'))**2)
         diff.tx1 = time + 0 + (diff.h/1250)*1000
         diff.c0cleft = 100
     rec = h.r5ht3a(compartment(0.5))
     rec.gmax = g
     h.setpointer(diff._ref_serotonin, 'serotonin', rec)
     self.diffs.append(diff)
     self.recs.append(rec)      
Exemple #2
0
 def add_5HTreceptors(self, compartment, time, g):
     '''
     Adds 5HT receptors
     Parameters
     ----------
     compartment: section of NEURON cell
         part of neuron 
     x: int
         x - coordinate of serotonin application
     time: int (ms)
         time of serotonin application
     g: float
         receptor conductance 
     '''
     if self.fast_diff:
         diff = h.diff_5HT(compartment(0.5))
         diff.h = self.distances.get(compartment)
         diff.tx1 = time
         if self.numofmodel == 14:
             diff.a = 100
         else:
             diff.a = 0
         diff.Deff = 0.004
         diff.c0cleft = 3
     else:
         diff = h.slow_5HT(compartment(0.5))
         diff.h = self.distances.get(compartment)
         diff.tx1 = time + 0 + (diff.h/50)*1000
         diff.c0cleft = 3
     rec = h.r5ht3a(compartment(0.5))
     rec.gmax = g
     h.setpointer(diff._ref_serotonin, 'serotonin', rec)
     self.diffs.append(diff)
     self.recs.append(rec)      
Exemple #3
0
 def add_5HTreceptors(self, compartment, time, g):
     '''
   Adds 5HT receptors
   Parameters
   ----------
   compartment: section of NEURON cell
       part of neuron
   x: int
       x - coordinate of serotonin application
   time: int (ms)
       time of serotonin 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.diff_5HT(compartment(0.5))
             diff.h = self.distance(compartment, x[i], y[i], z[i])
             print(compartment)
             print(diff.h)
             diff.tx1 = time + i * self.dt
             diff.a = 0.25
             diff.Deff = 0.4
             diff.c0cleft = 2
             rec = h.r5ht3a(compartment(0.5))
             rec.gmax = g
             h.setpointer(diff._ref_serotonin, 'serotonin', rec)
             self.recs.append(rec)
             self.diffs.append(diff)
     else:
         diff = h.slow_5HT(compartment(0.5))
         diff.h = self.distance(compartment, x[0], y[0], z[0])
         diff.tx1 = time + 0 + (diff.h / 50) * 10  #00
         diff.c0cleft = 3
         rec = h.r5ht3a(compartment(0.5))
         rec.gmax = g
         h.setpointer(diff._ref_serotonin, 'serotonin', rec)
         self.diffs.append(diff)
         self.recs.append(rec)
Exemple #4
0
 def add_5HTreceptors(self, compartment, time, g):
     '''
 Adds 5HT receptors
 Parameters
 ----------
 compartment: section of NEURON cell
 part of neuron
 x: int
 x - coordinate of serotonin application
 time: int (ms)
 time of serotonin application
 g: float
 receptor conductance
 '''
     diff = h.slow_5HT(compartment(0.5))
     diff.h = random.uniform(10, 2500)
     diff.tx1 = time + 0 + (diff.h / 50) * 10  #00
     diff.c0cleft = 3
     diff.a = 0.1
     rec = h.r5ht3a(compartment(0.5))
     rec.gmax = g
     h.setpointer(diff._ref_serotonin, 'serotonin', rec)
     self.diffs.append(diff)
     self.recs.append(rec)