Fig 1.
Classical syntax (railroad) diagrams.
A. Syntax diagram defining a language of all sentences of the form “The {quick, —} {—, brown, red, black} fox {jumps, ran, walked} over the {—, lazy} {dog, cat, turtle}.” Here, each bracketed group offers choices, and “—” means the element can be omitted. This gives: 2 × 4 × 3 × 2 × 3 = 144 possible sentences, such as: “The quick fox walked over the lazy cat.” or “The brown fox ran over the dog.” B. The railroad diagram for BNGL syntax. A Name is any sequence of letters, digits, or underscores, beginning with a letter. C. A site is a name optionally followed by one or more states that are defined as a name preceded by the tilde symbol. D. A molecule is a name optionally followed by a parenthesized, comma-separated list of sites.
Fig 2.
RRR diagrams representing molecules, species, and complexes.
A. EGFR molecule with 4 sites l, r, Y1068 and Y1148, with the last two being in two possible states each - unphosphorylated “u” and phosphorylated “p”. B. An EGFR species represented by an EGFR molecule with sites Y1068 and Y1148 both in the unphosphorylated (“Y”) state. C. A species consisting of an EGFR molecule connected to a Grb2 molecule via a bond between the phosphorylated (“p”) state of the Y1068 site on EGFR and the SH2 site on Grb2.
Fig 3.
A. An observable describing all species that include only EGFR molecule with site Y1068 in phosphorylated state. B. An observable describing all species that include EGFR molecule bound at site “r” and optionally bound at site “Y1148”.
Fig 4.
Irreversible rules for binding (A) and unbinding (B) of the SH2 domain of Grb2 to the Y1068 site of EGFR in the phosphorylated (“p”) state.
The SH3 site of Grb2 must be unbound for the interaction to occur. Other sites on EGFR are not constrained—they may be in any allowable state and may be either bound or unbound.
Fig 5.
Binding (A) and unbinding (B) of the SH2 domain of Grb2 to the Y1068 site of EGFR in the phosphorylated (“p”) state. The first arrow specifies the direction of the forward reaction: a downward arrow indicates that the forward rule creates a bond, while an upward arrow indicates that the forward rule breaks a bond. The color of the box reflects the nature of the forward direction: a green box denotes that the forward rule creates a bond, while a red box denotes that the forward rule destroys a bond. C. Intramolecular binding. Grb2 is already part of a complex with EGFR (indicated by a dashed line), and it binds/unbinds via its SH3 domain (shown by a solid bond). The rule shown is reversible and establishes a new bond between the SH2 domain of Grb2 and the phosphorylated Y1068 site of EGFR.
Fig 6.
A. Transphosphorylation of EGFR at the Y1068 site of the EGFR receptor. This reaction has two key requirements: (1) The receptor must be dimerized, specifically through an explicit bond at the “r” site, which corresponds to the transmembrane domain. This bond ensures that the two EGFR molecules are part of the same dimeric complex, enabling one receptor to phosphorylate the Y1068 site of its partner. (2) The Y1068 site on the target receptor must be unbound, allowing it to undergo phosphorylation without interference from existing interactions. B. Dephosphorylation reaction catalyzed by PTP not bound to receptor complex. In this case PTP molecule is not necessary binding to any other molecule, so it may lack any sites. C. Phosphorylation reaction of EGFR dimer catalyzed by Src kinase that is a part of the receptor complex. Note that to be part of a complex, at least one site of Src is required.
Fig 7.
Changes in molecular composition.
A. pro-EGF is processed to synthesize EGF. This transformation involves removing the pro-domain and producing a new molecular species, EGF, which can go on to interact with EGFR receptors. B. Oversimplified rule for degradation of EGF molecules in a complex. It involves removing a bond and a dashed line between the molecules.
Fig 8.
RuleRailRoad package workflow.
The bngl_parser.js module preprocesses strings from BNGL code files. expanded.js returns fully expanded BNGL strings and compare_reactions.js finds differences between reactants and products in a BNGL reaction rule. Molecules_BNGL_to_Python.js is designed to take these parsed BNGL strings and translate them into formatted diagram code to be drawn by railroad diagram classes. railroad.js is a railroad-diagram renderer that reads the diagram code and generates the SVG railroad visualization. These diagrams show molecular interactions by highlighting sites, states, bonds, and changes through reactions.