From 29314bb87d677461dd2a3f8532ee3e0e5cd60c6c Mon Sep 17 00:00:00 2001 From: jrfaeder Date: Thu, 1 Feb 2024 17:38:49 -0500 Subject: [PATCH] Modified ring models --- .DS_Store | Bin 6148 -> 6148 bytes Issues/.DS_Store | Bin 0 -> 6148 bytes Issues/ringOpening_pawel/xyz_04.bngl | 20 +-- Issues/ringOpening_pawel/xyz_04.species | 5 + Issues/ringOpening_pawel/xyz_04.xml | 194 ++++++++++++++++++++++ Issues/ringOpening_pawel/xyz_04_sbml.xml | 21 +-- Issues/ringOpening_pawel/xyz_04b.bngl | 20 +-- Issues/ringOpening_pawel/xyz_04b.species | 5 + Issues/ringOpening_pawel/xyz_04b.xml | 194 ++++++++++++++++++++++ Issues/ringOpening_pawel/xyz_04b_sbml.xml | 21 +-- Issues/ringOpening_pawel/xyz_05.bngl | 39 +++++ 11 files changed, 458 insertions(+), 61 deletions(-) create mode 100644 Issues/.DS_Store create mode 100644 Issues/ringOpening_pawel/xyz_04.species create mode 100644 Issues/ringOpening_pawel/xyz_04.xml create mode 100644 Issues/ringOpening_pawel/xyz_04b.species create mode 100644 Issues/ringOpening_pawel/xyz_04b.xml create mode 100755 Issues/ringOpening_pawel/xyz_05.bngl diff --git a/.DS_Store b/.DS_Store index 70deddf32ef56ca89cabb2c737539cb73750d8fd..875187b664a1b15180a40b063bbf1bb93d3e0f67 100644 GIT binary patch delta 69 zcmZoMXffEJ&d9i9vIb+JxGpe&~X6N|J4*;sc6juNM delta 68 zcmZoMXffEJ&d9iZvIb+Jns{}!g{h&Af`v(~jzYDig_(|miLqI2EhmSlvc7dte0EN5 YUVi7~1B~*FU7H^;s@iknj9H+Fg$guZ2#%w!NWpjzxte3d1}tPT z3)o~OnjHU;0X(}JoY);p;N(7^p9kL1Pm{49NgtwK{c#i~(^l(^7mB5g&9YUts@9GB zAX9hhO=pSYO|GzaE@kBBw&!1j!*o#JI+5|z3*+HLC4|8cLar~vIFP9$XK|3ITvrcR z6{|9+H|F!BZm%i!JDo*S%zNE-Qyd<&7mJFuy|a6KHh7Fiv3%CFa`*z3)C}hE0>%$J zd~zpoB;$LC%4f(k35fw>fEZX;2F!hDRo8Wcv@c?S82B{M j3{{FD7E5shR0;S68i2OJOe1(e=tn@&Kn*eQrwqIU;t5by literal 0 HcmV?d00001 diff --git a/Issues/ringOpening_pawel/xyz_04.bngl b/Issues/ringOpening_pawel/xyz_04.bngl index ab58caf7..e62e2cdd 100755 --- a/Issues/ringOpening_pawel/xyz_04.bngl +++ b/Issues/ringOpening_pawel/xyz_04.bngl @@ -24,8 +24,7 @@ begin observables end observables begin functions -# f(xy) if(boundZ(xy)>0,1,0) - f(xy) boundZ(xy) + f(xy) if(boundZ(xy)==0,1,0) end functions begin reaction rules @@ -37,17 +36,16 @@ begin reaction rules # Here, the label xy is used to provide a pointer to the reactant complex that # is passed to the local function f, which in turn passes it to the observable # function boundZ. This observable counts the number of doubly bound Z molecules -# in the complex. Two versions of the function are provided. The first uses an -# if statement to set the rate to 1 if boundZ is present and 0 otherwise. The -# second sets the rate to be the number returned by boundZ. Note that the two -# functions would be equivalent if the boundZ observable were converted to a -# Species type instead of a Molecules type. - nonrestrictive: %xy::X(y!1).Y(x!1) -> %xy::X(y,z) + Y(x,z) f(xy) +# in the complex. The rate is set to 1 only if boundZ is 0; otherwise the rate +# is 0. Note that the network generated by generate_network will automatically +# exclude dissociation of the XYZ complex as described int xyz_01.bngl (because +# the product stoichiometry is not matched). + nonrestrictive: %xy::X(y!1).Y(x!1) -> %xy::X(y) + Y(x) f(xy) end reaction rules end model -generate_network({overwrite=>1}) -writeSBML() -#simulate({method=>"nf",t_end=>10,n_steps=>10}) +#generate_network({overwrite=>1}) +#writeSBML() +simulate({method=>"nf",t_end=>10,n_steps=>10}) diff --git a/Issues/ringOpening_pawel/xyz_04.species b/Issues/ringOpening_pawel/xyz_04.species new file mode 100644 index 00000000..4dac1e4d --- /dev/null +++ b/Issues/ringOpening_pawel/xyz_04.species @@ -0,0 +1,5 @@ +# nfsim generated species list for system: 'xyz_04' +# warning! this feature is not yet fully tested! +X(y!1,z!2).Y(x!1,z!3).Z(x!2,y!3) 1 +X(y,z) 1 +Y(x,z) 1 diff --git a/Issues/ringOpening_pawel/xyz_04.xml b/Issues/ringOpening_pawel/xyz_04.xml new file mode 100644 index 00000000..89d571c3 --- /dev/null +++ b/Issues/ringOpening_pawel/xyz_04.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if((boundZ(xy)==0),1,0) + + + + + + + + + + f(xy) + + + + diff --git a/Issues/ringOpening_pawel/xyz_04_sbml.xml b/Issues/ringOpening_pawel/xyz_04_sbml.xml index 04158ffd..d4ae65cd 100644 --- a/Issues/ringOpening_pawel/xyz_04_sbml.xml +++ b/Issues/ringOpening_pawel/xyz_04_sbml.xml @@ -21,7 +21,6 @@ - @@ -54,24 +53,6 @@ - - - - - - - - - - - - _nonrestrictive_local1 - S1 - - - - - @@ -83,7 +64,7 @@ - _nonrestrictive_local2 + _nonrestrictive_local1 S2 diff --git a/Issues/ringOpening_pawel/xyz_04b.bngl b/Issues/ringOpening_pawel/xyz_04b.bngl index c5164c95..daa7fc8a 100755 --- a/Issues/ringOpening_pawel/xyz_04b.bngl +++ b/Issues/ringOpening_pawel/xyz_04b.bngl @@ -20,12 +20,12 @@ end species begin observables Molecules XY X(y!1).Y(x!1) - Species boundZ Z(x!+,y!+) + Molecules boundZ Z(x!+,y!+) end observables begin functions -# f(xy) if(boundZ(xy)>0,1,0) - f(xy) boundZ(xy) +# f(xy) if(boundZ(xy)==0,1,0) + f(xy) 1-boundZ(xy) end functions begin reaction rules @@ -38,16 +38,16 @@ begin reaction rules # is passed to the local function f, which in turn passes it to the observable # function boundZ. This observable counts the number of doubly bound Z molecules # in the complex. Two versions of the function are provided. The first uses an -# if statement to set the rate to 1 if boundZ is present and 0 otherwise. The -# second sets the rate to be the number returned by boundZ. Note that the two +# if statement to set the rate to 1 if boundZ is 0 and 0 otherwise. The +# second sets the rate to be 1 - number returned by boundZ. Note that the two # functions would be equivalent if the boundZ observable were converted to a -# Species type instead of a Molecules type. - nonrestrictive: %xy::X(y!1).Y(x!1) -> %xy::X(y,z) + Y(x,z) f(xy) +# Species type instead of a Molecules type (except that this seems to break NFsim). + nonrestrictive: %xy::X(y!1).Y(x!1) -> %xy::X(y) + Y(x) f(xy) end reaction rules end model -generate_network({overwrite=>1}) -writeSBML() -#simulate({method=>"nf",t_end=>10,n_steps=>10}) +#generate_network({overwrite=>1}) +#writeSBML() +simulate({method=>"nf",t_end=>10,n_steps=>10}) diff --git a/Issues/ringOpening_pawel/xyz_04b.species b/Issues/ringOpening_pawel/xyz_04b.species new file mode 100644 index 00000000..60499743 --- /dev/null +++ b/Issues/ringOpening_pawel/xyz_04b.species @@ -0,0 +1,5 @@ +# nfsim generated species list for system: 'xyz_04b' +# warning! this feature is not yet fully tested! +X(y!1,z!2).Y(x!1,z!3).Z(x!2,y!3) 1 +X(y,z) 1 +Y(x,z) 1 diff --git a/Issues/ringOpening_pawel/xyz_04b.xml b/Issues/ringOpening_pawel/xyz_04b.xml new file mode 100644 index 00000000..957ce9fe --- /dev/null +++ b/Issues/ringOpening_pawel/xyz_04b.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1-boundZ(xy) + + + + + + + + + + f(xy) + + + + diff --git a/Issues/ringOpening_pawel/xyz_04b_sbml.xml b/Issues/ringOpening_pawel/xyz_04b_sbml.xml index 92036310..c73cc764 100644 --- a/Issues/ringOpening_pawel/xyz_04b_sbml.xml +++ b/Issues/ringOpening_pawel/xyz_04b_sbml.xml @@ -21,7 +21,6 @@ - @@ -54,24 +53,6 @@ - - - - - - - - - - - - _nonrestrictive_local1 - S1 - - - - - @@ -83,7 +64,7 @@ - _nonrestrictive_local2 + _nonrestrictive_local1 S2 diff --git a/Issues/ringOpening_pawel/xyz_05.bngl b/Issues/ringOpening_pawel/xyz_05.bngl new file mode 100755 index 00000000..a8c67fa2 --- /dev/null +++ b/Issues/ringOpening_pawel/xyz_05.bngl @@ -0,0 +1,39 @@ +########################################################### +## Model to demonstrate how bond breaking can be restricted +## in various ways. +## In this scenario the breaking of the bond between X and Y +## should only be applied if both molecules are not also +## bound to Z. + +begin model + +begin molecule types + X(y,z) + Y(x,z) + Z1(x,y) + Z2(x,y) +end molecule types + +begin species + X(y!1,z!2).Y(x!1,z!3).Z1(x!2,y!3) 1 + X(y!1,z!2).Y(x!1,z!3).Z2(x!2,y!3) 1 + X(y!1,z).Y(x!1,z) 1 +end species + +begin observables + Molecules XY X(y!1).Y(x!1) +end observables + +begin reaction rules + # Here is the old exclude_reactants syntax. It still seems to work. + exZ1: X(y!1).Y(x!1) -> X(y,z) + Y(x,z) 1 exclude_reactants(1,Z1) + exZ2: X(y!1).Y(x!1) -> X(y,z) + Y(x,z) 1 exclude_reactants(1,Z2) + exZ12: X(y!1).Y(x!1) -> X(y,z) + Y(x,z) 1 exclude_reactants(1,Z1,Z2) + +end reaction rules + +end model + +generate_network({overwrite=>1}) +#writeSBML() +#simulate({method=>"nf",t_end=>10,n_steps=>10})