330.0
500
330
500.0
1050.0
12
61.0
false
14.0
179.0
138.0
125.0
false
47.0
189.0
204.0
131.0
false
48.0
189.0
2.0
filename
page12$0.mml
date
1225668914000
url
/Users/ddamelin/Desktop/diffusionActiveTrans _05DD/page12$0.mml
size
38742
codebase
/Users/ddamelin/Desktop/diffusionActiveTrans _05DD
beginexternal;
@colorbar:10:enablecomponent 2 false;enablecomponent 3 false;enablecomponent 4 false;
endexternal;
define %waitingForCaBinding 1;
define %waitingForATPBinding 0;
define %waitingForATPSettling 0;
define %waitingForClearCavity 0;
define %waitingForProteinTransition 0;
define %waitingForCaSettling 0;
define %waitingForATPPocketFormation 0;
define %waitingForCaRelease 0;
define %waitingForFlashTransition 0;
define %waitingForProteinReset 0;
define %waitingForCaText 0;
define %formingATPSiteText 1;
define %waitingForATPText 2;
define %waitingForReactionText 3;
define %messagesOn 1;
define %topBlockerInPlace 1;
define %bottomBlockerInPlace 1;
define %topParticleIndex -1;
define %bottomParticleIndex -1;
define %caToCapture -1;
define %caToCaptureFar -1;
define %caToCaptureNear -1;
define %restraintSet 0;
define %caLeft 0;
define %caRight 0;
define %proteinX 17.2;
define %proteinY 11.3;
define %proteinImage 0;
define %endTransitionTime 0;
define %thisAtom 0;
define %atp1toCapture 0;
define %atp2toCapture 0;
define %bondToRemove 0;
define %partOfMolecule -1;
define %leftConc 0;
define %rightConc 0;
define %totalChemicalEnergy %number_of_molecules;
define %chemicalEnergy 0;
define %voltage 0;
define %leftConc 0;
define %rightConc 0;
define %i 0;
define %atpConc -1;
define %caConc -1;
define %leftWidth 18.6;
define %rightWidth %width-%leftWidth;
define %flashX 23.1;
define %flashY 20.7;
define %atpAtomX 24.9;
define %atpAtomY 20.8;
define %pocket1x 25;
define %pocket1y 19.9
define %pocket2x 25.9;
define %pocket2y 20.4
define %pocket3x 24.9;
define %pocket3y 20.9
define %pocket4x 24.5;
define %pocket4y 21.9;
define %rsurface1x 24;
define %rsurface1y 19.6;
define %rsurface2x 22.9;
define %rsurface2y 19.3;
define %rsurface3x 21.8;
define %rsurface3y 18.9;
define %rsurface4x 20.8;
define %rsurface4y 18.5;
define %rsurface5x 19.9;
define %rsurface5y 17.9;
define %rsurface6x 19.8;
define %rsurface6y 15.3;
define %rsurface7x 20.7;
define %rsurface7y 14.7;
define %rsurface8x 21.9;
define %rsurface8y 14.7;
define %rsurface9x 23;
define %rsurface9y 14.5;
define %rsurface10x 24;
define %rsurface10y 14.2;
define %nonATPsurfaceX 25;
define %nonATPsurfaceY 12.8;
define %lsurface1x 18.4;
define %lsurface1y 12.5;
define %lsurface2x 18.2;
define %lsurface2y 13.8;
define %lsurface3x 19.2;
define %lsurface3y 14.3;
define %lsurface4x 20.5;
define %lsurface4y 14.6;
define %lsurface5x 21.7;
define %lsurface5y 15.1;
define %lsurface6x 22.9;
define %lsurface6y 15.6;
define %lsurface7x 25.8;
define %lsurface7y 15.1;
define %lsurface8x 25.8;
define %lsurface8y 16.2;
define %lsurface9x 23;
define %lsurface9y 18.4;
define %lsurface10x 21.8;
define %lsurface10y 18.9;
define %lsurface11x 20.4;
define %lsurface11y 19.3;
define %lsurface12x 19;
define %lsurface12y 19.5;
define %lsurface13x 17.8;
define %lsurface13y 20.2;
define %lsurface14x 18.3;
define %lsurface14y 21.5;
define %flashImage 0;
define %obsLeftX 17.9;
define %obsRightX 23.6;
define %obsY 13.8;
define %obsWidth 1.4;
define %obsHeight 6.1;
define %leftObs 0;
define %rightObs 0;
define %rightObs2 0;
define %obsRight2x 25.3;
define %obsRight2y 14.6;
define %obsRight2width 0.8;
define %obsRight2height 2.2;
define %proteinAreaX 16;
define %proteinAreaY 12.7;
define %proteinAreaW 11.8;
define %proteinAreaH 8.2;
define %caCount 0;
define %atpCount 0;
define %atomsInProtein 0;
define %pAnchorX 26.6;
define %pAnchorY 18;
define %atpAnchor1x 26.4;
define %atpAnchor1y 22.2;
define %atpAnchor2x 25.4;
define %atpAnchor2y 25;
define %atpRestraintDeltaX 0.02;
define %atpRestraintDeltaY -0.42;
define %caRestraintX 21.1;
define %caRestraintY 16.3;
define %caRestraintDeltaX -0.08;
define %caRestraintDeltaY -0.01;
define %waitingForCa 0;
define %formingATP 1;
define %waitingForATP 2;
define %releasingATP 3;
define %watingForCaRelease 4;
define %restoringProtein 5;
define %waitingForCaText 0;
define %formingATPSiteText 1;
define %waitingForATP 2;
define %waitingForReaction 3;
capture ca ion
200
1 capture Ca
if (%waitingForCaBinding);
set %caToCaptureFar nearest(2,%caRestraintX,%caRestraintY,30);
set %caToCaptureNear nearest(2,%caRestraintX,%caRestraintY,1);
set %caToCapture %caToCaptureFar;
if ((%caToCaptureFar != -1) and (%atom[%caToCaptureFar].rx > %leftWidth));
if (%caToCaptureNear != -1);
set atom[%caToCapture].restraint 1000;
set atom[%caToCapture].restraint.x %caRestraintX;
set atom[%caToCapture].restraint.y %caRestraintY;
set atom[%caToCapture].friction 1;
set %waitingForCaBinding 0;
set %waitingForCaSettling 1;
set %restraintSet 0;
set %endTransitionTime "%model_time+400";
else;
if (%restraintSet == 0);
set %restraintSet 1;
set atom[%caToCapture].restraint 1;
set atom[%caToCapture].restraint.x %caRestraintX;
set atom[%caToCapture].restraint.y %caRestraintY;
endif;
endif;
endif;
endif;
wait for Ca to settle down then load next animation
100
2 settle Ca ion
If ((%waitingForCaSettling) and (%model_time > %endTransitionTime));
set %waitingForCaSettling 0;
set image[%formingATP].frame 1;
set image[%formingATP].loop 1;
set image[%formingATP].visible on;
set image[%waitingForCa].visible off;
set %thisAtom nearest(1, %atpAtomX, %atpAtomY);
select atom %thisAtom;
remove;
add atom 0 (%pocket1x, %pocket1y); select atom "%number_of_atoms-1"; set movable off;
add atom 0 (%pocket2x, %pocket2y); select atom "%number_of_atoms-1"; set movable off;
add atom 0 (%pocket3x, %pocket3y); select atom "%number_of_atoms-1"; set movable off;
add atom 0 (%pocket4x, %pocket4y); select atom "%number_of_atoms-1"; set movable off;
set movable off;
set %waitingForATPPocketFormation 1;
set %endTransitionTime "%model_time+800";
endif;
waitng for atp pocket formation
100
3 waiting for ATP pocket
If ((%waitingForATPPocketFormation) and (%model_time > %endTransitionTime));
set %waitingForATPPocketFormation 0;
set %waitingForATPBinding 1;
endif;
wait for ATP capture
100
4 capture ATP
if (%waitingForATPBinding);
set %atp1toCapture nearest(3,%atpAnchor1x,%atpAnchor1y,20);
set %partOfMolecule whichMolecule(%atp1toCapture);
if ((%atp1toCapture != -1) and (%partOfMolecule != -1));
if (%atom[%atp1toCapture].charge < 0);
set %atp1toCapture nearesttoatom(3,%atp1toCapture,10,2);
endif;
set atom[%atp1toCapture].restraint 20;
set atom[%atp1toCapture].restraint.x %atpAnchor1x;
set atom[%atp1toCapture].restraint.y %atpAnchor1y;
set atom[%atp1toCapture].friction 1;
set %atp2toCapture nearesttoatom(3,%atp1toCapture,10,2);
set atom[%atp2toCapture].restraint 20;
set atom[%atp2toCapture].restraint.x %atpAnchor2x;
set atom[%atp2toCapture].restraint.y %atpAnchor2y;
set atom[%atp2toCapture].friction 1;
set %waitingForATPBinding 0;
set %waitingForATPSettling 1;
set %endTransitionTime "%model_time+1600";
endif;
endif;
wait for ATP to settle in place then initiate reaction
100
5 wait for ATP settling
If ((%waitingForATPSettling) and (%model_time > %endTransitionTime));
set %waitingForATPSettling 0;
set %waitingForClearCavity 1;
endif;
waitng for only one Ca in protein
50
6 waiting for clear cavity
If (%waitingForClearCavity);
set %caCount count(2,%proteinAreaX,%proteinAreaY,%proteinAreaW,%proteinAreaH);
set %atpCount count(3,%proteinAreaX,%proteinAreaY,%proteinAreaW,%proteinAreaH);
set %atomsInProtein "%caCount+%atpCount";
if (%atomsInProtein == 1);
set %waitingForClearCavity 0;
select element 0-1;
remove;
add obstacle (%obsRightX, %obsY, %obsWidth, %obsHeight);
set %rightObs "%number_of_obstacles-1";
set obstacle[%rightObs].visible off;
add obstacle (%obsRight2x, %obsRight2y, %obsRight2width, %obsRight2height);
set %rightObs2 "%number_of_obstacles-1";
set obstacle[%rightObs2].visible off;
set %waitingForFlashTransition 1;
set %endTransitionTime "%model_time+500";
add image flash.gif (%flashX,%flashY);
set %i 0;
endif;
endif;
open protein to release calcium
100
8 transition protein
If (%waitingForProteinTransition);
if (%model_time > %endTransitionTime);
set %waitingForProteinTransition 0;
select obstacle %leftObs;
remove;
set %rightObs %rightObs-1;
set %rightObs2 %rightObs2-1;
add atom 0 (%lsurface1x,%lsurface1y);
add atom 0 (%lsurface2x,%lsurface2y);
add atom 0 (%lsurface3x,%lsurface3y);
add atom 0 (%lsurface4x,%lsurface4y);
add atom 0 (%lsurface5x,%lsurface5y);
add atom 0 (%lsurface6x,%lsurface6y);
add atom 0 (%lsurface9x,%lsurface9y);
add atom 0 (%lsurface10x,%lsurface10y);
add atom 0 (%lsurface11x,%lsurface11y);
add atom 0 (%lsurface12x,%lsurface12y);
add atom 0 (%lsurface13x,%lsurface13y);
add atom 0 (%lsurface14x,%lsurface14y);
select element 0;
set movable off;
set atom[%caToCapture].restraint 0;
set atom[%caToCapture].friction 0;
set %waitingForCaRelease 1;
else;
%i++;
set atom[%caToCapture].restraint.x "%caRestraintX+%i*%caRestraintDeltaX";
set atom[%caToCapture].restraint.y "%caRestraintY+%i*%caRestraintDeltaY";
set atom[%atp1toCapture].restraint.x "%atpAnchor1x+%i*%atpRestraintDeltaX";
set atom[%atp1toCapture].restraint.y "%atpAnchor1y+%i*%atpRestraintDeltaY";
set atom[%atp1toCapture].rx "%atpAnchor1x+%i*%atpRestraintDeltaX";
set atom[%atp1toCapture].ry "%atpAnchor1y+%i*%atpRestraintDeltaY";
endif;
endif;
waiting for flash to finish
7 waiting for flash
If ((%waitingForFlashTransition) and (%model_time > %endTransitionTime));
set %waitingForFlashTransition 0;
set image[%releasingATP].frame 1;
set image[%releasingATP].loop 1;
set image[%releasingATP].visible on;
set image[%formingATP].visible off;
set %caToCapture nearest(2,%caRestraintX,%caRestraintY,2);
set %atp1toCapture nearest(3,%atpAnchor1x,%atpAnchor1y,2);
set %atp2toCapture nearesttoatom(3,%atp1toCapture,10,2);
set atom[%atp2toCapture].restraint 0;
set atom[%atp2toCapture].friction 0;
set %atpBond whichrbond(%atp1toCapture,%atp2toCapture);
select rbond %atpBond;
remove;
set %flashImage %number_of_images-1;
select image %flashImage;
remove;
add image adp.gif atomno=%atp2toCapture;
add image p.gif atomno=%atp1toCapture;
set %endTransitionTime "%model_time+1000";
set %waitingForProteinTransition 1;
endif;
waiting for ca release and clear protein
100
9 wating for ca release
If (%waitingForCaRelease);
set %atomsInProtein count(2,%proteinAreaX,%proteinAreaY,%proteinAreaW,%proteinAreaH);
if (%atomsInProtein == 0);
set %waitingForCaRelease 0;
select element 0;
remove;
add obstacle (%obsLeftX, %obsY, %obsWidth, %obsHeight);
set %leftObs "%number_of_obstacles-1";
set obstacle[%leftObs].visible off;
set image[%restoringProtein].frame 1;
set image[%restoringProtein].loop 1;
set image[%restoringProtein].visible on;
set image[%releasingATP].visible off;
set %atp1toCapture nearest(3,%pAnchorX,%pAnchorY);
set atom[%atp1toCapture].restraint 0;
set atom[%atp1toCapture].friction 0;
set atom[%atp1toCapture].vx 300;
set %waitingForProteinReset 1;
set %endTransitionTime "%model_time+1000";
endif;
endif;
revert to original shape
100
10 reset protein
If ((%waitingForProteinReset) and (%model_time > %endTransitionTime));
set %waitingForProteinReset 0;
set image[%waitingForCa].visible on;
set image[%restoringProtein].visible off;
select obstacle %rightObs2;
remove;
select obstacle %rightObs;
remove;
set %leftObs %leftObs-2;
add atom 0 (%rsurface1x,%rsurface1y);
add atom 0 (%rsurface2x,%rsurface2y);
add atom 0 (%rsurface3x,%rsurface3y);
add atom 0 (%rsurface4x,%rsurface4y);
add atom 0 (%rsurface5x,%rsurface5y);
add atom 0 (%rsurface6x,%rsurface6y);
add atom 0 (%rsurface7x,%rsurface7y);
add atom 0 (%rsurface8x,%rsurface8y);
add atom 0 (%rsurface9x,%rsurface9y);
add atom 0 (%rsurface10x,%rsurface10y);
select element 0;
set movable off;
set %topBlockerInPlace 0;
set %bottomBlockerInPlace 0;
set %waitingForCaBinding 1;
set %caToCapture -1;
endif;
add atom to block top of protein
100
add top blocker
if (%topBlockerInPlace != 1);
add atom 1 (%nonATPsurfaceX,%nonATPsurfaceY);
set %topParticleIndex nearest(1,%nonATPsurfaceX,%nonATPsurfaceY,1);
if (%topParticleIndex != -1);
set %topBlockerInPlace 1;
set atom[%topParticleIndex].movable off;
endif;
endif;
add bottom blocker
100
add bottom blocker
if (%bottomBlockerInPlace != 1);
add atom 1 (%atpAtomX,%atpAtomY);
set %bottomParticleIndex nearest(1,%atpAtomX,%atpAtomY,1);
if (%bottomParticleIndex != -1);
set %bottomBlockerInPlace 1;
set atom[%bottomParticleIndex].movable off;
endif;
endif;
update the graphs
100
update graphs
set %leftConc count(2,0,0,%leftWidth, %height);
set %leftConc %leftConc/(%leftWidth*%height);
set %rightConc count(2,%leftWidth,0,%rightWidth,%height);
set %rightConc %rightConc/(%rightWidth*%height);
set %chemicalEnergy %number_of_molecules;
set %voltage %totalChemicalEnergy-%chemicalEnergy;
store 1 %leftConc;
store 0 %rightConc;
store 2 %chemicalEnergy;
store 3 %voltage;
1.0
None
-7179849
membraneBkgLarge.png
255
0
255
255
waitingForCa.gif
1
172.0
113.0
CaAtpaseFormATPSite.gif
1
1
false
172.0
113.0
waitingForATP.gif
1
2
false
172.0
113.0
CaAtpaseReleaseCa.gif
1
3
false
172.0
113.0
waitingForCaRelease.gif
1
4
false
172.0
113.0
CaAtpaseRestore.gif
1
5
false
172.0
113.0
0
0
255
255
false
1
false
249.0
208.0
1
false
250.0
128.0
false
240.0
142.0
false
230.0
145.0
false
219.0
147.0
false
207.0
147.0
false
198.0
153.0
false
199.0
179.0
false
208.0
185.0
false
218.0
189.0
false
229.0
193.0
false
240.0
196.0