-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dissociation of membrane sp into two volume sp fails #292
Comments
rule2 in reaction rules() works, but rule1 fail. |
is this expected behavior? |
fail means fail to dissociate |
This looks due to the locations. with reaction_rules():
C + M > B | 10.0 # correct
C > B | 10.0 # wrong |
The original problem mentioned here is with species_attributes():
A | B | {'radius':str(rv),"D": str(D)}
C | {'radius':str(rv),'D': str(D), "location": "M"}
with reaction_rules():
C > A+B | 10 #rule1 This doesn't work because the first order reaction with two products both on the different structure is not supported yet. See the following. https://github.com/ecell/ecell4/blob/master/ecell4/spatiocyte/SpatiocyteReactions.cpp#L112-L116 One way to do this now is to place an intermediate state. with reaction_rules():
C > AB | 10 > A + B | 1e+20 # AB is at the same location with A or B |
Or with species_attributes():
A | B | {'radius':rv,"D": D}
C | X | {'radius':rv,'D': D, "location": "M"}
with reaction_rules():
C > X + A | 10
X > B | 1e+20 |
%matplotlib inline
from ecell4 import *
L=2
rv=0.01
D=1
h=0.5*L
h0=0
h1=h
with species_attributes():
A | B | {'radius':str(rv),"D": str(D), "location": "M"}
C | {'radius':str(rv),'D': str(D)}
with reaction_rules():
C > A+B | 10 #rule1
C > B | 10 #rule2
m = get_model()
w = spatiocyte.SpatiocyteWorld(Real3(L,h,L),rv)
w.bind_to(m)
upper = Real3(0,h1-2*rv,0)
lower = Real3(0,h0,0)
unit0 = Real3(0,0,L)
unit1 = Real3(L,0,0)
w.add_structure(Species("M"),PlanarSurface(upper,unit0,unit1))
w.add_structure(Species("W"),PlanarSurface(lower,unit0,unit1))
w.add_molecules(Species("C"),100)
sim = spatiocyte.SpatiocyteSimulator(w)
dt=50
duration=0.3
obs1 = FixedIntervalNumberObserver(duration/dt, ['C'])
sim.run(duration, obs1)
viz.plot_number_observer(obs1)
The text was updated successfully, but these errors were encountered: