A multilayer cortical model to study seizure propagation across microdomains (Basu et al. 2015)

 Download zip file 
Help downloading and running models
Accession:206238
A realistic neural network was used to simulate a region of neocortex to obtain extracellular LFPs from ‘virtual micro-electrodes’ and produce test data for comparison with multisite microelectrode recordings. A model was implemented in the GENESIS neurosimulator. A simulated region of cortex was represented by layers 2/3, 5/6 (interneurons and pyramidal cells) and layer 4 stelate cells, spaced at 25 µm in each horizontal direction. Pyramidal cells received AMPA and NMDA inputs from neighboring cells at the basal and apical dendrites. The LFP data was generated by simulating 16-site electrode array with the help of ‘efield’ objects arranged at the predetermined positions with respect to the surface of the simulated network. The LFP for the model is derived from a weighted average of the current sources summed over all cellular compartments. Cell models were taken from from Traub et al. (2005) J Neurophysiol 93(4):2194-232.
References:
1 . Basu I, Kudela P, Korzeniewska A, Franaszczuk PJ, Anderson WS (2015) A study of the dynamics of seizure propagation across micro domains in the vicinity of the seizure onset zone. J Neural Eng 12:046016 [PubMed]
2 . Basu I, Kudela P, Anderson WS (2014) Determination of seizure propagation across microdomains using spectral measures of causality. Conf Proc IEEE Eng Med Biol Soc 2014:6349-52 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Neocortex;
Cell Type(s): Neocortex U1 L2/6 pyramidal intratelencephalic GLU cell; Neocortex U1 L5B pyramidal pyramidal tract GLU cell; Thalamus reticular nucleus GABA cell; Neocortex spiking low threshold (LTS) neuron; Neocortex spiking regular (RS) neuron; Neocortex layer 2-3 interneuron; Neocortex layer 5 interneuron;
Channel(s): I Na,p; I Na,t; I K; I A; I M; I h; I K,Ca; I A, slow; I L high threshold; I T low threshold; I Calcium;
Gap Junctions: Gap junctions;
Receptor(s): AMPA; GabaA; NMDA;
Gene(s):
Transmitter(s): Glutamate; Gaba; Amino Acids;
Simulation Environment: GENESIS;
Model Concept(s): Activity Patterns; Epilepsy;
Implementer(s): Anderson, WS ; Kudela, Pawel ;
Search NeuronDB for information about:  Thalamus reticular nucleus GABA cell; Neocortex U1 L5B pyramidal pyramidal tract GLU cell; Neocortex U1 L2/6 pyramidal intratelencephalic GLU cell; GabaA; AMPA; NMDA; I Na,p; I Na,t; I L high threshold; I T low threshold; I A; I K; I M; I h; I K,Ca; I Calcium; I A, slow; Amino Acids; Gaba; Glutamate;
/
BasuEtAl2015
axonaldelays.g
B23FS.g
B23FS_B23FS.g
B23FS_B23FS_Gap.g
B23FS_B23FS_TraubGap.g
B23FS_C23FS.g
B23FS_I23LTS.g
B23FS_P23FRBa.g
B23FS_P23RSa.g
B23FS_P23RSb.g
B23FS_P23RSc.g
B23FS_P23RSd.g
B23FS_raninput.g
B23FS_ST4RS.g
B23FS_synapsedefs.g
B23FScell3Dpk.p
B23FSchanpk.g
B23FSprotodefs.g
B23FSsyncond.g
B5FS.g
B5FS_B5FS.g
B5FS_B5FS_Gap.g
B5FS_B5FS_TraubGap.g
B5FS_C5FS.g
B5FS_I5LTS.g
B5FS_P5IBa.g
B5FS_P5IBb.g
B5FS_P5IBc.g
B5FS_P5IBd.g
B5FS_P5RSa.g
B5FS_P6RSa.g
B5FS_P6RSb.g
B5FS_P6RSc.g
B5FS_P6RSd.g
B5FS_raninput.g
B5FS_ST4RS.g
B5FS_synapsedefs.g
B5FScell3Dpk.p
B5FSchanpk.g
B5FSprotodefs.g
B5FSsyncond.g
BinarySpikeClasswrite.g
C23FS.g
C23FS_P23FRBa.g
C23FS_P23RSa.g
C23FS_P23RSb.g
C23FS_P23RSc.g
C23FS_P23RSd.g
C23FS_P5IBa.g
C23FS_P5IBb.g
C23FS_P5IBc.g
C23FS_P5IBd.g
C23FS_P5RSa.g
C23FS_P6RSa.g
C23FS_P6RSb.g
C23FS_P6RSc.g
C23FS_P6RSd.g
C23FS_raninput.g
C23FS_ST4RS.g
C23FS_synapsedefs.g
C23FScell3Dpk.p
C23FSchanpk.g
C23FSprotodefs.g
C23FSsyncond.g
C5FS.g
C5FS_P23FRBa.g
C5FS_P23RSa.g
C5FS_P23RSb.g
C5FS_P23RSc.g
C5FS_P23RSd.g
C5FS_P5IBa.g
C5FS_P5IBb.g
C5FS_P5IBc.g
C5FS_P5IBd.g
C5FS_P5RSa.g
C5FS_P6RSa.g
C5FS_P6RSb.g
C5FS_P6RSc.g
C5FS_P6RSd.g
C5FS_raninput.g
C5FS_ST4RS.g
C5FS_synapsedefs.g
C5FScell3Dpk.p
C5FSchanpk.g
C5FSprotodefs.g
C5FSsyncond.g
celldefs.g
compartments.g *
constants.g
Gapdefs.g
GenrrunIshita
hosts144
hosts81
I23LTS.g
I23LTS_B23FS.g
I23LTS_B5FS.g
I23LTS_C23FS.g
I23LTS_C5FS.g
I23LTS_I23LTS.g
I23LTS_I23LTS_Gap.g
I23LTS_I23LTS_TraubGap.g
I23LTS_I5LTS.g
I23LTS_P23FRBa.g
I23LTS_P23RSa.g
I23LTS_P23RSb.g
I23LTS_P23RSc.g
I23LTS_P23RSd.g
I23LTS_P5IBa.g
I23LTS_P5IBb.g
I23LTS_P5IBc.g
I23LTS_P5IBd.g
I23LTS_P5RSa.g
I23LTS_P6RSa.g
I23LTS_P6RSb.g
I23LTS_P6RSc.g
I23LTS_P6RSd.g
I23LTS_raninput.g
I23LTS_ST4RS.g
I23LTS_synapsedefs.g
I23LTScell3Dpk.p
I23LTSchanpk.g
I23LTSprotodefs.g
I23LTSsyncond.g
I5LTS.g
I5LTS_B23FS.g
I5LTS_B5FS.g
I5LTS_C23FS.g
I5LTS_C5FS.g
I5LTS_I23LTS.g
I5LTS_I5LTS.g
I5LTS_I5LTS_Gap.g
I5LTS_I5LTS_TraubGap.g
I5LTS_P23FRBa.g
I5LTS_P23RSa.g
I5LTS_P23RSb.g
I5LTS_P23RSc.g
I5LTS_P23RSd.g
I5LTS_P5IBa.g
I5LTS_P5IBb.g
I5LTS_P5IBc.g
I5LTS_P5IBd.g
I5LTS_P5RSa.g
I5LTS_P6RSa.g
I5LTS_P6RSb.g
I5LTS_P6RSc.g
I5LTS_P6RSd.g
I5LTS_raninput.g
I5LTS_ST4RS.g
I5LTS_synapsedefs.g
I5LTScell3Dpk.p
I5LTSchanpk.g
I5LTSprotodefs.g
I5LTSsyncond.g
icons.g *
LFP16s.g
LFP8s.g
LFP8sASCIIwrite.g
LFPlist
LFPmultiarray.g
LFPmultiarrayASCIIwrite.g
ModelDescription.pdf
mvapich2_pgenesis_command
Neocortex.g
Neosyn_utils.g
netdefs.g
netparams.g
nodes
nodes4
nRT.g
nRT_nRT.g
nRT_nRT_Gap.g
nRT_nRT_TraubGap.g
nRT_raninput.g
nRT_synapsedefs.g
nRT_TCR.g
nRTcellpk.p
nRTchanpk.g
nRTprotodefs.g
nRTsyncond.g
nxpgenesis.out
orient_sim.g
P23FRBa.g
P23FRBa_B23FS.g
P23FRBa_B5FS.g
P23FRBa_C23FS.g
P23FRBa_C5FS.g
P23FRBa_I23LTS.g
P23FRBa_I5LTS.g
P23FRBa_P23FRBa.g
P23FRBa_P23FRBa_Gap.g
P23FRBa_P23RSa.g
P23FRBa_P23RSb.g
P23FRBa_P23RSc.g
P23FRBa_P23RSd.g
P23FRBa_P5IBa.g
P23FRBa_P5IBb.g
P23FRBa_P5IBc.g
P23FRBa_P5IBd.g
P23FRBa_P5RSa.g
P23FRBa_P6RSa.g
P23FRBa_P6RSb.g
P23FRBa_P6RSc.g
P23FRBa_P6RSd.g
P23FRBa_raninput.g
P23FRBa_ST4RS.g
P23FRBa_synapsedefs.g
P23FRBacell3Dpk.p
P23FRBachanpk.g
P23FRBaprotodefs.g
P23RSa.g
P23RSa_B23FS.g
P23RSa_B5FS.g
P23RSa_C23FS.g
P23RSa_C5FS.g
P23RSa_I23LTS.g
P23RSa_I5LTS.g
P23RSa_output.g
P23RSa_P23FRBa.g
P23RSa_P23FRBa_Gap.g
P23RSa_P23FRBa_TraubGap.g
P23RSa_P23RSa.g
P23RSa_P23RSa_Gap.g
P23RSa_P23RSb.g
P23RSa_P23RSb_Gap.g
P23RSa_P23RSc.g
P23RSa_P23RSc_Gap.g
P23RSa_P23RSd.g
P23RSa_P23RSd_Gap.g
P23RSa_P5IBa.g
P23RSa_P5IBb.g
P23RSa_P5IBc.g
P23RSa_P5IBd.g
P23RSa_P5RSa.g
P23RSa_P6RSa.g
P23RSa_P6RSb.g
P23RSa_P6RSc.g
P23RSa_P6RSd.g
P23RSa_raninput.g
P23RSa_ST4RS.g
P23RSa_synapsedefs.g
P23RSacell3Dpk.p
P23RSachanpk.g
P23RSaprotodefs.g
P23RSb.g
P23RSb_B23FS.g
P23RSb_B5FS.g
P23RSb_C23FS.g
P23RSb_C5FS.g
P23RSb_I23LTS.g
P23RSb_I5LTS.g
P23RSb_P23FRBa.g
P23RSb_P23FRBa_Gap.g
P23RSb_P23FRBa_TraubGap.g
P23RSb_P23RSa.g
P23RSb_P23RSb.g
P23RSb_P23RSb_Gap.g
P23RSb_P23RSc.g
P23RSb_P23RSc_Gap.g
P23RSb_P23RSd.g
P23RSb_P23RSd_Gap.g
P23RSb_P5IBa.g
P23RSb_P5IBb.g
P23RSb_P5IBc.g
P23RSb_P5IBd.g
P23RSb_P5RSa.g
P23RSb_P6RSa.g
P23RSb_P6RSb.g
P23RSb_P6RSc.g
P23RSb_P6RSd.g
P23RSb_raninput.g
P23RSb_ST4RS.g
P23RSb_synapsedefs.g
P23RSbcell3Dpk.p
P23RSbchanpk.g
P23RSbprotodefs.g
P23RSc.g
P23RSc_B23FS.g
P23RSc_B5FS.g
P23RSc_C23FS.g
P23RSc_C5FS.g
P23RSc_I23LTS.g
P23RSc_I5LTS.g
P23RSc_P23FRBa.g
P23RSc_P23FRBa_Gap.g
P23RSc_P23FRBa_TraubGap.g
P23RSc_P23RSa.g
P23RSc_P23RSb.g
P23RSc_P23RSc.g
P23RSc_P23RSc_Gap.g
P23RSc_P23RSd.g
P23RSc_P23RSd_Gap.g
P23RSc_P5IBa.g
P23RSc_P5IBb.g
P23RSc_P5IBc.g
P23RSc_P5IBd.g
P23RSc_P5RSa.g
P23RSc_P6RSa.g
P23RSc_P6RSb.g
P23RSc_P6RSc.g
P23RSc_P6RSd.g
P23RSc_raninput.g
P23RSc_ST4RS.g
P23RSc_synapsedefs.g
P23RSccell3Dpk.p
P23RScchanpk.g
P23RScprotodefs.g
P23RSd.g
P23RSd_B23FS.g
P23RSd_B5FS.g
P23RSd_C23FS.g
P23RSd_C5FS.g
P23RSd_I23LTS.g
P23RSd_I5LTS.g
P23RSd_P23FRBa.g
P23RSd_P23FRBa_Gap.g
P23RSd_P23FRBa_TraubGap.g
P23RSd_P23RSa.g
P23RSd_P23RSb.g
P23RSd_P23RSc.g
P23RSd_P23RSd.g
P23RSd_P23RSd_Gap.g
P23RSd_P5IBa.g
P23RSd_P5IBb.g
P23RSd_P5IBc.g
P23RSd_P5IBd.g
P23RSd_P5RSa.g
P23RSd_P6RSa.g
P23RSd_P6RSb.g
P23RSd_P6RSc.g
P23RSd_P6RSd.g
P23RSd_raninput.g
P23RSd_ST4RS.g
P23RSd_synapsedefs.g
P23RSdcell3Dpk.p
P23RSdchanpk.g
P23RSdprotodefs.g
P23RSsyncond.g
P5IBa.g
P5IBa_B23FS.g
P5IBa_B5FS.g
P5IBa_C23FS.g
P5IBa_C5FS.g
P5IBa_I23LTS.g
P5IBa_I5LTS.g
P5IBa_P23FRBa.g
P5IBa_P23RSa.g
P5IBa_P23RSb.g
P5IBa_P23RSc.g
P5IBa_P23RSd.g
P5IBa_P5IBa.g
P5IBa_P5IBa_Gap.g
P5IBa_P5IBb.g
P5IBa_P5IBb_Gap.g
P5IBa_P5IBc.g
P5IBa_P5IBc_Gap.g
P5IBa_P5IBd.g
P5IBa_P5IBd_Gap.g
P5IBa_P5RSa.g
P5IBa_P5RSa_Gap.g
P5IBa_P6RSa.g
P5IBa_P6RSb.g
P5IBa_P6RSc.g
P5IBa_P6RSd.g
P5IBa_raninput.g
P5IBa_ST4RS.g
P5IBa_synapsedefs.g
P5IBacell3Dpk.p
P5IBachanpk.g
P5IBaprotodefs.g
P5IBb.g
P5IBb_B23FS.g
P5IBb_B5FS.g
P5IBb_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d_P23RSb.g
P6RSd_P23RSc.g
P6RSd_P23RSd.g
P6RSd_P5IBa.g
P6RSd_P5IBb.g
P6RSd_P5IBc.g
P6RSd_P5IBd.g
P6RSd_P5RSa.g
P6RSd_P6RSa.g
P6RSd_P6RSb.g
P6RSd_P6RSc.g
P6RSd_P6RSd.g
P6RSd_P6RSd_Gap.g
P6RSd_raninput.g
P6RSd_ST4RS.g
P6RSd_synapsedefs.g
P6RSd_TCR.g
P6RSdcell3Dpk.p
P6RSdchanpk.g
P6RSdprotodefs.g
P6RSsyncond.g
pgenesis_command
protodefs.g
protospikeB23FS.g
protospikeB5FS.g
protospikeC23FS.g
protospikeC5FS.g
protospikeI23LTS.g
protospikeI5LTS.g
protospikenRT.g
protospikeP23FRBa.g
protospikeP23RSa.g
protospikeP23RSb.g
protospikeP23RSc.g
protospikeP23RSd.g
protospikeP5IBa.g
protospikeP5IBb.g
protospikeP5IBc.g
protospikeP5IBd.g
protospikeP5RSa.g
protospikeP6RSa.g
protospikeP6RSb.g
protospikeP6RSc.g
protospikeP6RSd.g
protospikeST4RS.g
protospikeTCR.g
randominputdefs.g
spikedefs.g
ST4RS.g
ST4RS_B23FS.g
ST4RS_B5FS.g
ST4RS_C23FS.g
ST4RS_C5FS.g
ST4RS_I23LTS.g
ST4RS_I5LTS.g
ST4RS_P23FRBa.g
ST4RS_P23RSa.g
ST4RS_P23RSb.g
ST4RS_P23RSc.g
ST4RS_P23RSd.g
ST4RS_P5IBa.g
ST4RS_P5IBb.g
ST4RS_P5IBc.g
ST4RS_P5IBd.g
ST4RS_P5RSa.g
ST4RS_P6RSa.g
ST4RS_P6RSb.g
ST4RS_P6RSc.g
ST4RS_P6RSd.g
ST4RS_raninput.g
ST4RS_ST4RS.g
ST4RS_ST4RS_Gap.g
ST4RS_synapsedefs.g
ST4RScell3Dpk.p
ST4RSchanpk.g
ST4RSprotodefs.g
ST4RSsyncond.g
synapticdelays.g *
synapticprobsTraub.g
synchansB23FS.g *
synchansB5FS.g *
synchansC23FS.g *
synchansC5FS.g *
synchansI23LTS.g *
synchansI5LTS.g *
synchansnRT.g *
synchansP23FRBa.g *
synchansP23RSa.g *
synchansP23RSb.g *
synchansP23RSc.g *
synchansP23RSd.g *
synchansP5IBa.g *
synchansP5IBb.g *
synchansP5IBc.g *
synchansP5IBd.g *
synchansP5RSa.g *
synchansP6RSa.g *
synchansP6RSb.g *
synchansP6RSc.g *
synchansP6RSd.g *
synchansSPIKEs.g *
synchansSPIKEs_base.g
synchansST4RS.g
synchansTCR.g *
syncond.g
syncond2.g
TCR.g
TCR_B23FS.g
TCR_B5FS.g
TCR_C23FS.g
TCR_C5FS.g
TCR_nRT.g
TCR_P23FRBa.g
TCR_P23RSa.g
TCR_P23RSb.g
TCR_P23RSc.g
TCR_P23RSd.g
TCR_P5IBa.g
TCR_P5IBb.g
TCR_P5IBc.g
TCR_P5IBd.g
TCR_P5RSa.g
TCR_P6RSa.g
TCR_P6RSb.g
TCR_P6RSc.g
TCR_P6RSd.g
TCR_raninput.g
TCR_ST4RS.g
TCR_synapsedefs.g
TCRcellpk.p
TCRchanpk.g
TCRprotodefs.g
TCRsyncond.g
                            
