Search found 48 matches

by adamjhn
Wed Jan 12, 2022 10:23 am
Forum: Reaction-diffusion in NEURON
Topic: Plotting Ca current through different types of VDCC's
Replies: 1
Views: 107

Re: Plotting Ca current through different types of VDCC's

Hi, Sorry for the delay. The flux from rxd multi compartment reactions are not stored so can not be directly recorded. However it is possible to infer them by recording the relevant rxd states and species and substituting them into the the f_rate and b_rate. Here is an example rxd Hodgkin–Huxley mod...
by adamjhn
Tue Nov 23, 2021 3:00 pm
Forum: Reaction-diffusion in NEURON
Topic: How to refer to numeric value of crxd.v?
Replies: 3
Views: 349

Re: How to refer to numeric value of crxd.v?

Sorry, it looks like an issue with how `abs` is compiled in rxd reactions.
A simple workaround is to use the rxdmath fabs in your reaction scheme;

Code: Select all

from neuron.rxd.rxdmath import fabs
Let me know if you have any further problems.
by adamjhn
Fri Nov 19, 2021 10:28 am
Forum: Reaction-diffusion in NEURON
Topic: How to refer to numeric value of crxd.v?
Replies: 3
Views: 349

Re: How to refer to numeric value of crxd.v?

Hi, The problem is rxdmath.v is not a number, it is a symbol that is mapped to the membrane potential of a segment at runtime, so if-statements in the reaction scheme are not supported. However you can represent something like the if-statement using a thresholds; https://neuron.yale.edu/neuron/docs/...
by adamjhn
Thu Oct 14, 2021 11:41 am
Forum: Reaction-diffusion in NEURON
Topic: Adding a Rate to an Ion based on the flux of another Reaction function
Replies: 1
Views: 1017

Re: Adding a Rate to an Ion based on the flux of another Reaction function

Hi, If I have understood your question, you have something like; pump_current_na = rxd.MultiCompartmentReaction(nai, nao, 3.0*pump, mass_action=False, membrane=mem, membrane_flux=True) Where `nai` and `nai` are rxd Species on an intracellular and extracellular region and `pump` is the rate of the Na...
by adamjhn
Tue Apr 27, 2021 10:07 am
Forum: Reaction-diffusion in NEURON
Topic: Glutamate in the synaptic cleft
Replies: 1
Views: 513

Re: Glutamate in the synaptic cleft

Thanks, you are right, the extracellular space was designed to be used at a macroscopic scale. The average volume that would be excluded in brain tissue is used to give the `volume_fraction` (typically 0.2) where substances are free to diffusion rather than excluding any particular voxel. However it...
by adamjhn
Mon Nov 16, 2020 10:18 am
Forum: Reaction-diffusion in NEURON
Topic: Issue with larger and more equations in Reaction
Replies: 1
Views: 870

Re: Issue with larger and more equations in Reaction

Sorry for the late reply. 1. This is a great question, your workaround sounds reasonable. I don’t think it’s necessary to split the axon into multiple sections, just set nseg as required. An alternative solution is to use node.include_flux, here is a toy example using an nmodl mechanism to allow a l...
by adamjhn
Mon Oct 12, 2020 10:01 pm
Forum: Reaction-diffusion in NEURON
Topic: Help measuring/plotting the cytoplasmic Ca flux (nM/s) as function of Ca concentration
Replies: 2
Views: 826

Re: Help measuring/plotting the cytoplasmic Ca flux (nM/s) as function of Ca concentration

If `pmp_thr` is the only rxd mechanism producing a membrane flux for calcium then simply recording the calcium current (as you have `ca_cur`) is sufficient. Unfortunately if this is not the case the contribution of the current resulting from a particular MulticompartmentReaction is not directly acce...
by adamjhn
Tue Jul 14, 2020 9:12 am
Forum: Reaction-diffusion in NEURON
Topic: Connecting rxd to custom mechanism where custom mechanism models production/secretion
Replies: 8
Views: 1703

