Skip to content

Commit

Permalink
Merge branch 'sanjayankur31-neuroml-ankur-dev' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Apr 10, 2024
2 parents 9cd5e8c + bb27e41 commit b044d69
Show file tree
Hide file tree
Showing 18 changed files with 164 additions and 120 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
arm64
__pycache__
*.log
*.dat
x86_64/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions NeuroML2/channels/RaySigmoid.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<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_v2beta4.xsd" id="NeuroML_ionChannel">

<notes>NeuroML file containing variations of steady state and tau expressions for ion channels used in Ray et al 2020. These are required because in the mod files, the tables stop at 40, and so we need to tweak our implementations.</notes>

<ComponentType name="Ray_inf"
extends="baseVoltageDepVariable"
description="Inf parameter to describe naf" >

<Constant name="TIME_SCALE" dimension="time" value="1 s"/>
<Constant name="table_max" dimension="voltage" value="40 mV"/>
<Parameter name="rate" dimension="none"/>
<Parameter name="midpoint" dimension="voltage"/>
<Parameter name="scale" dimension="voltage"/>
<Dynamics>
<ConditionalDerivedVariable name="x" dimension="per_time" exposure="x">
<Case condition="v .gt. table_max" value="(rate / (1 + exp(0 - (table_max - midpoint) / scale)))/TIME_SCALE"/>
<Case value="(rate / (1 + exp(0 - (v - midpoint) / scale)))/TIME_SCALE"/>
</ConditionalDerivedVariable>
</Dynamics>
</ComponentType>

<ComponentType name="Ray_tau"
extends="baseVoltageDepTime"
description="Tau parameter to describe naf">

<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="table_max" dimension="voltage" value="40 mV"/>
<Parameter name="max_tau" dimension="per_time"/>
<Parameter name="min_tau" dimension="per_time"/>
<Parameter name="midpoint" dimension="voltage"/>
<Parameter name="scale" dimension="voltage"/>
<Dynamics>
<ConditionalDerivedVariable name="t" dimension="per_time" exposure="t" >
<Case condition="v .gt. table_max" value="((max_tau - min_tau) / (1 + exp(0 - (table_max - midpoint) / scale))) + min_tau"/>
<Case value="((max_tau - min_tau) / (1 + exp(0 - (v - midpoint) / scale))) + min_tau"/>
</ConditionalDerivedVariable>

</Dynamics>

</ComponentType>
</neuroml>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions NeuroML2/channels/ka.channel.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<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_v2beta4.xsd" id="NeuroML_ionChannel">

<notes>NeuroML file containing a single ion channel</notes>
<include href="RaySigmoid.nml" />

<ionChannel id="ka" conductance="1pS" type="ionChannelHH" species="k">

<notes>
Implementation of A type K+ channel ( KA ) from Wustenberg DG, Boytcheva M, Grunewald B, Byrne JH, Menzel R, Baxter DA.
This is transient A type K+ channel in Apis mellifera Kenyon cells (cultured).
</notes>

<!-- custom component types because the tables in the mod files only go to 40 -->
<gate id="m" type="gateHHtauInf" instances="3">
<steadyState type="Ray_inf" rate="1.0" midpoint="-20.1mV" scale="16.1mV"/>
<timeCourse type="Ray_ka_taum"/>
</gate>

<gate id="h" type="gateHHtauInf" instances="1">
<steadyState type="Ray_inf" rate="1.0" midpoint="-74.7mV" scale="-7.0mV"/>
<timeCourse type="Ray_ka_tauh"/>
</gate>

</ionChannel>

<ComponentType name="Ray_ka_taum"
extends="baseVoltageDepTime"
description="Tau parameter to describe ka">

<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
<Constant name="max_tau" dimension="per_time" value="1.65 per_s"/>
<Constant name="min_tau" dimension="per_time" value="0.35 per_s"/>
<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<ConditionalDerivedVariable name="t" dimension="per_time" exposure="t" >
<Case condition="V .gt. 40" value="(max_tau - min_tau) / ((1 + exp(-(40. + 70.0) / 4.0)) * ( 1 + exp((40. + 2.0) / 12.0))) + min_tau"/>
<Case value="(max_tau - min_tau) / ((1 + exp(-(V + 70.0) / 4.0)) * ( 1 + exp((V + 2.0) / 12.0))) + min_tau"/>

</ConditionalDerivedVariable>
</Dynamics>

</ComponentType>

<ComponentType name="Ray_ka_tauh"
extends="baseVoltageDepTime"
description="Tau parameter to describe ka">