//genesis

/* FILE INFORMATION
** The 1991 Traub set of voltage and concentration dependent channels
** Implemented as tabchannels by : Dave Beeman
**      R.D.Traub, R. K. S. Wong, R. Miles, and H. Michelson
**	Journal of Neurophysiology, Vol. 66, p. 635 (1991)
**
** This file depends on functions and constants defined in defaults.g
** As it is also intended as an example of the use of the tabchannel
** object to implement concentration dependent channels, it has extensive
** comments.  Note that the original units used in the paper have been
** converted to SI (MKS) units.  Also, we define the ionic equilibrium 
** potentials relative to the resting potential, EREST_ACT.  In the
** paper, this was defined to be zero.  Here, we use -0.060 volts, the
** measured value relative to the outside of the cell.
*/

/* November 1999 update for GENESIS 2.2: Previous versions of this file used
   a combination of a table, tabgate, and vdep_channel to implement the
   Ca-dependent K Channel - K(C).  This new version uses the new tabchannel
   "instant" field, introduced in GENESIS 2.2, to implement an
   "instantaneous" gate for the multiplicative Ca-dependent factor in the
   conductance.   This allows these channels to be used with the fast
   hsolve chanmodes > 1.
*/

// Now updated for Traub et al. J Neurophysiol 2003;89:909-921.
// And for LTS and FS interneurons - Cunningham et al. PNAS 2004;101:7152-7157.

