320.0490320490.010.02filenamepage5$0.mmldate1248291684000url/s/parsons/b/others/kasuto/Desktop/Tim's MW/p5/page5$0.mmlsize26191codebase/s/parsons/b/others/kasuto/Desktop/Tim's MW/p5define %atomX 18.4;
define %atomY 16.0;
define %protons round(1);
define %electrons round(1);
define %neutrons round(0);
define %radioactiveIsVisible 0;
define %updateNeeded 0;
define %addProton 0;
define %removeProton 0;
define %addNeutron 0;
define %removeNeutron 0;
define %addElectron 0;
define %removeElectron 0;
define %resetToHydrogen 0;
define %charge 0;
define %massnum 1;
run;update isotope charge and atom200update viewif (%updateNeeded);
if (%addProton);
if (%protons < 10);
set %protons round(%protons+1);
add atom 1 (1,16);
define %newAtomIndex %number_of_atoms;
define %newBond %number_of_atoms-1;
bond 0 %newAtomIndex 0.1;
select rbond %newBond;
set bondlength 0.25;
select rbond none;
minimize 1 50;
else;
message protonLimit.html;
endif;
endif;
if (%removeProton);
if (%protons > 1);
set %protons round(%protons-1);
define %i round(0);
while (%i < %number_of_atoms);
if (%atom[%i].id == 1);
select atom %i;
remove;
break;
endif;
set %i round(%i+1);
endwhile;
endif;
endif;
if (%addNeutron);
if (%neutrons < 12);
set %neutrons round(%neutrons+1);
add atom 2 (1,16);
define %newAtomIndex %number_of_atoms;
define %newBond %number_of_atoms-1;
bond 0 %newAtomIndex 0.1;
select rbond %newBond;
set bondlength 0.25;
select rbond none;
minimize 1 50;
else;
message neutronLimit.html;
endif;
endif;
if (%removeNeutron);
if (%neutrons > 0);
set %neutrons round(%neutrons-1);
define %i round(0);
while (%i < %number_of_atoms);
if (%atom[%i].id == 2);
select atom %i;
remove;
break;
endif;
set %i round(%i+1);
endwhile;
endif;
endif;
if (%addElectron);
if (%electrons < 10);
set %electrons round(%electrons+1);
else;
message electronLimit.html;
endif;
endif;
if (%removeElectron);
if (%electrons > 0);
set %electrons round(%electrons-1);
endif;
endif;
set %addProton 0;
set %removeProton 0;
set %addNeutron 0;
set %removeNeutron 0;
set %addElectron 0;
set %removeElectron 0;
set %massnum round(%protons+%neutrons);
set %charge round(%protons-%electrons);
set textbox[4].text <t>OVERALL CHARGE = %charge</t>
if (%charge < 0);
set textbox[4].color #0000FF;
else;
if (%charge > 0);
set textbox[4].color #FF0000;
else;
set textbox[4].color #666666;
endif;
endif;
set textbox[3].text <t>atomic # --> %protons</t>;
set textbox[2].text <t>mass # --> %massnum</t>;
if (%protons == 1);
set textbox[1].text <t>H</t>;
set textbox[5].text <t>hydrogen-%massnum</t>
endif;
if (%protons == 2);
set textbox[1].text <t>He</t>;
set textbox[5].text <t>helium-%massnum</t>
endif;
if (%protons == 3);
set textbox[1].text <t>Li</t>;
set textbox[5].text <t>lithium-%massnum</t>
endif;
if (%protons == 4);
set textbox[1].text <t>Be</t>;
set textbox[5].text <t>beryllium-%massnum</t>
endif;
if (%protons == 5);
set textbox[1].text <t>B</t>;
set textbox[5].text <t>boron-%massnum</t>
endif;
if (%protons == 6);
set textbox[1].text <t>C</t>;
set textbox[5].text <t>carbon-%massnum</t>
endif;
if (%protons == 7);
set textbox[1].text <t>N</t>;
set textbox[5].text <t>nitrogen-%massnum</t>
endif;
if (%protons == 8);
set textbox[1].text <t>O</t>;
set textbox[5].text <t>oxygen-%massnum</t>
endif;
if (%protons == 9);
set textbox[1].text <t>F</t>;
set textbox[5].text <t>fluorine-%massnum</t>
endif;
if (%protons == 10);
set textbox[1].text <t>Ne</t>;
set textbox[5].text <t>neon-%massnum</t>
endif;
select image all;
remove;
if (((%protons == 1) and (%massnum == 1)) or ((%protons == 1) and (%massnum == 2)) or ((%protons == 2) and (%massnum == 3)) or ((%protons == 2) and (%massnum == 4)) or ((%protons == 3) and (%massnum == 6)) or ((%protons == 3) and (%massnum == 7)) or ((%protons == 4) and (%massnum == 9)) or ((%protons == 5) and (%massnum == 10)) or ((%protons == 5) and (%massnum == 11)) or ((%protons == 6) and (%massnum == 12)) or ((%protons == 6) and (%massnum == 13)) or ((%protons == 7) and (%massnum == 14)) or ((%protons == 7) and (%massnum == 15)) or ((%protons == 8) and (%massnum == 16)) or ((%protons == 8) and (%massnum == 17)) or ((%protons == 8) and (%massnum == 18)) or ((%protons == 9) and (%massnum == 19)) or ((%protons == 10) and (%massnum == 20)) or ((%protons == 10) and (%massnum == 21)) or ((%protons == 10) and (%massnum == 22)));
add image radioactiveNo.gif (21.7,3);
else;
add image radioactiveYes.gif (21.7,3);
endif;
if (%electrons > 0);
set %orb round((10000*%protons)+%electrons);
add image orbital%orb.png (2,1.5);
endif;
add image e%electrons.gif (42.1,14.8);
add image p%protons.gif (43.7,14.8);
add image n%neutrons.gif (45.3,14.8);
select image none;
set %updateNeeded 0;
endif;1.0None-2542797-33554442550255255radioactiveNo.gif19217.030.0orbital10001.png11015.0e1.gif111421.0148.0p1.gif112437.0148.0n0.gif113453.0148.000255255false25525525525525.01632.0-8.05.0falseArial1141Isotope404.011.0Arial03611H399.022.012mass # --> 1341.029.013atomic # --> 1337.054.0Arial11810210210225514OVERALL CHARGE = 064.05.015hydrogen-1405.075.01Arial11217e p n
413.0124.010210210225518RADIOACTIVE?63.025.0falsefalse180.0175.0false1false180.71492346979267175.25674916749207-0.00307555052352453430.00856393527299573112.50.1