Closed jczech closed 6 years ago
Here's an even shorter version of the file that demonstrates the issue seems to be having three product patterns in the rule.
begin molecule types
A(b)
B(a,c)
C(b)
end molecule types
begin seed species
A(b!1).B(a!1,c!2).C(b!2) 1
end seed species
begin observables
Molecules Afree A(b)
end observables
begin reaction rules
A(b!1).B(a!1,c!2).C(b!2) -> \
A(b) + B(a,c) + C(b) 1
end reaction rules
generate_network({overwrite=>1});
simulate({method=>"ode",t_end=>10,n_steps=>10})
Upon further inspection with the streamlined code, the problem commit seems to be febb4a1f2dc2daa208c72a3ec20daf94589682b7
.
Well, the one right before that runs correctly, but the commit Jacob identified above also seems to have problems!
I found the bug here:
RxnRule.pm:3922 #jjt: only iterate over reactants
foreach my $ref ( @$edel[0..2] )
Changing [0..2] to [0..1] disappears the bug. This also explains the erratic behavior I think. The bug was otherwise harmless because deleteEdge would ignore the third argument.
A previously working model produces the following error in the latest version of BioNetGen:
Based on a git bisect, this seems to have orginated with commit 6743c167a31b03fd11d3cba630e072aeaf6ca901.
Here's a stripped down version of that model that produces the same error: