MATLAB: Unit conversion in Simbiology

heterogeneous reactionSimBiologyunit conversion

Hi to all,
Does Simbiology performs unit conversion when, for example, a species in the membrane is transformed into a cytoplasmatic product? It certainly does some conversion but I’m not sure is the right one. For example, 1 molecule/micrometer^2 is transformed by an irreversible reaction from the compartment X that has 6 micrometer^2 capacity into 6 nM of the product in compartment Y that has 1 micrometer^3 capacity. According to my numbers it should have been 10nM instead of 6nM.
Am I missing something here?
Thanks in advance,
Omar

Best Answer

Hello Omar,
SimBiology can operate in one of two modes when it comes to Units conversions and checking dimensions. By default it performs dimensional analysis using user provided units but does no unit conversions. To turn on unit conversion from the SimBiology Desktop go to the "simulation settings" panel for the simulation task and at the bottom of that panel you will see a checkbox to turn on UnitConversion.
From the MATLAB command line here is the code that I used to confirm that product in compartment Y has 10nM:
m = sbiomodel('unit conversion check');
X = m.addcompartment('X', 'Capacity', 6, 'CapacityUnits', 'micrometer^2');
X.addspecies('membrane_species', 'InitialAmount', 1, 'InitialAmountUnits', 'molecule/micrometer^2');
Y = m.addcompartment('Y', 'Capacity', 1, 'CapacityUnits', 'micrometer^3');
Y.addspecies('cytoplasmic_product', 'InitialAmount', 0, 'InitialAmountUnits', 'nanomolarity');
m.addreaction('X.membrane_species -> Y.cytoplasmic_product', 'reactionrate', 'K*X.membrane_species');
m.addparameter('K', 'Value', 1, 'ValueUnits', '1/second');
% Turn on UnitConversion
cs = m.getconfigset;
cs.CompileOptions.UnitConversion = true;
[t,x] = sbiosimulate(m);
plot(t,x)
Hope this helps.