(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[    156472,       4018]
NotebookOptionsPosition[    150315,       3838]
NotebookOutlinePosition[    150750,       3855]
CellTagsIndexPosition[    150707,       3852]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[TextData[{
 StyleBox["EAM Global Minimization Against Human Glucocorticoid Receptor \
Experimental Data\n",
  FontFamily->"Nimbus Sans L",
  FontSize->26,
  FontColor->RGBColor[
   0.7803921568627451, 0.4235294117647059, 0.1607843137254902]],
 StyleBox["\n",
  FontColor->RGBColor[
   0.7803921568627451, 0.4235294117647059, 0.1607843137254902]],
 StyleBox["Supplementary Material for Li, et al. (2017) \
\[OpenCurlyDoubleQuote]Genetically tunable frustration controls allostery in \
an intrinsically disordered transcription factor\[CloseCurlyDoubleQuote].\n\n\
Hilser Lab, July 2017.  Hesam Motlagh, Jordan White, Jamie Wrabl.\n\nThe \
purpose of this ",
  FontFamily->"Nimbus Sans L",
  FontSize->16,
  FontColor->RGBColor[
   0.7803921568627451, 0.4235294117647059, 0.1607843137254902]],
 StyleBox["Mathematica",
  FontFamily->"Nimbus Sans L",
  FontSize->16,
  FontSlant->"Italic",
  FontColor->RGBColor[
   0.7803921568627451, 0.4235294117647059, 0.1607843137254902]],
 StyleBox[" notebook is an implementation of the Ensemble Allosteric Model \
(EAM) to estimate reasonable parameters that reproduce experimental data for \
human glucocorticoid receptor (GR).  The EAM is constrained by ten data \
points measured from in vivo transcription assays and in vitro binding \
affinities measured on five GR isoforms A, B, C1, C2, C3 as defined in Figure \
1 of Li, et al.  This implementation also uses the following experimental \
constraints:\n\n(1) The interaction energies between the DNA-binding domain \
(DBD), and either the regulatory region (R) of C2 or the R of C1, are equal \
to zero kcal/mol.\n\n(2) The coupling energy etween the DBD and the R of B is \
0.7 times the coupling between the DBD and the R of A.\n\n(3) The measured \
TMAO osmolyte refolding free energies (\[CapitalDelta]G) for C3-NTD \
(N-terminal domain), A-NTD, and C3-NTD-DBD, reported in Supplementary Figure \
2a of Li, et al.\n\nEight thermodynamic parameters are estimated: \
\[CapitalDelta]GDBD, \[CapitalDelta]g-DBD-R, \[CapitalDelta]gGRE, \
\[CapitalDelta]GRB, \[CapitalDelta]GRC1, \[CapitalDelta]GRC2, \
\[CapitalDelta]gR-F, and a scaling parameter A (necessary to convert EAM \
population to the experimental observable of transcription activity).\n\n\
Instructions:  There are 16 numbered sections.  Each should be separately \
executed, in numerical order, starting with section 1.  Output is the set of \
thermodynamic parameters satisfying the EAM, and a plot of the simulated \
transcription activity and binding affinity compared to experiment.  (Such \
data were used to make Figure 3b of Li, et al.  Error bars in that Figure \
were obtained by running this notebook multiple times, using different values \
of \[CapitalDelta]GF, \[CapitalDelta]GANTD, and \[CapitalDelta]GC3DBD each \
time, sampled according to normal distributions with mean equal to the \
experimentally measured value and standard deviation equal to the \
experimental error value.)  Output obtained from our lab in a typical \
execution is included below; re-running the notebook will result in slightly \
different numerical values since this implementation is stochastic.",
  FontFamily->"Nimbus Sans L",
  FontSize->16,
  FontColor->RGBColor[
   0.7803921568627451, 0.4235294117647059, 0.1607843137254902]],
 StyleBox["\n\n  ",
  FontFamily->"Nimbus Sans L",
  FontSize->16]
}], "Subsection",
 CellChangeTimes->{{3.6143623445250807`*^9, 3.6143623512954674`*^9}, {
   3.617037642545542*^9, 3.617037650847563*^9}, {3.677501065071103*^9, 
   3.6775011997799873`*^9}, {3.677501256968011*^9, 3.6775022185090218`*^9}, {
   3.677502253383346*^9, 3.6775028467533293`*^9}, 3.677503079481401*^9, 
   3.677503296168186*^9, {3.6775058416121063`*^9, 3.6775058484064417`*^9}, {
   3.677509236621995*^9, 3.677509237076953*^9}, 3.677513042900074*^9, {
   3.6780184450655813`*^9, 3.6780184630856066`*^9}, {3.709302017451264*^9, 
   3.7093020218822517`*^9}}],

Cell[BoxData[
 StyleBox[
  RowBox[{
   RowBox[{"Section", " ", "1.", "  ", "Definitions"}], ",", " ", "constants",
    ",", 
   RowBox[{"and", " ", 
    StyleBox[
     RowBox[{
      StyleBox["e", "Subsection",
       FontFamily->"Nimbus Sans L",
       FontSize->26,
       FontWeight->"Plain",
       FontColor->RGBColor[
        0.778286411841001, 0.4230563820859083, 0.16115053025101092`]], 
      "xperimental"}]], " ", 
    StyleBox[
     RowBox[{
      StyleBox["i", "Subsection",
       FontFamily->"Nimbus Sans L",
       FontSize->26,
       FontWeight->"Plain",
       FontColor->RGBColor[
        0.778286411841001, 0.4230563820859083, 0.16115053025101092`]], 
      "nput"}]], " ", 
    RowBox[{
     StyleBox[
      RowBox[{
       StyleBox["v", "Subsection",
        FontFamily->"Nimbus Sans L",
        FontSize->26,
        FontWeight->"Plain",
        FontColor->RGBColor[
         0.778286411841001, 0.4230563820859083, 0.16115053025101092`]], 
       "alues"}]], "."}]}]}], "Subsection",
  FontFamily->"Nimbus Sans L",
  FontSize->26,
  FontWeight->"Plain",
  FontColor->RGBColor[
   0.778286411841001, 0.4230563820859083, 0.16115053025101092`]]], "Input",
 CellChangeTimes->{{3.677502912034568*^9, 3.6775029737426853`*^9}, 
   3.677503007654107*^9, {3.677503046660892*^9, 3.677503049199717*^9}, {
   3.67750327134942*^9, 3.6775032846886*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"R", " ", "=", " ", "1.987"}], ";"}], " ", 
  RowBox[{"(*", 
   RowBox[{"Universal", " ", "Gas", " ", "Constant", " ", "in", " ", 
    RowBox[{"cal", "/", "mol"}], "*", "K"}], "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"T", " ", "=", " ", 
    RowBox[{"22", "+", "273.15"}]}], ";"}], " ", 
  RowBox[{"(*", 
   RowBox[{"Room", " ", "temperature", " ", "calculations"}], "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"data", " ", "in", " ", "the", " ", "format", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"binding", " ", "affinity"}], ",", " ", "activity"}], ")"}], 
     " ", "normalized", " ", "to", " ", "the", " ", "values", " ", "for", " ",
      "the", " ", "A"}], "-", "NTD"}], "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{"INPUT", " ", "THE", " ", "KNOWN", " ", "VALUES"}], 
   "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[CapitalDelta]GF", " ", "=", " ", 
    RowBox[{"-", "7600"}]}], ";"}], " ", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{"Experimental", " ", "Value"}], " ", "-", "7.6", " ", "+", 
     RowBox[{
      RowBox[{"/", 
       RowBox[{"-", " ", "0.3"}]}], " ", 
      RowBox[{"kcal", "/", "mol"}]}]}], ",", " ", "Li", ",", " ", 
    RowBox[{"et", " ", 
     RowBox[{"al", ".", " ", "Supplementary"}], " ", "Figure", " ", "2", 
     "a"}]}], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[CapitalDelta]GANTD", " ", "=", " ", 
    RowBox[{"-", "10100"}]}], ";"}], " ", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{"Experimental", " ", "Value"}], " ", "-", "10.1", " ", "+", 
     RowBox[{
      RowBox[{"/", 
       RowBox[{"-", " ", "0.9"}]}], " ", 
      RowBox[{"kcal", "/", "mol"}]}]}], ",", " ", "Li", ",", " ", 
    RowBox[{"et", " ", 
     RowBox[{"al", ".", " ", "Supplementary"}], " ", "Figure", " ", "2", 
     "a"}]}], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[CapitalDelta]GC3DBD", " ", "=", " ", 
    RowBox[{"-", "6700"}]}], ";"}], " ", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{"Experimental", " ", "Value"}], " ", "-", "6.7", " ", "+", 
     RowBox[{
      RowBox[{"/", 
       RowBox[{"-", " ", "0.4"}]}], " ", 
      RowBox[{"kcal", "/", "mol"}]}]}], ",", " ", "Li", ",", " ", 
    RowBox[{"et", " ", 
     RowBox[{"al", ".", " ", "Supplementary"}], " ", "Figure", " ", "2", 
     "a"}]}], " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{"What", " ", "are", " ", "the", " ", "constrained", " ", 
    RowBox[{"unknowns", "?"}]}], "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[CapitalDelta]GR", "=", 
   RowBox[{
   "\[CapitalDelta]GANTD", "-", "\[CapitalDelta]GF", "-", 
    "\[CapitalDelta]gRF"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[CapitalDelta]gDBDF", "=", 
    RowBox[{
    "\[CapitalDelta]GC3DBD", "-", "\[CapitalDelta]GDBD", "-", 
     "\[CapitalDelta]GF"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.6170375741436462`*^9, 3.6170375746212254`*^9}, {
  3.6170376049604397`*^9, 3.617037617379092*^9}, {3.617120456348255*^9, 
  3.6171204567688503`*^9}, {3.617121026550743*^9, 3.617121046115539*^9}, {
  3.617121251655814*^9, 3.6171212604696407`*^9}, {3.672130916751503*^9, 
  3.672130924498908*^9}, {3.677500852379051*^9, 3.6775009920931377`*^9}, {
  3.677501033990304*^9, 3.677501054655658*^9}}],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 2.  Calculate partition function for the \
C3-DBD construct.",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4196078431372549, 
   0.1568627450980392]]], "Subsubsection",
 CellChangeTimes->{{3.6143623445250807`*^9, 3.6143623512954674`*^9}, {
  3.617037642545542*^9, 3.617037650847563*^9}, {3.677503157309548*^9, 
  3.677503158521564*^9}, {3.6775032388001757`*^9, 3.677503267980186*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
     RowBox[{"Let", "'"}], "s", " ", "start", " ", "calculating", " ", 
     "statistical", " ", "weights", " ", "for", " ", "the", " ", "C3"}], "-", 
    RowBox[{"DBD", " ", "Ensemble", " ", "using", " ", "a", " ", "2"}], "-", 
    RowBox[{"domain", " ", "EAM", " ", "for", " ", "each", " ", 
     RowBox[{"domain", "/", "GRE"}], " ", "stabilization"}]}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"SWdbdC3", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "\[CapitalDelta]GDBD"}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWFC3", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "\[CapitalDelta]GF"}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdFC3", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "\[CapitalDelta]gDBDF"}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"Zgre", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gGRE", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "statistical", " ", "weights", " ", "of", 
     " ", "each", " ", "state"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"K1C3", "=", 
     RowBox[{"SWFC3", "*", "SWdbdFC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K2C3", "=", 
     RowBox[{"SWdbdC3", "*", "SWdbdFC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"KUC3", "=", 
     RowBox[{"SWdbdC3", "*", "SWFC3", "*", "SWdbdFC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PartFunC3", "=", 
     RowBox[{"1", "+", "K1C3", "+", "K2C3", "+", "KUC3"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "now", " ", "calculate", " ", "probabilities", " ", "of", " ", 
     "interest"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrdbdFC3", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K1C3"}], ")"}], "/", "PartFunC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PrFFC3", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K2C3"}], ")"}], "/", "PartFunC3"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "recalculate", " ", "the", " ", "partition", " ", "in", " ", 
     "the", " ", "presence", " ", "of", " ", "the", " ", "GRE"}], "*)"}], 
   "\n", 
   RowBox[{
    RowBox[{"PartFunC3g", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "K1C3"}], ")"}]}], "+", "K2C3", "+", "KUC3"}]}], 
    ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calcualte", " ", "the", " ", "final", " ", "probabilities", 
     " ", "of", " ", "interest"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrFFC3gre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "Zgre", "+", "K2C3"}], ")"}], "/", "PartFunC3g"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"dPrFFC3", "=", 
     RowBox[{"PrFFC3gre", "-", "PrFFC3"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"states", " ", "that", " ", 
      RowBox[{"don", "'"}], "t", " ", "bind", " ", "GRE", " ", "and", " ", 
      "do", " ", "bind", " ", "GRE"}], ",", " ", "respectively"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"noBindC3", "=", 
     RowBox[{"K2C3", "+", "KUC3"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"bindC3", "=", 
     RowBox[{"1", "+", "K1C3"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.617037654314744*^9, 3.617037654315853*^9}, {
  3.6539912444175863`*^9, 3.6539912824038267`*^9}, {3.653991348350141*^9, 
  3.65399135247707*^9}, {3.653994117390048*^9, 3.653994195185281*^9}, {
  3.653994231289564*^9, 3.653994249877214*^9}, {3.6539943020268*^9, 
  3.6539943185046587`*^9}, {3.6539943650337257`*^9, 3.653994415337884*^9}, {
  3.653998078742875*^9, 3.653998079678054*^9}, {3.677503311697019*^9, 
  3.677503311913582*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 3.  Calculate partition function for the \
A-NTD-DBD construct. ",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4235294117647059, 
   0.1607843137254902]]], "Subsubsection",
 CellChangeTimes->{{3.614362357037796*^9, 3.614362368108429*^9}, 
   3.6143732493458004`*^9, {3.665169988692977*^9, 3.665169989422924*^9}, {
   3.677505924611088*^9, 3.677505963172182*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "A", 
    " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"SWdbdA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GR", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWFA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdRA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gDBDR", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRFA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdFA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "A", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"K1A", "=", 
     RowBox[{"SWdbdA", "*", "SWdbdRA", "*", "SWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K2A", "=", 
     RowBox[{"SWRA", "*", "SWdbdRA", "*", "SWRFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K3A", "=", 
     RowBox[{"SWFA", "*", "SWRFA", "*", "SWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K4A", "=", 
     RowBox[{
     "SWRA", "*", "SWFA", "*", "SWdbdRA", "*", "SWRFA", "*", "SWdbdFA"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"K5A", "=", 
     RowBox[{
     "SWdbdA", "*", "SWFA", "*", "SWdbdRA", "*", "SWRFA", "*", "SWdbdFA"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"K6A", "=", 
     RowBox[{
     "SWdbdA", "*", "SWRA", "*", "SWdbdRA", "*", "SWRFA", "*", "SWdbdFA"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"KUA", "=", 
     RowBox[{
     "SWdbdA", "*", "SWRA", "*", "SWFA", "*", "SWdbdRA", "*", "SWRFA", "*", 
      "SWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PartFunA", "=", 
     RowBox[{
     "1", "+", "K1A", "+", "K2A", "+", "K3A", "+", "K4A", "+", "K5A", "+", 
      "K6A", "+", "KUA"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Based", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "A", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrdbdFA", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K2A", "+", "K3A", "+", "K4A"}], ")"}], "/", 
      "PartFunA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PrFFA", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K1A", "+", "K2A", "+", "K6A"}], ")"}], "/", 
      "PartFunA"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "recalculate", " ", "the", " ", "Partition", " ", "in", " ", 
     "the", " ", "presence", " ", "of", " ", "the", " ", "GRE", " ", "for", 
     " ", "the", " ", "A", " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PartFunAg", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "K2A", "+", "K3A", "+", "K4A"}], ")"}]}], "+", 
      "K1A", "+", "K5A", "+", "K6A", "+", "KUA"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "A", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrFFAgre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "+", "K2A"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"1", "+", "Zgre"}], ")"}]}], "+", "K1A", "+", "K6A"}], 
       ")"}], "/", "PartFunAg"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"dPrFFA", "=", 
     RowBox[{"PrFFAgre", "-", "PrFFA"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"states", " ", "that", " ", 
      RowBox[{"don", "'"}], "t", " ", "bind", " ", "GRE", " ", "and", " ", 
      "do", " ", "bind", " ", "GRE"}], ",", " ", "respectively"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"noBindA", "=", 
     RowBox[{"K1A", "+", "K5A", "+", "K6A", "+", "KUA"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"bindA", "=", 
     RowBox[{"1", "+", "K2A", "+", "K3A", "+", "K4A"}]}], ";"}], 
   "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.653993261362193*^9, 3.6539933077780447`*^9}, {
   3.653993348333346*^9, 3.6539934537856483`*^9}, {3.653993495705587*^9, 
   3.6539935880467*^9}, {3.6539937409057283`*^9, 3.6539937470073347`*^9}, 
   3.653993908021434*^9, {3.653994431593504*^9, 3.653994438160369*^9}, {
   3.653994663793442*^9, 3.6539946978525476`*^9}, {3.6775059743136806`*^9, 
   3.677505974564239*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 4.  Calculate partition function for the B \
isoform.", "Subsection",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4235294117647059, 
   0.1607843137254902]]], "Subsubsection",
 CellChangeTimes->{{3.6143732253814297`*^9, 3.6143732430074377`*^9}, {
  3.6775060101379833`*^9, 3.677506037342917*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "B", 
    " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"SWdbdB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GRB", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWFB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdRB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"\[CapitalDelta]gDBDR", "/", "3.4"}], "*", "2.0"}], ")"}]}],
        "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRFB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdFB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "B", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"K1B", "=", 
     RowBox[{"SWdbdB", "*", "SWdbdRB", "*", "SWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K2B", "=", 
     RowBox[{"SWRB", "*", "SWdbdRB", "*", "SWRFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K3B", "=", 
     RowBox[{"SWFB", "*", "SWRFB", "*", "SWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K4B", "=", 
     RowBox[{
     "SWRB", "*", "SWFB", "*", "SWdbdRB", "*", "SWRFB", "*", "SWdbdFB"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"K5B", "=", 
     RowBox[{
     "SWdbdB", "*", "SWFB", "*", "SWdbdRB", "*", "SWRFB", "*", "SWdbdFB"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"K6B", "=", 
     RowBox[{
     "SWdbdB", "*", "SWRB", "*", "SWdbdRB", "*", "SWRFB", "*", "SWdbdFB"}]}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{"KUB", "=", 
     RowBox[{
     "SWdbdB", "*", "SWRB", "*", "SWFB", "*", "SWdbdRB", "*", "SWRFB", "*", 
      "SWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PartFunB", "=", 
     RowBox[{
     "1", "+", "K1B", "+", "K2B", "+", "K3B", "+", "K4B", "+", "K5B", "+", 
      "K6B", "+", "KUB"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Based", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "B", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrdbdFB", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K2B", "+", "K3B", "+", "K4B"}], ")"}], "/", 
      "PartFunB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PrFFB", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K1B", "+", "K2B", "+", "K6B"}], ")"}], "/", 
      "PartFunB"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "recalculate", " ", "the", " ", "partition", " ", "in", " ", 
     "the", " ", "presence", " ", "of", " ", "the", " ", "GRE", " ", "for", 
     " ", "the", " ", "B", " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PartFunBg", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "K2B", "+", "K3B", "+", "K4B"}], ")"}]}], "+", 
      "K1B", "+", "K5B", "+", "K6B", "+", "KUB"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "B", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrFFBgre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "+", "K2B"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"1", "+", "Zgre"}], ")"}]}], "+", "K1B", "+", "K6B"}], 
       ")"}], "/", "PartFunBg"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"dPrFFB", "=", 
     RowBox[{"PrFFBgre", "-", "PrFFB"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"states", " ", "that", " ", 
      RowBox[{"don", "'"}], "t", " ", "bind", " ", "GRE", " ", "and", " ", 
      "do", " ", "bind", " ", "GRE"}], ",", " ", "respectively"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"noBindB", "=", 
     RowBox[{"K1B", "+", "K5B", "+", "K6B", "+", "KUB"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"bindB", "=", 
     RowBox[{"1", "+", "K2B", "+", "K3B", "+", "K4B"}]}], ";"}], 
   "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.6173763984136744`*^9, 3.6173763996187434`*^9}, {
  3.6539937737546597`*^9, 3.653993791893662*^9}, {3.653993859145257*^9, 
  3.653993904789085*^9}, {3.653994024538714*^9, 3.6539940263846273`*^9}, {
  3.6539940666878653`*^9, 3.65399408052722*^9}, {3.653994710581561*^9, 
  3.653994750148288*^9}, {3.6775060462918053`*^9, 3.67750604664742*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 5.  Calculate partition function for the C1 \
isoform.",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.41568627450980394`, 
   0.15294117647058825`]]], "Subsubsection",
 CellChangeTimes->{{3.6143734897775526`*^9, 3.614373501222207*^9}, {
  3.677506061725731*^9, 3.677506096368493*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "C1",
     " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"SWdbdC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GRC1", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWFC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdRC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "0", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRFC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdFC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "C1", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"K1C1", "=", 
     RowBox[{"SWdbdC1", "*", "SWdbdRC1", "*", "SWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K2C1", "=", 
     RowBox[{"SWRC1", "*", "SWdbdRC1", "*", "SWRFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K3C1", "=", 
     RowBox[{"SWFC1", "*", "SWRFC1", "*", "SWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K4C1", "=", 
     RowBox[{
     "SWRC1", "*", "SWFC1", "*", "SWdbdRC1", "*", "SWRFC1", "*", 
      "SWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K5C1", "=", 
     RowBox[{
     "SWdbdC1", "*", "SWFC1", "*", "SWdbdRC1", "*", "SWRFC1", "*", 
      "SWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K6C1", "=", 
     RowBox[{
     "SWdbdC1", "*", "SWRC1", "*", "SWdbdRC1", "*", "SWRFC1", "*", 
      "SWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"KUC1", "=", 
     RowBox[{
     "SWdbdC1", "*", "SWRC1", "*", "SWFC1", "*", "SWdbdRC1", "*", "SWRFC1", 
      "*", "SWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PartFunC1", "=", 
     RowBox[{
     "1", "+", "K1C1", "+", "K2C1", "+", "K3C1", "+", "K4C1", "+", "K5C1", 
      "+", "K6C1", "+", "KUC1"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Based", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "C1", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrdbdFC1", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K2C1", "+", "K3C1", "+", "K4C1"}], ")"}], "/", 
      "PartFunC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PrFFC1", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K1C1", "+", "K2C1", "+", "K6C1"}], ")"}], "/", 
      "PartFunC1"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "recalculate", " ", "the", " ", "partition", " ", "in", " ", 
     "the", " ", "presence", " ", "of", " ", "the", " ", "GRE", " ", "for", 
     " ", "the", " ", "C1", " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PartFunC1g", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "K2C1", "+", "K3C1", "+", "K4C1"}], ")"}]}], "+", 
      "K1C1", "+", "K5C1", "+", "K6C1", "+", "KUC1"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "C1", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrFFC1gre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "+", "K2C1"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"1", "+", "Zgre"}], ")"}]}], "+", "K1C1", "+", "K6C1"}], 
       ")"}], "/", "PartFunC1g"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"dPrFFC1", "=", 
     RowBox[{"PrFFC1gre", "-", "PrFFC1"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"states", " ", "that", " ", 
      RowBox[{"don", "'"}], "t", " ", "bind", " ", "GRE", " ", "and", " ", 
      "do", " ", "bind", " ", "GRE"}], ",", " ", "respectively"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"noBindC1", "=", 
     RowBox[{"K1C1", "+", "K5C1", "+", "K6C1", "+", "KUC1"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"bindC1", "=", 
     RowBox[{"1", "+", "K2C1", "+", "K3C1", "+", "K4C1"}]}], ";"}], 
   "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.6173764058400993`*^9, 3.617376406181119*^9}, {
  3.653993794272489*^9, 3.653993822840371*^9}, {3.653993862015375*^9, 
  3.653993873429434*^9}, {3.6539939252744007`*^9, 3.6539939473137007`*^9}, {
  3.65399403169868*^9, 3.653994060695571*^9}, {3.653994715029674*^9, 
  3.653994715509562*^9}, {3.65399475429217*^9, 3.6539947764120007`*^9}, {
  3.653994808884219*^9, 3.653994812115871*^9}, {3.677506154944405*^9, 
  3.677506155134087*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 6.  Calculate partition function for the C2 \
isoform.",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.41568627450980394`, 
   0.15294117647058825`]]], "Subsubsection",
 CellChangeTimes->{{3.61437369850049*^9, 3.614373705567895*^9}, {
  3.6775061333469563`*^9, 3.677506151162127*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "C2",
     " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"SWdbdC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GRC2", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWFC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]GF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdRC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "0", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWRFC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"SWdbdFC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "C2", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"K1C2", "=", 
     RowBox[{"SWdbdC2", "*", "SWdbdRC2", "*", "SWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K2C2", "=", 
     RowBox[{"SWRC2", "*", "SWdbdRC2", "*", "SWRFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K3C2", "=", 
     RowBox[{"SWFC2", "*", "SWRFC2", "*", "SWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K4C2", "=", 
     RowBox[{
     "SWRC2", "*", "SWFC2", "*", "SWdbdRC2", "*", "SWRFC2", "*", 
      "SWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K5C2", "=", 
     RowBox[{
     "SWdbdC2", "*", "SWFC2", "*", "SWdbdRC2", "*", "SWRFC2", "*", 
      "SWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"K6C2", "=", 
     RowBox[{
     "SWdbdC2", "*", "SWRC2", "*", "SWdbdRC2", "*", "SWRFC2", "*", 
      "SWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"KUC2", "=", 
     RowBox[{
     "SWdbdC2", "*", "SWRC2", "*", "SWFC2", "*", "SWdbdRC2", "*", "SWRFC2", 
      "*", "SWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PartFunC2", "=", 
     RowBox[{
     "1", "+", "K1C2", "+", "K2C2", "+", "K3C2", "+", "K4C2", "+", "K5C2", 
      "+", "K6C2", "+", "KUC2"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Based", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "C2", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrdbdFC2", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K2C2", "+", "K3C2", "+", "K4C2"}], ")"}], "/", 
      "PartFunC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"PrFFC2", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "K1C2", "+", "K2C2", "+", "K6C2"}], ")"}], "/", 
      "PartFunC2"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "recalculate", " ", "the", " ", "partition", " ", "in", " ", 
     "the", " ", "presence", " ", "of", " ", "the", " ", "GRE", " ", "for", 
     " ", "the", " ", "C2", " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PartFunC2g", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "K2C2", "+", "K3C2", "+", "K4C2"}], ")"}]}], "+", 
      "K1C2", "+", "K5C2", "+", "K6C2", "+", "KUC2"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "C2", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"PrFFC2gre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "+", "K2C2"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"1", "+", "Zgre"}], ")"}]}], "+", "K1C2", "+", "K6C2"}], 
       ")"}], "/", "PartFunC2g"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"dPrFFC2", "=", 
     RowBox[{"PrFFC2gre", "-", "PrFFC2"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"states", " ", "that", " ", 
      RowBox[{"don", "'"}], "t", " ", "bind", " ", "GRE", " ", "and", " ", 
      "do", " ", "bind", " ", "GRE"}], ",", " ", "respectively"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"noBindC2", "=", 
     RowBox[{"K1C2", "+", "K5C2", "+", "K6C2", "+", "KUC2"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"bindC2", "=", 
     RowBox[{"1", "+", "K2C2", "+", "K3C2", "+", "K4C2"}]}], ";"}], 
   "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.617376409483308*^9, 3.617376411024396*^9}, {
  3.6539915367100067`*^9, 3.653991546037244*^9}, {3.653992477513112*^9, 
  3.65399248080018*^9}, {3.6539938307518*^9, 3.653993868677033*^9}, {
  3.6539939567936897`*^9, 3.653993985825262*^9}, {3.6539940356905518`*^9, 
  3.653994048295679*^9}, {3.6539947193178787`*^9, 3.6539947197735662`*^9}, {
  3.653994782108597*^9, 3.653994805500051*^9}, {3.6775062468395853`*^9, 
  3.677506246987706*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 7.  Calculate \[CapitalDelta]G of \
dissociation from GRE.",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.41568627450980394`, 
   0.15294117647058825`]]], "Subsubsection",
 CellChangeTimes->{{3.6539923817882833`*^9, 3.653992395236372*^9}, {
   3.677506213502018*^9, 3.677506226239235*^9}, 3.6775062632159452`*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"Agre", "=", 
    RowBox[{
     RowBox[{"-", "R"}], "*", "T", "*", 
     RowBox[{"Log", "[", 
      RowBox[{"15", "*", 
       SuperscriptBox["10", "5"]}], "]"}]}]}], ";"}], "  ", 
  RowBox[{"(*", 
   RowBox[{
   "convert", " ", "Ka", " ", "to", " ", "Molar", " ", "and", " ", 
    "calculate", " ", "association", " ", "energy"}], 
   "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Bgre", "=", 
   RowBox[{
    RowBox[{"-", "R"}], "*", "T", "*", 
    RowBox[{"Log", "[", 
     RowBox[{"12", "*", 
      SuperscriptBox["10", "5"]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"C1gre", "=", 
   RowBox[{
    RowBox[{"-", "R"}], "*", "T", "*", 
    RowBox[{"Log", "[", 
     RowBox[{"9.6", "*", 
      SuperscriptBox["10", "5"]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"C2gre", "=", 
   RowBox[{
    RowBox[{"-", "R"}], "*", "T", "*", 
    RowBox[{"Log", "[", 
     RowBox[{"8.4", "*", 
      SuperscriptBox["10", "5"]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"C3gre", "=", 
   RowBox[{
    RowBox[{"-", "R"}], "*", "T", "*", 
    RowBox[{"Log", "[", 
     RowBox[{"11", "*", 
      SuperscriptBox["10", "5"]}], "]"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.653992401400426*^9, 3.6539924582433767`*^9}, {
   3.6539925539502974`*^9, 3.653992664026144*^9}, {3.65399606482133*^9, 
   3.653996113755686*^9}, {3.654003937451592*^9, 3.6540039414065857`*^9}, {
   3.664035606325141*^9, 3.664035611110044*^9}, {3.664035678287269*^9, 
   3.66403568441827*^9}, {3.6647213709214373`*^9, 3.664721381049539*^9}, {
   3.6647214321166973`*^9, 3.664721449957301*^9}, {3.6647214821422367`*^9, 
   3.664721492366892*^9}, 3.665241867598095*^9, {3.677506389906692*^9, 
   3.67750639090878*^9}}],

Cell[TextData[{
 "Note:  Binding model is of the form:  \[CapitalDelta]G",
 StyleBox["apparent",
  FontSize->9],
 " (calculated above)  ==  \[CapitalDelta]G",
 StyleBox["intrinsic",
  FontSize->9],
 " (same for all isoforms; \[CapitalDelta]gGRE in above partition functions)  \
+  RT ln( 1 + Sum(Statistical weights of states that don\[CloseCurlyQuote]t \
bind GRE) / Sum(Statistical weights that bind GRE) )\n\n"
}], "Text",
 CellChangeTimes->{{3.653992703449724*^9, 3.653992829460823*^9}, {
  3.653993023663246*^9, 3.653993040988943*^9}, {3.6539931428636017`*^9, 
  3.653993157618671*^9}, {3.6775062916093187`*^9, 3.6775062932984457`*^9}, {
  3.6775063694591093`*^9, 3.677506397005267*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 8.  Set up the model and the experimental \
data.",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.41568627450980394`, 
   0.15294117647058825`]]], "Subsubsection",
 CellChangeTimes->{{3.6143684331363287`*^9, 3.6143684443919725`*^9}, {
   3.6170378264944973`*^9, 3.6170378322396393`*^9}, {3.617123759729137*^9, 
   3.6171238344270773`*^9}, 3.653991373382328*^9, {3.677506438014085*^9, 
   3.6775064401244392`*^9}, {3.677506500747377*^9, 3.677506512206458*^9}, 
   3.677506555210664*^9, {3.6775070966506567`*^9, 3.677507097102572*^9}, {
   3.677507128215695*^9, 3.677507134700001*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{"data", " ", "input", " ", "is", " ", 
    RowBox[{"{", 
     RowBox[{"Activity", ",", " ", 
      RowBox[{
       RowBox[{"-", "RTln"}], 
       RowBox[{"(", 
        RowBox[{"Kd", " ", "for", " ", "GRE"}], ")"}]}]}], "}"}]}], " ", 
   "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{
    RowBox[{"ClearAll", "[", 
     RowBox[{"datatoFit", ",", "modeltoFit"}], "]"}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"datatoFit", "=", 
     RowBox[{"{", 
      RowBox[{
      "27.6", ",", "Agre", ",", "35.3", ",", "Bgre", ",", "31.4", ",", 
       "C1gre", ",", "24.0", ",", "C2gre", ",", "124.0", ",", "C3gre"}], 
      "}"}]}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Print", "[", "datatoFit", "]"}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
    "this", " ", "data", " ", "is", " ", "in", " ", "the", " ", "form", " ", 
     "of", " ", "transcription", " ", "activation", " ", "for", " ", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"A", "/", "B"}], "/", "C1"}], "/", "C2"}], "/", "C3"}], " ", 
     "and", " ", "then", " ", "the", " ", "same", " ", "for", " ", "binding", 
     " ", "affinity", " ", "divided", " ", "by", " ", 
     RowBox[{"10", "^", "5"}]}], "*)"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"modeltoFit", "=", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "*", "dPrFFA"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "K2A", "+", "K3A", "+", "K4A"}], ")"}]}], 
          "PartFunAg"], ")"}]}], ",", 
       RowBox[{"A", "*", "dPrFFB"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "K2B", "+", "K3B", "+", "K4B"}], ")"}]}], 
          "PartFunBg"], ")"}]}], ",", 
       RowBox[{"A", "*", "dPrFFC1"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "K2C1", "+", "K3C1", "+", "K4C1"}], ")"}]}], 
          "PartFunC1g"], ")"}]}], ",", 
       RowBox[{"A", "*", "dPrFFC2"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "K2C2", "+", "K3C2", "+", "K4C2"}], ")"}]}], 
          "PartFunC2g"], ")"}]}], ",", 
       RowBox[{"A", "*", "dPrFFC3"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "Zgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "K1C3"}], ")"}]}], "PartFunC3g"], ")"}]}]}], 
      "}"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->CompressedData["
1:eJwd0F1IU2EAh/Gx6EsstKBMnREjW4U7sOZ0RuVrEdjWnLYGjha54SYYuSLH
ASnNspq70bSD1cIIL6oLYxfh+oBGI8KaNQmXaUVFONlZYx+41YrV+9/Fw+/+
2WLqaGoVCgQCCQ2W1+vmkokwmZf3fYLydt9XmE36cy4+Xd5SkAwTe53DDBe4
yokSqmdy2gPZyGy0lFo7PhqHBmtgCUYknt9wSu2MdSh5ousRp6CyW62yUdsG
rmigrbuhGV4QfzNA+xmuBX5ouGuC1YPlFaep/et3VkFfj4mFZp0jZ++zFX44
O9o6BcvE25itNTyJLp2SwbDVOzes5sn3NaIvMLNR8e46VBiC8LFNaOSobWU6
M6zcZOuD1Vz6KpQELwlHqHklrkIorNLuguyASg6lvTL/wmGeyEofvYc7Xqp+
hqiprvEozBvqLFqkXmtMF8OCyxt+/dDwZN3b+D840e9MDGp5YiHZnH9UojQ8
f+tkBh6PH7wxRPUajrjgk2btC3jzufUNPJHZPDNM5UWFQRh2d83DMeeBzzB/
D+Nd1siT2nvGVzCfW3V/LdVR1O6GzOo7Z/XUB5OEhawxoDRTPX7pPuhlFDXb
m+g/d2Q3jFs0FUepM2O3GRi7+Dehp4ayx1Kwbm9xZ72FJyP7lXYYW3nuIZS6
Qjl9+o+BQ9TXCtM0/A/KN0iU
  "]],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"27.6`", ",", 
   RowBox[{"-", "8340.076763100624`"}], ",", "35.3`", ",", 
   RowBox[{"-", "8209.21131540906`"}], ",", "31.4`", ",", 
   RowBox[{"-", "8078.345867717498`"}], ",", "24.`", ",", 
   RowBox[{"-", "8000.0346399281725`"}], ",", "124.`", ",", 
   RowBox[{"-", "8158.182357875023`"}]}], "}"}]], "Print",
 CellChangeTimes->{3.677509564841063*^9, 3.677513089275646*^9}]
}, Open  ]],

