bluepyemodel.model.model¶
Cell model creation.
Functions
|
Create a cell model based on a morphology, mechanisms and parameters |
|
Create a list of ParameterScaler from a the definition of channel distributions |
|
Define a list of NrnMODMechanism from a definition dictionary |
|
Define a morphology object from a morphology file |
|
Define a list of NrnParameter from a definition dictionary |
|
Define a list of locations from a section names. |
- create_cell_model(name, model_configuration, morph_modifiers=None, seclist_names=None, secarray_names=None, nseg_frequency=40)¶
Create a cell model based on a morphology, mechanisms and parameters
- Parameters:
name (str) – name of the model
morphology (dict) – morphology from emodel api .get_morphologies()
model_configuration (NeuronModelConfiguration) – Configuration of the neuron model, containing the parameters their locations and the associated mechanisms.
morph_modifiers (list of str or list of list) –
If str, name of the morph modifier to use from bluepyemodel.evaluation.modifiers. If List of morphology modifiers. Each modifier is defined by a list that includes the following elements: 1. The path to the file that contains the modifier. 2. The name of the function that applies the modifier. 3. Optionally, a “hoc_string” that represents the hoc code for the modifier. For example, morph_modifiers could be defined as follows:
morph_modifiers = [["path_to_module", "name_of_function", "hoc_string"], ...].
If the “hoc_string” is not provided, the system will search within the specified module for a string that matches the function name appended with “_hoc”. If
None, the default modifier will replace the axon with a tappered axon initial segment (replace_axon_with_taper). If you do not wish to use any modifier, set the present argument to[]. If["bluepyopt_replace_axon"], the replace_axon function from bluepyopt.ephys.morphologies.NrnFileMorphology will be used and no other morph modifiers will be used.
- Returns:
CellModel
- define_distributions(distributions_definition, morphology=None)¶
Create a list of ParameterScaler from a the definition of channel distributions
- Parameters:
distributions_definition (list) – definitions of the distributions
- define_mechanisms(mechanisms_definition, mapping_multilocation)¶
Define a list of NrnMODMechanism from a definition dictionary
- Parameters:
mechanisms_definition (list of MechanismConfiguration) – definition of the mechanisms
mapping_multilocation (dict) – mapping from multi-locations names to list of locations
- Returns:
list of NrnMODMechanism
- Return type:
- define_morphology(model_configuration, do_set_nseg=True, nseg_frequency=40, morph_modifiers=None)¶
Define a morphology object from a morphology file
- Parameters:
model_configuration (NeuronModelConfiguration) – configuration of the model
do_set_nseg (float) – set the length for the discretization of the segments
nseg_frequency (float) – frequency of nseg
morph_modifiers (list of str or list of list) –
If str, name of the morph modifier to use from bluepyemodel.evaluation.modifiers. If List of morphology modifiers. Each modifier is defined by a list that includes the following elements: 1. The path to the file that contains the modifier. 2. The name of the function that applies the modifier. 3. Optionally, a “hoc_string” that represents the hoc code for the modifier. For example, morph_modifiers could be defined as follows:
morph_modifiers = [["path_to_module", "name_of_function", "hoc_string"], ...].
If the “hoc_string” is not provided, the system will search within the specified module for a string that matches the function name appended with “_hoc”. If
None, the default modifier will replace the axon with a tappered axon initial segment (replace_axon_with_taper). If you do not wish to use any modifier, set the present argument to[]. If["bluepyopt_replace_axon"], the replace_axon function from bluepyopt.ephys.morphologies.NrnFileMorphology will be used and no other morph modifiers will be used.
- Returns:
a morphology object
- Return type:
bluepyopt.ephys.morphologies.NrnFileMorphology
- define_parameters(parameters_definition, distributions, mapping_multilocation)¶
Define a list of NrnParameter from a definition dictionary