One of them (my main model) is a detailed morphological model of CA1 pyramidal cell created by Poirazi et al.
http://senselab.med.yale.edu/senselab/m ... odel=20212
this model has calcium channels beside different other mechanisms.
The other one is a one compartment model of a presynaptic axon created by Destexhe et al which models the release process and calculates amount of neurotransmitter in the synaptic cleft based on cai.
http://senselab.med.yale.edu/senselab/m ... odel=18198
I'm using the nmda5.hoc file from this model.
Each of these models has their own ion_style dealing with ca_ion.
They works properly when they are separate from each other. When I add the presynaptic axon to the poirazi et al model, the axon does not work after running the simulation. However, my main cell works properly. The error message is as follow:
Code: Select all
A math function was called with argument out of domain
errno=33 during call to mechanism ca_ion
nrniv: errno set during calculation of currents
near line 97
{run()}
^
My Template of the presynaptic axon
Code: Select all
begintemplate Pre_Cell
public axon
create axon
public pSet
proc init() {
v_init = $1
axon {
nseg = 1
diam=10
L=10
insert pas
g_pas=1/5000
e_pas=v_init
insert hh2
ek = -90
gnabar_hh2 = 0.1
gkbar_hh2 = 0.03
insert caL3d
p_caL3d=0.0002
q_caL3d=10
Ra_caL3d=1.6
Rb_caL3d=1.6
insert rel // transmitter release
Ves_rel = 0.01 // conc of vesicles (mM)
Fmax_rel = 0.001 // tot conc of proteins (F and V) (mM)
b_rel = 1e16 // rate cst for Ca++ binding to fusion factor
u_rel = 0.1 // rate cst for Ca++ unbinding
k1_rel = 1000 // rate cst for activation of vesicle
k2_rel = 0.1 // rate cst for deactivation of vesicle
k3_rel = 4 // rate cst for exocytosis
nt_rel = 10000 // number of transmitter molecule per vesicle
kh_rel = 10 // transmitter hydolysis constant
kd_rel = 1e-5
kt_rel = 1e-3 // fast Ca++ removal
depth_rel = 1
taur_rel = 1e10
ion_style("ca_ion", 3, 2, 1, 1, 1)
cai0_ca_ion = kd_rel
}
finitialize(v_init)
}
proc pSet() { //sets the calculated neurotransmiter in the presynaptic region to the postsynaptic receptors
setpointer $o1.C, axon.T_rel(0.5)
}
endtemplate Pre_Cell
Code: Select all
// The goal of this experiment is to evaluate the effect of
//10 random synapses at different locations of the dendritic tree
//load_file("nrngui.hoc")
load_file("../../template/load_templates.hoc")
strdef accstr // not confuse experimental variable bindings with neurophysiological variable bindings
objref econ // Create an experiment object
show_errs=1
debug_lev=1
econ=new ExperimentControl(show_errs,debug_lev)
econ.self_define(econ) // points the object at itself // Why we should point the object to itself?
// Answer: We want to use the objects defined in the ExperimentControl template in the template itself later
econ.morphology_dir = "../../morphology/n123" // Setup morphology directory
econ.generic_dir = "../../experiment/" // Setup directory with cell-setup file
econ.add_lib_dir("Terrence","../../lib") // Setup directory with library functions
if (unix_mac_pc() ==1 ) {
econ.data_dir = "data" // Define directory to save produced data
sprint(econ.syscmd, "mkdir -p %s", econ.data_dir) // make the data directory
system(econ.syscmd)
}
// Setup cell
econ.xopen_geometry_dependent("cell") // load the raw cell morphology
econ.xopen_geometry_dependent("cell-analysis") // load user-defined semantics on morphology
cell_analysis(econ)
printf("Opening cell setup\n")
econ.xopen_generic("cell-setup") // load the cell-setup file (define specific
printf("Opened. Setting up cell\n") // channels, membrane properties etc)
cell_setup(econ)
// Set simulation parameters for the experiment
econ.defvar("Simulation Control", "tstop", "200", "Defines when the simulation stops.")
econ.defvar("Simulation Control", "dt", "0.1", "Timestep")
econ.defvar("Simulation Control", "steps_per_ms", "1", "How many points are plotted per ms")
setdt()
// Create basic graphics
econ.xopen_library("Terrence","basic-graphics") // open graphics library file
//sections used in BPAP figure
addgraph_2("soma.v(0.5)", 0,tstop,-72,-68)
addgraph_2("apical_dendrite[46].v(0.5)",0,tstop,-72,-65) // 156.96 um from soma
addgraph_2("apical_dendrite[104].v(0.5)", 0,tstop,-72,-62) // 423 um from soma
// Define directories for different cases tested
strdef data_dir
data_dir = "../../experiment/Synaptic-Summation" // Define directory to save produced data for dendrite 64 stimulation
if (unix_mac_pc() ==1 ) {
sprint(econ.syscmd, "mkdir -p %s", data_dir) // make directory
system(econ.syscmd)
}
//****************************************************************************
//Insert synaptic inputs
//****************************************************************************
//----------------------------------------------------------------------------
// insert postsynaptic mechansisms
//----------------------------------------------------------------------------
NMDA_AMPA_RATIO = 1/5 //AMPA conductance 5X NMDA conductance
AMPA_GMAX = 1
NMDA_GMAX = AMPA_GMAX * NMDA_AMPA_RATIO
synaps_numbers = 10 //Total amount of synapses
//-------------------------------------
objectvar ampa[synaps_numbers], nmda[synaps_numbers]
objectvar random_sec, random_x
random_sec = new Random() //random # generator used to select the sections
random_x = new Random() //random # generator used to select the position of synpase of each section
random_sec.ACG(.5,98) //we used different seeds for randomness
random_x.ACG(.75,98)
for i=0, (synaps_numbers-1) {
ampa[i] = new AMPA5()
nmda[i] = new NMDA10()
str_lm_sec = int(random_sec.uniform(0, n_str_lm_list-0.001))
x = random_x.uniform(0,1)
str_lm_ref[str_lm_sec].sec ampa[i].loc(x)
str_lm_ref[str_lm_sec].sec nmda[i].loc(x)
ampa[i].gmax = AMPA_GMAX //(pS)
nmda[i].gmax = NMDA_GMAX
}
//-------------------------------------------------------------
//control panel of nmda10 channel
//-------------------------------------------------------------
Rb_NMDA10 = 5000e-3 //(/mM /ms) : binding
Ru_NMDA10 = 5.5e-3 //(/ms) : unbinding
Rd_NMDA10 = 8.4e-3 //(/ms) : desensitization
Rr_NMDA10 = 1.8e-3 //(/ms) : resensitization
Ro_NMDA10 = 46.5e-3 //(/ms) : opening
Rc_NMDA10 = 91.6e-3 //(/ms) : closing
RBb_NMDA10 = 5000e-3 //(/mM /ms) : Blocked binding
RBu_NMDA10 = 82e-3 //(/ms) : Blocked unbinding
RBd_NMDA10 = 8.4e-3 //(/ms) : Blocked desensitization
RBr_NMDA10 = 1.8e-3 //(/ms) : Blocked resenditization
RBo_NMDA10 = 46e-3 //(/ms) : Blocked opening
RBc_NMDA10 = 270e-3 //(/ms) : Blocked closing
//--------------------------------------------------------------
//Creating Presynaptic Cell
//--------------------------------------------------------------
objref PRE, stim
PRE = new Pre_Cell(v_init)
//would enable the synapse to observe the amount of neurotransmiter in the synaptic cleft
//thus this functon connects the postsynaptic mechanism with presynaptic cells
for i=0, (synaps_numbers-1) {
PRE.pSet(ampa[i])
PRE.pSet(nmda[i])
}
PRE.axon stim = new IClamp(.5)
stim.del = 10
stim.dur = 190 // increase stim.dur to get a burst of presynaptic spikes
stim.amp = 0.01
Code: Select all
forall if(ismembrane("ca_ion")) {
eca = 140
ion_style("ca_ion",0,1,0,0,0)
vshift_ca = 0
}