Gfluct.nml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd" id="GfluctDoc">
  3. <!-- Note that order of different LEMS types matters for validation, since the schema defines what order they should appear in -->
  4. <!--
  5. Fluctuating conductance model for synaptic bombardment
  6. ======================================================
  7. THEORY
  8. Synaptic bombardment is represented by a stochastic model containing
  9. two fluctuating conductances g_e(t) and g_i(t) descibed by:
  10. Isyn = g_e(t) * [V - E_e] + g_i(t) * [V - E_i]
  11. d g_e / dt = -(g_e - g_e0) / tau_e + sqrt(D_e) * Ft
  12. d g_i / dt = -(g_i - g_i0) / tau_i + sqrt(D_i) * Ft
  13. where E_e, E_i are the reversal potentials, g_e0, g_i0 are the average
  14. conductances, tau_e, tau_i are time constants, D_e, D_i are noise diffusion
  15. coefficients and Ft is a gaussian white noise of unit standard deviation.
  16. g_e and g_i are described by an Ornstein-Uhlenbeck (OU) stochastic process
  17. where tau_e and tau_i represent the "correlation" (if tau_e and tau_i are
  18. zero, g_e and g_i are white noise). The estimation of OU parameters can
  19. be made from the power spectrum:
  20. S(w) = 2 * D * tau^2 / (1 + w^2 * tau^2)
  21. and the diffusion coeffient D is estimated from the variance:
  22. D = 2 * sigma^2 / tau
  23. NUMERICAL RESOLUTION
  24. The numerical scheme for integration of OU processes takes advantage
  25. of the fact that these processes are gaussian, which led to an exact
  26. update rule independent of the time step dt (see Gillespie DT, Am J Phys
  27. 64: 225, 1996):
  28. x(t+dt) = x(t) * exp(-dt/tau) + A * N(0,1)
  29. where A = sqrt( D*tau/2 * (1-exp(-2*dt/tau)) ) and N(0,1) is a normal
  30. random number (avg=0, sigma=1)
  31. IMPLEMENTATION
  32. This mechanism is implemented as a nonspecific current defined as a
  33. point process.
  34. PARAMETERS
  35. The mechanism takes the following parameters:
  36. E_e = 0 (mV) : reversal potential of excitatory conductance
  37. E_i = -75 (mV) : reversal potential of inhibitory conductance
  38. g_e0 = 0.0121 (umho) : average excitatory conductance
  39. g_i0 = 0.0573 (umho) : average inhibitory conductance
  40. std_e = 0.0030 (umho) : standard dev of excitatory conductance
  41. std_i = 0.0066 (umho) : standard dev of inhibitory conductance
  42. tau_e = 2.728 (ms) : time constant of excitatory conductance
  43. tau_i = 10.49 (ms) : time constant of inhibitory conductance
  44. Gfluct2: conductance cannot be negative
  45. REFERENCE
  46. Destexhe, A., Rudolph, M., Fellous, J-M. and Sejnowski, T.J.
  47. Fluctuating synaptic conductances recreate in-vivo-like activity in
  48. neocortical neurons. Neuroscience 107: 13-24 (2001).
  49. (electronic copy available at http://cns.iaf.cnrs-gif.fr)
  50. A. Destexhe, 1999
  51. Reference:
  52. https://doi.org/10.1016/S0306-4522(01)00344-X
  53. Original mod source: https://modeldb.science/8115
  54. -->
  55. <ComponentType name="Gfluct"
  56. extends="baseVoltageDepPointCurrent"
  57. description="Fluctuating conductance model for synaptic bombardment: Destexhe et al 2001"
  58. >
  59. <Parameter name="start" dimension="time" description="start time"/>
  60. <Parameter name="stop" dimension="time" description="stop time"/>
  61. <Parameter name="dt" dimension="time" description="simulation time step"/>
  62. <Parameter name="E_e" dimension="voltage" description="Excitatory conductance reversal potential"/>
  63. <Parameter name="E_i" dimension="voltage" description="Inhibitory conductance reversal potential"/>
  64. <Parameter name="g_e0" dimension="conductance" description="Average excitatory conductance"/>
  65. <Parameter name="g_i0" dimension="conductance" description="Average inhibitory conductance"/>
  66. <Parameter name="std_e" dimension="conductance" description="Std dev of excitatory conductance"/>
  67. <Parameter name="std_i" dimension="conductance" description="Std dev of inhibitory conductance"/>
  68. <Parameter name="tau_e" dimension="time" description="Time constant of excitatory conductance"/>
  69. <Parameter name="tau_i" dimension="time" description="Time constant of inhibitory conductance"/>
  70. <Constant name="zeroms" value="0 ms" dimension="time" />
  71. <EventPort name="in" direction="in" description="Note this is not used here. Will be removed in future"/>
  72. <DerivedParameter name="exp_e" dimension="none" value="exp(-dt/tau_e)" />
  73. <DerivedParameter name="amp_e" dimension="conductance" value="std_e * sqrt((1 - exp(-2 * (dt/tau_e))))" />
  74. <DerivedParameter name="exp_i" dimension="none" value="exp(-dt/tau_i)" />
  75. <DerivedParameter name="amp_i" dimension="conductance" value="std_i * sqrt((1 - exp(-2 * (dt/tau_i))))" />
  76. <Exposure name="g_e" dimension="conductance" />
  77. <Exposure name="g_i" dimension="conductance" />
  78. <Exposure name="g_e1" dimension="conductance" />
  79. <Exposure name="g_i1" dimension="conductance" />
  80. <Exposure name="i" dimension="current" />
  81. <Dynamics>
  82. <!-- total conductances -->
  83. <StateVariable name="g_e" exposure="g_e" dimension="conductance" />
  84. <StateVariable name="g_i" exposure="g_i" dimension="conductance" />
  85. <!-- fluctuating conductances -->
  86. <StateVariable name="g_e1" exposure="g_e1" dimension="conductance" />
  87. <StateVariable name="g_i1" exposure="g_i1" dimension="conductance" />
  88. <!-- track old value of g_e1: LEMS doesn't seem to like it if the same variable is used -->
  89. <StateVariable name="g_e1_old" dimension="conductance" />
  90. <StateVariable name="g_i1_old" dimension="conductance" />
  91. <StateVariable name="i" exposure="i" dimension="current" />
  92. <StateVariable name="r1" dimension="none" />
  93. <StateVariable name="r2" dimension="none" />
  94. <StateVariable name="randn" dimension="none" />
  95. <OnEvent port="in"><!--TODO: remove, see above...
  96. <StateAssignment variable="i" value="0"/>-->
  97. </OnEvent>
  98. <!-- required ? -->
  99. <OnStart>
  100. <StateAssignment variable="i" value="0"/>
  101. <StateAssignment variable="g_e" value="0"/>
  102. <StateAssignment variable="g_i" value="0"/>
  103. <StateAssignment variable="g_e1" value="0" />
  104. <StateAssignment variable="g_e1_old" value="0" />
  105. <StateAssignment variable="g_i1_old" value="0" />
  106. </OnStart>
  107. <!-- before start -->
  108. <OnCondition test="t .lt. start">
  109. <StateAssignment variable="i" value="0"/>
  110. <StateAssignment variable="g_e" value="0"/>
  111. <StateAssignment variable="g_i" value="0"/>
  112. <StateAssignment variable="g_e1" value="0" />
  113. <StateAssignment variable="g_i1" value="0" />
  114. <StateAssignment variable="g_e1_old" value="0" />
  115. <StateAssignment variable="g_i1_old" value="0" />
  116. </OnCondition>
  117. <!-- generate gaussian random number -->
  118. <OnCondition test="t .geq. start .and. t.lt. stop">
  119. <StateAssignment variable="r1" value="random(1)"/>
  120. <StateAssignment variable="r2" value="random(1)"/>
  121. <StateAssignment variable="randn" value="sqrt(-2*log(r1))*cos(2*3.14159265359*r2)"/>
  122. </OnCondition>
  123. <!-- oup()-->
  124. <OnCondition test="(t .geq. start .and. t .lt. stop) .and. (tau_e .neq. zeroms)" >
  125. <StateAssignment variable="g_e1" value="(exp_e * g_e1_old) + (amp_e * randn)" />
  126. <StateAssignment variable="g_e1_old" value="g_e1" />
  127. </OnCondition>
  128. <OnCondition test="(t .geq. start .and. t .lt. stop) .and. (tau_i .neq. zeroms)" >
  129. <StateAssignment variable="g_i1" value="(exp_i * g_i1_old) + (amp_i * randn)" />
  130. <StateAssignment variable="g_i1_old" value="g_i1" />
  131. </OnCondition>
  132. <OnCondition test="(t .geq. start .and. t .lt. stop) .and. (tau_e .eq. zeroms)" >
  133. <StateAssignment variable="g_e1" value="std_e * randn" />
  134. </OnCondition>
  135. <OnCondition test="(t .geq. start .and. t .lt. stop) .and. (tau_i .eq. zeroms)" >
  136. <StateAssignment variable="g_i1" value="std_i * randn" />
  137. </OnCondition>
  138. <OnCondition test="t .geq. start .and. t .lt. stop">
  139. <StateAssignment variable="g_e" value="g_e0 + g_e1" />
  140. <StateAssignment variable="g_i" value="g_i0 + g_i1" />
  141. </OnCondition>
  142. <OnCondition test="g_e .lt. 0">
  143. <StateAssignment variable="g_e" value="0" />
  144. </OnCondition>
  145. <OnCondition test="g_i .lt. 0">
  146. <StateAssignment variable="g_i" value="0" />
  147. </OnCondition>
  148. <OnCondition test="t .geq. start .and. t .lt. stop">
  149. <StateAssignment variable="i" value="-1 * g_e * (v - E_e) - g_i * (v - E_i)" />
  150. </OnCondition>
  151. <!-- after end -->
  152. <OnCondition test="t .geq. stop">
  153. <StateAssignment variable="i" value="0"/>
  154. <StateAssignment variable="g_e" value="0"/>
  155. <StateAssignment variable="g_i" value="0"/>
  156. <StateAssignment variable="g_e1" value="0" />
  157. <StateAssignment variable="g_i1" value="0" />
  158. </OnCondition>
  159. </Dynamics>
  160. </ComponentType>
  161. </neuroml>