This package provides Python libNeuroML, for working with neuronal models specified in NeuroML 2.
For more about libNeuroML see:
Michael Vella, Robert C. Cannon, Sharon Crook, Andrew P. Davison, Gautham Ganapathy, Hugh P. C. Robinson, R. Angus Silver and Padraig Gleeson, libNeuroML and PyLEMS: using Python to combine procedural and declarative modeling approaches in computational neuroscience Frontiers in Neuroinformatics 2014, doi: 10.3389/fninf.2014.00038
PLEASE CITE THE PAPER ABOVE IF YOU USE libNeuroML!
Documentation is available at http://readthedocs.org/docs/libneuroml/en/latest/
For installation instructions, see http://readthedocs.org/docs/libneuroml/en/latest/install.html
For an overview of all NeuroML related libraries/documentation/publications see https://docs.neuroml.org
A related package, pyNeuroML builds on this and provides functionality, scripts and modules for reading, writing, simulating and analysing NeuroML2/LEMS models.
pyNeuroML builds on: libNeuroML & PyLEMS and wraps functionality from jNeuroML.
Most of the work happens in the development branch. That branch is kept up to date with the development branches for NeuroML 2 and related libraries. See https://docs.neuroml.org/ for an overview of the various NeuroML libraries.
add
method to all NeuroML ComponentType classes that allows users to easily construct their NeuroML documents.append_to_element
will be deprecated in future releases, please use the add
method instead:copyright: Copyright 2021 by the libNeuroML team, see AUTHORS. Modified BSD License, see LICENSE for details.
A global method: neuroml.disable_create_time_validation
or something perhaps? This will set a module level variable somewhere and the validate methods can check its state.
OR: would this just mean that folks will disable create time validation completely and defeat its whole purpose? :thinking:
This also sets up a general framework for us to add more tests in libNeuroML.
setup_nml_cell
for all related helper functions: when we're adding a conductance density, for example, if morphology does not exist, create itsetup_nml_cell
to disable setting up of individual default groups@pgleeson : anything else?
Is your feature request related to a problem? Please describe. Currently, validation (using generateds), gives errors, but these aren't human readable. For example:
- Value "100ms" does not match xsd pattern restrictions: [['^(-?([0-9]*(\\.[0-9]+)?)([eE]-?[0-9]+)?[\\s]*(A|uA|nA|pA))$']]
What this is saying is that the user should check their value---the units or the quantity---but it's cryptic because it talks about "pattern restrictions".
Describe the solution you'd like Maybe we can "translate" these into human readable form. So, for example, if the error has "does not match xsd pattern restrictions", we can perhaps say "the value provided does not fit the specification---please check both the quantity and the units, and refer to the schema documentation for valid values"? If we can make the regular expression human readable here, that'll be good too, but I'm not sure how straightforward that is. There are libs like this, but randomly generated strings may not really help either.
We may be able to parse regexs and say "possible units: A/uA/..
maybe.
Describe alternatives you've considered NA
Additional context NA
Allows to do something like
fname = 'Morphologies/pyr/MouseLight_Final/CNG version/AA0995.CNG.swc'
SWCLoader.load_swc_single(fname).to_neuroml_morphology("pyr_morph")
and use successfully this morphology in NEURON simulations. Tested with https://neuromorpho.org/neuron_info.jsp?neuron_name=AA0995 . If you like it you can merge it; if you'd prefer not to merge right away, you can wait. I'll continue to use this code with other morphologies for a project of mine so I'll push fixes if this does not work with other morphologies.
I attached the generated morphology, for reference. The biophys is rubbish (they are the same as for the tutorial on the OLM cell), but the morphology seems reasonable to me.
validate()
method to each component type class definition by @sanjayankur31 in https://github.com/NeuralEnsemble/libNeuroML/pull/140add_unbranched_segments
to Cell
by @sanjayankur31 in https://github.com/NeuralEnsemble/libNeuroML/pull/148Full Changelog: https://github.com/NeuralEnsemble/libNeuroML/compare/v0.4.0...v0.4.1
Full Changelog: https://github.com/NeuralEnsemble/libNeuroML/compare/v0.3.1...v0.4.0
libNeuroML v0.3.1 for NeuroML 2.2 release
This is primarily a bugfix release to updates libNeuroML for NeuroML version 2.1.
As always, the simplest way to install libNeuroML is using pip
:
pip install --upgrade libneuroml
More information on libNeuroML can be found in the documentation. More information on NeuroML can be found in the NeuroML docs.
0.2.50
Version for NeuroML v2 beta 4 release
neuroml python neuronal-models