// CONSTANTS
float EREST_ACT = -0.070 /* cell resting potential */
float ENAI5LTS = 0.110 + EREST_ACT // 0.050
float EKI5LTS = -0.040 + EREST_ACT // -0.100
float ECAI5LTS = 0.185 + EREST_ACT // 0.125
float EARI5LTS = 0.020 + EREST_ACT // -0.040
float SOMA_A = 3.320e-9       // soma area in square meters

/*
For these channels, the maximum channel conductance (Gbar) has been
calculated using the CA3 soma channel conductance densities and soma
area.  Typically, the functions which create these channels will be used
to create a library of prototype channels.  When the cell reader creates
copies of these channels in various compartments, it will set the actual
value of Gbar by calculating it from the cell parameter file.
*/

//========================================================================
//                Tabchannel gNa-transient, gNa(F) 2005/03
//========================================================================
function make_NaF19
        if ({exists NaF19})
            return
        end
        create tabchannel NaF19
        setfield NaF19 \ 
            Ek              0.05 \
            Ik              0  \
            Xpower          3 \
            Ypower          1
        
        setfield NaF19 \
            Gbar 1 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call NaF19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            //  tau
            float tau
            v = v * 1000 // v to units of equation
            if ({ v -2.5 } < -30 )
                tau =  0.0125 + 0.1525 * { exp { {{v - 2.5} + 30} / 10} } 
            else
                tau =  0.02 + 0.145 * { exp { -1 * {{v - 2.5} + 30} / 10} }
            end
            v = v * 0.001 // reset v
            
            // correct units of tau
            tau = tau * 0.001

            //  inf
            float inf
            v = v * 1000 // v to units of equation
            inf =  1 / { 1 + {exp { { -1 * {v - 2.5} - 38} / 10}} } 
            v = v * 0.001 // reset v
            
            // alpha and beta 
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield NaF19 X_A->table[{i}] {alpha}
            setfield NaF19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield NaF19 X_A->calc_mode 1 X_B->calc_mode 1
                    
        // Y table for gate h
        float dv = ({v_max} - {v_min})/{tab_divs}
        call NaF19 TABCREATE Y {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)

            // tau
            float tau
            v = v * 1000 // v to units of equation
            tau = 0.225 + 1.125 / { 1 + { exp {{v + 37} / 15} } }
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            //  inf
            float inf
            v = v * 1000 // v to units of equation
            inf = 1 / { 1 + {exp {{v + 58.3} / 6.7}} }
            v = v * 0.001 // reset v
            
            // alpha and beta
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield NaF19 Y_A->table[{i}] {alpha}
            setfield NaF19 Y_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
        setfield NaF19 Y_A->calc_mode 1 Y_B->calc_mode 1
