4
C--------------------------------------------------------------------
6
C Overall RT-TDDFT documentation:
8
C> @defgroup rt_tddft Real-time TDDFT
9
C--------------------------------------------------------------------
11
C--------------------------------------------------------------------
12
C> Driver routine for real-time TDDFT.
14
C> Call this from main DFT routine after convergence.
15
C> It will call the closed-shell, open-shell, spin-orbit, etc versions of RT-TDDFT.
16
C--------------------------------------------------------------------
17
logical function rt_tddft (rtdb)
21
#include "mafdecls.fh"
27
#include "matutils.fh"
30
#include "headers/rt_tddft.fh"
32
C ^^^ strange that I had to do this
36
integer, intent(in) :: rtdb !< Runtime database
40
character(*), parameter :: pname = "rt_tddft: "
44
type(rt_params_t) :: params
56
C Store rtdb in params struct, then determine the theory we are using.
60
if (.not. rtdb_cget(rtdb, "dft:theory", 1, theory))
61
$ call errquit(pname//"theory not specified",0, RTDB_ERR)
63
if (theory .eq. "dft") then
65
if (ipol.eq.1) then !closed shell DFT
68
write (luout, *) "*************************"
69
write (luout, *) "* Closed-shell RT-TDDFT *"
70
write (luout, *) "*************************"
72
call util_flush (luout)
74
call rt_tddft_cs_init (params)
75
call rt_tddft_header (params)
76
call rt_tddft_cs_prop (params)
78
elseif (ipol.eq.2) then !open shell DFT
81
write (luout, *) "***********************"
82
write (luout, *) "* Open-shell RT-TDDFT *"
83
write (luout, *) "***********************"
85
call util_flush (luout)
87
call rt_tddft_os_init (params)
88
call rt_tddft_header (params)
89
call rt_tddft_os_prop (params)
91
call errquit (pname//"bad ipol value", 0, 0)
94
elseif (theory .eq. "sodft") then !spin orbit DFT
95
call errquit (pname//"spin-orbit not implemented yet",0,0)
97
call errquit (pname//"Invalid theory: "//trim(theory), 0, 0)
105
call rt_tddft_clean (params)
110
C Finally post-process dens mats to cube files. Note we explicitly pass subgs option...
112
if (params%viz_dplot) call rt_tddft_snapshot_dplot (params,