mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-09-12 10:48:31 +02: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) )
|
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (xorvec(1) /= 0_8) then
|
degree = 0
|
||||||
degree = popcnt(xorvec(1))
|
|
||||||
else
|
|
||||||
degree = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
do k=2,$N_int
|
do k=1,$N_int
|
||||||
if ( (degree <= 4).and.(xorvec(k) /= 0_8) ) then
|
|
||||||
degree = degree + popcnt(xorvec(k))
|
degree = degree + popcnt(xorvec(k))
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if ( degree == 4 ) then
|
if ( degree == 4 ) then
|
||||||
@ -1247,23 +1241,19 @@ subroutine get_all_spin_singles_$N_int(buffer, idx, spindet, size_buffer, single
|
|||||||
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (xorvec(1) /= 0_8) then
|
degree = 0
|
||||||
degree = popcnt(xorvec(1))
|
|
||||||
else
|
|
||||||
degree = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
do k=2,$N_int
|
do k=1,$N_int
|
||||||
if ( (degree <= 2).and.(xorvec(k) /= 0_8) ) then
|
|
||||||
degree = degree + popcnt(xorvec(k))
|
degree = degree + popcnt(xorvec(k))
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if ( degree == 2 ) then
|
if ( degree /= 2 ) then
|
||||||
singles(n_singles) = idx(i)
|
cycle
|
||||||
n_singles = n_singles+1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
singles(n_singles) = idx(i)
|
||||||
|
n_singles = n_singles+1
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
n_singles = n_singles-1
|
n_singles = n_singles-1
|
||||||
|
|
||||||
@ -1296,23 +1286,19 @@ subroutine get_all_spin_doubles_$N_int(buffer, idx, spindet, size_buffer, double
|
|||||||
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
xorvec(k) = xor( spindet(k), buffer(k,i) )
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (xorvec(1) /= 0_8) then
|
degree = 0
|
||||||
degree = popcnt(xorvec(1))
|
|
||||||
else
|
|
||||||
degree = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
do k=2,$N_int
|
do k=1,$N_int
|
||||||
if ( (degree <= 4).and.(xorvec(k) /= 0_8) ) then
|
|
||||||
degree = degree + popcnt(xorvec(k))
|
degree = degree + popcnt(xorvec(k))
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if ( degree == 4 ) then
|
if ( degree /= 4 ) then
|
||||||
doubles(n_doubles) = idx(i)
|
cycle
|
||||||
n_doubles = n_doubles+1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
doubles(n_doubles) = idx(i)
|
||||||
|
n_doubles = n_doubles+1
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
n_doubles = n_doubles-1
|
n_doubles = n_doubles-1
|
||||||
|
Loading…
Reference in New Issue
Block a user