constants.F90 Source File


This file depends on

sourcefile~~constants.f90~~EfferentGraph sourcefile~constants.f90 constants.F90 sourcefile~precision.f90 precision.F90 sourcefile~constants.f90->sourcefile~precision.f90

Files dependent on this one

sourcefile~~constants.f90~~AfferentGraph sourcefile~constants.f90 constants.F90 sourcefile~basis_library.f90 basis_library.F90 sourcefile~basis_library.f90->sourcefile~constants.f90 sourcefile~basis_tools.f90 basis_tools.F90 sourcefile~basis_tools.f90->sourcefile~constants.f90 sourcefile~basis_tools.f90->sourcefile~basis_library.f90 sourcefile~dft.f90 dft.F90 sourcefile~dft.f90->sourcefile~constants.f90 sourcefile~dft.f90->sourcefile~basis_tools.f90 sourcefile~dft_fuzzycell.f90 dft_fuzzycell.F90 sourcefile~dft.f90->sourcefile~dft_fuzzycell.f90 sourcefile~dft_molgrid.f90 dft_molgrid.F90 sourcefile~dft.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_energy.f90 dft_gridint_energy.F90 sourcefile~dft.f90->sourcefile~dft_gridint_energy.f90 sourcefile~dft_gridint_grad.f90 dft_gridint_grad.F90 sourcefile~dft.f90->sourcefile~dft_gridint_grad.f90 sourcefile~types.f90 types.F90 sourcefile~dft.f90->sourcefile~types.f90 sourcefile~libxc.f90 libxc.F90 sourcefile~dft.f90->sourcefile~libxc.f90 sourcefile~dft_fuzzycell.f90->sourcefile~constants.f90 sourcefile~dft_fuzzycell.f90->sourcefile~basis_tools.f90 sourcefile~dft_fuzzycell.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_molgrid.f90->sourcefile~constants.f90 sourcefile~ecp.f90 ecp.F90 sourcefile~ecp.f90->sourcefile~constants.f90 sourcefile~ecp.f90->sourcefile~basis_tools.f90 sourcefile~get_basis_overlap.f90 get_basis_overlap.F90 sourcefile~get_basis_overlap.f90->sourcefile~constants.f90 sourcefile~get_basis_overlap.f90->sourcefile~basis_tools.f90 sourcefile~c_interop.f90 c_interop.F90 sourcefile~get_basis_overlap.f90->sourcefile~c_interop.f90 sourcefile~int1.f90 int1.F90 sourcefile~get_basis_overlap.f90->sourcefile~int1.f90 sourcefile~get_basis_overlap.f90->sourcefile~types.f90 sourcefile~grd2.f90 grd2.F90 sourcefile~grd2.f90->sourcefile~constants.f90 sourcefile~grd2.f90->sourcefile~basis_tools.f90 sourcefile~grd2.f90->sourcefile~dft_molgrid.f90 sourcefile~grd2_rys.f90 grd2_rys.F90 sourcefile~grd2.f90->sourcefile~grd2_rys.f90 sourcefile~int2.f90 int2.F90 sourcefile~grd2.f90->sourcefile~int2.f90 sourcefile~int2_pairs.f90 int2_pairs.F90 sourcefile~grd2.f90->sourcefile~int2_pairs.f90 sourcefile~grd2.f90->sourcefile~types.f90 sourcefile~grd2_rys.f90->sourcefile~constants.f90 sourcefile~grd2_rys.f90->sourcefile~basis_tools.f90 sourcefile~rys.f90 rys.F90 sourcefile~grd2_rys.f90->sourcefile~rys.f90 sourcefile~grd2_rys.f90->sourcefile~int2_pairs.f90 sourcefile~hf_gradient.f90 hf_gradient.F90 sourcefile~hf_gradient.f90->sourcefile~constants.f90 sourcefile~hf_gradient.f90->sourcefile~basis_tools.f90 sourcefile~hf_gradient.f90->sourcefile~dft.f90 sourcefile~hf_gradient.f90->sourcefile~dft_molgrid.f90 sourcefile~hf_gradient.f90->sourcefile~grd2.f90 sourcefile~hf_gradient.f90->sourcefile~c_interop.f90 sourcefile~grd1.f90 grd1.F90 sourcefile~hf_gradient.f90->sourcefile~grd1.f90 sourcefile~printing.f90 printing.F90 sourcefile~hf_gradient.f90->sourcefile~printing.f90 sourcefile~hf_gradient.f90->sourcefile~types.f90 sourcefile~huckel.f90 huckel.F90 sourcefile~huckel.f90->sourcefile~constants.f90 sourcefile~huckel.f90->sourcefile~basis_tools.f90 sourcefile~guess.f90 guess.F90 sourcefile~huckel.f90->sourcefile~guess.f90 sourcefile~huckel.f90->sourcefile~int1.f90 sourcefile~huckel.f90->sourcefile~types.f90 sourcefile~int1e.f90 int1e.F90 sourcefile~int1e.f90->sourcefile~constants.f90 sourcefile~int1e.f90->sourcefile~basis_tools.f90 sourcefile~int1e.f90->sourcefile~c_interop.f90 sourcefile~int1e.f90->sourcefile~int1.f90 sourcefile~int1e.f90->sourcefile~printing.f90 sourcefile~int1e.f90->sourcefile~types.f90 sourcefile~int2.f90->sourcefile~constants.f90 sourcefile~int2.f90->sourcefile~basis_tools.f90 sourcefile~int_libint.f90 int_libint.F90 sourcefile~int2.f90->sourcefile~int_libint.f90 sourcefile~int_rotaxis.f90 int_rotaxis.F90 sourcefile~int2.f90->sourcefile~int_rotaxis.f90 sourcefile~int_rys.f90 int_rys.F90 sourcefile~int2.f90->sourcefile~int_rys.f90 sourcefile~int2.f90->sourcefile~int2_pairs.f90 sourcefile~int2.f90->sourcefile~types.f90 sourcefile~int_libint.f90->sourcefile~constants.f90 sourcefile~int_libint.f90->sourcefile~basis_tools.f90 sourcefile~int_libint.f90->sourcefile~int2_pairs.f90 sourcefile~int_rotaxis.f90->sourcefile~constants.f90 sourcefile~int_rotaxis.f90->sourcefile~basis_tools.f90 sourcefile~int_rotaxis.f90->sourcefile~int2_pairs.f90 sourcefile~int_rys.f90->sourcefile~constants.f90 sourcefile~int_rys.f90->sourcefile~basis_tools.f90 sourcefile~int_rys.f90->sourcefile~rys.f90 sourcefile~int_rys.f90->sourcefile~int2_pairs.f90 sourcefile~mod_1e_primitives.f90 mod_1e_primitives.F90 sourcefile~mod_1e_primitives.f90->sourcefile~constants.f90 sourcefile~mod_1e_primitives.f90->sourcefile~rys.f90 sourcefile~mod_shell_tools.f90 mod_shell_tools.F90 sourcefile~mod_1e_primitives.f90->sourcefile~mod_shell_tools.f90 sourcefile~population_analysis.f90 population_analysis.F90 sourcefile~population_analysis.f90->sourcefile~constants.f90 sourcefile~population_analysis.f90->sourcefile~basis_tools.f90 sourcefile~population_analysis.f90->sourcefile~c_interop.f90 sourcefile~population_analysis.f90->sourcefile~types.f90 sourcefile~rys.f90->sourcefile~constants.f90 sourcefile~scf.f90 scf.F90 sourcefile~scf.f90->sourcefile~constants.f90 sourcefile~scf.f90->sourcefile~basis_tools.f90 sourcefile~scf.f90->sourcefile~dft.f90 sourcefile~scf.f90->sourcefile~dft_molgrid.f90 sourcefile~scf.f90->sourcefile~int2.f90 sourcefile~scf.f90->sourcefile~guess.f90 sourcefile~scf.f90->sourcefile~printing.f90 sourcefile~scf.f90->sourcefile~types.f90 sourcefile~scf_converger.f90 scf_converger.F90 sourcefile~scf.f90->sourcefile~scf_converger.f90 sourcefile~tdhf_gradient.f90 tdhf_gradient.F90 sourcefile~tdhf_gradient.f90->sourcefile~constants.f90 sourcefile~tdhf_gradient.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_gradient.f90->sourcefile~dft.f90 sourcefile~tdhf_gradient.f90->sourcefile~dft_molgrid.f90 sourcefile~tdhf_gradient.f90->sourcefile~grd2.f90 sourcefile~tdhf_gradient.f90->sourcefile~c_interop.f90 sourcefile~dft_gridint_tdxc_grad.f90 dft_gridint_tdxc_grad.F90 sourcefile~tdhf_gradient.f90->sourcefile~dft_gridint_tdxc_grad.f90 sourcefile~tdhf_gradient.f90->sourcefile~grd1.f90 sourcefile~tdhf_gradient.f90->sourcefile~printing.f90 sourcefile~tdhf_lib.f90 tdhf_lib.F90 sourcefile~tdhf_gradient.f90->sourcefile~tdhf_lib.f90 sourcefile~tdhf_gradient.f90->sourcefile~types.f90 sourcefile~c_interop.f90->sourcefile~basis_tools.f90 sourcefile~c_interop.f90->sourcefile~types.f90 sourcefile~dft_gridint.f90 dft_gridint.F90 sourcefile~dft_gridint.f90->sourcefile~basis_tools.f90 sourcefile~dft_gridint.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_energy.f90->sourcefile~basis_tools.f90 sourcefile~dft_gridint_energy.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_energy.f90->sourcefile~dft_gridint.f90 sourcefile~dft_gridint_energy.f90->sourcefile~types.f90 sourcefile~dft_gridint_fxc.f90 dft_gridint_fxc.F90 sourcefile~dft_gridint_fxc.f90->sourcefile~basis_tools.f90 sourcefile~dft_gridint_fxc.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_fxc.f90->sourcefile~dft_gridint.f90 sourcefile~dft_gridint_fxc.f90->sourcefile~types.f90 sourcefile~dft_gridint_grad.f90->sourcefile~basis_tools.f90 sourcefile~dft_gridint_grad.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_grad.f90->sourcefile~dft_gridint.f90 sourcefile~dft_gridint_grad.f90->sourcefile~types.f90 sourcefile~dft_gridint_gxc.f90 dft_gridint_gxc.F90 sourcefile~dft_gridint_gxc.f90->sourcefile~basis_tools.f90 sourcefile~dft_gridint_gxc.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_gxc.f90->sourcefile~dft_gridint.f90 sourcefile~dft_gridint_gxc.f90->sourcefile~dft_gridint_fxc.f90 sourcefile~dft_gridint_gxc.f90->sourcefile~types.f90 sourcefile~dft_gridint_tdxc_grad.f90->sourcefile~basis_tools.f90 sourcefile~dft_gridint_tdxc_grad.f90->sourcefile~dft_molgrid.f90 sourcefile~dft_gridint_tdxc_grad.f90->sourcefile~dft_gridint.f90 sourcefile~dft_gridint_tdxc_grad.f90->sourcefile~types.f90 sourcefile~electric_moments.f90 electric_moments.F90 sourcefile~electric_moments.f90->sourcefile~basis_tools.f90 sourcefile~electric_moments.f90->sourcefile~c_interop.f90 sourcefile~electric_moments.f90->sourcefile~int1.f90 sourcefile~electric_moments.f90->sourcefile~types.f90 sourcefile~get_states_overlap.f90 get_states_overlap.F90 sourcefile~get_states_overlap.f90->sourcefile~basis_tools.f90 sourcefile~get_states_overlap.f90->sourcefile~c_interop.f90 sourcefile~tdhf_mrsf_lib.f90 tdhf_mrsf_lib.F90 sourcefile~get_states_overlap.f90->sourcefile~tdhf_mrsf_lib.f90 sourcefile~get_states_overlap.f90->sourcefile~types.f90 sourcefile~grd1.f90->sourcefile~basis_tools.f90 sourcefile~grd1.f90->sourcefile~ecp.f90 sourcefile~grd1.f90->sourcefile~mod_1e_primitives.f90 sourcefile~grd1.f90->sourcefile~mod_shell_tools.f90 sourcefile~grd1.f90->sourcefile~types.f90 sourcefile~guess.f90->sourcefile~basis_tools.f90 sourcefile~guess.f90->sourcefile~types.f90 sourcefile~guess_hcore.f90 guess_hcore.F90 sourcefile~guess_hcore.f90->sourcefile~basis_tools.f90 sourcefile~guess_hcore.f90->sourcefile~c_interop.f90 sourcefile~guess_hcore.f90->sourcefile~guess.f90 sourcefile~guess_hcore.f90->sourcefile~printing.f90 sourcefile~guess_hcore.f90->sourcefile~types.f90 sourcefile~guess_huckel.f90 guess_huckel.F90 sourcefile~guess_huckel.f90->sourcefile~basis_tools.f90 sourcefile~guess_huckel.f90->sourcefile~huckel.f90 sourcefile~guess_huckel.f90->sourcefile~c_interop.f90 sourcefile~guess_huckel.f90->sourcefile~guess.f90 sourcefile~guess_huckel.f90->sourcefile~printing.f90 sourcefile~guess_huckel.f90->sourcefile~types.f90 sourcefile~guess_json.f90 guess_json.F90 sourcefile~guess_json.f90->sourcefile~basis_tools.f90 sourcefile~guess_json.f90->sourcefile~c_interop.f90 sourcefile~guess_json.f90->sourcefile~guess.f90 sourcefile~guess_json.f90->sourcefile~printing.f90 sourcefile~guess_json.f90->sourcefile~types.f90 sourcefile~hf_energy.f90 hf_energy.f90 sourcefile~hf_energy.f90->sourcefile~basis_tools.f90 sourcefile~hf_energy.f90->sourcefile~dft.f90 sourcefile~hf_energy.f90->sourcefile~dft_molgrid.f90 sourcefile~hf_energy.f90->sourcefile~scf.f90 sourcefile~hf_energy.f90->sourcefile~c_interop.f90 sourcefile~hf_energy.f90->sourcefile~printing.f90 sourcefile~hf_energy.f90->sourcefile~types.f90 sourcefile~int1.f90->sourcefile~basis_tools.f90 sourcefile~int1.f90->sourcefile~ecp.f90 sourcefile~int1.f90->sourcefile~mod_1e_primitives.f90 sourcefile~int1.f90->sourcefile~mod_shell_tools.f90 sourcefile~int1.f90->sourcefile~printing.f90 sourcefile~int2_pairs.f90->sourcefile~basis_tools.f90 sourcefile~mod_shell_tools.f90->sourcefile~basis_tools.f90 sourcefile~printing.f90->sourcefile~basis_tools.f90 sourcefile~printing.f90->sourcefile~types.f90 sourcefile~resp.f90 resp.F90 sourcefile~resp.f90->sourcefile~basis_tools.f90 sourcefile~resp.f90->sourcefile~c_interop.f90 sourcefile~resp.f90->sourcefile~int1.f90 sourcefile~resp.f90->sourcefile~types.f90 sourcefile~tdhf_energy.f90 tdhf_energy.F90 sourcefile~tdhf_energy.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_energy.f90->sourcefile~dft.f90 sourcefile~tdhf_energy.f90->sourcefile~dft_molgrid.f90 sourcefile~tdhf_energy.f90->sourcefile~int2.f90 sourcefile~tdhf_energy.f90->sourcefile~c_interop.f90 sourcefile~tdhf_energy.f90->sourcefile~dft_gridint_fxc.f90 sourcefile~tdhf_energy.f90->sourcefile~int1.f90 sourcefile~tdhf_energy.f90->sourcefile~printing.f90 sourcefile~tdhf_energy.f90->sourcefile~tdhf_lib.f90 sourcefile~tdhf_energy.f90->sourcefile~types.f90 sourcefile~tdhf_lib.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_lib.f90->sourcefile~int2.f90 sourcefile~tdhf_lib.f90->sourcefile~types.f90 sourcefile~tdhf_mrsf_energy.f90 tdhf_mrsf_energy.F90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~int2.f90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~c_interop.f90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~printing.f90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~tdhf_lib.f90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~tdhf_mrsf_lib.f90 sourcefile~tdhf_sf_lib.f90 tdhf_sf_lib.F90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~tdhf_sf_lib.f90 sourcefile~tdhf_mrsf_energy.f90->sourcefile~types.f90 sourcefile~tdhf_mrsf_lib.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_mrsf_lib.f90->sourcefile~int2.f90 sourcefile~tdhf_mrsf_lib.f90->sourcefile~types.f90 sourcefile~tdhf_sf_energy.f90 tdhf_sf_energy.F90 sourcefile~tdhf_sf_energy.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_sf_energy.f90->sourcefile~int2.f90 sourcefile~tdhf_sf_energy.f90->sourcefile~c_interop.f90 sourcefile~tdhf_sf_energy.f90->sourcefile~printing.f90 sourcefile~tdhf_sf_energy.f90->sourcefile~tdhf_lib.f90 sourcefile~tdhf_sf_energy.f90->sourcefile~tdhf_sf_lib.f90 sourcefile~tdhf_sf_energy.f90->sourcefile~types.f90 sourcefile~tdhf_sf_lib.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_sf_lib.f90->sourcefile~int1.f90 sourcefile~tdhf_sf_lib.f90->sourcefile~tdhf_lib.f90 sourcefile~tdhf_sf_lib.f90->sourcefile~types.f90 sourcefile~tdhf_z_vector.f90 tdhf_z_vector.F90 sourcefile~tdhf_z_vector.f90->sourcefile~basis_tools.f90 sourcefile~tdhf_z_vector.f90->sourcefile~dft.f90 sourcefile~tdhf_z_vector.f90->sourcefile~dft_molgrid.f90 sourcefile~tdhf_z_vector.f90->sourcefile~int2.f90 sourcefile~tdhf_z_vector.f90->sourcefile~c_interop.f90 sourcefile~tdhf_z_vector.f90->sourcefile~dft_gridint_fxc.f90 sourcefile~tdhf_z_vector.f90->sourcefile~dft_gridint_gxc.f90 sourcefile~tdhf_z_vector.f90->sourcefile~printing.f90 sourcefile~tdhf_z_vector.f90->sourcefile~tdhf_lib.f90 sourcefile~tdhf_z_vector.f90->sourcefile~tdhf_sf_lib.f90 sourcefile~tdhf_z_vector.f90->sourcefile~types.f90 sourcefile~types.f90->sourcefile~basis_tools.f90 sourcefile~apply_basis.f90 apply_basis.F90 sourcefile~apply_basis.f90->sourcefile~c_interop.f90 sourcefile~apply_basis.f90->sourcefile~types.f90 sourcefile~libxc.f90->sourcefile~types.f90 sourcefile~oqp_banner.f90 oqp_banner.F90 sourcefile~oqp_banner.f90->sourcefile~c_interop.f90 sourcefile~oqp_banner.f90->sourcefile~types.f90 sourcefile~scf_converger.f90->sourcefile~printing.f90

