Warning
These functions are experimental. Please contact the NEURON developers with issues and be sure to validate your results.
Declare a conceptual region of the neuron.
Examples: Cytosol, ER
In NEURON 7.4+, secs is optional at initial region declaration, but it must be specified before the reaction-diffusion model is instantiated.
Note
dimension and dx will be deprecated in a future version
Get or set the classic NEURON region associated with this object.
Note
Setting only supported in NEURON 7.4+, and then only before the reaction-diffusion model is instantiated.
Get or set the sections associated with this region.
The sections may be expressed as a NEURON SectionList or as any Python iterable of sections.
Note
Setting is new in NEURON 7.4+ and allowed only before the reaction-diffusion model is instantiated.
Declare a species.
Parameters:
regions -- a Region or list of Region objects containing the species
d -- the diffusion constant of the species (optional; default is 0, i.e. non-diffusing)
name -- the name of the Species; used for syncing with HOC (optional; default is none)
charge -- the charge of the Species (optional; default is 0)
initial -- the initial concentration or None (if None, then imports from HOC if the species is defined at finitialize, else 0)
atolscale -- scale factor for absolute tolerance in variable step integrations
Note:
charge must match the charges specified in NMODL files for the same ion, if any.
You probably want to adjust atolscale for species present at low concentrations (e.g. calcium).
Get or set the charge of the Species.
Note
Setting is new in NEURON 7.4+ and is allowed only before the reaction-diffusion model is instantiated.
return the indices corresponding to this species in the given region
if r is None, then returns all species indices
Specify a reaction to be added to the system.
To constrain the reaction to a specified list of regions, say to just the extracellular space (ext) and the cytosol (cyt), use the regions keyword, e.g.
r = rxd.Reaction(2 * H + O, H2O, k, regions=[ext, cyt])
For a bi-directional reaction, specify a backward reaction rate. e.g. if kf is the forward rate and kb is the backward rate, then:
r = rxd.Reaction(2 * H + O, H2O, kf, kb)
To use dynamics other than mass-action, add that mass_action=False flag and put the full formula instead of a mass-action rate for kf (and kb). E.g. Michaelis-Menten degradation
- r = rxd.Reaction(
- dimer, decomposed, dimer / (k + diamer), mass_action=False
)
Declare a contribution to the rate of change of a species or other state variable.
Example:
constant_production = rxd.Rate(protein, k)
If this was the only contribution to protein dynamics and there was no diffusion, the above would be equivalent to:
dprotein/dt = k
If there are multiple rxd.Rate objects (or an rxd.Reaction, etc) acting on the same species, then their effects are summed.
Returns a HOC reference to the Node's concentration
(The node must store concentration data. Use _ref_molecules for nodes storing molecule counts.)
Tests if a Node satisfies a given condition.
If a nrn.Section object or RxDSection is provided, returns True if the Node lies in the section; else False. If a Region object is provided, returns True if the Node lies in the Region; else False. If a number between 0 and 1 is provided, returns True if the normalized position lies within the Node; else False.
an abstract class, parent of Rate, Reaction, MultiCompartmentReaction
If no Region is specified or if r is the Region specified in the constructor, returns a list of the indices of state variables corresponding to the Species when restricted to the Region defined in the constructor.
If r is a different Region, then returns the empty list.
A NodeList of the Node objects containing concentration data for the given Species and Region.
The code
node_list = ca[cyt].nodes
is more efficient than the otherwise equivalent
node_list = ca.nodes(cyt)
because the former only creates the Node objects belonging to the restriction ca[cyt] whereas the second option constructs all Node objects belonging to the Species ca and then culls the list to only include those also belonging to the Region cyt.
The HOC region, if any.
'i' if the corresponding Region maps to HOC's internal concentration
'o' if it maps to HOC's external concentration
None otherwise.
An iterable of the Region objects corresponding to the Node objects in the NodeList.
Read only.
An iterable of the Species objects corresponding to the Node objects in the NodeList.
Read only.