// == Description des strutures dans l'espace== collection Volume = bag;; collection Membrane = bag;; collection Univ = Volume;; collection Plasma = Membrane;; collection Cytosol = Volume;; collection Retic_Endo = Membrane;; // == Définitions génériques == state Molecule = {nom};; state Diffuse = {diffuse};; state Activite = {actif};; state Actif = {actif = 1};; state InActif = {actif = 0};; //Variables globales DIFFC:=3;; DIFFCA:=2;; DIFFCAMP:=2;; TAUXINIB:=50;; // Définitions state Agonist = Molecule + Activite + {nom = "agonist"};; state Agonist1 = Agonist + Actif;; state Recepteur = Molecule + Activite + {nom = "recepteur"};; state Recepteur1 = Recepteur + Actif;; state Gprot = Molecule + Activite + {nom = "gprot"};; state Gprot1 = Gprot+Actif;; state Gprot0 = Gprot+InActif;; state AC = Molecule + Activite + {nom="ac"};; state AC1 = AC + Actif;; state AC0 = AC + InActif;; state ATP = Molecule + {nom = "atp"};; state cAMP = Molecule + Diffuse + {nom = "camp"};; fun cAMP1(x) = cAMP(x) & x.diffuse >= DIFFCAMP;; state I = Molecule + {nom = "i"};; state CaPhK = Molecule + Activite + {nom = "caphk"};; state CaPhK1 = CaPhK + Actif;; state CaPhK0 = CaPhK + InActif;; state Ca2p = Molecule + {nom = "ca++"} + Diffuse;; fun Ca2p1(x) = Ca2p(x) & (x.diffuse >= DIFFCA);; state cAMP2R = Molecule + {nom = "(camp)2.r"};; state Cenzime = Molecule + {nom ="c"} + Diffuse;; fun Cenzime1(x) = Cenzime(x) & (x.diffuse >=DIFFC);; state CI = Molecule + {nom = "ci"};; state R2C2 = Molecule + {nom = "r2c2"};; state PhK = Molecule + { nom ="phk"};; state Stimulus = Molecule + Activite + {nom = "stimulus"};; state Stimulus1 = Stimulus + Actif;; state Channel = Molecule + Activite + {nom = "channel"};; state ChannelOpen = Channel + Actif;; state ChannelClosed = Channel + InActif;; // == Transformations auxilaires == trans ActiveRecepteur = {r:Recepteur => (r + {actif =1})};; trans ActiveChannel = { c:Channel => c+ {actif=1}};; trans TransAtp[i=0] = { a:ATP/i<1 => (i:=i+1; {nom="camp"}+{diffuse=0})};; trans AjoutPlasmaCa = { c:Cytosol => ({nom="ca++",diffuse = 0})::c};; trans DesChannel = {c:ChannelOpen => (c+{actif=0})};; fun Aleatoire(t,c,i) = let r=(random(101)) in if (t>r) then {nom="ci"}::():Cytosol else c::i::():Cytosol fi;; fun AleaR2C2(a,re) = let r=(random(2)) in (if (r==1) then (delete({nom="r2c2"},re):: {nom="c",diffuse=0}::{nom="(camp)2.r"}::():Cytosol) else a::re::():Cytosol fi);; trans IncrCyt = { I1 = ca:Ca2p => ca+{diffuse=ca.diffuse+1}; I2 = a:cAMP => a+{diffuse=a.diffuse+1}; I3 = c:Cenzime => c + {diffuse=c.diffuse+1}; };; // Définition de réactions biochimiques i:=0;; j:=0;; k:=0;; trans Biochimie = { Incr = c:Cytosol => IncrCyt(c)::():Cytosol; //Incrémenter les tps de diffusion Reaction1 = a:Agonist1, p:Plasma => (a+{actif=0})::ActiveRecepteur(p)::():Univ; Reaction2 = r:Recepteur1, g:Gprot0 => (g+{actif=1})::(r+{actif=0})::():Plasma; Reaction3 = g:Gprot1, a: AC0 => (g+{actif=0})::(a+{actif=1})::():Plasma; Reaction4 = a: AC1, c:Cytosol =>(a+{actif=0}):: TransAtp(c)::():Plasma; Reaction5 = a:cAMP1, re:Retic_Endo/member({nom="r2c2"},re) => AleaR2C2(a,re); Reaction5b = r:R2C2, c:Cytosol/member({nom="camp",diffuse=DIFFCAMP},c) => delete({nom="camp",diffuse=DIFFCAMP}, ({nom="c",diffuse=0}::{nom="(camp)2.r"}::c))::():Plasma; Reaction6 = c:Cenzime1, x:CaPhK0 => c::(x+{actif=1})::():Cytosol; Reaction7 = c:Cenzime, i:I => Aleatoire(TAUXINIB,c,i); Reaction8 = s:Stimulus1, p:Plasma => (s+{actif=0})::ActiveChannel(p)::():Univ; Reaction9 = c:Ca2p, p:Plasma/member({nom="channel",actif=1},p) => AjoutPlasmaCa(DesChannel(p))::():Univ; Reaction10 = x:Ca2p1, y:PhK => {nom="caphk", actif =0}::():Cytosol; };; //== Initialisation RETICULUM := {nom="r2c2"}:: ():Retic_Endo ;; CYTOSOL := {nom="i"}:: {nom="phk"}:: {nom="atp"}:: RETICULUM:: ():Cytosol ;; PLASMA := {nom= "recepteur",actif=0}:: {nom="r2c2"}:: {nom= "gprot",actif=0}:: {nom= "ac",actif=0}:: {nom= "channel",actif=0}:: CYTOSOL:: ():Plasma ;; U := {nom= "agonist",actif=1}:: {nom= "stimulus",actif=1}:: {nom= "ca++",diffuse=0}:: PLASMA:: ():Univ ;; //Création du fichier Imoview rdeuxcdeux:= "Grid2 {\nLineUp1 Left \nAxis <1,1,0>\nSpace1 -0.5\nSpace2 -0.5\n GridList[\nCylinder {Color < 0, 1, 0.5 > \nRadius 0.7 \nHeight 2} , Cylinder {Color < 0, 1, 0.5 > \nRadius 0.7\nHeight 2}, Sphere { Color < 0, 0, 1 > \nRadius 0.7 }, Sphere {Color < 0, 0, 1 > \nRadius 0.7 }\n]";; campdeuxr:= "Grid1{\nAxis <0,1,0>\n Space1 -0.3\n GridList[ \nSphere {Color < 0, 0, 1 >\nRadius 0.5}, \nCylinder {Color <0,0,0.5>\nRadius 0.5\nHeight 2\n}, \nSphere {Color <0,0,1>\nRadius 0.5}\n]";; ci := "Grid1 { Axis <0,1,0>\n Space1 (-1)\n GridList [ Sphere { Radius 1\nColor <2,2,0>}, Sphere { Radius 0.7\nColor <0,0,1>}]";; caphk2 := "Grid1 {Axis <0,1,0>\n Space1 (-0.2)\n GridList [ Sphere { Radius 0.5\n Color <0,0,1>}, Sphere { Radius 0.7\n Color <2,2,2>}]\n";; caphk2actif:= "Grid1 {Axis <0,1,0>\n Space1 -0.2\n GridList [ Sphere { Radius 0.5\nColor <2,0,0>}, Sphere { Radius 0.7\nColor <2,0,0>}]\n";; fun couleur(x) = if (x.actif==1)||((x.nom=="camp")&(x.diffuse>=DIFFCAMP)) ||((x.nom=="c")&(x.diffuse>=DIFFC)) ||((x.nom=="ca++")&(x.diffuse>=DIFFCA)) then "Color <2,0,0>\n}" else "Color <0,0,1>\n}" fi;; fun nom(x) = (x.nom=="r2c2")||(x.nom=="atp")||(x.nom=="i")||(x.nom=="phk")||(x.nom=="(camp)2.r")||(x.nom=="ci")||(x.nom=="caphk");; fun show(x) = let k2= k*50 in (if Univ(x) then print_coll("tmp.imo", x, show, "Translated{Translation <"+k2+",0,0>\n Geometry Container{\nColor< 1, 0, 0 >\nType Ellipsoide\nOpacity 0.0\nContain [Grid2 {Space2 -1\n GridList [\n",",\n","]}\n]\n}\n}\nCommand Pause\n\n\n"); "" else (if bag(x) then (if x==():Retic_Endo then "tmp.imo"<<"Sphere{\nRadius 2\nColor <0.5,0,0>}";"" else print_coll("tmp.imo", x, show, "Container{\nColor<0.5,0,0>\nType Ellipsoide\nDraw Half\nContain [Grid2 {Space1 2\n Space2 2\nGridList [\n",",\n","]}\n]\n}"); "" fi) else "tmp.imo"<< ((if x.nom=="agonist" then "AxisRotated { Axis <0,0,1>\n Angle -90\n Geometry Cone{Radius 1.5 \nHeight 5\nSolid True\n" else (if x.nom=="stimulus" then "AxisRotated { Axis <1,0,0>\n Angle 90\n Geometry Cone{Radius 2 \nHeight 3\nSolid True\n" else (if x.nom=="ca++" then "Sphere {Radius 0.5\n" else (if x.nom=="recepteur" then "AxisRotated { Axis <0,0,1>\n Angle 90\n Geometry Cylinder{ Radius 1\nHeight 0.5\nSolid True\n" else (if x.nom=="channel" then "AxisRotated { Axis <0,0,1>\n Angle 90\n Geometry Cylinder{ Radius 0.6\nHeight 3\nSolid True\n" else (if x.nom=="gprot" then "Sphere{Radius 0.7\n" else (if x.nom=="ac" then "Sphere{ Radius 1\n Slices 6\n" else (if x.nom=="r2c2" then rdeuxcdeux else (if x.nom=="atp" then "Frustum{Radius 1\nHeight 2\nTaper 0.5\nSolid True\nColor <0, 1, 0>\n" else (if x.nom=="i" then "Sphere{Radius 1\nColor <2,2,0>\n" else (if x.nom=="phk" then "Sphere{Radius 0.7\nColor <2,2,2>\n" else (if x.nom=="c" then "Sphere { Radius 0.7\n" else (if x.nom=="camp" then "Sphere{ Radius 0.5\n" else (if x.nom=="(camp)2.r" then campdeuxr else (if x.nom=="ci" then ci else (if x.nom=="caphk" then (if x.actif==0 then caphk2 else caphk2actif fi) else "Sphere {Radius 1\n" fi)fi)fi)fi)fi)fi)fi)fi)fi)fi)fi)fi)fi)fi)fi)fi) +(if nom(x) then "}" else couleur(x) fi) +(if (x.nom=="agonist")||(x.nom=="stimulus")||(x.nom=="recepteur")||(x.nom=="channel") then "}\n" else "\n" fi));"" fi)fi);; //Transformation finale trans Recur = { nest1 = p:Membrane => (i:=i+1;Evolution[1](p)); nest2 = p:Volume => (j:=j+1;Evolution[1](p)); };; fun Evolution(x) = Recur(Biochimie(x));; sol:=U;; //Itération de la transformation + Création fichier imoview fun iterimo(n) = if n==0 then sol else show(sol);sol:=Evolution[1](sol);k:=k+1;iterimo(n-1) fi;; //Itération simple fun iter(n) = if n==0 then sol else sol:=Evolution[1](sol);iter(n-1) fi;; //Initialisation de la solution fun init() = sol:=U;; iter(8);;