mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-06 11:28:51 +01:00
Optim MRCC + davidson
This commit is contained in:
parent
d35d555eda
commit
1354ab86fb
@ -274,7 +274,7 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Nstates, Ndet_non_ref, Ndet_ref,i_ge
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
do i_state=1,Nstates
|
do i_state=1,Nstates
|
||||||
ci_inv(i_state) = 1.d0/psi_ref_coef(i_I,i_state)
|
ci_inv(i_state) = psi_ref_coef_inv(i_I,i_state)
|
||||||
enddo
|
enddo
|
||||||
do l_sd=1,idx_alpha(0)
|
do l_sd=1,idx_alpha(0)
|
||||||
k_sd = idx_alpha(l_sd)
|
k_sd = idx_alpha(l_sd)
|
||||||
@ -285,16 +285,20 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Nstates, Ndet_non_ref, Ndet_ref,i_ge
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
call omp_set_lock( psi_ref_lock(i_I) )
|
call omp_set_lock( psi_ref_lock(i_I) )
|
||||||
do l_sd=1,idx_alpha(0)
|
do i_state=1,Nstates
|
||||||
k_sd = idx_alpha(l_sd)
|
if(dabs(psi_ref_coef(i_I,i_state)).ge.5.d-5)then
|
||||||
do i_state=1,Nstates
|
do l_sd=1,idx_alpha(0)
|
||||||
delta_ij_(i_state,k_sd,i_I) = delta_ij_(i_state,k_sd,i_I) + dIa_hla(i_state,k_sd)
|
k_sd = idx_alpha(l_sd)
|
||||||
if(dabs(psi_ref_coef(i_I,i_state)).ge.5.d-5)then
|
delta_ij_(i_state,k_sd,i_I) = delta_ij_(i_state,k_sd,i_I) + dIa_hla(i_state,k_sd)
|
||||||
delta_ii_(i_state,i_I) = delta_ii_(i_state,i_I) - dIa_hla(i_state,k_sd) * ci_inv(i_state) * psi_non_ref_coef_transp(i_state,k_sd)
|
delta_ii_(i_state,i_I) = delta_ii_(i_state,i_I) - dIa_hla(i_state,k_sd) * ci_inv(i_state) * psi_non_ref_coef_transp(i_state,k_sd)
|
||||||
else
|
enddo
|
||||||
delta_ii_(i_state,i_I) = 0.d0
|
else
|
||||||
endif
|
delta_ii_(i_state,i_I) = 0.d0
|
||||||
enddo
|
do l_sd=1,idx_alpha(0)
|
||||||
|
k_sd = idx_alpha(l_sd)
|
||||||
|
delta_ij_(i_state,k_sd,i_I) = delta_ij_(i_state,k_sd,i_I) + dIa_hla(i_state,k_sd)
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
call omp_unset_lock( psi_ref_lock(i_I) )
|
call omp_unset_lock( psi_ref_lock(i_I) )
|
||||||
enddo
|
enddo
|
||||||
|
@ -24,6 +24,20 @@ use bitmasks
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
END_PROVIDER
|
||||||
|
|
||||||
|
BEGIN_PROVIDER [ double precision, psi_ref_coef_inv, (psi_det_size,n_states) ]
|
||||||
|
implicit none
|
||||||
|
BEGIN_DOC
|
||||||
|
! 1/psi_ref_coef
|
||||||
|
END_DOC
|
||||||
|
integer :: i, i_state
|
||||||
|
do i_state=1,N_states
|
||||||
|
do i=1,N_det_ref
|
||||||
|
psi_ref_coef_inv(i,i_state) = 1.d0/psi_ref_coef(i,i_state)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user