Skip to content

pH dynamics

Bastiaan edited this page Sep 27, 2024 · 3 revisions

Note: this feature is currently in development.

pH dynamics

iDynomics 2.0 can calculate the local pH in well-mixed and spatial compartments. A pKa value must be provided for every acid and base involved in the simulation (solutes) to enable the pH solver. The pH solver uses molar concentrations to find the pH balance. To find the pH in models working with weight-based concentrations [mg/L], the solute's molar weight needs to be provided. Do not provide molar weights if the model already works with molar concentrations [mmol/L], as the pH solver assumes conversion is required when this is provided. Finally, if the highest protonation state of a molecule considered in the simulation is charged, this charge must be provided through the maxCharge attribute.

For example in a simulation with ammonia as a solute the following XML code can be provided:

<solute name="Ammonia" concentration="17.0 [mg/L]" pKa="9.25" molarWeight="17.031 [g/mol]" maxCharge="1.0" />

Max charge has the value 1.0 here as ammonium (NH4+), the higher protonation state of ammonia, is positively charged. When a molecule's highest protonation state has a neutral charge the maxCharge attribute is not required. Remember that when you are working with bases it is always possible to convert pKb values into pKa values using:

pKa = -log(Kw) - pKb = 14 - pKb

It is also possible to include acids or bases with a multitude of protonation states. In this case, the pKa values of the molecule can be provided as a vector:

<solute name="phosphoricAcid" pKa="2.15,7.2,12.35" concentration="0.1 [mmol/L]" />

When the pH solver is enabled by providing pKa values, it becomes possible to use pH-sensitive reactions in your iDynoMiCS 2.0 model. You can do this by simply writing "pH" in your rate expression:

<expression value=" mass * ((umax*c) / (Kc+c)) * #e^-( Kph* (pH-pHopt)^2.0 ) ">
	<constant name="Kc" value="0.1" />    //substrate affinity
	<constant name="umax" value="0.1" />  //maximum growth rate
	<constant name="Kph" value="0.1" />   //pH sensitivity constant
	<constant name="pHopt" value="6.5" /> //pH optimum
</expression>

When pH dynamics are included in a simulation, iDynoMiCS 2.0 will include additional output grids for the pH, as well as the molar concentrations of each of the protonation states (numbered from highest protonation state (0) to the lowest (n).

Please note that the pH solver may in some cases not be able to correctly resolve the exact pH. We are currently aware that in some cases involving negative pKa values (extremely acidic), the solver does not converge under default solver settings. It is therefore always advised to verify your results and check for solver/error messages. you can set the log level to EXPRESSIVE to receive additional output <simulation log="EXPRESSIVE" />

Clone this wiki locally