Bläddra i källkod

Merge pull request #12 from sanjayankur31/feat/neuroml_pg

Latest validated nml cells
Padraig Gleeson 3 månader sedan
förälder
incheckning
2b6dece2c8
43 ändrade filer med 358 tillägg och 30431 borttagningar
  1. 7 2
      .github/workflows/omv-ci.yml
  2. 1 0
      .gitignore
  3. 4 0
      NeuroML2/.test.net.jnmlnetpyne.omt
  4. 4 0
      NeuroML2/.test.net.jnmlneuron.omt
  5. 1 1
      NeuroML2/.test.pv.jnmlnetpyne.omt
  6. 1 1
      NeuroML2/.test.pyr.jnmlnetpyne.omt
  7. 1 1
      NeuroML2/.test.pyr.jnmlneuron.omt
  8. 4 0
      NeuroML2/.test.validate.omt
  9. 1 1
      NeuroML2/.test.vip.jnmlnetpyne.omt
  10. 75 0
      NeuroML2/AnalyseNetwork.py
  11. 116 0
      NeuroML2/Analysis_HL23Net_1.0.net.nml.md
  12. BIN
      NeuroML2/HL23Net_1.0.net.nml.circo.2.png
  13. BIN
      NeuroML2/HL23Net_1.0.net.nml.dot.6.png
  14. BIN
      NeuroML2/HL23Network_Chemical_conns_--sum_of_signed_weights-_cond_postpopsize-.png
  15. BIN
      NeuroML2/HL23Network_Chemical_conns_--sum_of_weights-_cond_postpopsize-.png
  16. BIN
      NeuroML2/HL23Network_Chemical_conns_-avg_weight_per_existant_conn-.png
  17. BIN
      NeuroML2/HL23Network_Chemical_conns_-number_of_conns-.png
  18. BIN
      NeuroML2/HL23Network_Chemical_conns_-sum_of_signed_weights_of_conns-.png
  19. 3 2
      NeuroML2/HL23PV.cell.nml
  20. 1 1
      NeuroML2/HL23PV.morph.cell.nml
  21. 3 2
      NeuroML2/HL23PV.pas.cell.nml
  22. 3 2
      NeuroML2/HL23PYR.cell.nml
  23. 1 1
      NeuroML2/HL23PYR.morph.cell.nml
  24. 3 2
      NeuroML2/HL23PYR.pas.cell.nml
  25. 0 30385
      NeuroML2/HL23PYR.tonic.cell.nml
  26. 3 2
      NeuroML2/HL23SST.cell.nml
  27. 1 1
      NeuroML2/HL23SST.morph.cell.nml
  28. 3 2
      NeuroML2/HL23SST.pas.cell.nml
  29. 3 2
      NeuroML2/HL23VIP.cell.nml
  30. 1 1
      NeuroML2/HL23VIP.morph.cell.nml
  31. 3 2
      NeuroML2/HL23VIP.pas.cell.nml
  32. 2 2
      NeuroML2/IClamp_HL23PV.net.nml
  33. 2 2
      NeuroML2/IClamp_HL23PYR.net.nml
  34. 76 0
      NeuroML2/LEMS_Sim_TestNetwork.xml
  35. 1 1
      NeuroML2/LargeNetwork.json
  36. 2 2
      NeuroML2/LargeNetwork.net.nml
  37. 1 1
      NeuroML2/Sim_LargeNetwork.json
  38. 1 1
      NeuroML2/Sim_TestNetwork.json
  39. 2 2
      NeuroML2/TestNetwork.json
  40. 4 4
      NeuroML2/TestNetwork.net.nml
  41. 1 1
      NeuroML2/create_test_network.py
  42. 17 1
      NeuroML2/postprocess_cells.py
  43. 6 3
      NeuroML2/regenerate.sh

+ 7 - 2
.github/workflows/omv-ci.yml

@@ -19,13 +19,18 @@ jobs:
         python-version: [ 3.9 ]
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
 
     - name: Set up Python  ${{ matrix.python-version }}
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v5
       with:
         python-version:  ${{ matrix.python-version }}
 
+    - name: Install HDF5 for pytables on macos-latest
+      if: ${{ matrix.runs-on == 'macos-latest' }}
+      run: |
+        brew install hdf5
+
     - name: Install OMV
       run: |
         pip install git+https://github.com/OpenSourceBrain/osb-model-validation

+ 1 - 0
.gitignore

@@ -25,6 +25,7 @@ x86_64/
 *_netpyne.py
 /NeuroML2/Sim_TestNetwork.json
 /NeuroML2/TestNetwork.json
