H2SPECTRE version 7.4 (12.10.2022)

The program is a result of collective efforts of:
J. Komasa, M. Puchalski -- Adam Mickiewicz University, Poznan, Poland
P. Czachorowski, G. Lach, K. Pachucki -- University of Warsaw, Warsaw, Poland

H2SPECTRE returns dissociation and transition energies of bound rovibrational levels for all isotopologues 
of hydrogen molecule in the ground electronic state. It serves as a means of making the theoretical data 
for H2 obtained by our group available to scientific community.

The underlying theory is described in:
[1] J. Komasa, M. Puchalski, P. Czachorowski, G. Lach, K. Pachucki, Phys. Rev. A 100, 032519 (2019)

***********************************************************************************************************************

To compile, type "make" (tested on gfortran 6.3 and newer).

USAGE:  H2spectre.exe [command-line options] < input_file
   or:  H2spectre.exe < input_file [command-line options]
   or:  H2spectre.exe [command-line options] (and provide the input by hand;
         'input.txt', 'input2.txt', and 'input3.txt are examples of the syntax)

***********************************************************************************************************************

Command-line options:
-V 1, -V 2            -- increase verbosity of the program

-N X                  -- change the number of integration grid points ('N' in Section III C of Ref.[1]) 
                         to X (X - integer, 200 is default); it is recommended to test your results
                         by rerunning the program with N increased (preferably with R/N decreased
                         at the same time), especially when investigating weakly bound states 
                         (e.g. (14,4) for H2); as a rule of thumb, it is not advisable to use R/N
                         longer than the default R/N=0.05, particularly for highly oscillatory states 
                         (with large v)

-R X                  -- change the integration distance (R_N in Eq. 44) to X 
                         (X - real number, 10.0 is default); it is recommended to test your results
                         by rerunning with R increased; see also the above comments for -N 

-P X                  -- set the precision of the output to X digits after 
                         the decimal dot (X - nonnegative integer);
                         the default behaviour is to assess the output precision
                         basing on the uncertainty of the total energy

-E X                  -- change the error estimation method for transitions (X - integer): 
                           0 (default) -- for each contribution take the larger error from the pair
                                          of levels taking part in the transition
                           1           -- relative estimation: the same method as for levels,
                                          but operates on already subtracted (transition) values;
                                          can lead to lesser error bars and is preferable for 
                                          close-lying-state transitions like (0,1)->(0,0), but can give
                                          too small error bars if the radial functions differ much
                                          between the two states
                         NOTE: usually, the accuracy of the potentials is worse for the long-distance
                               points, so our error estimates for highly excited levels can be inaccurate.
                               More details on uncertainty estimation can be found in Ref.[1], as well
                               as in the 'h2spectr_types.f90' file.

-S/-s                 -- when calculating transitions, store the already calculated levels
                         and reuse them if they appear in further transitions;
                         (this can tremendously speed up big calculations; enabled by default and
                          recommended, the explicit option kept for backwards compatibility)

-Sn/-sn               -- disable the above

-Dv/-dv               -- disable level validity check; by default only those levels that are known to be
                         bound are allowed; it also automatically implies -Sn

--NAPT/--napt         -- force the program to ignore four-body results E2(FULL) and always use E2(NAPT)

--MHz/--mhz           -- display the results in MHz (cm-1 are default units)
 
--wavl                -- additionally print the wavelength of the transition/level (in micrometers)

--PC/--pc             -- print physical constants in use

--cutoff X            -- for the heteronuclear nonadiabatic potential dEnaprim(R) (Eq. 37 in Ref.[1]),
                         the calculated point closest to R=0 is at R=0.05, so it is not reliable at
                         ranges shorter than that; furthermore, it diverges to -infinity, which in
                         extreme cases could lead to unphysical bound states appearing; to prevent 
                         that, in the program dEnaprim(R)=dEnaprim(0.05) for R<0.05; 
                         this parameter changes the 0.05 cutoff value to X (X - real number);
                         see also the discussion below Eq.(38) in Ref.[1]

--HF/--hf             -- evaluates hyperfine splitting parameters in Ramsey notation;
			                   for details see J.Komasa, M.Puchalski, and K.Pachucki, Physical Review A 102, 012814 (2020)

-h/--help             -- print help

********************************************************************************

Contents of this directory:
h2spectr_level.f90    -- 'level' subroutine, with several auxiliary 
                         procedures

h2spectr_types.f90    -- derived types for data storage, as well as error
                         estimation procedures

data/h2spectr_pot.f90 -- analytic fits available at the moment, as well as
                         the potential interpolation procedure and long range
                         fits

data/{H2.dat,HD.dat,D2.dat} -- currently available four-body energies of 
                         rovibrational levels (in a qv qj E2full[a.u.] format)

data/ma4.dat          -- relativistic BO potential E(4,0)(R)

data/ma4na.dat        -- relativistic nonadiabatic potential 
                         2*mu_n*E(4,1)(R)

data/ma6.dat          -- HQED potential E(6,0)(R)

data/lnK.dat          -- Bethe logarithm potential (since ver. 7.4 replaced by new potentials evaluated by M. Silkowski)

data/araki.dat        -- Araki-Sucher term potential (since ver. 7.4 replaced by new potentials evaluated by M. Silkowski)

data/delta_ia.dat     -- sum of all electron-nucleus Dirac delta potentials 
                         for E_FS and E(7) (since ver. 7.4 replaced by new potentials evaluated by M. Silkowski)
data/delta_12.dat     -- electron-electron Dirac delta potential (since ver. 7.4 replaced by new potentials evaluated by M. Silkowski)

data/dEnaprim.dat     -- the heteronuclear nonrelativistic nonadiabatic 
                         correction potential

data/cpHD.dat         -- the hyperfine potentials for HD and HT as well as for H2 and D2 molecules
data/cdHD.dat
data/d2HD.dat
data/cpHT.dat
data/ctHT.dat
data/cpH2.dat
data/cdD2.dat

data/README.txt       -- information about the sources of the potentials

lapack/               -- BLAS&LAPACK (3.8.0) procedures needed from 
                         http://www.netlib.org/blas and 
                         http://www.netlib.org/lapack 
                         (see 'lapack/LICENSE' file)

pppack/               -- PPPACK interpolation procedures 
                         from http://www.netlib.org/pppack
                         (based on 'A Practical Guide to Splines' by 
                         C. de Boor; see particular files for details)

h2spectre.f90              -- source of the main 'black box' program for 
                              calculating transitions & levels (H2spectre.exe)

Makefile                   -- issue 'make' to compile the program

README.txt                 -- this information

CHANGELOG.txt              -- list of changes in subsequent versions of the code

input.txt                  -- example of an input file for H2spectre.exe;
                              './H2spectre.exe -E 1 <input.txt' should yield:

Sample outputs obtained with older versions of H2Spectre

 H2     Transitions                   

 v' =  0   J' =  1    -->   v" =  0   J" =  0
      Total             118.4868128    1.2E-06
 ---------------------------------------------

 v' =  3   J' =  5    -->   v" =  0   J" =  3
      Total           12559.749408    7.9E-05
 ---------------------------------------------

 v' =  1   J' =  0    -->   v" =  0   J" =  0
      Total            4161.166122    2.6E-05
 ---------------------------------------------

If you need the results in MHz, the program can do the conversion for you.
'./H2spectre.exe -E 1 --mhz  <input.txt' should yield:

 H2     Transitions                   

 v' =  0   J' =  1    -->   v" =  0   J" =  0
      Total         3552145.284    3.7E-02
 ---------------------------------------------

 v' =  3   J' =  5    -->   v" =  0   J" =  3
      Total       376531814.7    2.4E+00
 ---------------------------------------------

 v' =  1   J' =  0    -->   v" =  0   J" =  0
      Total       124748621.97    7.7E-01
 ---------------------------------------------

i

********************************************************************************
input2.txt                -- another example of an input file for H2spectre.exe;
                             './H2spectre.exe -V 2 <input2.txt' should yield:

(Int. points=  200 , Int. range= 10.0)
 ---------------------------------------------
 H2     Levels                        

 v' =  0   J' =  0
  Contribution      Value[cm-1]     Error[cm-1]
      E2(FULL)        36118.79774    1.0E-07
      E4                 -0.53121    2.4E-06
        E4(BO)           -0.53313
        E4(rec)           0.00237
        E4(2nd)          -0.00045
      E5                 -0.19502    2.3E-04
      E6                 -0.00206    6.6E-06
        E6(BO)           -0.00207
        E6(2nd)           0.00001
      E7                  0.00010    2.5E-05
      Efs                -0.00003    1.4E-07
      Total           36118.06952    2.4E-04
 ---------------------------------------------

 v' =  0   J' =  1
  Contribution      Value[cm-1]     Error[cm-1]
      E2(FULL)        36000.31248    1.0E-07
      E4                 -0.53380    2.4E-06
        E4(BO)           -0.53571
        E4(rec)           0.00236
        E4(2nd)          -0.00045
      E5                 -0.19400    2.3E-04
      E6                 -0.00205    6.6E-06
        E6(BO)           -0.00206
        E6(2nd)           0.00001
      E7                  0.00010    2.5E-05
      Efs                -0.00003    1.4E-07
      Total           35999.58271    2.3E-04
 ---------------------------------------------
********************************************************************************
input3.txt                -- another example of an input file for H2spectre.exe,
                             illustrating the calculation for a weakly bound state;
                             './H2spectre.exe -V 1 <input3.txt' should yield:

(Int. points=  200 , Int. range= 10.0)
 ---------------------------------------------
 H2     Level                         

 v' = 14   J' =  4
 Weakly bound level involved. Caution advised.
 Error can be bigger than the estimate given.
  Contribution      Value[cm-1]     Error[cm-1]
      E2(NAPT)           -1.93290    1.0E-03
      E4                 -0.06699    6.1E-07
      E5                 -0.00185    2.2E-06
      E6                 -0.00003    1.6E-07
      E7                  0.00000    3.9E-07
      Efs                -0.00000    2.2E-09
      Total              -2.00177    1.0E-03
 ---------------------------------------------

The negative total dissociation energy implies that the state is not bound. In fact, 
the wavefunction just decays more slowly and it needs an increased integration range 
(number of grid points is also increased to keep the R/N ratio at least the same).

'./H2spectre.exe -V 1 -N 1000 -R 50.0 <input3.txt' should yield:

(Int. points= 1000 , Int. range= 50.0)
 ---------------------------------------------
 H2     Level                         

 v' = 14   J' =  4
 Weakly bound level involved. Caution advised.
 Error can be bigger than the estimate given.
  Contribution      Value[cm-1]     Error[cm-1]
      E2(NAPT)            0.08872    9.1E-04
      E4                 -0.05979    1.1E-06
      E5                 -0.00159    1.9E-06
      E6                 -0.00001    1.4E-07
      E7                  0.00000    3.4E-07
      Efs                -0.00000    2.0E-09
      Total               0.02733    9.1E-04
 ---------------------------------------------

The calculation takes a bit more time now, but the level is described correctly
as bound.

