Semicolons in SimBiology species names: just characters, or functionally active?

1 visualizzazione (ultimi 30 giorni)
I was looking at Sven Mesecke's implementation of the Renin Angiotensin Aldosterone System model of Lo et al. 2011. (For those who are interested, its available on the Mathworks' fileexchange site, here).
It's nice. I did note though, that Sven implemented the name of bound Angiotensin II with a semicolon. That is:
AngII --> AngII:AT1R
I added a representation of AT1R, so my reaction is:
AngII + AT1R --> AngII:AT1R
It all works just fine, however, if I try to implement a lagged version of the bound concentration (let's call it "LBC"), ala
dLBC/dt = klag * ( AngII:AT1R - LBC)
I get an error. That is, if I put the forward rate constant in as klag * AngII:AT1R, Simbiology parses this as klag * AngII * AT1R. There appears to be no way to get SimBiology to parse the species AngII:AT1R as a species, and not as the product of two species, in the rate expression.
Do semicolons have special signficance in species names? If so, is there documentation somewhere. If not... Well, if not I guess this is a bug.
I suspect that semicolons should not be used in species names, as a rule.
Thanks!
  1 Commento
Jim Bosley
Jim Bosley il 17 Giu 2020
Modificato: Jim Bosley il 17 Giu 2020
Arthur,
As always, your reply is spot on. I'd tried parentheses, so I was close!
So to be clear, the semicolon would give a range of species between AngII and AT1R. I tried this, and (at least interactively) this throws an error. For example:
sbr = sbioroot;
mc = sbioroot.Models(end);
mcs1 = sbioselect(mc,'Name','AT1R');
mcs2 = sbioselect(mc,'Name','AngI');
mcs1:mcs2
Undefined operator ':' for input arguments of type
'SimBiology.Species'.
Apparently Simbiology parses the construct AT1R:AngI as AT1R * AngI. But I think me crawling into the way that SB parses rate laws is counterproductive. For now I can do either
1) Change Ang1:AT1R to Ang1_AT1R
2) Use [Ang1:AT1R] in rate laws as you point out.
From your note I'll infer that there's no advantage to the ":" notation and, given the ambiguity, a disadvantage. I'm changing the names to the underline form.
Thanks!

Accedi per commentare.

Risposta accettata

Arthur Goldsipe
Arthur Goldsipe il 17 Giu 2020
Hi Jim,
You can name your species almost anything. The naming restrictions are documented here. However, if the name is not a valid MATLAB variable name, then you must enclose the name in square brackets whenever you write it in an expression. (It's also ok to enclose a name in square brackets even if the name is a valid variable name. So if in doubt, just use brackets.)
So, you could fix your example by changing klag * AngII:AT1R to klag * [AngII:AT1R]. Without the brackets, SimBiology tries to interpret : as the colon operator.
-Arthur

Più risposte (0)

Categorie

Scopri di più su Perform Sensitivity Analysis in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by