LoLab-MSM / pysb

Python framework for Systems Biology modeling [Lopez Lab Mods]
BSD 2-Clause "Simplified" License
6 stars 8 forks source link

Modify PySB to detect dangling bonds #21

Open lh64 opened 9 years ago

lh64 commented 9 years ago

Currently, patterns like A(b=1) % B(a=2) are allowed in PySB. These are examples of dangling bonds that should be illegal, and formally are in BNGL. Unfortunately, however, BNG does not currently have any code for detecting dangling bonds, so they are actually legal syntax in practice. Therefore, if a PySB rule is accidentally created with dangling bonds (which has happened, see Issue #9 ) there is nothing currently to detect and prevent this. It probably makes sense for us to implement a dangling bond detector at the PySB level since it's unclear when (if ever) this issue will be resolved in the BNG code.

alubbock commented 6 years ago

@lh64 Detecting dangling bonds should be straightforward, but should they cause a Python warning, or an error?

lh64 commented 6 years ago

It's illegal syntax, so I think an error.

alubbock commented 6 years ago

Implemented in pysb/pysb#328