10
0
mirror of https://gitlab.com/scemama/eplf synced 2024-10-31 19:23:55 +01:00
This commit is contained in:
Anthony Scemama 2011-05-28 10:56:18 +02:00
parent 4c4564d050
commit 57f3d60e52

View File

@ -213,9 +213,12 @@ BEGIN_PROVIDER [ integer, two_e_density_num_max ]
two_e_density_num_max = 2*mo_num two_e_density_num_max = 2*mo_num
integer :: k,l integer :: k,l
integer :: exc(3), nact, nact2, p, p2 integer :: exc(3), nact, p, p2
integer :: det_exc integer :: det_exc
do k=1,det_num do k=1,det_num
if (abs(det_coef(k) < 1.e-5)) then
cycle
endif
do l=k,det_num do l=k,det_num
if ( (k /= l).and.(abs(det_coef(k)*det_coef(l)) < 1.e-5) ) then if ( (k /= l).and.(abs(det_coef(k)*det_coef(l)) < 1.e-5) ) then
cycle cycle
@ -227,9 +230,8 @@ BEGIN_PROVIDER [ integer, two_e_density_num_max ]
do p=1,2 do p=1,2
p2 = 1+mod(p,2) p2 = 1+mod(p,2)
nact = elec_num_2(p) -mo_closed_num nact = elec_num_2(p) -mo_closed_num
nact2 = elec_num_2(p2)-mo_closed_num
if ( exc(3) == 0 ) then if ( exc(3) == 0 ) then
two_e_density_num_max += 2*nact*mo_num two_e_density_num_max += 2*mo_num
else if ( (exc(3) == 1).and.(exc(p) == 1) ) then else if ( (exc(3) == 1).and.(exc(p) == 1) ) then
two_e_density_num_max += 2*mo_num two_e_density_num_max += 2*mo_num
else if ( (exc(3) == 2).and.(exc(p) == 2) ) then else if ( (exc(3) == 2).and.(exc(p) == 2) ) then
@ -239,6 +241,7 @@ BEGIN_PROVIDER [ integer, two_e_density_num_max ]
endif endif
enddo enddo
print *, two_e_density_num_max
enddo enddo
enddo enddo
@ -256,6 +259,7 @@ END_PROVIDER
two_e_density_indice(1,1) = -1 two_e_density_indice(1,1) = -1
call get_density_matrix_two_indice(two_e_density_indice) call get_density_matrix_two_indice(two_e_density_indice)
call get_density_matrix_two_value(two_e_density_value) call get_density_matrix_two_value(two_e_density_value)
call get_density_matrix_two_num(two_e_density_num)
if (two_e_density_indice(1,1) /= -1) then if (two_e_density_indice(1,1) /= -1) then
return return
endif endif
@ -273,7 +277,6 @@ END_PROVIDER
PROVIDE det PROVIDE det
print *, 'Computing two-electron DM'
do k=1,det_num do k=1,det_num
det_k = det_coef(k) det_k = det_coef(k)
if ( abs(det_k) < 1.e-5) then if ( abs(det_k) < 1.e-5) then
@ -521,7 +524,6 @@ END_SHELL
call set_density_matrix_two_num(two_e_density_num) call set_density_matrix_two_num(two_e_density_num)
call set_density_matrix_two_indice(two_e_density_indice) call set_density_matrix_two_indice(two_e_density_indice)
call set_density_matrix_two_value(two_e_density_value) call set_density_matrix_two_value(two_e_density_value)
print *, 'Done'
END_PROVIDER END_PROVIDER
@ -541,7 +543,6 @@ BEGIN_PROVIDER [ real, one_e_density_mo, (mo_active_num,mo_active_num,2) ]
return return
endif endif
print *, 'Computing one-electron DM'
do p=1,2 do p=1,2
do i=1,mo_active_num do i=1,mo_active_num
do j=1,mo_active_num do j=1,mo_active_num
@ -584,6 +585,5 @@ BEGIN_PROVIDER [ real, one_e_density_mo, (mo_active_num,mo_active_num,2) ]
enddo enddo
call set_density_matrix_one(one_e_density_mo) call set_density_matrix_one(one_e_density_mo)
print *, 'Done'
END_PROVIDER END_PROVIDER