<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
<Constant name="max_tau" dimension="per_time" value="90.0 per_s"/>
<Constant name="min_tau" dimension="per_time" value="2.5 per_s"/>
<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<ConditionalDerivedVariable name="t" dimension="per_time" exposure="t" >
<Case condition="V .gt. 40" value="(max_tau - min_tau) / ((1 + exp(-(40. + 60.) / 25.0)) * (1 + exp((40. + 62.0) / 16.0))) + min_tau"/>
<Case value="(max_tau - min_tau) / ((1 + exp(-(V + 60.) / 25.0)) * (1 + exp((V + 62.0) / 16.0))) + min_tau"/>
</ConditionalDerivedVariable>

</Dynamics>

</ComponentType>

</neuroml>
21 changes: 21 additions & 0 deletions NeuroML2/channels/kv.channel.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<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_v2beta4.xsd" id="NeuroML_ionChannel">

<notes>NeuroML file containing a single ion channel</notes>
<include href="RaySigmoid.nml" />

<ionChannel id="kv" conductance="1pS" type="ionChannelHH" species="k">

<notes>
Implementation of A type K+ channel ( KV ) from Wustenberg DG, Boytcheva M, Grunewald B, Byrne JH, Menzel R, Baxter DA.
This is a delayed rectifier type K+ channel in Apis mellifera Kenyon cells (cultured).
</notes>

<!-- custom component types because the tables in the mod files only go to 40 -->
<gate id="m" type="gateHHtauInf" instances="4">
<steadyState type="Ray_inf" rate="1.0" midpoint="-37.6mV" scale="27.24mV"/>
<timeCourse type="Ray_tau" min_tau="1.85 per_s" max_tau="3.53 per_s" midpoint="45.0 mV" scale="-13.71mV"/>
</gate>

</ionChannel>
</neuroml>
26 changes: 26 additions & 0 deletions NeuroML2/channels/naf.channel.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<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_v2beta4.xsd" id="NeuroML_ionChannel">

<notes>NeuroML file containing a single ion channel</notes>
<include href="RaySigmoid.nml" />

<ionChannel id="naf" conductance="1pS" type="ionChannelHH" species="na">

<notes>
Implementation of fast Na+ channel ( NAF ) from Wustenberg DG, Boytcheva M, Grunewald B, Byrne JH, Menzel R, Baxter DA

This is fast Na+ channel in Apis mellifera Kenyon cells :(cultured).
</notes>

<gate id="m" type="gateHHtauInf" instances="3">
<steadyState type="Ray_inf" rate="1.0" midpoint="-30.1mV" scale="6.65mV"/>
<timeCourse type="Ray_tau" min_tau="0.83 per_s" max_tau="0.093 per_s" midpoint="-20.3 mV" scale="6.45mV"/>
</gate>

<gate id="h" type="gateHHtauInf" instances="1">
<steadyState type="Ray_inf" rate="1.0" midpoint="-51.4mV" scale="-5.9mV"/>
<timeCourse type="Ray_tau" min_tau="0.12 per_s" max_tau="1.660 per_s" midpoint="-8.03 mV" scale="-8.69mV"/>
</gate>

</ionChannel>
</neuroml>
128 changes: 8 additions & 120 deletions NeuroML2/channels/nas.channel.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,136 +2,24 @@
<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_v2beta4.xsd" id="NeuroML_ionChannel">

<notes>NeuroML file containing a single ion channel</notes>
<include href="RaySigmoid.nml" />

<ionChannel id="Navp" conductance="1pS" type="ionChannelHH" species="na">
<ionChannel id="Nas" conductance="1pS" type="ionChannelHH" species="na">

<notes>
Implementation of slow Na+ channel ( NAS ) from Wustenberg DG, Boytcheva M, Grunewald B, Byrne JH, Menzel R, Baxter DA

This is slow Na+ channel in Apis mellifera Kenyon cells :(cultured).
</notes>

<gate id="m" type="gateHHratesTau" instances="3">
<forwardRate type="HHExpLinearRate" rate="1per_ms" midpoint="-30.1mV" scale="6.65mV"/>
<timeCourse type="Ray_nas_taum"/>
<gate id="m" type="gateHHtauInf" instances="3">
<steadyState type="Ray_inf" rate="1" midpoint="-30.1mV" scale="6.65mV"/>
<timeCourse type="Ray_tau" min_tau="0.83 per_s" max_tau="0.093 per_s" midpoint="-20.3 mV" scale="6.45mV"/>
</gate>

