bsb_neuron package¶
Subpackages¶
Submodules¶
bsb_neuron.adapter module¶
- class bsb_neuron.adapter.NeuronAdapter(comm=None)¶
Bases:
SimulatorAdapter- Parameters:
comm – The mpi4py MPI communicator to use. Only nodes in the communicator will participate in the simulation. The first node will idle as the main node.
- better_concat(items)¶
- create_connections(simulation)¶
- create_neurons(simulation)¶
- property engine¶
- initial = -65¶
- load_balance(simulation)¶
- prepare(simulation)¶
Prepare the simulation environment and data structures for running a NEURON simulation.
This method initializes simulation-specific data, sets simulation parameters such as time resolution, temperature, and duration in the NEURON engine, performs load balancing across compute nodes, and creates neurons, connections, and devices according to the simulation configuration.
- Parameters:
simulation (bsb.simulation.simulation.Simulation) – The simulation instance to prepare.
- Returns:
The prepared simulation data container.
- Return type:
- Raises:
Propagates any exceptions raised during preparation, and cleans up partial data on failure.
- run(*simulations)¶
- class bsb_neuron.adapter.NeuronPopulation(model, instances: list)¶
Bases:
list- Parameters:
instances (list)
- class bsb_neuron.adapter.NeuronResult(simulation)¶
Bases:
SimulationResult- record(obj, **annotations)¶
- class bsb_neuron.adapter.NeuronSimulationData(simulation, result=None)¶
Bases:
SimulationDatatype simulation: bsb.simulation.simulation.Simulation
- bsb_neuron.adapter.fill_parameter_data(parameters, data)¶
bsb_neuron.cell module¶
- class bsb_neuron.cell.ArborizedModel(*args, _parent=None, _key=None, **kwargs)¶
Bases:
NeuronCellNeuron cell model using Arborize for morphology-based neuron construction.
- create(id, pos, morpho, rot, additional)¶
- get_node_name()¶
- model¶
Configuration attribute specifying the Arborize model type handler.
- class bsb_neuron.cell.NeuronCell(*args, _parent=None, _key=None, **kwargs)¶
Bases:
CellModelClass interfacing a NEURON cell model.
- create_instances(count, ids, pos, morpho, rot, additional)¶
Create multiple neuron cell instances.
- Parameters:
count (int) – Number of neuron instances to create.
ids – Iterable of identifiers for each neuron instance.
pos – Iterable of positions for each neuron instance.
morpho (bsb.morphologies.MorphologySet) – Iterable of morphology objects.
rot (bsb.morphologies.RotationSet) – Iterable of rotation data for each neuron instance.
additional – Dict of additional parameters with iterable values.
- Returns:
List of created neuron instances.
- Return type:
- get_node_name()¶
- class bsb_neuron.cell.ShimModel(*args, _parent=None, _key=None, **kwargs)¶
Bases:
NeuronCell- create(id, pos, morpho, rot, additional)¶
- get_node_name()¶
bsb_neuron.connection module¶
- class bsb_neuron.connection.NeuronConnection(*args, _parent=None, _key=None, **kwargs)¶
Bases:
ConnectionModelClass interfacing a NEURON connection.
- create_connections(simulation, simdata, connections)¶
Connect all the cell models with the defined connection models for the provided connectivity set.
- get_node_name()¶
- class bsb_neuron.connection.SynapseSpec(*args, _parent=None, _key=None, **kwargs)¶
Bases:
objectClass interfacing a NEURON synapse model.
- delay¶
Delay of the transmission between the presynaptic and the postsynaptic cells.
- get_node_name()¶
- parameters¶
List of parameters to assign to the synapse model.
- synapse¶
Name of the synapse model.
- weight¶
Weight of the connection between the presynaptic and the postsynaptic cells.
- class bsb_neuron.connection.TransceiverModel(*args, _parent=None, _key=None, **kwargs)¶
Bases:
NeuronConnection- create_connections(simulation, simdata, cs)¶
Connect all the cell models with the defined connection models for the provided connectivity set.
- create_receivers(simdata, cs)¶
- create_transmitters(simdata, cs)¶
- get_node_name()¶
- parameters¶
List of parameters to assign to the connection.
- source¶
Source variable to assign to the connection.
- synapses¶
List of synapse models to use for a connection.
bsb_neuron.device module¶
bsb_neuron.simulation module¶
- class bsb_neuron.simulation.NeuronSimulation(*args, _parent=None, _key=None, **kwargs)¶
Bases:
SimulationInterface between the scaffold model and the NEURON simulator.
- cell_models: cfgdict[NeuronCell]¶
Dictionary of cell models in the simulation.
- connection_models: cfgdict[NeuronConnection]¶
Dictionary of connection models in the simulation.
- devices: cfgdict[NeuronDevice]¶
Dictionary of devices in the simulation.
- get_node_name()¶
- initial¶
Initial membrane potential for all neurons.
- resolution¶
Simulation time step size in milliseconds.
- temperature¶
Temperature of the circuit during simulation.
Module contents¶
NEURON simulator adapter for the BSB framework.