diff --git a/.github/workflows/non-omv.yml b/.github/workflows/non-omv.yml index a70d6f3..9cd6657 100644 --- a/.github/workflows/non-omv.yml +++ b/.github/workflows/non-omv.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.9, "3.10" ] + python-version: [ 3.9, "3.12" ] runs-on: [ ubuntu-latest, macos-latest ] steps: @@ -33,8 +33,7 @@ jobs: run: | pip install git+https://github.com/OpenSourceBrain/osb-model-validation pip install scipy sympy matplotlib cython pandas tables - - pip install 'numpy<=1.23.0' # see https://github.com/OpenSourceBrain/osb-model-validation/issues/91 + - name: Regenerate and test run: | @@ -42,6 +41,8 @@ jobs: omv install netpyne omv install pyNeuroML + pip list + export NEURON_HOME=$pythonLocation omv list -V diff --git a/.github/workflows/omv-ci.yml b/.github/workflows/omv-ci.yml index 78ad014..b85ab0b 100644 --- a/.github/workflows/omv-ci.yml +++ b/.github/workflows/omv-ci.yml @@ -1,6 +1,8 @@ name: Continuous builds on: + schedule: + - cron: "1 1 10 */1 *" # Run once a month to test... push: branches: [ master, development, experimental ] pull_request: @@ -9,11 +11,11 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 # for eden... strategy: fail-fast: false matrix: - python-version: [ 3.8, 3.9, "3.10" ] + python-version: [ 3.9, "3.10", "3.12" ] engine: [ NetPyNE, jNeuroML, jNeuroML_NEURON, jNeuroML_NetPyNE, jNeuroML_EDEN, jNeuroML_validate ] steps: @@ -23,12 +25,17 @@ jobs: with: python-version: ${{ matrix.python-version }} + + - name: Ensure setuptools is up-to-date + run: | + pip install --upgrade setuptools + - name: Install OMV run: | pip install git+https://github.com/OpenSourceBrain/osb-model-validation + pip install scipy sympy matplotlib cython pandas tables - pip install 'numpy<=1.23.0' # see https://github.com/OpenSourceBrain/osb-model-validation/issues/91 - name: Run OMV tests on engine ${{ matrix.engine }} run: | diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d57d157..0000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Framework for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation - -dist: xenial -sudo: false - -addons: - apt: - packages: - - python-tk - - python-lxml - - python-tornado - - python-tables - -language: python -python: - - 2.7 - - 3.7 - -env: - - OMV_ENGINE=jNeuroML - - OMV_ENGINE=jNeuroML_NEURON - - OMV_ENGINE=jNeuroML_validate - - OMV_ENGINE=jNeuroML_NetPyNE - - OMV_ENGINE=NetPyNE - -install: - - pip install git+https://github.com/OpenSourceBrain/osb-model-validation - - pip install numpy scipy # Why is this needed? Scipy doesn't seem to get installed correctly with addons above... - - pip install tables # Ditto - - pip install matplotlib - - pip install future pandas matplotlib-scalebar bokeh - #- pip install neuron # to test - need to find out where nrn installed... - -script: - - omv list-engines -V - - omv all -V - - pwd - - ls -al NeuroML2 - - cd NeuroML2/scaling - - if [[ ${OMV_ENGINE} == "jNeuroML_NetPyNE" ]]; then python LEMS_Balanced_hdf5_netpyne.py ; fi - - cd ../.. - #- if [[ ${OMV_ENGINE} == "jNeuroML_NetPyNE" ]]; then ./regenerateAndTest.sh ; fi - - omv list-engines -V - - env - - - - - diff --git a/NetPyNE/ACnet/AMPA_syn.mod b/NetPyNE/ACnet/AMPA_syn.mod index 820c4c8..220963b 100644 --- a/NetPyNE/ACnet/AMPA_syn.mod +++ b/NetPyNE/ACnet/AMPA_syn.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=AMPA_syn type=expTwoSynapse) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/AMPA_syn_inh.mod b/NetPyNE/ACnet/AMPA_syn_inh.mod index 9dd734c..711fc4b 100644 --- a/NetPyNE/ACnet/AMPA_syn_inh.mod +++ b/NetPyNE/ACnet/AMPA_syn_inh.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=AMPA_syn_inh type=expTwoSynapse) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/BackgroundRandomIClamps.mod b/NetPyNE/ACnet/BackgroundRandomIClamps.mod index 63fcb1a..75726ed 100644 --- a/NetPyNE/ACnet/BackgroundRandomIClamps.mod +++ b/NetPyNE/ACnet/BackgroundRandomIClamps.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=BackgroundRandomIClamps type=pulseGen COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Ca_conc.mod b/NetPyNE/ACnet/Ca_conc.mod index df26517..154f15b 100644 --- a/NetPyNE/ACnet/Ca_conc.mod +++ b/NetPyNE/ACnet/Ca_conc.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Ca_conc type=fixedFactorConcentration COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Ca_pyr.mod b/NetPyNE/ACnet/Ca_pyr.mod index b824008..977e845 100644 --- a/NetPyNE/ACnet/Ca_pyr.mod +++ b/NetPyNE/ACnet/Ca_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Ca_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/GABA_syn.mod b/NetPyNE/ACnet/GABA_syn.mod index f88a881..61c80db 100644 --- a/NetPyNE/ACnet/GABA_syn.mod +++ b/NetPyNE/ACnet/GABA_syn.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=GABA_syn type=expTwoSynapse) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/GABA_syn_inh.mod b/NetPyNE/ACnet/GABA_syn_inh.mod index 51343f1..5450cc0 100644 --- a/NetPyNE/ACnet/GABA_syn_inh.mod +++ b/NetPyNE/ACnet/GABA_syn_inh.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=GABA_syn_inh type=expTwoSynapse) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Kahp_pyr.mod b/NetPyNE/ACnet/Kahp_pyr.mod index 57ee4e9..81d992d 100644 --- a/NetPyNE/ACnet/Kahp_pyr.mod +++ b/NetPyNE/ACnet/Kahp_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Kahp_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Kdr_bask.mod b/NetPyNE/ACnet/Kdr_bask.mod index 97ea8ae..984dbe0 100644 --- a/NetPyNE/ACnet/Kdr_bask.mod +++ b/NetPyNE/ACnet/Kdr_bask.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Kdr_bask type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Kdr_pyr.mod b/NetPyNE/ACnet/Kdr_pyr.mod index 04f4a91..15adac9 100644 --- a/NetPyNE/ACnet/Kdr_pyr.mod +++ b/NetPyNE/ACnet/Kdr_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Kdr_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py b/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py index fc3b0a1..3e22e4a 100644 --- a/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py +++ b/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py @@ -37,9 +37,9 @@ This NETPYNE file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ''' # Main NetPyNE script for: network_ACnet2 @@ -69,7 +69,7 @@ def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False, abs_to self.report_file.write('SimulationFile=%s\n'%__file__) self.report_file.write('PythonVersion=%s\n'%sys.version.replace('\n',' ')) self.report_file.write('NeuronVersion=%s\n'%h.nrnversion()) - self.report_file.write('NeuroMLExportVersion=1.10.1\n') + self.report_file.write('NeuroMLExportVersion=1.11.0\n') self.report_file.close() diff --git a/NetPyNE/ACnet/LeakConductance_bask.mod b/NetPyNE/ACnet/LeakConductance_bask.mod index 5f9bd49..9e1aa52 100644 --- a/NetPyNE/ACnet/LeakConductance_bask.mod +++ b/NetPyNE/ACnet/LeakConductance_bask.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=LeakConductance_bask type=ionChannelP COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/LeakConductance_pyr.mod b/NetPyNE/ACnet/LeakConductance_pyr.mod index 0071232..4b036b0 100644 --- a/NetPyNE/ACnet/LeakConductance_pyr.mod +++ b/NetPyNE/ACnet/LeakConductance_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=LeakConductance_pyr type=ionChannelPa COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Na_bask.mod b/NetPyNE/ACnet/Na_bask.mod index 0c5a80b..ad94778 100644 --- a/NetPyNE/ACnet/Na_bask.mod +++ b/NetPyNE/ACnet/Na_bask.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Na_bask type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/ACnet/Na_pyr.mod b/NetPyNE/ACnet/Na_pyr.mod index afae748..ac5aeb6 100644 --- a/NetPyNE/ACnet/Na_pyr.mod +++ b/NetPyNE/ACnet/Na_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Na_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py b/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py index 68ac954..e88716a 100644 --- a/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py +++ b/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py @@ -11,9 +11,9 @@ This NETPYNE file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ''' # Main NetPyNE script for: net1 @@ -43,7 +43,7 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_to self.report_file.write('SimulationFile=%s\n'%__file__) self.report_file.write('PythonVersion=%s\n'%sys.version.replace('\n',' ')) self.report_file.write('NeuronVersion=%s\n'%h.nrnversion()) - self.report_file.write('NeuroMLExportVersion=1.10.1\n') + self.report_file.write('NeuroMLExportVersion=1.11.0\n') self.report_file.close() diff --git a/NetPyNE/GapJunctions/gj1.mod b/NetPyNE/GapJunctions/gj1.mod index bcfd702..ce7dd28 100644 --- a/NetPyNE/GapJunctions/gj1.mod +++ b/NetPyNE/GapJunctions/gj1.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=gj1 type=gapJunction) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/GapJunctions/iaf.mod b/NetPyNE/GapJunctions/iaf.mod index 97443b0..f9b7732 100644 --- a/NetPyNE/GapJunctions/iaf.mod +++ b/NetPyNE/GapJunctions/iaf.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=iaf type=iafCell) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/GapJunctions/pulseGen1.mod b/NetPyNE/GapJunctions/pulseGen1.mod index bde95e6..b64f53c 100644 --- a/NetPyNE/GapJunctions/pulseGen1.mod +++ b/NetPyNE/GapJunctions/pulseGen1.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=pulseGen1 type=pulseGenerator) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/GapJunctions/pulseGen2.mod b/NetPyNE/GapJunctions/pulseGen2.mod index 3509c07..a092597 100644 --- a/NetPyNE/GapJunctions/pulseGen2.mod +++ b/NetPyNE/GapJunctions/pulseGen2.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=pulseGen2 type=pulseGenerator) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/HHSmall/HHSmall.py b/NetPyNE/HHSmall/HHSmall.py index 3d1b915..efe2ad1 100644 --- a/NetPyNE/HHSmall/HHSmall.py +++ b/NetPyNE/HHSmall/HHSmall.py @@ -98,3 +98,8 @@ def generate_netParams(*argv): simConfig.analysis['plotRaster'] = True # Plot raster simConfig.analysis['plotTraces'] = {'include': [2]} # Plot raster simConfig.analysis['plot2Dnet'] = True # Plot 2D net cells and connections + +simConfig.validateNetParams=True + +cfg = simConfig +netParams = generate_netParams(None) \ No newline at end of file diff --git a/NetPyNE/HHSmall/index.npjson b/NetPyNE/HHSmall/index.npjson new file mode 100644 index 0000000..a464333 --- /dev/null +++ b/NetPyNE/HHSmall/index.npjson @@ -0,0 +1,6 @@ +{ + "mod_folder": "../HHSmall", + "simConfig": "HHSmall.py", + "python_run": "init.py", + "netParams": "HHSmall.py" +} \ No newline at end of file diff --git a/NetPyNE/HHSmall/init.py b/NetPyNE/HHSmall/init.py new file mode 100644 index 0000000..e9f3c35 --- /dev/null +++ b/NetPyNE/HHSmall/init.py @@ -0,0 +1,10 @@ +""" +init.py + +Starting script to run NetPyNE-based model. +""" + +from netpyne import sim + +cfg, netParams = sim.loadFromIndexFile('index.npjson') +sim.createSimulateAnalyze(netParams, cfg) diff --git a/NetPyNE/HybridTut/HybridTut.py b/NetPyNE/HybridTut/HybridTut.py index ee604ae..b2df439 100644 --- a/NetPyNE/HybridTut/HybridTut.py +++ b/NetPyNE/HybridTut/HybridTut.py @@ -116,3 +116,5 @@ simConfig.analysis['plotTraces'] = {'include': [1,51]} # plot recorded traces for this list of cells simConfig.analysis['plotRatePSD'] = {'include': ['allCells', 'PYR_HH', 'PYR_Izhi'], 'Fs': 200, 'smooth': 10} # plot recorded traces for this list of cells + +simConfig.validateNetParams=True diff --git a/NetPyNE/LEMS_2007One_netpyne.py b/NetPyNE/LEMS_2007One_netpyne.py index c9b8657..98b659d 100644 --- a/NetPyNE/LEMS_2007One_netpyne.py +++ b/NetPyNE/LEMS_2007One_netpyne.py @@ -9,9 +9,9 @@ This NETPYNE file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ''' # Main NetPyNE script for: net1 diff --git a/NetPyNE/RS.mod b/NetPyNE/RS.mod index 7ac284b..5767bc6 100644 --- a/NetPyNE/RS.mod +++ b/NetPyNE/RS.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=RS type=izhikevich2007Cell) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/RS_Iext.mod b/NetPyNE/RS_Iext.mod index 677626d..0aad522 100644 --- a/NetPyNE/RS_Iext.mod +++ b/NetPyNE/RS_Iext.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=RS_Iext type=pulseGenerator) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Ca_conc.mod b/NetPyNE/TwoCells/Ca_conc.mod index df26517..154f15b 100644 --- a/NetPyNE/TwoCells/Ca_conc.mod +++ b/NetPyNE/TwoCells/Ca_conc.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Ca_conc type=fixedFactorConcentration COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Ca_pyr.mod b/NetPyNE/TwoCells/Ca_pyr.mod index b824008..977e845 100644 --- a/NetPyNE/TwoCells/Ca_pyr.mod +++ b/NetPyNE/TwoCells/Ca_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Ca_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Input_0.mod b/NetPyNE/TwoCells/Input_0.mod index ed2ad88..352d4ef 100644 --- a/NetPyNE/TwoCells/Input_0.mod +++ b/NetPyNE/TwoCells/Input_0.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Input_0 type=pulseGenerator) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Input_1.mod b/NetPyNE/TwoCells/Input_1.mod index f9adf82..e18d39e 100644 --- a/NetPyNE/TwoCells/Input_1.mod +++ b/NetPyNE/TwoCells/Input_1.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Input_1 type=pulseGenerator) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Kahp_pyr.mod b/NetPyNE/TwoCells/Kahp_pyr.mod index 57ee4e9..81d992d 100644 --- a/NetPyNE/TwoCells/Kahp_pyr.mod +++ b/NetPyNE/TwoCells/Kahp_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Kahp_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Kdr_bask.mod b/NetPyNE/TwoCells/Kdr_bask.mod index 97ea8ae..984dbe0 100644 --- a/NetPyNE/TwoCells/Kdr_bask.mod +++ b/NetPyNE/TwoCells/Kdr_bask.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Kdr_bask type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Kdr_pyr.mod b/NetPyNE/TwoCells/Kdr_pyr.mod index 04f4a91..15adac9 100644 --- a/NetPyNE/TwoCells/Kdr_pyr.mod +++ b/NetPyNE/TwoCells/Kdr_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Kdr_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py index 1f27cfe..7571caf 100644 --- a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py +++ b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py @@ -30,9 +30,9 @@ This NETPYNE file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ''' # Main NetPyNE script for: network_ACnet2 @@ -62,7 +62,7 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_to self.report_file.write('SimulationFile=%s\n'%__file__) self.report_file.write('PythonVersion=%s\n'%sys.version.replace('\n',' ')) self.report_file.write('NeuronVersion=%s\n'%h.nrnversion()) - self.report_file.write('NeuroMLExportVersion=1.10.1\n') + self.report_file.write('NeuroMLExportVersion=1.11.0\n') self.report_file.close() diff --git a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne_data.json b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne_data.json index 2a84f0d..ea95e1d 100644 --- a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne_data.json +++ b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne_data.json @@ -677,7 +677,7 @@ } }, "netpyne_changeset": "", - "netpyne_version": "1.0.6", + "netpyne_version": "1.0.7", "simConfig": { "addSynMechs": true, "allowConnsWithWeight0": true, @@ -702,7 +702,7 @@ "dt": 0.01, "dump_coreneuron_model": false, "duration": 700.0, - "filename": "/Users/padraig/neuroConstruct/osb/showcase/NetPyNEShowcase/NeuroML2/TwoCells/LEMS_TwoCell_netpyne", + "filename": "LEMS_TwoCell_netpyne", "gatherOnlySimData": true, "gpu": false, "hParams": { @@ -719,6 +719,7 @@ "printPopAvgRates": false, "printRunTime": false, "printSynsAfterRule": false, + "progressBar": 2, "pt3dRelativeToCellLocation": true, "rand123GlobalIndex": null, "random123": false, diff --git a/NetPyNE/TwoCells/LeakConductance_bask.mod b/NetPyNE/TwoCells/LeakConductance_bask.mod index 5f9bd49..9e1aa52 100644 --- a/NetPyNE/TwoCells/LeakConductance_bask.mod +++ b/NetPyNE/TwoCells/LeakConductance_bask.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=LeakConductance_bask type=ionChannelP COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/LeakConductance_pyr.mod b/NetPyNE/TwoCells/LeakConductance_pyr.mod index 0071232..4b036b0 100644 --- a/NetPyNE/TwoCells/LeakConductance_pyr.mod +++ b/NetPyNE/TwoCells/LeakConductance_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=LeakConductance_pyr type=ionChannelPa COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Na_bask.mod b/NetPyNE/TwoCells/Na_bask.mod index 0c5a80b..ad94778 100644 --- a/NetPyNE/TwoCells/Na_bask.mod +++ b/NetPyNE/TwoCells/Na_bask.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Na_bask type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/Na_pyr.mod b/NetPyNE/TwoCells/Na_pyr.mod index afae748..ac5aeb6 100644 --- a/NetPyNE/TwoCells/Na_pyr.mod +++ b/NetPyNE/TwoCells/Na_pyr.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Na_pyr type=ionChannelHH) COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ENDCOMMENT diff --git a/NetPyNE/TwoCells/index.npjson b/NetPyNE/TwoCells/index.npjson new file mode 100644 index 0000000..6f9c337 --- /dev/null +++ b/NetPyNE/TwoCells/index.npjson @@ -0,0 +1,6 @@ +{ + "mod_folder": "../TwoCells", + "simConfig": "reload2.py", + "python_run": "init.py", + "netParams": "reload2.py" +} \ No newline at end of file diff --git a/NetPyNE/TwoCells/init.py b/NetPyNE/TwoCells/init.py new file mode 100644 index 0000000..e9f3c35 --- /dev/null +++ b/NetPyNE/TwoCells/init.py @@ -0,0 +1,10 @@ +""" +init.py + +Starting script to run NetPyNE-based model. +""" + +from netpyne import sim + +cfg, netParams = sim.loadFromIndexFile('index.npjson') +sim.createSimulateAnalyze(netParams, cfg) diff --git a/NetPyNE/TwoCells/loadNML.py b/NetPyNE/TwoCells/loadNML.py new file mode 100644 index 0000000..58409af --- /dev/null +++ b/NetPyNE/TwoCells/loadNML.py @@ -0,0 +1,8 @@ +from LEMS_TwoCell_netpyne import NetPyNESimulation + +n = NetPyNESimulation() +n.generate_json_only() + +print("Validating: %s"%n.simConfig.validateNetParams) + +cfg = n.simConfig diff --git a/NetPyNE/TwoCells/reload2.py b/NetPyNE/TwoCells/reload2.py new file mode 100644 index 0000000..660760c --- /dev/null +++ b/NetPyNE/TwoCells/reload2.py @@ -0,0 +1,64 @@ +# From https://github.com/harshagurnani/GoC_Varied_Inputs/blob/ankur/Tests/single_cell/test_single_cell_netpyne_load.py + +from pathlib import Path +from netpyne import sim +import json + +json_file = Path('LEMS_TwoCell_netpyne_data.json') +netParams_dict = None +simConfig_dict = None + +with json_file.open(mode='r') as f: + netpyne_info = json.load(f) + + netParams_dict = netpyne_info['net']['params'] + simConfig_dict = netpyne_info['simConfig'] + +''' + simConfig_dict['saveJson'] = False # Prevent overwriting json gnerated by nml export + simConfig_dict['saveDat'] = True # Save data from this run + print('> Creating, simulating, analyzing...') + sim.createSimulateAnalyze(netParams=netParams_dict, simConfig=simConfig_dict, + output=False) + +print(' - simConfig_dict (%s) with keys: \n %s'%(type(simConfig_dict),simConfig_dict.keys())) +print(' - netParams_dict (%s) with keys: \n %s'%(type(netParams_dict),netParams_dict.keys())) +print(" - netParams_dict['cellParams']: \n %s"%(netParams_dict['cellParams'])) +''' + +from netpyne.specs.simConfig import SimConfig +from netpyne.specs.netParams import NetParams + +cfg = SimConfig(simConfig_dict) +cfg.validateNetParams = True +cfg.verbose = True + + +for cell in netParams_dict['cellParams']: + for sec in netParams_dict['cellParams'][cell]['secs']: + if len(netParams_dict['cellParams'][cell]['secs'][sec]['ions'])==0: + netParams_dict['cellParams'][cell]['secs'][sec]['ions']['none']={'e':0,'i':0,"o":0} + for ion_name in netParams_dict['cellParams'][cell]['secs'][sec]['ions']: + ion = netParams_dict['cellParams'][cell]['secs'][sec]['ions'][ion_name] + if not 'o' in ion: ion['o'] = 0 + if not 'i' in ion: ion['i'] = 0 + print('>> %s - %s - %s'%(cell, sec, ion)) + +netParams = NetParams(netParams_dict) + +print(' - simConfig (%s) with keys: \n %s'%(type(cfg),cfg.todict().keys())) +print(' - netParams (%s) with keys: \n %s'%(type(netParams),netParams.todict().keys())) + + + + +import netpyne +#netpyne.sim.validator.validateNetParams = lambda a: (False, False) + +from netpyne.sim.validator import validateNetParams + +print('==============================') +validateNetParams(netParams) +print('==============================') + +print('> Done...') diff --git a/NetPyNE/UI/HHCellNetwork.txt_data.json b/NetPyNE/UI/HHCellNetwork.txt_data.json index 2e07b49..d770795 100644 --- a/NetPyNE/UI/HHCellNetwork.txt_data.json +++ b/NetPyNE/UI/HHCellNetwork.txt_data.json @@ -170,7 +170,7 @@ } }, "netpyne_changeset": "", - "netpyne_version": "1.0.6", + "netpyne_version": "1.0.7", "simConfig": { "addSynMechs": true, "allowConnsWithWeight0": true, @@ -212,6 +212,7 @@ "printPopAvgRates": false, "printRunTime": false, "printSynsAfterRule": false, + "progressBar": 2, "pt3dRelativeToCellLocation": true, "rand123GlobalIndex": null, "random123": false, diff --git a/NetPyNE/UI/LEMS_HHSimple_netpyne.py b/NetPyNE/UI/LEMS_HHSimple_netpyne.py index 59d259c..82b7ca1 100644 --- a/NetPyNE/UI/LEMS_HHSimple_netpyne.py +++ b/NetPyNE/UI/LEMS_HHSimple_netpyne.py @@ -9,9 +9,9 @@ This NETPYNE file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.1 - org.neuroml.model v1.10.1 - jLEMS v0.11.1 + org.neuroml.export v1.11.0 + org.neuroml.model v1.11.0 + jLEMS v0.12.0 ''' # Main NetPyNE script for: HHCellNetwork diff --git a/NetPyNE/UI/helpers.py b/NetPyNE/UI/helpers.py index 0909be7..8afde6d 100644 --- a/NetPyNE/UI/helpers.py +++ b/NetPyNE/UI/helpers.py @@ -18,6 +18,10 @@ ''' def convertAndImportLEMSSimulation(lemsFileName, verbose=True): + ## Why do these need to be set?? TODO: take out! + sim.nhosts = 5 + sim.rank = 1 + fullLemsFileName = os.path.abspath(lemsFileName) if verbose: print( @@ -43,7 +47,6 @@ def convertAndImportLEMSSimulation(lemsFileName, verbose=True): print("All keys: {}".format(netpyne_info.keys())) print("net keys: {}".format(netpyne_info['net'].keys())) - sim.loadAll(json_filename) print("Loaded network into NetPyNE containing %s which would run for %s ms"%([d for d in sim.net.params.popParams.keys()], sim.cfg.duration)) diff --git a/NetPyNE/UI/output_data.json b/NetPyNE/UI/output_data.json index f724fc9..2dd2c95 100644 --- a/NetPyNE/UI/output_data.json +++ b/NetPyNE/UI/output_data.json @@ -2531,7 +2531,7 @@ } }, "netpyne_changeset": "", - "netpyne_version": "1.0.6", + "netpyne_version": "1.0.7", "simConfig": { "addSynMechs": true, "allowConnsWithWeight0": true, @@ -2564,6 +2564,7 @@ "printPopAvgRates": false, "printRunTime": false, "printSynsAfterRule": false, + "progressBar": 2, "pt3dRelativeToCellLocation": true, "rand123GlobalIndex": null, "random123": false, diff --git a/NeuroML2/HHSim.json b/NeuroML2/HHSim.json deleted file mode 100644 index 7322fc2..0000000 --- a/NeuroML2/HHSim.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "netParams": { - "_labelid": 0, - "cellParams": { - "hhcell": { - "conds": { - "cellModel": "hhcell", - "cellType": "hhcell" - }, - "secLists": { - "soma_group": [ - "soma" - ] - }, - "secs": { - "soma": { - "geom": { - "Ra": 34.56, - "cm": 1.6, - "pt3d": [ - [ - 0.0, - 0.0, - 0.0, - 17.841242 - ], - [ - 0.0, - 17.841242, - 0.0, - 17.841242 - ] - ] - }, - "ions": { - "k": { - "e": -79.0 - }, - "na": { - "e": 51.0 - } - }, - "mechs": { - "kChan": { - "gmax": 0.031 - }, - "naChan": { - "gmax": 0.121 - }, - "passiveChan": { - "e": -57.0, - "gmax": 0.00031 - } - }, - "vinit": -70.0 - } - } - } - }, - "connParams": {}, - "correctBorder": false, - "defaultDelay": 1, - "defaultThreshold": 10, - "defaultWeight": 1, - "defineCellShapes": false, - "popParams": { - "hhpop": { - "cellModel": "hhcell", - "cellType": "hhcell", - "cellsList": [ - { - "cellLabel": 0, - "x": 0, - "y": 0, - "z": 0 - } - ], - "numCells": 1, - "originalFormat": "NeuroML2", - "pop": "hhpop" - } - }, - "popTagsCopiedToCells": [ - "cellModel", - "cellType" - ], - "propVelocity": 500.0, - "rotateCellsRandomly": false, - "rxdParams": {}, - "scale": 1, - "scaleConnWeight": 1, - "scaleConnWeightModels": false, - "scaleConnWeightNetStims": 1, - "shape": "cuboid", - "sizeX": 100, - "sizeY": 100, - "sizeZ": 100, - "stimSourceParams": { - "INPUT_pulseGen1_hhpop_0_0_hhpop_0_soma_0_5": { - "label": "INPUT_pulseGen1_hhpop_0_0_hhpop_0_soma_0_5", - "originalFormat": "NeuroML2", - "type": "pulseGen1" - }, - "INPUT_pulseGen2_hhpop_0_0_hhpop_0_soma_0_5": { - "label": "INPUT_pulseGen2_hhpop_0_0_hhpop_0_soma_0_5", - "originalFormat": "NeuroML2", - "type": "pulseGen2" - } - }, - "stimTargetParams": { - "INPUT_pulseGen1_hhpop_0_0_hhpop_0_soma_0_5": { - "conds": { - "cellList": [ - 0 - ], - "pop": "hhpop" - }, - "loc": 0.5, - "sec": "soma", - "source": "INPUT_pulseGen1_hhpop_0_0_hhpop_0_soma_0_5" - }, - "INPUT_pulseGen2_hhpop_0_0_hhpop_0_soma_0_5": { - "conds": { - "cellList": [ - 0 - ], - "pop": "hhpop" - }, - "loc": 0.5, - "sec": "soma", - "source": "INPUT_pulseGen2_hhpop_0_0_hhpop_0_soma_0_5" - } - }, - "subConnParams": {}, - "synMechParams": {} - }, - "simConfig": { - "addSynMechs": true, - "allowConnsWithWeight0": true, - "allowSelfConns": false, - "analysis": {}, - "backupCfgFile": [], - "cache_efficient": false, - "checkErrors": false, - "checkErrorsVerbose": false, - "compactConnFormat": false, - "connRandomSecFromList": true, - "createNEURONObj": true, - "createPyStruct": true, - "cvode_active": false, - "cvode_atol": 0.001, - "distributeSynsUniformly": true, - "dt": 0.025, - "duration": 1000.0, - "filename": "model_output", - "gatherOnlySimData": false, - "hParams": { - "celsius": 6.3, - "clamp_resist": 0.001, - "v_init": -65.0 - }, - "includeParamsLabel": true, - "invertedYCoord": true, - "oneSynPerNetcon": true, - "printPopAvgRates": false, - "printRunTime": false, - "printSynsAfterRule": false, - "pt3dRelativeToCellLocation": true, - "rand123GlobalIndex": null, - "recordCells": [], - "recordCellsSpikes": -1, - "recordDipoles": false, - "recordLFP": [], - "recordStep": 0.1, - "recordStim": false, - "recordTime": true, - "recordTraces": {}, - "saveCSV": false, - "saveCellConns": true, - "saveCellSecs": true, - "saveDat": false, - "saveDataInclude": [ - "netParams", - "netCells", - "netPops", - "simConfig", - "simData" - ], - "saveDpk": false, - "saveFolder": "", - "saveHDF5": false, - "saveJson": false, - "saveLFPCells": false, - "saveMat": false, - "savePickle": false, - "saveTiming": false, - "seeds": { - "conn": 1, - "loc": 1, - "stim": 1 - }, - "simLabel": "", - "timestampFilename": false, - "timing": true, - "tstop": 1000.0, - "verbose": false - } -} \ No newline at end of file diff --git a/NeuroML2/HHSmall.net.nml b/NeuroML2/HHSmall.net.nml index 1587f7d..51f21c8 100644 --- a/NeuroML2/HHSmall.net.nml +++ b/NeuroML2/HHSmall.net.nml @@ -1,5 +1,5 @@ - NeuroML 2 file exported from NetPyNE v1.0.6 + NeuroML 2 file exported from NetPyNE v1.0.7 Single ion channel in NeuroML2 format: passive channel providing a leak conductance diff --git a/NeuroML2/HybridSmall.net.nml b/NeuroML2/HybridSmall.net.nml index bec71f5..730daee 100644 --- a/NeuroML2/HybridSmall.net.nml +++ b/NeuroML2/HybridSmall.net.nml @@ -1,5 +1,5 @@ - NeuroML 2 file exported from NetPyNE v1.0.6 + NeuroML 2 file exported from NetPyNE v1.0.7 Single ion channel in NeuroML2 format: passive channel providing a leak conductance diff --git a/NeuroML2/HybridTut.net.nml b/NeuroML2/HybridTut.net.nml index 9a6a592..5b02618 100644 --- a/NeuroML2/HybridTut.net.nml +++ b/NeuroML2/HybridTut.net.nml @@ -1,5 +1,5 @@ - NeuroML 2 file exported from NetPyNE v1.0.6 + NeuroML 2 file exported from NetPyNE v1.0.7 Single ion channel in NeuroML2 format: passive channel providing a leak conductance diff --git a/NeuroML2/LEMS_HHSmall.xml b/NeuroML2/LEMS_HHSmall.xml index cc03376..54b2653 100644 --- a/NeuroML2/LEMS_HHSmall.xml +++ b/NeuroML2/LEMS_HHSmall.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/LEMS_HybridSmall.xml b/NeuroML2/LEMS_HybridSmall.xml index 04c7e40..3e26e98 100644 --- a/NeuroML2/LEMS_HybridSmall.xml +++ b/NeuroML2/LEMS_HybridSmall.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/LEMS_HybridTut.xml b/NeuroML2/LEMS_HybridTut.xml index 3bf86aa..07f3aff 100644 --- a/NeuroML2/LEMS_HybridTut.xml +++ b/NeuroML2/LEMS_HybridTut.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/LEMS_M1.xml b/NeuroML2/LEMS_M1.xml index 5f81e9d..f782599 100644 --- a/NeuroML2/LEMS_M1.xml +++ b/NeuroML2/LEMS_M1.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/M1.net.nml b/NeuroML2/M1.net.nml index 41dbca7..fc63685 100644 --- a/NeuroML2/M1.net.nml +++ b/NeuroML2/M1.net.nml @@ -1,5 +1,5 @@ - NeuroML 2 file exported from NetPyNE v1.0.6 + NeuroML 2 file exported from NetPyNE v1.0.7 diff --git a/NeuroML2/np.py b/NeuroML2/np.py deleted file mode 100644 index bf48fe8..0000000 --- a/NeuroML2/np.py +++ /dev/null @@ -1,45 +0,0 @@ - -''' - The main function that's called by the NetPyNE loader, i.e. - - from np import load_netpyne - netParams, simConfig = load_netpyne() - - That functionality should fail if this method is missing or doesn't - return 2 dict like objects -''' -def load_netpyne(): - - nml2_file_name = 'HHCellNetwork.net.nml' - from netpyne import sim # import netpyne sim module - from netpyne import specs - - simConfig = specs.SimConfig() # object of class SimConfig to store the simulation configuration - netParams = sim.importNeuroML2(nml2_file_name, simConfig, simulate=False, analyze=True, returnNetParams =True) - - - return netParams, simConfig - - -''' - Not necessary to have this here, just a useful way to serialise the model -''' -def save_as_json(filename): - netParams, simConfig = load_netpyne() - - info = {'netParams':netParams.__dict__, - 'simConfig':simConfig.__dict__} - - from netpyne.sim.save import saveJSON - saveJSON(filename, info) - - print('Saved netParams and simConfig to file: %s'%filename) - - -''' - This obviously wouldn't be called with: from np import load_netpyne -''' -if __name__ == "__main__": - save_as_json('./HHSim.json') - - diff --git a/README.md b/README.md index ef5ca41..6b992eb 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,5 @@ See also info about [NetPyNE on OSBv2](https://docs.opensourcebrain.org/OSBv2/Ne + + diff --git a/regenerateAndTest.sh b/regenerateAndTest.sh index d4d79de..9eb9744 100755 --- a/regenerateAndTest.sh +++ b/regenerateAndTest.sh @@ -18,6 +18,9 @@ cd TwoCells rm -f *mod pynml LEMS_TwoCell.xml -netpyne -json +# Remove generated local filename +sed -i -e "s#/Users/padraig/neuroConstruct/osb/showcase/NetPyNEShowcase/NeuroML2/TwoCells/##g" LEMS_TwoCell_netpyne_data.json + cp LEMS_TwoCell_netpyne.py *.mod *.nml *json ../../NetPyNE/TwoCells cd ..