First of all, let me clarify the problem I have that I have been ignoring until now. I often want to update reaction rates, which trickles down to initial concentrations. This doesn't automatically get seen by rxd.species, as I can verify visually in my plots. But if I rerun a species statement to try to have it run with the updated initial concentration, I get:
Code: Select all
RxDException: Species "ca" previously defined: Species(regions=[Region(..., nrn_region='i', geometry=inside, dx=None, name=None)], d=0.6, name='ca', charge=2, initial=4.9999999999999996e-05)
Code: Select all
In [3]: h.delete(ca)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-eab18e722765> in <module>()
----> 1 h.delete(ca)
TypeError: Cannot access delete (NEURON type 262) directly.
In [4]: ca = None
Note that I also tried doing without updating the species and just updating the rxd.Rate definitions since that's where the reaction rates directly come into play, and I could just not worry about initial conditions and let the system equilibrate for longer before stimulating. However, when I reran the rxd.Rate statements, it simply zeroed out all rxd activity. So my backup workaround also did not work.
Any thoughts? I am less familiar with hoc syntax - perhaps I deleting 'ca' incorrectly? Or is there a better way to restart/reload RxD without restarting python? Or better yet, is there a way update these parameters directly within RxD without getting any errors?
Any advice is much appreciated!