+/NeuroML2/*spikes
 *_eden.py
 
 .mypy_cache/

+ 4 - 0
NeuroML2/.test.net.jnmlnetpyne.omt

@@ -0,0 +1,4 @@
+# Script for running automated tests on OSB, see https://github.com/OpenSourceBrain/osb-model-validation
+
+target: LEMS_Sim_TestNetwork.xml
+engine: jNeuroML_NEURON

+ 4 - 0
NeuroML2/.test.net.jnmlneuron.omt

@@ -0,0 +1,4 @@
+# Script for running automated tests on OSB, see https://github.com/OpenSourceBrain/osb-model-validation
+
+target: LEMS_Sim_TestNetwork.xml
+engine: jNeuroML_NEURON

+ 1 - 1
NeuroML2/.test.pv.jnmlnetpyne.omt

@@ -13,4 +13,4 @@ experiments:
           scaling: [1000,1000]
         spike detection:
           method: threshold
-        tolerance: 0.015155767611563384
+        tolerance: 0.013303396014594468

+ 1 - 1
NeuroML2/.test.pyr.jnmlnetpyne.omt

@@ -14,5 +14,5 @@ experiments:
           scaling: [1000,1000]
         spike detection:
           method: threshold
-        tolerance: 0.01784367390039428
+        tolerance: 0.015257634204685008
 

+ 1 - 1
NeuroML2/.test.pyr.jnmlneuron.omt

@@ -14,5 +14,5 @@ experiments:
           scaling: [1000,1000]
         spike detection:
           method: threshold
-        tolerance: 0.005721612826756955
+        tolerance: 0.0031355731310475274
 

+ 4 - 0
NeuroML2/.test.validate.omt

@@ -0,0 +1,4 @@
+# Script for running automated tests on OSB, see https://github.com/OpenSourceBrain/osb-model-validation 
+
+target: "*.cell.nml HL23.net.nml TestNetwork.net.nml"
+engine: jNeuroML_validate

+ 1 - 1
NeuroML2/.test.vip.jnmlnetpyne.omt

@@ -14,5 +14,5 @@ experiments:
           scaling: [1000,1000]
         spike detection:
           method: threshold
-        tolerance: 0.00494668572056722
+        tolerance: 0.004726833021875293
 

+ 75 - 0
NeuroML2/AnalyseNetwork.py

@@ -0,0 +1,75 @@
+import neuromllite
+from pyneuroml import pynml
+import os
+
+from neuromllite.MatrixHandler import MatrixHandler
+from neuromllite.GraphVizHandler import GraphVizHandler
+
+f = 'HL23Net_1.0.net.nml'
+#f = 'HL23Net_0.1.net.nml'
+
+level = 1
+
+print("Converting %s to matrix form, level %i" % (f, level))
+
+from neuroml.hdf5.NeuroMLXMLParser import NeuroMLXMLParser
+
+handler = MatrixHandler(level=level, 
+                        nl_network=None,
+                        show_already=False,
+                        save_figs_to_dir='.')
+
+currParser = NeuroMLXMLParser(handler)
+
+currParser.parse(f)
+
+handler.finalise_document()
+
+level_gv = 6
+engine = 'dot'
+
+def generate_graph(level_gv, engine):
+    handler_gv = GraphVizHandler(level_gv, 
+                                engine=engine, 
+                                nl_network=None,         
+                                include_ext_inputs=False,
+                                include_input_pops=False,
+                                view_on_render=False)
+            
+    currParser_gv = NeuroMLXMLParser(handler_gv)
+
+    currParser_gv.parse(f)
+
+    handler_gv.finalise_document()
+
+    os.rename('HL23Network.gv.png','%s.%s.%s.png'%(f,engine,level_gv))
+
+generate_graph(level_gv, engine)
+
+level_gv = 2
+engine = 'circo'
+
+generate_graph(level_gv, engine)
+
+
+info = '## Analysis of NeuroML network: %s\n\n'%(f)
+
+nml2_doc = pynml.read_neuroml2_file(f)
+
+net_info = nml2_doc.summary(show_includes=False)
+info +='```\n%s\n```\n'%(net_info)
+
+info +='![fig](%s.circo.2.png)\n'%(f)
+info +='![fig](%s.dot.6.png)\n'%(f)
+
+for w in handler.weight_arrays_to_show:
+
+    info +='### %s\n'%w
+    info +='![fig](%s)\n'%(handler.weight_array_figures[w])
+    info +='```\n%s\n```\n'%(handler.weight_arrays_to_show[w])
+    #weight_array_figures
+
+
+with open('Analysis_%s.md'%f,'w') as rm_file:
+    rm_file.write(info)
+

+ 116 - 0
NeuroML2/Analysis_HL23Net_1.0.net.nml.md

@@ -0,0 +1,116 @@
+## Analysis of NeuroML network: HL23Net_1.0.net.nml
+
+```
+*******************************************************
+* NeuroMLDocument: HL23Network
+*
+*  Network: HL23Network (temperature: 34.0 degC)
+*
+*   1000 cells in 4 populations 
+*     Population: HL23PV_pop with 70 components of type HL23PV_sim
+*       Locations: [(-65.3901, -116.9935, -946.9911), ...]
+*       Properties: color=0 0 1; region=L23; 
+*     Population: HL23PYR_pop with 800 components of type HL23PYR_sim
+*       Locations: [(-221.2233, 84.1923, -841.4886), ...]
+*       Properties: color=1 0 0; region=L23; 
+*     Population: HL23SST_pop with 50 components of type HL23SST_sim
+*       Locations: [(106.3510, -214.9518, -645.5753), ...]
+*       Properties: color=0 1 0; region=L23; 
+*     Population: HL23VIP_pop with 80 components of type HL23VIP_sim
+*       Locations: [(155.2388, 108.4729, -620.4400), ...]
+*       Properties: color=0.5 0.5 0.5; region=L23; 
+*
+*   657373 connections in 15 projections 
+*     Projection: proj_HL23PV_HL23PV from HL23PV_pop to HL23PV_pop, synapse: HL23PV_HL23PV_ProbUDFsyn
+*       26175 connections (wd): [(Connection 0: 58 -> 0:1849(0.66739), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PV_HL23PYR from HL23PV_pop to HL23PYR_pop, synapse: HL23PV_HL23PYR_ProbUDFsyn
+*       89216 connections (wd): [(Connection 0: 19 -> 0:511(0.75109), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PV_HL23SST from HL23PV_pop to HL23SST_pop, synapse: HL23PV_HL23SST_ProbUDFsyn
+*       2896 connections (wd): [(Connection 0: 24 -> 0:1673(0.96233), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PV_HL23VIP from HL23PV_pop to HL23VIP_pop, synapse: HL23PV_HL23VIP_ProbUDFsyn
+*       1295 connections (wd): [(Connection 0: 67 -> 0:488(0.94546), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PYR_HL23PV from HL23PYR_pop to HL23PV_pop, synapse: HL23PYR_HL23PV_ProbAMPANMDA
+*       41360 connections (wd): [(Connection 0: 668 -> 0:1082(0.66018), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PYR_HL23PYR from HL23PYR_pop to HL23PYR_pop, synapse: HL23PYR_HL23PYR_ProbAMPANMDA
+*       287706 connections (wd): [(Connection 0: 536 -> 0:440(0.77943), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PYR_HL23SST from HL23PYR_pop to HL23SST_pop, synapse: HL23PYR_HL23SST_ProbAMPANMDA
+*       61952 connections (wd): [(Connection 0: 536 -> 0:402(0.07810), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23PYR_HL23VIP from HL23PYR_pop to HL23VIP_pop, synapse: HL23PYR_HL23VIP_ProbAMPANMDA
+*       23592 connections (wd): [(Connection 0: 67 -> 0:2921(0.61882), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23SST_HL23PV from HL23SST_pop to HL23PV_pop, synapse: HL23SST_HL23PV_ProbUDFsyn
+*       8632 connections (wd): [(Connection 0: 32 -> 0:2144(0.11526), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23SST_HL23PYR from HL23SST_pop to HL23PYR_pop, synapse: HL23SST_HL23PYR_ProbUDFsyn
+*       90708 connections (wd): [(Connection 0: 32 -> 0:5796(0.61404), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23SST_HL23SST from HL23SST_pop to HL23SST_pop, synapse: HL23SST_HL23SST_ProbUDFsyn
+*       1236 connections (wd): [(Connection 0: 37 -> 0:1794(0.96906), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23SST_HL23VIP from HL23SST_pop to HL23VIP_pop, synapse: HL23SST_HL23VIP_ProbUDFsyn
+*       1225 connections (wd): [(Connection 0: 12 -> 0:1601(0.48278), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23VIP_HL23PV from HL23VIP_pop to HL23PV_pop, synapse: HL23VIP_HL23PV_ProbUDFsyn
+*       6248 connections (wd): [(Connection 0: 34 -> 0:405(0.52838), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23VIP_HL23SST from HL23VIP_pop to HL23SST_pop, synapse: HL23VIP_HL23SST_ProbUDFsyn
+*       12780 connections (wd): [(Connection 0: 59 -> 0:1557(0.58502), weight: 1.000000, delay: 0.50000 ms), ...]
+*     Projection: proj_HL23VIP_HL23VIP from HL23VIP_pop to HL23VIP_pop, synapse: HL23VIP_HL23VIP_ProbUDFsyn
+*       2352 connections (wd): [(Connection 0: 74 -> 0:2593(0.02680), weight: 1.000000, delay: 0.50000 ms), ...]
+*
+*   48650 inputs in 8 input lists 
+*     Input list: Gfluct_0 to HL23PYR_pop, component Gfluct_HL23PYR_0_5
+*       14400 inputs: [(Input 0: 0:905(0.885115)), ...]
+*     Input list: Gfluct_1 to HL23PYR_pop, component Gfluct_HL23PYR_0_1
+*       7200 inputs: [(Input 14400: 0:5626(0.943140)), ...]
+*     Input list: Gfluct_2 to HL23PYR_pop, component Gfluct_HL23PYR_0_3
+*       8800 inputs: [(Input 21600: 0:2316(0.982179)), ...]
+*     Input list: Gfluct_3 to HL23PYR_pop, component Gfluct_HL23PYR_0_7
+*       9600 inputs: [(Input 30400: 0:3938(0.516208)), ...]
+*     Input list: Gfluct_4 to HL23PYR_pop, component Gfluct_HL23PYR_0_9
+*       5600 inputs: [(Input 40000: 0:2813(0.971706)), ...]
+*     Input list: Gfluct_5 to HL23SST_pop, component Gfluct_HL23SST_0_5
+*       1000 inputs: [(Input 45600: 0:2955(0.992364)), ...]
+*     Input list: Gfluct_6 to HL23PV_pop, component Gfluct_HL23PV_0_5
+*       770 inputs: [(Input 46600: 0:1836(0.991165)), ...]
+*     Input list: Gfluct_7 to HL23VIP_pop, component Gfluct_HL23VIP_0_5
+*       1280 inputs: [(Input 47370: 0:1218(0.981438)), ...]
+*
+*******************************************************
+```
+![fig](HL23Net_1.0.net.nml.circo.2.png)
+![fig](HL23Net_1.0.net.nml.dot.6.png)
+### Chemical conns (avg weight per existant conn)
+![fig](./HL23Network_Chemical_conns_-avg_weight_per_existant_conn-.png)
+```
+[[1. 1. 1. 1.]
+ [1. 1. 1. 1.]
+ [1. 1. 1. 1.]
+ [1. 0. 1. 1.]]
+```
+### Chemical conns (number of conns)
+![fig](./HL23Network_Chemical_conns_-number_of_conns-.png)
+```
+[[ 26175.  89216.   2896.   1295.]
+ [ 41360. 287706.  61952.  23592.]
+ [  8632.  90708.   1236.   1225.]
+ [  6248.      0.  12780.   2352.]]
+```
+### Chemical conns (sum of signed weights of conns)
+![fig](./HL23Network_Chemical_conns_-sum_of_signed_weights_of_conns-.png)
+```
+[[ 26175.  89216.   2896.   1295.]
+ [ 41360. 287706.  61952.  23592.]
+ [  8632.  90708.   1236.   1225.]
+ [  6248.      0.  12780.   2352.]]
+```
+### Chemical conns ((sum of weights)*cond/postpopsize)
+![fig](./HL23Network_Chemical_conns_--sum_of_weights-_cond_postpopsize-.png)
+```
+[[ 373.92857143  111.52         57.92         16.1875    ]
+ [ 590.85714286  359.6325     1239.04        294.9       ]
+ [ 123.31428571  113.385        24.72         15.3125    ]
+ [  89.25714286    0.          255.6          29.4       ]]
+```
+### Chemical conns ((sum of signed weights)*cond/postpopsize)
+![fig](./HL23Network_Chemical_conns_--sum_of_signed_weights-_cond_postpopsize-.png)
+```
+[[ 373.92857143  111.52         57.92         16.1875    ]
+ [ 590.85714286  359.6325     1239.04        294.9       ]
+ [ 123.31428571  113.385        24.72         15.3125    ]
+ [  89.25714286    0.          255.6          29.4       ]]
+```

BIN
NeuroML2/HL23Net_1.0.net.nml.circo.2.png


BIN
NeuroML2/HL23Net_1.0.net.nml.dot.6.png


BIN
NeuroML2/HL23Network_Chemical_conns_--sum_of_signed_weights-_cond_postpopsize-.png


BIN
NeuroML2/HL23Network_Chemical_conns_--sum_of_weights-_cond_postpopsize-.png


BIN
NeuroML2/HL23Network_Chemical_conns_-avg_weight_per_existant_conn-.png


BIN
NeuroML2/HL23Network_Chemical_conns_-number_of_conns-.png


BIN
NeuroML2/HL23Network_Chemical_conns_-sum_of_signed_weights_of_conns-.png


+ 3 - 2
NeuroML2/HL23PV.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -23032,6 +23032,7 @@
                 <channelDensityNernst id="Ca_LVA_somatic" ionChannel="Ca_LVA" condDensity="0.09250008555398015 S_per_cm2" segmentGroup="soma_group" ion="ca"/>
                 <channelDensityNernst id="Ca_HVA_axonal" ionChannel="Ca_HVA" condDensity="0.002961469262723619 S_per_cm2" segmentGroup="axon_group" ion="ca"/>
                 <channelDensityNernst id="Ca_LVA_axonal" ionChannel="Ca_LVA" condDensity="5.9457835817342756e-05 S_per_cm2" segmentGroup="axon_group" ion="ca"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="2 uF_per_cm2"/>
                 <initMembPotential value="-80mV"/>
             </membraneProperties>

+ 1 - 1
NeuroML2/HL23PV.morph.cell.nml

@@ -4,7 +4,7 @@
     xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
     id = "NeuroML2_file_exported_from_NEURON">
 
-  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>

+ 3 - 2
NeuroML2/HL23PV.pas.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -23003,6 +23003,7 @@
         <biophysicalProperties id="biophys">
             <membraneProperties>
                 <channelDensity id="pas" ionChannel="pas" condDensity="0.00011830111773572024 S_per_cm2" erev="-83.92924122901199 mV" ion="non_specific"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="2 uF_per_cm2"/>
                 <initMembPotential value="-80mV"/>
             </membraneProperties>

+ 3 - 2
NeuroML2/HL23PYR.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -30366,6 +30366,7 @@
                         <inhomogeneousValue inhomogeneousParameter="PathLengthOverApicDends" value="1E9 * (0.148 * 1E-8) * ((2.087 * exp( 3.6161 * (p/606.3464))) - 0.8696)"/>
                     </variableParameter>
                 </channelDensityNonUniform>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="1 uF_per_cm2" segmentGroup="all_minus_myelin"/>
                 <specificCapacitance value="0.02 uF_per_cm2" segmentGroup="myelin_group"/>
                 <specificCapacitance value="2 uF_per_cm2" segmentGroup="apical_dendrite_group"/>

+ 1 - 1
NeuroML2/HL23PYR.morph.cell.nml

@@ -4,7 +4,7 @@
     xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
     id = "NeuroML2_file_exported_from_NEURON">
 
-  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>

+ 3 - 2
NeuroML2/HL23PYR.pas.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -30328,6 +30328,7 @@
         <biophysicalProperties id="biophys">
             <membraneProperties>
                 <channelDensity id="pas" ionChannel="pas" condDensity="0.0000954 S_per_cm2" erev="-80 mV" segmentGroup="all_minus_myelin" ion="non_specific"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="1 uF_per_cm2" segmentGroup="all_minus_myelin"/>
                 <specificCapacitance value="0.02 uF_per_cm2" segmentGroup="myelin_group"/>
                 <initMembPotential value="-80mV"/>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 30385
NeuroML2/HL23PYR.tonic.cell.nml


+ 3 - 2
NeuroML2/HL23SST.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -17427,6 +17427,7 @@
                 <channelDensityNernst id="Ca_LVA_somatic" ionChannel="Ca_LVA" condDensity="0.00314 S_per_cm2" segmentGroup="soma_group" ion="ca"/>
                 <channelDensityNernst id="Ca_HVA_axonal" ionChannel="Ca_HVA" condDensity="0.00145 S_per_cm2" segmentGroup="axon_group" ion="ca"/>
                 <channelDensityNernst id="Ca_LVA_axonal" ionChannel="Ca_LVA" condDensity="0.0627 S_per_cm2" segmentGroup="axon_group" ion="ca"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="1 uF_per_cm2" segmentGroup="all_minus_myelin"/>
                 <specificCapacitance value="0.02 uF_per_cm2" segmentGroup="myelin_group"/>
                 <specificCapacitance value="1 uF_per_cm2" segmentGroup="basal_dendrite_group"/>

+ 1 - 1
NeuroML2/HL23SST.morph.cell.nml

@@ -4,7 +4,7 @@
     xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
     id = "NeuroML2_file_exported_from_NEURON">
 
-  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>

+ 3 - 2
NeuroML2/HL23SST.pas.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -17397,6 +17397,7 @@
         <biophysicalProperties id="biophys">
             <membraneProperties>
                 <channelDensity id="pas" ionChannel="pas" condDensity="0.0000232 S_per_cm2" erev="-81.5 mV" segmentGroup="all_minus_myelin" ion="non_specific"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="1 uF_per_cm2" segmentGroup="all_minus_myelin"/>
                 <specificCapacitance value="0.02 uF_per_cm2" segmentGroup="myelin_group"/>
                 <initMembPotential value="-80mV"/>

+ 3 - 2
NeuroML2/HL23VIP.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -15414,6 +15414,7 @@
                 <channelDensityNernst id="Ca_LVA_somatic" ionChannel="Ca_LVA" condDensity="0.0034472458995879864 S_per_cm2" segmentGroup="soma_group" ion="ca"/>
                 <channelDensityNernst id="Ca_HVA_axonal" ionChannel="Ca_HVA" condDensity="2.819397237794038e-05 S_per_cm2" segmentGroup="axon_group" ion="ca"/>
                 <channelDensityNernst id="Ca_LVA_axonal" ionChannel="Ca_LVA" condDensity="0.010354001513952075 S_per_cm2" segmentGroup="axon_group" ion="ca"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="2 uF_per_cm2"/>
                 <initMembPotential value="-80mV"/>
             </membraneProperties>

+ 1 - 1
NeuroML2/HL23VIP.morph.cell.nml

@@ -4,7 +4,7 @@
     xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
     id = "NeuroML2_file_exported_from_NEURON">
 
-  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+  <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>

+ 3 - 2
NeuroML2/HL23VIP.pas.cell.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="NeuroML2_file_exported_from_NEURON">
-    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.1.0 HEAD (047dd824) 2022-03-25
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="NeuroML2_file_exported_from_NEURON">
+    <notes> NeuroML 2 file generated from ModelView by: NEURON -- VERSION 8.2.2 release/8.2 (93d41fafd) 2022-12-15
           Authors: Michael Hines, Sushil Kambampati and Padraig Gleeson,
           Yale University and UCL 
   </notes>
@@ -15385,6 +15385,7 @@
         <biophysicalProperties id="biophys">
             <membraneProperties>
                 <channelDensity id="pas" ionChannel="pas" condDensity="2.5756438955642182e-05 S_per_cm2" erev="-79.74132024971513 mV" ion="non_specific"/>
+                <spikeThresh value="10mV"/>
                 <specificCapacitance value="2 uF_per_cm2"/>
                 <initMembPotential value="-80mV"/>
             </membraneProperties>

+ 2 - 2
NeuroML2/IClamp_HL23PV.net.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="IClamp_HL23PV">
-    <notes>Generated by NeuroMLlite v0.5.8
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="IClamp_HL23PV">
+    <notes>Generated by NeuroMLlite v0.6.0
     Generated network: IClamp_HL23PV
     Generation seed: 1234
     NeuroMLlite parameters: 

+ 2 - 2
NeuroML2/IClamp_HL23PYR.net.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="IClamp_HL23PYR">
-    <notes>Generated by NeuroMLlite v0.5.8
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="IClamp_HL23PYR">
+    <notes>Generated by NeuroMLlite v0.6.0
     Generated network: IClamp_HL23PYR
     Generation seed: 1234
     NeuroMLlite parameters: 

+ 76 - 0
NeuroML2/LEMS_Sim_TestNetwork.xml

@@ -0,0 +1,76 @@
+<Lems>
+
+    <!-- 
+
+        This LEMS file has been automatically generated using PyNeuroML v1.3.5 (libNeuroML v0.6.1)
+
+     -->
+
+    <!-- Specify which component to run -->
+    <Target component="Sim_TestNetwork" reportFile="report.Sim_TestNetwork.txt"/>
+
+    <!-- Include core NeuroML2 ComponentType definitions -->
+    <Include file="Cells.xml"/>
+    <Include file="Networks.xml"/>
+    <Include file="Simulation.xml"/>
+
+    <Include file="PyNN.xml"/>
+    <Include file="TestNetwork.net.nml"/>
+    <Include file="HL23PV.cell.nml"/>
+    <Include file="HL23PYR.cell.nml"/>
+    <Include file="HL23VIP.cell.nml"/>
+    <Include file="HL23SST.cell.nml"/>
+    <Include file="synapses/AMPA_syn.synapse.nml"/>
+
+    <Simulation id="Sim_TestNetwork" length="300.0ms" step="0.01ms" target="TestNetwork" seed="1111">  <!-- Note seed: ensures same random numbers used every run -->
+        <Display id="Pop_HL23PV_v" title="Plots of Pop_HL23PV_v" timeScale="1ms" xmin="-30.0" xmax="330.0" ymin="-80" ymax="40">
+            <Line id="Pop_HL23PV_0_HL23PV_v" quantity="Pop_HL23PV/0/HL23PV/v" scale="1mV" color="#d54f33" timeScale="1ms"/>
+        </Display>
+
+        <Display id="Pop_HL23PYR_v" title="Plots of Pop_HL23PYR_v" timeScale="1ms" xmin="-30.0" xmax="330.0" ymin="-80" ymax="40">
+            <Line id="Pop_HL23PYR_0_HL23PYR_v" quantity="Pop_HL23PYR/0/HL23PYR/v" scale="1mV" color="#0534e4" timeScale="1ms"/>
+        </Display>
+
+        <Display id="Pop_HL23SST_v" title="Plots of Pop_HL23SST_v" timeScale="1ms" xmin="-30.0" xmax="330.0" ymin="-80" ymax="40">
+            <Line id="Pop_HL23SST_0_HL23SST_v" quantity="Pop_HL23SST/0/HL23SST/v" scale="1mV" color="#98e752" timeScale="1ms"/>
+        </Display>
+
+        <Display id="Pop_HL23VIP_v" title="Plots of Pop_HL23VIP_v" timeScale="1ms" xmin="-30.0" xmax="330.0" ymin="-80" ymax="40">
+            <Line id="Pop_HL23VIP_0_HL23VIP_v" quantity="Pop_HL23VIP/0/HL23VIP/v" scale="1mV" color="#bca074" timeScale="1ms"/>
+        </Display>
+
+        <OutputFile id="Sim_TestNetwork_Pop_HL23PV_v_dat" fileName="Sim_TestNetwork.Pop_HL23PV.v.dat">
+            <OutputColumn id="Pop_HL23PV_0_HL23PV_v" quantity="Pop_HL23PV/0/HL23PV/v"/>
+        </OutputFile>
+
+        <OutputFile id="Sim_TestNetwork_Pop_HL23PYR_v_dat" fileName="Sim_TestNetwork.Pop_HL23PYR.v.dat">
+            <OutputColumn id="Pop_HL23PYR_0_HL23PYR_v" quantity="Pop_HL23PYR/0/HL23PYR/v"/>
+        </OutputFile>
+
+        <OutputFile id="Sim_TestNetwork_Pop_HL23SST_v_dat" fileName="Sim_TestNetwork.Pop_HL23SST.v.dat">
+            <OutputColumn id="Pop_HL23SST_0_HL23SST_v" quantity="Pop_HL23SST/0/HL23SST/v"/>
+        </OutputFile>
+
+        <OutputFile id="Sim_TestNetwork_Pop_HL23VIP_v_dat" fileName="Sim_TestNetwork.Pop_HL23VIP.v.dat">
+            <OutputColumn id="Pop_HL23VIP_0_HL23VIP_v" quantity="Pop_HL23VIP/0/HL23VIP/v"/>
+        </OutputFile>
+
+        <EventOutputFile id="Sim_TestNetwork_Pop_HL23PV_spikes" fileName="Sim_TestNetwork.Pop_HL23PV.spikes" format="ID_TIME">
+            <EventSelection id="0" select="Pop_HL23PV/0/HL23PV" eventPort="spike"/>
+        </EventOutputFile>
+
+        <EventOutputFile id="Sim_TestNetwork_Pop_HL23PYR_spikes" fileName="Sim_TestNetwork.Pop_HL23PYR.spikes" format="ID_TIME">
+            <EventSelection id="0" select="Pop_HL23PYR/0/HL23PYR" eventPort="spike"/>
+        </EventOutputFile>
+
+        <EventOutputFile id="Sim_TestNetwork_Pop_HL23SST_spikes" fileName="Sim_TestNetwork.Pop_HL23SST.spikes" format="ID_TIME">
+            <EventSelection id="0" select="Pop_HL23SST/0/HL23SST" eventPort="spike"/>
+        </EventOutputFile>
+
+        <EventOutputFile id="Sim_TestNetwork_Pop_HL23VIP_spikes" fileName="Sim_TestNetwork.Pop_HL23VIP.spikes" format="ID_TIME">
+            <EventSelection id="0" select="Pop_HL23VIP/0/HL23VIP" eventPort="spike"/>
+        </EventOutputFile>
+
+    </Simulation>
+
+</Lems>

+ 1 - 1
NeuroML2/LargeNetwork.json

@@ -1,6 +1,6 @@
 {
     "LargeNetwork": {
-        "version": "NeuroMLlite v0.5.8",
+        "version": "NeuroMLlite v0.6.0",
         "notes": "Network example",
         "parameters": {
             "average_rate": "50 Hz",

+ 2 - 2
NeuroML2/LargeNetwork.net.nml

@@ -1,5 +1,5 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="LargeNetwork">
-    <notes>Generated by NeuroMLlite v0.5.8
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="LargeNetwork">
+    <notes>Generated by NeuroMLlite v0.6.0
     Generated network: LargeNetwork
     Generation seed: 1234
     NeuroMLlite parameters: 

+ 1 - 1
NeuroML2/Sim_LargeNetwork.json

@@ -1,6 +1,6 @@
 {
     "Sim_LargeNetwork": {
-        "version": "NeuroMLlite v0.5.8",
+        "version": "NeuroMLlite v0.6.0",
         "network": "LargeNetwork.json",
         "duration": 300.0,
         "dt": 0.01,

+ 1 - 1
NeuroML2/Sim_TestNetwork.json

@@ -1,6 +1,6 @@
 {
     "Sim_TestNetwork": {
-        "version": "NeuroMLlite v0.5.8",
+        "version": "NeuroMLlite v0.6.0",
         "network": "TestNetwork.json",
         "duration": 300.0,
         "dt": 0.01,

+ 2 - 2
NeuroML2/TestNetwork.json

@@ -1,9 +1,9 @@
 {
     "TestNetwork": {
-        "version": "NeuroMLlite v0.5.8",
+        "version": "NeuroMLlite v0.6.0",
         "notes": "Network example",
         "parameters": {
-            "average_rate": "100 Hz",
+            "average_rate": "200 Hz",
             "num_HL23PV": 1,
             "num_HL23PYR": 1,
             "num_HL23VIP": 1,

+ 4 - 4
NeuroML2/TestNetwork.net.nml

@@ -1,9 +1,9 @@
-<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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="TestNetwork">
-    <notes>Generated by NeuroMLlite v0.5.8
+<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"  xmlns:xs="http://www.w3.org/2001/XMLSchema" 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.1.xsd" id="TestNetwork">
+    <notes>Generated by NeuroMLlite v0.6.0
     Generated network: TestNetwork
     Generation seed: 1234
     NeuroMLlite parameters: 
-        average_rate = 100 Hz
+        average_rate = 200 Hz
         num_HL23PV = 1
         num_HL23PYR = 1
         num_HL23SST = 1
@@ -13,7 +13,7 @@
     <include href="HL23VIP.cell.nml"/>
     <include href="HL23SST.cell.nml"/>
     <include href="synapses/AMPA_syn.synapse.nml"/>
-    <poissonFiringSynapse id="pfs0" averageRate="100 Hz" synapse="AMPA_syn" spikeTarget="./AMPA_syn"/>
+    <poissonFiringSynapse id="pfs0" averageRate="200 Hz" synapse="AMPA_syn" spikeTarget="./AMPA_syn"/>
     <network id="TestNetwork" type="networkWithTemperature" temperature="34.0degC">
         <notes>Network example</notes>
         <property tag="recommended_dt_ms" value="0.01"/>

+ 1 - 1
NeuroML2/create_test_network.py

@@ -133,7 +133,7 @@ if __name__ == "__main__":
                 sim, net = generate({cell:1}, 300, config="IClamp",parameters={'stim_amp':'200pA'})
                 check_to_generate_or_run(sys.argv, sim)
 
-        sim, net = generate({'HL23PV':1, 'HL23PYR':1, 'HL23VIP':1, 'HL23SST':1}, 300, config="TestNetwork", parameters={'average_rate':'100 Hz'})
+        sim, net = generate({'HL23PV':1, 'HL23PYR':1, 'HL23VIP':1, 'HL23SST':1}, 1000, config="TestNetwork", parameters={'average_rate':'200 Hz'})
 
         check_to_generate_or_run(sys.argv, sim)
 

+ 17 - 1
NeuroML2/postprocess_cells.py

@@ -146,6 +146,10 @@ def postprocess_HL23PYR():
     cell.set_specific_capacitance("1 uF_per_cm2", group_id="all_minus_myelin")
     cell.set_init_memb_potential("-80mV")
 
+    # 10mV is default for Neuron spike threshold in NetCon
+    # https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/network/netcon.html
+    cell.biophysical_properties.membrane_properties.spike_threshes.append(neuroml.SpikeThresh(value="10mV", segment_groups='all'))
+
     # myelin
     cell.set_specific_capacitance("0.02 uF_per_cm2", group_id="myelin_group")
     cell.set_resistivity("0.1 kohm_cm", group_id="myelin_group")
@@ -285,7 +289,6 @@ def postprocess_HL23PYR():
         ion_channel="Ih",
         ion="hcn",
         erev="-45 mV",
-        validate=False,
     )
     varparam = cdnonuniform.add(
         "VariableParameter",
@@ -485,6 +488,10 @@ def postprocess_HL23PV():
     cell.set_specific_capacitance("2 uF_per_cm2", group_id="all")
     cell.set_init_memb_potential("-80mV")
 
+    # 10mV is default for Neuron spike threshold in NetCon
+    # https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/network/netcon.html
+    cell.biophysical_properties.membrane_properties.spike_threshes.append(neuroml.SpikeThresh(value="10mV", segment_groups='all'))
+
     # write passive cell before adding active properties
     write_neuroml2_file(celldoc, f"{cellname}.pas.cell.nml")
 
@@ -807,6 +814,11 @@ def postprocess_HL23SST():
     # myelin
     cell.set_specific_capacitance("0.02 uF_per_cm2", group_id="myelin_group")
     cell.set_resistivity("0.1 kohm_cm", group_id="myelin_group")
+
+    # 10mV is default for Neuron spike threshold in NetCon
+    # https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/network/netcon.html
+    cell.biophysical_properties.membrane_properties.spike_threshes.append(neuroml.SpikeThresh(value="10mV", segment_groups='all'))
+
     # write passive cell
     write_neuroml2_file(celldoc, f"{cellname}.pas.cell.nml")
 
@@ -1104,6 +1116,10 @@ def postprocess_HL23VIP():
     cell.set_specific_capacitance("2 uF_per_cm2", group_id="all")
     cell.set_init_memb_potential("-80mV")
 
+    # 10mV is default for Neuron spike threshold in NetCon
+    # https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/network/netcon.html
+    cell.biophysical_properties.membrane_properties.spike_threshes.append(neuroml.SpikeThresh(value="10mV", segment_groups='all'))
+
     # write passive cell
     write_neuroml2_file(celldoc, f"{cellname}.pas.cell.nml")
 

+ 6 - 3
NeuroML2/regenerate.sh

@@ -7,6 +7,11 @@ python postprocess_cells.py -postprocall
 
 rm -rf x86_64 arm64
 
+python create_test_network.py -all -nml
+python create_test_network.py -net2 -nml
+
+python create_test_network.py -net -jnmlnrn
+
 omv all -V 
 
 python getinfoneuroml.py VIP
@@ -14,7 +19,5 @@ python getinfoneuroml.py PV
 python getinfoneuroml.py PYR
 python getinfoneuroml.py SST
 
-python create_test_network.py -all -nml
-python create_test_network.py -net2 -nml
-
+echo "Tested all!"