diff --git a/src/Dets/connected_to_ref.irp.f b/src/Dets/connected_to_ref.irp.f index 07331782..3c7eb581 100644 --- a/src/Dets/connected_to_ref.irp.f +++ b/src/Dets/connected_to_ref.irp.f @@ -95,9 +95,9 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint) enddo i += 1 -! if (i > N_det) then -! return -! endif + if (i > N_det) then + return + endif !DIR$ FORCEINLINE do while (det_search_key(psi_det_sorted_bit(1,1,i),Nint) == det_ref) @@ -116,39 +116,39 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint) enddo if (is_in_wavefunction) then get_index_in_psi_det_sorted_bit = i - exit -! return +! exit + return endif endif i += 1 if (i > N_det) then - exit -! return +! exit + return endif enddo ! DEBUG is_in_wf - if (is_in_wavefunction) then - degree = 1 - do i=1,N_det - integer :: degree - call get_excitation_degree(key,psi_det(1,1,i),degree,N_int) - if (degree == 0) then - exit - endif - enddo - if (degree /=0) then - stop 'pouet 1' - endif - else - do i=1,N_det - call get_excitation_degree(key,psi_det(1,1,i),degree,N_int) - if (degree == 0) then - stop 'pouet 2' - endif - enddo - endif +! if (is_in_wavefunction) then +! degree = 1 +! do i=1,N_det +! integer :: degree +! call get_excitation_degree(key,psi_det(1,1,i),degree,N_int) +! if (degree == 0) then +! exit +! endif +! enddo +! if (degree /=0) then +! stop 'pouet 1' +! endif +! else +! do i=1,N_det +! call get_excitation_degree(key,psi_det(1,1,i),degree,N_int) +! if (degree == 0) then +! stop 'pouet 2' +! endif +! enddo +! endif ! END DEBUG is_in_wf end diff --git a/src/MRCC/mrcc.irp.f b/src/MRCC/mrcc.irp.f index 0ca9f169..2b879882 100644 --- a/src/MRCC/mrcc.irp.f +++ b/src/MRCC/mrcc.irp.f @@ -55,11 +55,12 @@ subroutine run_mrcc print *, '===========================' print *, '' E_old = sum(ci_energy_dressed) - call diagonalize_ci_dressed call write_double(6,ci_energy_dressed(1),"MRCC energy") + call diagonalize_ci_dressed E_new = sum(ci_energy_dressed) delta_E = dabs(E_new - E_old) enddo + call write_double(6,ci_energy_dressed(1),"Final MRCC energy") call ezfio_set_mrcc_energy(ci_energy_dressed(1)) ! call save_wavefunction