Classes for NEURON

class blenderneuron.nrn.neuronnode.NeuronNode(server_end=None, *args, **kwargs)[source]
static add_spine_pt3d(sec, xyz, diam)[source]
assign_gid_to_source_seg(pre_sec, pre_sec_x, threshold, gid)[source]
static clamp_section_x(x_in)[source]

When placing synapses, avoid using 0 and 1 section locations, esp. if extracellular potentials will be computed. See the warning comment in:

https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/

mechanisms/mech.html?highlight=i_membrane#mech-extracellular

Parameters:

x_in – 0-1 section location

Returns:

section location constrained to 0.001-0.999

create_netcon_syn(syn_class_name, syn_sec, syn_sec_x, syn_params, source_sec, source_x, threshold, delay, weight, source_on_rank, syn_on_rank, source_gid)[source]
create_synapses(syn_set)[source]
get_group_dicts(compressed=True)[source]
get_roots()[source]
get_sim_params()[source]
init_mpi(parallel_ctx, mpimap)[source]
initialize_groups(blender_groups, send_back=True)[source]
rank_section_name(single_rank_name)[source]
section_rx = re.compile('(.+?])\\.?(.*)')
segment_gid(sec_name, seg_id, has_spine)[source]

Only one gid can be associated with a segment. If more than one gid is assigned to a seg, only the last gid will send events to the post- synapse.

However, if the segment index can be computed from section.x location, locations that refer to the same segment e.g. section(0.49) and section(0.51) when nseg=3, can be identified.

This method generates a unique gid for each segment based on the section name and segment index. Where section(0) -> seg_id=0 and section(1) -> seg_id=nseg-1

If a spine was added, its assumed that the pre-syn location is at the head of the spine.

Parameters:
  • sec_name

  • seg_id

  • has_spine

Returns:

set_sim_params(params)[source]
update_groups(blender_groups)[source]
update_section_index()[source]
class blenderneuron.nrn.neuronrootgroup.NeuronRootGroup[source]
collect()[source]

Based on the group’s color level, gathers the values of the group’s collect_variable. This method is called at regular times during the simulation.

Returns:

None

create_collector()[source]

Greates a pair of NetStim and NetCon which trigger an event to recursively collect the activity of the group segments. This method does nothing if group.record_activity is False

from_skeletal_blender_group(blender_group, node)[source]
from_updated_blender_group(blender_group)[source]
save_recording_params(blender_group)[source]
class blenderneuron.nrn.neuronsection.NeuronSection[source]
collect(recursive=True)[source]

Recursively collects the section midpoint values of a group’s collect_variable (e.g. ‘v’)

Parameters:

recursive – Whether to collect child section values (otherwise stop at root/soma)

Returns:

None

collect_segments_recursive()[source]

Recursively collects the values of segments of a root section. Segments are given sequential 0-based names similar to NEURON cells and sections. For example, TestCell[0].dend[3][4] refers to first TestCell, 4th dendrite, 5th segment. Segment order is determined by the order in which they appear in NEURON’s xyz3d() function.

Returns:

None

from_nrn_section(nrn_section, group)[source]
from_skeletal_blender_root(source_section, group)[source]
from_updated_blender_root(blender_section)[source]
get_coords_and_radii()[source]
update_coords_and_radii(blender_section)[source]