print_results Subroutine

public subroutine print_results(overlap_mo, e, e_old, nbf, na, iw)

Uses

  • proc~~print_results~~UsesGraph proc~print_results print_results module~physical_constants physical_constants proc~print_results->module~physical_constants module~precision precision proc~print_results->module~precision iso_fortran_env iso_fortran_env module~physical_constants->iso_fortran_env module~precision->iso_fortran_env

@brief Print results of MO overlap between two geometries

This subroutine prints the results of Molecular Orbital (MO) overlap calculations between two geometries, including energy comparisons and overlap values.

@param[in] overlap_mo MO overlap matrix @param[in] e MO energies of the current geometry (in Hartree) @param[in] e_old MO energies of the old geometry (in Hartree) @param[in] nbf Number of basis functions @param[in] iw Output unit number for writing results

Note

The subroutine prints a table showing: - Corresponding overlap between old and new MOs - Energies of corresponding MOs in eV - Diagonal and maximum overlap values - Warnings for low overlap or rearranged orbitals

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: overlap_mo(:,:)
real(kind=dp), intent(in) :: e(:)
real(kind=dp), intent(in) :: e_old(:)
integer, intent(in) :: nbf
integer, intent(in) :: na
integer, intent(in) :: iw

Called by

proc~~print_results~~CalledByGraph proc~print_results print_results proc~get_structures_ao_overlap get_structures_ao_overlap proc~get_structures_ao_overlap->proc~print_results proc~get_structures_ao_overlap_c get_structures_ao_overlap_C proc~get_structures_ao_overlap_c->proc~get_structures_ao_overlap

Source Code

  subroutine print_results(overlap_mo, e, e_old, nbf, na, iw)
    use precision, only: dp
    use physical_constants, only: ev2htree

    implicit none

    real(kind=dp), intent(in) :: overlap_mo(:,:)
    real(kind=dp), intent(in) :: e(:)
    real(kind=dp), intent(in) :: e_old(:)
    integer, intent(in) :: nbf, na, iw

    integer :: i, loc
    real(kind=dp) :: tmp, tmp2, tmp_abs

    write(iw, fmt="(/16X,39('=')/16X,a/16X,39('='))") &
        'Overlap MOs between geometries computed'

    write(iw,fmt='(/,x,65("-"),/,1x,a,/,x,65("-"))') &
    "Maximum Overlap (MaxO) between MOs_old(A) and MOs(B). Delta = A-B"
    write(iw,fmt='(x,a,1x,a,2x,a,2x,a,2x,a,2x,a)') &
   'A_i <- B(MaxO)', 'A_i, eV','Delta, eV', 'B_i, eV', &
   'B_i A_i Overlap','MaxO'
    do i = 1, nbf
      tmp_abs = maxval(abs(overlap_mo(:nbf,i)))
      loc = maxloc(abs(overlap_mo(:nbf,i)), dim=1)
      tmp = overlap_mo(loc,i)
      tmp2 = overlap_mo(i,i)

      write(iw, advance='no', fmt='(x,i3,3x,i4,3x,f9.3,x,f9.5,x,f9.3,x,2f12.6)') &
        i, loc, e_old(i)*ev2htree,(e_old(i)-e(i))*ev2htree, e(i)*ev2htree, &
        tmp2, tmp

      if (i == na-1) write(iw, advance='no',fmt='(2x,a)') ' HOMO'
      if (i == na) write(iw, advance='no',fmt='(2x,a)') ' LUMO'
      if (i /= loc .and. tmp_abs < 0.9_dp) then
        write(iw, fmt='(2x,a)') ' rearranged, WARNING'
      elseif (i == loc .and. tmp_abs < 0.9_dp) then
        write(iw, fmt='(2x,a)') ' WARNING'
      elseif (i /= loc .and. tmp_abs > 0.9_dp) then
        write(iw, fmt='(2x,a)') ' rearranged'
      else
        write(iw,*)
      end if
    end do
    write(iw,*)

    end subroutine print_results