end

//========================================================================
//        Tabchannel gNa-persistent (non-inactivating), gNa(P) 2005/03
//========================================================================
function make_NaP19
        if ({exists NaP19})
            return
        end
        create tabchannel NaP19
        setfield NaP19 \ 
            Ek              0.05 \
            Ik              0  \
            Xpower          3
        
        setfield NaP19 \
            Gbar 32 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call NaP19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            // tau
            float tau
            v = v * 1000 // v to units of equation
            if ({v - 2.5} < -30 )
                tau =  0.025 + 0.14 * { exp { {{v - 2.5} + 30} / 10} } 
            else
                tau =  0.02 + 0.145 * { exp { -1 * {{v -2.5} + 30} / 10 } }
            end
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            v = v * 1000 // v to units of equation
            inf =  1 / { 1 + {exp { { -1 * {v - 2.5} - 38} / 10}} } 
            v = v * 0.001 // reset v

            // alpha and beata
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield NaP19 X_A->table[{i}] {alpha}
            setfield NaP19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
        setfield NaP19 X_A->calc_mode 1 X_B->calc_mode 1
end

//========================================================================
//        Tabchannel Anomalous Rectifier, gAR 2005/03
//========================================================================
function make_AR19
        if ({exists AR19})
            return
        end
        create tabchannel AR19
        setfield AR19 \ 
            Ek              -0.04 \
            Ik              0  \
            Xpower          1
        setfield AR19 \
            Gbar 2.5 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call AR19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            float tau
            v = v * 1000 // v to units of equation
            tau = 1 /{{exp {-14.6 - {0.086 * v} }} + {exp {-1.87 + {0.07 * v}}}}
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            // A = 1, B = 5.5, Vhalf = -75 in physiological units
            // A = 1, B = 0.0055, Vhalf = -0.075

            inf = 1 / ( {exp {(v + 0.075) / 0.0055}} + 1)
        
            // alpha and beta 
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            
            setfield AR19 X_A->table[{i}] {alpha}
            setfield AR19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield AR19 X_A->calc_mode 1 X_B->calc_mode 1
