Skip to content
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

Operations order bug #22

Open
jrfaeder opened this issue Nov 21, 2017 · 1 comment
Open

Operations order bug #22

jrfaeder opened this issue Nov 21, 2017 · 1 comment

Comments

@jrfaeder
Copy link

This issue was reported by Pedro Mendes.
The following reaction can cause NFsim to fail:
E1(a!1,b!2).A(e1!1).B(e1!2) <-> E1(a!1,b!2).P(e1!1,e2).Q(e1!2) k131, k132 DeleteMolecules
NFsim tries to create a bond between the newly created P molecule and E1 before it deletes A, causing the following error:

Your universal traversal limit was probably set too low, so some updates were not correct!

Trying to bond E1_2054(a) & P_6(e1)
to sites that are already occupied! Check rxn rules!!

++ Molecule instance of type: E1 (uId=2054, tId=2, cId=181, degree=0)
components: a=NO_STATE bond=A_181(e1)
b=NO_STATE bond=B_1443(e1)
++ Molecule instance of type: P (uId=6, tId=3, cId=6, degree=0)
components: e1=NO_STATE bond=empty
e2=NO_STATE bond=empty

The UTL issue is probably not relevant here.
This problem occurs in both 1.11 and 1.12.
RandomBiBi.bngl.txt

@ASinanSaglam
Copy link

The following is likely related to this issue

This was reported by: Freundliche Grüße, I'm just adding it as an issue on GH.

This reaction fails to run in NFsim

A1(a!1).B(b!1) + A2(a) <-> A1(a) + A2(a!1).B(b!1) 1,1

with the error:

Trying to bond A1_0(a2) & B_4(b)                                     
to sites that are already occupied!  Check rxn rules!! 

Furthermore, restating this rule with

A1(a!1).B(b!1) + A2(a) -> A1(a) + A2(a!1).B(b!1) 1
A1(a) + A2(a!1).B(b!1) ->  A1(a!1).B(b!1) + A2(a) 1

also fails with the same error but switching the order of the reactant and products actually runs without errors:

A1(a!1).B(b!1) + A2(a) -> A1(a) + A2(a!1).B(b!1) 1
A2(a!1).B(b!1) + A1(a) -> A2(a) + A1(a!1).B(b!1) 1

The resulting BNG-XMLs are exactly what's expected from them, likely pointing to an issue somewhere in NFsim.

Below is a sample BNGL for this issue., again written by Freundliche Grüße

begin model
begin molecule types
    A1(a,a,a)
    A2(a,a)
    B(b)
end molecule types
begin reaction rules
    # Not working
    # A1(a!1).B(b!1) + A2(a) <-> A1(a) + A2(a!1).B(b!1) 1,1
    # Not Working either
    # A1(a!1).B(b!1) + A2(a) -> A1(a) + A2(a!1).B(b!1) 1
    # A1(a) + A2(a!1).B(b!1) ->  A1(a!1).B(b!1) + A2(a) 1
    # Working
    A1(a!1).B(b!1) + A2(a) -> A1(a) + A2(a!1).B(b!1) 1
    A2(a!1).B(b!1) + A1(a) -> A2(a) + A1(a!1).B(b!1) 1
end reaction rules
begin seed species
    A1(a!1,a!2,a!3).B(b!1).B(b!2).B(b!3) 1
    A2(a,a) 1
end seed species
end model
# Simulation Commands
writeXML()
simulate_nf({gml=>100000000,suffix=>"stage_1",get_final_state=>1,seed=>1,t_end=>2,n_steps=>2,complex=>1,print_functions=>1,utl=>500})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants