bluepyopt.ephys.models

Cell template class

class bluepyopt.ephys.models.CellModel(name, morph=None, mechs=None, params=None, gid=0, seclist_names=None, secarray_names=None)[source]

Cell model class

Constructor

Parameters:
  • name (str) – name of this object should be alphanumeric string, underscores are allowed, first char should be a letter

  • morph (Morphology) – underlying Morphology of the cell

  • mechs (list of Mechanisms) – Mechanisms associated with the cell

  • params (list of Parameters) – Parameters of the cell model

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

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

check_name()[source]

Check if name complies with requirements

check_nonfrozen_params(param_names)[source]

Check if all nonfrozen params are set

create_acc(param_values, ignored_globals=(), template='acc/*_template.jinja2', disable_banner=False, template_dir=None, ext_catalogues=None, create_mod_morph=False, sim=None)[source]

Create JSON/ACC-description for this model

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

Create an empty cell in Neuron

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

create an hoc template named template_name for an empty cell

create_hoc(param_values, ignored_globals=(), template='cell_template.jinja2', disable_banner=False, template_dir=None)[source]

Create hoc code for this model

destroy(sim=None)[source]

Destroy instantiated model in simulator

freeze(param_dict)[source]

Set params

instantiate(sim=None)[source]

Instantiate model in simulator

instantiate_morphology(sim=None)[source]

Instantiate morphology in simulator

instantiate_morphology_3d(sim=None)[source]

Instantiate morphology and fill in 3d pts for stylized geometry

params_by_names(param_names)[source]

Get parameter objects by name

unfreeze(param_names)[source]

Unset params

write_acc(output_dir, param_values, template_filename='acc/*_template.jinja2', ext_catalogues=None, create_mod_morph=False, sim=None)[source]

Write JSON/ACC-description for this model to output directory

class bluepyopt.ephys.models.HocCellModel(name, morphology_path, hoc_path=None, hoc_string=None)[source]

Wrapper class for a hoc template so it can be used by BluePyOpt

Constructor

Parameters:
  • name (str) – name of this object

  • sim (NrnSimulator) – simulator in which to instatiate hoc_string

  • hoc_path (str) – Path to a hoc file (hoc_path and hoc_string can’t be used simultaneously, but one of them has to specified)

  • hoc_string (str) – String that of hoc code that defines a template (hoc_path and hoc_string can’t be used simultaneously, but one of them has to specified))

  • morphology_path (str path) – path to morphology that can be loaded by Neuron

check_nonfrozen_params(param_names)[source]

Check if all nonfrozen params are set

destroy(sim=None)[source]

Destroy instantiated model in simulator

freeze(param_dict)[source]

Set params

static get_template_name(hoc_string)[source]

Find the template name from hoc_string

Note: this will fail if there is a begintemplate in a /* */ style comment before the real begintemplate

instantiate(sim=None)[source]

Instantiate model in simulator

static load_hoc_template(sim, hoc_string)[source]

Have neuron hoc template, and detect what the name template name is

The template must have an init that takes two parameters, the second of which is the path to a morphology.

It must also have a CellRef member that is the result of

Import3d_GUI(…).instantiate()

params_by_names(param_names)[source]

Get parameter objects by name

unfreeze(param_names)[source]

Unset params

class bluepyopt.ephys.models.HocMorphology(morphology_path)[source]

wrapper for Morphology so that it has a morphology_path

class bluepyopt.ephys.models.LFPyCellModel(name, electrode=None, morph=None, mechs=None, params=None, dt=0.025, v_init=-65.0, gid=0, seclist_names=None, secarray_names=None)[source]

LFPy.Cell model class

Constructor

Parameters:
  • name (str) – name of this object should be alphanumeric string, underscores are allowed, first char should be a letter

  • morph (Morphology) – underlying Morphology of the cell

  • mechs (list of Mechanisms) – Mechanisms associated with the cell

  • params (list of Parameters) – Parameters of the cell model

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

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

check_name()[source]

Check if name complies with requirements

check_nonfrozen_params(param_names)[source]

Check if all nonfrozen params are set

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

Create an empty cell in Neuron

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

create an hoc template named template_name for an empty cell

create_hoc(param_values, ignored_globals=(), template='cell_template.jinja2', disable_banner=False, template_dir=None)[source]

Create hoc code for this model

destroy(sim=None)[source]

Destroy instantiated model in simulator

freeze(param_dict)[source]

Set params

instantiate(sim=None)[source]

Instantiate model in simulator

params_by_names(param_names)[source]

Get parameter objects by name

unfreeze(param_names)[source]

Unset params

class bluepyopt.ephys.models.Model(name)[source]

Constructor :param name: name of the model :type name: str

destroy(sim=None)[source]

Destroy instantiated model in simulator

instantiate(sim=None)[source]

Instantiate model in simulator