BhallaLab / moose-core

C++ basecode and python scripting interface
https://moose.ncbs.res.in
GNU General Public License v3.0
15 stars 27 forks source link

SetNumKf disables Kb #408

Open vinuvargheseijk opened 4 years ago

vinuvargheseijk commented 4 years ago

I think that using setNumKf will disable the Kb for the reaction. For example, using the example https://moose.ncbs.res.in/readthedocs/user/py/rdesigneur/rdes.html#controlling-a-reaction-by-a-function change the reac.Kb to any value. The reults won't change.

Please refer to my lab note for example. https://labnotes.ncbs.res.in/bhalla/setnumkf-disables-kb-reac

dilawar commented 4 years ago

I also used numKf everywhere in my CaMKII model with moose.Function. I guess the trouble is that during simulation, the volume can change, therefore Kf and Kb changes as well and using a function to set these values may not be feasible since the function does not know the volume value.

Write a function which can change numKf <-> Kf and numKb <-> Kb and use numKf and numKb with functions.

vinuvargheseijk commented 4 years ago

I don't have any volume change in the model. The trouble is that setNumKf works perfectly, but when it is used, the Kb of the same 'reac' don't have any role. Also, I would like to point out that this is not a problem with numKf. This is a problem with using setNumKf in the moose.connect('func','valueOut','reac','setNumKf') Even though I used reac.Kb=some value, when the above method is used, this Kb seems to be doing nothing. Please check the rdesigneur example in my first post to see if that is the case.

dilawar commented 4 years ago

Is this behaviour specific to new version? Does is also happen with 3.1.4 or older version before exprtk was merged? I can check later by myself but if you know already that would be helpful?

vinuvargheseijk commented 4 years ago

This issue exists in all versions. But that is OK, since I have found a way around this.

dilawar commented 4 years ago

Great. Put the workaround here as well. I might add that to documentation.

⁣Get BlueMail for Android ​

On 14 Apr 2020, 19:43, at 19:43, vinuvargheseijk notifications@github.com wrote:

This issue exists in all versions. But that is OK, since I have found a way around this.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/BhallaLab/moose-core/issues/408#issuecomment-613467364