28 use,
intrinsic :: iso_c_binding, only: c_double, c_int, c_f_pointer
29 use,
intrinsic :: iso_fortran_env, only: input_unit, int32, int64, real64, output_unit
32 use blas_lapack_gbl,
only: blasint
33 use phys_const_gbl,
only: pi, imu, to_ev
34 use precisn_gbl,
only: wp
48 type intermediatestate
58 real(wp),
allocatable :: ck(:, :, :)
64 real(wp),
allocatable :: ap(:, :, :)
72 real(wp),
allocatable :: dip(:, :, :)
75 type(intermediatestate),
pointer :: parent => null()
78 type(intermediatestate),
pointer :: prev => null()
79 type(intermediatestate),
pointer :: next => null()
81 end type intermediatestate
100 type(MolecularData) :: moldat
101 type(KMatrix),
allocatable :: km(:)
102 type(ScatAkCoeffs),
allocatable :: ak(:)
104 character(len=64) :: arg
105 integer :: order, nirr, lusct(8), lukmt(8), nkset(8), iarg, narg, input, i
107 real(wp) :: omega(nMaxPhotons)
108 complex(wp) :: polar(3, nMaxPhotons)
110 namelist /mdip/ order, lusct, lukmt, nkset, polar, omega, verbose
120 call print_ukrmol_header(output_unit)
122 print
'(/,A)',
'Program MULTIDIP: Calculation of multi-photon ionization' 125 narg = command_argument_count()
128 do while (iarg <= narg)
129 call get_command_argument(iarg, arg)
130 if (arg ==
'--test')
then 133 else if (arg ==
'--input')
then 135 call get_command_argument(iarg, arg)
136 open (input, file = trim(arg), action =
'read', form =
'formatted')
137 else if (arg ==
'--help')
then 138 print
'(/,A,/)',
'Available options:' 139 print
'(A)',
' --help display this help and exit' 140 print
'(A)',
' --input FILE use FILE as the input file (instead of standard input)' 141 print
'(A)',
' --test run internal sanity checks and exit' 145 print
'(3A)',
'Unknown command line argument "', arg,
'"' 151 read (input, nml = mdip)
154 print
'(A)',
'Order must be positive' 158 if (order > nmaxphotons)
then 159 print
'(A,I0)',
'Order must be <= ', nmaxphotons
162 polar(:, order + 1:nmaxphotons) = 0
163 omega(order + 1:nmaxphotons) = 0
165 if (input /= input_unit)
close (input)
170 print
'(/,A,I0,A,I0)',
'Parallel mode; image ',
myproc,
' of ',
nprocs 173 print
'(/,A,/)',
'Absorbed photons' 175 print
'(2x,A,I0,3x,A,SP,2F6.3,A,2F6.3,A,2F6.3,A,F0.3,A)', &
176 '#', i,
'eX: ', polar(1, i),
'i, eY: ', polar(2, i),
'i, eZ: ', polar(3, i),
'i, energy: ', omega(i) * to_ev,
' eV' 179 nirr = count(lukmt > 0)
183 if (any(lusct > 0))
then 222 subroutine multidip_driver (order, moldat, km, ak, omega, polar, verbose)
226 integer,
intent(in) :: order
227 logical,
intent(in) :: verbose
228 type(MolecularData),
intent(in) :: moldat
229 type(KMatrix),
allocatable,
intent(in) :: km(:)
230 type(ScatAkCoeffs),
allocatable,
intent(in) :: ak(:)
231 real(wp),
intent(in) :: omega(:)
232 complex(wp),
intent(in) :: polar(:, :)
234 type(IntermediateState),
pointer :: states, state
236 integer,
allocatable :: iidip(:), ifdip(:)
238 integer :: j, s, mgvni, mgvnn, mgvn1, mgvn2, nesc, irri, iki, icomp, nstati, nchani
241 mgvni = km(iki) % mgvn
242 nesc = km(iki) % nescat
243 irri = minloc(abs(moldat % mgvns - mgvni), 1)
244 nstati = moldat % mnp1(irri)
245 nchani = moldat % nchan(irri)
248 allocate (states % ck(nstati, 2, (nesc +
nprocs - 1) /
nprocs))
249 allocate (states % ap(nchani, 2, (nesc +
nprocs - 1) /
nprocs))
253 states % mgvn = mgvni
255 states % ck(:, :, :) = 0
256 states % ck(1, 1, :) = 1
257 states % ap(:, :, :) = 0
262 print
'(/,2(A,I0))',
'Photon ', j,
' of ', order
270 do s = 1,
size(iidip)
277 do while (
associated(state))
280 if (state % order + 1 == j)
then 286 if ((mgvnn == mgvn1 .or. mgvnn == mgvn2) .and. &
287 any(km(:) % mgvn == mgvn1) .and. &
288 any(km(:) % mgvn == mgvn2))
then 293 mgvnn, mgvn1, mgvn2, km, state, verbose)
296 mgvnn, mgvn1, mgvn2, km, ak, state, verbose)
304 state => state % next
315 call calculate_observables(moldat, order, states, km(iki) % escat, moldat % eig(1, irri), omega, polar)
319 do while (
associated(state % next))
320 state => state % next
321 deallocate (state % prev)
351 subroutine solve_intermediate_state (moldat, order, Ephoton, irri, icomp, s, mgvnn, mgvn1, mgvn2, km, state, verbose)
358 type(MolecularData),
intent(in) :: moldat
359 type(KMatrix),
allocatable,
intent(in) :: km(:)
361 type(IntermediateState),
pointer,
intent(inout) :: state
362 type(IntermediateState),
pointer :: last
364 integer,
intent(in) :: order, irri, icomp, s, mgvnn, mgvn1, mgvn2
365 logical,
intent(in) :: verbose
366 real(wp),
intent(in) :: Ephoton(:)
368 integer :: nstatn, nstatf, nchann, nchanf, nopen, mgvnf, irrn, irrf, ikn, ikf, ipw, nesc, ie, mye
369 real(wp) :: Ei, IP, Etotf, dE = 0.1
370 character(len=1) :: transp
372 complex(wp),
allocatable :: beta(:), app(:), H(:, :), lambda(:), hc(:), hcp(:)
374 integer,
allocatable :: lf(:)
375 real(wp),
allocatable :: Ef(:), fc(:), fcp(:), gc(:), gcp(:), P(:), rhs(:, :), omega(:)
376 real(wp),
allocatable :: Pw(:, :), wPw(:, :), wPD(:, :), IwPD(:, :), wckp(:, :), Dpsi(:, :, :), corr(:, :), ckp(:, :)
380 if (mgvnn == mgvn1)
then 388 irrn = minloc(abs(moldat % mgvns - mgvnn), 1)
389 irrf = minloc(abs(moldat % mgvns - mgvnf), 1)
391 ikn = minloc(abs(km(:) % mgvn - mgvnn), 1)
392 ikf = minloc(abs(km(:) % mgvn - mgvnf), 1)
394 nstatn = moldat % mnp1(irrn)
395 nstatf = moldat % mnp1(irrf)
397 nchann = moldat % nchan(irrn)
398 nchanf = moldat % nchan(irrf)
400 ei = moldat % eig(1, irri)
401 nesc = km(ikf) % nescat
404 allocate (pw(nstatf, nchanf), wpd(nchanf, 2), iwpd(nchanf, 2), wpw(nchanf, nchanf), wckp(nchanf, 2), omega(order), &
405 dpsi(nstatf, 2, (nesc +
nprocs - 1) /
nprocs), fc(nchanf), gc(nchanf), fcp(nchanf), gcp(nchanf), &
406 hc(nchanf), hcp(nchanf), corr(nchanf, 2), &
407 ef(nchanf), lf(nchanf), ckp(nstatf, 2), h(nchanf, nchanf), lambda(nchanf), beta(nchanf), &
410 print
'(2x,A,I0,A,I0,5A)',
'Transition ', mgvnn,
' -> ', mgvnf,
' (',
compt(icomp),
', ', transp,
')' 414 do while (
associated(last % next))
417 allocate (last % next)
418 last % next % prev => last
420 last % order = state % order + 1
423 last % parent => state
424 allocate (last % ck(nstatf, 2, (nesc +
nprocs - 1) /
nprocs))
425 allocate (last % ap(nchanf, 2, (nesc +
nprocs - 1) /
nprocs))
435 ip = km(ikf) % escat(ie) + moldat % etarg(1) - ei
437 etotf = ei + sum(omega(1 : last % order))
438 ef = etotf - moldat % etarg(moldat % ichl(1:nchanf, irrf))
439 lf = moldat % l2p(1:nchanf, irrf)
440 nopen = count(ef > 0)
442 if (verbose) print
'(4x,*(A,I0))',
'energy ', ie,
' of ', nesc
443 if (verbose) print
'(4x,A,I0)',
' - open channels: ', nopen
447 nopen = count(ef + de > 0)
448 if (verbose) print
'(4x,A,I0)',
' - open + weakly closed channels: ', nopen
452 fc = 0; fcp = 0; gc = 0; gcp = 0; hc = 0; hcp = 0; lambda = 0
454 call coul(lf(ipw), ef(ipw), moldat % rmatr, fc(ipw), fcp(ipw), gc(ipw), gcp(ipw))
455 hc(ipw) = cmplx(gc(ipw), fc(ipw), wp)
456 hcp(ipw) = cmplx(gcp(ipw), fcp(ipw), wp)
457 lambda(ipw) = hcp(ipw) / hc(ipw)
461 rhs = dpsi(:, :, mye)
464 call multiint(moldat, ei, omega, mye, last, +1, beta)
465 beta = -2 * beta / sqrt(2*abs(ef))
466 where (ef < 0) beta = beta / imu
467 corr(:, 1) =
real(beta * (fcp - lambda * fc), wp)
468 corr(:, 2) = aimag(beta * (fcp - lambda * fc))
470 rhs = rhs - 0.5 * dpsi(:, :, mye)
473 p = 1 / (etotf - moldat % eig(1:nstatf, irrf))
474 ckp(:, 1) = p * rhs(:, 1)
475 ckp(:, 2) = p * rhs(:, 2)
483 h(1:nopen, 1:nopen) = wpw(1:nopen, 1:nopen)
484 forall (i = 1:nopen) h(i, i) = h(i, i) + 2/lambda(i)
485 forall (i = nopen + 1:nchanf) h(i, i) = 1
494 ckp(:, 1) = p * (rhs(:, 1) - ckp(:, 1))
495 ckp(:, 2) = p * (rhs(:, 2) - ckp(:, 2))
501 app = cmplx(wckp(:, 1), wckp(:, 2), wp)
503 app = (app - beta*fc) / hc
508 if (verbose) print
'(4x,A,*(E25.15))',
' - beta: ', beta(1:nopen)
509 if (verbose) print
'(4x,A,*(E25.15))',
' - ap: ', app(1:nopen)
511 last % ck(:, 1, mye) = ckp(:, 1)
512 last % ck(:, 2, mye) = ckp(:, 2)
514 last % ap(:, 1, mye) =
real(app, wp)
515 last % ap(:, 2, mye) = aimag(app)
543 subroutine extract_dipole_elements (moldat, order, Ephoton, irri, icomp, s, mgvnn, mgvn1, mgvn2, km, ak, state, verbose)
549 type(MolecularData),
intent(in) :: moldat
550 type(KMatrix),
allocatable,
intent(in) :: km(:)
551 type(ScatAkCoeffs),
allocatable,
intent(in) :: ak(:)
553 type(IntermediateState),
pointer,
intent(inout) :: state
554 type(IntermediateState),
pointer :: last
556 integer,
intent(in) :: irri, order, icomp, s, mgvnn, mgvn1, mgvn2
557 logical,
intent(in) :: verbose
558 real(wp),
intent(in) :: Ephoton(:)
560 character(len=1) :: transp
562 complex(wp),
allocatable :: Af(:, :), dm(:), dp(:), Sm(:, :)
563 real(wp),
allocatable :: Dpsi(:, :, :), Ef(:), echlf(:), d_inner(:, :), d_outer(:, :), Re_Af(:, :), Im_Af(:, :)
564 real(wp),
allocatable :: omega(:), d_total(:, :)
565 integer,
allocatable :: lf(:)
567 real(wp) :: Etotf, Ei, IP
568 integer :: mgvnf, irrn, irrf, ikn, ikf, nstatn, nstatf, nchann, nchanf, nesc, ie, nopen, mye
570 integer(blasint) :: m, n, inc = 1
572 if (mgvnn == mgvn1)
then 580 irrn = minloc(abs(moldat % mgvns - mgvnn), 1)
581 irrf = minloc(abs(moldat % mgvns - mgvnf), 1)
583 ikn = minloc(abs(km(:) % mgvn - mgvnn), 1)
584 ikf = minloc(abs(km(:) % mgvn - mgvnf), 1)
586 nstatn = moldat % mnp1(irrn)
587 nstatf = moldat % mnp1(irrf)
589 nchann = km(ikn) % nchan
590 nchanf = km(ikf) % nchan
592 ei = moldat % eig(1, irri)
593 nesc = km(ikf) % nescat
596 allocate (dpsi(nstatf, 2, (nesc +
nprocs - 1) /
nprocs), d_inner(nchanf, 2), d_outer(nchanf, 2), dm(nchanf), dp(nchanf), &
597 sm(nchanf, nchanf), omega(order), d_total(nchanf, 2), ef(nchanf), lf(nchanf), echlf(nchanf))
599 print
'(2x,A,I0,A,I0,5A)',
'Transition ', mgvnn,
' -> ', mgvnf,
' (',
compt(icomp),
', ', transp,
')' 603 do while (
associated(last % next))
606 allocate (last % next)
607 last % next % prev => last
612 last % parent => state
613 allocate (last % dip(nchanf, 2, nesc))
623 etotf = km(ikf) % escat(ie) + moldat % etarg(1)
626 echlf = moldat % etarg(moldat % ichl(1:nchanf, irrf)) - moldat % etarg(1)
627 ef = km(ikf) % escat(ie) - echlf
628 nopen = count(ef > 0)
629 lf = moldat % l2p(1:nchanf, irrf)
631 if (verbose) print
'(4x,*(A,I0))',
'energy ', ie,
' of ', nesc
634 if (
allocated(ak))
then 635 re_af = ak(ikf) % ReA(:, :, mye)
636 im_af = ak(ikf) % ImA(:, :, mye)
638 if (.not.
allocated(af))
allocate (af(nstatf, nchanf))
640 call scatak(moldat % rmatr, &
641 moldat % eig(1:nstatf, irrf), &
643 moldat % wamp(1:nchanf, 1:nstatf, irrf), &
646 km(ikf) % kmat(:, :, mye), &
656 call blas_dgemv(
'T', m, n,
rone, re_af, m, dpsi(:, 1, mye), inc,
rzero, d_inner(:, 1), inc)
657 call blas_dgemv(
'T', m, n, +
rone, im_af, m, dpsi(:, 2, mye), inc, +
rone, d_inner(:, 1), inc)
658 call blas_dgemv(
'T', m, n,
rone, re_af, m, dpsi(:, 2, mye), inc,
rzero, d_inner(:, 2), inc)
659 call blas_dgemv(
'T', m, n, -
rone, im_af, m, dpsi(:, 1, mye), inc, +
rone, d_inner(:, 2), inc)
662 call calculate_s_matrix(km(ikf) % kmat(:, :, mye), sm, nopen)
665 call multiint(moldat, ei, omega, mye, last, -1, dm)
666 call multiint(moldat, ei, omega, mye, last, +1, dp)
668 dm = dm * imu / sqrt(2*pi*sqrt(2*ef))
669 dp = dp * imu / sqrt(2*pi*sqrt(2*ef))
674 call blas_zgemv(
'T', n, n, -
cone, sm, n, dp, inc,
cone, dm, inc)
675 d_outer(:, 1) =
real(dm, wp)
676 d_outer(:, 2) = aimag(dm)
679 d_total = d_inner + d_outer
680 last % dip(:, :, ie) = d_total
682 if (verbose) print
'(5x,A,1x,*(1x,E25.15))',
'd_inner = ', (d_inner(n, 1), d_inner(n, 2), n = 1, nopen)
683 if (verbose) print
'(5x,A,1x,*(1x,E25.15))',
'd_outer = ', (d_outer(n, 1), d_outer(n, 2), n = 1, nopen)
684 if (verbose) print
'(5x,A,1x,*(1x,E25.15))',
'd_total = ', (d_total(n, 1), d_total(n, 2), n = 1, nopen)
705 real(wp),
intent(in) :: IP, Ephoton(:)
706 real(wp),
allocatable,
intent(inout) :: omega(:)
711 omega = (ip - sum(ephoton)) / (
size(omega) - count(ephoton /= 0))
734 subroutine multiint (moldat, Ei, omega, ie, state, sb, dip)
739 type(MolecularData),
intent(in) :: moldat
740 type(IntermediateState),
pointer,
intent(in) :: state
742 complex(wp),
allocatable,
intent(inout) :: dip(:)
743 real(wp),
allocatable,
intent(inout) :: omega(:)
744 real(wp),
intent(in) :: Ei
745 integer,
intent(in) :: ie, sb
747 complex(wp),
allocatable :: k(:)
748 integer,
allocatable :: l(:), m(:)
750 real(wp) :: c, a, Ekf, Etot
751 integer :: nphot, mgvn, nchan, ichan, irr
755 if (.not.
associated(state % parent)) stop 1
759 nphot = state % order
760 etot = ei + sum(omega(1:nphot))
762 irr = minloc(abs(moldat % mgvns - mgvn), 1)
763 nchan = moldat % nchan(irr)
765 allocate (k(nphot), l(nphot), m(nphot - 1))
770 ekf = etot - moldat % etarg(moldat % ichl(ichan, irr))
772 k(1) = sqrt(2*abs(ekf));
if (ekf < 0) k(1) = k(1) * imu
773 l(1) = moldat % l2p(ichan, irr)
776 dip(ichan) =
multiint_chain(moldat, ei, omega, ie, c, 1, state, ichan, sb, k, l, m)
805 recursive complex(wp) function multiint_chain (moldat, Ei, omega, ie, c, N, state, ichanf, sb, k, l, m)
result (integ)
811 type(moleculardata),
intent(in) :: moldat
812 type(intermediatestate),
pointer,
intent(in) :: state
813 type(intermediatestate),
pointer :: parent
815 complex(wp),
allocatable,
intent(inout) :: k(:)
816 real(wp),
allocatable,
intent(inout) :: omega(:)
817 integer,
allocatable,
intent(inout) :: l(:), m(:)
818 real(wp),
intent(in) :: ei
819 integer,
intent(in) :: ie, sb, n, ichanf
821 complex(wp) :: ap, kr(n + 1)
822 real(wp) :: c, a, ek, qion, qpws, etot
823 integer :: i, mgvni, mgvnf, nchani, irri, ichani, nphot, dcomp, lr(n + 1), mr(n)
827 if (state % parent % order == 0)
return 830 dcomp = state % dcomp
831 parent => state % parent
832 nphot = parent % order
834 mgvni = parent % mgvn
835 irri = minloc(abs(moldat % mgvns - mgvni), 1)
836 nchani = moldat % nchan(irri)
837 etot = ei + sum(omega(1:nphot))
840 do ichani = 1, nchani
843 ek = etot - moldat % etarg(moldat % ichl(ichani, irri))
845 k(n + 1) = sqrt(2*abs(ek));
if (ek < 0) k(n + 1) = k(n + 1) * imu
846 l(n + 1) = moldat % l2p(ichani, irri)
847 forall (i = 1:n+1) kr(i) = k(n + 2 - i)
848 forall (i = 1:n+1) lr(i) = l(n + 2 - i)
855 ap = cmplx(parent % ap(ichani, 1, ie), parent % ap(ichani, 2, ie), wp)
860 forall (i = 1:n) mr(i) = m(n + 1 - i)
862 integ = integ + qion *
multiint_chain(moldat, ei, omega, ie, c, n + 1, parent, ichani, sb, k, l, m)
868 forall (i = 1:n) mr(i) = m(n + 1 - i)
870 integ = integ + qpws *
multiint_chain(moldat, ei, omega, ie, c, n + 1, parent, ichani, sb, k, l, m)
893 real(wp) function channel_coupling_ion (moldat, dcomp, mgvnf, mgvni, ichanf, ichani)
result (Qion)
897 type(moleculardata),
intent(in) :: moldat
898 integer,
intent(in) :: dcomp, mgvnf, mgvni, ichanf, ichani
900 integer :: tr(3) = [ 3, 1, 2 ]
901 integer :: irri, irrf, itargi, itargf, li, lf, mi, mf
903 irrf = minloc(abs(moldat % mgvns - mgvnf), 1)
904 irri = minloc(abs(moldat % mgvns - mgvni), 1)
906 lf = moldat % l2p(ichanf, irrf); mf = moldat % m2p(ichanf, irrf); itargf = moldat % ichl(ichanf, irrf)
907 li = moldat % l2p(ichani, irri); mi = moldat % m2p(ichani, irri); itargi = moldat % ichl(ichani, irri)
909 if (lf /= li .or. mf /= mi)
then 912 qion = moldat % crlv(itargf, itargi, tr(dcomp))
932 real(wp) function channel_coupling_pws (moldat, dcomp, mgvnf, mgvni, ichanf, ichani)
result (Qpws)
936 type(moleculardata),
intent(in) :: moldat
937 integer,
intent(in) :: dcomp, mgvnf, mgvni, ichanf, ichani
939 integer :: m(3) = [ +1, -1, 0 ]
940 integer :: irri, irrf, itargi, itargf, li, lf, mi, mf, ipwi, ipwf
942 irrf = minloc(abs(moldat % mgvns - mgvnf), 1)
943 irri = minloc(abs(moldat % mgvns - mgvni), 1)
945 itargf = moldat % ichl(ichanf, irrf)
946 itargi = moldat % ichl(ichani, irri)
948 if (itargf /= itargi)
then 951 lf = moldat % l2p(ichanf, irrf); mf = moldat % m2p(ichanf, irrf); ipwf = lf*(lf + 1) + mf + 1
952 li = moldat % l2p(ichani, irri); mi = moldat % m2p(ichani, irri); ipwi = li*(li + 1) + mi + 1
953 qpws = sqrt(4*pi/3) * moldat % gaunt(ipwf, ipwi, m(dcomp))
995 type(MolecularData),
intent(in) :: moldat
996 type(IntermediateState),
pointer,
intent(in) :: state
997 type(IntermediateState),
pointer :: ptr, parent
999 integer,
intent(in) :: order
1000 real(wp),
intent(in) :: escat(:)
1001 complex(wp),
intent(in) :: polar(:, :)
1002 real(wp),
intent(in) :: Ei, Ephoton(:)
1004 integer :: i, nesc, mxchan, lf, ichan, ie, irr, mgvn
1005 #ifdef WITH_COARRAYS 1006 real(wp),
allocatable :: cs(:, :)[:]
1007 complex(wp),
allocatable :: M(:, :, :)[:]
1009 real(wp),
allocatable :: cs(:, :)
1010 complex(wp),
allocatable :: M(:, :, :)
1012 real(wp),
allocatable :: omega(:)
1013 real(wp) :: Ef, kf, sigma, navg, IP, Q
1014 complex(wp) :: ej, d
1017 mxchan = maxval(moldat % nchan)
1020 #ifdef WITH_COARRAYS 1021 allocate (cs(2, nesc)[*], m(mxchan, nesc, 0:7)[*])
1023 allocate (cs(2, nesc), m(mxchan, nesc, 0:7))
1025 allocate (omega(order))
1036 if (all(polar(:, i) == 0))
then 1043 do while (
associated(ptr))
1044 if (ptr % order == order)
then 1047 ej = polar(ptr % dcomp, ptr % order)
1049 do while (
associated(parent % parent))
1050 ej = ej * polar(parent % dcomp, parent % order)
1051 parent => parent % parent
1056 do ichan = 1,
size(ptr % dip, 1)
1057 d = cmplx(ptr % dip(ichan, 1, ie), ptr % dip(ichan, 2, ie), wp)
1058 m(ichan, ie, ptr % mgvn) = m(ichan, ie, ptr % mgvn) + q * ej * d
1059 cs(2, ie) = cs(2, ie) +
real(d*conjg(d), wp)
1072 ip = escat(ie) + moldat % etarg(1) - ei
1074 cs(1, ie) = omega(1) * to_ev
1075 do irr = 1,
size(moldat % mgvns)
1076 mgvn = moldat % mgvns(irr)
1077 do ichan = 1, moldat % nchan(irr)
1078 lf = moldat % l2p(ichan, irr)
1079 ef = escat(ie) - moldat % etarg(moldat % ichl(ichan, irr)) + moldat % etarg(1)
1083 m(ichan, ie, mgvn) = m(ichan, ie, mgvn) * imu**(-lf) * (cos(sigma) + imu*sin(sigma))
1087 cs(2, ie) = cs(2, ie) * 2*pi * (2*pi*
alpha)**order * product(omega) / 3**navg
complex(wp), parameter czero
subroutine write_cross_section(cs)
Write cross section to a file.
real(wp), parameter alpha
Fine structure constant.
subroutine apply_boundary_amplitudes(moldat, irr, transp, X, Y)
Multiply by boundary amplitudes.
integer, parameter nmaxphotons
The limit on number of photons is nested_cgreen_integ
subroutine scale_boundary_amplitudes(moldat, irr, v, vw)
Scale boundary amplitudes matrix by a diagonal matrix.
recursive complex(wp) function multiint_chain(moldat, Ei, omega, ie, c, N, state, ichanf, sb, k, l, m)
Calculate dipole correction integrals at given absorption depth.
subroutine run_tests
Numerical unit tests.
real(wp) function channel_coupling_ion(moldat, dcomp, mgvnf, mgvni, ichanf, ichani)
Ion channel dipole coupling.
I/O routines used by MULTIDIP.
subroutine read_molecular_data(moldat)
Read RMT molecular_data file.
subroutine get_diptrans(moldat, I, iidip, ifdip)
Return dipole transition descriptors.
subroutine solve_complex_system(n, A, X, Y)
Solve system of equations with complex matrix.
character(len=1), dimension(3), parameter compt
subroutine multidip_main
MULTIDIP main subroutine.
real(wp), parameter rzero
subroutine apply_dipole_matrix(moldat, I, s, transp, nf, nn, X, Y)
Multiply by dipole matrix.
real(wp) function cphase(l, k)
Coulomb phase.
subroutine calculate_photon_energies(IP, Ephoton, omega)
Calculate energy of each photon.
logical, parameter closed_interm
Consider weakly closed channel in intermediate states (unfinished!)
subroutine solve_intermediate_state(moldat, order, Ephoton, irri, icomp, s, mgvnn, mgvn1, mgvn2, km, state, verbose)
Calculate intermediate photoionisation state.
subroutine multidip_driver(order, moldat, km, ak, omega, polar, verbose)
Central computation routine.
Hard-coded parameters of MULTIDIP.
subroutine read_kmatrices(km, lukmt, nkset)
Read K-matrix files.
Special integrals needed by MULTIDIP.
subroutine read_wfncoeffs(ak, lusct)
Read wave function coefficients from file.
subroutine extract_dipole_elements(moldat, order, Ephoton, irri, icomp, s, mgvnn, mgvn1, mgvn2, km, ak, state, verbose)
Calculate dipole elements from intermediate and final states.
real(wp) function channel_coupling_pws(moldat, dcomp, mgvnf, mgvni, ichanf, ichani)
Partial wave channel dipole coupling.
Special functions and objects used by MULTIDIP.
complex(wp) function nested_cgreen_integ(a, c, N, sa, sb, m, l, k)
Multi-dimensional integral of Coulomb-Hankel and Coulomb-Green functions and powers.
subroutine calculate_observables(moldat, order, state, escat, Ei, Ephoton, polar)
Calculate partial wave dipoles, oriented dipoles and cross sections.
subroutine coul(l, Ek, r, F, Fp, G, Gp)
Coulomb functions.
subroutine write_partial_wave_moments(moldat, M, suffix)
Write partial wave moments.
subroutine multiint(moldat, Ei, omega, ie, state, sb, dip)
Evaluate the correction dipole integral for all orders.
complex(wp), parameter cone