10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-22 04:13:31 +01:00
This commit is contained in:
Anthony Scemama 2021-05-24 16:03:47 +02:00
parent 8ac9bcb963
commit cdc9252517
2 changed files with 12 additions and 47 deletions

View File

@ -252,7 +252,7 @@ BEGIN_PROVIDER [ double precision, E_loc ]
enddo
! Avoid divergence of E_loc and population explosion
if (do_pseudo .and. qmc_method == 'DMC' ) then
if (do_pseudo .and. (qmc_method == t_DMC) ) then
double precision :: delta_e
delta_e = E_loc-E_ref
E_loc = E_ref + delta_e * dexp(-dabs(delta_e)*time_step_sq)

View File

@ -1502,8 +1502,10 @@ END_PROVIDER
! D_alpha^t x (C x D_beta)
integer :: i,j,k, l
integer :: i1,i2,i3,i4,det_num4
integer :: i1,i2,i3,i4
integer :: j1,j2,j3,j4
! integer :: det_num4
integer :: det_num8
double precision :: f
DaC = 0.d0
@ -1511,52 +1513,15 @@ END_PROVIDER
if (det_num < shiftr(det_alpha_num*det_beta_num,2)) then
det_num4 = iand(det_num,not(3))
! det_num4 = iand(det_num,not(3))
det_num8 = iand(det_num,not(4))
integer :: ii(8), jj(8)
!DIR$ VECTOR ALIGNED
do k=1,det_num4,4
i1 = det_coef_matrix_rows(k )
i2 = det_coef_matrix_rows(k+1)
i3 = det_coef_matrix_rows(k+2)
i4 = det_coef_matrix_rows(k+3)
j1 = det_coef_matrix_columns(k )
j2 = det_coef_matrix_columns(k+1)
j3 = det_coef_matrix_columns(k+2)
j4 = det_coef_matrix_columns(k+3)
if ( (j1 == j2).and.(j1 == j3).and.(j1 == j4) ) then
f = det_beta_value (j1)
CDb(i1) = CDb(i1) + det_coef_matrix_values(k )*f
CDb(i2) = CDb(i2) + det_coef_matrix_values(k+1)*f
CDb(i3) = CDb(i3) + det_coef_matrix_values(k+2)*f
CDb(i4) = CDb(i4) + det_coef_matrix_values(k+3)*f
if ( ((i2-i1) == 1).and.((i3-i1) == 2).and.((i4-i1) == 3) ) then
DaC(j1) = DaC(j1) + det_coef_matrix_values(k)*det_alpha_value(i1) &
+ det_coef_matrix_values(k+1)*det_alpha_value(i1+1) &
+ det_coef_matrix_values(k+2)*det_alpha_value(i1+2) &
+ det_coef_matrix_values(k+3)*det_alpha_value(i1+3)
else
DaC(j1) = DaC(j1) + det_coef_matrix_values(k)*det_alpha_value(i1) &
+ det_coef_matrix_values(k+1)*det_alpha_value(i2) &
+ det_coef_matrix_values(k+2)*det_alpha_value(i3) &
+ det_coef_matrix_values(k+3)*det_alpha_value(i4)
endif
else
DaC(j1) = DaC(j1) + det_coef_matrix_values(k )*det_alpha_value(i1)
DaC(j2) = DaC(j2) + det_coef_matrix_values(k+1)*det_alpha_value(i2)
DaC(j3) = DaC(j3) + det_coef_matrix_values(k+2)*det_alpha_value(i3)
DaC(j4) = DaC(j4) + det_coef_matrix_values(k+3)*det_alpha_value(i4)
CDb(i1) = CDb(i1) + det_coef_matrix_values(k )*det_beta_value (j1)
CDb(i2) = CDb(i2) + det_coef_matrix_values(k+1)*det_beta_value (j2)
CDb(i3) = CDb(i3) + det_coef_matrix_values(k+2)*det_beta_value (j3)
CDb(i4) = CDb(i4) + det_coef_matrix_values(k+3)*det_beta_value (j4)
endif
enddo
do k=det_num4+1,det_num
i = det_coef_matrix_rows(k)
j = det_coef_matrix_columns(k)
DaC(j) = DaC(j) + det_coef_matrix_values(k)*det_alpha_value(i)
CDb(i) = CDb(i) + det_coef_matrix_values(k)*det_beta_value (j)
do k=1,det_num8,8
ii(1:8) = det_coef_matrix_rows(k:k+7)
jj(1:8) = det_coef_matrix_columns(k:k+7)
DaC(jj(1:8)) = DaC(jj(1:8)) + det_coef_matrix_values(k:k+7)*det_alpha_value(ii(1:8))
CDb(ii(1:8)) = CDb(ii(1:8)) + det_coef_matrix_values(k:k+7)*det_beta_value (jj(1:8))
enddo
else