9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-09 06:53:38 +01:00

Fixed bug in obtain_I_connected. Now energy is correct for NH cc-pvdz.

This commit is contained in:
v1j4y 2022-06-13 16:21:08 +02:00
parent 394a107e27
commit 9b8a1f5a9e
3 changed files with 9 additions and 5 deletions

View File

@ -1671,7 +1671,6 @@ void getApqIJMatrixDriverArrayInp(int64_t Isomo, int64_t Jsomo, int32_t orbp, in
int rowsI = 0; int rowsI = 0;
int colsI = 0; int colsI = 0;
//getOverlapMatrix(Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO);
//getOverlapMatrix(Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO); //getOverlapMatrix(Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO);
getOverlapMatrix_withDet(bftodetmatrixI, rowsbftodetI, colsbftodetI, Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO); getOverlapMatrix_withDet(bftodetmatrixI, rowsbftodetI, colsbftodetI, Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO);

View File

@ -1576,9 +1576,12 @@ subroutine calculate_sigma_vector_cfg_nst_naive_store(psi_out, psi_in, n_st, sze
do k = 1,Nalphas_Icfg do k = 1,Nalphas_Icfg
! Now generate all singly excited with respect to a given alpha CFG ! Now generate all singly excited with respect to a given alpha CFG
call obtain_connected_I_foralpha_fromfilterdlist(i,nconnectedJ, idslistconnectedJ, & !call obtain_connected_I_foralpha_fromfilterdlist(i,nconnectedJ, idslistconnectedJ, &
listconnectedJ, alphas_Icfg(1,1,k),connectedI_alpha,idxs_connectedI_alpha,nconnectedI, & ! listconnectedJ, alphas_Icfg(1,1,k),connectedI_alpha,idxs_connectedI_alpha,nconnectedI, &
excitationIds,excitationTypes,diagfactors) ! excitationIds,excitationTypes,diagfactors)
call obtain_connected_I_foralpha(i, alphas_Icfg(1,1,k), connectedI_alpha, idxs_connectedI_alpha, &
nconnectedI, excitationIds, excitationTypes, diagfactors)
if(nconnectedI .EQ. 0) then if(nconnectedI .EQ. 0) then
cycle cycle

View File

@ -88,7 +88,7 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
double precision, intent(out) :: energies(N_st_diag_in) double precision, intent(out) :: energies(N_st_diag_in)
integer :: iter, N_st_diag integer :: iter, N_st_diag
integer :: i,j,k,l,m,kk,ii integer :: i,j,k,l,m,kk,ii,ll
logical, intent(inout) :: converged logical, intent(inout) :: converged
double precision, external :: u_dot_v, u_dot_u double precision, external :: u_dot_v, u_dot_u
@ -248,6 +248,7 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
residual_norm(N_st_diag), & residual_norm(N_st_diag), &
lambda(N_st_diag*itermax)) lambda(N_st_diag*itermax))
h = 0.d0 h = 0.d0
U = 0.d0 U = 0.d0
y = 0.d0 y = 0.d0
@ -340,6 +341,7 @@ subroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
W_csf(ii,shift+kk)=tmpW(kk,ii) W_csf(ii,shift+kk)=tmpW(kk,ii)
enddo enddo
enddo enddo
deallocate(tmpW) deallocate(tmpW)
deallocate(tmpU) deallocate(tmpU)
endif endif