end

//========================================================================
//                Tabchannel gK-delayed rectifier, gK(DR) 2005/03
//========================================================================
function make_KDR19
        if ({exists KDR19})
            return
        end
        create tabchannel KDR19
        setfield KDR19 \ 
            Ek              -0.1 \
            Ik              0  \
            Xpower          4
        
        setfield KDR19 \
            Gbar 1250 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call KDR19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            // tau
            float tau
            v = v * 1000 // v to units of equation
            if (v <= -10 )
                tau =  0.25 + 4.35 * {exp {{ v + 10 }/10}} 
            else
                tau =  0.25 + 4.35 * {exp {{- v - 10}/ 10}}
            end
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            //  inf
            float inf
            // A = 1, B = -11.5, Vhalf = -27, in physiological units
            // A = 1, B = -0.0115, Vhalf = -0.027
            inf = 1 / ( {exp {(v + 0.027) / -0.0115}} + 1)
        
            // alpha and beta
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield KDR19 X_A->table[{i}] {alpha}
            setfield KDR19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield KDR19 X_A->calc_mode 1 X_B->calc_mode 1
end

//========================================================================
//                Tabchannel gK-transient, gK(A) 2005/03
//========================================================================
function make_KA19
        if ({exists KA19})
            return
        end
        create tabchannel KA19
        setfield KA19 \ 
            Ek              -0.1 \
            Ik              0  \
            Xpower          4 \
            Ypower          1
        
        setfield KA19 \
            Gbar 300 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call KA19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)

            //  tau
            float tau
            v = v * 1000 // v to units of equation
            tau = 0.185 + 0.5 / {{exp {{ v + 35.8 }/19.7}} + {exp {{-v - 79.7}/12.7}}}
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            // A = 1, B = -8.5, Vhalf = -60 in physiological units
            // A = 1,  B = -0.0085, Vhalf = -0.06
            inf = 1 / ( {exp {(v + 0.06) / -0.0085}} + 1)

            // alpha and beta
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield KA19 X_A->table[{i}] {alpha}
            setfield KA19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield KA19 X_A->calc_mode 1 X_B->calc_mode 1
                    
        // Y table for gate h
        float dv = ({v_max} - {v_min})/{tab_divs}
        call KA19 TABCREATE Y {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            //  tau
            float tau
            v = v * 1000 // v to units of equation
            if (v < -63.0 )
                tau =  0.5 / {{exp {{ v + 46 }/5}} + {exp {{ -v - 238 }/37.5}}} 
            else
                tau =  9.5
            end
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            //  inf
            float inf
            // A = 1, B = 6, Vhalf = -78 in physiological units
            // A = 1, B = 0.006, Vhalf = -0.078
            inf = 1 / ( {exp {(v + 0.078) / 0.006}} + 1)
        
            // alpha and beta 
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield KA19 Y_A->table[{i}] {alpha}
            setfield KA19 Y_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield KA19 Y_A->calc_mode 1 Y_B->calc_mode 1
end

//========================================================================
//                Tabchannel gK2-slow, gK2 2005/03
//========================================================================
function make_K219
        if ({exists K219})
            return
        end
        create tabchannel K219
        setfield K219 \ 
            Ek              -0.1 \
            Ik              0  \
            Xpower          1 \
            Ypower          1
        setfield K219 \
            Gbar 1 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call K219 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            //  tau
            float tau
            v = v * 1000 // v to units of equation
            tau = 4.95 + 0.5 / { {exp { {v - 81} / 25.6}} + {exp { {- v - 132} / 18 }}}
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            // A = 1, B = -17, Vhalf = -10, in physiological units
            // A = 1, B = -0.017, Vhalf = -0.01
            inf = 1 / ( {exp {(v + 0.01) / -0.017}} + 1)
        
            // alpha and beta
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield K219 X_A->table[{i}] {alpha}
            setfield K219 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield K219 X_A->calc_mode 1 X_B->calc_mode 1
                    
        // Y table for gate h
        float dv = ({v_max} - {v_min})/{tab_divs}
        call K219 TABCREATE Y {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            // tau
            float tau
            v = v * 1000 // v to units of equation
            tau = 60 + 0.5 / {{exp {{ v - 1.33 }/200}} + {exp {{- v - 130}/ 7.1}}}
            v = v * 0.001 // reset v
            
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            // A = 1, B = 10.6, Vhalf = -58 in physiological units
            // A = 1, B = 0.0106, Vhalf = -0.058
            inf = 1 / ( {exp {(v + 0.058) / 0.0106}} + 1)
        
            // alpha & beta 
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield K219 Y_A->table[{i}] {alpha}
            setfield K219 Y_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield K219 Y_A->calc_mode 1 Y_B->calc_mode 1
end

//========================================================================
//           Tabchannel gK-muscarinic receptor supressed, gK(M) 2005/03
//========================================================================
function make_KM19
        if ({exists KM19})
            return
        end
        create tabchannel KM19
        setfield KM19 \ 
            Ek              -0.1 \
            Ik              0  \
            Xpower          1
        
        setfield KM19 \
            Gbar 75 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call KM19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            //  alpha
            float alpha
            // A = 0.02, B = -5, Vhalf = -20 in physiological units
            // A = 20, B = -0.005, Vhalf = -0.02
            alpha = 20 / ( {exp {(v + 0.02) / -0.005}} + 1)
        
            //  beta
            float beta
            // A = 0.01, B = -18, Vhalf = -43, in physiological units
            // A = 10, B = -0.018, Vhalf = -0.043
            beta = 10 * {exp {(v + 0.043) / -0.018}}
        

            // alpha and beta 
            float tau = 1/(alpha + beta)
            setfield KM19 X_A->table[{i}] {alpha}
            setfield KM19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
        setfield KM19 X_A->calc_mode 1 X_B->calc_mode 1
end

//========================================================================
//          Tabchannel gCa(L)-low threshold, transient, gCa(L) 2005/03
//========================================================================
function make_CaL19
        if ({exists CaL19})
            return
        end
        create tabchannel CaL19
        setfield CaL19 \ 
            Ek              0.125 \
            Ik              0  \
            Xpower          2 \
            Ypower          1
        setfield CaL19 \
            Gbar 1 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call CaL19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)

            // tau
            float tau
            v = v * 1000 // v to units of equation
            tau = 1 + 0.33 / { {exp {{v + 27} / 10 }} + {exp {{- v - 102} / 15}} }
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            // A = 1, B = -7.4, Vhalf = -52  in  physiological units
            // A = 1, B = -0.0074, Vhalf = -0.052

            inf = 1 / ( {exp {(v + 0.052) / -0.0074}} + 1)
        
            // alpha and beta 
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            
            setfield CaL19 X_A->table[{i}] {alpha}
            setfield CaL19 X_B->table[{i}] {alpha + beta}
            v = v + dv

        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield CaL19 X_A->calc_mode 1 X_B->calc_mode 1
                    
        // Y table for gate h
        float dv = ({v_max} - {v_min})/{tab_divs}
        call CaL19 TABCREATE Y {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)

            //  tau
            float tau
                
            v = v * 1000 // v to units of equation
            tau = 28.3 + 0.33 / {{exp {{ v + 48}/ 4}} + {exp { { -v - 407} / 50 }} } 
            v = v * 0.001 // reset v
            // correct units of tau
            tau = tau * 0.001

            // inf
            float inf
            // A = 1, B = 5, Vhalf = -80 in physiological units
            // A = 1,  B = 0.005, Vhalf = -0.08
            inf = 1 / ( {exp {(v + 0.08) / 0.005}} + 1)
        
            // alpha and beta
            float alpha
            float beta
            alpha = inf / tau   
            beta = (1- inf)/tau
            setfield CaL19 Y_A->table[{i}] {alpha}
            setfield CaL19 Y_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
            
        setfield CaL19 Y_A->calc_mode 1 Y_B->calc_mode 1
end

//==========================================================================
//            Tabchannel gCaH-high threshold calcium, gCa(L) "long" 2003/05
//==========================================================================
function make_CaH19
        if ({exists CaH19})
            return
        end
        create tabchannel CaH19
        setfield CaH19 \ 
            Ek              0.125 \
            Ik              0  \
            Xpower          2
        setfield CaH19 \
            Gbar 5 \
            Gk              0 
        float tab_divs = 741
        float v_min = -0.12
        float v_max = 0.06
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call CaH19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)

            float alpha
            // A = 1.6, B = -13.888889, Vhalf = 5  in physiological units
            // A = 1600, B = -0.013888889000000001, Vhalf = 0.005

            alpha = 1600 / ( {exp {(v - 0.005) / -0.013888889000000001}} + 1)
        
            // beta
            float beta
                
            // A = 0.1, B = -5, Vhalf = -8.9  in physiol. units
            // A = 100, B = -0.005, Vhalf = -0.0089

            if ( {abs {(v + 0.0089)/ -0.005}} < 1e-6)
                beta = 100 * (1 + (v + 0.0089)/-0.005/2)
            else
                beta = 100 * ((v + 0.0089) / -0.005) /(1 - {exp {-1 * (v + 0.0089)/-0.005}})
            end

            // alpha & beta 
            float tau = 1/(alpha + beta)
            setfield CaH19 X_A->table[{i}] {alpha}
            setfield CaH19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
        setfield CaH19 X_A->calc_mode 1 X_B->calc_mode 1
