-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from NeuroML/main
Copy main to master branch
- Loading branch information
Showing
59 changed files
with
937 additions
and
1,092 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
libneuroml | ||
pylems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(userdocs:hdf5)= | ||
# HDF5 support | ||
|
||
The XML serializations of large NeuroML models can be prohibitive to store. | ||
For such cases, NeuroML also includes support for saving models in the binary [HDF5](https://www.hdfgroup.org/solutions/hdf5) format via the [NeuroMLHdf5Writer in libNeuroML](https://libneuroml.readthedocs.io/en/stable/userdocs/writers.html#neuroml.writers.NeuroMLHdf5Writer). The same format can be exported also from the Java API ([example](https://github.com/NeuroML/org.neuroml.model/blob/master/src/test/java/org/neuroml/model/test/HDF5Test.java)). | ||
|
||
The format of the export is documented below: | ||
|
||
|
||
- {ref}`Network <schema:network>` is exported as a `network` HDF5 group with `id`, `notes`, and the `temperature` (optional) stored as attributes. | ||
- {ref}`Population <schema:population>` is exported as a group with id `population_<id of the population>` with `id`, `component`, `size`, `type`, and `property` tags stored as attributes. | ||
- If the population is a {ref}`population list <schema:populationlist>` that includes {ref}`instances <schema:instance>` of cells, the locations of cells (x, y, z), these are stored in a 3 column table ("chunked array") with a row per instance. | ||
|
||
- {ref}`Projection <schema:projection>` is exported as a group with id `project_<id of the projection>` with `id`, `type`, `presynapticPopulation`, `postSynapticPopulation`, `synapse` as attributes. | ||
- {ref}`Connection <schema:connection>` and {ref}`ConnectionWD <schema:connectionwd>` elements in projections are stored as rows in a table with the first two columns as the `pre_cell_id` and `post_cell_id` respectively, and the successive columns for the necessary attributes. | ||
|
||
- {ref}`ElectricalProjection <schema:electricalprojection>` is exported similar to Projection with the {ref}`ElectricalConnection <schema:electricalconnection>`, {ref}`ElectricalConnectionInstance <schema:electricalconnectioninstance>`, and {ref}`ElectricalConnectionInstanceW <schema:electricalconnectioninstancew>` entries stored in tables. | ||
- {ref}`ContinuousProjection <schema:continuousprojection>` is exported similar to Projection with the {ref}`ContinuousConnection <schema:continuousconnection>`, {ref}`ContinuousConnectionInstance <schema:continuousconnectioninstance>`, and {ref}`ContinuousConnectionInstanceW <schema:continuousconnectioninstancew>` entries stored in tables. | ||
- {ref}`InputList <schema:inputlist>` is exported similar to Projection with the {ref}`Input <schema:input>`, and {ref}`InputW <schema:inputw>` entries stored in tables. | ||
|
||
|
||
For more details, the source code of these export functions can be seen [here in the libNeuroML repository](https://github.com/NeuralEnsemble/libNeuroML/blob/2d8112178d8d82b07a20f8395ec22a23a6323a6c/neuroml/nml/helper_methods.py#L2548) and [here in org.neuroml.model](https://github.com/NeuroML/org.neuroml.model/blob/master/src/main/java/org/neuroml/model/util/hdf5/NeuroMLHDF5Writer.java). | ||
|
||
HDF5 NeuroML files can be read and processed by `jnml` and `pynml` in the same way as XML files (see [here](https://github.com/OpenSourceBrain/OpenCortex/tree/master/examples/HDF5) for LEMS Simulation file examples which reference HDF5 NeuroML models). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+3.3 KB
(110%)
source/Userdocs/NML2_examples/HH_single_compartment_example_sim-i.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.31 KB
(110%)
source/Userdocs/NML2_examples/HH_single_compartment_example_sim-iden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.77 KB
(110%)
source/Userdocs/NML2_examples/HH_single_compartment_example_sim-v.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 10 additions & 11 deletions
21
source/Userdocs/NML2_examples/LEMS_HH_single_compartment_example_sim.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
<Lems> | ||
|
||
<!-- | ||
This LEMS file has been automatically generated using PyNeuroML v1.1.1 (libNeuroML v0.5.5) | ||
This LEMS file has been automatically generated using PyNeuroML v1.1.10 (libNeuroML v0.5.8) | ||
--> | ||
|
||
<!-- Specify which component to run --> | ||
<Target component="HH_single_compartment_example_sim"/> | ||
|
||
<!-- Include core NeuroML2 ComponentType definitions --> | ||
<Include file="Cells.xml"/> | ||
<Include file="Networks.xml"/> | ||
<Include file="Simulation.xml"/> | ||
|
||
<Include file="HH_example_net.nml"/> | ||
<Include file="HH_example_cell.nml"/> | ||
<Include file="HH_example_na_channel.nml"/> | ||
<Include file="HH_example_k_channel.nml"/> | ||
<Include file="HH_example_leak_channel.nml"/> | ||
|
||
<Simulation id="HH_single_compartment_example_sim" length="300ms" step="0.01ms" target="single_hh_cell_network" seed="123"> <!-- Note seed: ensures same random numbers used every run --> | ||
|
||
<OutputFile id="output0" fileName="HH_single_compartment_example_sim.dat"> | ||
<OutputColumn id="pop0[0]/v" quantity="pop0[0]/v"/> | ||
<OutputColumn id="pop0[0]/iChannels" quantity="pop0[0]/iChannels"/> | ||
<OutputColumn id="pop0[0]/na/iDensity" quantity="pop0[0]/hh_b_prop/membraneProperties/na_channels/iDensity/"/> | ||
<OutputColumn id="pop0[0]/k/iDensity" quantity="pop0[0]/hh_b_prop/membraneProperties/k_channels/iDensity/"/> | ||
<OutputColumn id="pop0[0]/v" quantity="pop0[0]/v"/> | ||
<OutputColumn id="pop0[0]/iChannels" quantity="pop0[0]/iChannels"/> | ||
<OutputColumn id="pop0[0]/na/iDensity" quantity="pop0[0]/hh_b_prop/membraneProperties/na_channels/iDensity/"/> | ||
<OutputColumn id="pop0[0]/k/iDensity" quantity="pop0[0]/hh_b_prop/membraneProperties/k_channels/iDensity/"/> | ||
</OutputFile> | ||
|
||
</Simulation> | ||
|
||
</Lems> |
15 changes: 7 additions & 8 deletions
15
source/Userdocs/NML2_examples/LEMS_example-single-izhikevich2007cell-sim.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
<Lems> | ||
|
||
<!-- | ||
This LEMS file has been automatically generated using PyNeuroML v1.1.1 (libNeuroML v0.5.5) | ||
This LEMS file has been automatically generated using PyNeuroML v1.1.10 (libNeuroML v0.5.8) | ||
--> | ||
|
||
<!-- Specify which component to run --> | ||
<Target component="example-single-izhikevich2007cell-sim"/> | ||
|
||
<!-- Include core NeuroML2 ComponentType definitions --> | ||
<Include file="Cells.xml"/> | ||
<Include file="Networks.xml"/> | ||
<Include file="Simulation.xml"/> | ||
|
||
<Include file="izhikevich2007_single_cell_network.nml"/> | ||
|
||
<Simulation id="example-single-izhikevich2007cell-sim" length="1000ms" step="0.1ms" target="IzNet" seed="123"> <!-- Note seed: ensures same random numbers used every run --> | ||
|
||
<OutputFile id="output0" fileName="example-single-izhikevich2007cell-sim.v.dat"> | ||
<OutputColumn id="IzhPop0[0]" quantity="IzhPop0[0]/v"/> | ||
<OutputColumn id="IzhPop0[0]" quantity="IzhPop0[0]/v"/> | ||
</OutputFile> | ||
|
||
</Simulation> | ||
|
||
</Lems> |
Oops, something went wrong.