Skip to content

Commit

Permalink
Moving Test_soma.hoc & adding omv tests
Browse files Browse the repository at this point in the history
Cell with 2 Ca pools now matches between Neuron & NML2
Using 2mM for both external [Ca2+], see #6

@RokasSt
  • Loading branch information
pgleeson committed Jan 20, 2016
1 parent 65f119d commit dca7d16
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 46 deletions.
4 changes: 2 additions & 2 deletions NEURON/test/Test_Soma.hoc → NEURON/Test_Soma.hoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ usegui = 1
{load_file("stdgui.hoc")}

useCaHVA = 1
useCaLVA = 0
useCaLVA = 1
useNa = 1
useKV = 1

Expand Down Expand Up @@ -99,7 +99,7 @@ Soma {


tstop = 1500.0
dt = 0.002
dt = 0.001


objref v_time
Expand Down
9 changes: 9 additions & 0 deletions NEURON/test/.test.soma.mep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation

system: Testing Golgi

experiments:
pacemaking:
expected:
spike times: [0.057708, 0.072098, 0.086885, 0.103172, 0.121634, 0.142857, 0.167524, 0.195873, 0.45849, 0.488665, 0.522, 0.559223, 0.600191, 0.643916, 0.689861, 0.737398, 0.786036, 0.806109, 0.813881, 0.821587, 0.829297, 0.837013, 0.844747, 0.852503, 0.860291, 0.868091, 0.875922, 0.883763, 0.891624, 0.899505, 0.907404, 0.915321, 0.923264, 0.931233, 0.939201, 0.947183, 0.955181, 0.963203, 0.971227, 0.979265, 0.987316, 0.995388, 1.00906, 1.06011, 1.1128, 1.16508, 1.21716, 1.26882, 1.32031, 1.37175, 1.42315, 1.47431]

19 changes: 19 additions & 0 deletions NEURON/test/.test.soma.omt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation

target: ../Test_Soma.hoc
engine: NEURON

mep: .test.soma.mep
experiments:
pacemaking:
observables:
spike times:
file:
path: ../Soma.si.dat
columns: [0,1]
scaling: [1, 1]
spike detection:
method: threshold
threshold: 0
tolerance: 0

14 changes: 14 additions & 0 deletions NeuroML2/.test.soma2.jnml.omt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@

target: LEMS_Soma_Test_HELPER.xml
engine: jNeuroML

mep: ../NEURON/test/.test.soma.mep
experiments:
pacemaking:
observables:
spike times:
file:
path: Soma.v.dat
columns: [0,1]
scaling: [1, 1]
spike detection:
method: threshold
threshold: 0
tolerance: 0.0028
63 changes: 28 additions & 35 deletions NeuroML2/LEMS_Soma_Test_HELPER.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@

<!--Note: this could be: Simulation id="sim1" ... , but Component type="Simulation" ...
is used to allow validation of this file according to the LEMS schema specified above...-->
<Component type="Simulation" id="sim1" length="1500.0ms" step="0.001ms" target="network_Soma">
<Component type="Simulation" id="sim1" length="1500.0ms" step="0.0005ms" target="network_Soma">

<Display id="CG_v" title="Soma VOLTAGE" xmin="-100.0" xmax="1600.0" ymin="-75" ymax="50" timeScale="1ms">
<Line id="VOLTAGE" timeScale="1ms" quantity="CG_Test/0/TestSoma/v" scale="1 mV" color="#000000"/>
</Display>

<Display id="Rates" title="Rate variables" xmin="-100.0" xmax="1600.0" ymin="-0.1" ymax="1.1" timeScale="1ms">
<!-- <Line id="KA a" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/KA_all/Golgi_KA/a/q" scale="1" color="#000000"/>
<Line id="KA b" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/KA_all/Golgi_KA/b/q" scale="1" color="#FF0000"/>-->
<!--<Line id="NaP m" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaP_all/Golgi_NaP/m/q" scale="1" color="#FF0000"/>-->
<!--<Line id="NaR s" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaR_all/Golgi_NaR/s/q" scale="1" color="#000000"/>
<Line id="NaR f" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaR_all/Golgi_NaR/f/q" scale="1" color="#FF0000"/>-->
<!-- <Line id="KA a" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/KA_all/Golgi_KA/a/q" scale="1" color="#000000"/>
<Line id="KA b" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/KA_all/Golgi_KA/b/q" scale="1" color="#FF0000"/>-->
<!--<Line id="NaP m" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaP_all/Golgi_NaP/m/q" scale="1" color="#FF0000"/>-->
<!--<Line id="NaR s" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaR_all/Golgi_NaR/s/q" scale="1" color="#000000"/>
<Line id="NaR f" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaR_all/Golgi_NaR/f/q" scale="1" color="#FF0000"/>-->
<Line id="Na m" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/NaT_all/Golgi_NaT/m/q" scale="1" color="#000000"/>
<Line id="Na h" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/NaT_all/Golgi_NaT/h/q" scale="1" color="#FF0000"/>
<!-- <Line id="KM n" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/Kslow_all/Golgi_KM/n/q" scale="1" color="#FF0000"/>-->
<Line id="KV n" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/KV_all/Golgi_KV/n/q" scale="1" color="#FF0000"/>
<!--<Line id="hcn1 fast" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn1f_all/Golgi_hcn1f/f/q" scale="1" color="#FF0000"/>
<Line id="Na h" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/NaT_all/Golgi_NaT/h/q" scale="1" color="#FF0000"/>
<!-- <Line id="KM n" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/Kslow_all/Golgi_KM/n/q" scale="1" color="#FF0000"/>-->
<Line id="KV n" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/KV_all/Golgi_KV/n/q" scale="1" color="#FF0000"/>
<!--<Line id="hcn1 fast" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn1f_all/Golgi_hcn1f/f/q" scale="1" color="#FF0000"/>
<Line id="hcn1 slow" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn1s_all/Golgi_hcn1s/s/q" scale="1" color="#FF0000"/>-->
<!-- <Line id="hcn2 fast" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn2f_all/Golgi_hcn2f/f/q" scale="1" color="#FF0000"/>
<!-- <Line id="hcn2 fast" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn2f_all/Golgi_hcn2f/f/q" scale="1" color="#FF0000"/>
<Line id="hcn2 slow" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn2s_all/Golgi_hcn2s/s/q" scale="1" color="#FF0000"/>-->
<Line id="HVA s" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaHVA_all/Golgi_Ca_HVA/s/q" scale="1" color="#000000"/>
<Line id="HVA u" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaHVA_all/Golgi_Ca_HVA/u/q" scale="1" color="#FF0000"/>
<!-- <Line id="LVA m" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaLVA_all/Golgi_Ca_LVA/m/q" scale="1" color="#000000"/>
<Line id="LVA h" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaLVA_all/Golgi_Ca_LVA/h/q" scale="1" color="#FF0000"/>-->
<!-- <Line id="BK c" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/BK_all/Golgi_BK/c/q" scale="1" color="#FF0000"/>-->
<Line id="HVA s" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaHVA_all/Golgi_Ca_HVA/s/q" scale="1" color="#000000"/>
<Line id="HVA u" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaHVA_all/Golgi_Ca_HVA/u/q" scale="1" color="#FF0000"/>
<Line id="LVA m" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaLVA_all/Golgi_Ca_LVA/m/q" scale="1" color="#000000"/>
<Line id="LVA h" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaLVA_all/Golgi_Ca_LVA/h/q" scale="1" color="#FF0000"/><!-- -->
<!-- <Line id="BK c" timeScale="1ms" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/BK_all/Golgi_BK/c/q" scale="1" color="#FF0000"/>-->
</Display>

<Display id="CG_conc" title="Soma [Ca2+]" xmin="-100.0" xmax="1600.0" ymin="-0.0006" ymax="0.006" timeScale="1ms">
Expand All @@ -87,9 +87,9 @@
<!-- <OutputFile id="rates" fileName="NaP.dat">
<OutputColumn id="m" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaP_all/Golgi_NaP/m/q" />
</OutputFile>-->
</OutputFile>-->

<!-- <OutputFile id="rates" fileName="NaR.dat">
<!-- <OutputFile id="rates" fileName="NaR.dat">
<OutputColumn id="s" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaR_all/Golgi_NaR/s/q"/>
<OutputColumn id="f" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/NaR_all/Golgi_NaR/f/q"/>
</OutputFile>-->
Expand All @@ -108,62 +108,55 @@
<OutputColumn id="s" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/KV_all/Golgi_KV/n/q"/>
</OutputFile>-->

<!--<OutputFile id="rates" fileName="hcn1f.dat">
<!--<OutputFile id="rates" fileName="hcn1f.dat">
<OutputColumn id="f" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn1f_all/Golgi_hcn1f/f/q"/>
</OutputFile>
<OutputFile id="rates" fileName="hcn1s.dat">
<OutputColumn id="s" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn1s_all/Golgi_hcn1s/s/q"/>
</OutputFile>-->

<!-- <OutputFile id="rates" fileName="hcn2f.dat">
<!-- <OutputFile id="rates" fileName="hcn2f.dat">
<OutputColumn id="f" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn2f_all/Golgi_hcn2f/f/q"/>
</OutputFile>
<OutputFile id="rates" fileName="hcn2s.dat">
<OutputColumn id="s" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/hcn2s_all/Golgi_hcn2s/s/q"/>
</OutputFile>-->

<!-- --><OutputFile id="rates_s" fileName="CaHVA_s.dat">
<OutputFile id="rates_s" fileName="CaHVA_s.dat">
<OutputColumn id="s" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaHVA_all/Golgi_Ca_HVA/s/q"/>
</OutputFile>
<OutputFile id="rates_u" fileName="CaHVA_u.dat">
<OutputFile id="rates_u" fileName="CaHVA_u.dat">
<OutputColumn id="u" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaHVA_all/Golgi_Ca_HVA/u/q"/>
</OutputFile>
<!--

<OutputFile id="rates_m" fileName="CaLVA_m.dat">
<OutputColumn id="s" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaLVA_all/Golgi_Ca_LVA/m/q"/>
</OutputFile>

<OutputFile id="rates_h" fileName="CaLVA_h.dat">
<OutputFile id="rates_h" fileName="CaLVA_h.dat">
<OutputColumn id="u" quantity="CG_Test/0/TestSoma/biophys/membraneProperties_twoCa/CaLVA_all/Golgi_Ca_LVA/h/q"/>
</OutputFile>-->
</OutputFile><!---->

<OutputFile id="Ca" fileName="Ca.dat">
<OutputColumn id="ca" quantity="CG_Test/0/TestSoma/caConc"/>
</OutputFile>

<OutputFile id="iCa" fileName="iCa.dat">
<OutputFile id="iCa" fileName="iCa.dat">
<OutputColumn id="ica" quantity="CG_Test/0/TestSoma/iCa"/>
</OutputFile>

<OutputFile id="Ca2" fileName="Ca2.dat">
<OutputFile id="Ca2" fileName="Ca2.dat">
<OutputColumn id="ca2" quantity="CG_Test/0/TestSoma/caConc2"/>
</OutputFile>

<OutputFile id="iCa2" fileName="iCa2.dat">
<OutputFile id="iCa2" fileName="iCa2.dat">
<OutputColumn id="ica2" quantity="CG_Test/0/TestSoma/iCa2"/>
</OutputFile>



<!--<OutputFile id="rates" fileName="BK.dat">
<OutputColumn id="c" quantity="CG_Test/0/TestSoma/biophys/membraneProperties/BK_all/Golgi_BK/c/q"/>
</OutputFile>-->







</Component>

Expand Down
13 changes: 4 additions & 9 deletions NeuroML2/TestSoma_HELPER.cell.nml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
id="TestSoma">



<cell type="cellTwoCaPools" id="TestSoma">

<notes>A single segment/compartment cell</notes>
Expand Down Expand Up @@ -71,8 +70,8 @@
<channelDensity condDensity="0.08 mS_per_cm2" id="hcn2s_all" ionChannel="Golgi_hcn2s" ion="h" erev="-20.0 mV"/>-->


<channelDensityNernst condDensity="0.460 mS_per_cm2" id="CaHVA_all" ionChannel="Golgi_Ca_HVA" ion="ca"/><!---->
<!--<channelDensityNernst_ca2 condDensity="0.25 mS_per_cm2" id="CaLVA_all" ionChannel="Golgi_Ca_LVA" ion="ca2"/>-->
<channelDensityNernst condDensity="0.460 mS_per_cm2" id="CaHVA_all" ionChannel="Golgi_Ca_HVA" ion="ca"/>
<channelDensityNernst_ca2 condDensity="0.25 mS_per_cm2" id="CaLVA_all" ionChannel="Golgi_Ca_LVA" ion="ca2"/>

<!-- <channelDensityNernst_ca2 condDensity="0.025 mS_per_cm2" id="CaLVA_all" ionChannel="Golgi_Ca_LVA" ion="ca2"/> was ok -->
<!-- <channelDensityNernst_ca2 condDensity="0.00025 mS_per_cm2" id="CaLVA_all" ionChannel="Golgi_Ca_LVA" ion="ca2"/> was ok -->
Expand All @@ -87,21 +86,17 @@
</membraneProperties_twoCa>



<intracellularProperties_twoCa>


<species id="ca" ion="ca" concentrationModel="Golgi_CALC" initialConcentration="5e-11mol_per_cm3" initialExtConcentration="2.0E-6 mol_per_cm3"/>

<species id="ca2" ion="ca2" concentrationModel="Golgi_CALC_ca2" initialConcentration="5e-11mol_per_cm3" initialExtConcentration="2.0E-6 mol_per_cm3"/>

<resistivity value="0.1 kohm_cm"/>


</intracellularProperties_twoCa>



</biophysicalProperties_twoCa>

</cell>
Expand Down Expand Up @@ -306,8 +301,8 @@


<ComponentType name="channelDensityNernst_ca2"
extends="baseChannelDensityCond"
description="This component is similar to the original component type _ channelDensityNernst _ but it is changed in order to have a reversal potential that depends on independent pool of Ca (ca2)">
extends="baseChannelDensityCond"
description="This component is similar to the original component type _ channelDensityNernst _ but it is changed in order to have a reversal potential that depends on independent pool of Ca (ca2)">

<Constant name="R" dimension="idealGasConstantDims" value="8.3144621 J_per_K_per_mol" description="TODO: Make this a global constant!"/>
<Constant name="zCa" dimension="none" value="2" description="TODO: Make this a global constant!"/>
Expand Down

2 comments on commit dca7d16

@pgleeson
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean issue #8

@RokasSt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you for helping with this issue

@pgleeson

Please sign in to comment.