Multidip 1.0
Multi-photon matrix elements
Loading...
Searching...
No Matches
multidip_params.F90
Go to the documentation of this file.
1! Copyright 2020
2!
3! For a comprehensive list of the developers that contributed to these codes
4! see the UK-AMOR website.
5!
6! This file is part of UKRmol-out (UKRmol+ suite).
7!
8! UKRmol-out is free software: you can redistribute it and/or modify
9! it under the terms of the GNU General Public License as published by
10! the Free Software Foundation, either version 3 of the License, or
11! (at your option) any later version.
12!
13! UKRmol-out is distributed in the hope that it will be useful,
14! but WITHOUT ANY WARRANTY; without even the implied warranty of
15! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16! GNU General Public License for more details.
17!
18! You should have received a copy of the GNU General Public License
19! along with UKRmol-out (in source/COPYING). Alternatively, you can also visit
20! <https://www.gnu.org/licenses/>.
21!
22!> \brief Hard-coded parameters of MULTIDIP
23!> \author J Benda
24!> \date 2020 - 2024
25!>
26!> This module contains mathematical and physical, as well as algorithmical parameters. The latter ones may make it
27!> to the input namelist some day. At the moment their casual use is considered advanced.
28!>
30
31 use precisn_gbl, only: wp
32
33 implicit none
34
35 integer, parameter :: ntermsasy = 5 !< Number of terms in expansion of the Coulomb-Hankel functions
36 integer, parameter :: ntermsppt = 3 !< Number of terms in expansion of the exponential integral
37 integer, parameter :: nmaxphotons = bit_size(0) !< The limit on number of photons is `nested_cgreen_integ`
38 integer, parameter :: max_romb_level = 20 !< Maximal nesting level for Romberg integration
39 integer, parameter :: max_levin_level = 20 !< Maximal nesting level for Levin integration
40 integer, parameter :: cheb_order = 5 !< Order of Chebyshev interpolation used in Levin quadrature
41
42 integer :: maxtarg = 0 !< Maximal number of target states to calculate dipoles for (0 = all)
43 logical :: cache_integrals = .false. !< Cache Coulomb-Green integrals in memory (but disables some threading)
44 logical :: check_dipoles = .true. !< Check that all dipole matrices in molecular_data are nonzero
45 logical :: closed_interm = .false. !< Consider weakly closed channel in intermediate states (unfinished!)
46 logical :: coulomb_check = .true. !< Skip integrals that cannot be asymptotically approximated well
47 logical :: print_warnings = .true. !< Print warnings about non-converged integrals
48 logical :: custom_kmatrices = .false. !< Ignore RSOLVE K-matrices and calculate them from scratch
49 logical :: extend_istate = .false. !< Continue initial state from the known inner region expansion outwards
50 logical :: ion_ion_analytic = .true. !< Integrate one-dimensional ion-ion integrals using a closed-form formula
51 integer :: num_integ_algo = 2 !< Numerical integration mode (1 = Romberg, 2 = Levin)
52 real(wp) :: epsrel = 1e-6 !< Romberg integration relative tolerance for convergence
53 real(wp) :: coultol = 1e-4 !< Coulomb matching relative tolerance (decides whether to use asym. forms)
54 real(wp) :: closed_range = 5.0 !< Energy interval (a.u.) before threshold for inclusion of closed channels
55
56 real(wp), parameter :: alpha = 1/137.03599907_wp !< Fine structure constant
57 real(wp), parameter :: rzero = 0
58 real(wp), parameter :: rone = 1
59 real(wp), parameter :: rhalf = 0.5
60 real(wp), parameter :: pi = 4*atan(1.0_wp)
61
62 complex(wp), parameter :: czero = 0
63 complex(wp), parameter :: cone = 1
64 complex(wp), parameter :: imu = (0, 1)
65
66 character(len=1), parameter :: compt(3) = ['x', 'y', 'z']
67
68 integer, parameter :: carti(3) = [3, 1, 2] !< Position of a Cartesian coordinate in the real spherical basis (y, z, x).
69 integer, parameter :: cartm(3) = [+1, -1, 0] !< Real spherical harmonic m-value corresponding to given a Cartesian coord.
70
71contains
72
73 subroutine read_input_namelist (input, order, lusct, lukmt, lubnd, nkset, polar, omega, verbose, rmt_data, first_IP, rasym, &
74 raw, erange, mpiio, gpu, lab_polar, lu_pw_dipoles)
75
76 integer, intent(in) :: input
77 integer, intent(inout) :: order, lusct(8), lukmt(8), lubnd, nkset(8), erange(2), lab_polar(nMaxPhotons), lu_pw_dipoles
78 logical, intent(inout) :: verbose, mpiio, gpu
79 real(wp), intent(inout) :: omega(nMaxPhotons), first_IP, rasym
80 complex(wp), intent(inout) :: polar(3, nMaxPhotons)
81 character(len=256), intent(inout) :: rmt_data, raw
82
83 namelist /mdip/ order, lusct, lukmt, lubnd, nkset, polar, omega, verbose, rmt_data, first_ip, rasym, raw, erange, mpiio, &
86 lab_polar, lu_pw_dipoles
87
88 order = 1
89 lusct = 0
90 lukmt = 0
91 lubnd = 0
92 nkset = 1
93 polar = 0
94 omega = 0
95 rasym = 100
96 first_ip = 0
97 erange = 0
98 verbose = .false.
99 rmt_data = 'molecular_data'
100 raw = ''
101 mpiio = .false.
102 gpu = .false.
103 lab_polar = 0
104 lu_pw_dipoles = 410
105
106 read (input, nml = mdip)
107
108 if (order < 1) then
109 print '(A)', 'Order must be positive'
110 stop 1
111 end if
112
113 if (order > nmaxphotons) then
114 print '(A,I0)', 'Order must be <= ', nmaxphotons
115 stop 1
116 end if
117
118 if (raw /= '' .and. raw /= 'sph' .and. raw /= 'xyz' .and. raw /= 'both') then
119 print '(A)', 'The parameter "raw" must be empty or one of: "sph", "xyz", "both".'
120 stop 1
121 end if
122
123#ifndef WITH_SCALAPACK
124 if (mpiio) then
125 print '(A)', 'MPI-IO mode requires compiling MULTIDIP with ScaLAPACK support'
126 stop 1
127 end if
128#endif
129
130 polar(:, order + 1:nmaxphotons) = 0
131 omega(order + 1:nmaxphotons) = 0
132
133 end subroutine read_input_namelist
134
135end module multidip_params
Hard-coded parameters of MULTIDIP.
integer, parameter ntermsppt
Number of terms in expansion of the exponential integral.
logical extend_istate
Continue initial state from the known inner region expansion outwards.
real(wp), parameter pi
integer, parameter max_romb_level
Maximal nesting level for Romberg integration.
subroutine read_input_namelist(input, order, lusct, lukmt, lubnd, nkset, polar, omega, verbose, rmt_data, first_ip, rasym, raw, erange, mpiio, gpu, lab_polar, lu_pw_dipoles)
logical closed_interm
Consider weakly closed channel in intermediate states (unfinished!)
logical custom_kmatrices
Ignore RSOLVE K-matrices and calculate them from scratch.
integer num_integ_algo
Numerical integration mode (1 = Romberg, 2 = Levin)
real(wp), parameter rhalf
integer, dimension(3), parameter carti
Position of a Cartesian coordinate in the real spherical basis (y, z, x).
real(wp) epsrel
Romberg integration relative tolerance for convergence.
character(len=1), dimension(3), parameter compt
logical cache_integrals
Cache Coulomb-Green integrals in memory (but disables some threading)
complex(wp), parameter imu
real(wp), parameter rone
complex(wp), parameter cone
logical coulomb_check
Skip integrals that cannot be asymptotically approximated well.
real(wp) coultol
Coulomb matching relative tolerance (decides whether to use asym. forms)
logical print_warnings
Print warnings about non-converged integrals.
integer, parameter max_levin_level
Maximal nesting level for Levin integration.
real(wp) closed_range
Energy interval (a.u.) before threshold for inclusion of closed channels.
logical ion_ion_analytic
Integrate one-dimensional ion-ion integrals using a closed-form formula.
logical check_dipoles
Check that all dipole matrices in molecular_data are nonzero.
integer, parameter cheb_order
Order of Chebyshev interpolation used in Levin quadrature.
real(wp), parameter rzero
integer, parameter ntermsasy
Number of terms in expansion of the Coulomb-Hankel functions.
integer maxtarg
Maximal number of target states to calculate dipoles for (0 = all)
real(wp), parameter alpha
Fine structure constant.
integer, dimension(3), parameter cartm
Real spherical harmonic m-value corresponding to given a Cartesian coord.
complex(wp), parameter czero
integer, parameter nmaxphotons
The limit on number of photons is nested_cgreen_integ