mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-10-31 10:43:38 +01:00
Fixed bug in AIJ container initialization for doublet.
This commit is contained in:
parent
85db84df23
commit
4583fa80b0
@ -1798,7 +1798,6 @@ void getApqIJMatrixDriverArrayInp(int64_t Isomo, int64_t Jsomo, int32_t orbp, in
|
|||||||
for(int j = 0; j < rowsJ; j++)
|
for(int j = 0; j < rowsJ; j++)
|
||||||
CSFICSFJApqIJ[j*rowsI + i] = tmpCSFICSFJApqIJ[i*rowsJ + j];
|
CSFICSFJApqIJ[j*rowsI + i] = tmpCSFICSFJApqIJ[i*rowsJ + j];
|
||||||
|
|
||||||
|
|
||||||
// Garbage collection
|
// Garbage collection
|
||||||
free(overlapMatrixI);
|
free(overlapMatrixI);
|
||||||
free(overlapMatrixJ);
|
free(overlapMatrixJ);
|
||||||
|
@ -699,7 +699,7 @@ end subroutine get_phase_qp_to_cfg
|
|||||||
! 3. SOMO -> VMO
|
! 3. SOMO -> VMO
|
||||||
!print *,"Doing SOMO -> VMO"
|
!print *,"Doing SOMO -> VMO"
|
||||||
!AIJpqContainer(NSOMOMin,3,1,1,1,1) = 1.0d0
|
!AIJpqContainer(NSOMOMin,3,1,1,1,1) = 1.0d0
|
||||||
AIJpqContainer(1,1,1,1,3,NSOMOMin) = 1.0d0
|
AIJpqContainer(1,1,1:2,1:2,3,NSOMOMin) = 1.0d0
|
||||||
do i = NSOMOMin, NSOMOMax, 2
|
do i = NSOMOMin, NSOMOMax, 2
|
||||||
Isomo = ISHFT(1_8,i)-1
|
Isomo = ISHFT(1_8,i)-1
|
||||||
do j = i,i, 2
|
do j = i,i, 2
|
||||||
@ -761,7 +761,7 @@ end subroutine get_phase_qp_to_cfg
|
|||||||
! 4. DOMO -> SOMO
|
! 4. DOMO -> SOMO
|
||||||
!print *,"Doing DOMO -> SOMO"
|
!print *,"Doing DOMO -> SOMO"
|
||||||
!AIJpqContainer(NSOMOMin,4,1,1,1,1) = 1.0d0
|
!AIJpqContainer(NSOMOMin,4,1,1,1,1) = 1.0d0
|
||||||
AIJpqContainer(1,1,1,1,4,NSOMOMin) = 1.0d0
|
AIJpqContainer(1,1,1:2,1:2,4,NSOMOMin) = 1.0d0
|
||||||
do i = NSOMOMin+2, NSOMOMax, 2
|
do i = NSOMOMin+2, NSOMOMax, 2
|
||||||
Isomo = ISHFT(1_8,i)-1
|
Isomo = ISHFT(1_8,i)-1
|
||||||
do j = i,i, 2
|
do j = i,i, 2
|
||||||
@ -1562,9 +1562,9 @@ subroutine calculate_sigma_vector_cfg_nst_naive_store(psi_out, psi_in, n_st, sze
|
|||||||
end do
|
end do
|
||||||
endif
|
endif
|
||||||
meCC1 = AIJpqContainer(cnti,cntj,pmodel,qmodel,extype,NSOMOI)* (h_act_ri(p,q) + core_act_contrib)
|
meCC1 = AIJpqContainer(cnti,cntj,pmodel,qmodel,extype,NSOMOI)* (h_act_ri(p,q) + core_act_contrib)
|
||||||
if(jj.eq.1.and.ii.eq.1)then
|
!if(jj.eq.1.and.ii.eq.1)then
|
||||||
print *,"CC=",AIJpqContainer(cnti,cntj,pmodel,qmodel,extype,NSOMOI), " p=",p," q=",q
|
! print *,"CC=",AIJpqContainer(cnti,cntj,pmodel,qmodel,extype,NSOMOI), " p=",p," q=",q
|
||||||
endif
|
!endif
|
||||||
call omp_set_lock(lock(jj))
|
call omp_set_lock(lock(jj))
|
||||||
do kk = 1,n_st
|
do kk = 1,n_st
|
||||||
psi_out(kk,jj) = psi_out(kk,jj) + meCC1 * psi_in(kk,ii)
|
psi_out(kk,jj) = psi_out(kk,jj) + meCC1 * psi_in(kk,ii)
|
||||||
@ -1643,10 +1643,15 @@ subroutine calculate_sigma_vector_cfg_nst_naive_store(psi_out, psi_in, n_st, sze
|
|||||||
call obtain_connected_I_foralpha(i, alphas_Icfg(1,1,k), connectedI_alpha, idxs_connectedI_alpha, &
|
call obtain_connected_I_foralpha(i, alphas_Icfg(1,1,k), connectedI_alpha, idxs_connectedI_alpha, &
|
||||||
nconnectedI, excitationIds, excitationTypes, diagfactors)
|
nconnectedI, excitationIds, excitationTypes, diagfactors)
|
||||||
|
|
||||||
|
|
||||||
if(nconnectedI .EQ. 0) then
|
if(nconnectedI .EQ. 0) then
|
||||||
cycle
|
cycle
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
!if(i .EQ. 1) then
|
||||||
|
! print *,'k=',k,' kcfgSOMO=',alphas_Icfg(1,1,k),' ',POPCNT(alphas_Icfg(1,1,k)),' kcfgDOMO=',alphas_Icfg(1,2,k),' ',POPCNT(alphas_Icfg(1,2,k))
|
||||||
|
!endif
|
||||||
|
|
||||||
! Here we do 2x the loop. One to count for the size of the matrix, then we compute.
|
! Here we do 2x the loop. One to count for the size of the matrix, then we compute.
|
||||||
totcolsTKI = 0
|
totcolsTKI = 0
|
||||||
rowsTKI = -1
|
rowsTKI = -1
|
||||||
@ -1685,14 +1690,21 @@ subroutine calculate_sigma_vector_cfg_nst_naive_store(psi_out, psi_in, n_st, sze
|
|||||||
rowsikpq = AIJpqMatrixDimsList(NSOMOalpha,extype,pmodel,qmodel,1)
|
rowsikpq = AIJpqMatrixDimsList(NSOMOalpha,extype,pmodel,qmodel,1)
|
||||||
colsikpq = AIJpqMatrixDimsList(NSOMOalpha,extype,pmodel,qmodel,2)
|
colsikpq = AIJpqMatrixDimsList(NSOMOalpha,extype,pmodel,qmodel,2)
|
||||||
rowsTKI = rowsikpq
|
rowsTKI = rowsikpq
|
||||||
|
!if(i.eq.1) then
|
||||||
|
! print *,rowsTKI,colsikpq," | ",pmodel,qmodel,extype,NSOMOalpha
|
||||||
|
!endif
|
||||||
do m = 1,colsikpq
|
do m = 1,colsikpq
|
||||||
do l = 1,rowsTKI
|
do l = 1,rowsTKI
|
||||||
do kk = 1,n_st
|
do kk = 1,n_st
|
||||||
TKI(kk,l,totcolsTKI+m) = AIJpqContainer(l,m,pmodel,qmodel,extype,NSOMOalpha) &
|
TKI(kk,l,totcolsTKI+m) = AIJpqContainer(l,m,pmodel,qmodel,extype,NSOMOalpha) &
|
||||||
* psi_in(kk,idxs_connectedI_alpha(j)+m-1)
|
* psi_in(kk,idxs_connectedI_alpha(j)+m-1)
|
||||||
enddo
|
enddo
|
||||||
|
!if(i.eq.1) then
|
||||||
|
! print *,AIJpqContainer(l,m,pmodel,qmodel,extype,NSOMOalpha)
|
||||||
|
!endif
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
diagfactors_0 = diagfactors(j)*0.5d0
|
diagfactors_0 = diagfactors(j)*0.5d0
|
||||||
moi = excitationIds(1,j) ! p
|
moi = excitationIds(1,j) ! p
|
||||||
mok = excitationIds(2,j) ! q
|
mok = excitationIds(2,j) ! q
|
||||||
|
Loading…
Reference in New Issue
Block a user