diff --git a/src/basis_correction/print_routine.irp.f b/src/basis_correction/print_routine.irp.f index 67c5c6c2..d7506231 100644 --- a/src/basis_correction/print_routine.irp.f +++ b/src/basis_correction/print_routine.irp.f @@ -80,3 +80,64 @@ subroutine print_basis_correction end + +subroutine print_all_basis_correction + implicit none + integer :: istate + provide mu_average_prov + provide ecmd_lda_mu_of_r ecmd_pbe_ueg_mu_of_r + provide ecmd_pbe_on_top_mu_of_r ecmd_pbe_on_top_su_mu_of_r + + print*, '' + print*, '' + print*, '****************************************' + print*, '****************************************' + print*, 'Basis set correction for WFT using DFT Ecmd functionals' + print*, 'These functionals are accurate for short-range correlation' + print*, '' + print*, 'For more details look at Journal of Chemical Physics 149, 194301 1-15 (2018) ' + print*, ' Journal of Physical Chemistry Letters 10, 2931-2937 (2019) ' + print*, ' ???REF SC?' + print*, '****************************************' + print*, '****************************************' + print*, 'mu_of_r_potential = ',mu_of_r_potential + print*, '' + print*,'Using a CAS-like two-body density to define mu(r)' + print*,'This assumes that the CAS is a qualitative representation of the wave function ' + print*,'********************************************' + print*,'Functionals more suited for weak correlation' + print*,'********************************************' + print*,'+) LDA Ecmd functional : purely based on the UEG (JCP,149,194301,1-15 (2018)) ' + do istate = 1, N_states + write(*, '(A29,X,I3,X,A3,X,F16.10)') ' ECMD LDA , state ',istate,' = ',ecmd_lda_mu_of_r(istate) + enddo + print*,'+) PBE-UEG Ecmd functional : PBE at mu=0, UEG ontop pair density at large mu (JPCL, 10, 2931-2937 (2019))' + do istate = 1, N_states + write(*, '(A29,X,I3,X,A3,X,F16.10)') ' ECMD PBE-UEG , state ',istate,' = ',ecmd_pbe_ueg_mu_of_r(istate) + enddo + print*,'' + print*,'********************************************' + print*,'********************************************' + print*,'+) PBE-on-top Ecmd functional : (??????? REF-SCF ??????????)' + print*,'PBE at mu=0, extrapolated ontop pair density at large mu, usual spin-polarization' + do istate = 1, N_states + write(*, '(A29,X,I3,X,A3,X,F16.10)') ' ECMD PBE-OT , state ',istate,' = ',ecmd_pbe_on_top_mu_of_r(istate) + enddo + print*,'' + print*,'********************************************' + print*,'+) PBE-on-top no spin polarization Ecmd functional : (??????? REF-SCF ??????????)' + print*,'PBE at mu=0, extrapolated ontop pair density at large mu, and ZERO SPIN POLARIZATION' + do istate = 1, N_states + write(*, '(A29,X,I3,X,A3,X,F16.10)') ' ECMD SU-PBE-OT , state ',istate,' = ',ecmd_pbe_on_top_su_mu_of_r(istate) + enddo + print*,'' + + print*,'' + print*,'**************' + do istate = 1, N_states + write(*, '(A29,X,I3,X,A3,X,F16.10)') ' Average mu(r) , state ',istate,' = ',mu_average_prov(istate) + enddo + +end + + diff --git a/src/dav_general_mat/dav_ext_rout_nonsym_B1space.irp.f b/src/dav_general_mat/dav_ext_rout_nonsym_B1space.irp.f index c5127861..3fbae325 100644 --- a/src/dav_general_mat/dav_ext_rout_nonsym_B1space.irp.f +++ b/src/dav_general_mat/dav_ext_rout_nonsym_B1space.irp.f @@ -61,6 +61,16 @@ subroutine davidson_general_ext_rout_nonsym_b1space(u_in, H_jj, energies, sze, N include 'constants.include.F' N_st_diag = N_st_diag_in +! print*,'trial vector' + do i = 1, sze + if(isnan(u_in(i,1)))then + print*,'pb in input vector of davidson_general_ext_rout_nonsym_b1space' + print*,i,u_in(i,1) + stop + else if (dabs(u_in(i,1)).lt.1.d-16)then + u_in(i,1) = 0.d0 + endif + enddo !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: U, W, y, h, lambda if(N_st_diag*3 > sze) then @@ -323,7 +333,7 @@ subroutine davidson_general_ext_rout_nonsym_b1space(u_in, H_jj, energies, sze, N endif enddo deallocate(overlap) - if( lambda_tmp .lt. 0.8d0) then + if( lambda_tmp .lt. 0.5d0) then print *, ' very small overlap..' print*, ' max overlap = ', lambda_tmp, i_omax stop @@ -520,7 +530,7 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim) , WORK, LWORK, IWORK, INFO ) if(INFO .ne. 0) then - print*, 'dgeevx failed !!', INFO + print*, 'first dgeevx failed !!', INFO stop endif @@ -534,7 +544,7 @@ subroutine diag_nonsym_right(n, A, A_ldim, V, V_ldim, energy, E_ldim) , ILO, IHI, SCALE_array, ABNRM, RCONDE, RCONDV & , WORK, LWORK, IWORK, INFO ) if(INFO .ne. 0) then - print*, 'dgeevx failed !!', INFO + print*, 'second dgeevx failed !!', INFO stop endif diff --git a/src/davidson/EZFIO.cfg b/src/davidson/EZFIO.cfg index 8696d72e..b46a8cc5 100644 --- a/src/davidson/EZFIO.cfg +++ b/src/davidson/EZFIO.cfg @@ -68,5 +68,5 @@ interface: ezfio,provider,ocaml type: Threshold doc: Thresholds of non-symetric Davidson's algorithm interface: ezfio,provider,ocaml -default: 1.e-6 +default: 1.e-12