file:/local_home/local_home/hugo/neurospaces_project/heccer/source/c/snapshots/0/tests/code/table-kh.c        (Mon Jun 16 00:03:49 2008 )        HOME


   1: //
   2: // Heccer : a compartmental solver that implements efficient Crank-Nicolson
   3: // integration for neuronal models.
   4: //
   5: 
   6: //////////////////////////////////////////////////////////////////////////////
   7: //'
   8: //' Heccer : testbed C implementation
   9: //'
  10: //' Copyright (C) 2006-2008 Hugo Cornelis
  11: //'
  12: //' functional ideas .. Hugo Cornelis, hugo.cornelis@gmail.com
  13: //'
  14: //' coding ............ Hugo Cornelis, hugo.cornelis@gmail.com
  15: //'
  16: //////////////////////////////////////////////////////////////////////////////
  17: 
  18: 
  19: #include "../../heccer/compartment.h"
  20: #include "../../heccer/heccer.h"
  21: 
  22: 
  23: #define HECCER_TEST_INTERPOL_INTERVAL_DEFAULT_ENTRIES           20
  24: #define HECCER_TEST_INTERVAL_DEFAULT_START                      (-0.1)
  25: #define HECCER_TEST_INTERVAL_DEFAULT_END                        (0.05)
  26: #define HECCER_TEST_INTERVAL_DEFAULT_ENTRIES                    50
  27: #define HECCER_TEST_STEPS 1
  28: 
  29: 
  30: struct Compartment compSoma =
  31: {
  32:     //m administrative overhead
  33: 
  34:     {
  35:         //m type of structure
  36: 
  37:         MATH_TYPE_Compartment,
  38:     },
  39: 
  40:     //m index of parent compartment, -1 for none
  41: 
  42:     -1,
  43: 
  44: /*     //m first mechanism */
  45: 
  46: /*     NULL, */
  47: 
  48: /*     //m number of mechanisms */
  49: 
  50: /*     0, */
  51: 
  52:     //m descriptive values, alphabetical order
  53: 
  54: /*     double dCm; */
  55: 
  56:     4.57537e-11, // unscaled 0.0164,
  57: 
  58: /*     double dEm; */
  59: 
  60:     -0.08,
  61: 
  62: /*     double dInitVm; */
  63: 
  64:     -0.068,
  65: 
  66: /*     double dInject;           */
  67: 
  68:     0,
  69: 
  70: /*     double dRa; */
  71: 
  72:     360502, // unscaled 2.5,
  73: 
  74: /*     double dRm; */
  75: 
  76:     3.58441e+08, // unscaled 1
  77: };
  78: 
  79: 
  80: //v a anomalous rectifier potassium channel
  81: 
  82: struct ChannelPersistentSteadyStateDualTau csstKH =
  83: {
  84:     //m administrative overhead
  85: 
  86:     {
  87:         //m type of structure
  88: 
  89:         MATH_TYPE_ChannelPersistentSteadyStateDualTau,
  90:     },
  91: 
  92:     //m first set of descriptive values, alphabetical order
  93: 
  94:     //m initial reversal potential
  95: 
  96:     -0.03,
  97: 
  98:     //m get reversal potential from this intermediary, -1 for none
  99: 
 100:     -1,
 101: 
 102:     //m maximal conductance when all channels are permissive
 103: 
 104:     8.36958e-09,
 105: 
 106:     //m contributes to this concentration pool, -1 for none, boolean indicator only.
 107: 
 108:     -1,
 109: 
 110:     //m first power
 111: 
 112:     1,
 113: 
 114:     //m second power
 115: 
 116:     1,
 117: 
 118:     //m first gate table, -1 for initialization
 119: 
 120:     -1,
 121: 
 122:     //m second gate table, -1 for initialization
 123: 
 124:     -1,
 125: 
 126:     //m first gate initial value
 127: 
 128:     0.024046282305781597,
 129: 
 130:     //m second gate initial value
 131: 
 132:     0.096185129223126414,
 133: 
 134:     {
 135:         //m fast component steady state
 136: 
 137:         0.0076,
 138: 
 139:         //m tau 1
 140: 
 141:         {
 142:             //m 1: nominator multiplier
 143: 
 144:             0.8,
 145: 
 146:             //m 2: denominator offset
 147: 
 148:             1.0,
 149: 
 150:             //m 5: membrane offset
 151: 
 152:             0.082,
 153: 
 154:             //m 6: denormalized time constant
 155: 
 156:             0.007,
 157: 
 158:         },
 159:     },
 160: 
 161:     {
 162:         //m slow component steady state
 163: 
 164:         0.0368,
 165: 
 166:         //m tau 2
 167: 
 168:         {
 169:             //m 1: nominator multiplier
 170: 
 171:             0.2,
 172: 
 173:             //m 2: denominator offset
 174: 
 175:             1.0,
 176: 
 177:             //m 5: membrane offset
 178: 
 179:             0.082,
 180: 
 181:             //m 6: denormalized time constant
 182: 
 183:             0.007,
 184: 
 185:         },
 186:     },
 187: 
 188: };
 189: 
 190: 
 191: int piC2m[] =
 192: {
 193:     1,
 194:     -1,
 195: };
 196: 
 197: 
 198: struct MathComponentArray mca =
 199: {
 200:     //m number of math components
 201: 
 202:     1,
 203: 
 204:     //m math component data
 205: 
 206:     &csstKH.mc,
 207: 
 208:     //m math component index, initialize to NULL
 209: 
 210:     NULL,
 211: 
 212: };
 213: 
 214: 
 215: struct Intermediary inter =
 216: {
 217:     //m compartment array
 218: 
 219:     1,
 220: 
 221:     &compSoma,
 222: 
 223:     //m all other mathematical components
 224: 
 225:     &mca,
 226: 
 227:     //m compartment 2 first mechanism number
 228: 
 229:     piC2m,
 230: };
 231: 
 232: 
 233: #include "main.c"
 234: 
 235: 
 236: 








































Generated by Xrefactory version 2.0.14 on Thu Jul 24 22:41:20 2008