From e3d8e28e23a7c6b19cb52b0aa8b2af0739207f19 Mon Sep 17 00:00:00 2001 From: AbdAmmar Date: Thu, 18 May 2023 20:57:55 +0200 Subject: [PATCH] TC-SCF: no rotations for good angles --- src/tc_scf/rh_tcscf_diis.irp.f | 2 +- src/tc_scf/rh_tcscf_simple.irp.f | 2 +- src/tc_scf/routines_rotates.irp.f | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/tc_scf/rh_tcscf_diis.irp.f b/src/tc_scf/rh_tcscf_diis.irp.f index 61355498..20260a95 100644 --- a/src/tc_scf/rh_tcscf_diis.irp.f +++ b/src/tc_scf/rh_tcscf_diis.irp.f @@ -236,7 +236,7 @@ subroutine rh_tcscf_diis() ! --- print *, ' TCSCF DIIS converged !' - !call print_energy_and_mos() + !call print_energy_and_mos(good_angles) call write_time(6) deallocate(mo_r_coef_save, mo_l_coef_save, F_DIIS, E_DIIS) diff --git a/src/tc_scf/rh_tcscf_simple.irp.f b/src/tc_scf/rh_tcscf_simple.irp.f index 30798e3d..0b79e8ea 100644 --- a/src/tc_scf/rh_tcscf_simple.irp.f +++ b/src/tc_scf/rh_tcscf_simple.irp.f @@ -119,7 +119,7 @@ subroutine rh_tcscf_simple() endif print *, ' TCSCF Simple converged !' - call print_energy_and_mos() + !call print_energy_and_mos(good_angles) deallocate(rho_old, rho_new) diff --git a/src/tc_scf/routines_rotates.irp.f b/src/tc_scf/routines_rotates.irp.f index 4ac66b5f..755c35b9 100644 --- a/src/tc_scf/routines_rotates.irp.f +++ b/src/tc_scf/routines_rotates.irp.f @@ -59,7 +59,7 @@ subroutine minimize_tc_orb_angles() good_angles = .False. thr_deg = thr_degen_tc - call print_energy_and_mos() + call print_energy_and_mos(good_angles) print *, ' Minimizing the angles between the TC orbitals' i = 1 @@ -78,7 +78,7 @@ subroutine minimize_tc_orb_angles() print *, ' Converged ANGLES MINIMIZATION !!' call print_angles_tc() - call print_energy_and_mos() + call print_energy_and_mos(good_angles) end @@ -386,10 +386,11 @@ end ! --- -subroutine print_energy_and_mos() +subroutine print_energy_and_mos(good_angles) implicit none - integer :: i + logical, intent(out) :: good_angles + integer :: i print *, ' ' print *, ' TC energy = ', TC_HF_energy @@ -398,10 +399,13 @@ subroutine print_energy_and_mos() if(max_angle_left_right .lt. 45.d0) then print *, ' Maximum angle BELOW 45 degrees, everthing is OK !' + good_angles = .true. else if(max_angle_left_right .gt. 45.d0 .and. max_angle_left_right .lt. 75.d0) then print *, ' Maximum angle between 45 and 75 degrees, this is not the best for TC-CI calculations ...' + good_angles = .false. else if(max_angle_left_right .gt. 75.d0) then print *, ' Maximum angle between ABOVE 75 degrees, YOU WILL CERTAINLY FIND TROUBLES IN TC-CI calculations ...' + good_angles = .false. endif print *, ' Diag Fock elem, product of left/right norm, angle left/right '