Biological Background

The bacterial flagellum is assembled from ~30 different proteins through seven sequential complexation reactions. Multi-subunit assembly (up to 120 copies of FlgE for the hook) is modeled using a scaffold-with-counters strategy that generates 237 reaction rules from 7 biological reactions.

#ProductSubunitsTotal
1flhDC4× flhD + 2× flhC6
2flagellar motor switch26× fliG + 34× fliM + fliN61
3flagellar export apparatus subunitflhA + flhB + fliO + fliP + fliQ + fliR + fliJ + 6× fliI13
4flagellar export apparatusflagellar export apparatus subunit + 12× fliH13
5flagellar motorflagellar motor switch + 2× fliL + flgH + motA + motB + flgB + flgC + flgF + flgG + flgI + fliF + fliE13
6flagellar hook120× flgE120
7flagellaflagellar export apparatus + flagellar motor + fliC + flgL + flgK + 5× fliD + flagellar hook11

NFSim simulates these rules efficiently without enumerating the species space, using a network-free stochastic approach that scales well for large rule sets.

Modeling Approach

  1. Nucleation — two monomers react to create a Growing scaffold with internal counters
  2. Sequential growth — monomers bind one at a time, incrementing counters
  3. Completion — when all counters reach targets, the scaffold converts to the finished complex
1

Standalone Assembly

Fixed monomer pool, hierarchical flagella assembly

Starting with enough monomers for 5 flagella (N=5), NFSim simulates 500 seconds of stochastic rule-based assembly. Complexes form hierarchically: FlhDC first (smallest, 6 subunits), then motor switch (61 subunits), export apparatus, motor, the 120-subunit hook, and finally complete flagella. This demonstrates the NFSimProcess bridge pattern running standalone.

ModeStandalone NFSim
Flagella3
Total Complexes14
Time Points501
Sim Duration500s
Runtime1.0s

Assembly Dynamics

Bigraph Architecture

Bigraph architecture diagram

Composite Document

2

Composed: Steady Production

Continuous monomer production + complexation via process-bigraph

Two processes composed via process-bigraph wired to shared state: MonomerProduction adds monomers every 1s at gene-expression rates (~1 flagellum worth per 100s), while NFSimProcess runs NFSim every 50s to assemble accumulated monomers. Monomer pools show sawtooth dynamics as production accumulates them between complexation steps. This is the core workflow demonstrating process composition.

ModeComposed Workflow
Flagella14
Total Complexes40
Time Points40
Sim Duration2000s
Runtime11.8s

Assembly Dynamics

Bigraph Architecture

Bigraph architecture diagram

Composite Document

3

Composed: Fast Production

Accelerated monomer production for rapid assembly

Same composed workflow but with 3x monomer production rate, simulating overexpression of flagellar genes. The higher supply rate leads to faster assembly kinetics and larger monomer pools between complexation steps. Compare with the steady production configuration to see how production rate affects assembly yield.

ModeComposed Workflow
Flagella36
Total Complexes88
Time Points30
Sim Duration1500s
Runtime8.8s

Assembly Dynamics

Bigraph Architecture

Bigraph architecture diagram

Composite Document