NeuroML / org.neuroml.export

Export from NeuroML & LEMS
http://neuroml.org
GNU Lesser General Public License v3.0
8 stars 10 forks source link

jsonserializer: Treat `all` as a normal subgroup, reserve and use `nrn_all` as list of all segments/sections #100

Closed sanjayankur31 closed 1 year ago

pgleeson commented 1 year ago

Failing with other neuron models which implicitly use all, e.g. https://github.com/openworm/hodgkin_huxley_tutorial/tree/master/Tutorial/Source, probably because all is not used in the channelDensity (https://github.com/openworm/hodgkin_huxley_tutorial/blob/master/Tutorial/Source/hhcell.cell.nml), but needs to be added/created in the NEURON hoc:

>$ python LEMS_HH_SingleAP_nrn.py 

    Starting simulation in NEURON of 50ms generated from NeuroML2 model...

Population hhpop contains 1 instance(s) of component: hhcell of type: cell
    1 
NEURON: syntax error
 in hhcell.hoc near line 94
     forsec all v = -65.0  // units: mV
              ^
        xopen("hhcell.hoc")
      execute1("{xopen("hh...")
    load_file("hhcell.hoc")
Segmentation fault: 11
(py39n) Padraigs-MacBook-Pro-M2:Source padraig$ 
sanjayankur31 commented 1 year ago

We decided to go a different way with a little more intelligence built in:

sanjayankur31 commented 1 year ago

@pgleeson : updated, got to tweak the validator to check for all now.

pgleeson commented 1 year ago

Tested and looks good!