Re: Connecting rxd to custom mechanism where custom mechanism models production/secretion

Sorry for the delay, you're right about not using charge=0. Rxd reads the currents and then (if they have a charge or valence) divides it by the charge and scale it appropriately to determine the change in concentration. Unfortunately this does not work with charge=0. As you have found, to work arou...
by adamjhn
Tue Jun 30, 2020 10:56 pm
Forum: Reaction-diffusion in NEURON
Topic: Using NEURON to model a system of endocrine cells
Replies: 3
Views: 1179

Re: Using NEURON to model a system of endocrine cells

Here is a simple example of two cells connected by diffusion through the extracellular space. from neuron import h, rxd from neuron.rxd import v from neuron.units import mV, s from matplotlib import pyplot h.load_file('stdrun.hoc') # create a couple of cells cell1 = h.Section('cell1') cell1.pt3dclea...
by adamjhn
Wed Apr 22, 2020 11:20 pm
Forum: Reaction-diffusion in NEURON
Topic: Problem initializing with rxd.Rate
Replies: 2
Views: 1499

Re: Problem initializing with rxd.Rate

Thanks for getting in touch. Unfortunately I cannot reproduce the error on my machine. It looks like there is a mismatch between the directory where the compiled reactions are stored and the directory we try to load them from. Could you try running the simulation directly, e.g. python -i runCell.py ...
by adamjhn
Mon Apr 13, 2020 12:57 pm
Forum: Reaction-diffusion in NEURON
Topic: MultiCompartmentReaction Section List Mismatch
Replies: 1
Views: 1082

Re: MultiCompartmentReaction Section List Mismatch

The current work around is to create the regions everywhere as you had before, then alter the diffusion coefficient and use parameters to exclude the unwanted region. Unfortunately, this approach does not allow the volume fraction to vary; that is, if there is no ER in the spine, you might expect cy...
by adamjhn
Fri Mar 06, 2020 12:24 pm
Forum: Reaction-diffusion in NEURON
Topic: Cell membrane with PMCA pump
Replies: 3
Views: 1641

Re: Cell membrane with PMCA pump

Sorry for the late reply. You’re right that rxd.Extracellular may be more expensive but you could easily include an outside region paralleling the cell (nrn_region=’o’) with minimal overhead cost. Additionally you can use a Parameter, so its value won’t be updated. With a recent improvement on the d...
by adamjhn
Tue Feb 25, 2020 10:25 am
Forum: Reaction-diffusion in NEURON
Topic: Making a Nucleus
Replies: 1
Views: 1176

Re: Making a Nucleus

Sorry for the late response. A feature that was present for extracellular 3d (allowing voxels to have independent diffusion coefficients) was initially omitted form intracellular 3d. It has now been added (in the development branch; https://github.com/neuronsimulator/nrn ). Using that it is possible...
by adamjhn
Fri Jan 03, 2020 9:49 am
Forum: Reaction-diffusion in NEURON
Topic: Checking the units
Replies: 2
Views: 1034

Re: Checking the units

There are no automated unit checks (like modlunit for mod file) in rxd, however you can import constants from neuron.units to scale parameters appropriately, as noted in the circadian rhythm example.

Yes, the diffusion coefficient has units of μm²/ms.
by adamjhn
Fri Jan 03, 2020 9:45 am
Forum: Reaction-diffusion in NEURON
Topic: The best practice of Ca2+ pumps on the cell membrane implemented in RxD model
Replies: 3
Views: 1312

Re: The best practice of Ca2+ pumps on the cell membrane implemented in RxD model

1] Yes, the shell in the mod file is independent of the shells in your rxd model. For your model to make sense you should make sure they are the same. The nmodl current are applied to the rxd region defined with nrn_region='i'. 2] There are race conditions, rxd has a copy of states e.g. cai, which i...