There is a utility in [pyNeuroML](https://github.com/NeuroML/pyNeuroML) which can print the summary info in a NeuroML file, e.g. this file https://github.com/NeuralEnsemble/libNeuroML/blob/development/neuroml/examples/test_files/simplenet.nml with: pynml-summary simplenet.nml prints: ``` ******************************************************* * NeuroMLDocument: simplenet * * ExpTwoSynapse: ['syn0'] * IafCell: ['iaf0'] * PulseGenerator: ['input0', 'input1', 'input2', 'input3', 'input4'] * * Network: simplenet * * 10 cells in 2 populations * Population: Pop0 with 5 components of type iaf0 * Population: Pop1 with 5 components of type iaf0 * * 16 connections in 1 projections * Projection: Proj0 from Pop0 to Pop1, synapse: syn0 * 16 connections: [(Connection 0: 0 -> 0), ...] * * 5 inputs in 5 input lists * Input list: il0 to Pop0, component input0 * 1 inputs: [(Input 0: 0:0(0.500000)), ...] * Input list: il1 to Pop0, component input1 * 1 inputs: [(Input 0: 1:0(0.500000)), ...] * Input list: il2 to Pop0, component input2 * 1 inputs: [(Input 0: 2:0(0.500000)), ...] * Input list: il3 to Pop0, component input3 * 1 inputs: [(Input 0: 3:0(0.500000)), ...] * Input list: il4 to Pop0, component input4 * 1 inputs: [(Input 0: 4:0(0.500000)), ...] * ******************************************************* ``` It would be useful if there was a similar executable **cnml-summary** which gets created when the NeuroML_API is installed (with sudo make install). Ideally this will be faster than the Python version for large files... An initial parsing of the XML file can be seen here: https://github.com/NeuroML/NeuroML_API/blob/master/test/example.cxx#L21
Activity
pgleeson commentedon Mar 27, 2019
Let me know if you've any questions @tuigimdochas
pgleeson commentedon Mar 28, 2019
Note: source of Python summary is in here: https://raw.githubusercontent.com/NeuralEnsemble/libNeuroML/development/neuroml/nml/nml.py (summary() method).
There's also a similar method in Java here: https://github.com/NeuroML/org.neuroml.model/blob/development/src/main/java/org/neuroml/model/util/NeuroMLConverter.java#L309