Ejemplo n.º 1
0
cell1.pt3dadd(-10, 0, 0, 10)
cell1.nseg = 11

# create cell2 where `x` will be pumped in and accumulate
cell2 = h.Section("cell2")
cell2.pt3dclear()
cell2.pt3dadd(10, 0, 0, 10)
cell2.pt3dadd(20, 0, 0, 10)
cell2.nseg = 11
# Where?
# the intracellular spaces
cyt = rxd.Region(
    h.allsec(),
    name="cyt",
    nrn_region="i",
    geometry=rxd.FractionalVolume(0.9, surface_fraction=1.0),
)

org = rxd.Region(h.allsec(), name="org", geometry=rxd.FractionalVolume(0.1))

cyt_org_membrane = rxd.Region(h.allsec(),
                              name="mem",
                              geometry=rxd.ScalableBorder(
                                  pi / 2.0, on_cell_surface=False))
cyt_ecs_membrane = rxd.Region(h.allsec(),
                              name="cell_mem",
                              geometry=rxd.membrane())

# the extracellular space
ecs = rxd.Extracellular(-55,
                        -55,
Ejemplo n.º 2
0
ip3Diff = 0.283
#ip3Diff = 0
cac_init = 1.e-4
ip3_init = 0.1
gip3r = 12040
gserca = 0.3913
gleak = 6.020
kserca = 0.1
kip3 = 0.15
kact = 0.4
ip3rtau = 2000
h.CVode().active(1)
h.cvode.atol(1e-10)

# define the regions for the rxd
cyt = rxd.Region(h.allsec(), nrn_region='i', geometry=rxd.FractionalVolume(fc, surface_fraction=1))
er = rxd.Region(h.allsec(), geometry=rxd.FractionalVolume(fe))
cyt_er_membrane = rxd.Region(h.allsec(), geometry=rxd.FixedPerimeter(1))

# the species and other states
ca = rxd.Species([cyt, er], d=caDiff, name='ca', charge=2, initial=cac_init)
ip3 = rxd.Species(cyt, d=ip3Diff, initial=ip3_init)
ip3r_gate_state = rxd.State(cyt_er_membrane, initial=0.8)
h_gate = ip3r_gate_state[cyt_er_membrane]


# pumps and channels between ER and Cytosol

serca = rxd.MultiCompartmentReaction(ca[cyt]>ca[er], gserca/((kserca / (1000. * ca[cyt])) ** 2 + 1), membrane=cyt_er_membrane, custom_dynamics=True)
leak = rxd.MultiCompartmentReaction(ca[er]!=ca[cyt], gleak, gleak, membrane=cyt_er_membrane)
Ejemplo n.º 3
0
kip3 = 0.15
kact = 0.4
ip3rtau = 2000.0

rescale_v = 1000 / -65.0

#These parameters where missing in the tutorial so arbitrary values were chosen
#any resemblance to experimental values is purely coincidental.
fc = 0.7
fe = 0.3
caCYT_init = 0.1

cyt = rxd.Region(h.allsec(),
                 name='cyt',
                 nrn_region='i',
                 geometry=rxd.FractionalVolume(fc, surface_fraction=1))

er = rxd.Region(h.allsec(), name='er', geometry=rxd.FractionalVolume(fe / 2.))

cyt_er_membrane = rxd.Region(h.allsec(),
                             name='mem',
                             geometry=rxd.ScalableBorder(
                                 1, on_cell_surface=False))

ca = rxd.Species([cyt, er], d=caDiff, name="ca", charge=2, initial=caCYT_init)

ip3 = rxd.Species(cyt, d=ip3Diff, name="ip3", initial=ip3_init)
ip3r_gate_state = rxd.Species(cyt_er_membrane, name="gate", initial=0.8)
h_gate = ip3r_gate_state[cyt_er_membrane]
minf = ip3[cyt] * rescale_v * v * ca[cyt] / (ip3[cyt] + kip3) / (
    rescale_v * v * ca[cyt] + kact)
Ejemplo n.º 4
0
kact = 0.4
ip3rtau = 2000.0

rescale_v = 1000 / -65.0

# These parameters where missing in the tutorial so arbitrary values were chosen
# any resemblance to experimental values is purely coincidental.
fc = 0.7
fe = 0.3
caCYT_init = 0.1

cyt = rxd.Region(
    h.allsec(),
    name="cyt",
    nrn_region="i",
    geometry=rxd.FractionalVolume(fc, surface_fraction=1),
)

er = rxd.Region(h.allsec(), name="er", geometry=rxd.FractionalVolume(fe / 2.0))

cyt_er_membrane = rxd.Region(h.allsec(),
                             name="mem",
                             geometry=rxd.ScalableBorder(
                                 1, on_cell_surface=False))

ca = rxd.Species([cyt, er], d=caDiff, name="ca", charge=2, initial=caCYT_init)

ip3 = rxd.Species(cyt, d=ip3Diff, name="ip3", initial=ip3_init)
ip3r_gate_state = rxd.Species(cyt_er_membrane, name="gate", initial=0.8)
h_gate = ip3r_gate_state[cyt_er_membrane]
minf = (ip3[cyt] * rescale_v * v * ca[cyt] / (ip3[cyt] + kip3) /
Ejemplo n.º 5
0
    def __init__(self):

        self.soma = h.Section(name='soma', cell=self)
        self.soma.pt3dclear()
        self.soma.pt3dadd(x, y, z + somaR, 2.0 * somaR)
        self.soma.pt3dadd(x, y, z - somaR, 2.0 * somaR)

        self.dend = h.Section(name='dend', cell=self)
        self.dend.pt3dclear()
        self.dend.pt3dadd(x, y, z - somaR, 2.0 * dendR)
        self.dend.pt3dadd(x, y, z - somaR - dendL, 2.0 * dendR)
        self.dend.nseg = 10

        self.dend.connect(self.soma, 1, 0)
        self.all = [self.soma, self.dend]

        #---------------soma----------------
        #        for mechanism_s in ['h','hNa','hha2', 'IA','kadcr','borgka','Ih','Ihvip', 'kap', 'km' ,'pas', 'Nafcr', 'kdrcr', 'IKscr', 'iCcr', 'kadcr']:
        #           self.soma.insert(mechanism_s)
        for mechanism_s in [
                'extracellular', 'h', 'hNa', 'hha2', 'IA', 'Ih', 'Nasoma',
                'km', 'Ksoma', 'pas', 'k_ion', 'na_ion', 'kap', 'nap', 'kdrcr',
                'Nafcr', 'IKscr'
        ]:
            self.soma.insert(mechanism_s)

        self.soma(0.5).IA.gkAbar = 0.0165
        self.soma(0.5).Ih.gkhbar = 0.00035 * 0.1
        self.soma(0.5).Nasoma.gnasoma = 0.0107 * 1.2
        self.soma(0.5).Nasoma.gl = 1 / Rm
        self.soma(0.5).Nasoma.el = -67
        self.soma(0.5).Ksoma.gksoma = 0.0319 * 1.5
        #print(self.soma.psection())
        self.n_Ksoma = h.Vector().record(self.soma(0.5).Ksoma._ref_n)
        self.h_Nasoma = h.Vector().record(self.soma(0.5).Nasoma._ref_h)
        self.m_Nasoma = h.Vector().record(self.soma(0.5).Nasoma._ref_m)

        self.soma(0.5).h.ghdbar = 0.00005
        self.soma(0.5).h.vhalfl = -73
        self.soma(0.5).Ih.gkhbar = 0.00035 * 0.1
        self.soma(0.5).km.gbar = 0.06
        #self.soma(0.5).borgka.gkabar = 0.00015*4*0.5
        #self.soma(0.5).kadcr.gkabar = 0.003
        self.soma(0.5).hha2.gnabar = 0.007
        self.soma(0.5).hha2.gkbar = 0.007 / 10
        self.soma(0.5).hha2.gl = 0
        self.soma(0.5).hha2.el = -70
        #self.soma(0.5).pas.g = 1/Rm
        #self.soma(0.5).pas.e = -70
        self.soma(0.5).Nafcr.gnafbar = 0.015
        self.soma(0.5).kdrcr.gkdrbar = 0.018
        self.soma(0.5).IKscr.gKsbar = 0.000725
        #self.soma(0.5).iCcr.gkcbar = 0.00003
        #self.soma(0.5).kadcr.gkabar = 0.003

        #print(self.soma.psection())
        #self.n_Ksoma = h.Vector().record(self.soma(0.5).Ksoma._ref_n)
        #self.h_Nasoma = h.Vector().record(self.soma(0.5).Nasoma._ref_h)
        #self.m_Nasoma = h.Vector().record(self.soma(0.5).Nasoma._ref_m)

        self.somaV = h.Vector()
        self.somaV.record(self.soma(0.5)._ref_v)

        #---------------dend----------------

        for mechanism_d in [
                'Nadend', 'Kdend', 'hha_old', 'h', 'hNa', 'IA', 'kap', 'pas',
                'Nafcr', 'kdrcr', 'nap', 'k_ion', 'na_ion', 'Ihvip', 'kad'
        ]:
            self.dend.insert(mechanism_d)
        self.dend(0.5).IA.gkAbar = 0.004 * 1.2
        #self.dend1(0.5).Ih.gkhbar = 0.00035*0.1
        self.dend(0.5).Nadend.gnadend = 2 * 0.0117
        self.dend(0.5).Nadend.gl = 1 / Rm
        self.dend(0.5).Nadend.el = -65
        self.dend(0.5).Kdend.gkdend = 20 * 0.023
        self.dend(0.5).h.ghdbar = 0.00005 * 4
        self.dend(0.5).h.vhalfl = -81
        self.dend(0.5).IA.gkAbar = 0.004 * 1.2
        self.dend(0.5).kad.gkabar = 0
        #self.dend(0.5).km.gbar = 0.06
        #self.dend(0.5).borgka.gkabar = 0.00015*4*0.5
        self.dend(0.5).hha_old.gnabar = 0.007
        self.dend(0.5).hha_old.gkbar = 0.007 / 8.065
        self.dend(0.5).hha_old.el = -70
        self.dend(0.5).hha_old.gl = 0
        #self.dend(0.5).pas.g = 1/20000
        #self.dend(0.5).pas.e = -70

        self.dend(0.5).Nafcr.gnafbar = 0.018 * 5
        self.dend(0.5).kdrcr.gkdrbar = 0.018 * 0.5
        #self.Dn_Kdend = h.Vector().record(self.dend(0.5).Kdend._ref_n)
        #self.Dh_Nadend = h.Vector().record(self.dend(0.5).Nadend._ref_h)
        #self.Dm_Nadend = h.Vector().record(self.dend(0.5).Nadend._ref_m)
        self.dendV = h.Vector()
        self.dendV.record(self.dend(0.5)._ref_v)
        self.k_vec = h.Vector().record(self.soma(0.5)._ref_ik)
        self.na_vec = h.Vector().record(self.soma(0.5)._ref_ina)
        self.na_concentration = h.Vector().record(self.soma(0.5)._ref_nai)
        self.k_concentration = h.Vector().record(self.soma(0.5)._ref_ki)
        self.v_vec = h.Vector().record(self.soma(0.5)._ref_vext[0])

        for sec in self.all:
            Ra = 150
            cm = 1.2

        self.cyt = rxd.Region(self.all,
                              name='cyt',
                              nrn_region='i',
                              dx=1.0,
                              geometry=rxd.FractionalVolume(
                                  0.9, surface_fraction=1.0))
        self.na = rxd.Species([self.cyt],
                              name='na',
                              charge=1,
                              d=1.0,
                              initial=14)
        self.k = rxd.Species([self.cyt],
                             name='k',
                             charge=1,
                             d=1.0,
                             initial=120)
        self.k_i = self.k[self.cyt]
Ejemplo n.º 6
0
cell1.pt3dadd(-20,0,0,10)
cell1.pt3dadd(-10,0,0,10)
cell1.nseg = 11
cell1.insert('pump')

# create cell2 where `x` will be pumped in and accumulate
cell2 = h.Section('cell2')
cell2.pt3dclear()
cell2.pt3dadd(10,0,0,10)
cell2.pt3dadd(20,0,0,10)
cell2.nseg = 11
cell2.insert('pump')

# Where?
# the intracellular spaces
cyt = rxd.Region(h.allsec(), name='cyt', nrn_region='i', geometry=rxd.FractionalVolume(0.9, surface_fraction=1.0))

org = rxd.Region(h.allsec(), name='org', geometry=rxd.FractionalVolume(0.1))

cyt_org_membrane = rxd.Region(h.allsec(), name='mem', geometry = rxd.ScalableBorder(pi/2.0, on_cell_surface=False))


# the extracellular space
ecs = rxd.Extracellular(-55, -55, -55, 55, 55, 55, dx=10, volume_fraction=0.2, tortuosity=1.6)

# Who?
x = rxd.Species([cyt, org, cyt_org_membrane, ecs], name='x', d=1.0, charge=1, initial=0)
Xcyt = x[cyt]
Xorg = x[org]