Cell[BoxData[
 StyleBox[
  RowBox[{
   RowBox[{
   "Section", " ", "9.", "  ", "Optimize", " ", "the", " ", "model", " ", 
    "against", " ", "a", " ", "merit", " ", "function"}], 
   StyleBox[",", "Subsection",
    FontFamily->"Nimbus Sans L",
    FontSize->26,
    FontWeight->"Plain",
    FontColor->RGBColor[
     0.7803921568627451, 0.41568627450980394`, 0.15294117647058825`]], 
   StyleBox[" ", "Subsection",
    FontFamily->"Nimbus Sans L",
    FontSize->26,
    FontWeight->"Plain",
    FontColor->RGBColor[
     0.7803921568627451, 0.41568627450980394`, 0.15294117647058825`]], 
   RowBox[{
   "choosing", " ", "the", " ", "initial", " ", "conditions", " ", "randomly",
     " ", "to", " ", "increase", " ", "the", " ", "likelihood", " ", "of", 
    " ", "finding", " ", "the", " ", "global", " ", 
    RowBox[{"optimum", "."}]}]}], "Subsection",
  FontFamily->"Nimbus Sans L",
  FontSize->26,
  FontWeight->"Plain",
  FontColor->RGBColor[
   0.7803921568627451, 0.41568627450980394`, 0.15294117647058825`]]], "Input",
 CellChangeTimes->{{3.6171157504897623`*^9, 3.617115758621645*^9}, {
   3.617115798380666*^9, 3.617115901638352*^9}, {3.617115983225604*^9, 
   3.61711612287523*^9}, {3.617116399901512*^9, 3.617116406525468*^9}, {
   3.6171165525354548`*^9, 3.6171167240989857`*^9}, {3.617116913422187*^9, 
   3.617116945492321*^9}, {3.6171171714968157`*^9, 3.6171173206542187`*^9}, {
   3.617117461960268*^9, 3.617117552755354*^9}, {3.617117780616645*^9, 
   3.6171177823177958`*^9}, {3.617117815826318*^9, 3.6171178557434673`*^9}, {
   3.617117914868697*^9, 3.6171180059962883`*^9}, {3.617118224129664*^9, 
   3.6171182407970877`*^9}, {3.617118272947938*^9, 3.617118397567728*^9}, {
   3.6171197088357964`*^9, 3.617119709119583*^9}, {3.617119768431204*^9, 
   3.617119775445373*^9}, {3.617120107944785*^9, 3.617120114839409*^9}, {
   3.617120591882423*^9, 3.617120631883704*^9}, {3.6171206830937967`*^9, 
   3.617120689046255*^9}, {3.617120771792733*^9, 3.617120775589678*^9}, {
   3.6171208347507067`*^9, 3.6171208427730427`*^9}, {3.617120910129274*^9, 
   3.6171209103149967`*^9}, {3.617120979161847*^9, 3.6171209872570353`*^9}, {
   3.617121057597616*^9, 3.617121075226693*^9}, {3.617121112150311*^9, 
   3.617121173419304*^9}, {3.617121231806016*^9, 3.6171212456659*^9}, {
   3.617121431958103*^9, 3.617121480290834*^9}, {3.617121545685054*^9, 
   3.6171216343670483`*^9}, {3.617121748049468*^9, 3.617121857346963*^9}, {
   3.617121934485244*^9, 3.617122001484775*^9}, {3.617122049661518*^9, 
   3.6171220531725883`*^9}, {3.6171221080889606`*^9, 
   3.6171221377245407`*^9}, {3.6171222565790243`*^9, 
   3.6171222592377653`*^9}, {3.617122291712583*^9, 3.617122463471633*^9}, {
   3.617122497961629*^9, 3.617122512514915*^9}, 3.617122572227332*^9, {
   3.617122694136359*^9, 3.61712269454375*^9}, {3.6173764373719025`*^9, 
   3.617376496923309*^9}, {3.6173772800591016`*^9, 3.6173772801381063`*^9}, {
   3.6173773121479373`*^9, 3.617377314790088*^9}, {3.617377891523075*^9, 
   3.6173779311213408`*^9}, {3.653994970121632*^9, 3.653994970410509*^9}, {
   3.653998631910988*^9, 3.653998634116537*^9}, {3.653998683523898*^9, 
   3.6539987054146423`*^9}, {3.654363545761984*^9, 3.6543635486871567`*^9}, {
   3.6640282391317997`*^9, 3.664028304873445*^9}, 3.66402962393937*^9, {
   3.664029712041945*^9, 3.664029713253984*^9}, {3.664029947363867*^9, 
   3.66402997121614*^9}, {3.664030266326779*^9, 3.66403035651576*^9}, {
   3.664030683863906*^9, 3.664030685472875*^9}, {3.664030850469551*^9, 
   3.664030856176402*^9}, 3.664031426119288*^9, {3.664031467848856*^9, 
   3.664031477938023*^9}, {3.66403151362901*^9, 3.664031538186631*^9}, {
   3.664031572511547*^9, 3.664031593228356*^9}, {3.664031633349917*^9, 
   3.664031723401371*^9}, {3.6640318570202208`*^9, 3.6640319420590277`*^9}, {
   3.664031992524219*^9, 3.664031997478133*^9}, {3.664032030791102*^9, 
   3.664032031216404*^9}, {3.664032215819929*^9, 3.664032220211699*^9}, {
   3.6640322747422743`*^9, 3.664032276115074*^9}, {3.664032307544683*^9, 
   3.664032326314892*^9}, {3.6640324405024137`*^9, 3.664032446032563*^9}, {
   3.6640326556543493`*^9, 3.66403266380975*^9}, {3.6640329883225603`*^9, 
   3.664033008003079*^9}, {3.6640332053076067`*^9, 3.664033210758654*^9}, 
   3.6640353865974092`*^9, {3.664036897484004*^9, 3.664036953563846*^9}, {
   3.66403705375174*^9, 3.6640371272696247`*^9}, {3.664037298116354*^9, 
   3.664037306354707*^9}, {3.664037379816249*^9, 3.664037383382243*^9}, {
   3.664037447428214*^9, 3.6640374787577467`*^9}, {3.66403753342067*^9, 
   3.664037562395681*^9}, {3.6640376140145683`*^9, 3.664037628490675*^9}, 
   3.6640376861614428`*^9, {3.664037746402438*^9, 3.664037810587975*^9}, {
   3.664038322844146*^9, 3.6640383721642637`*^9}, {3.6640384293551188`*^9, 
   3.664038559875167*^9}, {3.6640390400797367`*^9, 3.664039147067665*^9}, {
   3.664039342049427*^9, 3.6640393563248158`*^9}, {3.6640397998622093`*^9, 
   3.6640398184461117`*^9}, 3.664040116474695*^9, {3.664041137945243*^9, 
   3.6640411386541986`*^9}, {3.6640416126802588`*^9, 3.664041671921097*^9}, {
   3.664041737962454*^9, 3.6640417460983047`*^9}, {3.664042285723507*^9, 
   3.664042289450314*^9}, {3.664042415296318*^9, 3.66404252381706*^9}, {
   3.664043024370983*^9, 3.664043028563572*^9}, {3.664043433943048*^9, 
   3.66404350762362*^9}, {3.664044093591587*^9, 3.664044113677578*^9}, {
   3.664044634176113*^9, 3.66404466307236*^9}, {3.664044922319667*^9, 
   3.664044960248589*^9}, {3.66404564086709*^9, 3.66404564511063*^9}, {
   3.664045918092238*^9, 3.6640459554046803`*^9}, {3.664209178103283*^9, 
   3.664209180901164*^9}, {3.664212371191622*^9, 3.664212377657874*^9}, {
   3.664216057650983*^9, 3.6642160819348593`*^9}, {3.664216127208777*^9, 
   3.6642161493122997`*^9}, 3.664216241773349*^9, 3.664274710168805*^9, {
   3.664280154369203*^9, 3.664280156489214*^9}, {3.66429729314719*^9, 
   3.6642973363071337`*^9}, {3.6646420904941883`*^9, 3.664642091221342*^9}, {
   3.664647470905479*^9, 3.66464748036873*^9}, {3.664702354075324*^9, 
   3.664702356261153*^9}, {3.6647085779249477`*^9, 3.6647085827199087`*^9}, {
   3.6647146408571033`*^9, 3.66471464448752*^9}, {3.664724196243121*^9, 
   3.6647242049399967`*^9}, {3.664724315467176*^9, 3.664724375091526*^9}, {
   3.666128303635747*^9, 3.666128304705209*^9}, {3.666376082930562*^9, 
   3.666376146190083*^9}, {3.6663762519721937`*^9, 3.666376277348827*^9}, {
   3.666442574339642*^9, 3.666442576436265*^9}, {3.6664451289152184`*^9, 
   3.666445129089159*^9}, {3.666523079154565*^9, 3.6665231176238317`*^9}, {
   3.666523150448864*^9, 3.6665231645323563`*^9}, {3.666954685162758*^9, 
   3.666954699297976*^9}, {3.667050811047987*^9, 3.6670508114648323`*^9}, {
   3.667051633024576*^9, 3.667051640798252*^9}, {3.6670540431498003`*^9, 
   3.667054083125951*^9}, {3.667054263723977*^9, 3.667054297031641*^9}, {
   3.667054377381741*^9, 3.667054382352993*^9}, {3.667057256009858*^9, 
   3.667057270573638*^9}, {3.667060529586199*^9, 3.667060552163007*^9}, {
   3.667060595728451*^9, 3.667061174198333*^9}, {3.667061275417459*^9, 
   3.66706132360693*^9}, {3.667062110792371*^9, 3.667062116003344*^9}, {
   3.667062937592276*^9, 3.667062997409807*^9}, {3.6670639400077667`*^9, 
   3.667064042909697*^9}, {3.667064925375696*^9, 3.667065063181439*^9}, {
   3.667065874689844*^9, 3.667065877212636*^9}, {3.667120991239893*^9, 
   3.667121149286374*^9}, {3.6671212778363533`*^9, 3.667121284207797*^9}, {
   3.6671218284159718`*^9, 3.6671218449824467`*^9}, {3.667122018402565*^9, 
   3.667122194503418*^9}, {3.667122859762648*^9, 3.667122906125445*^9}, 
   3.66712833172606*^9, {3.667128736944989*^9, 3.667128739283659*^9}, {
   3.667129138283586*^9, 3.667129145768387*^9}, {3.667129675893688*^9, 
   3.667129775237009*^9}, {3.667130744200707*^9, 3.6671307854753847`*^9}, {
   3.6671314688961573`*^9, 3.6671314693757887`*^9}, {3.667132346121415*^9, 
   3.6671323464418488`*^9}, {3.667133078848295*^9, 3.667133079308503*^9}, {
   3.667133778484765*^9, 3.6671337790183563`*^9}, {3.6671367629151278`*^9, 
   3.6671367745338993`*^9}, {3.667150397681988*^9, 3.667150397904715*^9}, {
   3.667150656491685*^9, 3.6671506569384947`*^9}, {3.667305654684808*^9, 
   3.667305661036088*^9}, {3.6673127183563623`*^9, 3.667312719703905*^9}, {
   3.667322912309928*^9, 3.667322922515142*^9}, {3.667323038096036*^9, 
   3.6673230408399*^9}, {3.667325119304761*^9, 3.667325119499002*^9}, {
   3.667580159233739*^9, 3.667580226236981*^9}, {3.6675802674072742`*^9, 
   3.6675803731800213`*^9}, {3.667639808689818*^9, 3.6676401051028843`*^9}, {
   3.667640137887727*^9, 3.667640145496887*^9}, {3.667642656124946*^9, 
   3.667642679403226*^9}, {3.667643445785491*^9, 3.667643467447895*^9}, {
   3.667643712701486*^9, 3.667643716316751*^9}, {3.667663219876343*^9, 
   3.66766322702824*^9}, {3.667667496444723*^9, 3.667667507220467*^9}, {
   3.667725638324884*^9, 3.667725766657178*^9}, {3.6677275722584476`*^9, 
   3.667727583889048*^9}, {3.6677278042632*^9, 3.667727804475219*^9}, {
   3.667745101068779*^9, 3.667745136386529*^9}, {3.667746490731442*^9, 
   3.667746529759235*^9}, {3.667755159294734*^9, 3.6677552055607758`*^9}, {
   3.6677559581106863`*^9, 3.66775597759025*^9}, {3.668160086059966*^9, 
   3.66816013355492*^9}, {3.668161347110383*^9, 3.668161470781852*^9}, 
   3.6681803040049677`*^9, {3.677506563676199*^9, 3.677506723087557*^9}, {
   3.677506816735696*^9, 3.6775068291969*^9}, {3.6775068741238832`*^9, 
   3.677506883695216*^9}, {3.677506916179678*^9, 3.677506918948442*^9}, {
   3.677509120735901*^9, 3.677509123389491*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"BestMerit", "=", 
    RowBox[{"-", "40000"}]}], ";", 
   RowBox[{"countr", "=", "0"}], ";"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"\[CapitalDelta]gGRE", "=", 
     RowBox[{"-", "1728.09"}]}], ";"}], "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{"For", "[", 
  RowBox[{
   RowBox[{"f", "=", "1"}], ",", 
   RowBox[{"f", "\[LessEqual]", "50"}], ",", 
   RowBox[{"f", "++"}], ",", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"ClearAll", "[", 
     RowBox[{
     "A", ",", "\[CapitalDelta]GDBD", ",", "\[CapitalDelta]gDBDR", ",", 
      "\[CapitalDelta]gRF", ",", "\[CapitalDelta]GRB", ",", 
      "\[CapitalDelta]GRC1", ",", "\[CapitalDelta]GRC2", ",", "result"}], 
     "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"result", "=", 
     RowBox[{"NMaximize", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"-", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{
            RowBox[{"(", 
             FractionBox[
              RowBox[{"Abs", "[", 
               RowBox[{
                RowBox[{
                "datatoFit", "\[LeftDoubleBracket]", "1", 
                 "\[RightDoubleBracket]"}], "-", 
                RowBox[{
                "modeltoFit", "\[LeftDoubleBracket]", "1", 
                 "\[RightDoubleBracket]"}]}], "]"}], 
              RowBox[{"Abs", "[", 
               RowBox[{
                RowBox[{
                "datatoFit", "\[LeftDoubleBracket]", "1", 
                 "\[RightDoubleBracket]"}], "+", 
                RowBox[{
                "modeltoFit", "\[LeftDoubleBracket]", "1", 
                 "\[RightDoubleBracket]"}]}], "]"}]], ")"}], "+", 
            RowBox[{"(", 
             FractionBox[
              RowBox[{"Abs", "[", 
               RowBox[{
                RowBox[{
                "datatoFit", "\[LeftDoubleBracket]", "2", 
                 "\[RightDoubleBracket]"}], "-", 
                RowBox[{
                "modeltoFit", "\[LeftDoubleBracket]", "2", 
                 "\[RightDoubleBracket]"}]}], "]"}], 
              RowBox[{"Abs", "[", 
               RowBox[{
                RowBox[{
                "datatoFit", "\[LeftDoubleBracket]", "2", 
                 "\[RightDoubleBracket]"}], "+", 
                RowBox[{
                "modeltoFit", "\[LeftDoubleBracket]", "2", 
                 "\[RightDoubleBracket]"}]}], "]"}]], ")"}]}], ")"}], "2"]}], 
        "-", 
        SuperscriptBox[
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "3", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "3", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "3", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "3", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}], "+", 
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "4", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "4", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "4", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "4", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}]}], ")"}], "2"], 
        "-", 
        SuperscriptBox[
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "5", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "5", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "5", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "5", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}], "+", 
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "6", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "6", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "6", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "6", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}]}], ")"}], "2"], 
        "-", 
        SuperscriptBox[
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "7", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "7", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "7", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "7", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}], "+", 
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "8", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "8", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "8", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "8", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}]}], ")"}], "2"], 
        "-", 
        SuperscriptBox[
         RowBox[{"(", 
          RowBox[{
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "9", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "9", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "9", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "9", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}], "+", 
           RowBox[{"(", 
            FractionBox[
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "10", 
                "\[RightDoubleBracket]"}], "-", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "10", 
                "\[RightDoubleBracket]"}]}], "]"}], 
             RowBox[{"Abs", "[", 
              RowBox[{
               RowBox[{
               "datatoFit", "\[LeftDoubleBracket]", "10", 
                "\[RightDoubleBracket]"}], "+", 
               RowBox[{
               "modeltoFit", "\[LeftDoubleBracket]", "10", 
                "\[RightDoubleBracket]"}]}], "]"}]], ")"}]}], ")"}], "2"]}], 
       ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"A", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]GDBD", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]gDBDR", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]gRF", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]gGRE", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]GRB", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]GRC1", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"\[CapitalDelta]GRC2", ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"-", "1000"}], ",", "0"}], "}"}], "]"}], ",", 
           RowBox[{"RandomReal", "[", 
            RowBox[{"{", 
             RowBox[{"0", ",", "1000"}], "}"}], "]"}]}], "}"}]}], "}"}], ",", 
       RowBox[{"Method", "\[Rule]", "\"\<RandomSearch\>\""}], ",", 
       RowBox[{"MaxIterations", "\[Rule]", "1000"}]}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"Print", "[", "f", "]"}], ";", "\[IndentingNewLine]", 
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{
       RowBox[{
       "result", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ">", 
       "BestMerit"}], ",", 
      RowBox[{
       RowBox[{"BestMerit", "=", 
        RowBox[{
        "result", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
       ";", 
       RowBox[{"BestArry", "=", "result"}], ";", 
       RowBox[{"Print", "[", 
        RowBox[{"f", ",", "BestArry"}], "]"}]}]}], "]"}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"countr", "=", 
     RowBox[{"countr", "+", "1"}]}], ";", 
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{"countr", ">", "1000"}], ",", 
      RowBox[{
       RowBox[{"Print", "[", "\"\<Trial:\>\"", "]"}], ";", " ", 
       RowBox[{"Print", "[", " ", "f", "]"}], ";", 
       RowBox[{"countr", "=", "1"}]}]}], "]"}]}]}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Print", "[", "result", "]"}], ";"}], "*)"}], 
  "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Print", "[", 
    RowBox[{"BestMerit", ",", "result"}], "]"}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.6171157504897623`*^9, 3.617115758621645*^9}, {
   3.617115798380666*^9, 3.617115901638352*^9}, {3.617115983225604*^9, 
   3.61711612287523*^9}, {3.617116399901512*^9, 3.617116406525468*^9}, {
   3.6171165525354548`*^9, 3.6171167240989857`*^9}, {3.617116913422187*^9, 
   3.617116945492321*^9}, {3.6171171714968157`*^9, 3.6171173206542187`*^9}, {
   3.617117461960268*^9, 3.617117552755354*^9}, {3.617117780616645*^9, 
   3.6171177823177958`*^9}, {3.617117815826318*^9, 3.6171178557434673`*^9}, {
   3.617117914868697*^9, 3.6171180059962883`*^9}, {3.617118224129664*^9, 
   3.6171182407970877`*^9}, {3.617118272947938*^9, 3.617118397567728*^9}, {
   3.6171197088357964`*^9, 3.617119709119583*^9}, {3.617119768431204*^9, 
   3.617119775445373*^9}, {3.617120107944785*^9, 3.617120114839409*^9}, {
   3.617120591882423*^9, 3.617120631883704*^9}, {3.6171206830937967`*^9, 
   3.617120689046255*^9}, {3.617120771792733*^9, 3.617120775589678*^9}, {
   3.6171208347507067`*^9, 3.6171208427730427`*^9}, {3.617120910129274*^9, 
   3.6171209103149967`*^9}, {3.617120979161847*^9, 3.6171209872570353`*^9}, {
   3.617121057597616*^9, 3.617121075226693*^9}, {3.617121112150311*^9, 
   3.617121173419304*^9}, {3.617121231806016*^9, 3.6171212456659*^9}, {
   3.617121431958103*^9, 3.617121480290834*^9}, {3.617121545685054*^9, 
   3.6171216343670483`*^9}, {3.617121748049468*^9, 3.617121857346963*^9}, {
   3.617121934485244*^9, 3.617122001484775*^9}, {3.617122049661518*^9, 
   3.6171220531725883`*^9}, {3.6171221080889606`*^9, 
   3.6171221377245407`*^9}, {3.6171222565790243`*^9, 
   3.6171222592377653`*^9}, {3.617122291712583*^9, 3.617122463471633*^9}, {
   3.617122497961629*^9, 3.617122512514915*^9}, 3.617122572227332*^9, {
   3.617122694136359*^9, 3.61712269454375*^9}, {3.6173764373719025`*^9, 
   3.617376496923309*^9}, {3.6173772800591016`*^9, 3.6173772801381063`*^9}, {
   3.6173773121479373`*^9, 3.617377314790088*^9}, {3.617377891523075*^9, 
   3.6173779311213408`*^9}, {3.653994970121632*^9, 3.653994970410509*^9}, {
   3.653998631910988*^9, 3.653998634116537*^9}, {3.653998683523898*^9, 
   3.6539987054146423`*^9}, {3.654363545761984*^9, 3.6543635486871567`*^9}, {
   3.6640282391317997`*^9, 3.664028304873445*^9}, 3.66402962393937*^9, {
   3.664029712041945*^9, 3.664029713253984*^9}, {3.664029947363867*^9, 
   3.66402997121614*^9}, {3.664030266326779*^9, 3.66403035651576*^9}, {
   3.664030683863906*^9, 3.664030685472875*^9}, {3.664030850469551*^9, 
   3.664030856176402*^9}, 3.664031426119288*^9, {3.664031467848856*^9, 
   3.664031477938023*^9}, {3.66403151362901*^9, 3.664031538186631*^9}, {
   3.664031572511547*^9, 3.664031593228356*^9}, {3.664031633349917*^9, 
   3.664031723401371*^9}, {3.6640318570202208`*^9, 3.6640319420590277`*^9}, {
   3.664031992524219*^9, 3.664031997478133*^9}, {3.664032030791102*^9, 
   3.664032031216404*^9}, {3.664032215819929*^9, 3.664032220211699*^9}, {
   3.6640322747422743`*^9, 3.664032276115074*^9}, {3.664032307544683*^9, 
   3.664032326314892*^9}, {3.6640324405024137`*^9, 3.664032446032563*^9}, {
   3.6640326556543493`*^9, 3.66403266380975*^9}, {3.6640329883225603`*^9, 
   3.664033008003079*^9}, {3.6640332053076067`*^9, 3.664033210758654*^9}, 
   3.6640353865974092`*^9, {3.664036897484004*^9, 3.664036953563846*^9}, {
   3.66403705375174*^9, 3.6640371272696247`*^9}, {3.664037298116354*^9, 
   3.664037306354707*^9}, {3.664037379816249*^9, 3.664037383382243*^9}, {
   3.664037447428214*^9, 3.6640374787577467`*^9}, {3.66403753342067*^9, 
   3.664037562395681*^9}, {3.6640376140145683`*^9, 3.664037628490675*^9}, 
   3.6640376861614428`*^9, {3.664037746402438*^9, 3.664037810587975*^9}, {
   3.664038322844146*^9, 3.6640383721642637`*^9}, {3.6640384293551188`*^9, 
   3.664038559875167*^9}, {3.6640390400797367`*^9, 3.664039147067665*^9}, {
   3.664039342049427*^9, 3.6640393563248158`*^9}, {3.6640397998622093`*^9, 
   3.6640398184461117`*^9}, 3.664040116474695*^9, {3.664041137945243*^9, 
   3.6640411386541986`*^9}, {3.6640416126802588`*^9, 3.664041671921097*^9}, {
   3.664041737962454*^9, 3.6640417460983047`*^9}, {3.664042285723507*^9, 
   3.664042289450314*^9}, {3.664042415296318*^9, 3.66404252381706*^9}, {
   3.664043024370983*^9, 3.664043028563572*^9}, {3.664043433943048*^9, 
   3.66404350762362*^9}, {3.664044093591587*^9, 3.664044113677578*^9}, {
   3.664044634176113*^9, 3.66404466307236*^9}, {3.664044922319667*^9, 
   3.664044960248589*^9}, {3.66404564086709*^9, 3.66404564511063*^9}, {
   3.664045918092238*^9, 3.6640459554046803`*^9}, {3.664209178103283*^9, 
   3.664209180901164*^9}, {3.664212371191622*^9, 3.664212377657874*^9}, {
   3.664216057650983*^9, 3.6642160819348593`*^9}, {3.664216127208777*^9, 
   3.6642161493122997`*^9}, 3.664216241773349*^9, 3.664274710168805*^9, {
   3.664280154369203*^9, 3.664280156489214*^9}, {3.66429729314719*^9, 
   3.6642973363071337`*^9}, {3.6646420904941883`*^9, 3.664642091221342*^9}, {
   3.664647470905479*^9, 3.66464748036873*^9}, {3.664702354075324*^9, 
   3.664702356261153*^9}, {3.6647085779249477`*^9, 3.6647085827199087`*^9}, {
   3.6647146408571033`*^9, 3.66471464448752*^9}, {3.664724196243121*^9, 
   3.6647242049399967`*^9}, {3.664724315467176*^9, 3.664724375091526*^9}, {
   3.666128303635747*^9, 3.666128304705209*^9}, {3.666376082930562*^9, 
   3.666376146190083*^9}, {3.6663762519721937`*^9, 3.666376277348827*^9}, {
   3.666442574339642*^9, 3.666442576436265*^9}, {3.6664451289152184`*^9, 
   3.666445129089159*^9}, {3.666523079154565*^9, 3.6665231176238317`*^9}, {
   3.666523150448864*^9, 3.6665231645323563`*^9}, {3.666954685162758*^9, 
   3.666954699297976*^9}, {3.667050811047987*^9, 3.6670508114648323`*^9}, {
   3.667051633024576*^9, 3.667051640798252*^9}, {3.6670540431498003`*^9, 
   3.667054083125951*^9}, {3.667054263723977*^9, 3.667054297031641*^9}, {
   3.667054377381741*^9, 3.667054382352993*^9}, {3.667057256009858*^9, 
   3.667057270573638*^9}, {3.667060529586199*^9, 3.667060552163007*^9}, {
   3.667060595728451*^9, 3.667061174198333*^9}, {3.667061275417459*^9, 
   3.66706132360693*^9}, {3.667062110792371*^9, 3.667062116003344*^9}, {
   3.667062937592276*^9, 3.667062997409807*^9}, {3.6670639400077667`*^9, 
   3.667064042909697*^9}, {3.667064925375696*^9, 3.667065063181439*^9}, {
   3.667065874689844*^9, 3.667065877212636*^9}, {3.667120991239893*^9, 
   3.667121149286374*^9}, {3.6671212778363533`*^9, 3.667121284207797*^9}, {
   3.6671218284159718`*^9, 3.6671218449824467`*^9}, {3.667122018402565*^9, 
   3.667122194503418*^9}, {3.667122859762648*^9, 3.667122906125445*^9}, 
   3.66712833172606*^9, {3.667128736944989*^9, 3.667128739283659*^9}, {
   3.667129138283586*^9, 3.667129145768387*^9}, {3.667129675893688*^9, 
   3.667129775237009*^9}, {3.667130744200707*^9, 3.6671307854753847`*^9}, {
   3.6671314688961573`*^9, 3.6671314693757887`*^9}, {3.667132346121415*^9, 
   3.6671323464418488`*^9}, {3.667133078848295*^9, 3.667133079308503*^9}, {
   3.667133778484765*^9, 3.6671337790183563`*^9}, {3.6671367629151278`*^9, 
   3.6671367745338993`*^9}, {3.667150397681988*^9, 3.667150397904715*^9}, {
   3.667150656491685*^9, 3.6671506569384947`*^9}, {3.667305654684808*^9, 
   3.667305661036088*^9}, {3.6673127183563623`*^9, 3.667312719703905*^9}, {
   3.667322912309928*^9, 3.667322922515142*^9}, {3.667323038096036*^9, 
   3.6673230408399*^9}, {3.667325119304761*^9, 3.667325119499002*^9}, {
   3.667580159233739*^9, 3.667580226236981*^9}, {3.6675802674072742`*^9, 
   3.6675803731800213`*^9}, {3.667639808689818*^9, 3.6676401051028843`*^9}, {
   3.667640137887727*^9, 3.667640145496887*^9}, {3.667642656124946*^9, 
   3.667642679403226*^9}, {3.667643445785491*^9, 3.667643467447895*^9}, {
   3.667643712701486*^9, 3.667643716316751*^9}, {3.667663219876343*^9, 
   3.66766322702824*^9}, {3.667667496444723*^9, 3.667667507220467*^9}, {
   3.667725638324884*^9, 3.667725766657178*^9}, {3.6677275722584476`*^9, 
   3.667727583889048*^9}, {3.6677278042632*^9, 3.667727804475219*^9}, {
   3.667745101068779*^9, 3.667745136386529*^9}, {3.667746490731442*^9, 
   3.667746529759235*^9}, {3.667755159294734*^9, 3.6677552055607758`*^9}, {
   3.6677559581106863`*^9, 3.66775597759025*^9}, {3.668160086059966*^9, 
   3.66816013355492*^9}, {3.668161347110383*^9, 3.668161470781852*^9}, 
   3.6681803040049677`*^9, {3.677506563676199*^9, 3.677506723087557*^9}, {
   3.677506816735696*^9, 3.6775068291969*^9}, 3.6775068741238832`*^9, {
   3.677506929626335*^9, 3.677506958551532*^9}, 3.677507437000133*^9, {
   3.677509053902033*^9, 3.677509071986663*^9}, {3.677513093861678*^9, 
   3.677513095213792*^9}}],

