示例#1
0
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]


# What? - produce X in cell 1
示例#2
0
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,
                        -55,
                        55,
                        55,
                        55,
                        dx=10,
                        volume_fraction=0.2,
                        tortuosity=1.6)
kip3 = 0.15
kact = 0.4
ip3rtau = 2000.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]

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[cyt],ca[er], gleak, gleak, membrane=cyt_er_membrane)

minf = ip3[cyt] * 1000. * ca[cyt] / (ip3[cyt] + kip3) / (1000. * ca[cyt] + kact)
k = gip3r * (minf * h_gate) ** 3

ip3r = rxd.MultiCompartmentReaction(ca[er],ca[cyt], k, k, membrane=cyt_er_membrane)