58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BaseCellSimulation.Enzyms.Cytosol
|
|
{
|
|
public class AdenylateKinase : InternalEnzym
|
|
{
|
|
public AdenylateKinase()
|
|
{
|
|
Km = 0.1;
|
|
Vmax = 5;
|
|
Keq = 1.1;
|
|
|
|
KmRange = new(0.01, 0.5);
|
|
VmaxRange = new(0.5, 15);
|
|
KeqRange = new(0.9, 1.2);
|
|
}
|
|
|
|
public double Keq { get; set; }
|
|
|
|
public ValueRange KeqRange;
|
|
|
|
public override void ApplyChanges(CellRessources res, double dt)
|
|
{
|
|
double d = rate * dt;
|
|
|
|
// Begrenzen, damit keine negativen Konzentrationen entstehen
|
|
if (d > 0.0)
|
|
{
|
|
// Vorwärtsrichtung: 2 ADP -> ATP + AMP
|
|
double limit = Math.Min(res.Res.Energy.ADP / 2.0, d);
|
|
res.Res.Energy.ADP -= 2.0 * limit;
|
|
res.Res.Energy.ATP += limit;
|
|
res.Res.Energy.AMP += limit;
|
|
}
|
|
else if (d < 0.0)
|
|
{
|
|
// Rückwärtsrichtung: ATP + AMP -> 2 ADP
|
|
double limit = Math.Min(Math.Min(res.Res.Energy.ATP, res.Res.Energy.AMP), -d);
|
|
res.Res.Energy.ADP += 2.0 * limit;
|
|
res.Res.Energy.ATP -= limit;
|
|
res.Res.Energy.AMP -= limit;
|
|
}
|
|
}
|
|
|
|
public override void ComputeRate(Resources res)
|
|
{
|
|
double numerator = res.Energy.ADP * res.Energy.ADP - res.Energy.ATP * res.Energy.AMP / Keq;
|
|
double denominator = Km * Km + res.Energy.ADP * res.Energy.ADP;
|
|
|
|
rate = Vmax * (numerator / denominator); // Nettoreaktionsrate in mM/s
|
|
}
|
|
}
|
|
}
|