InitalCommit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane.GLUT
|
||||
{
|
||||
public class GLUT1 : MembranEnzyme
|
||||
{
|
||||
public GLUT1()
|
||||
{
|
||||
Km = 1.5; // Example Km value in mM
|
||||
Vmax = 0.5;
|
||||
|
||||
KmRange = new(1.0, 3.0);
|
||||
VmaxRange = new(0.1, 10.0);
|
||||
}
|
||||
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = Math.Min(res.Env.Glucose, rate * dt);
|
||||
res.Env.Glucose -= flux;
|
||||
res.Res.Carbon.Glucose += flux;
|
||||
}
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
return res.Env.Glucose - res.Res.Carbon.Glucose;
|
||||
}
|
||||
|
||||
public override void ComputeRate(double gradient, EnviromentState Env)
|
||||
{
|
||||
if (gradient <= 0)
|
||||
{
|
||||
rate = 0;
|
||||
return;
|
||||
}
|
||||
Michaelis_Menten(gradient);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane.GLUT
|
||||
{
|
||||
public class GLUT2 : GLUT1
|
||||
{
|
||||
public GLUT2()
|
||||
{
|
||||
Km = 17.0; // Example Km value in mM
|
||||
Vmax = 1.2;
|
||||
|
||||
KmRange = new(15.0, 20.0);
|
||||
VmaxRange = new(1.0, 50.0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane.GLUT
|
||||
{
|
||||
public class GLUT3 : GLUT1
|
||||
{
|
||||
public GLUT3()
|
||||
{
|
||||
Km = 1.0;
|
||||
Vmax = 0.8;
|
||||
|
||||
KmRange = new(0.3, 1.0);
|
||||
VmaxRange = new(0.5, 20.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane.GLUT
|
||||
{
|
||||
public class GLUT4 : GLUT1
|
||||
{
|
||||
public GLUT4()
|
||||
{
|
||||
Km = 5.0; // Example Km value in mM for GLUT4
|
||||
Vmax = 0.6; // Higher Vmax for GLUT4
|
||||
ActivationThreshold = 0.3; // Example threshold for insulin activation
|
||||
|
||||
KmRange = new(4.0, 6.0);
|
||||
VmaxRange = new(0.2, 15.0);
|
||||
}
|
||||
|
||||
public double ActivationThreshold { get; set; }
|
||||
|
||||
public override void ComputeRate(double gradient, EnviromentState Env)
|
||||
{
|
||||
if (gradient <= 0)
|
||||
{
|
||||
rate = 0;
|
||||
return;
|
||||
}
|
||||
// GLUT4 is insulin-responsive, so we can add an insulin factor
|
||||
double insulinFactor = 0.5 * (Math.Tanh((Env.Insulin - ActivationThreshold) / 0.1) + 1.0); // Example: insulin increases rate up to 3x
|
||||
Michaelis_Menten(gradient);
|
||||
rate *= insulinFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane
|
||||
{
|
||||
public class KLeakChannel : MembranEnzyme
|
||||
{
|
||||
public double Permeability = 0.01; // 1/s, diffusionsbasiert
|
||||
|
||||
public override void ComputeRate(double gradient, EnviromentState env)
|
||||
{
|
||||
rate = Permeability * gradient;
|
||||
}
|
||||
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = rate * dt;
|
||||
res.Res.Ions.K -= flux; // aus der Zelle raus
|
||||
res.Env.K += flux;
|
||||
}
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
return res.Res.Ions.K - res.Env.K;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane
|
||||
{
|
||||
public class MCT : MembranEnzyme
|
||||
{
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
double hGradient = Math.Pow(10, -res.pH_in) / Math.Pow(10, -res.pH_ext);
|
||||
return res.Res.Carbon.Lactate - res.Env.Lactate * hGradient;
|
||||
}
|
||||
|
||||
public override void ComputeRate(double Gradient, EnviromentState env)
|
||||
{
|
||||
if (Gradient <= 0)
|
||||
{
|
||||
rate = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
Michaelis_Menten(Gradient);
|
||||
}
|
||||
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = rate * dt;
|
||||
|
||||
res.Res.Carbon.Lactate -= flux; // Laktat raus
|
||||
res.Env.Lactate += flux;
|
||||
res.Res.Ions.Protons -= flux; // Protonen raus (Symport)
|
||||
res.Env.Protons += flux;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane
|
||||
{
|
||||
/// <summary>
|
||||
/// Na+/Ca2+ Exchanger (3 Na⁺ in / 1 Ca²⁺ out)
|
||||
/// Einfaches Michaelis-Menten-basiertes Modell mit Gradienten
|
||||
/// </summary>
|
||||
public class NCX : MembranEnzyme
|
||||
{
|
||||
public double NaStoich = 3.0; // Na⁺ pro Ca²⁺
|
||||
public double CaStoich = 1.0;
|
||||
|
||||
/// <summary>
|
||||
/// Berechnet die Transport-Rate abhängig von zellinternen und externen Ionenkonzentrationen
|
||||
/// </summary>
|
||||
public override void ComputeRate(double gradient, EnviromentState env)
|
||||
{
|
||||
|
||||
// Michaelis-Menten-ähnliche Sättigung
|
||||
rate = Vmax * gradient / (Km + Math.Abs(gradient));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wendet den Transport auf die Zellressourcen an
|
||||
/// </summary>
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = rate * dt;
|
||||
|
||||
// Na+ in die Zelle
|
||||
res.Res.Ions.Na += NaStoich * flux;
|
||||
res.Env.Na -= NaStoich * flux;
|
||||
|
||||
// Ca2+ aus der Zelle
|
||||
res.Res.Ca.CytosolicCa -= CaStoich * flux;
|
||||
res.Env.Ca += CaStoich * flux;
|
||||
|
||||
}
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
// Gradienten: innen - außen
|
||||
double naGradient = res.Res.Ions.Na - res.Env.Na; // mM
|
||||
double caGradient = res.Res.Ca.CytosolicCa - res.Env.Ca; // mM
|
||||
|
||||
// Richtung: positiv = Ca raus / Na rein
|
||||
return (naGradient / NaStoich) - (caGradient / CaStoich);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane
|
||||
{
|
||||
public class NaK_ATPase : MembranEnzyme
|
||||
{
|
||||
public double ATPperCycle = 1.0;
|
||||
public double NaOutStoich = 3.0;
|
||||
public double KInStoich = 2.0;
|
||||
|
||||
public override void ComputeRate(double gradient, EnviromentState env)
|
||||
{
|
||||
|
||||
// niedriger Gradient → höhere Rate
|
||||
double effective = 1.0 / (1.0 + gradient);
|
||||
rate = Vmax * effective;
|
||||
}
|
||||
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = rate * dt;
|
||||
|
||||
// Verbrauch von ATP
|
||||
double atpNeeded = flux * ATPperCycle;
|
||||
if (res.Res.Energy.ATP < atpNeeded) flux *= res.Res.Energy.ATP / atpNeeded;
|
||||
|
||||
res.Res.Ions.Na -= NaOutStoich * flux; // Na raus
|
||||
res.Res.Ions.K += KInStoich * flux; // K rein
|
||||
res.Env.Na += NaOutStoich * flux;
|
||||
res.Env.K -= KInStoich * flux;
|
||||
res.ConsumeATP(atpNeeded);
|
||||
}
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
return (res.Res.Ions.Na / res.Env.Na) * (res.Env.K / res.Res.Ions.K);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane
|
||||
{
|
||||
// ----------------------------------------------------------
|
||||
// 3. PMCA – Ca²⁺-ATPase (Ca raus, ATP-abhängig)
|
||||
// ----------------------------------------------------------
|
||||
public class PMCA : MembranEnzyme
|
||||
{
|
||||
public double ATPperCycle = 1.0;
|
||||
|
||||
public override void ComputeRate(double caCyt, EnviromentState env)
|
||||
{
|
||||
// klassisch: Michaelis-Menten mit Ca²⁺-Abhängigkeit
|
||||
rate = Michaelis_Menten(caCyt, Vmax, Km);
|
||||
}
|
||||
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = rate * dt;
|
||||
double atpNeeded = flux * ATPperCycle;
|
||||
|
||||
if (res.Res.Energy.ATP < atpNeeded) flux *= res.Res.Energy.ATP / atpNeeded;
|
||||
|
||||
res.Res.Ca.CytosolicCa -= flux; // Ca raus
|
||||
res.Env.Ca += flux;
|
||||
res.ConsumeATP(atpNeeded);
|
||||
}
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
return res.Res.Ca.CytosolicCa; // PMCA is not driven by a concentration gradient
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user