<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><!-- saved from url=(0053)http://proton.csudh.edu/lecture_help/estructures.html --><title>electronic configurations</title> <meta http-equiv="Content-Type" content="text/html; charset=unicode"> <script> //globals element=0 electrons=0 charge=0 function clear(){ for(j=0;j<=17;j++){ parent.frames[0].document.forms[0].elements[j].value=""} } function MakeArray(n){ this.length=n for (var i=1;i<=n;i++){ this[i]= 0} } function atom(name,sym){ this.name=name this.sym=sym } a=new MakeArray(50) epop=new MakeArray(50) sum=new MakeArray(10) product=new MakeArray(10) for(j=1;j<=10;j++){sum[j]=0;product[j]=0} for(j=0;j<=20;j++){epop[j]=""} orbitals=new MakeArray(30) orbitals[1]="1s" orbitals[4]="2s" orbitals[6]="2p" orbitals[9]="3s" orbitals[12]="3p" orbitals[15]="3d" orbitals[16]="4s" orbitals[20]="4p" pop=new MakeArray(50) a[1]=new atom("hydrogen","H") a[2]=new atom("helium","He") a[3]=new atom("lithium","Li") a[4]=new atom("beryllium","Be") a[5]=new atom("boron","B") a[6]=new atom("carbon","C") a[7]=new atom("nitrogen","N") a[8]=new atom("oxygen","O") a[9]=new atom("fluorine","F") a[10]=new atom("neon","Ne") a[11]=new atom("sodium","Na") a[12]=new atom("magnesium","Mg") a[13]=new atom("aluminum","Al") a[14]=new atom("silicon","Si") a[15]=new atom("phosphorous","P") a[16]=new atom("sulfur","S") a[17]=new atom("chlorine","Cl") a[18]=new atom("argon","Ar") a[19]=new atom("potassium","K") a[20]=new atom("calcium","Ca") a[21]=new atom("scandium","Sc") a[22]=new atom("titanium","Ti") a[23]=new atom("vanadium","V") a[24]=new atom("chromium","Cr") a[25]=new atom("manganese","Mn") a[26]=new atom("iron","Fe") a[27]=new atom("cobalt","Co") a[28]=new atom("nickel","Ni") a[29]=new atom("copper","Cu") a[30]=new atom("zinc","Zn") a[31]=new atom("gallium","Ga") a[32]=new atom("germanium","Ge") a[33]=new atom("arsenic","As") a[34]=new atom("selenium","Se") a[35]=new atom("bromine","Br") a[36]=new atom("krypton","Kr") function begin(){ document.forms[0].total.value++ document.forms[0].results.value="" clear() for(j=0;j<=20;j++){ epop[j]=""} element=Math.ceil(36*Math.random()) charge=Math.floor(3*Math.random()) if(Math.random()>.5){charge=-1*charge} present(element,charge) makeanswer(element,charge) } function present(element,charge){ symbol=a[element]['sym'] if(charge!=0){ if(charge>0){showit=symbol+"<sup>"+charge+"+</sup>"} else{showit=symbol+"<sup>"+Math.abs(charge)+"-</sup>"} } else{showit=symbol} display(showit) } function makeanswer(element,charge){ electrons=element-charge if(electrons<=0 || electrons>36){begin()} else{ while(electrons>0){ for(n=1;n<=4;n++){ for(l=0;l<n;l++){ for(ml=-l;ml<=l;ml++){ if(electrons<=0){break} else{ if(electrons>=2){ epop[n*(n+l)]++ epop[n*(n+l)]++ electrons=electrons-2} else{epop[n*(n+l)]++ electrons=electrons-1} } } } } } } if(epop[15]>0 & epop[16]!=2){ while(epop[16]<2 & epop[15]>0){ epop[16]++;epop[15]--} } //display2() } function display(showit){ //newone=window.open("","newone","scrollbars=yes,width=100,height=100") parent.frames[1].document.clear() parent.frames[1].document.writeln ("<html>"); parent.frames[1].document.writeln ("<head><title>Species</title>"); parent.frames[1].document.writeln ("</head>"); parent.frames[1].document.writeln ("<body bgcolor = FFFFFF>"); parent.frames[1].document.writeln (showit); //newone.document.writeln ("</head>"); //newone.document.writeln ("</head>"); //newone.document.writeln ("</head>"); parent.frames[1].document.writeln ("</body>"); parent.frames[1].document.writeln ("</html>"); parent.frames[1].document.close(); //parent.frames[1].focus(); } function display2(){ for(j=0;j<=20;j++){pop[j]=epop[j]} elects=window.open("","elects","scrollbars=yes,width=250,height=100") elects.document.clear() elects.document.writeln ("<html>"); elects.document.writeln ("<head><title>Configuration</title>"); elects.document.writeln ("</head>"); elects.document.writeln ("<body bgcolor = FFFFFF>"); elects.document.writeln (); for(j=1;j<=14;j++){ if(pop[j]!=0){ elects.document.write(orbitals[j],"<sup>",pop[j],"</sup> ")}; } if(pop[16]!=0){elects.document.write (orbitals[16],"<sup>",pop[16],"</sup> ")}; if(pop[15]!=0){elects.document.write (orbitals[15],"<sup>",pop[15],"</sup> ")}; if(pop[20]!=0){elects.document.write (orbitals[20],"<sup>",pop[20],"</sup> ")}; //elects.document.writeln ("</head>"); elects.document.writeln ("</body>"); elects.document.writeln ("</html>"); elects.document.close(); elects.focus(); } function problem(){ parent.frames[0].document.clear(); parent.frames[0].document.open(); parent.frames[0].document.writeln ("<html>"); parent.frames[0].document.writeln ("<head>"); parent.frames[0].document.writeln ("</head>"); parent.frames[0].document.writeln ("<body bgcolor = FFFFFF >"); parent.frames[0].document.writeln ("<form><table>"); parent.frames[0].document.write ("<tr><td><input type=text size=1></td><td><input type=text size=1></td><td><input type=text size=1><input type=text size=1><input type=text size=1></td><td><input type=text size=1>"); parent.frames[0].document.write ("</td><td><input type=text size=1><input type=text size=1><input type=text size=1></td><td><input type=text size=1></td><td><input type=text size=1><input type=text size=1><input type=text size=1><input type=text size=1><input type=text size=1></td><td><input type=text size=1><input type=text size=1><input type=text size=1></td></tr>") parent.frames[0].document.write("<tr><td><b>1s</td><td><b>2s</td><td align=center><b>2p </td><td align=center><b>3s</td><td align=center><b>3p</td><td><b>4s</td><td align=center><b>3d</td><td align=center><b>4p</td></tr></table>"); //parent.frames[0].document.write (" parent.frames[0].document.write ("<input type=button value='Submit' onClick=parent.frames[2].answer(this.form)>"); parent.frames[0].document.write ("</form>"); parent.frames[0].document.writeln (); parent.frames[0].document.close(); } function answer(form){ k=0 if(form.elements[0].value==epop[1] & form.elements[1].value==epop[4]& form.elements[5].value==epop[9] & form.elements[9].value==epop[16]){ k=k+0} if(epop[6]!=""){ k=k+degenerate(1,epop[6])} if(epop[12]!=""){ k=k+degenerate(2,epop[12])} if(epop[15]!=""){ k=k+degenerate(3,epop[15])} if(epop[20]!=""){ k=k+degenerate(4,epop[20])} if(k==0){ document.forms[0].results.value="correct" document.forms[0].correct.value++} else{ document.forms[0].results.value="incorrect"} } function degenerate(x,y){ prepare() if(x==1 || x==2 ||x==4){ if(y==1){ if(sum[x]==1){return 0} else{return 1} } if(y==2){ if(sum[x]==11){return 0} else{return 1} } if(y==3){ if(sum[x]==111){return 0} else{return 1} } if(y==4){ if(sum[x]==211 || sum[x]==121 || sum[x]==112){return 0} else{return 1} } if(y==5){ if(sum[x]==221 || sum[x]==212 || sum[x]==122){return 0} else{return 1} } if(y==6){ if(sum[x]==222){return 0} else{return 1} } } else{ if(y==1){ if(sum[x]==1){return 0} else{return 1} } if(y==2){ if(sum[x]==11){return 0} else{return 1} } if(y==3){ if(sum[x]==111){return 0} else{return 1} } if(y==4){ if(sum[x]==1111){return 0} else{return 1} } if(y==5){ if(sum[x]==11111){return 0} else{return 1} } if(y==6){ if(product==2){return 0} else{return 1} } if(y==7){ if(product==4){return 0} else{return 1} } if(y==8){ if(product==8){return 0} else{return 1} } if(y==9){ if(product==16){return 0} else{return 1} } if(y==10){ if(product==32){return 0} else{return 1} } } } function prepare(){ sum[1]=parent.frames[0].document.forms[0].elements[2].value+parent.frames[0].document.forms[0].elements[3].value+parent.frames[0].document.forms[0].elements[4].value sum[2]=parent.frames[0].document.forms[0].elements[6].value+parent.frames[0].document.forms[0].elements[7].value+parent.frames[0].document.forms[0].elements[8].value sum[3]=parent.frames[0].document.forms[0].elements[10].value+parent.frames[0].document.forms[0].elements[11].value+parent.frames[0].document.forms[0].elements[12].value+parent.frames[0].document.forms[0].elements[13].value sum[3]=sum[3]+parent.frames[0].document.forms[0].elements[14].value sum[4]=parent.frames[0].document.forms[0].elements[15].value+parent.frames[0].document.forms[0].elements[16].value+parent.frames[0].document.forms[0].elements[17].value /*product[1]=parent.frames[0].document.forms[0].elements[2].value*parent.frames[0].document.forms[0].elements[3].value*parent.frames[0].document.forms[0].elements[4].value product[2]=parent.frames[0].document.forms[0].elements[6].value*parent.frames[0].document.forms[0].elements[7].value*parent.frames[0].document.forms[0].elements[8].value*/ product[3]=parent.frames[0].document.forms[0].elements[10].value*parent.frames[0].document.forms[0].elements[11].value*parent.frames[0].document.forms[0].elements[12].value /*product[3]=product[3]*parent.frames[0].document.forms[0].elements[13].value*parent.frames[0].document.forms[0].elements[14].value*/ if(epop[15]>5){ product[4]=parent.frames[0].document.forms[0].elements[15].value*parent.frames[0].document.forms[0].elements[16].value*parent.frames[0].document.forms[0].elements[17].value} } </script> <meta content="MSHTML 6.00.2800.1170" name="GENERATOR"></head> <body onload="problem()"> <h2>Electronic Structures of Atoms and Ions</h2>On this page you can practice constructing electronic structures of atoms and ions. When you press "New Problem", a species will appear in the uppper right frame. Place the electrons in the appropriate orbitals in the top frame, following the rules for electronic structures. To indicate the degree of occupancy of a given orbital, do the following: <ul> <li>If the orbital has no electrons leave the cell empty. <l1>If it has a single electron, enter a 1 in the cell. </l1></li><li>If it has a pair of electrons, enter a 2 in the cell. </li><li>Anything other than empty, a 1 or a 2 will cause your answer to be ruled incorrect. </li></ul>When you have finished your answer, press the "Submit" button in the top frame. Results will appear in the table on the main window. <br> <form><input onclick="begin()" type="button" value="New Problem"> <table border="4"> <tbody> <tr> <td align="center"><b>Results</b></td> <td align="center"><b>Total Done</b></td> <td><b>Total Correct</b></td></tr> <tr> <td><input size="12" name="results"></td> <td align="center"><input size="4" name="total"></td> <td align="center"><input size="4" name="correct"></td></tr></tbody></table></form> <hr width="100%" size="2"><font size="-1">This page was developed by <a href="mailto:gwiger@chemistry.csudh.edu">Prof George Wiger</a> of <a href="http://chemistry.csudh.edu/webapps.html">California State University, Dominguez Hills</a> campus.</font><br></body></html>