00001
00005 #ifndef _GLUTAMATESYNAPSE_H_
00006 #define _GLUTAMATESYNAPSE_H_
00007
00008 #include "GenericGlutamateSynapse.h"
00009
00010 #include "GenericDynamicSpikingSynapse.h"
00011 #include "GenericStaticSpikingSynapse.h"
00012
00013 #include "ExponentialDecaySpikeResponse.h"
00014 #include "DoubleExponentialSpikeResponse.h"
00015 #include "AlphaFunctionSpikeResponse.h"
00016
00017 #include "GenericHomeostaticSynapse.h"
00018
00019
00021
00023
00026
00029
00030
00032
00033 typedef GenericDynamicSpikingSynapse< GenericGlutamateSynapse< ExponentialDecaySpikeResponse > > DynamicGlutamateExpBase;
00034
00035 class DynamicGlutamateExpSynapse : public GenericDynamicSpikingSynapse< GenericGlutamateSynapse< ExponentialDecaySpikeResponse > >
00036 {
00037 SIMOBJECT(DynamicGlutamateExpSynapse, AdvancePhase::SpikeDriven)
00038
00039 public:
00040 DynamicGlutamateExpSynapse(
00041 const float W = 1e-9,
00042 const float tau_AMPA = 5e-3,
00043 const float tau_NMDA = 150e-3,
00044 const float delay = 2e-4,
00045 const float Erev_AMPA = 0e-3,
00046 const float Erev_NMDA = 0e-3,
00047 const float fract_NMDA = 0.5,
00048 const float U = 0.2,
00049 const float D = 0.1,
00050 const float F = 0.4,
00051 const float u0 = 0.2,
00052 const float r0 = 1.0,
00053 const float f0 = -1.0,
00054 const int has_NMDA = 1,
00055 const bool rescale = true)
00056 {
00057 this->W = W;
00058 this->Mg_conc = 1e-3;
00059 this->delay = delay;
00060
00061 this->tau_NMDA = tau_NMDA;
00062 this->tau_AMPA = tau_AMPA;
00063
00064 this->tau = tau_NMDA;
00065 this->resp_AMPA.tau = tau_AMPA;
00066
00067 this->Erev_NMDA = Erev_NMDA;
00068 this->Erev_AMPA = Erev_AMPA;
00069
00070 this->has_NMDA = has_NMDA;
00071 this->fract_NMDA = fract_NMDA;
00072
00073 this->U = U;
00074 this->D = D;
00075 this->F = F;
00076 this->u0 = u0;
00077 this->r0 = r0;
00078 this->f0 = f0;
00079
00080 this->rescale = rescale;
00081 };
00082
00084 double tau_AMPA;
00085
00087 double tau_NMDA;
00088
00090 bool rescale;
00091
00093 virtual int reset(double dt)
00094 {
00095 tau = tau_NMDA;
00096 resp_AMPA.tau = tau_AMPA;
00097
00098 if(rescale)
00099 scale_NMDA = tau_AMPA/tau_NMDA;
00100 else
00101 scale_NMDA = 1.0;
00102
00103 resp_AMPA.reset(dt);
00104 return DynamicGlutamateExpBase::reset(dt);
00105 }
00106 };
00107
00108
00109 typedef GenericDynamicSpikingSynapse < GenericGlutamateSynapse < AlphaFunctionSpikeResponse > >
00110 DynamicGlutamateAlphaBase;
00111
00112 class DynamicGlutamateAlphaSynapse : public GenericDynamicSpikingSynapse < GenericGlutamateSynapse < AlphaFunctionSpikeResponse > >
00113 {
00114 SIMOBJECT(DynamicGlutamateAlphaSynapse, AdvancePhase::SpikeDriven)
00115
00116 public:
00117 DynamicGlutamateAlphaSynapse(
00118 const float W = 1e-9,
00119 const float tau_AMPA = 5e-3,
00120 const float tau_NMDA = 150e-3,
00121 const float delay = 2e-4,
00122 const float Erev_AMPA = 0e-3,
00123 const float Erev_NMDA = 0e-3,
00124 const float fract_NMDA = 0.5,
00125 const float U = 0.2,
00126 const float D = 0.1,
00127 const float F = 0.4,
00128 const float u0 = 0.2,
00129 const float r0 = 1.0,
00130 const float f0 = -1.0,
00131 const int has_NMDA = 1,
00132 const bool rescale = true)
00133 {
00134 this->W = W;
00135 this->Mg_conc = 1e-3;
00136 this->delay = delay;
00137
00138 this->tau_NMDA = tau_NMDA;
00139 this->tau_AMPA = tau_AMPA;
00140
00141 this->tau = tau_NMDA;
00142 this->resp_AMPA.tau = tau_AMPA;
00143
00144 this->Erev_NMDA = Erev_NMDA;
00145 this->Erev_AMPA = Erev_AMPA;
00146
00147 this->has_NMDA = has_NMDA;
00148 this->fract_NMDA = fract_NMDA;
00149
00150 this->U = U;
00151 this->D = D;
00152 this->F = F;
00153 this->u0 = u0;
00154 this->r0 = r0;
00155 this->f0 = f0;
00156
00157 this->rescale = rescale;
00158 };
00159
00161 double tau_AMPA;
00162
00164 double tau_NMDA;
00165
00167 bool rescale;
00168
00170 virtual int reset(double dt)
00171 {
00172 tau = tau_NMDA;
00173 resp_AMPA.tau = tau_AMPA;
00174
00175 if(rescale)
00176 scale_NMDA = tau_AMPA/tau_NMDA;
00177 else
00178 scale_NMDA = 1.0;
00179
00180 resp_AMPA.reset(dt);
00181 return DynamicGlutamateAlphaBase::reset(dt);
00182 }
00183 };
00184
00185
00186
00188
00189 typedef GenericDynamicSpikingSynapse< GenericGlutamateSynapse< DoubleExponentialSpikeResponse > >
00190 DynamicGlutamateDoubleExpBase;
00191
00192 class DynamicGlutamateDoubleExpSynapse : public GenericDynamicSpikingSynapse< GenericGlutamateSynapse< DoubleExponentialSpikeResponse > >
00193 {
00194 SIMOBJECT(DynamicGlutamateDoubleExpSynapse, AdvancePhase::SpikeDriven)
00195
00196 public:
00197 DynamicGlutamateDoubleExpSynapse(
00198 const float W = 1e-9,
00199 const float tau1_AMPA = 0.1e-3,
00200 const float tau2_AMPA = 5e-3,
00201 const float tau1_NMDA = 2e-3,
00202 const float tau2_NMDA = 150e-3,
00203 const float delay = 2e-4,
00204 const float Erev_AMPA = 0e-3,
00205 const float Erev_NMDA = 0e-3,
00206 const float fract_NMDA = 0.5,
00207 const float U = 0.2,
00208 const float D = 0.1,
00209 const float F = 0.4,
00210 const float u0 = 0.2,
00211 const float r0 = 1.0,
00212 const float f0 = -1.0,
00213 const int has_NMDA = 1,
00214 const bool rescale = true)
00215 {
00216 this->W = W;
00217 this->Mg_conc = 1e-3;
00218 this->delay = delay;
00219
00220 this->tau1_NMDA = tau1_NMDA;
00221 this->tau2_NMDA = tau2_NMDA;
00222 this->tau1_AMPA = tau1_AMPA;
00223 this->tau2_AMPA = tau2_AMPA;
00224
00225 this->tau1 = tau1_NMDA;
00226 this->tau2 = tau2_NMDA;
00227 this->resp_AMPA.tau1 = tau1_AMPA;
00228 this->resp_AMPA.tau2 = tau2_AMPA;
00229
00230 this->Erev_NMDA = Erev_NMDA;
00231 this->Erev_AMPA = Erev_AMPA;
00232
00233 this->has_NMDA = has_NMDA;
00234 this->fract_NMDA = fract_NMDA;
00235
00236 this->U = U;
00237 this->D = D;
00238 this->F = F;
00239 this->u0 = u0;
00240 this->r0 = r0;
00241 this->f0 = f0;
00242
00243 this->rescale = rescale;
00244 };
00245
00247 double tau1_AMPA;
00248
00250 double tau2_AMPA;
00251
00253 double tau1_NMDA;
00254
00256 double tau2_NMDA;
00257
00259 bool rescale;
00260
00262 virtual int reset(double dt)
00263 {
00264 tau1 = tau1_NMDA;
00265 tau2 = tau2_NMDA;
00266 resp_AMPA.tau1 = tau1_AMPA;
00267 resp_AMPA.tau2 = tau2_AMPA;
00268
00269 if(rescale)
00270 scale_NMDA = (tau1_AMPA+tau2_AMPA)/(tau1_NMDA+tau2_NMDA);
00271 else
00272 scale_NMDA = 1.0;
00273
00274 resp_AMPA.reset(dt);
00275 return DynamicGlutamateDoubleExpBase::reset(dt);
00276 }
00277
00278 };
00279
00280
00281
00284
00287
00288
00290
00291 typedef GenericStaticSpikingSynapse< GenericGlutamateSynapse< ExponentialDecaySpikeResponse > > StaticGlutamateExpBase;
00292
00293 class StaticGlutamateExpSynapse : public GenericStaticSpikingSynapse< GenericGlutamateSynapse< ExponentialDecaySpikeResponse > >
00294 {
00295 SIMOBJECT(StaticGlutamateExpSynapse, AdvancePhase::SpikeDriven)
00296
00297 public:
00298 StaticGlutamateExpSynapse(
00299 const float W = 1e-9,
00300 const float tau_AMPA = 5e-3,
00301 const float tau_NMDA = 150e-3,
00302 const float delay = 2e-4,
00303 const float Erev_AMPA = 0e-3,
00304 const float Erev_NMDA = 0e-3,
00305 const float fract_NMDA = 0.5,
00306 const int has_NMDA = 1,
00307 const bool rescale = true)
00308 {
00309 this->W = W;
00310 this->Mg_conc = 1e-3;
00311 this->delay = delay;
00312
00313 this->tau_NMDA = tau_NMDA;
00314 this->tau_AMPA = tau_AMPA;
00315
00316 this->tau = tau_NMDA;
00317 this->resp_AMPA.tau = tau_AMPA;
00318
00319 this->Erev_NMDA = Erev_NMDA;
00320 this->Erev_AMPA = Erev_AMPA;
00321
00322 this->has_NMDA = has_NMDA;
00323 this->fract_NMDA = fract_NMDA;
00324
00325 this->rescale = rescale;
00326 };
00327
00329 double tau_AMPA;
00330
00332 double tau_NMDA;
00333
00335 bool rescale;
00336
00338 virtual int reset(double dt)
00339 {
00340 tau = tau_NMDA;
00341 resp_AMPA.tau = tau_AMPA;
00342
00343 if(rescale)
00344 scale_NMDA = tau_AMPA/tau_NMDA;
00345 else
00346 scale_NMDA = 1.0;
00347
00348 resp_AMPA.reset(dt);
00349 return StaticGlutamateExpBase::reset(dt);
00350 }
00351 };
00352
00353
00354 typedef GenericStaticSpikingSynapse < GenericGlutamateSynapse < AlphaFunctionSpikeResponse > >
00355 StaticGlutamateAlphaBase;
00356
00357 class StaticGlutamateAlphaSynapse : public GenericStaticSpikingSynapse < GenericGlutamateSynapse < AlphaFunctionSpikeResponse > >
00358 {
00359 SIMOBJECT(StaticGlutamateAlphaSynapse, AdvancePhase::SpikeDriven)
00360
00361 public:
00362 StaticGlutamateAlphaSynapse(
00363 const float W = 1e-9,
00364 const float tau_AMPA = 5e-3,
00365 const float tau_NMDA = 150e-3,
00366 const float delay = 2e-4,
00367 const float Erev_AMPA = 0e-3,
00368 const float Erev_NMDA = 0e-3,
00369 const float fract_NMDA = 0.5,
00370 const int has_NMDA = 1,
00371 const bool rescale = true)
00372 {
00373 this->W = W;
00374 this->Mg_conc = 1e-3;
00375 this->delay = delay;
00376
00377 this->tau_NMDA = tau_NMDA;
00378 this->tau_AMPA = tau_AMPA;
00379
00380 this->tau = tau_NMDA;
00381 this->resp_AMPA.tau = tau_AMPA;
00382
00383 this->Erev_NMDA = Erev_NMDA;
00384 this->Erev_AMPA = Erev_AMPA;
00385
00386 this->has_NMDA = has_NMDA;
00387 this->fract_NMDA = fract_NMDA;
00388
00389 this->rescale = rescale;
00390 };
00391
00393 double tau_AMPA;
00394
00396 double tau_NMDA;
00397
00399 bool rescale;
00400
00402 virtual int reset(double dt)
00403 {
00404 tau = tau_NMDA;
00405 resp_AMPA.tau = tau_AMPA;
00406
00407 if(rescale)
00408 scale_NMDA = tau_AMPA/tau_NMDA;
00409 else
00410 scale_NMDA = 1.0;
00411
00412 resp_AMPA.reset(dt);
00413 return StaticGlutamateAlphaBase::reset(dt);
00414 }
00415 };
00416
00417
00418
00420
00421 typedef GenericStaticSpikingSynapse< GenericGlutamateSynapse< DoubleExponentialSpikeResponse > >
00422 StaticGlutamateDoubleExpBase;
00423
00424 class StaticGlutamateDoubleExpSynapse : public GenericStaticSpikingSynapse< GenericGlutamateSynapse< DoubleExponentialSpikeResponse > >
00425 {
00426 SIMOBJECT(StaticGlutamateDoubleExpSynapse, AdvancePhase::SpikeDriven)
00427
00428 public:
00429 StaticGlutamateDoubleExpSynapse(
00430 const float W = 1e-9,
00431 const float tau1_AMPA = 0.1e-3,
00432 const float tau2_AMPA = 5e-3,
00433 const float tau1_NMDA = 2e-3,
00434 const float tau2_NMDA = 150e-3,
00435 const float delay = 2e-4,
00436 const float Erev_AMPA = 0e-3,
00437 const float Erev_NMDA = 0e-3,
00438 const float fract_NMDA = 0.5,
00439 const int has_NMDA = 1,
00440 const bool rescale = true)
00441 {
00442 this->W = W;
00443 this->Mg_conc = 1e-3;
00444 this->delay = delay;
00445
00446 this->tau1_NMDA = tau1_NMDA;
00447 this->tau2_NMDA = tau2_NMDA;
00448 this->tau1_AMPA = tau1_AMPA;
00449 this->tau2_AMPA = tau2_AMPA;
00450
00451 this->tau1 = tau1_NMDA;
00452 this->tau2 = tau2_NMDA;
00453 this->resp_AMPA.tau1 = tau1_AMPA;
00454 this->resp_AMPA.tau2 = tau2_AMPA;
00455
00456 this->Erev_NMDA = Erev_NMDA;
00457 this->Erev_AMPA = Erev_AMPA;
00458
00459 this->has_NMDA = has_NMDA;
00460 this->fract_NMDA = fract_NMDA;
00461
00462 this->rescale = rescale;
00463 this->has_NMDA = has_NMDA;
00464 };
00465
00467 double tau1_AMPA;
00468
00470 double tau2_AMPA;
00471
00473 double tau1_NMDA;
00474
00476 double tau2_NMDA;
00477
00479 bool rescale;
00480
00482 virtual int reset(double dt)
00483 {
00484 tau1 = tau1_NMDA;
00485 tau2 = tau2_NMDA;
00486 resp_AMPA.tau1 = tau1_AMPA;
00487 resp_AMPA.tau2 = tau2_AMPA;
00488
00489 if(rescale)
00490 scale_NMDA = (tau1_AMPA+tau2_AMPA)/(tau1_NMDA+tau2_NMDA);
00491 else
00492 scale_NMDA = 1.0;
00493
00494 resp_AMPA.reset(dt);
00495 return StaticGlutamateDoubleExpBase::reset(dt);
00496 }
00497
00498 };
00499
00500
00501 #endif //_GLUTAMATESYNAPSE_H_