9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 14:03:37 +01:00

Merge branch 'csf' of github.com:QuantumPackage/qp2 into csf

This commit is contained in:
Anthony Scemama 2021-03-06 14:02:44 +01:00
commit 3750f5446d
4 changed files with 25 additions and 18 deletions

View File

@ -231,7 +231,7 @@
! SOMO
NalphaIcfg += 1
!print *,p,q,"|",holetype(i),vmotype(j),NalphaIcfg
!print *,i,j,"|",NalphaIcfg
alphasIcfg(1,1,NalphaIcfg) = Jsomo
alphasIcfg(1,2,NalphaIcfg) = IOR(Jdomo,ISHFT(1_8,n_core_orb)-1)
endif

View File

@ -871,19 +871,19 @@ subroutine calculate_sigma_vector_cfg_nst(psi_out, psi_in, n_st, sze, istart, ie
real*8,intent(out):: psi_out(sze,n_st)
integer(bit_kind) :: Icfg(N_INT,2)
integer :: i,j,k,l,p,q,noccp,noccq, ii, jj, m, n, idxI, kk, nocck,orbk
integer(bit_kind) :: alphas_Icfg(N_INT,2,sze)
integer(bit_kind) :: singlesI(N_INT,2,sze)
integer(bit_kind) :: connectedI_alpha(N_INT,2,sze)
integer :: idxs_singlesI(sze)
integer :: idxs_connectedI_alpha(sze)
integer(bit_kind) :: psi_configuration_out(N_INT,2,sze)
integer(bit_kind) :: alphas_Icfg(N_INT,2,max(sze,100))
integer(bit_kind) :: singlesI(N_INT,2,max(sze,100))
integer(bit_kind) :: connectedI_alpha(N_INT,2,max(sze,100))
integer :: idxs_singlesI(max(sze,100))
integer :: idxs_connectedI_alpha(max(sze,100))
integer(bit_kind) :: psi_configuration_out(N_INT,2,max(sze,100))
real*8 :: psi_coef_out(n_CSF)
logical :: psi_coef_out_init(n_CSF)
integer :: excitationIds_single(2,sze)
integer :: excitationTypes_single(sze)
integer :: excitationIds(2,sze)
integer :: excitationTypes(sze)
real*8 :: diagfactors(sze)
integer :: excitationIds_single(2,max(sze,100))
integer :: excitationTypes_single(max(sze,100))
integer :: excitationIds(2,max(sze,100))
integer :: excitationTypes(max(sze,100))
real*8 :: diagfactors(max(sze,100))
integer :: nholes
integer :: nvmos
integer :: listvmos(mo_num)
@ -908,6 +908,10 @@ subroutine calculate_sigma_vector_cfg_nst(psi_out, psi_in, n_st, sze, istart, ie
real*8, external :: mo_two_e_integral
real*8, external :: get_two_e_integral
real*8 :: diag_energies(n_CSF)
!PROVIDE mo_two_e_integrals_in_map mo_integrals_map big_array_exchange_integrals
!print *," sze = ",sze
call calculate_preconditioner_cfg(diag_energies)
MS = 0
@ -1043,6 +1047,7 @@ subroutine calculate_sigma_vector_cfg_nst(psi_out, psi_in, n_st, sze, istart, ie
endi = psi_config_data(i,2)
! Returns all unique (checking the past) singly excited cfgs connected to I
Nalphas_Icfg = 0
call obtain_associated_alphaI(i, Icfg, alphas_Icfg, Nalphas_Icfg)
! TODO : remove doubly excited for return
! Here we do 2x the loop. One to count for the size of the matrix, then we compute.

View File

@ -303,6 +303,7 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
! -----------------------------------
!call convertWFfromCSFtoDET(N_st_diag,U_csf(1,shift+1),U)
PROVIDE mo_two_e_integrals_in_map mo_integrals_map big_array_exchange_integrals
if ((sze > 100000).and.distributed_davidson) then
!call convertWFfromCSFtoDET(N_st_diag,U_csf(1,shift+1),U)
@ -311,6 +312,7 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
!call convertWFfromDETtoCSF(N_st_diag,U,U_csf(1,shift+1))
!call convertWFfromDETtoCSF(N_st_diag,W,W_csf(1,shift+1))
!call calculate_sigma_vector_cfg_nst(W_csf(1,shift+1),U_csf(1,shift+1),N_st_diag,sze_csf,1,sze_csf,0,1)
! TODO : psi_det_size ? for psi_det
do kk=1,N_st_diag
call calculate_sigma_vector_cfg_nst(W_csf(1,shift+kk),U_csf(1,shift+kk),1,sze_csf,1,sze_csf,0,1)
enddo

View File

@ -977,12 +977,12 @@ subroutine i_H_psi(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array)
call filter_connected_i_H_psi0(keys,key,Nint,Ndet,idx)
if (Nstate == 1) then
do ii=1,idx(0)
i = idx(ii)
!DIR$ FORCEINLINE
call i_H_j(keys(1,1,i),key,Nint,hij)
i_H_psi_array(1) = i_H_psi_array(1) + coef(i,1)*hij
enddo
do ii=1,idx(0)
i = idx(ii)
!DIR$ FORCEINLINE
call i_H_j(keys(1,1,i),key,Nint,hij)
i_H_psi_array(1) = i_H_psi_array(1) + coef(i,1)*hij
enddo
else