Exclude Bug
From BioNetWiki
The following input file can be used to demonstrate the improper handling of the exclude directive in BNG versions earlier than 2.0.34.
# This is a test file taken from SHP2_base_model.bngl that illustrates
# the exclude bug present prior to version 2.0.34 of BioNetGen.
# This combination of seed species and rules should generate only
# a single reaction (S + dimer -> ...), but it will generate a second
# reaction cross-linking the dimer and the Shp2-containing dimer if the
# bug is not fixed.
# Concentration units are in micromolar; time units are in seconds.
begin parameters
kon_CSH2 1
koff_CSH2 1
R_dim 0.025 # R_tot= 2*R_dim
S_tot 0.05
end parameters
begin species
S(NSH2~C,CSH2,PTP~C) S_tot
R(DD!1,Y1~U,Y2~P).R(DD!1,Y1~U,Y2~P) R_dim
R(DD!1,Y1~U,Y2~P!2).R(DD!1,Y1~U,Y2~P!3).S(CSH2,NSH2~O!2,PTP~O).S(CSH2,NSH2~O!3,PTP~O) R_dim
end species
begin reaction rules
# Binding of S(CSH2) from cytosol
R(Y2~P) + S(CSH2) <-> R(Y2~P!1).S(CSH2!1) kon_CSH2,koff_CSH2 \
exclude_reactants(2,R)
end reaction rules
begin observables
Molecules pYR R(Y1~P!?)
end observables
generate_network({overwrite=>1,max_iter=>1});
When run with version 2.0.34 or later, it will produce the following output.
BioNetGen version 2.0.34+ Reading from file SHP2_test.bngl Read 4 parameters. Adding O as allowed state of component NSH2 of molecule S Adding O as allowed state of component PTP of molecule S Read 3 species. Read 1 reaction rule(s). Adding P as allowed state of component Y1 of molecule R Read 1 observable(s). WARNING: Removing old network file SHP2_test.net. Iteration 0: 3 species 0 rxns 0.00e+00 CPU s Iteration 1: 4 species 1 rxns 2.00e-02 CPU s Cumulative CPU time for each rule Rule 1: 1 reactions 2.00e-02 CPU s 2.00e-02 CPU s/rxn Total : 1 reactions 2.00e-02 CPU s 2.00e-02 CPU s/rxn Wrote network to SHP2_test.net. CPU TIME: generate_network 0.0 s. Finished processing file SHP2_test.bngl CPU TIME: total 0.4 s.