end

//========================================================================
//             Ca conc, Traub et al. J Neurophysiol 2003;89:909-921.
//========================================================================
/****************************************************************************
Next, we need an element to take the Calcium current calculated by the Ca
channel and convert it to the Ca concentration.  The "Ca_concen" object
solves the equation dC/dt = B*I_Ca - C/tau, and sets Ca = Ca_base + C.  As
it is easy to make mistakes in units when using this Calcium diffusion
equation, the units used here merit some discussion.

With Ca_base = 0, this corresponds to Traub's diffusion equation for
concentration, except that the sign of the current term here is positive, as
GENESIS uses the convention that I_Ca is the current flowing INTO the
compartment through the channel.  In SI units, the concentration is usually
expressed in moles/m^3 (which equals millimoles/liter), and the units of B
are chosen so that B = 1/(ion_charge * Faraday * volume). Current is
expressed in amperes and one Faraday = 96487 coulombs.  However, in this
case, Traub expresses the concentration in arbitrary units, current in
microamps and uses tau = 13.33 msec (50 msec soma, 20 msec dendrites in the
2003 J Neurophys paper).  If we use the same concentration units,
but express current in amperes and tau in seconds, our B constant is then
10^12 times the constant (called "phi") used in the paper.  The actual value
used will typically be determined by the cell reader from the cell
parameter file (will vary inversely with surface area of compartment).  
However, for the prototype channel we wlll use Traub's
corrected value for the soma.  (An error in the paper gives it as 17,402
rather than 17.402.)  In our units, this will be 17.402e12.

****************************************************************************/
function make_Ca_s19
        if ({exists Ca_s19})
            return
        end
        create Ca_concen Ca_s19
        // params for Ca  pool model
        setfield Ca_s19 \
            tau                   { 1.0 / 20 }    \
            Ca_base               0
    addfield Ca_s19 addmsg1
    setfield Ca_s19 \
            addmsg1        "../CaH19 . I_Ca Ik"
end

