diff --git a/src/det.irp.f b/src/det.irp.f index 6bd995b..269b1ef 100644 --- a/src/det.irp.f +++ b/src/det.irp.f @@ -213,9 +213,12 @@ BEGIN_PROVIDER [ integer, two_e_density_num_max ] two_e_density_num_max = 2*mo_num integer :: k,l - integer :: exc(3), nact, nact2, p, p2 + integer :: exc(3), nact, p, p2 integer :: det_exc do k=1,det_num + if (abs(det_coef(k) < 1.e-5)) then + cycle + endif do l=k,det_num if ( (k /= l).and.(abs(det_coef(k)*det_coef(l)) < 1.e-5) ) then cycle @@ -227,9 +230,8 @@ BEGIN_PROVIDER [ integer, two_e_density_num_max ] do p=1,2 p2 = 1+mod(p,2) nact = elec_num_2(p) -mo_closed_num - nact2 = elec_num_2(p2)-mo_closed_num 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 two_e_density_num_max += 2*mo_num else if ( (exc(3) == 2).and.(exc(p) == 2) ) then @@ -239,6 +241,7 @@ BEGIN_PROVIDER [ integer, two_e_density_num_max ] endif enddo + print *, two_e_density_num_max enddo enddo @@ -256,6 +259,7 @@ END_PROVIDER two_e_density_indice(1,1) = -1 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_num(two_e_density_num) if (two_e_density_indice(1,1) /= -1) then return endif @@ -273,7 +277,6 @@ END_PROVIDER PROVIDE det - print *, 'Computing two-electron DM' do k=1,det_num det_k = det_coef(k) 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_indice(two_e_density_indice) call set_density_matrix_two_value(two_e_density_value) - print *, 'Done' END_PROVIDER @@ -541,7 +543,6 @@ BEGIN_PROVIDER [ real, one_e_density_mo, (mo_active_num,mo_active_num,2) ] return endif - print *, 'Computing one-electron DM' do p=1,2 do i=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 call set_density_matrix_one(one_e_density_mo) - print *, 'Done' END_PROVIDER