9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-18 11:23:38 +01:00

TC-SCF: no rotations for good angles

This commit is contained in:
AbdAmmar 2023-05-18 20:57:55 +02:00
parent ae227aac33
commit e3d8e28e23
3 changed files with 10 additions and 6 deletions

View File

@ -236,7 +236,7 @@ subroutine rh_tcscf_diis()
! --- ! ---
print *, ' TCSCF DIIS converged !' print *, ' TCSCF DIIS converged !'
!call print_energy_and_mos() !call print_energy_and_mos(good_angles)
call write_time(6) call write_time(6)
deallocate(mo_r_coef_save, mo_l_coef_save, F_DIIS, E_DIIS) deallocate(mo_r_coef_save, mo_l_coef_save, F_DIIS, E_DIIS)

View File

@ -119,7 +119,7 @@ subroutine rh_tcscf_simple()
endif endif
print *, ' TCSCF Simple converged !' print *, ' TCSCF Simple converged !'
call print_energy_and_mos() !call print_energy_and_mos(good_angles)
deallocate(rho_old, rho_new) deallocate(rho_old, rho_new)

View File

@ -59,7 +59,7 @@ subroutine minimize_tc_orb_angles()
good_angles = .False. good_angles = .False.
thr_deg = thr_degen_tc 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' print *, ' Minimizing the angles between the TC orbitals'
i = 1 i = 1
@ -78,7 +78,7 @@ subroutine minimize_tc_orb_angles()
print *, ' Converged ANGLES MINIMIZATION !!' print *, ' Converged ANGLES MINIMIZATION !!'
call print_angles_tc() call print_angles_tc()
call print_energy_and_mos() call print_energy_and_mos(good_angles)
end end
@ -386,9 +386,10 @@ end
! --- ! ---
subroutine print_energy_and_mos() subroutine print_energy_and_mos(good_angles)
implicit none implicit none
logical, intent(out) :: good_angles
integer :: i integer :: i
print *, ' ' print *, ' '
@ -398,10 +399,13 @@ subroutine print_energy_and_mos()
if(max_angle_left_right .lt. 45.d0) then if(max_angle_left_right .lt. 45.d0) then
print *, ' Maximum angle BELOW 45 degrees, everthing is OK !' 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 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 ...' 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 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 ...' print *, ' Maximum angle between ABOVE 75 degrees, YOU WILL CERTAINLY FIND TROUBLES IN TC-CI calculations ...'
good_angles = .false.
endif endif
print *, ' Diag Fock elem, product of left/right norm, angle left/right ' print *, ' Diag Fock elem, product of left/right norm, angle left/right '