mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 05:51:46 +02:00
Correct annoying QMC bug
This commit is contained in:
parent
51d42a2187
commit
67da0834f5
@ -1 +1 @@
|
||||
Determinants Davidson
|
||||
Determinants Davidson Full_CI_ZMQ
|
||||
|
@ -24,13 +24,13 @@ program save_for_qmc
|
||||
)
|
||||
iunit = 13
|
||||
open(unit=iunit,file=trim(ezfio_filename)//'/simulation/e_ref',action='write')
|
||||
call ezfio_has_full_ci_energy_pt2(exists)
|
||||
call ezfio_has_full_ci_zmq_energy_pt2(exists)
|
||||
if (exists) then
|
||||
call ezfio_get_full_ci_energy_pt2(e_ref)
|
||||
call ezfio_get_full_ci_zmq_energy_pt2(e_ref)
|
||||
else
|
||||
call ezfio_has_full_ci_energy(exists)
|
||||
call ezfio_has_full_ci_zmq_energy(exists)
|
||||
if (exists) then
|
||||
call ezfio_get_full_ci_energy(e_ref)
|
||||
call ezfio_get_full_ci_zmq_energy(e_ref)
|
||||
else
|
||||
call ezfio_has_hartree_fock_energy(exists)
|
||||
if (exists) then
|
||||
|
@ -20,7 +20,7 @@ program e_curve
|
||||
double precision, allocatable :: u_t(:,:), v_t(:,:), s_t(:,:)
|
||||
double precision, allocatable :: u_0(:,:), v_0(:,:)
|
||||
allocate(u_t(N_states,N_det),v_t(N_states,N_det),s_t(N_states,N_det))
|
||||
allocate(u_0(N_states,N_det),v_0(N_states,N_det))
|
||||
allocate(u_0(N_det,N_states),v_0(N_det,N_states))
|
||||
|
||||
print *, 'Threshold?'
|
||||
read(*,*) thresh
|
||||
|
@ -246,11 +246,15 @@ subroutine get_double_excitation(det1,det2,exc,phase,Nint)
|
||||
nperm = nperm + popcnt(iand(det1(j,ispin), &
|
||||
iand( ibset(0_bit_kind,m-1)-1_bit_kind, &
|
||||
ibclr(-1_bit_kind,n)+1_bit_kind ) ))
|
||||
! TODO iand( not(ishft(1_bit_kind,n+1))+1_bit_kind, &
|
||||
! ishft(1_bit_kind,m)-1_bit_kind)))
|
||||
else
|
||||
nperm = nperm + popcnt(iand(det1(k,ispin), &
|
||||
ibset(0_bit_kind,m-1)-1_bit_kind))
|
||||
! TODO ishft(1_bit_kind,m)-1_bit_kind))
|
||||
if (n < bit_kind_size) then
|
||||
nperm = nperm + popcnt(iand(det1(j,ispin), ibclr(-1_bit_kind,n) +1_bit_kind))
|
||||
! TODO ishft(1_bit_kind,m)-1_bit_kind))
|
||||
endif
|
||||
do i=j+1,k-1
|
||||
nperm = nperm + popcnt(det1(i,ispin))
|
||||
@ -365,8 +369,12 @@ subroutine get_mono_excitation(det1,det2,exc,phase,Nint)
|
||||
if (j==k) then
|
||||
nperm = popcnt(iand(det1(j,ispin), &
|
||||
iand(ibset(0_bit_kind,m-1)-1_bit_kind,ibclr(-1_bit_kind,n)+1_bit_kind)))
|
||||
!TODO iand( not(ishft(1_bit_kind,n+1))+1_bit_kind, &
|
||||
! ishft(1_bit_kind,m)-1_bit_kind)))
|
||||
else
|
||||
nperm = nperm + popcnt(iand(det1(k,ispin),ibset(0_bit_kind,m-1)-1_bit_kind))
|
||||
!TODO nperm = popcnt(iand(det1(k,ispin), ishft(1_bit_kind,m)-1_bit_kind)) + &
|
||||
! popcnt(iand(det1(j,ispin), not(ishft(1_bit_kind,n+1))+1_bit_kind))
|
||||
if (n < bit_kind_size) then
|
||||
nperm = nperm + popcnt(iand(det1(j,ispin),ibclr(-1_bit_kind,n)+1_bit_kind))
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user