9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 11:33:29 +01:00

beginning to do it directly in physicist

This commit is contained in:
eginer 2019-06-28 15:55:32 +02:00
parent e9724fa8c7
commit c90c49b56c

View File

@ -18,7 +18,7 @@
h1 = occ(i,1) h1 = occ(i,1)
do j = 1, n_occ_ab(2) do j = 1, n_occ_ab(2)
h2 = occ(j,2) h2 = occ(j,2)
big_array(h1,h1,h2,h2) += c_1 big_array(h1,h2,h1,h2) += c_1
enddo enddo
enddo enddo
end end
@ -61,7 +61,7 @@
h1 = occ(i,1) h1 = occ(i,1)
do j = 1, n_occ_ab(2) do j = 1, n_occ_ab(2)
h2 = occ(j,2) h2 = occ(j,2)
big_array(h1,h1,h2,h2) += c_1 big_array(h1,h2,h1,h2) += c_1
enddo enddo
enddo enddo
else if (alpha_alpha)then else if (alpha_alpha)then
@ -69,7 +69,7 @@
h1 = occ(i,1) h1 = occ(i,1)
do j = 1, n_occ_ab(1) do j = 1, n_occ_ab(1)
h2 = occ(j,1) h2 = occ(j,1)
big_array(h1,h1,h2,h2) += 0.5d0 * c_1 big_array(h1,h2,h1,h2) += 0.5d0 * c_1
big_array(h1,h2,h2,h1) -= 0.5d0 * c_1 big_array(h1,h2,h2,h1) -= 0.5d0 * c_1
enddo enddo
enddo enddo
@ -78,7 +78,7 @@
h1 = occ(i,2) h1 = occ(i,2)
do j = 1, n_occ_ab(2) do j = 1, n_occ_ab(2)
h2 = occ(j,2) h2 = occ(j,2)
big_array(h1,h1,h2,h2) += 0.5d0 * c_1 big_array(h1,h2,h1,h2) += 0.5d0 * c_1
big_array(h1,h2,h2,h1) -= 0.5d0 * c_1 big_array(h1,h2,h2,h1) -= 0.5d0 * c_1
enddo enddo
enddo enddo
@ -88,25 +88,23 @@
h1 = occ(i,1) h1 = occ(i,1)
do j = 1, n_occ_ab(2) do j = 1, n_occ_ab(2)
h2 = occ(j,2) h2 = occ(j,2)
big_array(h1,h1,h2,h2) += 0.5d0 * (c_1 ) big_array(h1,h2,h1,h2) += 0.5d0 * (c_1 )
big_array(h2,h2,h1,h1) += 0.5d0 * (c_1 ) big_array(h2,h1,h2,h1) += 0.5d0 * (c_1 )
enddo enddo
enddo enddo
! alpha alpha
do i = 1, n_occ_ab(1) do i = 1, n_occ_ab(1)
h1 = occ(i,1) h1 = occ(i,1)
do j = 1, n_occ_ab(1) do j = 1, n_occ_ab(1)
h2 = occ(j,1) h2 = occ(j,1)
big_array(h1,h1,h2,h2) += 0.5d0 * c_1 big_array(h1,h2,h1,h2) += 0.5d0 * c_1
big_array(h1,h2,h2,h1) -= 0.5d0 * c_1 big_array(h1,h2,h2,h1) -= 0.5d0 * c_1
enddo enddo
enddo enddo
! beta beta
do i = 1, n_occ_ab(2) do i = 1, n_occ_ab(2)
h1 = occ(i,2) h1 = occ(i,2)
do j = 1, n_occ_ab(2) do j = 1, n_occ_ab(2)
h2 = occ(j,2) h2 = occ(j,2)
big_array(h1,h1,h2,h2) += 0.5d0 * c_1 big_array(h1,h2,h1,h2) += 0.5d0 * c_1
big_array(h1,h2,h2,h1) -= 0.5d0 * c_1 big_array(h1,h2,h2,h1) -= 0.5d0 * c_1
enddo enddo
enddo enddo
@ -147,10 +145,10 @@
p1 = exc(1,2,1) p1 = exc(1,2,1)
p2 = exc(1,2,2) p2 = exc(1,2,2)
if(alpha_beta)then if(alpha_beta)then
big_array(h1,p1,h2,p2) += c_1 * phase big_array(h1,h2,p1,p2) += c_1 * phase
else if(spin_trace)then else if(spin_trace)then
big_array(h1,p1,h2,p2) += 0.5d0 * c_1 * phase big_array(h1,h2,p1,p2) += 0.5d0 * c_1 * phase
big_array(h2,p2,h1,p1) += 0.5d0 * c_1 * phase big_array(p1,p2,h1,h2) += 0.5d0 * c_1 * phase
endif endif
end end
@ -195,7 +193,7 @@
p1 = exc(1,2,1) p1 = exc(1,2,1)
do i = 1, n_occ_ab(2) do i = 1, n_occ_ab(2)
h2 = occ(i,2) h2 = occ(i,2)
big_array(h1,p1,h2,h2) += c_1 * phase big_array(h1,h2,p1,h2) += c_1 * phase
enddo enddo
else else
! Mono beta ! Mono beta
@ -203,7 +201,7 @@
p1 = exc(1,2,2) p1 = exc(1,2,2)
do i = 1, n_occ_ab(1) do i = 1, n_occ_ab(1)
h2 = occ(i,1) h2 = occ(i,1)
big_array(h2,h2,h1,p1) += c_1 * phase big_array(h2,h1,h2,p1) += c_1 * phase
enddo enddo
endif endif
else if(spin_trace)then else if(spin_trace)then
@ -213,8 +211,8 @@
p1 = exc(1,2,1) p1 = exc(1,2,1)
do i = 1, n_occ_ab(2) do i = 1, n_occ_ab(2)
h2 = occ(i,2) h2 = occ(i,2)
big_array(h1,p1,h2,h2) += 0.5d0 * c_1 * phase big_array(h1,h2,p1,h2) += 0.5d0 * c_1 * phase
big_array(h2,h2,h1,p1) += 0.5d0 * c_1 * phase big_array(h2,h1,h2,p1) += 0.5d0 * c_1 * phase
enddo enddo
else else
! Mono beta ! Mono beta
@ -222,8 +220,8 @@
p1 = exc(1,2,2) p1 = exc(1,2,2)
do i = 1, n_occ_ab(1) do i = 1, n_occ_ab(1)
h2 = occ(i,1) h2 = occ(i,1)
big_array(h1,p1,h2,h2) += 0.5d0 * c_1 * phase big_array(h1,h2,p1,h2) += 0.5d0 * c_1 * phase
big_array(h2,h2,h1,p1) += 0.5d0 * c_1 * phase big_array(h2,h1,h2,p1) += 0.5d0 * c_1 * phase
enddo enddo
endif endif
endif endif
@ -270,11 +268,11 @@
p1 = exc(1,2,1) p1 = exc(1,2,1)
do i = 1, n_occ_ab(1) do i = 1, n_occ_ab(1)
h2 = occ(i,1) h2 = occ(i,1)
big_array(h1,p1,h2,h2) += 0.5d0 * c_1 * phase big_array(h1,h2,p1,h2) += 0.5d0 * c_1 * phase
big_array(h1,h2,h2,p1) -= 0.5d0 * c_1 * phase big_array(h1,h2,h2,p1) -= 0.5d0 * c_1 * phase
big_array(h2,h2,h1,p1) += 0.5d0 * c_1 * phase big_array(h2,h1,h2,p1) += 0.5d0 * c_1 * phase
big_array(h2,p1,h1,h2) -= 0.5d0 * c_1 * phase big_array(h2,h1,p1,h2) -= 0.5d0 * c_1 * phase
enddo enddo
else else
return return
@ -327,11 +325,11 @@
do istate = 1, N_states do istate = 1, N_states
do i = 1, n_occ_ab(2) do i = 1, n_occ_ab(2)
h2 = occ(i,2) h2 = occ(i,2)
big_array(h1,p1,h2,h2) += 0.5d0 * c_1 * phase big_array(h1,h2,p1,h2) += 0.5d0 * c_1 * phase
big_array(h1,h2,h2,p1) -= 0.5d0 * c_1 * phase big_array(h1,h2,h2,p1) -= 0.5d0 * c_1 * phase
big_array(h2,h2,h1,p1) += 0.5d0 * c_1 * phase big_array(h2,h1,h2,p1) += 0.5d0 * c_1 * phase
big_array(h2,p1,h1,h2) -= 0.5d0 * c_1 * phase big_array(h2,h1,p1,h2) -= 0.5d0 * c_1 * phase
enddo enddo
enddo enddo
endif endif
@ -375,11 +373,11 @@
p2 =exc(2,2) p2 =exc(2,2)
if(alpha_alpha.or.spin_trace)then if(alpha_alpha.or.spin_trace)then
do istate = 1, N_states do istate = 1, N_states
big_array(h1,p1,h2,p2) += 0.5d0 * c_1 * phase big_array(h1,h2,p1,p2) += 0.5d0 * c_1 * phase
big_array(h1,p2,h2,p1) -= 0.5d0 * c_1 * phase big_array(h1,h2,p2,p1) -= 0.5d0 * c_1 * phase
big_array(h2,p2,h1,p1) += 0.5d0 * c_1 * phase big_array(h2,h1,p2,p1) += 0.5d0 * c_1 * phase
big_array(h2,p1,h1,p2) -= 0.5d0 * c_1 * phase big_array(h2,h1,p1,p2) -= 0.5d0 * c_1 * phase
enddo enddo
endif endif
end end
@ -420,11 +418,11 @@
p1 =exc(1,2) p1 =exc(1,2)
p2 =exc(2,2) p2 =exc(2,2)
if(beta_beta.or.spin_trace)then if(beta_beta.or.spin_trace)then
big_array(h1,p1,h2,p2) += 0.5d0 * c_1* phase big_array(h1,h2,p1,p2) += 0.5d0 * c_1* phase
big_array(h1,p2,h2,p1) -= 0.5d0 * c_1* phase big_array(h1,h2,p2,p1) -= 0.5d0 * c_1* phase
big_array(h2,p2,h1,p1) += 0.5d0 * c_1* phase big_array(h2,h1,p2,p1) += 0.5d0 * c_1* phase
big_array(h2,p1,h1,p2) -= 0.5d0 * c_1* phase big_array(h2,h1,p1,p2) -= 0.5d0 * c_1* phase
endif endif
end end