forked from cxlsmiles/fanoci_code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mat_element_2h.f90
53 lines (37 loc) · 1.45 KB
/
mat_element_2h.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module mat_element_2h
use globals
use intindex_module
contains
function mat_el_2h_s (mult, i, j, k, l) result (mat_el)
integer :: i, j, k, l, mult
double precision :: mat_el
double precision :: dik, dil, djk, djl
dik = s_mat(i, k)
dil = s_mat(i, l)
djk = s_mat(j, k)
djl = s_mat(j, l)
mat_el = 0.d0
if (mult == 1) then ! Singlet I - singlet I
mat_el = (dil * djk + dik * djl) * (- emo(i) - emo(j)) &
&+ int2e(intindex(k, i, l, j)) + int2e(intindex(k, j, l, i))
else if (mult == 2) then ! Singlet II - singlet II
mat_el = - 2.d0 * dik * emo(i) + int2e(intindex(k, i, k, i))
else if (mult == 3) then ! Singlet I - singlet II
mat_el = -sqrt(2.d0) * int2e(intindex(k, i, l, i))
! print*,k, i, l, i
! print*,intindex(k, i, l, i), int2e(intindex(k, i, l, i))
end if
end function mat_el_2h_s
function mat_el_2h_t (i, j, k, l) result (mat_el)
integer :: i, j, k, l
double precision :: mat_el
double precision :: dik, dil, djk, djl
dik = s_mat(i, k)
dil = s_mat(i, l)
djk = s_mat(j, k)
djl = s_mat(j, l)
! Triplet - triplet
mat_el = (dil * djk - dik * djl) * (emo(i) + emo(j)) &
&+ int2e(intindex(k, i, l, j)) - int2e(intindex(k, j, l, i))
end function mat_el_2h_t
end module mat_element_2h