330.0
500
330
500.0
1050.0
36
125.0
false
47.0
189.0
204.0
131.0
false
48.0
189.0
2.0
61.0
false
14.0
236.0
138.0
22.0
false
8.0
253.0
146.0
filename
page10$0.mml
date
1307537732525
url
C:\Users\iling\AppData\Molecular Workbench\cache\page10\page10$0.mml
size
73035
codebase
C:\Users\iling\Desktop\新增資料夾
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) and (%restraintSet) and (%caToCaptureNear == %caToCaptureFar));
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+2200";
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 %atpToCaptureFar nearestMolecule(%atpAnchor1x,%atpAnchor1y,20);
set %atpToCaptureNear nearestMolecule(%atpAnchor1x,%atpAnchor1y,2);
if (%atpToCaptureFar != -1);
set %atp1toCapture atomofmolecule(%atpToCaptureFar,0);
set %atp2toCapture atomofmolecule(%atpToCaptureFar,1);
if (%atom[%atp1toCapture].charge < 0);
set %atp1toCapture atomofmolecule(%atpToCaptureFar,1);
set %atp2toCapture atomofmolecule(%atpToCaptureFar,0);
endif;
if (%atpToCaptureNear != -1);
set atom[%atp1toCapture].restraint 20;
set atom[%atp1toCapture].restraint.x %atpAnchor1x;
set atom[%atp1toCapture].restraint.y %atpAnchor1y;
set atom[%atp1toCapture].friction 1;
set atom[%atp2toCapture].restraint 20;
set atom[%atp2toCapture].restraint.x %atpAnchor2x;
set atom[%atp2toCapture].restraint.y %atpAnchor2y;
set atom[%atp2toCapture].friction 1;
set %restraintSet 0;
set %waitingForATPBinding 0;
set %waitingForATPSettling 1;
set %endTransitionTime "%model_time+1600";
else;
if (%restraintSet == 0);
set %restraintSet 1;
set atom[%atp1toCapture].restraint 1;
set atom[%atp1toCapture].restraint.x %atpAnchor1x;
set atom[%atp1toCapture].restraint.y %atpAnchor1y;
set atom[%atp2toCapture].restraint 1;
set atom[%atp2toCapture].restraint.x %atpAnchor2x;
set atom[%atp2toCapture].restraint.y %atpAnchor2y;
endif;
endif;
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;
display messages
200
message handler
if (%messagesOn);
select textbox all;
set visible off;
select textbox none;
if (%waitingForCaBinding);
set textbox[%waitingForCaText].visible on;
endif;
if (%waitingForATPPocketFormation);
set textbox[%formingATPSiteText].visible on;
endif;
if (%waitingForATPBinding);
set textbox[%waitingForATPText].visible on;
endif;
if (%waitingForClearCavity);
set textbox[%waitingForReactionText].visible on;
endif;
endif;
1.0
None
-7179849
membraneBkgLarge.png
255
0
255
255
waitingForCa.gif
1
false
172.0
113.0
CaAtpaseFormATPSite.gif
1
1
1
false
172.0
113.0
waitingForATP.gif
1
2
false
172.0
113.0
CaAtpaseReleaseCa.gif
1
3
1
172.0
113.0
waitingForCaRelease.gif
1
4
false
172.0
113.0
CaAtpaseRestore.gif
1
5
false
172.0
113.0
atp.gif
-2.9054263
1
class org.concord.mw2d.models.RadialBond
1
6
296.5152900212033
11.195578496824329
atp.gif
-1.8840945
class org.concord.mw2d.models.RadialBond
1
7
415.94990424954887
277.4009510233967
caIon.png
1
class org.concord.mw2d.models.Atom
1
8
398.0192174413989
266.13835258662954
caIon.png
3
class org.concord.mw2d.models.Atom
1
9
384.55761802046817
139.5646659226675
caIon.png
class org.concord.mw2d.models.Atom
1
10
452.9684645035323
31.610548443019567
caIon.png
4
class org.concord.mw2d.models.Atom
1
11
161.21313862234737
146.6583600505353
caIon.png
2
class org.concord.mw2d.models.Atom
1
12
395.27768266965757
94.8514155163228
caIon.png
5
class org.concord.mw2d.models.Atom
1
13
327.92484027584925
293.81825081344664
atp.gif
-2.0244575
2
class org.concord.mw2d.models.RadialBond
1
14
295.6933850392397
225.41276089867682
caIon.png
16
class org.concord.mw2d.models.Atom
1
15
456.6999445990713
49.110833225575284
caIon.png
14
class org.concord.mw2d.models.Atom
1
16
283.724515432442
26.168639770287555
caIon.png
17
class org.concord.mw2d.models.Atom
1
17
332.5888950426988
273.10360836894966
caIon.png
15
class org.concord.mw2d.models.Atom
1
18
245.5716941373554
68.53680617705722
caIon.png
21
class org.concord.mw2d.models.Atom
1
19
69.46513426192001
29.814443880103262
caIon.png
22
class org.concord.mw2d.models.Atom
1
20
38.878101486688635
13.475890336410469
caIon.png
18
class org.concord.mw2d.models.Atom
1
21
31.33123912221795
89.86317321576098
caIon.png
23
class org.concord.mw2d.models.Atom
1
22
30.274685750334974
144.92453899641677
caIon.png
19
class org.concord.mw2d.models.Atom
1
23
105.76331478838915
247.06311094481578
caIon.png
20
class org.concord.mw2d.models.Atom
1
24
3.5239274863880468
165.7279169821609
adp.gif
11
class org.concord.mw2d.models.Atom
1
29
226.5512208771353
217.68563518187784
p.gif
10
class org.concord.mw2d.models.Atom
1
30
254.49999999897574
169.49999999402422
0
0
255
255
24
false
2
true
203
149
255
255
255
255
1
25
2
Waiting for binding
of calcium ion.
false
96.0
72.0
2
true
252
211
1
26
2
Forming ATP
binding site.
false
89.0
201.0
2
true
255
211
1
27
2
Waiting for binding
of ATP.
false
112.0
228.0
2
true
247
234
1
28
2
Waiting for reaction of
ATP with transport protein.
false
54.0
208.0
2
0.10000000149011612
463.4684645035323
42.11054844301957
0.02086867233724027
-0.04517593576656322
2
0.10000000149011612
408.5192174413989
276.63835258662954
0.05596720355336932
0.052457723966417846
2
0.10000000149011612
405.77768266965757
105.3514155163228
-0.01440571489576598
-0.08495883362406714
2
0.10000000149011612
395.05761802046817
150.0646659226675
-0.0433865432306596
0.053570898656352776
2
0.10000000149011612
0.0
203.0
162.0
171.71313862234737
157.1583600505353
-0.044290808512512304
0.003634066362127687
2
0.10000000149011612
338.42484027584925
304.31825081344664
-0.0203644687045221
-0.023709480200829566
3
false
443.55651657633354
279.33976776292565
-0.005669888165883481
-0.014642682514969696
3
-0.01
false
452.3432919227642
306.46213428386784
0.010256961189616826
0.030951290283305108
3
false
314.6939981673637
23.369382479047555
-0.04858633320264623
-0.010333230542796666
3
-0.01
false
342.336581875043
30.021774514601102
-0.014171764406707059
0.050138498841713494
3
1.0
false
0.2
266.0
180.0
265.99999999897574
179.99999999402422
2.5928352654179347E-12
1.5128319365356053E-11
3
-0.01
false
0.0
254.0
250.0
249.5512208771353
233.18563518187784
0.0061168075773765625
-0.00811427799104101
3
false
321.29506061891857
227.79010803201035
-0.025864188540630814
0.0454203973294843
3
-0.01
false
334.0917094595608
254.0354137653433
0.0025347522161100937
-0.005528111815280149
2
0.10000000149011612
294.224515432442
36.668639770287555
0.04963062964752476
0.06116088051959252
2
0.10000000149011612
256.0716941373554
79.03680617705722
0.028087714948697558
-0.05868965189242533
2
0.10000000149011612
467.1999445990713
59.610833225575284
0.04941701653610269
0.043108542206297056
2
0.10000000149011612
false
343.0888950426988
283.60360836894966
-0.050348202908572164
0.033390890136676066
2
0.10000000149011612
false
41.83123912221795
100.36317321576098
0.07901455556934293
-0.02994738329252354
2
0.10000000149011612
false
116.26331478838915
257.5631109448158
-0.042198284178951044
-0.07046950133372168
2
0.10000000149011612
false
14.023927486388047
176.2279169821609
-0.05509183279664254
0.052013027750475435
2
0.10000000149011612
false
79.96513426192001
40.31444388010326
-0.10350899147523164
0.0072084460906317585
2
0.10000000149011612
false
49.378101486688635
23.97589033641047
0.09500117372725299
-0.001029462756355833
2
0.10000000149011612
false
40.774685750334974
155.42453899641677
0.0948801675110804
-0.03928336662019005
false
184.0
125.0
false
182.0
138.0
false
192.0
143.0
false
205.0
146.0
false
217.0
151.0
false
229.0
156.0
false
230.0
184.0
false
218.0
189.0
false
204.0
193.0
false
190.0
195.0
false
178.0
202.0
false
183.0
215.0
3
6
7
28.0
0.2
8
9
28.0
0.2
12
13
28.0
0.2