biocrnpyler.core.parameter

#### Parameter Value Defaulting: Not all parameters need to have the required headings.

The only two required columns are “param_val” and “param_name”. BioCRNpyler uses a form of parameter name defaulting discussed below to find default parameters if no exact match is in the config file. This makes it easy to set default parameters for things like “ku” and “ktx” to quickly build models.

#### Parameters inside BioCRNpyler: Inside of bioCRNpyler, parameters are stored as a dictionary key value pair:

(mechanism_name, part_id, param_name) –> param_val. If that particular parameter key cannot be found, the software will default to the following keys: (mechanism_type, part_id, param_name) >> (part_id, param_name) >> (mechanism_name, param_name) >> (mechanism_type, param_name) >>

(param_name) and give a warning.

As a note, mechanism_name refers to the .name variable of a Mechanism. mechanism_type refers to the .type variable of a Mechanism. Either of these can be used as a mechanism_id. This allows for models to be constructed easily using default parameter values and for parameters to be shared between different Mechanisms and/or Components.

#### Initial Conditions are also Parameters The initial condition of any Species (or Component) will also be looked up as a parameters automatically.

Initial conditions can be customized in through the custom_initial_conditions keyword in the Mixture constructor. custom_initial_conditions will take precedent to parameter initial conditions.

#### Units are read directly read from the column labeled “units” in the parameter file.

Classes

ModelParameter(parameter_name, ...[, unit, ...])

A class for representing parameters used in the Model.

Parameter(parameter_name, parameter_value[, ...])

A class for representing parameters in general.

ParameterDatabase([parameter_dictionary, ...])

A class for storing parameters in Components and Mixtures.

ParameterEntry(parameter_name, parameter_value)

A class for representing parameters in a parameter stored the ParameterDatabase.

ParameterKey(mechanism, part_id, name)

Create new instance of ParameterKey(mechanism, part_id, name)

class biocrnpyler.core.parameter.ModelParameter(parameter_name: str, parameter_value: str | Real, search_key, found_key, unit=None, parameter_key=None, parameter_info=None, **keywords)[source]

A class for representing parameters used in the Model.

search_key is a tuple searched for to find the parameter, eg (mech_id, part_id, param_name), : found_key is the tuple used after defaulting to find the parameter eg (param_name)

A class for representing parameters in general. Only the below subclasses are ever used.

Parameters:
  • parameter_name – is the name of the parameter

  • parameter_value – is the value of the parameter

  • unit – is the unit of the parameter or a species

class biocrnpyler.core.parameter.ParameterEntry(parameter_name: str, parameter_value: str | Real, parameter_key=None, parameter_info=None, **keywords)[source]

A class for representing parameters in a parameter stored the ParameterDatabase.

parameter_keys is a dictionary {key:value} or named_tuple (type ParameterKey) of keys for looking up the parameter parameter_info is a dictionary {key:value} of additional information about the parameter.

For example: additional columns in the parameter file or the parameter file name.

A class for representing parameters in general. Only the below subclasses are ever used.

Parameters:
  • parameter_name – is the name of the parameter

  • parameter_value – is the value of the parameter

  • unit – is the unit of the parameter or a species

class biocrnpyler.core.parameter.ParameterKey(mechanism, part_id, name)[source]

Create new instance of ParameterKey(mechanism, part_id, name)

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

mechanism

Alias for field number 0

name

Alias for field number 2

part_id

Alias for field number 1