mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-30 12:43:40 +02:00
Fixed bug in prototype construction. #143.
This commit is contained in:
parent
6c64607b56
commit
30eae477cc
@ -94,6 +94,14 @@
|
|||||||
!call debug_spindet(Isomo,1)
|
!call debug_spindet(Isomo,1)
|
||||||
!call debug_spindet(Idomo,1)
|
!call debug_spindet(Idomo,1)
|
||||||
|
|
||||||
|
!print *,"Nholes=",nholes," Nvmos=",nvmos, " idxi=",idxI
|
||||||
|
!do i = 1,nholes
|
||||||
|
! print *,i,"->",listholes(i)
|
||||||
|
!enddo
|
||||||
|
!do i = 1,nvmos
|
||||||
|
! print *,i,"->",listvmos(i)
|
||||||
|
!enddo
|
||||||
|
|
||||||
! TODO cfg_seniority_index
|
! TODO cfg_seniority_index
|
||||||
do i = 1,nholes
|
do i = 1,nholes
|
||||||
p = listholes(i)
|
p = listholes(i)
|
||||||
@ -209,17 +217,17 @@
|
|||||||
|
|
||||||
NalphaIcfg += 1
|
NalphaIcfg += 1
|
||||||
!print *,p,q,"|",holetype(i),vmotype(j),NalphaIcfg
|
!print *,p,q,"|",holetype(i),vmotype(j),NalphaIcfg
|
||||||
!call debug_spindet(Jsomo,1)
|
!call debug_spindet(Idomo,1)
|
||||||
!call debug_spindet(Jdomo,1)
|
!call debug_spindet(Jdomo,1)
|
||||||
alphasIcfg(1,1,NalphaIcfg) = Jsomo
|
alphasIcfg(1,1,NalphaIcfg) = Jsomo
|
||||||
alphasIcfg(1,2,NalphaIcfg) = Jdomo
|
alphasIcfg(1,2,NalphaIcfg) = IOR(Jdomo,ISHFT(1_8,n_core_orb)-1)
|
||||||
endif
|
endif
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, excitationIds, excitationTypes)
|
subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, idxs_connectedI, nconnectedI, excitationIds, excitationTypes)
|
||||||
implicit none
|
implicit none
|
||||||
use bitmasks
|
use bitmasks
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
@ -240,6 +248,7 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, ex
|
|||||||
integer ,intent(in) :: idxI
|
integer ,intent(in) :: idxI
|
||||||
integer(bit_kind),intent(in) :: Ialpha(N_int,2)
|
integer(bit_kind),intent(in) :: Ialpha(N_int,2)
|
||||||
integer(bit_kind),intent(out) :: connectedI(N_int,2,*)
|
integer(bit_kind),intent(out) :: connectedI(N_int,2,*)
|
||||||
|
integer ,intent(out) :: idxs_connectedI(*)
|
||||||
integer,intent(out) :: nconnectedI
|
integer,intent(out) :: nconnectedI
|
||||||
integer,intent(out) :: excitationIds(2,*)
|
integer,intent(out) :: excitationIds(2,*)
|
||||||
integer,intent(out) :: excitationTypes(*)
|
integer,intent(out) :: excitationTypes(*)
|
||||||
@ -265,15 +274,16 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, ex
|
|||||||
Jdomo = psi_configuration(1,2,i)
|
Jdomo = psi_configuration(1,2,i)
|
||||||
!call debug_spindet(Isomo,1)
|
!call debug_spindet(Isomo,1)
|
||||||
!call debug_spindet(Idomo,1)
|
!call debug_spindet(Idomo,1)
|
||||||
!print *,"-J--i=",i,Jsomo,Isomo
|
print *,"-J--i=",i,Idomo,Jdomo,">",N_configuration
|
||||||
!call debug_spindet(Jsomo,1)
|
call debug_spindet(Jsomo,1)
|
||||||
!call debug_spindet(Jdomo,1)
|
call debug_spindet(Jdomo,1)
|
||||||
diffSOMO = IEOR(Isomo,Jsomo)
|
diffSOMO = IEOR(Isomo,Jsomo)
|
||||||
diffDOMO = IEOR(Idomo,Jdomo)
|
diffDOMO = IEOR(Idomo,Jdomo)
|
||||||
ndiffSOMO = POPCNT(diffSOMO)
|
ndiffSOMO = POPCNT(diffSOMO)
|
||||||
ndiffDOMO = POPCNT(diffDOMO)
|
ndiffDOMO = POPCNT(diffDOMO)
|
||||||
!if((ndiffSOMO + ndiffDOMO) .EQ. 0) cycle
|
!if((ndiffSOMO + ndiffDOMO) .EQ. 0) cycle
|
||||||
!print *,"-I--i=",i,Isomo,Jsomo,ndiffSOMO,ndiffDOMO
|
!print *,"-I--i=",i,diffSOMO,diffDOMO!Isomo,Jsomo,ndiffSOMO,ndiffDOMO
|
||||||
|
!print *,POPCNT(IEOR(diffSOMO,diffDOMO)), ndiffDOMO
|
||||||
if(POPCNT(IEOR(diffSOMO,diffDOMO)) .LE. 1 .AND. ndiffDOMO .LT. 3) then
|
if(POPCNT(IEOR(diffSOMO,diffDOMO)) .LE. 1 .AND. ndiffDOMO .LT. 3) then
|
||||||
nconnectedI += 1
|
nconnectedI += 1
|
||||||
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
|
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
|
||||||
@ -322,6 +332,7 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, ex
|
|||||||
end select
|
end select
|
||||||
excitationIds(1,nconnectedI)=p
|
excitationIds(1,nconnectedI)=p
|
||||||
excitationIds(2,nconnectedI)=q
|
excitationIds(2,nconnectedI)=q
|
||||||
|
idxs_connectedI(nconnectedI)=i
|
||||||
!print *,"------ > output p,q in obt=",p,q
|
!print *,"------ > output p,q in obt=",p,q
|
||||||
endif
|
endif
|
||||||
end do
|
end do
|
||||||
|
@ -112,6 +112,14 @@ the input determinant \(|D_I\rangle\).
|
|||||||
!call debug_spindet(Isomo,1)
|
!call debug_spindet(Isomo,1)
|
||||||
!call debug_spindet(Idomo,1)
|
!call debug_spindet(Idomo,1)
|
||||||
|
|
||||||
|
!print *,"Nholes=",nholes," Nvmos=",nvmos, " idxi=",idxI
|
||||||
|
!do i = 1,nholes
|
||||||
|
! print *,i,"->",listholes(i)
|
||||||
|
!enddo
|
||||||
|
!do i = 1,nvmos
|
||||||
|
! print *,i,"->",listvmos(i)
|
||||||
|
!enddo
|
||||||
|
|
||||||
! TODO cfg_seniority_index
|
! TODO cfg_seniority_index
|
||||||
do i = 1,nholes
|
do i = 1,nholes
|
||||||
p = listholes(i)
|
p = listholes(i)
|
||||||
@ -227,10 +235,10 @@ the input determinant \(|D_I\rangle\).
|
|||||||
|
|
||||||
NalphaIcfg += 1
|
NalphaIcfg += 1
|
||||||
!print *,p,q,"|",holetype(i),vmotype(j),NalphaIcfg
|
!print *,p,q,"|",holetype(i),vmotype(j),NalphaIcfg
|
||||||
!call debug_spindet(Jsomo,1)
|
!call debug_spindet(Idomo,1)
|
||||||
!call debug_spindet(Jdomo,1)
|
!call debug_spindet(Jdomo,1)
|
||||||
alphasIcfg(1,1,NalphaIcfg) = Jsomo
|
alphasIcfg(1,1,NalphaIcfg) = Jsomo
|
||||||
alphasIcfg(1,2,NalphaIcfg) = Jdomo
|
alphasIcfg(1,2,NalphaIcfg) = IOR(Jdomo,ISHFT(1_8,n_core_orb)-1)
|
||||||
endif
|
endif
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
@ -244,7 +252,7 @@ Next step is to obtain the connected CFGs \(|I\rangle\) that belong to the selec
|
|||||||
given a RI configuration \(|\alpha\rangle\).
|
given a RI configuration \(|\alpha\rangle\).
|
||||||
|
|
||||||
#+begin_src f90 :main no :tangle configuration_CI_sigma_helpers.irp.f
|
#+begin_src f90 :main no :tangle configuration_CI_sigma_helpers.irp.f
|
||||||
subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, excitationIds, excitationTypes)
|
subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, idxs_connectedI, nconnectedI, excitationIds, excitationTypes)
|
||||||
implicit none
|
implicit none
|
||||||
use bitmasks
|
use bitmasks
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
@ -265,6 +273,7 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, ex
|
|||||||
integer ,intent(in) :: idxI
|
integer ,intent(in) :: idxI
|
||||||
integer(bit_kind),intent(in) :: Ialpha(N_int,2)
|
integer(bit_kind),intent(in) :: Ialpha(N_int,2)
|
||||||
integer(bit_kind),intent(out) :: connectedI(N_int,2,*)
|
integer(bit_kind),intent(out) :: connectedI(N_int,2,*)
|
||||||
|
integer ,intent(out) :: idxs_connectedI(*)
|
||||||
integer,intent(out) :: nconnectedI
|
integer,intent(out) :: nconnectedI
|
||||||
integer,intent(out) :: excitationIds(2,*)
|
integer,intent(out) :: excitationIds(2,*)
|
||||||
integer,intent(out) :: excitationTypes(*)
|
integer,intent(out) :: excitationTypes(*)
|
||||||
@ -290,15 +299,16 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, ex
|
|||||||
Jdomo = psi_configuration(1,2,i)
|
Jdomo = psi_configuration(1,2,i)
|
||||||
!call debug_spindet(Isomo,1)
|
!call debug_spindet(Isomo,1)
|
||||||
!call debug_spindet(Idomo,1)
|
!call debug_spindet(Idomo,1)
|
||||||
!print *,"-J--i=",i,Jsomo,Isomo
|
print *,"-J--i=",i,Idomo,Jdomo,">",N_configuration
|
||||||
!call debug_spindet(Jsomo,1)
|
call debug_spindet(Jsomo,1)
|
||||||
!call debug_spindet(Jdomo,1)
|
call debug_spindet(Jdomo,1)
|
||||||
diffSOMO = IEOR(Isomo,Jsomo)
|
diffSOMO = IEOR(Isomo,Jsomo)
|
||||||
diffDOMO = IEOR(Idomo,Jdomo)
|
diffDOMO = IEOR(Idomo,Jdomo)
|
||||||
ndiffSOMO = POPCNT(diffSOMO)
|
ndiffSOMO = POPCNT(diffSOMO)
|
||||||
ndiffDOMO = POPCNT(diffDOMO)
|
ndiffDOMO = POPCNT(diffDOMO)
|
||||||
!if((ndiffSOMO + ndiffDOMO) .EQ. 0) cycle
|
!if((ndiffSOMO + ndiffDOMO) .EQ. 0) cycle
|
||||||
!print *,"-I--i=",i,Isomo,Jsomo,ndiffSOMO,ndiffDOMO
|
!print *,"-I--i=",i,diffSOMO,diffDOMO!Isomo,Jsomo,ndiffSOMO,ndiffDOMO
|
||||||
|
!print *,POPCNT(IEOR(diffSOMO,diffDOMO)), ndiffDOMO
|
||||||
if(POPCNT(IEOR(diffSOMO,diffDOMO)) .LE. 1 .AND. ndiffDOMO .LT. 3) then
|
if(POPCNT(IEOR(diffSOMO,diffDOMO)) .LE. 1 .AND. ndiffDOMO .LT. 3) then
|
||||||
nconnectedI += 1
|
nconnectedI += 1
|
||||||
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
|
connectedI(:,:,nconnectedI) = psi_configuration(:,:,i)
|
||||||
@ -347,6 +357,7 @@ subroutine obtain_connected_I_foralpha(idxI, Ialpha, connectedI, nconnectedI, ex
|
|||||||
end select
|
end select
|
||||||
excitationIds(1,nconnectedI)=p
|
excitationIds(1,nconnectedI)=p
|
||||||
excitationIds(2,nconnectedI)=q
|
excitationIds(2,nconnectedI)=q
|
||||||
|
idxs_connectedI(nconnectedI)=i
|
||||||
!print *,"------ > output p,q in obt=",p,q
|
!print *,"------ > output p,q in obt=",p,q
|
||||||
endif
|
endif
|
||||||
end do
|
end do
|
||||||
|
Loading…
Reference in New Issue
Block a user