2
C rt_tddft_input_print.F
4
C Parses input deck for rt-tddft print options.
7
subroutine rt_tddft_input_print (rtdb)
10
#include "rt_tddft.fh"
14
#include "mafdecls.fh"
19
integer, intent(in) :: rtdb
23
character(*), parameter :: pname = "rt_tddft_input_print: "
28
character*255 curr_popt
36
logical print_convergence
40
C (zero print options if print directive found)
41
print_dipole = .false.
45
print_energy = .false.
46
print_cputime = .false.
47
print_charge = .false.
48
print_convergence = .false.
52
C (scan over all words found after "print" directive)
56
got_opt = inp_a (curr_popt)
58
if ( trim(curr_popt) .eq. "") exit
60
C Now that have an option, toggle print flag if it matches. If no
61
C match, print an error.
62
if (curr_popt .eq. "dipole") then
64
elseif (curr_popt .eq. "quadrupole") then
66
elseif (curr_popt .eq. "field") then
68
elseif (curr_popt .eq. "moocc") then
70
elseif (curr_popt .eq. "energy") then
72
elseif (curr_popt .eq. "cputime") then
73
print_cputime = .true.
74
elseif (curr_popt .eq. "charge") then
76
elseif (curr_popt .eq. "convergence") then
77
print_convergence = .true.
78
elseif (curr_popt .eq. "s2") then
80
elseif (curr_popt .eq. "*") then
86
print_cputime = .true.
88
print_convergence = .true.
93
$ "unknown print option: "//trim(curr_popt)//
94
$ ". Allowed options are: dipole, field, moocc,"//
95
$ " energy, cputime, charge, convergence, s2, *.",
101
C Save all params to rtdb, overwriting the defaults.
103
if (.not.rtdb_put(rtdb,'rt_tddft:print_dipole',
104
$ mt_log,1,print_dipole))
105
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
107
if (.not.rtdb_put(rtdb,'rt_tddft:print_quad',
108
$ mt_log,1,print_quad))
109
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
111
if (.not.rtdb_put(rtdb,'rt_tddft:print_field',
112
$ mt_log,1,print_field))
113
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
115
if (.not.rtdb_put(rtdb,'rt_tddft:print_moocc',
116
$ mt_log,1,print_moocc))
117
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
119
if (.not.rtdb_put(rtdb,'rt_tddft:print_energy',
120
$ mt_log,1,print_energy))
121
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
123
if (.not.rtdb_put(rtdb,'rt_tddft:print_cputime',
124
$ mt_log,1,print_cputime))
125
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
127
if (.not.rtdb_put(rtdb,'rt_tddft:print_charge',
128
$ mt_log,1,print_charge))
129
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
131
if (.not.rtdb_put(rtdb,'rt_tddft:print_convergence',
132
$ mt_log,1,print_convergence))
133
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)
135
if (.not.rtdb_put(rtdb,'rt_tddft:print_s2',
136
$ mt_log,1,print_s2))
137
$ call errquit(pname//'Write failed to rtdb',0,RTDB_ERR)