' A PROGRAM TO CALCULATE THE HYDROGEN HYPERFINE ENERGY LEVELS USING THE NEW PTV THEORY ' THE A AND B VALUES HAVE BEEN MANUALLY INSERTED FROM OPTIMIZATION PROGRAM ' Dr Barry R. Clarke (aleteller@barryispuzzled.com) ' CODATA (June 2019) alpha1 = 0.0072973525693 ' NIST: fine structure constant alpha2 = alpha1*alpha1 ' square of alpha1 Rydfreq = 3289841960.2508 ' (MHz) NIST: Rydberg frequency, (1/2)*mo*alpha2*clight^2*10^(-6)/h Me = 9.1093837015*10^(-31) ' (kg) NIST: electron rest mass clight = 299792458 ' (m/s), speed of light, CODATA M = 0.000544617021488 ' NIST: e- to p+ rest mass ratio pi = 3.141592653589793 h = 6.62607015*10^(-34) '(J/Hz) Planck constant, CODATA ' OUTPUT TEMPLATES template1$ = "###################.######" template2$ = "#############.##########" template3$ = "######.################" print "" print " Please wait while writing to PTV_DATA.txt" xlogcoord = 0 ylogcoord = 0 xlogcoordstore = 0 ylogcoordstore = 0 xxlogcoordstore = 0 xylogcoordstore = 0 hfmidpointstore = 0 hfmidcount = 0 hfshifterror = 0 counter = 0 open "PTV_DATA.txt" for output as #PTV print #PTV, "" print #PTV, TIME$(); " ";DATE$() print #PTV, "" print #PTV, "*** A program to calculate hydrogen atom hyperfine levels using the new photonic toroidal vortex (PTV) model ***" print #PTV, " written in Liberty BASIC by Dr Barry R. Clarke, completed 26 April 2026" print #PTV, "" print #PTV, " All equations and tables refer to the following papers." print #PTV, "" print #PTV, " PTV1: Clarke, Barry R., A photonic toroidal vortex model of the hydrogen atom fine structure, Quantum Studies:" print #PTV, " Mathematics and Foundations, 12, article 18 (2025)" print #PTV, " PTV2: Clarke, Barry R., The hydrogen atom hyperfine structure from a photonic toroidal vortex model," print #PTV, " in peer-review (26 April 2026)" print #PTV, "" print #PTV, " EXPERIMENTAL DATA" print #PTV, " Horbatsch, M. and E. A. Hessels, Tabulation of the bound-state energies of atomic hydrogen, Physical Review A 93, 022513 (2016)" print #PTV, "" print #PTV, "_____________________________________________________________________________________________________" print #PTV, "" ' NIST DATA: Hyperfine energy levels (MHz): Horbatsch and Hessels, Phys. Rev. A, 93 (2016, Tables 3 & 4) ' numbered 1-6 for nS1/2, 7-12 for nP1/2, 13-18 nP3/2, 19-24 for nD3/2, 25-30 for nD5/2 for mm = 1 to 2 ' two fifferent values of emult (gamma) for nn = 1 to 30 select case case nn = 1 print #PTV, "1S1/2" NIST0 = 3288087922.4160 '1S(1/2) ionization energy (F=0) NIST1 = 3288086502.0102 '1S(1/2) ionization energy (F=1) n = 1 L = 0 Sp = 1/2 case nn = 2 print #PTV, "2S1/2" NIST0 = 822025577.0922 '2S(1/2) (F=0) NIST1 = 822025399.5354 '2S(1/2) (F=1) n = 2 L = 0 Sp = 1/2 case nn = 3 print #PTV, "3S1/2" NIST0 = 365343617.9043 '3S(1/2) (F=0) NIST1 = 365343565.2949 '3S(1/2) (F=1) n = 3 L = 0 Sp = 1/2 case nn = 4 print #PTV, "4S1/2" NIST0 = 205505309.9525 '4S(1/2) (F=0) NIST1 = 205505287.7579 '4S(1/2) (F=1) n = 4 L = 0 Sp = 1/2 case nn = 5 print #PTV, "5S1/2" NIST0 = 131523180.9882 '5S(1/2) (F=0) NIST1 = 131523169.6246 '5S(1/2) (F=1) n = 5 L = 0 Sp = 1/2 case nn = 6 print #PTV, "6S1/2" NIST0 = 91335431.6017 '6S(1/2) (F=0) NIST1 = 91335425.0256 '6S(1/2) (F=1) n = 6 L = 0 Sp = 1/2 ' *************** case nn = 7 print #PTV, "2P1/2" NIST0 = 822026546.1359 '2P(1/2) (F=0) NIST1 = 822026486.9664 '2P(1/2) (F=1) n = 2 L = 1 Sp = -1/2 case nn = 8 print #PTV, "3P1/2" NIST0 = 365343906.4710 '3P(1/2) (F=0) NIST1 = 365343888.9392 '3P(1/2) (F=1) n = 3 L = 1 Sp = -1/2 case nn = 9 print #PTV, "4P1/2" NIST0 = 205505431.9299 '4P(1/2) (F=0) NIST1 = 205505424.5337 '4P(1/2) (F=1) n = 4 L = 1 Sp = -1/2 case nn = 10 print #PTV, "5P1/2" NIST0 = 131523243.5005 '5P(1/2) (F=0) NIST1 = 131523239.7136 '5P(1/2) (F=1) n = 5 L = 1 Sp = -1/2 case nn = 11 print #PTV, "6P1/2" NIST0 = 91335467.7972 '6P(1/2) (F=0) NIST1 = 91335465.6058 '6P(1/2) (F=1) n = 6 L = 1 Sp = -1/2 case nn = 12 print #PTV, "7P1/2" NIST0 = 67103543.4423 '7P1/2 NIST1 = 67103542.0628 n = 7 L = 1 Sp = -1/2 ' ****************** case nn = 13 print #PTV, "2P3/2" NIST0 = 822015547.4967 '2P(3/2) (F=1) NIST1 = 822015523.8451 '2P(3/2) (F=2) n = 2 L = 1 Sp = 1/2 case nn = 14 print #PTV, "3P3/2" NIST0 = 365340647.6119 '3P(3/2) (F=1) NIST1 = 365340640.6040 '3P(3/2) (F=2) n = 3 L = 1 Sp = 1/2 case nn = 15 print #PTV, "4P3/2" NIST0 = 205504057.1004 '4P(3/2) (F=1) NIST1 = 205504054.1439 '4P(3/2) (F=2) n = 4 L = 1 Sp = 1/2 case nn = 16 print #PTV, "5P3/2" NIST0 = 131522539.5886 '5P(3/2) (F=1) NIST1 = 131522538.0749 '5P(3/2) (F=2) n = 5 L = 1 Sp = 1/2 case nn = 17 print #PTV, "6P3/2" NIST0 = 91335060.4413 '6P(3/2) (F=1) NIST1 = 91335059.5653 '6P(3/2) (F=2) n = 6 L = 1 Sp = 1/2 case nn = 18 ' Table IV print #PTV, "7P3/2" NIST0 = 67103286.9157 NIST1 = 67103286.3640 n = 7 L = 2 Sp = -1/2 ' ******************* case nn = 19 print #PTV, "3D3/2" NIST0 = 365340651.1931 '3D(3/2) (F=1) NIST1 = 365340646.9865 '3D(3/2) (F=2) n = 3 L = 2 Sp = -1/2 case nn = 20 print #PTV, "4D3/2" NIST0 = 205504058.6495 '4D(3/2) (F=1) NIST1 = 205504056.8748 '4D(3/2) (F=2) n = 4 L = 2 Sp = -1/2 case nn = 21 print #PTV, "5D3/2" NIST0 = 131522540.3924 '5D(3/2) (F=1) NIST1 = 131522539.4837 '5D(3/2) (F=2) n = 5 L = 2 Sp = -1/2 case nn = 22 print #PTV, "6D3/2" NIST0 = 91335060.9101 '6D(3/2) (F=1) NIST1 = 91335060.3843 '6D(3/2) (F=2) n = 6 L = 2 Sp = -1/2 case nn = 23 ' Table V print #PTV, "7D3/2" NIST0 = 67103287.2124 NIST1 = 67103286.8813 n = 7 L = 2 Sp = -1/2 case nn = 24 print #PTV, "8D3/2" NIST0 = 51375939.6283 NIST1 = 51375939.4065 n = 8 L = 2 Sp = -1/2 ' *************** case nn = 25 print #PTV, "3D5/2" NIST0 = 365339566.8037 '3D(5/2) (F=2) NIST1 = 365339564.1003 '3D(5/2) (F=3) n = 3 L = 2 Sp = 1/2 case nn = 26 print #PTV, "4D5/2" NIST0 = 205503601.1722 '4D(5/2) (F=2) NIST1 = 205503600.0315 '4D(5/2) (F=3) n = 4 L = 2 Sp = 1/2 case nn = 27 print #PTV, "5D5/2" NIST0 = 131522306.1639 '5D(5/2) (F=2) NIST1 = 131522305.5800 '5D(5/2) (F=3) n = 5 L = 2 Sp = 1/2 case nn = 28 print #PTV, "6D5/2" NIST0 = 91334925.3612 '6D(5/2) (F=2) NIST1 = 91334925.0233 '6D(5/2) (F=3) n = 6 L = 2 Sp = 1/2 case nn = 29 ' 7D5/2 print #PTV, "7D5/2" NIST0 = 67103201.8522 NIST1 = 67103201.6394 n = 7 L = 2 Sp = 1/2 case nn = 30 ' 8D5/2 print #PTV, "8D5/2" NIST0 = 51375882.4437 NIST1 = 51375882.3011 n = 8 L = 2 Sp = 1/2 end select ' hyperfine k values, PTV2 Table 5 select case case nn>=1 and nn<=6 ' nS1/2 mult = 1 case nn>=7 and nn<=12 ' nP1/2 mult = 1/3 case nn>=13 and nn<=18 ' nP3/2 mult = 2/15 case nn>=19 and nn<=24 ' nD3/2 mult = 2/25 case nn>=25 and nn<=30 ' nD5/2 mult = 25/486 end select ' Sommerfeld fine structure quantum numbers na = L + Sp + 0.5 ' azimuthal quantum number nr = n - na ' radial quantum number Y = nr + sqr(na*na - alpha2) ' PTV1 Eq. (39) Y2 = Y*Y print #PTV, "QUANTUM NUMBERS" print #PTV, "(1) Quantum Mechanics: n = ";n;" L = ";L;" Sp = ";Sp;" Sommerfeld: n(phi) = ";na;" n(r) = ";nr print #PTV, "" gosub [Sommerfeldfs] gosub [coordinates] ' calculates r2f2 and gives coordinates to evel3 print #PTV, "BOUND STATE DISTANCES (as a muliplier of a fixed radius for all states)" print #PTV, "(2) Horizontal distance between p-e Sp-2 centers = ";using (template3$, Xstore); " PTV1 x-bar Eqs (84)" r2f2 = Xstore^2 + (1 - M)^2 print #PTV, "(3) Shortest distance between p-e Sp-2 centers = ";using (template3$,sqr(r2f2)); " PTV1 d2-bar Eq (86)" krel = sqr(1 - alpha2/(2*(Y^2 + alpha2))) gosub [emultx] ' WE DON'T TAKE THIS AS RELATIVISTIC BECAUSE IT'S PURE Sp-2 evel3 = (1 + emult*M/n)^2 ' nS1/2 print #PTV, "" gosub [MVRfs2] gosub [Hfmodel] gosub [coordinates] gosub [magshift] gosub [printout1] next nn next mm print #PTV, " *** Free license, Barry R. Clarke (aleteller@barryispuzzled.com), 26 April 2026 ***" close #PTV print " " print " Finished" end ' *********************************************************************************************** ' Calculates Sommerfeld's fine structure energies with and without reduced mass in PTV1 Table 1 [Sommerfeldfs] redmass1 = 1/(1 + M) ' reduced mass based on rest masses Somm01 = na^2 - alpha2 ' na is Sommerfeld's azimuthal quantum number Somm02 = sqr(Somm01) Somm03 = nr ' Sommerfeld's radial quantum number Somm04 = alpha1/(Somm02 + Somm03) Somm05 = 1 + Somm04^2 Somm06 = 1/(sqr(Somm05)) Somm07 = 1 - Somm06 SommEnergy = Somm07*redmass1*Rydfreq*2/alpha2 return ' PTV fine structure energy [MVRfs2] evel3a = nr + sqr(na*na - alpha2) evel3b = evel3a*evel3a evel3c = alpha2/(evel3b) evel3d = evel3c/(2*(1 + evel3c)) evel3e = sqr(1 - evel3d) evel3f = evel3b + alpha2 k1 = M/(evel3e) redmass2 = 1/(1 + k1) ' reduced mass with relativistic electron mass evel3aa = nr + sqr(na*na - alpha2*evel3) evel3bb = evel3aa*evel3aa evel3cc = alpha2*evel3/(evel3bb) evel3dd = evel3cc/(2*(1 + evel3cc)) evel3ee = sqr(1 - evel3dd) evel3ff = evel3bb + alpha2*evel3 k2 = M/evel3ee redmass3 = 1/(1 + k2) VortexEnergy0 = Rydfreq/(evel3e*evel3f) ' PTV fine structure with no reduced mass VortexEnergy1 = redmass3*Rydfreq/(evel3ee*evel3ff) ' PTV fine structure with reduced mass VortexEnergy2 = redmass3*evel3*Rydfreq/(evel3ee*evel3ff) ' PTV fine structure with reduced mass and D function (5.9) return ' Proton-electron separation for ring energy equalling intruding proton field energy in C of M frame ' Brute force search for x displacement relative to proton Sp-2 center PTV1 Eq. (85) [coordinates] Xinc = 0 ' initialize increment for X search Xstore = 0 ' initialize memorized value of X for acc = -1 to 14 ' variable controlling decimal place searched for msearch = 0 to 150 ' raised upper limit for high x, only 0-10 reqd for decimal places ' normalised values, divided by r3o Xinc = msearch/10^(acc) ' increment added to previous trial X X = Xstore + Xinc ' stores trial value of X coordinate, as fraction of ground state radius XX = X ' first equation (7.54) (The Vortex Atom: A New Paradigm) R1 = M ' second equation (7.54) R2 = alpha1/sqr(1 - alpha2) ' left side of PTV1 Eq. (85) FX1 = 1 FX2 = n*sqr(1 + alpha2/Y^2)*(1 - alpha2) FX3 = FX1/FX2 Fint1 = 1 - R1 Fint2 = 1 + (XX*XX + R2*R2)/(Fint1*Fint1) Fint3 = 1/(Fint1*sqr(Fint2)) Fint4 = R2*R2*(XX*XX + Fint1*Fint1)/(Fint1^4*Fint2^2) Fint5 = Fint4*Fint4 Fint = Fint3*(1 + (3/4)*Fint4 + (105/64)*Fint5) FX = FX3*Fint ' right side of PTV1 Eq. (85) Felectron = (0.5/(Y^2 + alpha2))*(1/sqr(1 - alpha2/(2*(Y^2 + alpha2)))) ' minimize Fsearch Fsearch = FX - Felectron if Fsearch < 0 then ' attach marker value to sign of Fsearch mark = 0 else mark = 1 end if if msearch > 0 then ' only compare Fsearch sign with previous one only after first pass if mark <> storemark then Xstore = Xstore + (msearch - 1)/10^acc ' return to previous digit in search msearch = 10 end if end if storemark = mark ' store present Fsearch sign next msearch next acc return [Hfmodel] Hfsummary1 = 2*n^2*pi*Rydfreq*alpha1^3 Hfsummary2 = sqr(r2f2)^3*(1 - alpha2)^(3/2)*Y*sqr(Y^2 + alpha2)*sqr(2) Hfshift = mult*Hfsummary1/Hfsummary2 return ' Calculation of PTV2 Eq. (22) using A and B values in PTV2 Table 2 [emultx] select case case (nn >= 1 and nn <= 6) if mm = 1 then emult = 1.006942700 ' nS1/2 B = -3.0000421859595 end if if mm = 2 then emult = -0.549012 ' nS1/2 B = -2.999976494243 end if case (nn >= 7 and nn <= 12) if mm = 1 then emult = 0.55773890261 ' nP1/2 B = -3.00000946384 end if if mm = 2 then emult = -0.20481644002 ' nP1/2 B = -3.000001596923 end if case (nn >= 13 and nn <= 18) if mm = 1 then emult = 0.48878536995 ' nP3/2 B = -3.00000976361 end if if mm = 2 then emult = -0.23361014241 ' nP3/2 B = -3.000002303498 end if case (nn >= 19 and nn <= 24) if mm = 1 then emult = 0.3957755 ' nD3/2 B = -3.000004673972 end if if mm = 2 then emult = -0.1836735 ' nD3/2 B = -3.000002402484 end if case (nn >= 25 and nn <= 30) if mm = 1 then emult = 0.37459705 ' nD5/2 B = -3.000004778242 end if if mm = 2 then emult = -0.1950811 ' nD5/2 B = -3.0000023717 end if end select return [printout1] print #PTV, " gamma = ";using(template3$, emult) print #PTV, "" print #PTV, "FINE STRUCTURE (ALL ENERGIES IN MHz)" print #PTV, "(4) Sommerfeld f-s energy no adjustments = ";using (template1$, SommEnergy/redmass1) print #PTV, "(5) New PTV f-s energy no adjustments = ";using (template1$, VortexEnergy0);" PTV1 Eq (54)" print #PTV, "(6) Sommerfeld f-s energy reduced mass = ";using (template1$, SommEnergy) print #PTV, "(7) Relativistic reduced mass multiplier = ";using (template3$,redmass3); " PTV2 (1 + Mr)^(-1) Eq (13)" print #PTV, "(8) New PTV f-s energy relativ. reduced mass = ";using (template1$, VortexEnergy1);" PTV2 (D = 1) Eq (13)" print #PTV, "(9) Velocity D multiplier = ";evel3; " PTV2 Eq (13)" print #PTV, "(10) New PTV f-s energy with relativistic reduced mass " print #PTV, " and adjusted velocity = ";using (template1$, VortexEnergy2); " PTV2 Eqs (12)/(13)" print #PTV, "" print #PTV, "MAGNETIC POTENTIAL ADJUSTMENT (ALL ENERGIES IN MHz)" print #PTV, "(11) Average h-f energy = "; using (template1$, (NIST0 + NIST1)/2);" Horbatsch and Hessels (2016)" print #PTV, "(12) Difference between PTV f-s with corrections" print #PTV, " and average h-f energy (magnitude) = "; using (template1$, (abs(VortexEnergy2 - (NIST0 + NIST1)/2))) print #PTV, "(13) Magnetic potential adjustment = "; using (template1$, exitsh1);" PTV2 Eq (22) & Tables 2 and 3" if emult > 0 then ' F=1 (low freq) partscalc0 = NIST1/( NIST1 - (VortexEnergy2 - Hfshift + exitsh1)) aa01 = abs(VortexEnergy2 - (NIST0 + NIST1)/2 - exitsh1) print #PTV, "(14) H-f mid-point error magnitude = "; using (template1$, aa01);" PTV2 Eq (24) & Table 2" print #PTV, "(15) H-f mid-point PTV = "; using (template1$, (abs(VortexEnergy2 + exitsh1))) print #PTV, "" print #PTV, "HYPERFINE SHIFT (ALL ENERGIES IN MHz)" print #PTV, "(16) Lower h-f energy from experiment = "; using (template1$, NIST1);" Horbatsch and Hessels (2016)" print #PTV, "(17) Lower h-f energy calculated from PTV = "; using (template1$, VortexEnergy2 + exitsh1 - Hfshift);" PTV2 Eqs (12)/(13) plus Eq. (24) minus Eq. (35)" print #PTV, "(18) Deviation of PTV from experiment is one part in ";using (template1$, abs(partscalc0)) print #PTV, "(19) H-f difference taken from experiment = ";using (template1$, (NIST0 - NIST1)/2);" Horbatsch and Hessels (2016)" print #PTV, "(20) H-f difference calculated from PTV = ";using (template1$, Hfshift);" PTV2 Eq. (35)" print #PTV, "(21) H-f error magnitude = ";using (template1$, abs(Hfshift - (NIST0 - NIST1)/2)) print #PTV, "(22) A/gamma = ";using (template2$, A/emult) hfmidpointstore = hfmidpointstore + aa01 counter = counter + 1 end if ' *************** if emult < 0 then ' F=0 (high freq) partscalc1 = NIST0/( NIST0 - (VortexEnergy2 + Hfshift + exitsh1)) bb01 = abs(VortexEnergy2 - (NIST0 + NIST1)/2 + exitsh1) print #PTV, "(14) H-f mid-point error magnitude = "; using (template1$, bb01) print #PTV, "(15) H-f mid-point PTV = "; using (template1$, (abs(VortexEnergy2 + exitsh1))) print #PTV, "" print #PTV, "HYPERFINE SHIFT (ALL ENERGIES IN MHz)" print #PTV, "(16) Higher h-f energy from experiment = "; using (template1$, NIST0);" Horbatsch and Hessels (2016)" print #PTV, "(17) Higher h-f energy calculated from PTV = "; using (template1$, VortexEnergy2 + exitsh1 + Hfshift);" PTV2 Eqs (12)/(13) plus Eq. (22) minus Eq. (35)" print #PTV, "(18) Deviation of PTV from experiment is one part in ";using (template1$, abs(partscalc1)) print #PTV, "(19) H-f difference taken from experiment = ";using (template1$, (NIST0 - NIST1)/2);" Horbatsch and Hessels (2016)" print #PTV, "(20) H-f difference calculated from PTV = ";using (template1$, Hfshift);" PTV2 Eq. (35)" print #PTV, "(21) H-f error magnitude = ";using (template1$, abs(Hfshift - (NIST0 - NIST1)/2)) print #PTV, "(22) A/gamma = ";using (template2$, A/emult) hfmidpointstore = hfmidpointstore + bb01 counter = counter + 1 end if if mm = 1 then hfshifterror = hfshifterror + abs(Hfshift - (NIST0 - NIST1)/2) hfmidcount = hfmidcount + 1 end if print #PTV, "" print #PTV, "_____________________________________________________________________________________________________" print #PTV, "" return [magshift] select case case (nn >= 1 and nn <= 6) if emult > 0 then A = -28923705.16563 ' no relativistic mass in evel3 exitsh1 = A*(sqr(r2f2))^(-3.0000421859595) ' emult = 1.0069427 OK end if if emult < 0 then A = 15666540.39306 exitsh1 = A*(sqr(r2f2))^(-2.999976494243) ' emult = -0.549012 OK end if case (nn >= 7 and nn <= 12) if emult > 0 then A = -15981616.6169 exitsh1 = A*(sqr(r2f2))^(-3.00000946384) end if if emult < 0 then A = 5870876.7450 exitsh1 = A*(sqr(r2f2))^(-3.000001596923) end if case (nn >= 13 and nn <= 18) if emult > 0 then A = -14008000.6385 exitsh1 = A*(sqr(r2f2))^(-3.00000976361) end if if emult < 0 then A = 6693635.451 exitsh1 = A*(sqr(r2f2))^(-3.000002303498) end if case (nn >= 19 and nn <= 24) if emult > 0 then A = -11341280.0376 exitsh1 = A*(sqr(r2f2))^(-3.000004673972) end if if emult < 0 then A = 5263782.149 exitsh1 = A*(sqr(r2f2))^(-3.000002402484) end if case (nn >= 25 and nn <= 30) if emult > 0 then A = -10734985.1348 exitsh1 = A*(sqr(r2f2))^(-3.000004778242) end if if emult < 0 then A = 5590077.3226 exitsh1 = A*(sqr(r2f2))^(-3.0000023717) end if end select return ' *** END OF PROGRAM ***