Skip to content

Commit

Permalink
Fixed bug in calculating indices for mono-CFGs. #143.
Browse files Browse the repository at this point in the history
  • Loading branch information
v1j4y committed Feb 9, 2021
1 parent 30f099b commit 93a4412
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
22 changes: 10 additions & 12 deletions src/determinants/configuration_CI_sigma_helpers.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, idxs_connectedI
Jdomo = psi_configuration(1,2,i)
!call debug_spindet(Isomo,1)
!call debug_spindet(Idomo,1)
print *,"-J--i=",i,Idomo,Jdomo,">",N_configuration
call debug_spindet(Jsomo,1)
call debug_spindet(Jdomo,1)
!print *,"-J--i=",i,Idomo,Jdomo,">",N_configuration
!call debug_spindet(Jsomo,1)
!call debug_spindet(Jdomo,1)
diffSOMO = IEOR(Isomo,Jsomo)
diffDOMO = IEOR(Idomo,Jdomo)
ndiffSOMO = POPCNT(diffSOMO)
Expand Down Expand Up @@ -330,15 +330,13 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, idxs_connectedI
end select
starti = psi_config_data(i,1)
endi = psi_config_data(i,2)
! do k=starti,endi
nconnectedI += 1
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
idxs_connectedI(nconnectedI)=starti
excitationIds(1,nconnectedI)=p
excitationIds(2,nconnectedI)=q
excitationTypes(nconnectedI) = extyp
! enddo
print *,"------ > output p,q in obt=",p,q
nconnectedI += 1
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
idxs_connectedI(nconnectedI)=starti
excitationIds(1,nconnectedI)=p
excitationIds(2,nconnectedI)=q
excitationTypes(nconnectedI) = extyp
!print *,"------ > output p,q in obt=",p,q
endif
end do
Expand Down
22 changes: 10 additions & 12 deletions src/determinants/configuration_CI_sigma_helpers.org
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, idxs_connectedI
Jdomo = psi_configuration(1,2,i)
!call debug_spindet(Isomo,1)
!call debug_spindet(Idomo,1)
print *,"-J--i=",i,Idomo,Jdomo,">",N_configuration
call debug_spindet(Jsomo,1)
call debug_spindet(Jdomo,1)
!print *,"-J--i=",i,Idomo,Jdomo,">",N_configuration
!call debug_spindet(Jsomo,1)
!call debug_spindet(Jdomo,1)
diffSOMO = IEOR(Isomo,Jsomo)
diffDOMO = IEOR(Idomo,Jdomo)
ndiffSOMO = POPCNT(diffSOMO)
Expand Down Expand Up @@ -355,15 +355,13 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, idxs_connectedI
end select
starti = psi_config_data(i,1)
endi = psi_config_data(i,2)
! do k=starti,endi
nconnectedI += 1
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
idxs_connectedI(nconnectedI)=starti
excitationIds(1,nconnectedI)=p
excitationIds(2,nconnectedI)=q
excitationTypes(nconnectedI) = extyp
! enddo
print *,"------ > output p,q in obt=",p,q
nconnectedI += 1
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
idxs_connectedI(nconnectedI)=starti
excitationIds(1,nconnectedI)=p
excitationIds(2,nconnectedI)=q
excitationTypes(nconnectedI) = extyp
!print *,"------ > output p,q in obt=",p,q
endif
end do

Expand Down

0 comments on commit 93a4412

Please sign in to comment.