BNGL import erroneously scales initial conditions by 2e-5
When BNGL is imported and option "Molecules" is selected, all initial counts are multiplied by 2e-5. No scaling (everything is OK) when "Concentration" option is selected.
Save this file with .bngl extension and import with volume 1: once as Concentrations (no changes), once with Molecules - all initial counts will be scaled.
begin model begin parameters kp1 1.667e-06 # ligand-monomer binding, units: /molecule/s km1 0.06 # ligand-monomer dissociation, units: /s end parameters begin molecule types egf(r) egfr(l,r,Y1068~Y~pY) end molecule types begin seed species egf(r) 1.2e6 egfr(l,r,Y1068~Y) 1.8e5 end seed species begin reaction rules egfr(l,r) + egf(r) <-> egfr(l!1,r).egf(r!1) kp1, km1 #ligand-monomer end reaction rules begin observables Molecules Efgr_total egfr() end observables end model
Clarification from Michael: if "molecules" are selected during import, the number specified in the bngl input file is to be considered as the absolute number of molecules, regardless of volume.
For example, egfr(l,r,Y1068~Y) 1.8e5 means we have 1.8e5 molecules in our volume.
Jim thinks it is ignoring the volume = 1 (or uses that as an extra scalar for default cell volume) and instead using 1/50,000 as a scale factor because default cell size is 50,000 cubic microns.
okay, then problem was when we imported BNGL models as within a ode application, we always coerced the application initial conditions to be "concentration", even if the user chose "molecules". A bit difficult to track down, but I found the fix.
fixed in #1567