Closed CiaranWelsh closed 5 years ago
Hi, @CiaranWelsh! Thank you for using. We really welcome that. Please ask anything.
About this issue, I tested your code with the latest version (4.1.4) on Jupyter Notebook (Python3, Ubuntu), and couldn't reproduce the error. I just copied, pasted and ran your code. Could you tell me if the environment is different.
Here is my result: https://gist.github.com/kaizu/da15d2123bd627f10e2aff99527c9e21
From the error message, I suspect some causes. Please try the followings.
RuntimeError: unknown variable [kColFrag] was used.
:import ecell4.util.decorator
ecell4.util.decorator.ENABLE_IMPLICIT_DECLARATION = False
species_attributes
section, and try show(m)
just after m = get_model()
. Then, you can check if reactions are assigned correctly or not.Normally, for spatial simulations, NetworkModel
is created rather than ODENetworkModel
. But, when non-numbers or rate law equations are given at the definition of reaction rules (the value after |
), the model is regarded as an ODENetworkModel
. Unexpectedly, if some variable shown after |
in reaction_rules
section is not defined (due to typo or previous executions), the variable is implicitly treated as a new Species, and thus as a rate law. The code above (ENABLE_IMPLICIT_DECLARATION
) stops to do that.
However, I don't know why it only happens on Jupyter NB.
This might be not your case, but I think it's worth trying. Thanks.
Close this once.
Hi, I've been playing around with ecell4, I think its a great package and I hope to use it in my thesis. Since I'm new to Ecell this may just be my inexperience rather than a bug but I've been building a mesoscale model in my IDE (pycharm) and the simulation works fine. When I copy the code over to jupyter notebook (for the visualisation), the same code gives an error.
The code I'm running is:
Again, the code works fine in pycharm, but gives me the following error in jupyter: