Skip to content

Commit

Permalink
valid SBML
Browse files Browse the repository at this point in the history
  • Loading branch information
awatson1978 committed Dec 8, 2023
1 parent 01118a9 commit c73d3c0
Showing 1 changed file with 194 additions and 45 deletions.
239 changes: 194 additions & 45 deletions src/main/resources/physiology/models/Cortisol_Depression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,127 @@
<compartment id="CNS" name="Central Nervous System" constant="true"/>
<compartment id="HPA_Axis" name="Hypothalamic-Pituitary-Adrenal Axis" constant="true"/>
</listOfCompartments>
<listOfFunctionDefinitions>
<functionDefinition id="step_function">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<lambda>
<bvar><ci>x</ci></bvar>
<bvar><ci>T</ci></bvar>
<bvar><ci>a</ci></bvar>
<bvar><ci>b</ci></bvar>
<piecewise>
<piece>
<apply>
<plus/>
<ci>a</ci>
<ci>b</ci>
</apply>
<apply>
<geq/>
<ci>x</ci>
<ci>T</ci>
</apply>
</piece>
<otherwise>
<ci>a</ci>
</otherwise>
</piecewise>
</lambda>
</math>
</functionDefinition>
<functionDefinition id="MR_function">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<lambda>
<bvar><ci>a</ci></bvar>
<ci>a</ci> <!-- The function returns the input as output -->
</lambda>
</math>
</functionDefinition>
<functionDefinition id="GR_function">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<lambda>
<bvar><ci>a</ci></bvar>
<bvar><ci>kGR</ci></bvar>
<apply>
<plus/>
<apply>
<power/>
<apply>
<divide/>
<ci>a</ci>
<ci>kGR</ci>
</apply>
<cn type="integer"> 3 </cn>
</apply>
<cn type="integer"> 1 </cn>
</apply>
</lambda>
</math>
</functionDefinition>
</listOfFunctionDefinitions>
<listOfParameters>
<!-- 0.016*60*24 -->
<parameter id="a1_ext" value="23.04" constant="true"/>

<!-- 0.17*60*24 -->
<parameter id="a1" value="244.8" constant="true"/>

<!-- 0.035*60*24 -->
<parameter id="a2" value="50.4" constant="true"/>

<!-- 0.0086*60*24 -->
<parameter id="a3" value="12.384" constant="true"/>

<parameter id="a5" value="0.099" constant="true"/>
<parameter id="a6" value="0.099" constant="true"/>

<!-- 1/21 -->
<parameter id="a7" value="0.047619047619048" constant="true"/>
</listOfParameters>
<listOfSpecies>
<species id="Cortisol" compartment="HPA_Axis" initialAmount="1" constant="false"/>
<species id="HPA_Hormone_Glands" compartment="HPA_Axis" initialAmount="1" constant="false"/>
<species id="Neurotransmitters" compartment="CNS" initialAmount="1" constant="false"/>
<species id="Stress_Indicators" compartment="CNS" initialAmount="1" constant="false"/>
</listOfSpecies>
<species id="Cortisol" compartment="HPA_Axis" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="HPA_Hormone_Glands" compartment="HPA_Axis" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="Neurotransmitters" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="Stress_Indicators" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />


<species id="A" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="P" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />

<species id="x2" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="x3" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />

<species id="h" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="D_t" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="u_t" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />

<!-- <species id="a1" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="a2" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="a3" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="a5" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="a6" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="a7" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" /> -->

<species id="x1_tot" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="x1_internal" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="x1_external" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="x1_dose" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />


<species id="dA_dt" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="dP_dt" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="dh_dt" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="dx1_internal_dt" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="dx2_dt" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="dx3_dt" compartment="CNS" initialAmount="1" constant="false" hasOnlySubstanceUnits="false" boundaryCondition="true" />

<species id="a" compartment="CNS" constant="true" initialAmount="1" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="b" compartment="CNS" constant="true" initialAmount="3" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="T" compartment="CNS" constant="true" initialAmount="1.5" hasOnlySubstanceUnits="false" boundaryCondition="true" />
<species id="kGR" compartment="CNS" constant="true" initialAmount="4" hasOnlySubstanceUnits="false" boundaryCondition="true" />

</listOfSpecies>

<listOfReactions>
<!-- Reactions would be defined here with kinetic laws. -->
<!-- Example: -->
Expand All @@ -23,13 +136,14 @@
<!-- Adrenal_Gland_Activity -->
<!-- dA_dt = a5*A*(x2 - 1) -->

<reaction id="Adrenal_Gland_Activity">
<reaction id="Adrenal_Gland_Activity" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="A" stoichiometry="1"/>
<speciesReference species="x2" stoichiometry="1"/>
<speciesReference constant="false" species="A" stoichiometry="1"/>
<speciesReference constant="false" species="x2" stoichiometry="1"/>
<!-- <speciesReference constant="false" species="a5" stoichiometry="1"/> -->
</listOfReactants>
<listOfProducts>
<speciesReference species="A" stoichiometry="1"/>
<speciesReference constant="false" species="dA_dt" stoichiometry="1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand All @@ -51,13 +165,14 @@
<!-- Pituitary_Gland_Activity -->
<!-- dP_dt = a6*P*(x1_tot - 1) -->

<reaction id="Pituitary_Gland_Activity">
<reaction id="Pituitary_Gland_Activity" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="P" stoichiometry="1"/>
<speciesReference species="x1_tot" stoichiometry="1"/>
<!-- <speciesReference constant="false" species="a6" stoichiometry="1"/> -->
<speciesReference constant="false" species="P" stoichiometry="1"/>
<speciesReference constant="false" species="x1_tot" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="P" stoichiometry="1"/>
<speciesReference constant="false" species="dP_dt" stoichiometry="1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand All @@ -76,16 +191,26 @@
</reaction>


<!-- Hippocampal_Activity -->
<!-- dh_dt = a7*(1*D_t/step(x3,T) - h) -->

<reaction id="Hippocampal_Activity">

<!-- Hippocampal_Activity -->
<!-- dh_dt = a7*(1*D_t/step(x3,T) - h) -->


<reaction id="Hippocampal_Activity" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="h" stoichiometry="1"/>
<speciesReference species="x3" stoichiometry="1"/>
<speciesReference constant="false" species="T" stoichiometry="1"/>
<!-- <speciesReference constant="false" species="a7" stoichiometry="1"/> -->
<speciesReference constant="false" species="D_t" stoichiometry="1"/>
<speciesReference constant="false" species="h" stoichiometry="1"/>
<speciesReference constant="false" species="x3" stoichiometry="1"/>

<speciesReference constant="false" species="a" stoichiometry="1"/>
<speciesReference constant="false" species="b" stoichiometry="1"/>

</listOfReactants>
<listOfProducts>
<speciesReference species="h" stoichiometry="1"/>
<speciesReference constant="false" species="dh_dt" stoichiometry="1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand All @@ -101,6 +226,8 @@
<ci> step_function </ci>
<ci> x3 </ci>
<ci> T </ci>
<ci> a </ci>
<ci> b </ci>
</apply>
</apply>
</apply>
Expand All @@ -113,15 +240,19 @@

<!-- dx1_internal_dt = a1*(u_t/(h*MR(x3)*GR(x3)) - x1_internal) -->

<reaction id="CRH_Internal_Dynamics">
<reaction id="CRH_Internal_Dynamics" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="x1_internal" stoichiometry="1"/>
<speciesReference species="u_t" stoichiometry="1"/> <!-- Assuming u_t is a species -->
<speciesReference species="h" stoichiometry="1"/>
<speciesReference species="x3" stoichiometry="1"/>
<!-- <speciesReference constant="false" species="a1" stoichiometry="1"/> -->
<speciesReference constant="false" species="x1_internal" stoichiometry="1"/>
<speciesReference constant="false" species="u_t" stoichiometry="1"/> <!-- Assuming u_t is a species -->
<speciesReference constant="false" species="h" stoichiometry="1"/>
<speciesReference constant="false" species="x3" stoichiometry="1"/>

<speciesReference constant="true" species="a"/>
<speciesReference constant="true" species="kGR"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="x1_internal" stoichiometry="1"/>
<speciesReference constant="false" species="dx1_internal_dt" stoichiometry="1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand All @@ -136,9 +267,16 @@
<apply>
<times/>
<ci> h </ci>
<ci> MR_function </ci>
<apply>
<ci> MR_function </ci>
<ci> a </ci>
</apply>
<ci> x3 </ci>
<ci> GR_function </ci>
<apply>
<ci> GR_function </ci>
<ci> a </ci>
<ci> kGR </ci>
</apply>
<ci> x3 </ci>
</apply>
</apply>
Expand All @@ -152,13 +290,16 @@

<!-- dx1_internal_dt = a1*(u_t/(h*MR(x3)*GR(x3)) - x1_internal) -->

<reaction id="CRH_External_Dynamics">
<reaction id="CRH_External_Dynamics" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="x1_external" stoichiometry="1"/>
<speciesReference species="x1_dose" stoichiometry="1"/> <!-- Assuming x1_dose is a species or input function -->
<!-- <speciesReference constant="false" species="a1" stoichiometry="1"/> -->
<speciesReference constant="false" species="u_t" stoichiometry="1"/>
<speciesReference constant="false" species="x3" stoichiometry="1"/>
<speciesReference constant="false" species="x1_external" stoichiometry="1"/>
<speciesReference constant="false" species="x1_dose" stoichiometry="1"/> <!-- Assuming x1_dose is a species or input function -->
</listOfReactants>
<listOfProducts>
<speciesReference species="x1_external" stoichiometry="1"/>
<speciesReference constant="false" species="dx1_internal_dt" stoichiometry="1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand All @@ -178,17 +319,21 @@
</kineticLaw>
</reaction>

<!-- dx2_dt = a2*(x1_tot*P/GR(x3) - x2) -->
<!-- dx2_dt = a2 * (x1_tot * P / GR(x3) - x2) -->

<reaction id="CRH_to_ACTH_Dynamics">
<reaction id="CRH_to_ACTH_Dynamics" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="x2" stoichiometry="1"/>
<speciesReference species="x1_tot" stoichiometry="1"/>
<speciesReference species="P" stoichiometry="1"/>
<speciesReference species="x3" stoichiometry="1"/> <!-- For GR function -->
<!-- <speciesReference constant="false" species="a2" stoichiometry="1"/> -->
<speciesReference constant="false" species="x2" stoichiometry="1"/>
<speciesReference constant="false" species="x1_tot" stoichiometry="1"/>
<speciesReference constant="false" species="P" stoichiometry="1"/>
<speciesReference constant="false" species="x3" stoichiometry="1"/> <!-- For GR function -->

<speciesReference constant="true" species="a"/>
<speciesReference constant="true" species="kGR"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="x2" stoichiometry="1"/>
<speciesReference constant="false" species="dx2_dt" stoichiometry="1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand All @@ -204,8 +349,11 @@
<ci> x1_tot </ci>
<ci> P </ci>
</apply>
<ci> GR_function </ci>
<ci> x3 </ci>
<apply>
<ci> GR_function </ci>
<ci> x3 </ci>
<ci> kGR </ci>
</apply>
</apply>
</apply>
<ci> x2 </ci>
Expand All @@ -216,14 +364,15 @@

<!-- dx3_dt = a3*(x2*A - x3) -->

<reaction id="ACTH_to_Cortisol_Dynamics">
<reaction id="ACTH_to_Cortisol_Dynamics" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="x3" stoichiometry="1"/>
<speciesReference species="x2" stoichiometry="1"/>
<speciesReference species="A" stoichiometry="1"/>
<!-- <speciesReference constant="false" species="a3" stoichiometry="1" /> -->
<speciesReference constant="false" species="x3" stoichiometry="1" />
<speciesReference constant="false" species="x2" stoichiometry="1" />
<speciesReference constant="false" species="A" stoichiometry="1" />
</listOfReactants>
<listOfProducts>
<speciesReference species="x3" stoichiometry="1"/>
<speciesReference constant="false" species="dx3_dt" stoichiometry="1" />
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
Expand Down

0 comments on commit c73d3c0

Please sign in to comment.