10
1
mirror of https://github.com/pfloos/quack synced 2024-10-20 23:08:23 +02:00
QuAcK/src/LR/print_excitation_energies.f90

46 lines
1.6 KiB
Fortran
Raw Normal View History

2023-07-28 14:14:35 +02:00
subroutine print_excitation_energies(method,ispin,nS,Om)
2020-10-05 16:58:19 +02:00
! Print excitation energies for a given spin manifold
implicit none
include 'parameters.h'
! Input variables
2023-07-28 14:14:35 +02:00
character(len=20),intent(in) :: method
integer,intent(in) :: ispin
integer,intent(in) :: nS
double precision,intent(in) :: Om(nS)
2020-10-05 16:58:19 +02:00
! Local variables
2023-07-28 14:14:35 +02:00
character(len=20) :: spin_manifold
integer,parameter :: maxS = 20
2020-10-05 16:58:19 +02:00
integer :: ia
if(ispin == 1) spin_manifold = 'singlet'
if(ispin == 2) spin_manifold = 'triplet'
if(ispin == 3) spin_manifold = 'alpha-beta'
2022-02-15 13:51:18 +01:00
if(ispin == 4) spin_manifold = 'alpha-alpha'
2020-10-05 16:58:19 +02:00
if(ispin == 5) spin_manifold = 'spin-conserved'
if(ispin == 6) spin_manifold = 'spin-flip'
2022-02-15 13:51:18 +01:00
if(ispin == 7) spin_manifold = 'beta-beta'
2020-10-05 16:58:19 +02:00
write(*,*)
2023-07-28 14:14:35 +02:00
write(*,*)'-------------------------------------------------------------------------------'
write(*,'(1X,A20,A20,A20,A9)') trim(method),' calculation: ',trim(spin_manifold),' manifold'
write(*,*)'-------------------------------------------------------------------------------'
2020-10-05 16:58:19 +02:00
write(*,'(1X,A1,1X,A5,1X,A1,1X,A23,1X,A1,1X,A23,1X,A1,1X)') &
'|','State','|',' Excitation energy (au) ','|',' Excitation energy (eV) ','|'
2023-07-28 14:14:35 +02:00
write(*,*)'-------------------------------------------------------------------------------'
2020-10-05 16:58:19 +02:00
2022-09-27 14:07:31 +02:00
do ia=1,min(maxS,nS)
2020-10-05 16:58:19 +02:00
write(*,'(1X,A1,1X,I5,1X,A1,1X,F23.6,1X,A1,1X,F23.6,1X,A1,1X)') &
2023-07-28 14:14:35 +02:00
'|',ia,'|',Om(ia),'|',Om(ia)*HaToeV,'|'
2020-10-05 16:58:19 +02:00
enddo
2023-07-28 14:14:35 +02:00
write(*,*)'-------------------------------------------------------------------------------'
2020-10-05 16:58:19 +02:00
write(*,*)
end subroutine