Пример #1
0
# Set the axial resistance to match the one in the ionchannel.py file
# and set the container to be used for channel creation
squid.Ra = 1
container = squid.parent.path

# Create the external current to be applied to the compartment
squid_pulse = u.createPulse(squid, 'rollingWave', pulse_dur, pulse_amp,
                            pulse_delay1, pulse_delay2)

# Create the data tables necessary to run the model
data = moose.Neutral('/data')
squid_Vm, squid_current = u.createDataTables(squid, data, squid_pulse)

# Create the channels necessary for the giant squid axon and place them in a library
u.createChanLib(libraryName, chan_set, rateParams, CaParams)

# Create copies of the prototype channels and connect them to the
# compartment, along with their conductances
u.addChannelSet(cond_set, libraryName, neuron, compType)
u.add_calcium(libraryName, neuron, Ca_pool_params, compType)
for key in chan_set.keys():
    if ("Ca" in key):
        u.connect_cal2chan(chan_set[key].name, chan_set[key].chan_type, neuron,
                           Ca_pool_params.caName, compType)

# Plot the simulation
simtime = 0.1
simdt = 0.25e-5
plotdt = 0.25e-3
for i in range(10):
Пример #2
0
# Set the axial resistance to match the one in the ionchannel.py file
# and set the container to be used for channel creation
squid.Ra = 1
container = squid.parent.path

# Create the external current to be applied to the compartment
squid_pulse = u.createPulse(squid, 'rollingWave', pulse_dur, pulse_amp,
                            pulse_delay1, pulse_delay2)

# Create the data tables necessary to run the model
data = moose.Neutral('/data')
squid_Vm, squid_current = u.createDataTables(squid, data, squid_pulse)

# Create the channels necessary for the giant squid axon and place them in a library
u.createChanLib('/library', chan_set, rateParams, CaParams)

# Create copies of the prototype channels and connect them to the
# compartment
nachan = moose.copy('/library/Na', container, 'na', 1)
nachan.Gbar = 120e-3 * SA * 1e4  # Gbar_Na = 120 mS/cm^2
moose.connect(nachan, 'channel', squid, 'channel', 'OneToOne')

kchan = moose.copy('/library/K', container, 'k', 1)
kchan.Gbar = 36e-3 * SA * 1e4  # Gbar_K = 36 mS/cm^2
moose.connect(kchan, 'channel', squid, 'channel', 'OneToOne')

# Plot the simulation
simtime = 0.1
simdt = 0.25e-5
plotdt = 0.25e-3