26 use,
intrinsic :: iso_fortran_env
40 integer,
parameter :: &
45 integer :: n_multipoles
46 integer,
allocatable :: l(:), m(:)
47 real(real64),
allocatable :: weight(:)
50 integer :: observable(2)
51 type(unit_system_t) :: units
52 real(real64),
allocatable :: ot(:)
55 real(real64) :: total_time
62 subroutine ft(omega, power)
63 real(real64),
intent(in) :: omega
64 real(real64),
intent(out) :: power
78 power = power + x*ot(j)
80 power = power*dt / (dt*time_steps)
86 power = power + x*ot(j)
88 power = power*dt / (dt*time_steps)
97 subroutine ft2(omega, power)
98 real(real64),
intent(in) :: omega
99 real(real64),
intent(out) :: power
109 case (sine_transform)
113 power = power + x*ot(j)
117 power = - (power*dt / (dt*time_steps))**2
123 power = power + x*ot(j)
125 power = - (power*dt / (dt*time_steps))**2
142 o%n_multipoles = i%n_multipoles
143 safe_allocate( o%l(1:o%n_multipoles))
144 safe_allocate( o%m(1:o%n_multipoles))
145 safe_allocate(o%weight(1:o%n_multipoles))
147 do j = 1, o%n_multipoles
150 o%weight(j) = i%weight(j)
157 subroutine read_resonances_file(order, ffile, namespace, search_interval, final_time, nfrequencies)
158 integer,
intent(inout) :: order
159 character(len=*),
intent(in) :: ffile
161 real(real64),
intent(inout) :: search_interval
162 real(real64),
intent(in) :: final_time
163 integer,
intent(in) :: nfrequencies
165 real(real64) :: dummy, leftbound, rightbound, w, power, dw
166 integer :: iunit, nresonances, ios, i, j, k, npairs, nspin, order_in_file, nw_subtracted, ierr
167 logical :: file_exists
168 real(real64),
allocatable :: wij(:), omega(:), c0i(:)
173 write(
message(1),
'(a)')
'The run mode #3 is only compatible with the analysis of the'
174 write(
message(2),
'(a)')
'second-order response.'
179 inquire(file=
"ot", exist = file_exists)
180 if (.not. file_exists)
then
181 write(
message(1),
'(a)')
"Could not find 'ot' file."
188 write(
message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
194 iunit =
io_open(trim(ffile), namespace, action=
'read', status=
'old')
200 read(iunit, *, iostat = ios) dummy, dummy
202 nresonances = nresonances + 1
205 npairs = (nresonances*(nresonances-1))/2
207 safe_allocate(omega(1:nresonances))
208 safe_allocate( c0i(1:nresonances))
209 safe_allocate(wij(1:npairs))
212 do i = 1, nresonances
213 read(iunit, *) omega(i), c0i(i)
217 do i = 1, nresonances
218 do j = i + 1, nresonances
219 wij(k) = omega(j) - omega(i)
224 if (search_interval >
m_zero)
then
230 call read_ot(namespace, nspin, order_in_file, nw_subtracted)
232 if (order_in_file /= order)
then
233 write(
message(1),
'(a)')
'The ot file should contain the second-order response in this run mode.'
237 if (final_time >
m_zero)
then
239 if (total_time > dt*time_steps)
then
240 total_time = dt*time_steps
241 write(
message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
242 write(
message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
246 time_steps = int(total_time / dt)
247 total_time = time_steps * dt
249 total_time = dt*time_steps
252 dw = (rightbound-leftbound) / (nfrequencies - 1)
257 call modify_ot(time_steps, dt, order, ot, w, power)
258 nw_subtracted = nw_subtracted + 1
262 do i = 1, nresonances
263 do j = i + 1, nresonances
264 leftbound = wij(k) - search_interval
265 rightbound = wij(k) + search_interval
268 call modify_ot(time_steps, dt, order, ot, wij(k), power)
269 nw_subtracted = nw_subtracted + 1
274 safe_deallocate_a(wij)
275 safe_deallocate_a(c0i)
276 safe_deallocate_a(omega)
285 subroutine analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, &
287 integer,
intent(inout) :: order
288 real(real64),
intent(inout) :: omega
289 real(real64),
intent(inout) :: search_interval
290 real(real64),
intent(inout) :: final_time
291 integer,
intent(inout) :: nresonances
292 integer,
intent(inout) :: nfrequencies
293 real(real64),
intent(in) :: damping
296 real(real64) :: leftbound, rightbound, dw, power
297 real(real64),
allocatable :: w(:), c0I2(:)
298 integer :: nspin, i, ierr, order_in_file, nw_subtracted
299 logical :: file_exists
304 inquire(file=
"ot", exist = file_exists)
305 if (.not. file_exists)
then
306 write(
message(1),
'(a)')
"Could not find 'ot' file."
313 write(
message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
323 if (search_interval >
m_zero)
then
329 leftbound = omega - search_interval
330 rightbound = omega + search_interval
332 call read_ot(namespace, nspin, order_in_file, nw_subtracted)
334 if (order_in_file /= order)
then
335 write(
message(1),
'(a)')
'Internal error in analyze_signal'
339 if (mod(order, 2) == 1)
then
340 mode = sine_transform
345 if (final_time >
m_zero)
then
347 if (total_time > dt*time_steps)
then
348 total_time = dt*time_steps
349 write(
message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
350 write(
message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
354 time_steps = int(total_time / dt)
355 total_time = time_steps * dt
357 total_time = dt*time_steps
360 dw = (rightbound-leftbound) / (nfrequencies - 1)
362 safe_allocate( w(1:nresonances))
363 safe_allocate(c0i2(1:nresonances))
369 if (nw_subtracted >= nresonances)
exit
387 call modify_ot(time_steps, dt, order, ot, omega, power)
389 nw_subtracted = nw_subtracted + 1
398 safe_deallocate_a(ot)
400 safe_deallocate_a(c0i2)
413 integer,
intent(in) :: nfrequencies, nresonances
414 real(real64),
intent(in) :: dw
415 real(real64),
intent(in) :: w(nresonances), c0I2(nresonances)
416 real(real64),
intent(in) :: gamma
418 integer :: iunit, i, j
420 complex(real64) :: pol
424 iunit =
io_open(
'polarizability', namespace, action =
'write', status=
'replace', die=.false.)
425 write(iunit,
'(a)')
'# Polarizability file. Generated using the SOS formula with the following data:'
426 write(iunit,
'(a)')
'#'
428 do i = 1, nresonances
429 write(iunit,
'(a1,3e20.12)')
'#', w(i),
sqrt(abs(c0i2(i))), c0i2(i)
432 write(iunit,
'(a10,f12.6)')
'# Gamma = ', gamma
433 write(iunit,
'(a)')
'#'
435 do i = 1, nfrequencies
438 do j = 1, nresonances
439 pol = pol + c0i2(j) * (
m_one / (w(j) - e -
m_zi * gamma) +
m_one/(w(j) + e +
m_zi * gamma))
441 write(iunit,
'(3e20.12)') e, pol
453 subroutine find_resonance(omega, leftbound, rightbound, nfrequencies)
454 real(real64),
intent(inout) :: omega
455 real(real64),
intent(in) :: leftbound, rightbound
456 integer,
intent(in) :: nfrequencies
459 real(real64) :: dw, w, aw, min_aw, min_w, omega_orig, min_w1, min_w2
460 real(real64),
allocatable :: warray(:), tarray(:)
464 safe_allocate(warray(1:nfrequencies))
465 safe_allocate(tarray(1:nfrequencies))
469 dw = (rightbound-leftbound) / (nfrequencies - 1)
470 do i = 1, nfrequencies
471 w = leftbound + (i-1)*dw
479 do i = 1, nfrequencies
480 w = leftbound + (i-1)*dw
481 if (tarray(i) < min_aw)
then
489 min_w1 = min_w - 2*dw
490 min_w2 = min_w + 2*dw
494 write(
message(1),
'(a)')
'Could not find a maximum.'
496 write(
message(3),
'(a,f12.8,a,f12.8,a)')
' Search interval = [', &
498 write(
message(4),
'(a,f12.4,a)')
' Search discretization = ', &
503 safe_deallocate_a(warray)
504 safe_deallocate_a(tarray)
513 real(real64),
intent(in) :: omega
514 real(real64),
intent(out) :: power
515 integer,
intent(in) :: nw_subtracted
516 real(real64),
intent(in) :: dw, leftbound, rightbound
520 call ft(omega, power)
523 case (sine_transform)
529 write(
message(1),
'(a)')
'******************************************************************'
530 write(
message(2),
'(a,i3)')
'Resonance #', nw_subtracted + 1
537 write(
message(6),
'(a,f12.8)')
'f[O->I] = ',
m_two*omega*power
539 write(
message(8),
'(a,f12.8,a,f12.8,a)')
' Search interval = [',
units_from_atomic(
units_out%energy, leftbound),
',', &
543 write(
message(10),
'(a)')
'******************************************************************'
555 real(real64),
intent(in) :: omega
556 real(real64),
intent(out) :: power
557 integer,
intent(in) :: nw_subtracted
558 real(real64),
intent(in) :: leftbound, rightbound
559 real(real64),
intent(in) :: c01, c02
563 call ft(omega, power)
565 case (sine_transform)
572 power = power /
m_two
576 write(
message(1),
'(a)')
'******************************************************************'
577 write(
message(2),
'(a,i3)')
'Resonance #', nw_subtracted + 1
585 write(
message(1),
'(a,f12.8)')
' C(omega)/(C0i*C0j) = ', power / (c01 * c02)
590 write(
message(2),
'(a,f12.8,a,f12.8,a)')
' Search interval = [',
units_from_atomic(
units_out%energy, leftbound),
',', &
592 write(
message(3),
'(a)')
'******************************************************************'
604 integer,
intent(in) :: order
605 integer,
intent(in) :: observable(2)
607 logical :: file_exists
608 integer :: i, j, nspin, time_steps, lmax, nfiles, k, add_lm, l, m, max_add_lm
609 integer,
allocatable :: iunit(:)
610 real(real64) :: dt, lambda, dump, o0
612 real(real64),
allocatable :: q(:), mu(:), qq(:, :), c(:)
613 character(len=20) :: filename
616 real(real64),
allocatable :: multipole(:, :, :), ot(:), dipole(:, :)
625 write(filename,
'(a11,i1)')
'multipoles.', nfiles+1
626 inquire(file=trim(filename), exist = file_exists)
627 if (.not. file_exists)
exit
632 if (nfiles == 0)
then
633 write(
message(1),
'(a)')
'No multipoles.x file was found'
636 if (order > nfiles)
then
637 write(
message(1),
'(a)')
'The order that you ask for is higher than the number'
638 write(
message(2),
'(a)')
'of multipoles.x file that you supply.'
643 safe_allocate(iunit(1:nfiles))
645 write(filename,
'(a11,i1)')
'multipoles.', j
646 iunit(j) =
io_open(trim(filename), namespace, action=
'read', status=
'old')
649 safe_allocate( q(1:nfiles))
650 safe_allocate(mu(1:nfiles))
651 safe_allocate(qq(1:nfiles, 1:nfiles))
652 safe_allocate( c(1:nfiles))
658 call spectrum_mult_info(namespace, iunit(1), nspin, kick, time_steps, dt, units, lmax=lmax)
661 if (kick%n_multipoles > 0)
then
662 kick_operator%n_multipoles = kick%n_multipoles
663 safe_allocate( kick_operator%l(1:kick_operator%n_multipoles))
664 safe_allocate( kick_operator%m(1:kick_operator%n_multipoles))
665 safe_allocate(kick_operator%weight(1:kick_operator%n_multipoles))
666 do i = 1, kick_operator%n_multipoles
667 kick_operator%l(i) = kick%l(i)
668 kick_operator%m(i) = kick%m(i)
669 kick_operator%weight(i) = kick%weight(i)
672 kick_operator%n_multipoles = 3
673 safe_allocate( kick_operator%l(1:kick_operator%n_multipoles))
674 safe_allocate( kick_operator%m(1:kick_operator%n_multipoles))
675 safe_allocate(kick_operator%weight(1:kick_operator%n_multipoles))
676 kick_operator%l(1:3) = 1
677 kick_operator%m(1) = -1
678 kick_operator%m(2) = 0
679 kick_operator%m(3) = 1
687 select case (observable(1))
696 safe_allocate(obs%l(1:1))
697 safe_allocate(obs%m(1:1))
698 safe_allocate(obs%weight(1:1))
700 select case (observable(2))
714 safe_allocate(obs%l(1:1))
715 safe_allocate(obs%m(1:1))
716 safe_allocate(obs%weight(1:1))
717 obs%weight(1) =
m_one
718 obs%l(1) = observable(1)
719 obs%m(1) = observable(2)
722 lambda = abs(kick%delta_strength)
723 q(1) = kick%delta_strength / lambda
726 call spectrum_mult_info(namespace, iunit(j), nspin, kick, time_steps, dt, units, lmax=lmax)
727 q(j) = kick%delta_strength / lambda
740 if (kick%n_multipoles > 0)
then
741 lmax = maxval(kick%l(1:obs%n_multipoles))
742 max_add_lm = (lmax+1)**2-1
743 safe_allocate(multipole(1:max_add_lm, 0:time_steps, 1:nspin))
745 mp_unit = units%length**kick%l(1)
748 safe_allocate(multipole(1:3, 0:time_steps, 1:nspin))
749 mp_unit = units%length
751 safe_allocate(ot(0:time_steps))
756 safe_allocate(dipole(1:3, 1:nspin))
764 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm)
766 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm), &
767 dump, (multipole(add_lm, i, 2), add_lm = 1, max_add_lm)
769 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm), &
770 dump, (multipole(add_lm, i, 2), add_lm = 1, max_add_lm), &
771 dump, (multipole(add_lm, i, 3), add_lm = 1, max_add_lm), &
772 dump, (multipole(add_lm, i, 4), add_lm = 1, max_add_lm)
774 multipole(1:max_add_lm, i, :) =
units_to_atomic(mp_unit, multipole(1:max_add_lm, i, :))
778 dipole(1:3, 1:nspin) = - multipole(1:3, i, 1:nspin)
785 do k = 1, obs%n_multipoles
790 if (l == obs%l(k) .and. m == obs%m(k))
exit lcycle
796 dump = dump + obs%weight(k) * sum(multipole(add_lm, i, 1:nspin))
799 if (i == 0) o0 = dump
800 ot(i) = ot(i) + mu(j)*(dump - o0)
805 ot = ot / lambda**order
807 call write_ot(namespace, nspin, time_steps, dt, kick, order, ot(0:time_steps), observable)
813 safe_deallocate_a(iunit)
815 safe_deallocate_a(mu)
816 safe_deallocate_a(qq)
818 safe_deallocate_a(ot)
819 safe_deallocate_a(multipole)
820 safe_deallocate_a(dipole)
828 subroutine modify_ot(time_steps, dt, order, ot, omega, power)
829 integer,
intent(in) :: time_steps
830 real(real64),
intent(in) :: dt
831 integer,
intent(in) :: order
832 real(real64),
intent(inout) :: ot(0:time_steps)
833 real(real64),
intent(in) :: omega
834 real(real64),
intent(in) :: power
840 select case (mod(order, 2))
843 ot(i) = ot(i) -
m_two * power *
sin(omega*i*dt)
848 ot(i) = ot(i) - power *
cos(omega*i*dt)
852 ot(i) = ot(i) -
m_two * power *
cos(omega*i*dt)
863 subroutine write_ot(namespace, nspin, time_steps, dt, kick, order, ot, observable)
865 integer,
intent(in) :: nspin, time_steps
866 real(real64),
intent(in) :: dt
867 type(
kick_t),
intent(in) :: kick
868 integer,
intent(in) :: order
869 real(real64),
intent(in) :: ot(0:time_steps)
870 integer,
intent(in) :: observable(2)
873 character(len=20) :: header_string
878 iunit =
io_open(
'ot', namespace, action=
'write', status=
'replace')
880 write(iunit,
'(a15,i2)')
'# nspin ', nspin
881 write(iunit,
'(a15,i2)')
'# Order ', order
882 write(iunit,
'(a28,i2)')
'# Frequencies subtracted = ', 0
883 select case (observable(1))
885 write(iunit,
'(a)')
'# Observable operator = kick operator'
886 if (kick%n_multipoles > 0)
then
892 select case (observable(2))
894 write(iunit,
'(a)')
'# O = x'
896 write(iunit,
'(a)')
'# O = y'
898 write(iunit,
'(a)')
'# O = z'
902 ot_unit =
units_out%length**observable(1)
903 write(iunit,
'(a12,i1,a1,i2,a1)')
'# (l, m) = (', observable(1),
',',observable(2),
')'
908 write(iunit,
'(a1)', advance =
'no')
'#'
909 write(iunit,
'(a20)', advance =
'no')
str_center(
't', 19)
910 write(iunit,
'(a20)', advance =
'yes')
str_center(
'<O>(t)', 20)
911 write(iunit,
'(a1)', advance =
'no')
'#'
913 write(iunit,
'(a20)', advance =
'no')
str_center(trim(header_string), 19)
915 write(iunit,
'(a20)', advance =
'yes')
str_center(trim(header_string), 20)
927 subroutine read_ot(namespace, nspin, order, nw_subtracted)
929 integer,
intent(out) :: nspin
930 integer,
intent(out) :: order
931 integer,
intent(out) :: nw_subtracted
933 integer :: iunit, i, ierr
934 character(len=100) :: line
935 character(len=12) :: dummychar
936 real(real64) :: dummy, t1, t2
941 iunit =
io_open(
'ot', namespace, action=
'read', status=
'old')
943 read(iunit,
'(15x,i2)') nspin
944 read(iunit,
'(15x,i2)') order
945 read(iunit,
'(28x,i2)') nw_subtracted
946 read(iunit,
'(a)') line
948 i = index(line,
'Observable')
949 if (index(line,
'Observable') /= 0)
then
951 elseif (index(line,
'# O =') /= 0)
then
953 if (index(line,
'x') /= 0)
then
955 elseif (index(line,
'y') /= 0)
then
957 elseif (index(line,
'z') /= 0)
then
960 elseif (index(line,
'# (l, m) = ') /= 0)
then
961 read(line,
'(a12,i1,a1,i2,a1)') dummychar(1:12), observable(1), dummychar(1:1), observable(2), dummychar(1:1)
963 write(
message(1),
'(a)')
'Problem reading "ot" file: could not figure out the shape'
964 write(
message(2),
'(a)')
'of the observation operator.'
969 read(iunit,
'(a)') line
970 read(iunit,
'(a)') line
976 write(
message(1),
'(a)')
'Could not figure out the units in file "ot".'
980 select case (observable(1))
982 if (kick%n_multipoles > 0)
then
990 ot_unit =
units_out%length**observable(1)
996 read(iunit, *,
end=100) dummy
997 time_steps = time_steps + 1
998 if (time_steps == 1) t1 = dummy
999 if (time_steps == 2) t2 = dummy
1006 safe_allocate(ot(0:time_steps))
1008 do i = 0, time_steps-1
1009 read(iunit, *) dummy, ot(i)
1018 subroutine print_omega_file(namespace, omega, search_interval, final_time, nfrequencies)
1019 type(namespace_t),
intent(in) :: namespace
1020 real(real64),
intent(inout) :: omega
1021 real(real64),
intent(inout) :: search_interval
1022 real(real64),
intent(inout) :: final_time
1023 integer,
intent(inout) :: nfrequencies
1025 integer :: iunit, i, ierr, nspin, order, nw_subtracted
1026 logical :: file_exists
1027 character(len=20) :: header_string
1028 real(real64),
allocatable :: warray(:), tarray(:)
1029 real(real64) :: leftbound, rightbound, dw, w, aw
1034 inquire(file=
"ot", exist = file_exists)
1035 if (.not. file_exists)
then
1036 write(message(1),
'(a)')
"Could not find 'ot' file."
1037 call messages_fatal(1, namespace=namespace)
1041 call unit_system_from_file(
units,
"ot", namespace, ierr)
1043 write(message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
1044 call messages_fatal(1, namespace=namespace)
1047 if (omega > m_zero)
then
1048 omega = units_to_atomic(
units%energy, omega)
1053 if (search_interval > m_zero)
then
1054 search_interval = units_to_atomic(
units%energy, search_interval)
1056 search_interval = m_half
1059 leftbound = omega - search_interval
1060 rightbound = omega + search_interval
1062 safe_allocate(warray(1:nfrequencies))
1063 safe_allocate(tarray(1:nfrequencies))
1065 call read_ot(namespace, nspin, order, nw_subtracted)
1067 if (mod(order, 2) == 1)
then
1073 if (final_time > m_zero)
then
1077 write(message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
1078 write(message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
1079 units_from_atomic(units_out%time,
total_time), trim(units_abbrev(units_out%time))
1080 call messages_warning(2, namespace=namespace)
1090 dw = (rightbound-leftbound) / (nfrequencies - 1)
1091 do i = 1, nfrequencies
1092 w = leftbound + (i-1)*dw
1098 iunit = io_open(
'omega', namespace, action=
'write', status=
'replace')
1099 write(iunit,
'(a15,i2)')
'# nspin ', nspin
1100 call kick_write(
kick, iunit)
1101 write(iunit,
'(a)')
'#%'
1102 write(iunit,
'(a1,a20)', advance =
'no')
'#', str_center(
"omega", 20)
1103 write(header_string,
'(a)')
'F(omega)'
1104 write(iunit,
'(a20)', advance =
'yes') str_center(trim(header_string), 20)
1105 write(iunit,
'(a1,a20)', advance =
'no')
'#', str_center(
'['//trim(units_abbrev(units_out%energy)) //
']', 20)
1107 write(iunit,
'(a)', advance =
'yes')
1109 do i = 1, nfrequencies
1110 write(iunit,
'(2e20.8)') units_from_atomic(units_out%energy, warray(i)), &
1114 safe_deallocate_a(warray)
1115 safe_deallocate_a(tarray)
1135 integer :: run_mode, order, nfrequencies, ierr, nresonances
1136 real(real64) :: omega, search_interval, final_time, damping
1137 integer,
parameter :: &
1138 ANALYZE_NTHORDER_SIGNAL = 1, &
1139 generate_nthorder_signal = 2, &
1140 read_resonances_from_file = 3, &
1141 generate_omega_file = 4
1142 character(len=100) :: ffile
1147 message(1) =
"Your Fortran compiler doesn't support command-line arguments;"
1148 message(2) =
"the oct-oscillator-strength command is not available."
1153 run_mode = analyze_nthorder_signal
1155 search_interval = -
m_one
1158 final_time = -
m_one
1163 damping = 0.1_real64/27.2114_real64
1167 order, nresonances, nfrequencies, final_time, &
1176 select case (run_mode)
1177 case (generate_nthorder_signal)
1179 case (analyze_nthorder_signal)
1180 call analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, damping, &
1182 case (read_resonances_from_file)
1183 call read_resonances_file(order, ffile, global_namespace, search_interval, final_time, nfrequencies)
1184 case (generate_omega_file)
1185 call print_omega_file(global_namespace, omega, search_interval, final_time, nfrequencies)
double sin(double __x) __attribute__((__nothrow__
double cos(double __x) __attribute__((__nothrow__
subroutine, public getopt_init(ierr)
Initializes the getopt machinery. Must be called before attempting to parse the options....
subroutine, public getopt_end
real(real64), parameter, public m_two
subroutine, public global_end()
Finalise parser varinfo file, and MPI.
real(real64), parameter, public m_zero
real(real64), parameter, public m_four
real(real64), parameter, public m_pi
some mathematical constants
type(mpi_comm), parameter, public serial_dummy_comm
Alias MPI_COMM_UNDEFINED for the specific use case of initialising Octopus utilities with no MPI supp...
subroutine, public init_octopus_globals(comm)
Initialise Octopus-specific global constants and files. This routine performs no initialisation calls...
complex(real64), parameter, public m_z0
complex(real64), parameter, public m_zi
real(real64), parameter, public m_epsilon
real(real64), parameter, public m_half
real(real64), parameter, public m_one
real(real64), parameter, public m_three
subroutine, public io_init(defaults)
If the argument defaults is present and set to true, then the routine will not try to read anything f...
subroutine, public io_close(iunit, grp)
subroutine, public io_skip_header(iunit)
subroutine, public io_end()
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
subroutine, public kick_read(kick, iunit, namespace)
subroutine, public kick_write(kick, iunit, out)
subroutine, public messages_not_implemented(feature, namespace)
subroutine, public messages_warning(no_lines, all_nodes, namespace)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
subroutine ft(omega, power)
integer, dimension(2) observable
subroutine write_ot(namespace, nspin, time_steps, dt, kick, order, ot, observable)
subroutine generate_signal(namespace, order, observable)
subroutine ft2(omega, power)
subroutine read_ot(namespace, nspin, order, nw_subtracted)
subroutine resonance_first_order(omega, power, nw_subtracted, dw, leftbound, rightbound)
type(unit_system_t) units
integer, parameter sine_transform
integer, parameter cosine_transform
subroutine resonance_second_order(omega, power, nw_subtracted, leftbound, rightbound, c01, c02)
subroutine analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, damping, namespace)
subroutine modify_ot(time_steps, dt, order, ot, omega, power)
subroutine print_omega_file(namespace, omega, search_interval, final_time, nfrequencies)
subroutine find_resonance(omega, leftbound, rightbound, nfrequencies)
subroutine local_operator_copy(o, i)
subroutine read_resonances_file(order, ffile, namespace, search_interval, final_time, nfrequencies)
subroutine write_polarizability(namespace, nfrequencies, nresonances, dw, w, c0I2, gamma)
Implements the SOS formula of the polarizability, and writes down to the "polarizability" file the re...
subroutine, public spectrum_mult_info(namespace, iunit, nspin, kick, time_steps, dt, file_units, lmax)
character(len=80) function, public str_center(s_in, l_in)
puts space around string, so that it is centered
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
character(len=20) pure function, public units_abbrev(this)
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
subroutine, public unit_system_from_file(uu, fname, namespace, ierr)
This is a very primitive procedure that attempts to find out which units were used to write an octopu...
program oscillator_strength