Cell[CellGroupData[{

Cell[BoxData["1"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513115174026*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"1", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.00004999336964889473`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "222.89810528285625`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6870.5815957097975`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "1119.4896927111572`"}], 
       ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "2682.3381521336796`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8457.988533863607`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "427.4055182548072`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "1159.0551050737256`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1380.0712273608265`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[
  1, {-0.00004999336964889473, {$CellContext`A -> 
     222.89810528285625`, $CellContext`\[CapitalDelta]GDBD -> \
-6870.5815957097975`, $CellContext`\[CapitalDelta]gDBDR -> 
     1119.4896927111572`, $CellContext`\[CapitalDelta]gRF -> \
-2682.3381521336796`, $CellContext`\[CapitalDelta]gGRE -> -8457.988533863607, \
$CellContext`\[CapitalDelta]GRB -> 
     427.4055182548072, $CellContext`\[CapitalDelta]GRC1 -> 
     1159.0551050737256`, $CellContext`\[CapitalDelta]GRC2 -> 
     1380.0712273608265`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513115270584*^9}],

Cell[BoxData["2"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513133641201*^9}],

Cell[BoxData["3"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775131485113688`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"3", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.000043597280296988205`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "327.1012940143466`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6433.595364953959`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "919.3571064688816`"}], ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "2656.9497742332655`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8350.484370214708`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "328.56498975900166`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "951.1589961725767`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1168.6088121384332`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[
  3, {-0.000043597280296988205`, {$CellContext`A -> 
     327.1012940143466, $CellContext`\[CapitalDelta]GDBD -> \
-6433.595364953959, $CellContext`\[CapitalDelta]gDBDR -> 
     919.3571064688816, $CellContext`\[CapitalDelta]gRF -> \
-2656.9497742332655`, $CellContext`\[CapitalDelta]gGRE -> -8350.484370214708, \
$CellContext`\[CapitalDelta]GRB -> 
     328.56498975900166`, $CellContext`\[CapitalDelta]GRC1 -> 
     951.1589961725767, $CellContext`\[CapitalDelta]GRC2 -> 
     1168.6088121384332`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513148570945*^9}],

Cell[BoxData["4"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513162486753*^9}],

Cell[BoxData["5"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.67751318341369*^9}],

Cell[BoxData["6"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775131900526867`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"6", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.000029300732246169753`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "241.40015603396262`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6765.704026843403`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "1188.6176686545818`"}], 
       ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "2564.059823470299`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8425.9119668742`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "336.6671045822516`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "1111.8207076817364`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1335.2431899036349`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[
  6, {-0.000029300732246169753`, {$CellContext`A -> 
     241.40015603396262`, $CellContext`\[CapitalDelta]GDBD -> \
-6765.704026843403, $CellContext`\[CapitalDelta]gDBDR -> 
     1188.6176686545818`, $CellContext`\[CapitalDelta]gRF -> \
-2564.059823470299, $CellContext`\[CapitalDelta]gGRE -> -8425.9119668742, \
$CellContext`\[CapitalDelta]GRB -> 
     336.6671045822516, $CellContext`\[CapitalDelta]GRC1 -> 
     1111.8207076817364`, $CellContext`\[CapitalDelta]GRC2 -> 
     1335.2431899036349`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513190102662*^9}],

Cell[BoxData["7"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513204084586*^9}],

Cell[BoxData["8"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.67751322139205*^9}],

Cell[BoxData["9"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.67751323637081*^9}],

Cell[BoxData["10"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513253198572*^9}],

Cell[BoxData["11"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513267879932*^9}],

Cell[BoxData["12"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.67751328584282*^9}],

Cell[BoxData["13"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775133015628242`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"13", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.000022404832928670322`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "304.5684440054337`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6504.426702485091`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "1398.150573776957`"}], ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "2260.8751359098146`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8355.812973519434`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "114.5919684661343`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "1020.6602684972788`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1253.3079706860196`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[
  13, {-0.000022404832928670322`, {$CellContext`A -> 
     304.5684440054337, $CellContext`\[CapitalDelta]GDBD -> \
-6504.426702485091, $CellContext`\[CapitalDelta]gDBDR -> 
     1398.150573776957, $CellContext`\[CapitalDelta]gRF -> \
-2260.8751359098146`, $CellContext`\[CapitalDelta]gGRE -> -8355.812973519434, \
$CellContext`\[CapitalDelta]GRB -> 
     114.5919684661343, $CellContext`\[CapitalDelta]GRC1 -> 
     1020.6602684972788`, $CellContext`\[CapitalDelta]GRC2 -> 
     1253.3079706860196`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513301642696*^9}],

Cell[BoxData["14"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513321053664*^9}],

Cell[BoxData["15"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775133352986517`*^9}],

Cell[BoxData["16"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513344283349*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"16", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.000019258174201113855`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "272.94513519100605`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6620.77343814212`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "1279.4232894905929`"}], 
       ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "2413.270743624691`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8385.476580905377`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "221.60506159106583`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "1054.2536270394246`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1281.3062788040784`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[
  16, {-0.000019258174201113855`, {$CellContext`A -> 
     272.94513519100605`, $CellContext`\[CapitalDelta]GDBD -> \
-6620.77343814212, $CellContext`\[CapitalDelta]gDBDR -> 
     1279.4232894905929`, $CellContext`\[CapitalDelta]gRF -> \
-2413.270743624691, $CellContext`\[CapitalDelta]gGRE -> -8385.476580905377, \
$CellContext`\[CapitalDelta]GRB -> 
     221.60506159106583`, $CellContext`\[CapitalDelta]GRC1 -> 
     1054.2536270394246`, $CellContext`\[CapitalDelta]GRC2 -> 
     1281.3062788040784`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513344334302*^9}],

Cell[BoxData["17"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775133576276913`*^9}],

Cell[BoxData["18"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513371915557*^9}],

Cell[BoxData["19"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.67751337875786*^9}],

Cell[BoxData["20"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513395142035*^9}],

Cell[BoxData["21"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513411727364*^9}],

Cell[BoxData["22"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513426807331*^9}],

Cell[BoxData["23"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513441509582*^9}],

Cell[BoxData["24"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513459276414*^9}],

Cell[BoxData["25"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513474129243*^9}],

Cell[BoxData["26"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513489464707*^9}],

Cell[BoxData["27"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513505527878*^9}],

Cell[BoxData["28"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775135212362747`*^9}],

Cell[BoxData["29"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513537476967*^9}],

Cell[BoxData["30"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513553443912*^9}],

Cell[BoxData["31"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513568881703*^9}],

Cell[BoxData["32"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775135833669662`*^9}],

Cell[BoxData["33"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513600432653*^9}],

Cell[BoxData["34"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513617478887*^9}],

Cell[BoxData["35"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513635383181*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"35", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.00001892421618289435`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "274.04609620269036`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6616.214410906745`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "1202.2495529470596`"}], 
       ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "2478.6681485699037`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8386.143815802465`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "257.5831040209306`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "1044.947803680732`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1269.04181472744`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[
  35, {-0.00001892421618289435, {$CellContext`A -> 
     274.04609620269036`, $CellContext`\[CapitalDelta]GDBD -> \
-6616.214410906745, $CellContext`\[CapitalDelta]gDBDR -> 
     1202.2495529470596`, $CellContext`\[CapitalDelta]gRF -> \
-2478.6681485699037`, $CellContext`\[CapitalDelta]gGRE -> -8386.143815802465, \
$CellContext`\[CapitalDelta]GRB -> 
     257.5831040209306, $CellContext`\[CapitalDelta]GRC1 -> 
     1044.947803680732, $CellContext`\[CapitalDelta]GRC2 -> 
     1269.04181472744}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775136354228888`*^9}],

Cell[BoxData["36"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775136505368757`*^9}],

Cell[BoxData["37"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775136661307573`*^9}],

Cell[BoxData["38"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513685139505*^9}],

Cell[BoxData["39"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.67751370455785*^9}],

Cell[BoxData["40"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513719471816*^9}],

Cell[BoxData["41"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513733977339*^9}],

Cell[BoxData["42"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513748419115*^9}],

Cell[BoxData["43"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513764610326*^9}],

Cell[BoxData["44"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513793011209*^9}],

Cell[BoxData["45"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513808595725*^9}],

Cell[BoxData["46"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.6775138238744698`*^9}],

Cell[BoxData["47"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513836620274*^9}],

Cell[BoxData["48"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513850787417*^9}],

Cell[BoxData["49"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513868615543*^9}],

Cell[BoxData["50"], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513891313542*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{
   RowBox[{"-", "0.00001892421618289435`"}], "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"-", "0.00011465426729963134`"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"A", "\[Rule]", "375.78284512459965`"}], ",", 
       RowBox[{"\[CapitalDelta]GDBD", "\[Rule]", 
        RowBox[{"-", "6303.7428776995985`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gDBDR", "\[Rule]", "447.2500014904075`"}], ",", 
       RowBox[{"\[CapitalDelta]gRF", "\[Rule]", 
        RowBox[{"-", "3052.496484517037`"}]}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "\[Rule]", 
        RowBox[{"-", "8330.55218096124`"}]}], ",", 
       RowBox[{"\[CapitalDelta]GRB", "\[Rule]", "535.3686285112475`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC1", "\[Rule]", "887.7894537926853`"}], ",", 
       RowBox[{"\[CapitalDelta]GRC2", "\[Rule]", "1096.5792178914558`"}]}], 
      "}"}]}], "}"}]}],
  SequenceForm[-0.00001892421618289435, {-0.00011465426729963134`, \
{$CellContext`A -> 
     375.78284512459965`, $CellContext`\[CapitalDelta]GDBD -> \
-6303.7428776995985`, $CellContext`\[CapitalDelta]gDBDR -> 
     447.2500014904075, $CellContext`\[CapitalDelta]gRF -> \
-3052.496484517037, $CellContext`\[CapitalDelta]gGRE -> -8330.55218096124, \
$CellContext`\[CapitalDelta]GRB -> 
     535.3686285112475, $CellContext`\[CapitalDelta]GRC1 -> 
     887.7894537926853, $CellContext`\[CapitalDelta]GRC2 -> 
     1096.5792178914558`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.677509587059639*^9, 3.677513891355393*^9}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 StyleBox["     Section 10. ", "Subsection",
  FontFamily->"Nimbus Sans L",
  FontSize->26,
  FontColor->RGBColor[
   0.7803921568627451, 0.4196078431372549, 0.1568627450980392]],
 StyleBox["Load found parameters for subsequent calculation of simulated \
transcription activity and binding affinity.", "Subsection",
  FontFamily->"Nimbus Sans L",
  FontSize->26,
  FontColor->RGBColor[
   0.7803921568627451, 0.4235294117647059, 0.1607843137254902]]
}], "Subtitle",
 CellChangeTimes->{{3.6144262967159295`*^9, 3.6144263171390977`*^9}, {
  3.6775072092223587`*^9, 3.6775073125096073`*^9}, {3.6775073579080687`*^9, 
  3.6775074256491423`*^9}, {3.6775075031836977`*^9, 3.677507509086638*^9}, {
  3.677507552966942*^9, 3.6775075837698812`*^9}, {3.677509015406452*^9, 
  3.677509051851386*^9}, {3.677509097755335*^9, 3.677509103111477*^9}, {
  3.677509169501122*^9, 3.67750920514849*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{"\"\<dGDBD\>\"", "\[IndentingNewLine]", 
 RowBox[{"dGDBD", " ", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", 
 RowBox[{"\[CapitalDelta]GDBD", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", "\"\<dg-DBD-R\>\"", "\
\[IndentingNewLine]", 
 RowBox[{"dgDBDR", " ", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", 
 RowBox[{"\[CapitalDelta]gDBDR", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", "\"\<dg-R-F\>\"", "\
\[IndentingNewLine]", 
 RowBox[{"dgRF", " ", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", 
 RowBox[{"\[CapitalDelta]gRF", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", "\"\<dGR\>\"", "\
\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dGR", " ", "=", " ", 
   RowBox[{"\[CapitalDelta]GANTD", "-", "\[CapitalDelta]GF", "-", "dgRF"}]}], 
  " "}], "\[IndentingNewLine]", "\"\<dGRB\>\"", "\[IndentingNewLine]", 
 RowBox[{"dGRB", " ", "=", " ", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "6", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", 
 RowBox[{"\[CapitalDelta]GRB", "=", " ", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "6", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", "\"\<dGRC1\>\"", "\
\[IndentingNewLine]", 
 RowBox[{"dGRC1", " ", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "7", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", 
 RowBox[{"\[CapitalDelta]GRC1", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "7", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", "\"\<dGC2\>\"", "\
\[IndentingNewLine]", 
 RowBox[{"dGRC2", " ", "=", " ", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "8", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", 
 RowBox[{"\[CapitalDelta]GRC2", "=", " ", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "8", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", "\"\<dg-DBD-F\>\"", "\
\[IndentingNewLine]", 
 RowBox[{"dgDBDF", "=", 
  RowBox[{
  "\[CapitalDelta]GC3DBD", "-", "dGDBD", "-", 
   "\[CapitalDelta]GF"}]}], "\[IndentingNewLine]", "\"\<dGF\>\"", "\
\[IndentingNewLine]", 
 RowBox[{"dGF", " ", "=", " ", 
  RowBox[{
  "-", "7600"}]}], "\[IndentingNewLine]", "\"\<A\>\"", "\[IndentingNewLine]", 
 RowBox[{"a", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
    "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
   "\[LeftDoubleBracket]", "2", 
   "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", \
"\"\<\[CapitalDelta]gGRE\>\"", "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[CapitalDelta]gGRE", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
     "BestArry", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
     "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
    "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.617038333317227*^9, 3.6170383557746468`*^9}, {
   3.617038398060557*^9, 3.617038417518895*^9}, {3.6170394629764442`*^9, 
   3.6170394895543413`*^9}, {3.617040299520227*^9, 3.617040381314475*^9}, {
   3.617095800886845*^9, 3.6170958519319057`*^9}, {3.6170958828159857`*^9, 
   3.617095943929246*^9}, {3.617096662998947*^9, 3.617096690566856*^9}, {
   3.617096745277711*^9, 3.617096756769105*^9}, {3.6170979952617617`*^9, 
   3.617098073073883*^9}, {3.617099851114203*^9, 3.617099906793425*^9}, {
   3.617102546546156*^9, 3.617102616964862*^9}, {3.617103975817258*^9, 
   3.6171040393075247`*^9}, 3.6171040991560287`*^9, {3.6171051017601357`*^9, 
   3.617105163505679*^9}, {3.6171057764494343`*^9, 3.6171058317272367`*^9}, {
   3.617106735093*^9, 3.6171067878589277`*^9}, {3.617106852587697*^9, 
   3.617106917611964*^9}, {3.6171074295350723`*^9, 3.6171074812735367`*^9}, {
   3.617107955847849*^9, 3.617108007186499*^9}, {3.6171086996965647`*^9, 
   3.6171087564405413`*^9}, {3.617109473283718*^9, 3.6171095220791903`*^9}, {
   3.617109574979602*^9, 3.6171095999557047`*^9}, {3.6171130791810913`*^9, 
   3.6171131266830606`*^9}, {3.617119792438377*^9, 3.617119919273237*^9}, {
   3.61712013769381*^9, 3.617120182914584*^9}, {3.61712022691291*^9, 
   3.617120266897421*^9}, {3.617120464682828*^9, 3.6171204650357924`*^9}, {
   3.617121288153164*^9, 3.61712128915672*^9}, {3.61712367145966*^9, 
   3.617123704976153*^9}, {3.617376759792344*^9, 3.617376809842207*^9}, {
   3.6539999389339457`*^9, 3.65399997750659*^9}, {3.6540000184464073`*^9, 
   3.654000024604801*^9}, 3.654000062323515*^9, {3.654003395403494*^9, 
   3.654003412974062*^9}, {3.654003674285117*^9, 3.6540038121900263`*^9}, {
   3.666523198394611*^9, 3.666523221125873*^9}, {3.666954736124531*^9, 
   3.6669547376305237`*^9}, {3.6721309823082457`*^9, 3.67213098249818*^9}, 
   3.677507949911126*^9}],

Cell[BoxData["\<\"dGDBD\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.67751389744907*^9}],

Cell[BoxData[
 RowBox[{"-", "6616.214410906745`"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897461769*^9}],

Cell[BoxData[
 RowBox[{"-", "6616.214410906745`"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897462843*^9}],

Cell[BoxData["\<\"dg-DBD-R\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974637213`*^9}],

Cell[BoxData["1202.2495529470596`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897464736*^9}],

Cell[BoxData["1202.2495529470596`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974656963`*^9}],

Cell[BoxData["\<\"dg-R-F\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897466576*^9}],

Cell[BoxData[
 RowBox[{"-", "2478.6681485699037`"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974675417`*^9}],

Cell[BoxData[
 RowBox[{"-", "2478.6681485699037`"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974685593`*^9}],

Cell[BoxData["\<\"dGR\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974694567`*^9}],

Cell[BoxData[
 RowBox[{"-", "21.33185143009632`"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897470406*^9}],

Cell[BoxData["\<\"dGRB\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974714203`*^9}],

Cell[BoxData["257.5831040209306`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897472327*^9}],

Cell[BoxData["257.5831040209306`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897473225*^9}],

Cell[BoxData["\<\"dGRC1\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897474173*^9}],

Cell[BoxData["1044.947803680732`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974751787`*^9}],

Cell[BoxData["1044.947803680732`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974761047`*^9}],

Cell[BoxData["\<\"dGC2\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897477037*^9}],

Cell[BoxData["1269.04181472744`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974788847`*^9}],

Cell[BoxData["1269.04181472744`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974798326`*^9}],

Cell[BoxData["\<\"dg-DBD-F\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897480761*^9}],

Cell[BoxData["7516.214410906745`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897481763*^9}],

Cell[BoxData["\<\"dGF\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.6775138974827223`*^9}],

Cell[BoxData[
 RowBox[{"-", "7600"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897483695*^9}],

Cell[BoxData["\<\"A\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.67751389748464*^9}],

Cell[BoxData["274.04609620269036`"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897485738*^9}],

Cell[BoxData["\<\"\[CapitalDelta]gGRE\"\>"], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.67751389748673*^9}],

Cell[BoxData[
 RowBox[{"-", "8386.143815802465`"}]], "Output",
 CellChangeTimes->{3.677512905510901*^9, 3.677513897487855*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 11.  Calculate partition function for the \
simulated C3-DBD construct.",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4196078431372549, 
   0.1568627450980392]]], "Subsubsection",
 CellChangeTimes->{{3.6143623445250807`*^9, 3.6143623512954674`*^9}, {
  3.677507724881261*^9, 3.677507781555975*^9}, {3.677509317137755*^9, 
  3.6775093241892557`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
     RowBox[{"Let", "'"}], "s", " ", "start", " ", "calculating", " ", 
     "statistical", " ", "weights", " ", "for", " ", "the", " ", "C3"}], "-", 
    RowBox[{"DBD", " ", "Ensemble", " ", "using", " ", "a", " ", "2"}], "-", 
    RowBox[{"domain", " ", "EAM", " ", "for", " ", "each", " ", 
     RowBox[{"domain", "/", "GRE"}], " ", "stabilization"}]}], "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{
    RowBox[{"cSWdbdC3", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "dGDBD"}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWFC3", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "dGF"}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdFC3", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "dgDBDF"}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cZgre", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "\[CapitalDelta]gGRE", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "statistical", " ", "weights", " ", "of", 
     " ", "each", " ", "state"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"cK1C3", "=", 
     RowBox[{"cSWFC3", "*", "cSWdbdFC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK2C3", "=", 
     RowBox[{"cSWdbdC3", "*", "cSWdbdFC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cKUC3", "=", 
     RowBox[{"cSWdbdC3", "*", "cSWFC3", "*", "cSWdbdFC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPartFunC3", "=", 
     RowBox[{"1", "+", "cK1C3", "+", "cK2C3", "+", "cKUC3"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
    "now", " ", "calculate", " ", "probabilities", " ", "of", " ", 
     "interest"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"cPrdbdFC3", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK1C3"}], ")"}], "/", "cPartFunC3"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFC3", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK2C3"}], ")"}], "/", "cPartFunC3"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "recalculate", " ", "the", " ", "partition", " ", "in", " ", 
     "the", " ", "presence", " ", "of", " ", "the", " ", "GRE"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"cPartFunC3g", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "cK1C3"}], ")"}]}], "+", "cK2C3", "+", "cKUC3"}]}], 
    ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "Now", " ", "calcualte", " ", "the", " ", "final", " ", "probabilities", 
      " ", "of", " ", "interest"}], ";", " ", 
     RowBox[{
     "probability", " ", "of", " ", "F", " ", "folded", " ", "in", " ", "C3", 
      " ", "with", " ", "GRE", " ", "and", " ", "the", " ", "difference", " ",
       "between", " ", "it", " ", "and", " ", "without", " ", "GRE"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFC3gre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"cZgre", "+", "cK2C3"}], ")"}], "/", "cPartFunC3g"}]}], ";"}], 
   "\n", 
   RowBox[{
    RowBox[{"cdPrFFC3", "=", 
     RowBox[{"cPrFFC3gre", "-", "cPrFFC3"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{
  3.61436233367646*^9, 3.6143627040756454`*^9, {3.614426470365862*^9, 
   3.614426478310316*^9}, {3.6144265857904634`*^9, 3.614426658393616*^9}, {
   3.6536705201313477`*^9, 3.6536705622532377`*^9}, {3.6540027440807247`*^9, 
   3.654002756241379*^9}, {3.654002791200934*^9, 3.6540028240337887`*^9}, 
   3.6540030301147213`*^9, 3.6775077937140636`*^9, {3.677507941461645*^9, 
   3.677507941618506*^9}, 3.6775092237576*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 12.  Calculate partition function for the \
simulated A-NTD-DBD construct. ",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4196078431372549, 
   0.1568627450980392]]], "Subsubsection",
 CellChangeTimes->{{3.614362357037796*^9, 3.614362368108429*^9}, 
   3.6143732493458004`*^9, {3.677507807051394*^9, 3.6775078277520523`*^9}, {
   3.677507883629078*^9, 3.677507884980187*^9}, {3.6775092906743317`*^9, 
   3.677509299408379*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "A", 
    " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"cSWdbdA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGR", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWFA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdRA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgDBDR", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRFA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdFA", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "A", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cK1A", "=", 
     RowBox[{"cSWdbdA", "*", "cSWdbdRA", "*", "cSWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK2A", "=", 
     RowBox[{"cSWRA", "*", "cSWdbdRA", "*", "cSWRFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK3A", "=", 
     RowBox[{"cSWFA", "*", "cSWRFA", "*", "cSWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK4A", "=", 
     RowBox[{
     "cSWRA", "*", "cSWFA", "*", "cSWdbdRA", "*", "cSWRFA", "*", 
      "cSWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK5A", "=", 
     RowBox[{
     "cSWdbdA", "*", "cSWFA", "*", "cSWdbdRA", "*", "cSWRFA", "*", 
      "cSWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK6A", "=", 
     RowBox[{
     "cSWdbdA", "*", "cSWRA", "*", "cSWdbdRA", "*", "cSWRFA", "*", 
      "cSWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cKUA", "=", 
     RowBox[{
     "cSWdbdA", "*", "cSWRA", "*", "cSWFA", "*", "cSWdbdRA", "*", "cSWRFA", 
      "*", "cSWdbdFA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPartFunA", "=", 
     RowBox[{
     "1", "+", "cK1A", "+", "cK2A", "+", "cK3A", "+", "cK4A", "+", "cK5A", 
      "+", "cK6A", "+", "cKUA"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Based", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "A", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrdbdFA", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK2A", "+", "cK3A", "+", "cK4A"}], ")"}], "/", 
      "cPartFunA"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFA", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK1A", "+", "cK2A", "+", "cK6A"}], ")"}], "/", 
      "cPartFunA"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{"Now", " ", "recalculate", " ", "the", " ", 
     RowBox[{"cSW", "'"}], "s", " ", "in", " ", "the", " ", "presence", " ", 
     "of", " ", "the", " ", "GRE", " ", "for", " ", "the", " ", "A", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPartFunAg", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "cK2A", "+", "cK3A", "+", "cK4A"}], ")"}]}], "+", 
      "cK1A", "+", "cK5A", "+", "cK6A", "+", "cKUA"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "A", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFAgre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cZgre", "+", "cK1A", "+", "cK2A", "+", 
        RowBox[{"cZgre", "*", "cK2A"}], "+", "cK6A"}], ")"}], "/", 
      "cPartFunAg"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cdPrFFA", "=", 
     RowBox[{"cPrFFAgre", "-", "cPrFFA"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.6143623752998405`*^9, 3.6143624918105044`*^9}, {
   3.6143625305857224`*^9, 3.6143625603304234`*^9}, {3.6144264996815386`*^9, 
   3.614426507135965*^9}, {3.614426666832099*^9, 3.614426692660576*^9}, {
   3.614426779392537*^9, 3.61442679291331*^9}, 3.653672679485874*^9, {
   3.6540028748299303`*^9, 3.6540028950263567`*^9}, {3.654003012985104*^9, 
   3.654003040617571*^9}, {3.6540031053453093`*^9, 3.6540031155098877`*^9}, {
   3.677507935532302*^9, 3.677507936036626*^9}, 3.6775089675094223`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 13.  Calculate partition function for the \
simulated B isoform.", "Subsection",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4235294117647059, 
   0.1607843137254902]]], "Subsubsection",
 CellChangeTimes->{{3.6143732253814297`*^9, 3.6143732430074377`*^9}, {
  3.6775078696998034`*^9, 3.677507909584218*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "B", 
    " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"cSWdbdB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGRB", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWFB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdRB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"dgDBDR", "/", "3.4"}], "*", "2.0"}], ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRFB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdFB", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "B", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cK1B", "=", 
     RowBox[{"cSWdbdB", "*", "cSWdbdRB", "*", "cSWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK2B", "=", 
     RowBox[{"cSWRB", "*", "cSWdbdRB", "*", "cSWRFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK3B", "=", 
     RowBox[{"cSWFB", "*", "cSWRFB", "*", "cSWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK4B", "=", 
     RowBox[{
     "cSWRB", "*", "cSWFB", "*", "cSWdbdRB", "*", "cSWRFB", "*", 
      "cSWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK5B", "=", 
     RowBox[{
     "cSWdbdB", "*", "cSWFB", "*", "cSWdbdRB", "*", "cSWRFB", "*", 
      "cSWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK6B", "=", 
     RowBox[{
     "cSWdbdB", "*", "cSWRB", "*", "cSWdbdRB", "*", "cSWRFB", "*", 
      "cSWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cKUB", "=", 
     RowBox[{
     "cSWdbdB", "*", "cSWRB", "*", "cSWFB", "*", "cSWdbdRB", "*", "cSWRFB", 
      "*", "cSWdbdFB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPartFunB", "=", 
     RowBox[{
     "1", "+", "cK1B", "+", "cK2B", "+", "cK3B", "+", "cK4B", "+", "cK5B", 
      "+", "cK6B", "+", "cKUB"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Based", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "B", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrdbdFB", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK2B", "+", "cK3B", "+", "cK4B"}], ")"}], "/", 
      "cPartFunB"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFB", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK1B", "+", "cK2B", "+", "cK6B"}], ")"}], "/", 
      "cPartFunB"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{"Now", " ", "recalculate", " ", "the", " ", 
     RowBox[{"cSW", "'"}], "s", " ", "in", " ", "the", " ", "presence", " ", 
     "of", " ", "the", " ", "GRE", " ", "for", " ", "the", " ", "B", " ", 
     "isoform"}], "*)"}], "\n", "\n", 
   RowBox[{
    RowBox[{"cPartFunBg", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "cK2B", "+", "cK3B", "+", "cK4B"}], ")"}]}], "+", 
      "cK1B", "+", "cK5B", "+", "cK6B", "+", "cKUB"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "B", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFBgre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cZgre", "+", "cK1B", "+", "cK2B", "+", 
        RowBox[{"cK2B", "*", "cZgre"}], "+", "cK6B"}], ")"}], "/", 
      "cPartFunBg"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cdPrFFB", "=", 
     RowBox[{"cPrFFBgre", "-", "cPrFFB"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{
  3.6143768335024233`*^9, {3.614377161613596*^9, 3.6143771647804017`*^9}, {
   3.614377240175334*^9, 3.614377245307743*^9}, {3.614425359670334*^9, 
   3.6144253605163817`*^9}, {3.614425496637168*^9, 3.6144255224446435`*^9}, {
   3.614426542157968*^9, 3.614426547580278*^9}, {3.6144268315425196`*^9, 
   3.6144268514476585`*^9}, {3.6171020482255163`*^9, 3.617102048513928*^9}, {
   3.6173768822253466`*^9, 3.617376883261406*^9}, 3.653672687869491*^9, {
   3.654002914220821*^9, 3.654002960185308*^9}, 3.654003009833467*^9, {
   3.6540030480092907`*^9, 3.654003050848817*^9}, {3.6540030818072777`*^9, 
   3.654003099669978*^9}, {3.677507969191327*^9, 3.677507969348482*^9}, 
   3.6775089728920727`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 14.  Calculate partition function for the \
simulated C1 isoform.", "Subsection",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4235294117647059, 
   0.1607843137254902]]], "Subsubsection",
 CellChangeTimes->{{3.6143734897775526`*^9, 3.614373501222207*^9}, {
  3.6775079721927347`*^9, 3.677507998032847*^9}, {3.677508045557969*^9, 
  3.6775080457916718`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "C1",
     " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"cSWdbdC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGRC1", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWFC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdRC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "0", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRFC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdFC1", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "C1", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cK1C1", "=", 
     RowBox[{"cSWdbdC1", "*", "cSWdbdRC1", "*", "cSWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK2C1", "=", 
     RowBox[{"cSWRC1", "*", "cSWdbdRC1", "*", "cSWRFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK3C1", "=", 
     RowBox[{"cSWFC1", "*", "cSWRFC1", "*", "cSWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK4C1", "=", 
     RowBox[{
     "cSWRC1", "*", "cSWFC1", "*", "cSWdbdRC1", "*", "cSWRFC1", "*", 
      "cSWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK5C1", "=", 
     RowBox[{
     "cSWdbdC1", "*", "cSWFC1", "*", "cSWdbdRC1", "*", "cSWRFC1", "*", 
      "cSWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK6C1", "=", 
     RowBox[{
     "cSWdbdC1", "*", "cSWRC1", "*", "cSWdbdRC1", "*", "cSWRFC1", "*", 
      "cSWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cKUC1", "=", 
     RowBox[{
     "cSWdbdC1", "*", "cSWRC1", "*", "cSWFC1", "*", "cSWdbdRC1", "*", 
      "cSWRFC1", "*", "cSWdbdFC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPartFunC1", "=", 
     RowBox[{
     "1", "+", "cK1C1", "+", "cK2C1", "+", "cK3C1", "+", "cK4C1", "+", 
      "cK5C1", "+", "cK6C1", "+", "cKUC1"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"C1ased", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "C1", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrdbdFC1", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK2C1", "+", "cK3C1", "+", "cK4C1"}], ")"}], "/", 
      "cPartFunC1"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFC1", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK1C1", "+", "cK2C1", "+", "cK6C1"}], ")"}], "/", 
      "cPartFunC1"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{"Now", " ", "recalculate", " ", "the", " ", 
     RowBox[{"cSW", "'"}], "s", " ", "in", " ", "the", " ", "presence", " ", 
     "of", " ", "the", " ", "GRE", " ", "for", " ", "the", " ", "C1", " ", 
     "isoform"}], "*)"}], "\n", "\n", 
   RowBox[{
    RowBox[{"cPartFunC1g", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "cK2C1", "+", "cK3C1", "+", "cK4C1"}], ")"}]}], "+",
       "cK1C1", "+", "cK5C1", "+", "cK6C1", "+", "cKUC1"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "C1", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFC1gre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cZgre", "+", "cK1C1", "+", "cK2C1", "+", 
        RowBox[{"cZgre", "*", "cK2C1"}], "+", "cK6C1"}], ")"}], "/", 
      "cPartFunC1g"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cdPrFFC1", "=", 
     RowBox[{"cPrFFC1gre", "-", "cPrFFC1"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{
  3.614373688471917*^9, {3.614376816070426*^9, 3.614376829347185*^9}, {
   3.6144255342993217`*^9, 3.614425539199602*^9}, {3.614426551231487*^9, 
   3.614426563633196*^9}, 3.614426905938775*^9, {3.6173768878096666`*^9, 
   3.617376888976733*^9}, 3.65367269502151*^9, {3.65400292095553*^9, 
   3.6540030067932367`*^9}, {3.65400313994459*^9, 3.65400316988892*^9}, {
   3.677508025314917*^9, 3.677508025469838*^9}, 3.6775089812516613`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 15.  Calculate partition function for the \
simulated C2 isoform.", "Subsection",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4235294117647059, 
   0.1607843137254902]]], "Subsubsection",
 CellChangeTimes->{{3.61437369850049*^9, 3.614373705567895*^9}, {
  3.677508032178553*^9, 3.677508070638073*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Calculate", " ", "the", " ", "statistical", " ", "weight", " ", "of", " ",
     "each", " ", 
    RowBox[{"domain", "/", "interaction"}], " ", "for", " ", "the", " ", "C2",
     " ", "isoform"}], "*)"}], "\n", 
  RowBox[{
   RowBox[{
    RowBox[{"cSWdbdC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGDBD", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGRC2", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWFC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dGF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdRC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "0", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWRFC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgRF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cSWdbdFC2", "=", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", "dgDBDF", ")"}]}], "/", 
       RowBox[{"(", 
        RowBox[{"R", "*", "T"}], ")"}]}], "]"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "statistical", " ", "weight", 
     " ", "of", " ", "each", " ", "state", " ", "for", " ", "the", " ", "C2", 
     " ", "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cK1C2", "=", 
     RowBox[{"cSWdbdC2", "*", "cSWdbdRC2", "*", "cSWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK2C2", "=", 
     RowBox[{"cSWRC2", "*", "cSWdbdRC2", "*", "cSWRFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK3C2", "=", 
     RowBox[{"cSWFC2", "*", "cSWRFC2", "*", "cSWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK4C2", "=", 
     RowBox[{
     "cSWRC2", "*", "cSWFC2", "*", "cSWdbdRC2", "*", "cSWRFC2", "*", 
      "cSWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK5C2", "=", 
     RowBox[{
     "cSWdbdC2", "*", "cSWFC2", "*", "cSWdbdRC2", "*", "cSWRFC2", "*", 
      "cSWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cK6C2", "=", 
     RowBox[{
     "cSWdbdC2", "*", "cSWRC2", "*", "cSWdbdRC2", "*", "cSWRFC2", "*", 
      "cSWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cKUC2", "=", 
     RowBox[{
     "cSWdbdC2", "*", "cSWRC2", "*", "cSWFC2", "*", "cSWdbdRC2", "*", 
      "cSWRFC2", "*", "cSWdbdFC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPartFunC2", "=", 
     RowBox[{
     "1", "+", "cK1C2", "+", "cK2C2", "+", "cK3C2", "+", "cK4C2", "+", 
      "cK5C2", "+", "cK6C2", "+", "cKUC2"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"C2ased", " ", "on", " ", "these"}], ",", 
     RowBox[{
     "calculate", " ", "the", " ", "probabilities", " ", "of", " ", 
      "interest", " ", "for", " ", "the", " ", "C2", " ", "isoform"}]}], 
    "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrdbdFC2", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK2C2", "+", "cK3C2", "+", "cK4C2"}], ")"}], "/", 
      "cPartFunC2"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFC2", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cK1C2", "+", "cK2C2", "+", "cK6C2"}], ")"}], "/", 
      "cPartFunC2"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{"Now", " ", "recalculate", " ", "the", " ", 
     RowBox[{"cSW", "'"}], "s", " ", "in", " ", "the", " ", "presence", " ", 
     "of", " ", "the", " ", "GRE", " ", "for", " ", "the", " ", "C2", " ", 
     "isoform"}], "*)"}], "\n", "\n", 
   RowBox[{
    RowBox[{"cPartFunC2g", "=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
       RowBox[{"(", 
        RowBox[{"1", "+", "cK2C2", "+", "cK3C2", "+", "cK4C2"}], ")"}]}], "+",
       "cK1C2", "+", "cK5C2", "+", "cK6C2", "+", "cKUC2"}]}], ";"}], "\n", 
   RowBox[{"(*", 
    RowBox[{
    "Now", " ", "calculate", " ", "the", " ", "final", " ", "probability", 
     " ", "of", " ", "interest", " ", "for", " ", "the", " ", "C2", " ", 
     "isoform"}], "*)"}], "\n", 
   RowBox[{
    RowBox[{"cPrFFC2gre", "=", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "+", "cZgre", "+", "cK1C2", "+", 
        RowBox[{"cZgre", "*", "cK2C2"}], "+", "cK2C2", "+", "cK6C2"}], ")"}], 
      "/", "cPartFunC2g"}]}], ";"}], "\n", 
   RowBox[{
    RowBox[{"cdPrFFC2", "=", 
     RowBox[{"cPrFFC2gre", "-", "cPrFFC2"}]}], ";"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.614376838766724*^9, 3.6143768403458147`*^9}, {
   3.614425543942873*^9, 3.614425548278121*^9}, {3.6144265678054347`*^9, 
   3.614426572143683*^9}, 3.6144269268419704`*^9, {3.617376892054909*^9, 
   3.617376893341983*^9}, 3.653672699389535*^9, {3.653673891023274*^9, 
   3.653673914586957*^9}, {3.654002927828848*^9, 3.6540029342375507`*^9}, {
   3.654002986834968*^9, 3.6540030041236677`*^9}, {3.654003182626338*^9, 
   3.654003200474069*^9}, 3.667050693746264*^9, 3.667050854619561*^9, {
   3.677508101897188*^9, 3.67750811307742*^9}, 3.677508990405925*^9, {
   3.677513937407638*^9, 3.677513940901867*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Section 16.  Plot the simulated values, from global \
optimization of the EAM, versus the experimental data.", "Subsection",
 FontFamily->"Nimbus Sans L",
 FontSize->26,
 FontColor->RGBColor[
  0.7803921568627451, 0.4235294117647059, 
   0.1607843137254902]]], "Subsubsection",
 CellChangeTimes->{{3.6144269382026205`*^9, 3.614426955667619*^9}, 
   3.617039561973043*^9, {3.677508120953579*^9, 3.677508174385108*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"expdata", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"27.6", ",", "Agre"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"35.3", ",", "Bgre"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"31.4", ",", "C1gre"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"24.0", ",", "C2gre"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"124.0", ",", "C3gre"}], "}"}]}], "}"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"modeldata", "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"a", "*", "cdPrFFA"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "cK2A", "+", "cK3A", "+", "cK4A"}], ")"}]}], 
          "cPartFunAg"], ")"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"a", "*", "cdPrFFB"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "cK2B", "+", "cK3B", "+", "cK4B"}], ")"}]}], 
          "cPartFunBg"], ")"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"a", "*", "cdPrFFC1"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "cK2C1", "+", "cK3C1", "+", "cK4C1"}], ")"}]}], 
          "cPartFunC1g"], ")"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"a", "*", "cdPrFFC2"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "cK2C2", "+", "cK3C2", "+", "cK4C2"}], ")"}]}], 
          "cPartFunC2g"], ")"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"a", "*", "cdPrFFC3"}], ",", 
       RowBox[{"\[CapitalDelta]gGRE", "*", 
        RowBox[{"(", 
         FractionBox[
          RowBox[{
           RowBox[{"(", 
            RowBox[{"1", "+", "cZgre"}], ")"}], "*", 
           RowBox[{"(", 
            RowBox[{"1", "+", "cK1C3"}], ")"}]}], "cPartFunC3g"], ")"}]}]}], 
      "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}], "+", 
   RowBox[{"Sqrt", "[", 
    SuperscriptBox[
     RowBox[{"(", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{
         "expdata", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", 
        RowBox[{
         RowBox[{
         "modeldata", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
         "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
       RowBox[{
        RowBox[{
        "expdata", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], 
        "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]], ")"}], "2"], 
    "]"}]}], 
  RowBox[{"(*", "RMSD", "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetOptions", "[", 
   RowBox[{"ListPlot", ",", 
    RowBox[{"BaseStyle", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"FontFamily", "\[Rule]", "\"\<Arial\>\""}], ",", 
       RowBox[{"FontSize", "\[Rule]", "18"}]}], "}"}]}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"ListPlot", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"expdata", ",", "modeldata"}], "}"}], ",", 
   RowBox[{"PlotRange", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"-", "0.1"}], ",", "130"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"-", "8400"}], ",", 
        RowBox[{"-", "7900"}]}], "}"}]}], "}"}]}], ",", 
   RowBox[{"PlotStyle", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"Blue", ",", "Red"}], "}"}]}], ",", 
   RowBox[{"PlotMarkers", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"Automatic", ",", "Medium"}], "}"}]}], ",", 
   RowBox[{"Frame", "\[Rule]", "True"}], ",", 
   RowBox[{"FrameLabel", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{
     "\"\<Transcription Activity (Fold Induction)\>\"", ",", 
      "\"\<Binding Affinity (cal/mol)\>\""}], "}"}]}], ",", 
   RowBox[{
   "PlotLabel", "\[Rule]", 
    "\"\<Simulation (Red) vs. Experiment (Blue)\>\""}]}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Print", "[", 
   RowBox[{"\"\<Experimental Data: \>\"", ",", "expdata"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Print", "[", 
    RowBox[{"\"\<Simulated Data: \>\"", ",", "modeldata"}], "]"}], ";"}], " ",
   "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->CompressedData["
1:eJwdzWkog3EAx/HliqWwIbk9e4WlsDS12CNkBzJHTa4smqiVkJLjxQgRUTRK
GiWLOdoLuUpaUbTaC60w5WpHks2Lbbby/+3Ft8/Lb1anStYVwmAw0khQm/9i
93w5aOFBsxdyQlWmX5eD7s4Y/YSUv58X53bQ7RqqCNrYG3vw7pt7A1f5lmQW
MeJBS8EdSlAKWa0cEbzdkNVDtTxCDn0eUwvsqVjpgad9v+Vs4n5bRjWcPH7u
jCe6os6U0HY4TyUSK7d+ODBPzZMMFjvpxxZBIzQbJR3wyb2nhMwmvQG+sqcv
4Fj02hWc2k2/hsfLNUqN1EnfitKGYCo/vSSmzkk3SAwKqFfo/fDkjA7AGeaf
K5c4u873wvKU3gCcUAnCuMSRA3EkHLjcjIWZ2sG5JmJJZNgCFN4zhdky8rEm
lMEcvy6/kXhdZSqESeExteJuJz282BbUYFlXQqmZGoc+n1UNz1lGDZR9vB1B
ZoE9qG6pVislvsvZ2/AfF7rk8Q==
  "]],

Cell[BoxData["0.01866516648488001`"], "Output",
 CellChangeTimes->{3.67751293411826*^9, 3.677512996266507*^9, 
  3.677513952246058*^9}],

Cell[BoxData[
 GraphicsBox[{{}, {
    {RGBColor[0, 0, 1], AbsolutePointSize[6], AbsoluteThickness[1.6], 
     StyleBox[GeometricTransformationBox[InsetBox[
        StyleBox["\<\"\[FilledCircle]\"\>",
         StripOnInput->False,
         FontSize->Medium], {0., 0.}], {{{27.6, -8340.076763100624}}, {{
       35.3, -8209.21131540906}}, {{31.4, -8078.345867717498}}, {{
       24., -8000.0346399281725`}}, {{124., -8158.182357875023}}}],
      FontSize->18]}, 
    {RGBColor[1, 0, 0], AbsolutePointSize[6], AbsoluteThickness[1.6], 
     StyleBox[GeometricTransformationBox[InsetBox[
        StyleBox["\<\"\[FilledSquare]\"\>",
         StripOnInput->False,
         FontSize->Medium], {0., 0.}], {{{
       27.599999998051256`, -8301.779988200093}}, {{
       35.299998701325556`, -8241.598615522105}}, {{
       31.400000331084424`, -8039.975075526802}}, {{
       24.000000956502262`, -8029.417736134809}}, {{
       123.99988107765678`, -8172.0861860710065`}}}],
      FontSize->18]}, {}}, {}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->{True, True},
  AxesLabel->{None, None},
  AxesOrigin->{0, -7902.5},
  BaseStyle->{FontFamily -> "Arial", FontSize -> 18},
  DisplayFunction->Identity,
  Frame->{{True, True}, {True, True}},
  FrameLabel->{{
     FormBox["\"Binding Affinity (cal/mol)\"", TraditionalForm], None}, {
     FormBox["\"Transcription Activity (Fold Induction)\"", TraditionalForm], 
     None}},
  FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
  GridLines->{None, None},
  GridLinesStyle->Directive[
    GrayLevel[0.5, 0.4]],
  ImageSize->{508., Automatic},
  Method->{},
  PlotLabel->FormBox[
   "\"Simulation (Red) vs. Experiment (Blue)\"", TraditionalForm],
  PlotRange->{{-0.1, 130}, {-8400, -7900}},
  PlotRangeClipping->True,
  PlotRangePadding->{{0, 0}, {0, 0}},
  Ticks->{Automatic, Automatic}]], "Output",
 CellChangeTimes->{3.67751293411826*^9, 3.677512996266507*^9, 
  3.6775139524406967`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Experimental Data: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"27.6`", ",", 
       RowBox[{"-", "8340.076763100624`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"35.3`", ",", 
       RowBox[{"-", "8209.21131540906`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"31.4`", ",", 
       RowBox[{"-", "8078.345867717498`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"24.`", ",", 
       RowBox[{"-", "8000.0346399281725`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"124.`", ",", 
       RowBox[{"-", "8158.182357875023`"}]}], "}"}]}], "}"}]}],
  SequenceForm[
  "Experimental Data: ", {{27.6, -8340.076763100624}, {
   35.3, -8209.21131540906}, {31.4, -8078.345867717498}, {
   24., -8000.0346399281725`}, {124., -8158.182357875023}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.6775129345947037`*^9, 3.6775129963607483`*^9, 
  3.677513952501602*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Simulated Data: \"\>", "\[InvisibleSpace]", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"27.599999998051256`", ",", 
       RowBox[{"-", "8301.779988200093`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"35.299998701325556`", ",", 
       RowBox[{"-", "8241.598615522105`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"31.400000331084424`", ",", 
       RowBox[{"-", "8039.975075526802`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"24.000000956502262`", ",", 
       RowBox[{"-", "8029.417736134809`"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"123.99988107765678`", ",", 
       RowBox[{"-", "8172.0861860710065`"}]}], "}"}]}], "}"}]}],
  SequenceForm[
  "Simulated Data: ", {{27.599999998051256`, -8301.779988200093}, {
   35.299998701325556`, -8241.598615522105}, {
   31.400000331084424`, -8039.975075526802}, {
   24.000000956502262`, -8029.417736134809}, {
   123.99988107765678`, -8172.0861860710065`}}],
  Editable->False]], "Print",
 CellChangeTimes->{3.6775129345947037`*^9, 3.6775129963607483`*^9, 
  3.6775139525032377`*^9}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{1350, 730},
WindowMargins->{{318, Automatic}, {Automatic, 167}},
PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}},
FrontEndVersion->"10.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (June 27, \
2014)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 3920, 69, 644, "Subsection"],
Cell[4502, 93, 1363, 41, 47, "Input"],
Cell[5868, 136, 3511, 90, 216, "Input"],
Cell[CellGroupData[{
Cell[9404, 230, 463, 9, 44, "Subsubsection"],
Cell[9870, 241, 4233, 116, 403, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[14140, 362, 441, 9, 44, "Subsubsection"],
Cell[14584, 373, 5858, 167, 592, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[20479, 545, 375, 8, 46, "Subsubsection"],
Cell[20857, 555, 5902, 169, 649, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[26796, 729, 362, 8, 46, "Subsubsection"],
Cell[27161, 739, 6002, 168, 649, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[33200, 912, 361, 8, 46, "Subsubsection"],
Cell[33564, 922, 6005, 168, 649, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[39606, 1095, 391, 8, 46, "Subsubsection"],
Cell[40000, 1105, 1799, 49, 146, "Input"],
Cell[41802, 1156, 692, 14, 89, "Text"]
}, Open  ]],
Cell[CellGroupData[{
Cell[42531, 1175, 660, 12, 46, "Subsubsection"],
Cell[CellGroupData[{
Cell[43216, 1191, 4129, 106, 375, "Input"],
Cell[47348, 1299, 415, 8, 23, "Print"]
}, Open  ]],
Cell[47778, 1310, 9553, 143, 93, "Input"],
Cell[CellGroupData[{
Cell[57356, 1457, 21419, 454, 588, "Input"],
Cell[CellGroupData[{
Cell[78800, 1915, 91, 1, 23, "Print"],
Cell[78894, 1918, 1524, 32, 23, "Print"],
Cell[80421, 1952, 91, 1, 23, "Print"],
Cell[80515, 1955, 93, 1, 23, "Print"],
Cell[80611, 1958, 1510, 31, 23, "Print"],
Cell[82124, 1991, 91, 1, 23, "Print"],
Cell[82218, 1994, 90, 1, 23, "Print"],
Cell[82311, 1997, 93, 1, 23, "Print"],
Cell[82407, 2000, 1517, 32, 23, "Print"],
Cell[83927, 2034, 91, 1, 23, "Print"],
Cell[84021, 2037, 90, 1, 23, "Print"],
Cell[84114, 2040, 90, 1, 23, "Print"],
Cell[84207, 2043, 92, 1, 23, "Print"],
Cell[84302, 2046, 92, 1, 23, "Print"],
Cell[84397, 2049, 91, 1, 23, "Print"],
Cell[84491, 2052, 94, 1, 23, "Print"],
Cell[84588, 2055, 1512, 31, 23, "Print"],
Cell[86103, 2088, 92, 1, 23, "Print"],
Cell[86198, 2091, 94, 1, 23, "Print"],
Cell[86295, 2094, 92, 1, 23, "Print"],
Cell[86390, 2097, 1524, 32, 23, "Print"],
Cell[87917, 2131, 94, 1, 23, "Print"],
Cell[88014, 2134, 92, 1, 23, "Print"],
Cell[88109, 2137, 91, 1, 23, "Print"],
Cell[88203, 2140, 92, 1, 23, "Print"],
Cell[88298, 2143, 92, 1, 23, "Print"],
Cell[88393, 2146, 92, 1, 23, "Print"],
Cell[88488, 2149, 92, 1, 23, "Print"],
Cell[88583, 2152, 92, 1, 23, "Print"],
Cell[88678, 2155, 92, 1, 23, "Print"],
Cell[88773, 2158, 92, 1, 23, "Print"],
Cell[88868, 2161, 92, 1, 23, "Print"],
Cell[88963, 2164, 94, 1, 23, "Print"],
Cell[89060, 2167, 92, 1, 23, "Print"],
Cell[89155, 2170, 92, 1, 23, "Print"],
Cell[89250, 2173, 92, 1, 23, "Print"],
Cell[89345, 2176, 94, 1, 23, "Print"],
Cell[89442, 2179, 92, 1, 23, "Print"],
Cell[89537, 2182, 92, 1, 23, "Print"],
Cell[89632, 2185, 92, 1, 23, "Print"],
Cell[89727, 2188, 1517, 32, 23, "Print"],
Cell[91247, 2222, 94, 1, 23, "Print"],
Cell[91344, 2225, 94, 1, 23, "Print"],
Cell[91441, 2228, 92, 1, 23, "Print"],
Cell[91536, 2231, 91, 1, 23, "Print"],
Cell[91630, 2234, 92, 1, 23, "Print"],
Cell[91725, 2237, 92, 1, 23, "Print"],
Cell[91820, 2240, 92, 1, 23, "Print"],
Cell[91915, 2243, 92, 1, 23, "Print"],
Cell[92010, 2246, 92, 1, 23, "Print"],
Cell[92105, 2249, 92, 1, 23, "Print"],
Cell[92200, 2252, 94, 1, 23, "Print"],
Cell[92297, 2255, 92, 1, 23, "Print"],
Cell[92392, 2258, 92, 1, 23, "Print"],
Cell[92487, 2261, 92, 1, 23, "Print"],
Cell[92582, 2264, 92, 1, 23, "Print"],
Cell[92677, 2267, 1568, 32, 23, "Print"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[94318, 2307, 899, 18, 56, "Subtitle"],
Cell[CellGroupData[{
Cell[95242, 2329, 6897, 158, 671, "Input"],
Cell[102142, 2489, 103, 1, 32, "Output"],
Cell[102248, 2492, 126, 2, 32, "Output"],
Cell[102377, 2496, 126, 2, 32, "Output"],
Cell[102506, 2500, 109, 1, 32, "Output"],
Cell[102618, 2503, 110, 1, 32, "Output"],
Cell[102731, 2506, 112, 1, 32, "Output"],
Cell[102846, 2509, 105, 1, 32, "Output"],
Cell[102954, 2512, 129, 2, 32, "Output"],
Cell[103086, 2516, 129, 2, 32, "Output"],
Cell[103218, 2520, 104, 1, 32, "Output"],
Cell[103325, 2523, 126, 2, 32, "Output"],
Cell[103454, 2527, 105, 1, 32, "Output"],
Cell[103562, 2530, 109, 1, 32, "Output"],
Cell[103674, 2533, 109, 1, 32, "Output"],
Cell[103786, 2536, 104, 1, 32, "Output"],
Cell[103893, 2539, 111, 1, 32, "Output"],
Cell[104007, 2542, 111, 1, 32, "Output"],
Cell[104121, 2545, 103, 1, 32, "Output"],
Cell[104227, 2548, 110, 1, 32, "Output"],
Cell[104340, 2551, 110, 1, 32, "Output"],
Cell[104453, 2554, 107, 1, 32, "Output"],
Cell[104563, 2557, 109, 1, 32, "Output"],
Cell[104675, 2560, 104, 1, 32, "Output"],
Cell[104782, 2563, 112, 2, 32, "Output"],
Cell[104897, 2567, 99, 1, 32, "Output"],
Cell[104999, 2570, 110, 1, 32, "Output"],
Cell[105112, 2573, 117, 1, 32, "Output"],
Cell[105232, 2576, 126, 2, 32, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[105395, 2583, 428, 9, 46, "Subsubsection"],
Cell[105826, 2594, 4122, 113, 451, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[109985, 2712, 506, 10, 46, "Subsubsection"],
Cell[110494, 2724, 5399, 151, 583, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[115930, 2880, 386, 8, 46, "Subsubsection"],
Cell[116319, 2890, 5671, 157, 605, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[122027, 3052, 436, 9, 46, "Subsubsection"],
Cell[122466, 3063, 5422, 151, 605, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[127925, 3219, 380, 8, 46, "Subsubsection"],
Cell[128308, 3229, 5596, 153, 662, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[133941, 3387, 441, 8, 46, "Subsubsection"],
Cell[CellGroupData[{
Cell[134407, 3399, 11609, 322, 603, "Input"],
Cell[146019, 3723, 135, 2, 32, "Output"],
Cell[146157, 3727, 1965, 45, 396, "Output"],
Cell[CellGroupData[{
Cell[148147, 3776, 980, 26, 23, "Print"],
Cell[149130, 3804, 1133, 28, 23, "Print"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