<gate id="h" type="gateHHratesTau" instances="1">
<forwardRate type="HHExpLinearRate" rate="1per_ms" midpoint="-51.4mV" scale="5.9mV"/>
<timeCourse type="Ray_nas_tauh"/>
<gate id="h" type="gateHHtauInf" instances="1">
<steadyState type="Ray_inf" rate="1" midpoint="-51.4mV" scale="-5.9mV"/>
<timeCourse type="Ray_tau" min_tau="1.9 per_s" max_tau="12.24 per_s" midpoint="-32.6 mV" scale="-8.0mV"/>
</gate>

</ionChannel>

<ComponentType name="Ray_nas_taum"
extends="baseVoltageDepTime"
description="Tau parameter to describe Navp">

<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
<Constant name="max_tau" dimension="per_time" value="0.83 per_time"/>
<Constant name="min_tau" dimension="per_time" value="0.093 per_time"/>
<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<ConditionalDerivedVariable name="t" dimension="time" exposure="t">
<Case condition="(ALPHA + BETA) .eq. 0" value="( 0 ) * TIME_SCALE"/>
<Case condition="1/( (ALPHA + BETA) * rateScale ) .lt. ( 0.02 )" value="( (0.02 * rateScale) ) * TIME_SCALE"/>
<Case value="( 1/(ALPHA + BETA) ) * TIME_SCALE"/>
</ConditionalDerivedVariable>

</Dynamics>

</ComponentType>

<ComponentType name="Ray_nas_tauh"
extends="baseVoltageDepTime"
description="Tau parameter to describe Navp">

<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>

<Requirement name="alpha" dimension="per_time"/>
<Requirement name="beta" dimension="per_time"/>
<Requirement name="rateScale" dimension="none"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<DerivedVariable name="ALPHA" dimension="none" value="alpha * TIME_SCALE"/>
<DerivedVariable name="BETA" dimension="none" value="beta * TIME_SCALE"/>

<ConditionalDerivedVariable name="t" exposure="t" dimension="time">
<Case condition="(ALPHA + BETA) .eq. 0" value="( 0 ) * TIME_SCALE"/>
<Case condition="1/( (ALPHA + BETA) * rateScale ) .lt. ( 0.5 )" value="( (0.5 * rateScale) ) * TIME_SCALE"/>
<Case value="( 1/(ALPHA + BETA) ) * TIME_SCALE"/>
</ConditionalDerivedVariable>

</Dynamics>

</ComponentType>

<ComponentType name="Ray_nas_taus"
extends="baseVoltageDepTime"
description="Tau parameter to describe Navp">

<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
<Constant name="TEMP_SCALE" dimension="temperature" value="1 K"/>
<Constant name="R" dimension="none" value="8.315"/>
<Constant name="F" dimension="none" value="96480"/>

<Requirement name="rateScale" dimension="none"/>
<Requirement name="temperature" dimension="temperature"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<DerivedVariable name="T" dimension="none" value="temperature / TEMP_SCALE"/>

<DerivedVariable name="alpha" dimension="none" value="exp((1e-3*12*(V+45)*F) / (R*(T+0.01)))"/> <!-- NEURON code: 273.16 + celsius-->
<DerivedVariable name="beta" dimension="none" value="exp((1e-3*12*0.2*(V+45)*F) / (R*(T+0.01)))"/> <!-- NEURON code: 273.16 + celsius-->

<DerivedVariable name="tmp" value="beta / (3e-4*(1 + alpha))" dimension="none"/>
<ConditionalDerivedVariable name="t" dimension="time" exposure="t" >
<Case condition="(tmp / rateScale) .lt. 10" value="10 * rateScale * TIME_SCALE"/>
<Case value="tmp * TIME_SCALE"/>
</ConditionalDerivedVariable>

</Dynamics>

</ComponentType>

<ComponentType name="Ray_nas_sss_ar2_1"
extends="baseVoltageDepVariable"
description="steadyState parameter to describe Navp">

<Constant name="no_inact" dimension="none" value="1"/> <!-- 1: no inact, 0: max inact-->
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>

<DerivedVariable name="alpha" dimension="none" value="1 / (1 + exp((V+43)/2))"/>

<DerivedVariable name="x" exposure="x" dimension="none" value="alpha + no_inact*(1 - alpha)"/>
</Dynamics>

</ComponentType>


<ComponentType name="Ray_nas_sss_ar2_0_8"
extends="baseVoltageDepVariable"
description="steadyState parameter to describe Navp">

<Constant name="no_inact" dimension="none" value="0.8"/> <!-- 1: no inact, 0: max inact-->
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>

<DerivedVariable name="alpha" dimension="none" value="1 / (1 + exp((V+43)/2))"/>

<DerivedVariable name="x" exposure="x" dimension="none" value="alpha + no_inact*(1 - alpha)"/>
</Dynamics>

</ComponentType>

</neuroml>

0 comments on commit b044d69

Please sign in to comment.