pyneuroml.neuron package

A package of utilities for exporting NEURON models to NeuroML 2 & for analysing/comparing NEURON models to NeuroML versions

Will use some some utilities from https://github.com/OpenSourceBrain/NEURONShowcase

pyneuroml.neuron.export_to_neuroml1(hoc_file, nml1_file_name, level=1, validate=True)

Export to NeuroML1.

NOTE: NeuroML1 is deprecated and supporting functions will be removed in a future release. Please use NeuroML2.

pyneuroml.neuron.export_to_neuroml2(hoc_or_python_file: str, nml2_file_name: str, includeBiophysicalProperties: bool = True, separateCellFiles: bool = False, known_rev_potentials: dict = {}, validate: bool = True) None

Export NEURON hoc morphology files to NeuroML2 format.

Please note that the conversion of NEURON Python scripts is not yet implemented.

Parameters
  • hoc_or_python_file (str) – NEURON hoc or Python file to convert

  • nml2_file_name (str) – name of NeuroML2 file to save to

  • includeBiophysicalProperties (bool) – whether or not to include biophysical properties in the conversion

  • separateCellFiles – whether cells should be exported to individual files

  • known_rev_potentials (dict with ions as keys, and their reveral potentials) – known reversal potentials

  • validate (bool) – whether the generated files should be validated

pyneuroml.neuron.analysis module