4
1
mirror of https://github.com/pfloos/quack synced 2024-06-23 21:52:20 +02:00
quack/src/RPA/print_excitation.f90

46 lines
1.5 KiB
Fortran
Raw Normal View History

2019-03-19 10:13:33 +01:00
subroutine print_excitation(method,ispin,nS,Omega)
! Print excitation energies for a given spin manifold
implicit none
include 'parameters.h'
2019-05-07 22:55:36 +02:00
! Input variables
character*12,intent(in) :: method
2019-03-19 10:13:33 +01:00
integer,intent(in) :: ispin,nS
double precision,intent(in) :: Omega(nS)
2019-05-07 22:55:36 +02:00
! Local variables
2020-09-22 22:13:51 +02:00
character*14 :: spin_manifold
2019-05-07 22:55:36 +02:00
integer,parameter :: maxS = 32
2019-03-19 10:13:33 +01:00
integer :: ia
if(ispin == 1) spin_manifold = 'singlet'
if(ispin == 2) spin_manifold = 'triplet'
2020-09-22 22:13:51 +02:00
if(ispin == 3) spin_manifold = 'alpha-beta'
if(ispin == 4) spin_manifold = 'alpha-alpha'
if(ispin == 5) spin_manifold = 'spin-conserved'
if(ispin == 6) spin_manifold = 'spin-flip'
2019-03-19 10:13:33 +01:00
write(*,*)
write(*,*)'-------------------------------------------------------------'
2020-09-24 11:56:06 +02:00
write(*,'(1X,A14,A14,A14,A9)') method,' calculation: ',spin_manifold,' manifold'
2019-03-19 10:13:33 +01:00
write(*,*)'-------------------------------------------------------------'
write(*,'(1X,A1,1X,A5,1X,A1,1X,A23,1X,A1,1X,A23,1X,A1,1X)') &
'|','State','|',' Excitation energy (au) ','|',' Excitation energy (eV) ','|'
write(*,*)'-------------------------------------------------------------'
2019-05-07 22:55:36 +02:00
do ia=1,min(nS,maxS)
2019-03-19 10:13:33 +01:00
write(*,'(1X,A1,1X,I5,1X,A1,1X,F23.6,1X,A1,1X,F23.6,1X,A1,1X)') &
'|',ia,'|',Omega(ia),'|',Omega(ia)*HaToeV,'|'
enddo
write(*,*)'-------------------------------------------------------------'
write(*,*)
end subroutine print_excitation