diff --git a/scripts/generate_h_apply.py b/scripts/generate_h_apply.py index cfb1d6bf..c7714e8a 100755 --- a/scripts/generate_h_apply.py +++ b/scripts/generate_h_apply.py @@ -422,7 +422,7 @@ class H_apply(object): if (s2_eig) then call make_s2_eigenfunction endif -! SOFT_TOUCH psi_det psi_coef N_det + SOFT_TOUCH psi_det psi_coef N_det selection_criterion_min = min(selection_criterion_min, maxval(select_max))*0.1d0 selection_criterion = selection_criterion_min call write_double(output_determinants,selection_criterion,'Selection criterion') diff --git a/src/Determinants/H_apply.irp.f b/src/Determinants/H_apply.irp.f index 20eb3e83..887b8938 100644 --- a/src/Determinants/H_apply.irp.f +++ b/src/Determinants/H_apply.irp.f @@ -248,7 +248,6 @@ subroutine remove_duplicates_in_psi_det(found_duplicates) enddo if (found_duplicates) then - call write_bool(output_determinants,found_duplicates,'Found duplicate determinants') k=0 do i=1,N_det if (.not.duplicate(i)) then @@ -258,7 +257,8 @@ subroutine remove_duplicates_in_psi_det(found_duplicates) endif enddo N_det = k - TOUCH N_det psi_det psi_coef + call write_bool(output_determinants,found_duplicates,'Found duplicate determinants') + SOFT_TOUCH N_det psi_det psi_coef endif deallocate (duplicate,bit_tmp) end diff --git a/src/Determinants/occ_pattern.irp.f b/src/Determinants/occ_pattern.irp.f index 3f6a2c87..42032937 100644 --- a/src/Determinants/occ_pattern.irp.f +++ b/src/Determinants/occ_pattern.irp.f @@ -213,10 +213,13 @@ subroutine make_s2_eigenfunction integer :: i,j,k integer :: smax, s integer(bit_kind), allocatable :: d(:,:,:), det_buffer(:,:,:) - integer :: N_det_new, iproc + integer :: N_det_new integer, parameter :: bufsze = 1000 logical, external :: is_in_wavefunction + return + stop 'make_s2_eigenfunction has a bug. It should not be used!!!' + allocate (d(N_int,2,1), det_buffer(N_int,2,bufsze) ) smax = 1 N_det_new = 0 @@ -248,13 +251,13 @@ subroutine make_s2_eigenfunction if (N_det_new > 0) then call fill_H_apply_buffer_no_selection(N_det_new,det_buffer,N_int,0) ! call fill_H_apply_buffer_no_selection_first_order_coef(N_det_new,det_buffer,N_int,0) - call copy_H_apply_buffer_to_wf - SOFT_TOUCH N_det psi_coef psi_det endif deallocate(d,det_buffer) - call write_int(output_determinants,N_det_new, 'Added determinants for S^2') + call copy_H_apply_buffer_to_wf + SOFT_TOUCH N_det psi_coef psi_det + print *, 'Added determinants for S^2' end