hp41programs

Atom

Electronic Structure of 118 Atoms for the HP-41


Overview
 

-Given the atomic number Z , the following program displays the electronic configuration of 118 elements
  from Z = 1 ( Hydrogen )  to Z = 118 ( Ununoctium )
 

Program Listing
 

Data Registers:     R00 = Z = Atomic Number                    Registers R01 thru R19 contain the number of electrons in each atomic orbital.

                                R01 = 1s       R06 = 4s      R11 = 5p      R16 = 7s                   the atomic orbitals are sorted from the lowest energy ( 1s )
                                R02 = 2s       R07 = 3d      R12 = 6s      R17 = 5f                   to the highest energy ( 7p if  Z < 119 )
                                R03 = 2p      R08 = 4p      R13 = 4f       R18 = 6d                  For Z = 118, these 19 orbitals are filled.
                                R04 = 3s       R09 = 5s      R14 = 5d      R19 = 7p
                                R05 = 3p      R10 = 4d      R15 = 6p                                       R20 & R21: temp
Flag:  F29
Subroutines: /

-Some elements don't follow the simplest rule to fill the atomic orbitals,
  and lines 37 to 128 deal with these exceptions.
-The "append" character is denoted  ~
-Line 175 = one space.
 
 

  01  LBL "ATOM"
  02  STO 00
  03  2
  04  STO 01
  05  STO 02
  06  STO 04
  07  STO 06
  08  STO 09
  09  STO 12
  10  STO 16
  11  6
  12  STO 03
  13  STO 05
  14  STO 08
  15  STO 11
  16  STO 15
  17  7
  18  STO 19
  19  10
  20  STO 07
  21  STO 10
  22  STO 14
  23  STO 18
  24  14
  25  STO 13
  26  STO 17
  27  119
  28  RCL 00
  29  -
  30  19
  31  LBL 01
  32  DSE IND X
  33  X=0?
  34  DSE X
  35  DSE Y
  36  GTO 01
  37  RCL 00
  38  ST+ X 
  39  53
  40  -
  41  5
  42  /
  43  X^2
  44  1
  45  X#Y?
  46  CLX
  47  ST- 06
  48  ST+ 07
  49  RCL 00        
  50  46
  51  /
  52  1
  53  X#Y?
  54  CLX
  55  ST- 09
  56  ST+ 10
  57  43
  58  RCL 00
  59  X=Y?
  60  GTO 10
  61  44
  62  -
  63  3
  64  /
  65  X^2
  66  1
  67  X<Y?
  68  CLX
  69  ST- 09
  70  ST+ 10
  71  RCL 00
  72  58
  73  X=Y?
  74  GTO 02
  75  DSE X
  76  X=Y?
  77  GTO 02
  78  7
  79  +
  80  X#Y?
  81  GTO 03
  82  LBL 02
  83  SIGN
  84  ST- 13
  85  ST+ 14
  86  LBL 03
  87  RCL 00        
  88  ST+ X
  89  157
  90  -
  91  X^2
  92  1
  93  X#Y?
  94  CLX
  95  ST- 12
  96  ST+ 14
  97  RCL 00
  98  91
  99  -
100  2
101  /
102  X^2
103  1
104  X<Y?
105  CLX
106  ST- 17
107  ST+ 18
108  RCL 00
109  93
110  -
111  3
112  /
113  X^2
114  1
115  X#Y?
116  CLX
117  ST- 17
118  ST+ 18
119  RCL 00
120  ST+ X
121  221
122  -
123  X^2
124  1
125  X#Y?
126  CLX
127  ST- 16
128  ST+ 18
129  LBL 10
130  CLX
131  STO 20        
132  FIX 0
133  CF 29
134  RCL 01
135  XEQ 02
136  CLST
137  RCL 03
138  RCL 02
139  XEQ 02
140  CLST
141  RCL 07
142  RCL 05
143  RCL 04
144  XEQ 02
145  RCL 13
146  RCL 10
147  RCL 08
148  RCL 06
149  XEQ 02
150  RCL 17
151  RCL 14
152  RCL 11
153  RCL 09
154  XEQ 02
155  CLST
156  RCL 18
157  RCL 15
158  RCL 12
159  XEQ 02
160  CLST
161  RCL 19
162  RCL 16
163  XEQ 02
164  GTO 03
165  LBL 02
166  X=0?
167  RTN
168  XEQ 02
169  AVIEW
170  COS
171  COS
172  COS
173  RTN
174  LBL 02
175  " "
176  ISG 20         
177  CLX
178  ARCL 20
179  ASTO 21
180  "~S"
181  ARCL X
182  RDN
183  X=0?
184  RTN
185  ARCL 21
186  "~P"
187  ARCL X
188  RDN
189  X=0?
190  RTN
191  ARCL 21
192  "~D"
193  ARCL X
194  RDN
195  X=0?
196  RTN
197  ARCL 21
198  "~F"
199  ARCL X
200  RTN
201  LBL 03
202  FIX 4
203  SF 29
204  CLA
205  END

 
    ( 307 bytes / SIZE 022 )
 
 

        STACK          INPUT        OUTPUT
             X  Z = atomic number               /

     ( with  0 < Z < 119 )

 
Examples:     Z = 43 ( Technetium )   ,   Z = 78  ( Platinium )

   43  XEQ "ATOM"  and  the HP-41 displays:

        1S2
        2S2 2P6
        3S2 3P6 3D10
        4S2 4P6 4D5
        5S2

-The electronic structure is usually denoted:    1s22s22p63s23p63d104s24p64d55s2

     78    R/S   yields

            1S2
            2S2 2P6
            3S2 3P6 3D10
            4S2 4P6 4D10 4F14
            5S2 5P6 5D9
            6S1

-And the electronic structure is:   1s22s22p63s23p63d104s24p64d104f145s25p65d96s1

Notes:

-Execution times vary between 6 seconds ( for Z = 118 ) to 30 seconds ( for Z = 1 )
-The structure is displayed layer after layer.
-Lines 170-171-172 are only useful to slow down execution between 2 AVIEWs
-Press XEQ 10 to display the configuration again.
-Set flag F21 if you want to stop the calculator at each AVIEW

-For Z = 58 ( Cerium ) this program yields    1s22s22p63s23p63d104s24p64d104f15s25p65d16s2          both configurations have
          but another source gives                        1s22s22p63s23p63d104s24p64d104f25s25p66s2                almost the same energy!

-If you prefer the second structure, replace lines  71 thru 86  by

  RCL 00   ST+ X   121   -   7   /   X^2   1   X#Y?   CLX   ST- 13   ST+ 14

-For  Z = 111 ( Roentgenium ),
           this program gives                  1s22s22p63s23p63d104s24p64d104f145s25p65d105f146s26p66d107s1     ( it seems to be the most probable structure )
           but it could be also                 1s22s22p63s23p63d104s24p64d104f145s25p65d105f146s26p66d97s2

-If you want to get this output, replace lines 119 thru 123  by  RCL 00   110   /
 
 

Reference:

[1]  "Periodic Table of the Elements" - Los Alamos National Laboratory -  cf   www.lanl.gov