bmtk.simulator.bionet package#
Subpackages#
- bmtk.simulator.bionet.default_setters package
- Submodules
- bmtk.simulator.bionet.default_setters.cell_models module
Biophys1()
Biophys1_dict()
Biophys1_nml()
IntFire1()
NMLLoad()
aibs_allactive()
aibs_allactive_directed()
aibs_perisomatic()
aibs_perisomatic_directed()
fix_axon_allactive()
fix_axon_allactive_directed()
fix_axon_peri()
fix_axon_perisomatic_directed()
get_axon_direction()
loadHOC()
set_extracellular()
set_params_allactive()
set_params_peri()
- bmtk.simulator.bionet.default_setters.synapse_models module
- bmtk.simulator.bionet.default_setters.synaptic_weights module
- Module contents
- bmtk.simulator.bionet.modules package
- Submodules
- bmtk.simulator.bionet.modules.comsol module
- bmtk.simulator.bionet.modules.ecephys_module module
- bmtk.simulator.bionet.modules.ecp module
- bmtk.simulator.bionet.modules.iclamp module
- bmtk.simulator.bionet.modules.record_cellvars module
- bmtk.simulator.bionet.modules.record_clamp module
- bmtk.simulator.bionet.modules.record_netcons module
- bmtk.simulator.bionet.modules.record_spikes module
- bmtk.simulator.bionet.modules.save_synapses module
- bmtk.simulator.bionet.modules.seclamp module
- bmtk.simulator.bionet.modules.sim_module module
- bmtk.simulator.bionet.modules.xstim module
- bmtk.simulator.bionet.modules.xstim_waveforms module
- Module contents
Submodules#
bmtk.simulator.bionet.biocell module#
- class bmtk.simulator.bionet.biocell.BioCell(node, population_name, bionetwork)[source]#
Bases:
Cell
Implemntation of a morphologically and biophysically detailed type cell.
- property morphology#
The actual Morphology object instanstiation
- property morphology_file#
Value that’s stored in SONATA morphology column
- property seg_coords#
Coordinates for segments/sections of the morphology, need to make public for ecp, xstim, and other functionality that needs to compute the soma/dendritic coordinates of each cell
- property soma#
bmtk.simulator.bionet.bionetwork module#
- class bmtk.simulator.bionet.bionetwork.BioNetwork[source]#
Bases:
SimNetwork
- build_replay_inputs(spike_trains, edges_path, edge_types_path, source_node_set, target_node_set)[source]#
- get_gj_id(network, src_nid, trg_nid, source_gap)[source]#
Returns the gap junction id for the given nodes on a given network.
- Parameters:
source_gap – whether to return the id of the gap junction on the source node or the target node.
- property gid_pool#
- property local_gids#
- model_type_col = 'model_type'#
- property py_function_caches#
bmtk.simulator.bionet.biosimulator module#
- class bmtk.simulator.bionet.biosimulator.BioSimulator(network, dt, tstop, v_init, celsius, nsteps_block, start_from_state=False)[source]#
Bases:
Simulator
Includes methods to run and control the simulation
- property biophysical_gids#
- property cell_var_output#
- property cell_variables#
- property celsius#
- property dt#
- property h#
- property local_gids#
- property n_steps#
- property nsteps_block#
- post_fadvance()[source]#
Runs after every execution of fadvance (see advance.hoc) Called after every time step to perform computation and save data to memory block or to disk. The initial condition tstep=0 is not being saved
- run()[source]#
Run the simulation: if beginning from a blank state, then will use h.run(), if continuing from the saved state, then will use h.continuerun()
- property spikes_table#
- property tstop#
- property v_init#
bmtk.simulator.bionet.cell module#
- class bmtk.simulator.bionet.cell.Cell(node, population_name, network=None)[source]#
Bases:
object
A abstract base class for any cell object.
A base class for implementation of a cell-type objects like biophysical cells, LIF cells, etc. Do not instantiate a Cell object directly. Cell classes act as wrapper around HOC cell object with extra functionality for setting positions, synapses, and other parameters depending on the desired cell class.
- property gid#
- property group_id#
- property hobj#
- property netcons#
- property network_name#
- property node#
- property node_id#
- property soma_position#
bmtk.simulator.bionet.config module#
bmtk.simulator.bionet.gids module#
bmtk.simulator.bionet.iclamp module#
bmtk.simulator.bionet.io_tools module#
bmtk.simulator.bionet.morphology module#
- class bmtk.simulator.bionet.morphology.Morphology(hobj, rng_seed=None, swc_path=None)[source]#
Bases:
object
- choose_sections(section_names, distance_range, n_sections=1, cache=True)[source]#
Similar to find_sections, but will only N=n_section number of sections_ids/x values randomly selected (may return less if there aren’t as many sections
- Parameters:
section_names – ‘soma’, ‘dend’, ‘apic’, ‘axon’
distance_range – [float, float]: distance range of sections from the soma, in um.
n_sections – int: maximum number of sections to select
cache – caches the segments + probs so that next time the same section_names/distance_range values are called it will return the same values without recalculating. default True.
- Returns:
[int], [float]: A list of all section_ids and a list of all segment_x values (as defined by NEURON) that meet the given critera.
- find_sections(section_names, distance_range, cache=True)[source]#
Retrieves a list of sections ids and section x’s given a section name/type (eg axon, soma, apic, dend) and the distance from the soma.
- Parameters:
section_names – A list of sections to target, ‘soma’, ‘dend’, ‘apic’, ‘axon’
distance_range – [float, float]: distance range of sections from the soma, in um.
cache – caches the segments + probs so that next time the same section_names/distance_range values are called it will return the same values without recalculating. default True.
- Returns:
[float], [float]: A list of all section_ids and a list of all segment_x values (as defined by NEURON) that meet the given critera.
- classmethod load(hobj=None, morphology_file=None, rng_seed=None, cache_seg_props=True)[source]#
Factory method, perfered way to create a Morphology object
- Parameters:
hobj
morphology_file
rng_seed
cache_seg_props
- Returns:
- property n_sections#
- property nseg#
- sec_type_swc = {'apic': 4, 'apical': 4, 'axon': 2, 'axonal': 2, 'basal': 3, 'dend': 3, 'soma': 1, 'somatic': 1}#
- property sections#
- property seg_coords#
Get the coordinates of all segments of the cells. Each segment is defined by three values, the beginning of the segment (seg_coords.p0), the middle of the segment(seg_coords.p05), and the end (seg_coords.p1).
- property seg_props#
- property segments#
- property soma#
- property soma_position#
- property swc_map#
bmtk.simulator.bionet.nml_reader module#
- class bmtk.simulator.bionet.nml_reader.ChannelDensity(nml_element)[source]#
Bases:
NMLElement
- class bmtk.simulator.bionet.nml_reader.ChannelDensityNernst(nml_element)[source]#
Bases:
ChannelDensity
- class bmtk.simulator.bionet.nml_reader.ConcentrationModel(nml_element)[source]#
Bases:
NMLElement
- class bmtk.simulator.bionet.nml_reader.NMLTree(nml_path)[source]#
Bases:
object
- element_registry = {'{http://www.neuroml.org/schema/neuroml2}channelDensity': <class 'bmtk.simulator.bionet.nml_reader.ChannelDensity'>, '{http://www.neuroml.org/schema/neuroml2}channelDensityNernst': <class 'bmtk.simulator.bionet.nml_reader.ChannelDensityNernst'>, '{http://www.neuroml.org/schema/neuroml2}concentrationModel': <class 'bmtk.simulator.bionet.nml_reader.ConcentrationModel'>, '{http://www.neuroml.org/schema/neuroml2}resistivity': <class 'bmtk.simulator.bionet.nml_reader.Resistivity'>, '{http://www.neuroml.org/schema/neuroml2}specificCapacitance': <class 'bmtk.simulator.bionet.nml_reader.SpecificCapacitance'>}#
- nml_ns = '{http://www.neuroml.org/schema/neuroml2}'#
- class bmtk.simulator.bionet.nml_reader.Resistivity(nml_element)[source]#
Bases:
NMLElement
- class bmtk.simulator.bionet.nml_reader.SpecificCapacitance(nml_element)[source]#
Bases:
NMLElement
bmtk.simulator.bionet.nrn module#
- bmtk.simulator.bionet.nrn.load_neuron_modules(mechanisms_dir, templates_dir, default_templates=True, use_old_import3d=False)[source]#
- Parameters:
mechanisms_dir
templates_dir
default_templates
bmtk.simulator.bionet.pointprocesscell module#
- class bmtk.simulator.bionet.pointprocesscell.ConnectionStruct(edge_prop, src_node, nc, is_virtual=False)[source]#
Bases:
object
- property is_virtual#
- property source_node#
- property syn_weight#
- class bmtk.simulator.bionet.pointprocesscell.PointProcessCell(node, population_name, bionetwork)[source]#
Bases:
Cell
Implimentation of a Leaky Integrate-and-file neuron type cell.
- class bmtk.simulator.bionet.pointprocesscell.PointProcessCellSpontSyns(node, population_name, bionetwork)[source]#
Bases:
PointProcessCell
Special class that allows certain synapses to spontaneously fire (without spiking) at a specific time.
bmtk.simulator.bionet.pointsomacell module#
bmtk.simulator.bionet.pyfunction_cache module#
bmtk.simulator.bionet.seclamp module#
bmtk.simulator.bionet.sonata_adaptors module#
- class bmtk.simulator.bionet.sonata_adaptors.BioEdge(sonata_edge, edge_adaptor)[source]#
Bases:
SonataBaseEdge
- property afferent_section_id#
- property afferent_section_pos#
- class bmtk.simulator.bionet.sonata_adaptors.BioEdgeAdaptor(network)[source]#
Bases:
EdgeAdaptor
- class bmtk.simulator.bionet.sonata_adaptors.BioNode(node, prop_adaptor)[source]#
Bases:
SonataBaseNode
- property morphology_file#
- property position#
- property rotation_angle_xaxis#
- property rotation_angle_yaxis#
- property rotation_angle_zaxis#
- property rotations#
- property rotations_quaternion#
- class bmtk.simulator.bionet.sonata_adaptors.BioNodeAdaptor(network)[source]#
Bases:
NodeAdaptor