Source Code

module constants

   use precision, only: dp

   implicit none

   real(kind=dp), parameter :: pi = 4.0_dp * atan(1.0_dp)
   integer, parameter :: tol_int = 20

!  atomic number
   integer, private :: i

!  angular momentum labels
   character(len=7) :: angular_label = 'SPDFGHI'

!  Boltzmann Constant
   real(kind=dp), parameter :: kB_HaK = 3.166811563e-6_dp

!  number of cartesian bf for each shell kind

   integer, parameter :: BAS_MXANG = 6
   integer, parameter :: BAS_MXCONTR = 30
   integer, parameter :: BAS_MXCART = (BAS_MXANG+1)*(BAS_MXANG+2)/2
   integer, parameter :: NUM_CART_BF(0:BAS_MXANG) = [((i+1)*(i+2)/2, i = 0, BAS_MXANG)]
   !< powers of X,Y,Z in Cartesian Gaussian basis functions
   integer, parameter :: &
    CART_X(BAS_MXCART,0:BAS_MXANG) = reshape([ &
       [0,                                                               (0, i = NUM_CART_BF(0)+1, BAS_MXCART)], &
       [1, 0, 0,                                                         (0, i = NUM_CART_BF(1)+1, BAS_MXCART)], &
       [2, 0, 0, 1, 1, 0,                                                (0, i = NUM_CART_BF(2)+1, BAS_MXCART)], &
       [3, 0, 0, 2, 2, 1, 0, 1, 0, 1,                                    (0, i = NUM_CART_BF(3)+1, BAS_MXCART)], &
       [4, 0, 0, 3, 3, 1, 0, 1, 0, 2, 2, 0, 2, 1, 1,                     (0, i = NUM_CART_BF(4)+1, BAS_MXCART)], &
       [5, 0, 0, 4, 4, 1, 0, 1, 0, 3, 3, 2, 0, 2, 0, 3, 1, 1, 2, 2, 1,   (0, i = NUM_CART_BF(5)+1, BAS_MXCART)], &
       [6, 0, 0, 5, 5, 1, 0, 1, 0, 4, 4, 2, 0, 2, 0, 4, 1, 1, 3, 3, 0, 3, 3, 2, 1, 2, 1, 2]  &
       ], shape(CART_X))
   integer, parameter :: &
    CART_Y(BAS_MXCART,0:BAS_MXANG) = reshape([ &
       [0,                                                              (0, i = NUM_CART_BF(0)+1, BAS_MXCART)], &
       [0, 1, 0,                                                        (0, i = NUM_CART_BF(1)+1, BAS_MXCART)], &
       [0, 2, 0, 1, 0, 1,                                               (0, i = NUM_CART_BF(2)+1, BAS_MXCART)], &
       [0, 3, 0, 1, 0, 2, 2, 0, 1, 1,                                   (0, i = NUM_CART_BF(3)+1, BAS_MXCART)], &
       [0, 4, 0, 1, 0, 3, 3, 0, 1, 2, 0, 2, 1, 2, 1,                    (0, i = NUM_CART_BF(4)+1, BAS_MXCART)], &
       [0, 5, 0, 1, 0, 4, 4, 0, 1, 2, 0, 3, 3, 0, 2, 1, 3, 1, 2, 1, 2,  (0, i = NUM_CART_BF(5)+1, BAS_MXCART)], &
       [0, 6, 0, 1, 0, 5, 5, 0, 1, 2, 0, 4, 4, 0, 2, 1, 4, 1, 3, 0, 3, 2, 1, 3, 3, 1, 2, 2] &
       ], shape(CART_Y))
   integer, parameter :: &
    CART_Z(BAS_MXCART,0:BAS_MXANG) = reshape([ &
       [0,                                                              (0, i = NUM_CART_BF(0)+1, BAS_MXCART)], &
       [0, 0, 1,                                                        (0, i = NUM_CART_BF(1)+1, BAS_MXCART)], &
       [0, 0, 2, 0, 1, 1,                                               (0, i = NUM_CART_BF(2)+1, BAS_MXCART)], &
       [0, 0, 3, 0, 1, 0, 1, 2, 2, 1,                                   (0, i = NUM_CART_BF(3)+1, BAS_MXCART)], &
       [0, 0, 4, 0, 1, 0, 1, 3, 3, 0, 2, 2, 1, 1, 2,                    (0, i = NUM_CART_BF(4)+1, BAS_MXCART)], &
       [0, 0, 5, 0, 1, 0, 1, 4, 4, 0, 2, 0, 2, 3, 3, 1, 1, 3, 1, 2, 2,  (0, i = NUM_CART_BF(5)+1, BAS_MXCART)], &
       [0, 0, 6, 0, 1, 0, 1, 5, 5, 0, 2, 0, 2, 4, 4, 1, 1, 4, 0, 3, 3, 1, 2, 1, 2, 3, 3, 2] &
       ], shape(CART_Z))

!  ao symbol
   integer, private :: iii
   character(len=4), parameter :: bf_names(15,0:5) = reshape([&
                ['  S ', &
                ('    ', iii = num_cart_bf(0)+1, 15)], &
                ['  X ','  Y ','  Z ', &
                ('    ', iii = num_cart_bf(1)+1, 15)], &
                [' XX ',' YY ',' ZZ ',' XY ',' XZ ',' YZ ', &
                ('    ', iii = num_cart_bf(2)+1, 15)], &
                [' XXX',' YYY',' ZZZ',' XXY',' XXZ', &
                 ' YYX',' YYZ',' ZZX',' ZZY',' XYZ', &
                 ('    ', iii = num_cart_bf(3)+1, 15)], &
                ['XXXX','YYYY','ZZZZ','XXXY','XXXZ', &
                 'YYYX','YYYZ','ZZZX','ZZZY','XXYY', &
                 'XXZZ','YYZZ','XXYZ','YYXZ','ZZXY', &
                 ('    ', iii = num_cart_bf(4)+1, 15)], &
                ['????', &
                ('    ', iii = 2, 15)] &
             ], shape(bf_names))

!  canonical order is achieved by ordering angular momentum components (x,y,z)
!  in descending order. For a given total angular momentum L, the components
!  are generated as follows:
!  Example for L = 2:
!     do x = L, 0, -1          ! x descends from L to 0
!         do y = L-x, 0, -1    ! y descends from remaining momentum (L-x) to 0
!             z = L - x - y     ! z takes the remaining momentum
!             ! This generates ordered triplets (x,y,z) where x >= y >= z
!             ! and x + y + z = L
!         end do
!     end do 
!  Last Modified: 2025-02-03 06:00:22 UTC

   integer, parameter :: &
      map_canonical(BAS_MXCART,0:BAS_MXANG) = reshape([ &
      [0,                                                               (0, i = NUM_CART_BF(0)+1, BAS_MXCART)], & ! l = 0 (S)
      [0, 0, 0,                                                         (0, i = NUM_CART_BF(1)+1, BAS_MXCART)], & ! l = 1 (P)
      [0, 2, 3, -2, -2, -1,                                             (0, i = NUM_CART_BF(2)+1, BAS_MXCART)], & ! l = 2 (D)
      [0, 5, 7, -2, -2, -2, 1, -2, 0, -5,                               (0, i = NUM_CART_BF(3)+1, BAS_MXCART)], & ! l = 3 (F)
      [0, 9, 12, -2, -2, 1, 5, 2, 5, -6, -5, 1, -8, -6, -6,             (0, i = NUM_CART_BF(4)+1, BAS_MXCART)], & ! l = 4 (G)
      [0,14,18,-2,-2,5,10,7,11,-6,-5,-5,5,-4,4,-11,-5,-4,-11,-11,-8,    (0, i = NUM_CART_BF(5)+1, BAS_MXCART)], & ! l = 4 (H)
      [0,20,25,-2,-2,10,16,13,18,-6,-5,-1,11,1,11,-11,0,2,-12,-10,4,-14,-14,-12,-7,-12,-8,-15] &
      ],  shape(map_canonical))


! normalization constants
  real(kind=dp), target, save :: shells_pnrm2(28,0:6) = reshape([ &
    [1.0_dp, &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0],  & ! s-shell

    [1.0_dp, 1.0_dp, 1.0_dp, &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0], & ! p-shell

    [1.0_dp, 1.0_dp, 1.0_dp, sqrt(3.0_dp), sqrt(3.0_dp), sqrt(3.0_dp), &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0], & ! d-shell

    [1.0_dp, 1.0_dp, 1.0_dp, sqrt(5.0_dp), sqrt(5.0_dp), sqrt(5.0_dp), sqrt(5.0_dp), sqrt(5.0_dp), &
     sqrt(5.0_dp), sqrt(5.0_dp)*sqrt(3.0_dp), &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, &
     0.0d0, 0.0d0, 0.0d0], & ! f-shell

    [1.0_dp, 1.0_dp, 1.0_dp, sqrt(7.0_dp), sqrt(7.0_dp), sqrt(7.0_dp), sqrt(7.0_dp), &
     sqrt(7.0_dp), sqrt(7.0_dp), sqrt(7.0_dp)*sqrt(5.0_dp)/sqrt(3.0_dp), &
     sqrt(7.0_dp)*sqrt(5.0_dp)/sqrt(3.0_dp), sqrt(7.0_dp)*sqrt(5.0_dp)/sqrt(3.0_dp), &
     sqrt(7.0_dp)*sqrt(5.0_dp), sqrt(7.0_dp)*sqrt(5.0_dp), sqrt(7.0_dp)*sqrt(5.0_dp), &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0], & ! g-shell

    [1.0_dp, 1.0_dp, 1.0_dp, 3.0_dp, 3.0_dp, 3.0_dp, 3.0_dp, 3.0_dp, 3.0_dp, sqrt(7.0_dp)*sqrt(3.0_dp), &
     sqrt(7.0_dp)*sqrt(3.0_dp), sqrt(7.0_dp)*sqrt(3.0_dp), sqrt(7.0_dp)*sqrt(3.0_dp), &
     sqrt(7.0_dp)*sqrt(3.0_dp), sqrt(7.0_dp)*sqrt(3.0_dp), sqrt(7.0_dp)*3.0_dp, &
     sqrt(7.0_dp)*3.0_dp, sqrt(7.0_dp)*3.0_dp, sqrt(3.0_dp)*sqrt(5.0_dp)*sqrt(7.0_dp), &
     sqrt(3.0_dp)*sqrt(5.0_dp)*sqrt(7.0_dp), sqrt(3.0_dp)*sqrt(5.0_dp)*sqrt(7.0_dp), &
     0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0], & ! h-shell

    [1.0_dp, 1.0_dp, 1.0_dp, sqrt(11.0_dp), sqrt(11.0_dp), sqrt(11.0_dp), sqrt(11.0_dp), &
     sqrt(11.0_dp), sqrt(11.0_dp), sqrt(3.0_dp)*sqrt(11.0_dp), &
     sqrt(3.0_dp)*sqrt(11.0_dp), sqrt(3.0_dp)*sqrt(11.0_dp), sqrt(3.0_dp)*sqrt(11.0_dp), &
     sqrt(3.0_dp)*sqrt(11.0_dp), sqrt(3.0_dp)*sqrt(11.0_dp), &
     3.0_dp*sqrt(11.0_dp), 3.0_dp*sqrt(11.0_dp), 3.0_dp*sqrt(11.0_dp), &
     sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp)/sqrt(5.0_dp), &
     sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp)/sqrt(5.0_dp), &
     sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp)/sqrt(5.0_dp), sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp), &
     sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp), sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp), &
     sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp), sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp), &
     sqrt(3.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp), sqrt(5.0_dp)*sqrt(7.0_dp)*sqrt(11.0_dp)] &! i-shell
    ], shape = [28,7])

  contains

end module constants