This pull request includes several changes to improve the handling of energy and adenine nucleotide balance in the simulation. The most important changes include adding new calculation functions, enhancing the glycolysis process, and introducing observers for better monitoring.
Enhancements to Energy and Adenine Nucleotide Calculations:
pyology/energy_calculations.py: Added functions to calculate energy states and total adenine nucleotides. ([pyology/energy_calculations.pyR1-R72](diffhunk://#diff-fe2ad65c06a417fe98dc759adb4480da8870f8e691842ca3025f4f1a9797ef0eR1-R72))
pyology/simulation.py: Integrated new calculation functions and added methods to check and adjust adenine nucleotide balance and energy conservation. ([[1]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3L123-R173), [[2]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R233-R250), [[3]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R320-R336), [[4]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R449-R461), [[5]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3L507-R595))
Improvements to Glycolysis Process:
pyology/glycolysis.py: Enhanced the perform method to include energy and adenine nucleotide checks before and after glycolysis. Added methods to calculate energy state and total adenine nucleotides. ([[1]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R61-R63), [[2]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R116-R132), [[3]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R165), [[4]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0L151-R174), [[5]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R241), [[6]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R260-R267), [[7]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R283-R290))
Introduction of Observers:
pyology/observers.py: Introduced Observer abstract class and implemented NegativeMetaboliteObserver and AdenineNucleotideBalanceObserver for better monitoring of metabolite states. ([pyology/observers.pyR1-R50](diffhunk://#diff-82ecfafd430ce1022eee5e07168e40c5424bea794551deb05d759b0eac96f73bR1-R50))
pyology/simulation.py: Integrated observers to monitor negative metabolite quantities and adenine nucleotide balance during the simulation. ([[1]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3L123-R173), [[2]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R233-R250), [[3]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R320-R336))
Adjustments in Logging and Assertions:
fun.py: Refined logging messages and adjusted tolerance levels for adenine nucleotide conservation assertions. ([[1]](diffhunk://#diff-d435eea397cad82abcd437e54698df6557c66f0bad8f1fbb77f38c16e0416429L43-R47), [[2]](diffhunk://#diff-d435eea397cad82abcd437e54698df6557c66f0bad8f1fbb77f38c16e0416429L67-R82))
Code Refactoring:
pyology/glycolysis.py: Refactored imports and removed unused code. ([pyology/glycolysis.pyL5-R9](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0L5-R9))
These changes collectively enhance the accuracy and robustness of the simulation by ensuring proper energy and nucleotide balance and providing better monitoring capabilities.
This pull request includes several changes to improve the handling of energy and adenine nucleotide balance in the simulation. The most important changes include adding new calculation functions, enhancing the glycolysis process, and introducing observers for better monitoring.
Enhancements to Energy and Adenine Nucleotide Calculations:
pyology/energy_calculations.py
: Added functions to calculate energy states and total adenine nucleotides. ([pyology/energy_calculations.pyR1-R72](diffhunk://#diff-fe2ad65c06a417fe98dc759adb4480da8870f8e691842ca3025f4f1a9797ef0eR1-R72)
)pyology/simulation.py
: Integrated new calculation functions and added methods to check and adjust adenine nucleotide balance and energy conservation. ([[1]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3L123-R173)
,[[2]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R233-R250)
,[[3]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R320-R336)
,[[4]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R449-R461)
,[[5]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3L507-R595)
)Improvements to Glycolysis Process:
pyology/glycolysis.py
: Enhanced theperform
method to include energy and adenine nucleotide checks before and after glycolysis. Added methods to calculate energy state and total adenine nucleotides. ([[1]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R61-R63)
,[[2]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R116-R132)
,[[3]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R165)
,[[4]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0L151-R174)
,[[5]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R241)
,[[6]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R260-R267)
,[[7]](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0R283-R290)
)Introduction of Observers:
pyology/observers.py
: IntroducedObserver
abstract class and implementedNegativeMetaboliteObserver
andAdenineNucleotideBalanceObserver
for better monitoring of metabolite states. ([pyology/observers.pyR1-R50](diffhunk://#diff-82ecfafd430ce1022eee5e07168e40c5424bea794551deb05d759b0eac96f73bR1-R50)
)pyology/simulation.py
: Integrated observers to monitor negative metabolite quantities and adenine nucleotide balance during the simulation. ([[1]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3L123-R173)
,[[2]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R233-R250)
,[[3]](diffhunk://#diff-d00b2984a6af8c486c7f002cf15b4ce18decf82355ef0e2e673503175d752af3R320-R336)
)Adjustments in Logging and Assertions:
fun.py
: Refined logging messages and adjusted tolerance levels for adenine nucleotide conservation assertions. ([[1]](diffhunk://#diff-d435eea397cad82abcd437e54698df6557c66f0bad8f1fbb77f38c16e0416429L43-R47)
,[[2]](diffhunk://#diff-d435eea397cad82abcd437e54698df6557c66f0bad8f1fbb77f38c16e0416429L67-R82)
)Code Refactoring:
pyology/glycolysis.py
: Refactored imports and removed unused code. ([pyology/glycolysis.pyL5-R9](diffhunk://#diff-ef837c0d904307b5f517cfca01a07cc0ac37f8e8aee66f6a7e6f2aeca6fabbe0L5-R9)
)These changes collectively enhance the accuracy and robustness of the simulation by ensuring proper energy and nucleotide balance and providing better monitoring capabilities.