Tidying up

This commit is contained in:
Francois Coppens 2021-10-29 16:07:40 +02:00
parent 6cf69185b0
commit bb99e4b605
1 changed files with 3 additions and 11 deletions

View File

@ -291,10 +291,8 @@ END_PROVIDER
allocate(updates(elec_alpha_num, n_to_do))
do j = 1, n_to_do ! do for all updates
k = to_do(j) ! find back the electron we need to update
imo = mo_list_alpha_curr(k) ! find column/row/MO for electron k
! write(*,*) "n_to_do : ", n_to_do
! write(*,*) "j, k = to_do(j), imo = mo_list_alpha_curr(k) : ", j, k, imo
k = to_do(j) ! find back the electron that needs update
imo = mo_list_alpha_curr(k) ! find MO for electron k
do i = 1, elec_alpha_num ! run over all electrons
updates(i, j) = mo_value(i, imo) - slater_matrix_alpha(i, k)
slater_matrix_alpha(i, k) = mo_value(i, imo)
@ -420,11 +418,9 @@ END_PROVIDER
enddo
! make swaps and keep 1 update
! write(*,*) "Value of mo_exc_beta_curr = ", mo_exc_beta_curr
if (n_to_do > 1 .and. mo_exc_beta_curr == 1) then
if (iand(n_to_do+1,1)==1) then
! write(*,*) "Value of n_to_do+1, iand(n_to_do+1,1)", n_to_do+1, iand(n_to_do+1,1)
det_beta_value_curr = -det_beta_value_curr
!DIR$ VECTOR ALWAYS
!DIR$ VECTOR ALIGNED
@ -487,8 +483,6 @@ END_PROVIDER
ddet = 0.d0
if (n_to_do < shiftl(elec_beta_num,1)) then !! Why compare to double the number of electrons?
! write(*,*) "Value of elec_beta_num, shiftl(elec_beta_num,1)", elec_beta_num, shiftl(elec_beta_num,1)
ddet = det_beta_value_curr ! set ddet to the current value
slater_matrix_beta_inv_det = slater_matrix_beta_inv_det / ddet
@ -511,8 +505,6 @@ END_PROVIDER
do j = 1, n_to_do ! do for all updates
k = to_do(j) ! find back the electron we need to update
imo = mo_list_beta_curr(k) ! find column/row/MO for electron k
! write(*,*) "n_to_do : ", n_to_do
! write(*,*) "j, k = to_do(j), imo = mo_list_beta_curr(k) : ", j, k, imo
do i = 1, elec_beta_num ! run over all electrons
updates(i, j) = mo_value(elec_alpha_num + i, imo) - slater_matrix_beta(i, k)
slater_matrix_beta(i, k) = mo_value(elec_alpha_num + i, imo)
@ -548,7 +540,7 @@ END_PROVIDER
! close(4000)
! close(5000)
! ! stop
slater_matrix_beta_inv_det = slater_matrix_beta_inv_det * ddet
det_beta_value_curr = ddet
endif