Search found 55 matches
- Tue Aug 27, 2019 11:48 am
- Forum: Reaction-diffusion in NEURON
- Topic: Using setpointer() and RXD concentrations
- Replies: 3
- Views: 12963
Re: Using setpointer() and RXD concentrations
The rxd Species, State and Parameter can be accessed in density mechanisms by their name. For example in the extracellular diffusion example ; The species has name='k', charge=1 which is accessed in steady_k.mod with USEION k WRITE ik CHARGE 1 Note the names have to match and the charge must equal t...
- Wed Aug 21, 2019 4:43 pm
- Forum: Reaction-diffusion in NEURON
- Topic: Using include_flux() properly
- Replies: 1
- Views: 12051
Re: Using include_flux() properly
Thanks for bringing this oversight to our attention; support for node.include_flux was accidentally broken with the release of NEURON 7.7. (It works in 7.6.x). This will be remedied in 7.7.3. In the meantime it is possible to achieve the outcome of include flux using a Parameter and a Rate. For exam...
- Thu Aug 15, 2019 5:25 pm
- Forum: Reaction-diffusion in NEURON
- Topic: Parameter and MultiCompartmentReaction Error
- Replies: 1
- Views: 9702
Re: Parameter and MultiCompartmentReaction Error
Thanks for letting us know about this bug, it will be fixed in the next release. As you have identified, one workaround is to use a float instead of a Parameter. Alternatively, like the calcium wave example , you could define the Parameter on the membrane instead of the cytosol; g_ip3r = rxd.Paramet...
- Wed Aug 14, 2019 11:26 am
- Forum: Reaction-diffusion in NEURON
- Topic: Modelling a channel with multiple markov states
- Replies: 7
- Views: 13216
Re: Modelling a channel with multiple markov states
I think the problem is O is a rxd.State. To access the values of a state (or species) you can use the nodes. E.g. If you have defined nodes on a section called ‘dend’ then; O.nodes(dend(0.5)).value Will give you the value of O at the current time in the simulation, in the middle of ‘dend’. To record...
- Wed Aug 14, 2019 10:25 am
- Forum: Reaction-diffusion in NEURON
- Topic: decay reactions
- Replies: 1
- Views: 9563
Re: decay reactions
Thanks for bringing this bug to our attention, it will be fixed in the next release. In the meantime a reaction with no products can be implemented with rxd.Rate. For example;
Code: Select all
reaction_decay = rxd.Rate(Ca, -1e-8*Ca)
- Thu Aug 01, 2019 5:17 pm
- Forum: Reaction-diffusion in NEURON
- Topic: Altering Total Concentration During a Simulation
- Replies: 2
- Views: 10233
Re: Altering Total Concentration During a Simulation
You can change the concentrations via the rxd nodes. If you use variable step you must call h.CVode().re_init() after changing the values. For example; from neuron import h, rxd from neuron.units import μM, mV, ms from matplotlib import pyplot h.load_file('stdrun.hoc') # define a very simple rxd mod...
- Mon Jul 08, 2019 10:35 am
- Forum: Reaction-diffusion in NEURON
- Topic: basic questions on RxD
- Replies: 7
- Views: 16577
Re: basic questions on RxD
The parameters used in the tutorial are python floats, NEURON does not assign them any particular units. This makes the example somewhat opaque and is part of the reason why in NEURON 7.7 the units modules was introduced. In this specific example you can infer that kserca must have units μM as ca[cy...
- Mon Jul 08, 2019 12:44 am
- Forum: Reaction-diffusion in NEURON
- Topic: Modelling a channel with multiple markov states
- Replies: 7
- Views: 13216
Re: Modelling a channel with multiple markov states
I think the problem is with the Python namespace. When you create your first rate "C1 = rxd.Rate(C1, ... " it overwrites the C1 state you defined earlier, so when you come to use it in "O = rxd.Rate(O, ((ko*C1 ...", the C1 here now refers to a Rate not a State. The solution is to...
- Sat Jul 06, 2019 2:21 pm
- Forum: Reaction-diffusion in NEURON
- Topic: basic questions on RxD
- Replies: 7
- Views: 16577
Re: basic questions on RxD
Sorry, of course you still need to define it on both the cyt and the er;
Code: Select all
from neuron.units import nM, uM
ca = rxd.Species([cyt, er], name='ca', charge=2, initial=lambda nd: 100 * nM if nd.region == cyt else 70 * uM)
- Sat Jul 06, 2019 10:38 am
- Forum: Reaction-diffusion in NEURON
- Topic: basic questions on RxD
- Replies: 7
- Views: 16577
Re: basic questions on RxD
The initial keyword can take a function with a rxd node as an argument. This allows initial concentrations to depended on the location and region. Some examples are here; https://neuron.yale.edu/neuron/docs/initialization-strategies In your case, I think you want to define calcium like this; from ne...
- Mon Mar 18, 2019 11:24 am
- Forum: Reaction-diffusion in NEURON
- Topic: Reactions only when concentration above a certain limit?
- Replies: 1
- Views: 11275
Re: Reactions only when concentration above a certain limit?
The formulas for rxd.Rate, etc need to be continuous, but you can approximate a threshold function using a sigmoidal shaped curve. For example, you can use rxdmath.tanh to remove calcium at a constant rate when it exceeds a threshold with a narrow transition period: from neuron import h, rxd from ne...
- Mon Feb 18, 2019 4:30 pm
- Forum: Reaction-diffusion in NEURON
- Topic: diffusion intracellular->extracellular->intracellular
- Replies: 7
- Views: 13705
Re: diffusion intracellular->extracellular->intracellular
1) The following function will return the location of a segment e.g. 'cell1(0.5)', adapted from rxd.species._xyz; def xyz(seg): """Return the (x, y, z) coordinate of the center of the segment.""" sec = seg.sec n3d = sec.n3d() x3d = [sec.x3d(i) for i in range(n3d)] y3d =...
- Sun Feb 10, 2019 1:24 pm
- Forum: Reaction-diffusion in NEURON
- Topic: diffusion intracellular->extracellular->intracellular
- Replies: 7
- Views: 13705
Re: diffusion intracellular->extracellular->intracellular
Thanks for reporting this bug, a fix has been pushed to the development branch. Currently the easiest way to do this is with mod files describing pump mechanism. The production, diffusion and accumulation are then handled by rxd. For example; from neuron import h, crxd as rxd from matplotlib import ...
- Mon Feb 04, 2019 3:05 pm
- Forum: Reaction-diffusion in NEURON
- Topic: Unexpected 3D behaviour
- Replies: 2
- Views: 4142
Re: Unexpected 3D behaviour
This is due to a bug in reactions in 3D rxd. Thank you for identifying it. We have a fix for it, you can clone https://github.com/neuronsimulator/nrn/tree/7.6 and build from source. Alternatively replace your <neuron python library dir>/neuron/rxd/species.py with https://raw.githubusercontent.com/ne...
- Wed Jan 30, 2019 11:56 am
- Forum: Reaction-diffusion in NEURON
- Topic: 3D Dimensional RXD/CRXD
- Replies: 4
- Views: 5562
Re: 3D Dimensional RXD/CRXD
The discretization used to build the mesh (dx), is an optional argument for rxd.Region, it defaults to 0.25μm. You should be able to get similar performance by scaling it up by 10, rather than reducing the cell sizes. E.g. cyt = rxd.Region(h.allsec(), name='cyt', nrn_region='i', dx=2.5) Finitialise ...