10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 20:34:58 +01:00

fixed a bug in src/scf_utils/roothaan_hall_scf.irp.f

This commit is contained in:
eginer 2024-05-03 11:34:30 +02:00
parent 0465a0f439
commit 13785b267c
3 changed files with 21 additions and 21 deletions

View File

@ -71,16 +71,16 @@ END_PROVIDER
index_final_points_extra(3,i_count) = j index_final_points_extra(3,i_count) = j
index_final_points_extra_reverse(k,i,j) = i_count index_final_points_extra_reverse(k,i,j) = i_count
if(final_weight_at_r_vector_extra(i_count) .lt. 0.d0) then ! if(final_weight_at_r_vector_extra(i_count) .lt. 0.d0) then
print *, ' !!! WARNING !!!' ! print *, ' !!! WARNING !!!'
print *, ' negative weight !!!!' ! print *, ' negative weight !!!!'
print *, i_count, final_weight_at_r_vector_extra(i_count) ! print *, i_count, final_weight_at_r_vector_extra(i_count)
if(dabs(final_weight_at_r_vector_extra(i_count)) .lt. 1d-10) then ! if(dabs(final_weight_at_r_vector_extra(i_count)) .lt. 1d-10) then
final_weight_at_r_vector_extra(i_count) = 0.d0 ! final_weight_at_r_vector_extra(i_count) = 0.d0
else ! else
stop ! stop
endif ! endif
endif ! endif
enddo enddo
enddo enddo
enddo enddo

View File

@ -68,16 +68,16 @@ END_PROVIDER
index_final_points(3,i_count) = j index_final_points(3,i_count) = j
index_final_points_reverse(k,i,j) = i_count index_final_points_reverse(k,i,j) = i_count
if(final_weight_at_r_vector(i_count) .lt. 0.d0) then ! if(final_weight_at_r_vector(i_count) .lt. 0.d0) then
print *, ' !!! WARNING !!!' ! print *, ' !!! WARNING !!!'
print *, ' negative weight !!!!' ! print *, ' negative weight !!!!'
print *, i_count, final_weight_at_r_vector(i_count) ! print *, i_count, final_weight_at_r_vector(i_count)
if(dabs(final_weight_at_r_vector(i_count)) .lt. 1d-10) then ! if(dabs(final_weight_at_r_vector(i_count)) .lt. 1d-10) then
final_weight_at_r_vector(i_count) = 0.d0 ! final_weight_at_r_vector(i_count) = 0.d0
else ! else
stop ! stop
endif ! endif
endif ! endif
enddo enddo
enddo enddo
enddo enddo

View File

@ -217,7 +217,7 @@ END_DOC
do while (i<mo_num) do while (i<mo_num)
j=i j=i
m=1 m=1
do while ( (j<mo_num).and.(fock_matrix_diag_mo(j+1)-fock_matrix_diag_mo(i) < 1.d-8) ) do while ( (j+1<mo_num).and.(fock_matrix_diag_mo(j+1)-fock_matrix_diag_mo(i) < 1.d-8) )
j += 1 j += 1
m += 1 m += 1
enddo enddo