Exemple #1
0
    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)
Exemple #2
0
 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)
Exemple #3
0
 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)