/*
This Ca_concen element should receive an "I_Ca" message from the calcium
channel, accompanied by the value of the calcium channel current.  As we
will ordinarily use the cell reader to create copies of these prototype
elements in one or more compartments, we need some way to be sure that the
needed messages are established.  Although the cell reader has enough
information to create the messages which link compartments to their channels
and to other adjacent compartments, it must be provided with the information
needed to establish additional messages.  This is done by placing the
message string in a user-defined field of one of the elements which is
involved in the message.  The cell reader recognizes the added field names
"addmsg1", "addmsg2", etc. as indicating that they are to be
evaluated and used to set up messages.  The paths are relative to the
element which contains the message string in its added field.  Thus,
"../Ca_hip_traub91" refers to the sibling element Ca_hip_traub91 and "."
refers to the Ca_hip_conc element itself.
*/

/****************************************************************************/
function make_Ca_d19
        if ({exists Ca_d19})
            return
        end
        create Ca_concen Ca_d19

        // params for Ca pool in dendrite
        setfield Ca_d19 \
            tau                   { 1.0 / 50 }    \
            Ca_base               0
        
    addfield Ca_d19 addmsg1
    setfield Ca_d19 \
            addmsg1        "../CaH19 . I_Ca Ik"
end

/*
This Ca_concen element should receive an "I_Ca" message from the calcium
channel, accompanied by the value of the calcium channel current.  As we
will ordinarily use the cell reader to create copies of these prototype
elements in one or more compartments, we need some way to be sure that the
needed messages are established.  Although the cell reader has enough
information to create the messages which link compartments to their channels
and to other adjacent compartments, it must be provided with the information
needed to establish additional messages.  This is done by placing the
message string in a user-defined field of one of the elements which is
involved in the message.  The cell reader recognizes the added field names
"addmsg1", "addmsg2", etc. as indicating that they are to be
evaluated and used to set up messages.  The paths are relative to the
element which contains the message string in its added field.  Thus,
"../Ca_hip_traub91" refers to the sibling element Ca_hip_traub91 and "."
refers to the Ca_hip_conc element itself.
*/

//===============================================================================
//  Ca-dependent K Channel - K(C) - (vdep_channel with table and tabgate)2005/03
//===============================================================================
/*
The expression for the conductance of the potassium C-current channel has a
typical voltage and time dependent activation gate, where the time dependence
arises from the solution of a differential equation containing the rate
parameters alpha and beta.  It is multiplied by a function of calcium
concentration that is given explicitly rather than being obtained from a
differential equation.  Therefore, we need a way to multiply the activation
by a concentration dependent value which is determined from a lookup table.
This is accomplished by using the Z gate with the new tabchannel "instant"
field, introduced in GENESIS 2.2, to implement an "instantaneous" gate for
the multiplicative Ca-dependent factor in the conductance.
*/
function make_KCs19
        if ({exists KCs19})
            return
        end
        create tabchannel KCs19
        setfield KCs19 \ 
            Ek              -0.1 \
            Ik              0  \
            Xpower          1 \
            Zpower          1
        setfield KCs19 \
            Gbar 120 \
            Gk              0 
        
        float tab_divs = 1041
        float v_min = -0.12
        float v_max = 0.14
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call KCs19 TABCREATE X {tab_divs} {v_min} {v_max}
                
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)

            // alpha
            float alpha
            v = v * 1000 // v to units of equation
            if (v < -10 )
                alpha =  2 * {2 / 37.95} * { exp { {{v + 50 } / 11} - {{ v + 53.5} / 27} } } 
            else
                alpha =  2 * 2 * {exp { { {-1 * v} - 53.5 } / 27 }}
            end
            v = v * 0.001 // reset v
            //  units of alpha
            alpha = alpha * 1000
            
            // beta
            float beta
            v = v * 1000 // v to units of equation
            
            alpha = alpha * 0.001 // alpha to units of equation
            if (v < -10 )
                beta =  4 * {exp { { {-1 * v} - 53.5 } / 27 }} - alpha 
            else
                beta =   0.0
            end
            v = v * 0.001 // reset v
            alpha = alpha * 1000  // reset alpha
                        
            // correct units of beta
            beta = beta * 1000

            // alpha and beta
            float tau = 1/(alpha + beta)
            
            setfield KCs19 X_A->table[{i}] {alpha}
            setfield KCs19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
        setfield KCs19 X_A->calc_mode 1 X_B->calc_mode 1
                    
        // concentration dependent term (voltage independent)
        float conc_min = 0
        float conc_max = 1000
        float dc = ({conc_max} - {conc_min})/{tab_divs}
        float ca_conc = {conc_min}
        
        call KCs19 TABCREATE  Z {tab_divs} {conc_min} {conc_max}
        float const_state
        for (i = 0; i <= ({tab_divs}); i = i + 1)
                
            ca_conc = ca_conc * 0.000001 // ica_conc to units of equation
            if (ca_conc < 0.00025 )
                const_state =  {ca_conc / 0.00025} 
            else
                const_state =  1
            end
            ca_conc = ca_conc * 1000000 //reset ca_conc
            
            setfield KCs19 Z_A->table[{i}] {0}
            setfield KCs19 Z_B->table[{i}] {const_state}
            ca_conc= ca_conc + dc
        end
        tweaktau KCs19 Z
        
        addfield KCs19 addmsg1
        setfield KCs19 addmsg1  "../Ca_s19  . CONCEN Ca"
end


