RuleWorld / nfsim

A general-purpose, stochastic, biochemical reaction simulator for large reaction networks
http://michaelsneddon.net/nfsim/
MIT License
14 stars 9 forks source link

Ring closure bug #24

Open jrfaeder opened 6 years ago

jrfaeder commented 6 years ago

NFsim error trying to bond two already bound sites when (intramolecular) ring closure reaction is allowed.

## title: BLBR_error.bngl
#  description: Ring closure with a disjoint pattern exposes a bug in NFsim. The seed
#               has been set to make this model behavior deterministic.

setOption("SpeciesLabel","HNauty");
begin parameters
 kp1 1
 km1 1
 kp2 1
 km2 1
 kp3 1
 km3 1
 R0  1000
 L0  1000
end parameters

begin species
  R(r,r) R0
  L(l,l) L0
end species

begin reaction rules
# Ligand addition
R(r) + L(l,l) <-> R(r!1).L(l!1,l) kp1,km1

# Chain elongation
R(r) + L(l,l!+) <-> R(r!1).L(l!1,l!+) kp2,km2

# Ring closure
R(r).L(l) <-> R(r!1).L(l!1) kp3,km3

end reaction rules

simulate({method=>"nf",seed=>916749345,t_end=>10,n_steps=>1000,get_final_state=>1})