mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2024-11-07 14:43:41 +01:00
Fixed bug
This commit is contained in:
parent
f918fcf13e
commit
114d4a695c
@ -1,4 +1,4 @@
|
||||
program qmcpack
|
||||
program save_for_camp
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Generates a file for CHAMP
|
||||
|
@ -48,8 +48,13 @@ subroutine write_champ_csf
|
||||
do i=1,N_configuration
|
||||
startdet = psi_configuration_to_psi_det(1,i)
|
||||
enddet = psi_configuration_to_psi_det(2,i)
|
||||
s = 0
|
||||
do k=1,N_int
|
||||
if (psi_configuration(k,1,i) == 0_bit_kind) cycle
|
||||
s = s + popcnt(psi_configuration(k,1,i))
|
||||
enddo
|
||||
bfIcfg = max(1,nint((binom(s,(s+1)/2)-binom(s,((s+1)/2)+1))))
|
||||
do k=1,bfIcfg
|
||||
write(iunit, '(I4)') ndetI
|
||||
do j = startdet, enddet
|
||||
if (DetToCSFTransformationMatrix(s,k,j-startdet+1) == 0.d0) cycle
|
||||
ndetI += 1
|
||||
@ -63,7 +68,6 @@ subroutine write_champ_csf
|
||||
do i=1,N_configuration
|
||||
startdet = psi_configuration_to_psi_det(1,i)
|
||||
enddet = psi_configuration_to_psi_det(2,i)
|
||||
ndetI = enddet-startdet+1
|
||||
|
||||
s = 0
|
||||
do k=1,N_int
|
||||
@ -73,6 +77,12 @@ subroutine write_champ_csf
|
||||
bfIcfg = max(1,nint((binom(s,(s+1)/2)-binom(s,((s+1)/2)+1))))
|
||||
|
||||
do k=1,bfIcfg
|
||||
ndetI = 0
|
||||
do j = startdet, enddet
|
||||
if (DetToCSFTransformationMatrix(s,k,j-startdet+1) == 0.d0) cycle
|
||||
ndetI += 1
|
||||
end do
|
||||
|
||||
write(iunit, '(I4)') ndetI
|
||||
do j = startdet, enddet
|
||||
if (DetToCSFTransformationMatrix(s,k,j-startdet+1) == 0.d0) cycle
|
||||
|
Loading…
Reference in New Issue
Block a user