mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-30 12:43:40 +02:00
XOR->IEOR
This commit is contained in:
parent
b6c4e14ad4
commit
9a5458cc3f
@ -48,7 +48,7 @@
|
|||||||
nholes = 0
|
nholes = 0
|
||||||
! holes in SOMO
|
! holes in SOMO
|
||||||
do i = n_core_orb+1,n_core_orb + n_act_orb
|
do i = n_core_orb+1,n_core_orb + n_act_orb
|
||||||
if(POPCNT(IAND(Isomo,IBSET(0,i-1))) .EQ. 1) then
|
if(POPCNT(IAND(Isomo,IBSET(0_8,i-1))) .EQ. 1) then
|
||||||
nholes += 1
|
nholes += 1
|
||||||
listholes(nholes) = i
|
listholes(nholes) = i
|
||||||
holetype(nholes) = 1
|
holetype(nholes) = 1
|
||||||
@ -56,7 +56,7 @@
|
|||||||
end do
|
end do
|
||||||
! holes in DOMO
|
! holes in DOMO
|
||||||
do i = n_core_orb+1,n_core_orb + n_act_orb
|
do i = n_core_orb+1,n_core_orb + n_act_orb
|
||||||
if(POPCNT(IAND(Idomo,IBSET(0,i-1))) .EQ. 1) then
|
if(POPCNT(IAND(Idomo,IBSET(0_8,i-1))) .EQ. 1) then
|
||||||
nholes += 1
|
nholes += 1
|
||||||
listholes(nholes) = i
|
listholes(nholes) = i
|
||||||
holetype(nholes) = 2
|
holetype(nholes) = 2
|
||||||
@ -69,11 +69,11 @@
|
|||||||
nvmos = 0
|
nvmos = 0
|
||||||
do i = n_core_orb+1,n_core_orb + n_act_orb
|
do i = n_core_orb+1,n_core_orb + n_act_orb
|
||||||
!print *,i,IBSET(0,i-1),POPCNT(IAND(Isomo,(IBSET(0,i-1)))), POPCNT(IAND(Idomo,(IBSET(0,i-1))))
|
!print *,i,IBSET(0,i-1),POPCNT(IAND(Isomo,(IBSET(0,i-1)))), POPCNT(IAND(Idomo,(IBSET(0,i-1))))
|
||||||
if(POPCNT(IAND(Isomo,(IBSET(0,i-1)))) .EQ. 0 .AND. POPCNT(IAND(Idomo,(IBSET(0,i-1)))) .EQ. 0) then
|
if(POPCNT(IAND(Isomo,(IBSET(0_8,i-1)))) .EQ. 0 .AND. POPCNT(IAND(Idomo,(IBSET(0_8,i-1)))) .EQ. 0) then
|
||||||
nvmos += 1
|
nvmos += 1
|
||||||
listvmos(nvmos) = i
|
listvmos(nvmos) = i
|
||||||
vmotype(nvmos) = 1
|
vmotype(nvmos) = 1
|
||||||
else if(POPCNT(IAND(Isomo,(IBSET(0,i-1)))) .EQ. 1 .AND. POPCNT(IAND(Idomo,(IBSET(0,i-1)))) .EQ. 0 ) then
|
else if(POPCNT(IAND(Isomo,(IBSET(0_8,i-1)))) .EQ. 1 .AND. POPCNT(IAND(Idomo,(IBSET(0_8,i-1)))) .EQ. 0 ) then
|
||||||
nvmos += 1
|
nvmos += 1
|
||||||
listvmos(nvmos) = i
|
listvmos(nvmos) = i
|
||||||
vmotype(nvmos) = 2
|
vmotype(nvmos) = 2
|
||||||
|
@ -145,11 +145,11 @@ the input determinant \(|D_I\rangle\).
|
|||||||
pqAlreadyGenQ = .FALSE.
|
pqAlreadyGenQ = .FALSE.
|
||||||
! First check if it can be generated before
|
! First check if it can be generated before
|
||||||
do k = 1, idxI-1
|
do k = 1, idxI-1
|
||||||
diffSOMO = XOR(Jsomo,iand(reunion_of_act_virt_bitmask(1,1),psi_configuration(1,1,k)))
|
diffSOMO = IEOR(Jsomo,iand(reunion_of_act_virt_bitmask(1,1),psi_configuration(1,1,k)))
|
||||||
diffDOMO = XOR(Jdomo,iand(reunion_of_act_virt_bitmask(1,1),psi_configuration(1,2,k)))
|
diffDOMO = IEOR(Jdomo,iand(reunion_of_act_virt_bitmask(1,1),psi_configuration(1,2,k)))
|
||||||
ndiffSOMO = POPCNT(diffSOMO)
|
ndiffSOMO = POPCNT(diffSOMO)
|
||||||
ndiffDOMO = POPCNT(diffDOMO)
|
ndiffDOMO = POPCNT(diffDOMO)
|
||||||
if(POPCNT(XOR(diffSOMO,diffDOMO)) .LE. 1 .AND. ndiffDOMO .LT. 3) then
|
if(POPCNT(IEOR(diffSOMO,diffDOMO)) .LE. 1 .AND. ndiffDOMO .LT. 3) then
|
||||||
pqAlreadyGenQ = .TRUE.
|
pqAlreadyGenQ = .TRUE.
|
||||||
!print *,i,k,ndiffSOMO,ndiffDOMO
|
!print *,i,k,ndiffSOMO,ndiffDOMO
|
||||||
!call debug_spindet(Jsomo,1)
|
!call debug_spindet(Jsomo,1)
|
||||||
@ -165,8 +165,8 @@ the input determinant \(|D_I\rangle\).
|
|||||||
pqExistsQ = .FALSE.
|
pqExistsQ = .FALSE.
|
||||||
! now check if this exists in the selected list
|
! now check if this exists in the selected list
|
||||||
do k = idxI, N_configuration
|
do k = idxI, N_configuration
|
||||||
diffSOMO = XOR(OR(reunion_of_act_virt_bitmask(1,1),Jsomo),psi_configuration(1,1,k))
|
diffSOMO = IEOR(OR(reunion_of_act_virt_bitmask(1,1),Jsomo),psi_configuration(1,1,k))
|
||||||
diffDOMO = XOR(OR(reunion_of_act_virt_bitmask(1,1),Jdomo),psi_configuration(1,2,k))
|
diffDOMO = IEOR(OR(reunion_of_act_virt_bitmask(1,1),Jdomo),psi_configuration(1,2,k))
|
||||||
ndiffSOMO = POPCNT(diffSOMO)
|
ndiffSOMO = POPCNT(diffSOMO)
|
||||||
ndiffDOMO = POPCNT(diffDOMO)
|
ndiffDOMO = POPCNT(diffDOMO)
|
||||||
if((ndiffSOMO + ndiffDOMO) .EQ. 0) then
|
if((ndiffSOMO + ndiffDOMO) .EQ. 0) then
|
||||||
@ -279,18 +279,18 @@ subroutine obtain_connected_I_foralpha(Ialpha, connectedI, nconnectedI, excitati
|
|||||||
Isomo = Ialpha(1,1)
|
Isomo = Ialpha(1,1)
|
||||||
Idomo = Ialpha(1,2)
|
Idomo = Ialpha(1,2)
|
||||||
do i=1,N_configuration
|
do i=1,N_configuration
|
||||||
diffSOMO = XOR(Isomo,psi_configuration(1,1,i))
|
diffSOMO = IEOR(Isomo,psi_configuration(1,1,i))
|
||||||
diffDOMO = XOR(Idomo,psi_configuration(1,2,i))
|
diffDOMO = IEOR(Idomo,psi_configuration(1,2,i))
|
||||||
ndiffSOMO = POPCNT(diffSOMO)
|
ndiffSOMO = POPCNT(diffSOMO)
|
||||||
ndiffDOMO = POPCNT(diffDOMO)
|
ndiffDOMO = POPCNT(diffDOMO)
|
||||||
if(POPCNT(XOR(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)
|
||||||
select case(ndiffDOMO)
|
select case(ndiffDOMO)
|
||||||
case (0)
|
case (0)
|
||||||
! SOMO -> VMO
|
! SOMO -> VMO
|
||||||
excitationTypes(nconnectedI) = 3
|
excitationTypes(nconnectedI) = 3
|
||||||
Jsomo = XOR(Isomo, psi_configuration(1,1,i))
|
Jsomo = IEOR(Isomo, psi_configuration(1,1,i))
|
||||||
p = TRAILZ(iand(Jsomo,Isomo))
|
p = TRAILZ(iand(Jsomo,Isomo))
|
||||||
q = TRAILZ(iand(Jsomo,psi_configuration(1,1,i)))
|
q = TRAILZ(iand(Jsomo,psi_configuration(1,1,i)))
|
||||||
case (1)
|
case (1)
|
||||||
@ -302,22 +302,22 @@ subroutine obtain_connected_I_foralpha(Ialpha, connectedI, nconnectedI, excitati
|
|||||||
if(nsomoI .GT. nsomoalpha) then
|
if(nsomoI .GT. nsomoalpha) then
|
||||||
! DOMO -> VMO
|
! DOMO -> VMO
|
||||||
excitationTypes(nconnectedI) = 2
|
excitationTypes(nconnectedI) = 2
|
||||||
Jdomo = XOR(Idomo, psi_configuration(1,2,i))
|
Jdomo = IEOR(Idomo, psi_configuration(1,2,i))
|
||||||
Jsomo = XOR(Jdomo,XOR(Isomo, psi_configuration(1,1,i)))
|
Jsomo = IEOR(Jdomo,IEOR(Isomo, psi_configuration(1,1,i)))
|
||||||
p = TRAILZ(Jdomo)
|
p = TRAILZ(Jdomo)
|
||||||
q = TRAILZ(Jsomo)
|
q = TRAILZ(Jsomo)
|
||||||
else
|
else
|
||||||
! SOMO -> SOMO
|
! SOMO -> SOMO
|
||||||
excitationTypes(nconnectedI) = 1
|
excitationTypes(nconnectedI) = 1
|
||||||
Jdomo = XOR(Idomo, psi_configuration(1,2,i))
|
Jdomo = IEOR(Idomo, psi_configuration(1,2,i))
|
||||||
Jsomo = XOR(Jdomo,XOR(Isomo, psi_configuration(1,1,i)))
|
Jsomo = IEOR(Jdomo,IEOR(Isomo, psi_configuration(1,1,i)))
|
||||||
q = TRAILZ(Jdomo)
|
q = TRAILZ(Jdomo)
|
||||||
p = TRAILZ(Jsomo)
|
p = TRAILZ(Jsomo)
|
||||||
end if
|
end if
|
||||||
case (2)
|
case (2)
|
||||||
! DOMO -> SOMO
|
! DOMO -> SOMO
|
||||||
excitationTypes(nconnectedI) = 4
|
excitationTypes(nconnectedI) = 4
|
||||||
Jdomo = XOR(Idomo, psi_configuration(1,2,i))
|
Jdomo = IEOR(Idomo, psi_configuration(1,2,i))
|
||||||
p = TRAILZ(iand(Jdomo,Idomo))
|
p = TRAILZ(iand(Jdomo,Idomo))
|
||||||
q = TRAILZ(iand(Jdomo,psi_configuration(1,2,i)))
|
q = TRAILZ(iand(Jdomo,psi_configuration(1,2,i)))
|
||||||
case default
|
case default
|
||||||
|
Loading…
Reference in New Issue
Block a user