RuleWorld / bionetgen

Rule-based modeling framework
https://bionetgen.org/
MIT License
56 stars 25 forks source link

Missing compartment topology connections in VCell bngl output #246

Open jrfaeder opened 2 years ago

jrfaeder commented 2 years ago

This issue needs further investigation using VCell itself and with VCell developers, but putting a placeholder here. VCell seems to export compartmental models that don't have parent compartments listed in the compartments block. Not sure if this is all compartmental models exported from VCell or just a subset.

Here's a very simple example with two compartments EC and mem:

begin compartments
    EC  3   1
    mem 2   1 
end compartments

Because mem does not have a parent compartment, compartmental rules involving species in adjacent compartments do not generate reactions:

r0: @EC:Lig(Site0) + @mem:Receptor(Site0~U) -> @mem:Lig(Site0!1).Receptor(Site0~U!1)        1.0E-4

A complete example model is lig_receptor.bngl.txt

jrfaeder commented 2 years ago

The simple fix for this model is to add a parent compartment to the compartments block:

begin compartments
EC  3   1
mem 2   1 EC
end compartments