neurodamus.core package¶
neurodamus.core¶
The neurodamus.core package implements several helper modules for building circuits with Neuron. They can be seen as a High-Level Neuron API, and several examples are found under examples.
Classes
A wrapper over the neuron simulator. |
|
A singleton of MPI runtime information |
|
A wrapper class representing an instance of Neuron with the required neurodamus hoc and mod modules loaded |
|
|
A Cell abstraction. |
|
|
|
Helper Progressbar that only shows on Rank 0. |
Decorators
Decorator to collect, return timings and show the progress on a neuron run |
|
Convenience decorator which checks all processes are fine when f returns |
|
Decorator that makes a given func to run only in rank 0. |
Sub-Modules¶
A module implementing a high-level interface to Neuron cells. |
|
Runtime configuration |
|
Module defining cell mechanisms |
|
Py Wrappers for the HOC RNGs |
|
Stimuli sources. |
|
High-Level wrapper to Neuron's cell synapse mechanisms |
Module API¶
- neurodamus.core.MPI¶
alias of <neurodamus.core._mpi._MPI object>
- neurodamus.core.NeurodamusCore¶
alias of
_Neuron
- class neurodamus.core.Cell(*args, **kw)¶
A Cell abstraction. It allows users to instantiate Cells from morphologies or create them from scratch using the Cell.Builder
- class Builder¶
Enables building a cell from soma/axon blocks
- add_synapse(src_seg: Neuron.nrn.Segment, target_seg: Neuron.nrn.Segment, syn_props_obj: object, **conn_options: dict) object ¶
Adds an incoming synapse from another cell, according to the options.
- add_synaptic_receptor(target_seg, syn_props_obj, **custom)¶
Creates a raw neuron Synapse
- property builder¶
Returns the Section builder object, to build additional axon/dendrites
- connect_to(synapse_receptor, threshold=None, delay=None, weight=None)¶
Creates a synapse between the current cell soma extremity and a given synapse receptor Notes: This is a relatively low-level f, there is no automatic registration of the netcon
- init_soma(diam, name='soma', **params)¶
Creates a soma and returns the section builder NOTE: you must call create at the end so that the new sections are added to the cell
- load_morphology(morpho_path, export_commands=False)¶
Creates the cell compartments according to the given morphology
- class neurodamus.core.ProgressBarRank0(end, *args, **kwargs)¶
Helper Progressbar that only shows on Rank 0. For MPI clusters size > 1 it always uses simplified bars. Otherwise auto-detects (isatty).
- class neurodamus.core._neuron._Neuron¶
A wrapper over the neuron simulator.
- classmethod load_dll(dll_path)¶
Loads a Neuron mod file (typically an .so file in linux).
- classmethod load_hoc(mod_name)¶
Loads a hoc module, available in the path.
- classmethod require(*hoc_mods)¶
Load a set of hoc mods by name.
- classmethod run_sim(t_stop, *monitored_sections, **params)¶
A helper to run the simulation, recording the Voltage in the specified cell sections.
- Parameters:
t_stop – Stop time
*monitored_sections – Cell sections to be probed.
**params – Custom simulation parameters
Returns: A simulation object
- section_in_stack(sec)¶
A contect manager to push and pop a section to the Neuron stack.
Decorators
- neurodamus.core.return_neuron_timings(f)¶
Decorator to collect, return timings and show the progress on a neuron run
- neurodamus.core.mpi_no_errors(f)¶
Convenience decorator which checks all processes are fine when f returns
- neurodamus.core.run_only_rank0(f)¶
Decorator that makes a given func to run only in rank 0.
It will broadcast results IFF the user specifies return type notation. It handles nested level to avoid broadcasting while we are already in rank0_only mode