function make_KCd19
        if ({exists KCd19})
            return
        end
        create tabchannel KCd19
        setfield KCd19 \ 
            Ek              -0.1 \
            Ik              0  \
            Xpower          1 \
            Zpower          1
        setfield KCd19 \
            Gbar 120 \
            Gk              0 

        float tab_divs = 1041
        float v_min = -0.12
        float v_max = 0.14
        float v, dv, i
            
        // X table for gate m
        float dv = ({v_max} - {v_min})/{tab_divs}
        call KCd19 TABCREATE X {tab_divs} {v_min} {v_max}
        v = {v_min}
        for (i = 0; i <= ({tab_divs}); i = i + 1)
            
            // alpha
            float alpha
            v = v * 1000 // v to units of equation
            if (v < -10 )
                alpha =   {4 / 37.95} * { exp { {{v + 50 } / 11} - {{ v + 53.5} / 27} } } 
            else
                alpha =  4 * {exp { { {-1 * v} - 53.5 } / 27 }}
            end
            v = v * 0.001 // reset v
            
            // correct units of alpha
            alpha = alpha * 1000

            // beta
            float beta
            v = v * 1000 // v to units of equation
            alpha = alpha * 0.001 // alpha to units of equation
            if (v < -10 )
                beta =  4 * {exp { { {-1 * v} - 53.5 } / 27 }} - alpha 
            else
                beta =  0.0
            end
            v = v * 0.001 // reset v
            alpha = alpha * 1000  // resetting alpha
                        
            // correct units of beta
            beta = beta * 1000

            // alpha and beta
            float tau = 1/(alpha + beta)
            setfield KCd19 X_A->table[{i}] {alpha}
            setfield KCd19 X_B->table[{i}] {alpha + beta}
            v = v + dv
        end // end of for (i = 0; i <= ({tab_divs}); i = i + 1)
        setfield KCd19 X_A->calc_mode 1 X_B->calc_mode 1
                    
        // concentration dependent term (voltage independent)
        float conc_min = 0
        float conc_max = 1000
        float dc = ({conc_max} - {conc_min})/{tab_divs}
        float ca_conc = {conc_min}
        call KCd19 TABCREATE  Z {tab_divs} {conc_min} {conc_max}
        float const_state

        for (i = 0; i <= ({tab_divs}); i = i + 1)
        
            ca_conc = ca_conc * 0.000001  // ca_conc to units of equation
            if (ca_conc < 0.00025 )
                const_state =  {ca_conc / 0.00025} 
            else
                const_state =  1
            end
            ca_conc = ca_conc * 1000000 //reset ca_conc
            
            setfield KCd19 Z_A->table[{i}] {0}
            setfield KCd19 Z_B->table[{i}] {const_state}
            ca_conc= ca_conc + dc
        end
        tweaktau KCd19 Z
        addfield KCd19 addmsg1
        setfield KCd19 addmsg1  "../Ca_d19  . CONCEN Ca"
end

//========================================================================
//             Tabulated Ca-dependent K AHP Channel,gK(AHP) 2003/05
//========================================================================

/* This is a tabchannel which gets the calcium concentration from Ca_hip_conc
   in order to calculate the activation of its Z gate.  It is set up much
   like the Ca channel, except that the A and B tables have values which are
   functions of concentration, instead of voltage.
*/
function make_KAHPs19
        if ({exists KAHPs19})
            return
        end
        create tabchannel KAHPs19
        setfield KAHPs19 \ 
            Ek              -0.1 \
            Ik              0  \
            Zpower          1
        
        setfield KAHPs19 \
            Gbar 1 \
            Gk              0 
        float tab_divs = 1041
        float c
        float conc_min = 0
        float conc_max = 1000
        float dc = ({conc_max} - {conc_min})/{tab_divs}
        float ca_conc = {conc_min}
        call KAHPs19 TABCREATE Z {tab_divs} {conc_min} {conc_max}
        for (c = 0; c <= ({tab_divs}); c = c + 1)
                    
            //  alpha
            float alpha, v
            ca_conc = ca_conc * 0.000001 // ca_conc to units of equation
            if (ca_conc < 0.0005 )
                alpha =  ca_conc/0.05 
            else
                alpha =  0.01
            end
            ca_conc = ca_conc * 1000000 // resetting ca_conc 
            
            // correct units of alpha
            alpha = alpha * 1000
                
            // beta
            float beta
            ca_conc = ca_conc * 0.000001 // ca_conc to units of equation
            beta = 0.001
            ca_conc = ca_conc * 1000000 // resetting ca_conc 

            // correct units of beta
            beta = beta * 1000

            // alpha and beta 
            float tau = 1/(alpha + beta)
            setfield KAHPs19 Z_A->table[{c}] {alpha}
            setfield KAHPs19 Z_B->table[{c}] {alpha + beta}
                    ca_conc = ca_conc + dc
        end // end of for (c = 0; c <= ({tab_divs}); c = c + 1)
        setfield KAHPs19 Z_conc 1
        setfield KAHPs19 Z_A->calc_mode 1 Z_B->calc_mode 1
        addfield KAHPs19 addmsg1
        setfield KAHPs19  \
                addmsg1        "../Ca_s19 . CONCEN Ca"
end


function make_KAHPd19
        if ({exists KAHPd19})
            return
        end
        create tabchannel KAHPd19
        setfield KAHPd19 \ 
            Ek              -0.1 \
            Ik              0  \
            Zpower          1
        setfield KAHPd19 \
            Gbar 1 \
            Gk              0 
        float tab_divs = 1041
        float c
        float conc_min = 0
        float conc_max = 1000
        float dc = ({conc_max} - {conc_min})/{tab_divs}
        float ca_conc = {conc_min}
        call KAHPd19 TABCREATE Z {tab_divs} {conc_min} {conc_max}
        for (c = 0; c <= ({tab_divs}); c = c + 1)

            //  alpha
            float alpha
            ca_conc = ca_conc * 0.000001 // ca_conc to units of equation
            if (ca_conc < 0.0005 )
                alpha =  ca_conc/0.05 
            else
                alpha =  0.01
            end
            ca_conc = ca_conc * 1000000 // reset ca_conc 
            // correct units of alpha
            alpha = alpha * 1000

            
            // beta
            float beta
            
            ca_conc = ca_conc * 0.000001 //set ca_conc to units of equation
            beta = 0.001
            ca_conc = ca_conc * 1000000 // reset ca_conc 
            // correct units of beta
            beta = beta * 1000

            

            // alpha and beta 
            float tau = 1/(alpha + beta)
            
            setfield KAHPd19 Z_A->table[{c}] {alpha}
            setfield KAHPd19 Z_B->table[{c}] {alpha + beta}
                    ca_conc = ca_conc + dc
        end // end of for (c = 0; c <= ({tab_divs}); c = c + 1)
                
        setfield KAHPd19 Z_conc 1
        setfield KAHPd19 Z_A->calc_mode 1 Z_B->calc_mode 1
                    
        addfield KAHPd19 addmsg1
        setfield KAHPd19  \
                addmsg1        "../Ca_d19 . CONCEN Ca"
end


Loading data, please wait...