emodelrunner.cell

Custom Cell class.

Classes

CellModelCustom(name[, morph, mechs, ...])

Cell model class.

class emodelrunner.cell.CellModelCustom(name, morph=None, mechs=None, params=None, gid=0, add_synapses=False, fixhp=False)[source]

Bases: CellModel

Cell model class.

name

name of the model

Type:

str

morphology

underlying Morphology of the cell

Type:

bluepyopt.ephys.morphologies.Morphology

mechanisms

Mechanisms associated with the cell

Type:

list of bluepyopt.ephys.mechanisms.Mechanisms

params

Parameters of the cell model

Type:

collections.OrderedDict of bluepyopt.Parameters

icell

Cell instantiation in simulator

Type:

neuron cell

param_values

contains values of the optimized parameters

Type:

dict

gid

cell’s ID

Type:

int

seclist_names

Names of the lists of sections

Type:

list of strings

secarray_names

Names of the sections

Type:

list of strings

add_synapses

set to True to add synapses to the cell

Type:

bool

fixhp

to uninsert SK_E2 for hyperpolarization

Type:

bool

static connectable_empty_cell_template(template_name, seclist_names=None, secarray_names=None)[source]

Create a hoc script of an empty cell with an additional connection function.

Parameters:
  • template_name (str) – name of the cell model

  • seclist_names (list of strings) – Names of the lists of sections

  • secarray_names (list of strings) – Names of the sections

Returns:

hoc script describing an empty cell model with connection function

Return type:

str

create_custom_hoc(param_values, ignored_globals=(), template_path='templates/cell_template.jinja2', disable_banner=False, syn_dir=None, syn_hoc_filename=None, syn_temp_name='hoc_synapses')[source]

Create hoc code for this model.

Parameters:
  • param_values (dict) – contains values of the optimized parameters

  • ignored_globals (iterable str) – HOC coded is added for each NrnGlobalParameter that exists, to test that it matches the values set in the parameters. This iterable contains parameter names that aren’t checked

  • template_path (str) – path to the jinja2 template

  • disable_banner (bool) – if not True: a banner is added to the hoc file

  • syn_dir (str) – directory where the synapse data /files are

  • syn_hoc_filename (str) – file name of synapse hoc file

  • syn_temp_name (str) – synapse class name in hoc

Returns:

hoc script describing this cell model

Return type:

str

static create_empty_cell(name, sim, seclist_names=None, secarray_names=None)[source]

Create an empty cell in Neuron.

Parameters:
  • template_name (str) – name of the cell model

  • sim (bluepyopt.ephys.NrnSimulator) – neuron simulator

  • seclist_names (list of strings) – Names of the lists of sections

  • secarray_names (list of strings) – Names of the sections

Returns:

Cell instantiation in simulator

freeze_params(param_values)[source]

Freeze params and return list of params to unfreze afterwards.

Parameters:

param_values (dict) – contains values of the optimized parameters

Returns:

names of the newly frozen parameters

Return type:

list

get_replace_axon()[source]

Return appropriate replace_axon str.

Returns:

hoc script defining the replacement axon

Return type:

str

instantiate(sim=None)[source]

Instantiate model in simulator.

Parameters:

sim (bluepyopt.ephys.NrnSimulator) – neuron simulator

remove_point_process_mechs()[source]

Return mechanisms without point process mechanisms.

Returns:

list of Mechanisms without the point process mechanisms