mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 19:13:29 +01:00
Optimized get_all_spin_singles
This commit is contained in:
parent
610304c37a
commit
d217a6b9f1
@ -1193,16 +1193,10 @@ subroutine get_all_spin_singles_and_doubles_$N_int(buffer, idx, spindet, size_bu
|
||||
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
||||
enddo
|
||||
|
||||
if (xorvec(1) /= 0_8) then
|
||||
degree = popcnt(xorvec(1))
|
||||
else
|
||||
degree = 0
|
||||
endif
|
||||
|
||||
do k=2,$N_int
|
||||
if ( (degree <= 4).and.(xorvec(k) /= 0_8) ) then
|
||||
do k=1,$N_int
|
||||
degree = degree + popcnt(xorvec(k))
|
||||
endif
|
||||
enddo
|
||||
|
||||
if ( degree == 4 ) then
|
||||
@ -1247,22 +1241,18 @@ subroutine get_all_spin_singles_$N_int(buffer, idx, spindet, size_buffer, single
|
||||
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
||||
enddo
|
||||
|
||||
if (xorvec(1) /= 0_8) then
|
||||
degree = popcnt(xorvec(1))
|
||||
else
|
||||
degree = 0
|
||||
endif
|
||||
|
||||
do k=2,$N_int
|
||||
if ( (degree <= 2).and.(xorvec(k) /= 0_8) ) then
|
||||
do k=1,$N_int
|
||||
degree = degree + popcnt(xorvec(k))
|
||||
endif
|
||||
enddo
|
||||
|
||||
if ( degree == 2 ) then
|
||||
if ( degree /= 2 ) then
|
||||
cycle
|
||||
endif
|
||||
|
||||
singles(n_singles) = idx(i)
|
||||
n_singles = n_singles+1
|
||||
endif
|
||||
|
||||
enddo
|
||||
n_singles = n_singles-1
|
||||
@ -1296,22 +1286,18 @@ subroutine get_all_spin_doubles_$N_int(buffer, idx, spindet, size_buffer, double
|
||||
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
||||
enddo
|
||||
|
||||
if (xorvec(1) /= 0_8) then
|
||||
degree = popcnt(xorvec(1))
|
||||
else
|
||||
degree = 0
|
||||
endif
|
||||
|
||||
do k=2,$N_int
|
||||
if ( (degree <= 4).and.(xorvec(k) /= 0_8) ) then
|
||||
do k=1,$N_int
|
||||
degree = degree + popcnt(xorvec(k))
|
||||
endif
|
||||
enddo
|
||||
|
||||
if ( degree == 4 ) then
|
||||
if ( degree /= 4 ) then
|
||||
cycle
|
||||
endif
|
||||
|
||||
doubles(n_doubles) = idx(i)
|
||||
n_doubles = n_doubles+1
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user