### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NEURON 7.3 documentation »
- neuron »

# Basic Reaction-Diffusion

- neuron.rxd.geometry3d

Warning

These functions are experimental. Please contact the NEURON developers with issues and be sure to validate your results.

class `neuron.rxd.``Region`(sections, nrn_region=None, geometry=None)

class `neuron.rxd.``Species`(regions=None, d=0, name=None, charge=0, initial=None)

  Methods

  `__init__`(regions, d = 0, name = None, charge = 0, initial = None)

    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)

    Note:

    charge must match the charges specified in NMODL files for the same ion, if any.

  `indices`(r=None)

    return the indices corresponding to this species in the given region

    if r is None, then returns all species indices

  `charge`

    The charge of the species.

  `name`

    The name of the Species.

    This is used only for syncing with the non-reaction-diffusion parts of NEURON.

  `nodes`

    A NodeList of all the nodes corresponding to the species.

    This can then be further restricted using the callable property of NodeList objects.

class `neuron.rxd.``Reaction`(scheme, rate1, rate2=None, regions=None, custom_dynamics=False)
  `__init__`(scheme, rate1, rate2=None, regions=None, custom_dynamics=False)

    if not custom_dynamics, then assumes mass action: multiplies rate by appropriate powers of species; otherwise, assumes full equations given

class `neuron.rxd.``Rate`(species, rate, regions=None, membrane_flux=False)
  `__init__`(species, rate, regions=None, membrane_flux=False)

    create a rate of change for a species on a given region or set of regions

    if regions is None, then does it on all regions

class `neuron.rxd.``MultiCompartmentReaction`(scheme, rate_f, rate_b=None, membrane=None, custom_dynamics=False, membrane_flux=False, scale_by_area=True)

class `neuron.rxd.node.``Node`(sec, i, location)

  Methods

  `__init__`(sec, i, location)

    n = Node(sec, i, location) Description:

    Constructs a Node object. These encapsulate multiple properties of a given reaction-diffusion compartment – volume, surface area, concentration, etc... – but this association is provided only as a convenience to the user; all the data exists independently of the Node object.

    These objects are typically constructed by the reaction-diffusion code and provided to the user.

    Parameters:

    sec – the RxDSection containing the Node

    i – the offset into the RxDSection ‘s data

    location – the location of the compartment within the section. For @aSection1D objects, this is the normalized position 0 <= x <= 1

  `_ref_concentration`

    Returns a HOC reference to the Node’s state

  `satisfies`(condition)

    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.

  `volume`

    The volume of the compartment in cubic microns.

    Read only.

  `surface_area`

    The surface area of the compartment in square microns.

    This is the area (if any) of the compartment that lies on the plasma membrane and therefore is the area used to determine the contribution of currents (e.g. ina) from mod files or kschan to the compartment’s concentration.

    Read only.

  `x`

    The normalized position of the center of the compartment.

    Read only.

  `region`

    The region containing the compartment.

  `sec`

    The RxDSection containing the compartment.

  `species`

    The Species whose concentration is recorded at this Node.

  `concentration`

    Gets the concentration at the Node.

class `neuron.rxd.generalizedReaction.``GeneralizedReaction`

  an abstract class, parent of Rate, Reaction, MultiCompartmentReaction

class `neuron.rxd.species.``SpeciesOnRegion`(species, region)

  Methods

  `__init__`(species, region)

    The restriction of a Species to a Region.

  `indices`(r=None)

    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.

  `nodes`

    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.

  `concentration`

    An iterable of the current concentrations.

class `neuron.rxd.section1d.``Section1D`(species, sec, diff, r)

  Methods

  `name`()

    The name of the section, as defined by HOC.

  `region`

    The Region containing the RxDSection.

  `nseg`

    The number of segments in the NEURON section.

    In some implementations, this might be different than the number of nodes in the section.

  `nrn_region`

    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.

  `species`

    The Species object stores on this RxDSection.

  `section_orientation`

    The HOC section orientation.

  `L`

    The length of the section in microns.

class `neuron.rxd.nodelist.``NodeList`(items)

  Methods

  `__init__`(items)

    Constructs a NodeList from items, a python iterable containing Node objects.

  `__call__`(restriction)

    returns a sub-NodeList consisting of nodes satisfying restriction

  `concentration`

    Returns the concentration of the Node objects in the NodeList as an iterable.

  `diff`

    Returns the diffusion constant of the Node objects in the NodeList as an iterable.

  `volume`

    An iterable of the volumes of the Node objects in the NodeList.

    Read only.

  `surface_area`

    An iterable of the surface areas of the Node objects in the NodeList.

    Read only.

  `region`

    An iterable of the Region objects corresponding to the Node objects in the NodeList.

    Read only.

  `species`

    An iterable of the Species objects corresponding to the Node objects in the NodeList.

    Read only.

  `x`

    An iterable of the normalized positions of the Node objects in the NodeList.

    Read only.

class `neuron.rxd.geometry.``FixedCrossSection`(cross_area, surface_area=0)

  Methods

  `__call__`()

    calling returns self to allow for rxd.inside or rxd.inside()

class `neuron.rxd.geometry.``FractionalVolume`(volume_fraction=1, surface_fraction=0, neighbor_areas_fraction=1)

  Methods

  `__call__`()

    calling returns self to allow for rxd.inside or rxd.inside()

class `neuron.rxd.geometry.``FixedPerimeter`(perimeter, on_cell_surface=False)

  Methods

  `__call__`()

    calling returns self to allow for rxd.inside or rxd.inside()

class `neuron.rxd.geometry.``Shell`(lo=None, hi=None)

  Methods

  `__call__`()

    calling returns self to allow for rxd.inside or rxd.inside()

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NEURON 7.3 documentation »
- neuron »