Skip to content

Refactoring output OEP photons in scf.F90

The following block of code in scf.F90

if (bitand(ks%xc_family, XC_FAMILY_OEP) /= 0 .and. ks%theory_level /= HARTREE_FOCK &
          .and. ks%theory_level /= GENERALIZED_KOHN_SHAM_DFT) then
          if ((ks%oep_photon%level == OEP_LEVEL_FULL) .or. (ks%oep_photon%level == OEP_LEVEL_KLI)) then
            write(iunit, '(a)') 'Photon observables:'
            write(iunit, '(6x, a, es15.8,a,es15.8,a)') 'Photon number = ', ks%oep_photon%pt%number(1)
            write(iunit, '(6x, a, es15.8,a,es15.8,a)') 'Photon ex. = ', ks%oep_photon%pt%ex
            write(iunit,'(1x)')
          end if
        end if

should be moved to the photon OEP module. This avoid exposing quantities that scf_m should not know like the number of photons or the corresponding exchange energy.

Again, this helps for the multisystem logic.