sybila / eBCSgen

eBCSgen - BioChemical Space Language support tool.
https://ebcsgen.readthedocs.io/
MIT License
2 stars 4 forks source link

Isomorphism in SBML-multi export #18

Open xtrojak opened 3 years ago

xtrojak commented 3 years ago

In order to export BCSL models to SBML-multi standard, it is necessary (to the best of our knowledge) to include extra rules which transform the isomorphic form of BCSL complexes used in rules/inits/rates. This is necessary because an external tool might not recognize isomorphism to such extend as BCSL does.

Moreover, this becomes tricky because of the used abstraction introduced by the rule-based approach. There might be "hidden" isomorphic forms of a complex which are not equal but rather compatible. This will most probably not be covered in #11.

xtrojak commented 2 years ago

Also covered in #32. There is possibly more reactions to cover all isomorphisms than needed, but otherwise it's correct.

xtrojak commented 2 years ago

Actually, the problem is much more complex. We have identified three types of possible isomorphism occuring in a model:

  1. simple shuffling of identical agents (only this type is already covered in the implementation)
A(dom{u}).B()::cell => A(dom{p}).B()::cell
B().A(dom{u})::cell => B().A(dom{p})::cell
  1. shuffling of compatible agents
A(dom{u}).B()::cell => A(dom{p}).B()::cell
B().A()::cell => B()::cell + A()::cell
  1. multiple domains in a structure agent in combination with incompatible complexes
A(S{u},T{p}).B()::cell => A(S{p},T{p}).B()::cell
A(T{u}, S{u})::cell => A(T{p}, S{u})::cell

(Maybe the last one is not an issue directly, or is only related to multiple domains)

As a consequence, if there is an "isomorphic" agent used in inits, a corresponding conversion reaction to a form used in a rule might be missing entirely.