Skip to content

Commit

Permalink
added unit correction for enzyme.concentration function
Browse files Browse the repository at this point in the history
  • Loading branch information
SamiralVdB committed Aug 8, 2024
1 parent 0fa8dcb commit 9a4d103
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/PAModelpy/Enzyme.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def concentration(
concentration = self.enzyme_variable.concentration
if units == 'g/gDW':
#converting mmol to grams of protein:
# [g] = [mmol]* 1e-3 [mol/mmol] * MW[g/mol]
concentration = concentration * 1e-3 * self.molmass
# [g] = [mmol]* 1e-3 [mol/mmol] * MW[g/mol] *1e-6 [solver tolerance conversion factor]
concentration = concentration * 1e-3 * self.molmass*1e-6
if return_units:
return concentration, units
return concentration
return concentration*1e-6, units
return concentration*1e-6

@concentration.setter
def concentration(self, conc):
Expand Down
2 changes: 1 addition & 1 deletion src/PAModelpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
print('Loading PAModelpy modules version 0.0.3.16')
print('Loading PAModelpy modules version 0.0.3.17')

from .Enzyme import *
from .EnzymeSectors import *
Expand Down
2 changes: 1 addition & 1 deletion src/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ find = {} # Scan the project directory with the default parameters

[project]
name = 'PAModelpy'
version = '0.0.3.16'
version = '0.0.3.17'
authors = [{name='Samira van den Bogaard', email = '[email protected]'}]
description = 'Python framework for building and analysing protein allocation models'
readme = 'README.md'
Expand Down

0 comments on commit 9a4d103

Please sign in to comment.