26 use,
intrinsic :: iso_fortran_env
41 integer,
parameter :: &
46 integer :: n_multipoles
47 integer,
allocatable :: l(:), m(:)
48 real(real64),
allocatable :: weight(:)
51 integer :: observable(2)
52 type(unit_system_t) :: units
53 real(real64),
allocatable :: ot(:)
56 real(real64) :: total_time
63 subroutine ft(omega, power)
64 real(real64),
intent(in) :: omega
65 real(real64),
intent(out) :: power
79 power = power + x*ot(j)
81 power = power*dt / (dt*time_steps)
87 power = power + x*ot(j)
89 power = power*dt / (dt*time_steps)
98 subroutine ft2(omega, power)
99 real(real64),
intent(in) :: omega
100 real(real64),
intent(out) :: power
110 case (sine_transform)
114 power = power + x*ot(j)
118 power = - (power*dt / (dt*time_steps))**2
124 power = power + x*ot(j)
126 power = - (power*dt / (dt*time_steps))**2
143 o%n_multipoles = i%n_multipoles
144 safe_allocate( o%l(1:o%n_multipoles))
145 safe_allocate( o%m(1:o%n_multipoles))
146 safe_allocate(o%weight(1:o%n_multipoles))
148 do j = 1, o%n_multipoles
151 o%weight(j) = i%weight(j)
159 integer,
intent(inout) :: order
160 character(len=*),
intent(in) :: ffile
162 real(real64),
intent(inout) :: search_interval
163 real(real64),
intent(in) :: final_time
164 integer,
intent(in) :: nfrequencies
166 real(real64) :: dummy, leftbound, rightbound, w, power, dw
167 integer :: iunit, nresonances, ios, i, j, k, npairs, nspin, order_in_file, nw_subtracted, ierr
168 logical :: file_exists
169 real(real64),
allocatable :: wij(:), omega(:), c0i(:)
174 write(
message(1),
'(a)')
'The run mode #3 is only compatible with the analysis of the'
175 write(
message(2),
'(a)')
'second-order response.'
180 inquire(file=
"ot", exist = file_exists)
181 if (.not. file_exists)
then
182 write(
message(1),
'(a)')
"Could not find 'ot' file."
189 write(
message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
195 iunit =
io_open(trim(ffile), namespace, action=
'read', status=
'old')
201 read(iunit, *, iostat = ios) dummy, dummy
203 nresonances = nresonances + 1
206 npairs = (nresonances*(nresonances-1))/2
208 safe_allocate(omega(1:nresonances))
209 safe_allocate( c0i(1:nresonances))
210 safe_allocate(wij(1:npairs))
213 do i = 1, nresonances
214 read(iunit, *) omega(i), c0i(i)
218 do i = 1, nresonances
219 do j = i + 1, nresonances
220 wij(k) = omega(j) - omega(i)
225 if (search_interval >
m_zero)
then
231 call read_ot(namespace, nspin, order_in_file, nw_subtracted)
233 if (order_in_file /= order)
then
234 write(
message(1),
'(a)')
'The ot file should contain the second-order response in this run mode.'
238 if (final_time >
m_zero)
then
240 if (total_time > dt*time_steps)
then
241 total_time = dt*time_steps
242 write(
message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
243 write(
message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
247 time_steps = int(total_time / dt)
248 total_time = time_steps * dt
250 total_time = dt*time_steps
253 dw = (rightbound-leftbound) / (nfrequencies - 1)
258 call modify_ot(time_steps, dt, order, ot, w, power)
259 nw_subtracted = nw_subtracted + 1
263 do i = 1, nresonances
264 do j = i + 1, nresonances
265 leftbound = wij(k) - search_interval
266 rightbound = wij(k) + search_interval
269 call modify_ot(time_steps, dt, order, ot, wij(k), power)
270 nw_subtracted = nw_subtracted + 1
275 safe_deallocate_a(wij)
276 safe_deallocate_a(c0i)
277 safe_deallocate_a(omega)
286 subroutine analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, &
288 integer,
intent(inout) :: order
289 real(real64),
intent(inout) :: omega
290 real(real64),
intent(inout) :: search_interval
291 real(real64),
intent(inout) :: final_time
292 integer,
intent(inout) :: nresonances
293 integer,
intent(inout) :: nfrequencies
294 real(real64),
intent(in) :: damping
297 real(real64) :: leftbound, rightbound, dw, power
298 real(real64),
allocatable :: w(:), c0I2(:)
299 integer :: nspin, i, ierr, order_in_file, nw_subtracted
300 logical :: file_exists
305 inquire(file=
"ot", exist = file_exists)
306 if (.not. file_exists)
then
307 write(
message(1),
'(a)')
"Could not find 'ot' file."
314 write(
message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
324 if (search_interval >
m_zero)
then
330 leftbound = omega - search_interval
331 rightbound = omega + search_interval
333 call read_ot(namespace, nspin, order_in_file, nw_subtracted)
335 if (order_in_file /= order)
then
336 write(
message(1),
'(a)')
'Internal error in analyze_signal'
340 if (mod(order, 2) == 1)
then
341 mode = sine_transform
346 if (final_time >
m_zero)
then
348 if (total_time > dt*time_steps)
then
349 total_time = dt*time_steps
350 write(
message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
351 write(
message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
355 time_steps = int(total_time / dt)
356 total_time = time_steps * dt
358 total_time = dt*time_steps
361 dw = (rightbound-leftbound) / (nfrequencies - 1)
363 safe_allocate( w(1:nresonances))
364 safe_allocate(c0i2(1:nresonances))
370 if (nw_subtracted >= nresonances)
exit
388 call modify_ot(time_steps, dt, order, ot, omega, power)
390 nw_subtracted = nw_subtracted + 1
399 safe_deallocate_a(ot)
401 safe_deallocate_a(c0i2)
414 integer,
intent(in) :: nfrequencies, nresonances
415 real(real64),
intent(in) :: dw
416 real(real64),
intent(in) :: w(nresonances), c0I2(nresonances)
417 real(real64),
intent(in) :: gamma
419 integer :: iunit, i, j
421 complex(real64) :: pol
425 iunit =
io_open(
'polarizability', namespace, action =
'write', status=
'replace', die=.false.)
426 write(iunit,
'(a)')
'# Polarizability file. Generated using the SOS formula with the following data:'
427 write(iunit,
'(a)')
'#'
429 do i = 1, nresonances
430 write(iunit,
'(a1,3e20.12)')
'#', w(i),
sqrt(abs(c0i2(i))), c0i2(i)
433 write(iunit,
'(a10,f12.6)')
'# Gamma = ', gamma
434 write(iunit,
'(a)')
'#'
436 do i = 1, nfrequencies
439 do j = 1, nresonances
440 pol = pol + c0i2(j) * (
m_one / (w(j) - e -
m_zi * gamma) +
m_one/(w(j) + e +
m_zi * gamma))
442 write(iunit,
'(3e20.12)') e, pol
454 subroutine find_resonance(omega, leftbound, rightbound, nfrequencies)
455 real(real64),
intent(inout) :: omega
456 real(real64),
intent(in) :: leftbound, rightbound
457 integer,
intent(in) :: nfrequencies
460 real(real64) :: dw, w, aw, min_aw, min_w, omega_orig, min_w1, min_w2
461 real(real64),
allocatable :: warray(:), tarray(:)
465 safe_allocate(warray(1:nfrequencies))
466 safe_allocate(tarray(1:nfrequencies))
470 dw = (rightbound-leftbound) / (nfrequencies - 1)
471 do i = 1, nfrequencies
472 w = leftbound + (i-1)*dw
480 do i = 1, nfrequencies
481 w = leftbound + (i-1)*dw
482 if (tarray(i) < min_aw)
then
490 min_w1 = min_w - 2*dw
491 min_w2 = min_w + 2*dw
495 write(
message(1),
'(a)')
'Could not find a maximum.'
497 write(
message(3),
'(a,f12.8,a,f12.8,a)')
' Search interval = [', &
499 write(
message(4),
'(a,f12.4,a)')
' Search discretization = ', &
504 safe_deallocate_a(warray)
505 safe_deallocate_a(tarray)
514 real(real64),
intent(in) :: omega
515 real(real64),
intent(out) :: power
516 integer,
intent(in) :: nw_subtracted
517 real(real64),
intent(in) :: dw, leftbound, rightbound
521 call ft(omega, power)
524 case (sine_transform)
530 write(
message(1),
'(a)')
'******************************************************************'
531 write(
message(2),
'(a,i3)')
'Resonance #', nw_subtracted + 1
538 write(
message(6),
'(a,f12.8)')
'f[O->I] = ',
m_two*omega*power
540 write(
message(8),
'(a,f12.8,a,f12.8,a)')
' Search interval = [',
units_from_atomic(
units_out%energy, leftbound),
',', &
544 write(
message(10),
'(a)')
'******************************************************************'
556 real(real64),
intent(in) :: omega
557 real(real64),
intent(out) :: power
558 integer,
intent(in) :: nw_subtracted
559 real(real64),
intent(in) :: leftbound, rightbound
560 real(real64),
intent(in) :: c01, c02
564 call ft(omega, power)
566 case (sine_transform)
573 power = power /
m_two
577 write(
message(1),
'(a)')
'******************************************************************'
578 write(
message(2),
'(a,i3)')
'Resonance #', nw_subtracted + 1
586 write(
message(1),
'(a,f12.8)')
' C(omega)/(C0i*C0j) = ', power / (c01 * c02)
591 write(
message(2),
'(a,f12.8,a,f12.8,a)')
' Search interval = [',
units_from_atomic(
units_out%energy, leftbound),
',', &
593 write(
message(3),
'(a)')
'******************************************************************'
605 integer,
intent(in) :: order
606 integer,
intent(in) :: observable(2)
608 logical :: file_exists
609 integer :: i, j, nspin, time_steps, lmax, nfiles, k, add_lm, l, m, max_add_lm
610 integer,
allocatable :: iunit(:)
611 real(real64) :: dt, lambda, dump, o0
613 real(real64),
allocatable :: q(:), mu(:), qq(:, :), c(:)
614 character(len=20) :: filename
617 real(real64),
allocatable :: multipole(:, :, :), ot(:), dipole(:, :)
626 write(filename,
'(a11,i1)')
'multipoles.', nfiles+1
627 inquire(file=trim(filename), exist = file_exists)
628 if (.not. file_exists)
exit
633 if (nfiles == 0)
then
634 write(
message(1),
'(a)')
'No multipoles.x file was found'
637 if (order > nfiles)
then
638 write(
message(1),
'(a)')
'The order that you ask for is higher than the number'
639 write(
message(2),
'(a)')
'of multipoles.x file that you supply.'
644 safe_allocate(iunit(1:nfiles))
646 write(filename,
'(a11,i1)')
'multipoles.', j
647 iunit(j) =
io_open(trim(filename), namespace, action=
'read', status=
'old')
650 safe_allocate( q(1:nfiles))
651 safe_allocate(mu(1:nfiles))
652 safe_allocate(qq(1:nfiles, 1:nfiles))
653 safe_allocate( c(1:nfiles))
659 call spectrum_mult_info(namespace, iunit(1), nspin, kick, time_steps, dt, units, lmax=lmax)
662 if (kick%n_multipoles > 0)
then
663 kick_operator%n_multipoles = kick%n_multipoles
664 safe_allocate( kick_operator%l(1:kick_operator%n_multipoles))
665 safe_allocate( kick_operator%m(1:kick_operator%n_multipoles))
666 safe_allocate(kick_operator%weight(1:kick_operator%n_multipoles))
667 do i = 1, kick_operator%n_multipoles
668 kick_operator%l(i) = kick%l(i)
669 kick_operator%m(i) = kick%m(i)
670 kick_operator%weight(i) = kick%weight(i)
673 kick_operator%n_multipoles = 3
674 safe_allocate( kick_operator%l(1:kick_operator%n_multipoles))
675 safe_allocate( kick_operator%m(1:kick_operator%n_multipoles))
676 safe_allocate(kick_operator%weight(1:kick_operator%n_multipoles))
677 kick_operator%l(1:3) = 1
678 kick_operator%m(1) = -1
679 kick_operator%m(2) = 0
680 kick_operator%m(3) = 1
688 select case (observable(1))
697 safe_allocate(obs%l(1:1))
698 safe_allocate(obs%m(1:1))
699 safe_allocate(obs%weight(1:1))
701 select case (observable(2))
715 safe_allocate(obs%l(1:1))
716 safe_allocate(obs%m(1:1))
717 safe_allocate(obs%weight(1:1))
718 obs%weight(1) =
m_one
719 obs%l(1) = observable(1)
720 obs%m(1) = observable(2)
723 lambda = abs(kick%delta_strength)
724 q(1) = kick%delta_strength / lambda
727 call spectrum_mult_info(namespace, iunit(j), nspin, kick, time_steps, dt, units, lmax=lmax)
728 q(j) = kick%delta_strength / lambda
741 if (kick%n_multipoles > 0)
then
742 lmax = maxval(kick%l(1:obs%n_multipoles))
743 max_add_lm = (lmax+1)**2-1
744 safe_allocate(multipole(1:max_add_lm, 0:time_steps, 1:nspin))
746 mp_unit = units%length**kick%l(1)
749 safe_allocate(multipole(1:3, 0:time_steps, 1:nspin))
750 mp_unit = units%length
752 safe_allocate(ot(0:time_steps))
757 safe_allocate(dipole(1:3, 1:nspin))
765 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm)
767 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm), &
768 dump, (multipole(add_lm, i, 2), add_lm = 1, max_add_lm)
770 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm), &
771 dump, (multipole(add_lm, i, 2), add_lm = 1, max_add_lm), &
772 dump, (multipole(add_lm, i, 3), add_lm = 1, max_add_lm), &
773 dump, (multipole(add_lm, i, 4), add_lm = 1, max_add_lm)
775 multipole(1:max_add_lm, i, :) =
units_to_atomic(mp_unit, multipole(1:max_add_lm, i, :))
779 dipole(1:3, 1:nspin) = - multipole(1:3, i, 1:nspin)
786 do k = 1, obs%n_multipoles
791 if (l == obs%l(k) .and. m == obs%m(k))
exit lcycle
797 dump = dump + obs%weight(k) * sum(multipole(add_lm, i, 1:nspin))
800 if (i == 0) o0 = dump
801 ot(i) = ot(i) + mu(j)*(dump - o0)
806 ot = ot / lambda**order
808 call write_ot(namespace, nspin, time_steps, dt, kick, order, ot(0:time_steps), observable)
814 safe_deallocate_a(iunit)
816 safe_deallocate_a(mu)
817 safe_deallocate_a(qq)
819 safe_deallocate_a(ot)
820 safe_deallocate_a(multipole)
821 safe_deallocate_a(dipole)
829 subroutine modify_ot(time_steps, dt, order, ot, omega, power)
830 integer,
intent(in) :: time_steps
831 real(real64),
intent(in) :: dt
832 integer,
intent(in) :: order
833 real(real64),
intent(inout) :: ot(0:time_steps)
834 real(real64),
intent(in) :: omega
835 real(real64),
intent(in) :: power
841 select case (mod(order, 2))
844 ot(i) = ot(i) -
m_two * power *
sin(omega*i*dt)
849 ot(i) = ot(i) - power *
cos(omega*i*dt)
853 ot(i) = ot(i) -
m_two * power *
cos(omega*i*dt)
864 subroutine write_ot(namespace, nspin, time_steps, dt, kick, order, ot, observable)
866 integer,
intent(in) :: nspin, time_steps
867 real(real64),
intent(in) :: dt
868 type(
kick_t),
intent(in) :: kick
869 integer,
intent(in) :: order
870 real(real64),
intent(in) :: ot(0:time_steps)
871 integer,
intent(in) :: observable(2)
874 character(len=20) :: header_string
879 iunit =
io_open(
'ot', namespace, action=
'write', status=
'replace')
881 write(iunit,
'(a15,i2)')
'# nspin ', nspin
882 write(iunit,
'(a15,i2)')
'# Order ', order
883 write(iunit,
'(a28,i2)')
'# Frequencies subtracted = ', 0
884 select case (observable(1))
886 write(iunit,
'(a)')
'# Observable operator = kick operator'
887 if (kick%n_multipoles > 0)
then
893 select case (observable(2))
895 write(iunit,
'(a)')
'# O = x'
897 write(iunit,
'(a)')
'# O = y'
899 write(iunit,
'(a)')
'# O = z'
903 ot_unit =
units_out%length**observable(1)
904 write(iunit,
'(a12,i1,a1,i2,a1)')
'# (l, m) = (', observable(1),
',',observable(2),
')'
909 write(iunit,
'(a1)', advance =
'no')
'#'
910 write(iunit,
'(a20)', advance =
'no')
str_center(
't', 19)
911 write(iunit,
'(a20)', advance =
'yes')
str_center(
'<O>(t)', 20)
912 write(iunit,
'(a1)', advance =
'no')
'#'
914 write(iunit,
'(a20)', advance =
'no')
str_center(trim(header_string), 19)
916 write(iunit,
'(a20)', advance =
'yes')
str_center(trim(header_string), 20)
928 subroutine read_ot(namespace, nspin, order, nw_subtracted)
930 integer,
intent(out) :: nspin
931 integer,
intent(out) :: order
932 integer,
intent(out) :: nw_subtracted
934 integer :: iunit, i, ierr
935 character(len=100) :: line
936 character(len=12) :: dummychar
937 real(real64) :: dummy, t1, t2
942 iunit =
io_open(
'ot', namespace, action=
'read', status=
'old')
944 read(iunit,
'(15x,i2)') nspin
945 read(iunit,
'(15x,i2)') order
946 read(iunit,
'(28x,i2)') nw_subtracted
947 read(iunit,
'(a)') line
949 i = index(line,
'Observable')
950 if (index(line,
'Observable') /= 0)
then
952 elseif (index(line,
'# O =') /= 0)
then
954 if (index(line,
'x') /= 0)
then
956 elseif (index(line,
'y') /= 0)
then
958 elseif (index(line,
'z') /= 0)
then
961 elseif (index(line,
'# (l, m) = ') /= 0)
then
962 read(line,
'(a12,i1,a1,i2,a1)') dummychar(1:12), observable(1), dummychar(1:1), observable(2), dummychar(1:1)
964 write(
message(1),
'(a)')
'Problem reading "ot" file: could not figure out the shape'
965 write(
message(2),
'(a)')
'of the observation operator.'
970 read(iunit,
'(a)') line
971 read(iunit,
'(a)') line
977 write(
message(1),
'(a)')
'Could not figure out the units in file "ot".'
981 select case (observable(1))
983 if (kick%n_multipoles > 0)
then
991 ot_unit =
units_out%length**observable(1)
997 read(iunit, *,
end=100) dummy
998 time_steps = time_steps + 1
999 if (time_steps == 1) t1 = dummy
1000 if (time_steps == 2) t2 = dummy
1007 safe_allocate(ot(0:time_steps))
1009 do i = 0, time_steps-1
1010 read(iunit, *) dummy, ot(i)
1019 subroutine print_omega_file(namespace, omega, search_interval, final_time, nfrequencies)
1020 type(namespace_t),
intent(in) :: namespace
1021 real(real64),
intent(inout) :: omega
1022 real(real64),
intent(inout) :: search_interval
1023 real(real64),
intent(inout) :: final_time
1024 integer,
intent(inout) :: nfrequencies
1026 integer :: iunit, i, ierr, nspin, order, nw_subtracted
1027 logical :: file_exists
1028 character(len=20) :: header_string
1029 real(real64),
allocatable :: warray(:), tarray(:)
1030 real(real64) :: leftbound, rightbound, dw, w, aw
1035 inquire(file=
"ot", exist = file_exists)
1036 if (.not. file_exists)
then
1037 write(message(1),
'(a)')
"Could not find 'ot' file."
1038 call messages_fatal(1, namespace=namespace)
1042 call unit_system_from_file(
units,
"ot", namespace, ierr)
1044 write(message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
1045 call messages_fatal(1, namespace=namespace)
1048 if (omega > m_zero)
then
1049 omega = units_to_atomic(
units%energy, omega)
1054 if (search_interval > m_zero)
then
1055 search_interval = units_to_atomic(
units%energy, search_interval)
1057 search_interval = m_half
1060 leftbound = omega - search_interval
1061 rightbound = omega + search_interval
1063 safe_allocate(warray(1:nfrequencies))
1064 safe_allocate(tarray(1:nfrequencies))
1066 call read_ot(namespace, nspin, order, nw_subtracted)
1068 if (mod(order, 2) == 1)
then
1074 if (final_time > m_zero)
then
1078 write(message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
1079 write(message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
1080 units_from_atomic(units_out%time,
total_time), trim(units_abbrev(units_out%time))
1081 call messages_warning(2, namespace=namespace)
1091 dw = (rightbound-leftbound) / (nfrequencies - 1)
1092 do i = 1, nfrequencies
1093 w = leftbound + (i-1)*dw
1099 iunit = io_open(
'omega', namespace, action=
'write', status=
'replace')
1100 write(iunit,
'(a15,i2)')
'# nspin ', nspin
1101 call kick_write(
kick, iunit)
1102 write(iunit,
'(a)')
'#%'
1103 write(iunit,
'(a1,a20)', advance =
'no')
'#', str_center(
"omega", 20)
1104 write(header_string,
'(a)')
'F(omega)'
1105 write(iunit,
'(a20)', advance =
'yes') str_center(trim(header_string), 20)
1106 write(iunit,
'(a1,a20)', advance =
'no')
'#', str_center(
'['//trim(units_abbrev(units_out%energy)) //
']', 20)
1108 write(iunit,
'(a)', advance =
'yes')
1110 do i = 1, nfrequencies
1111 write(iunit,
'(2e20.8)') units_from_atomic(units_out%energy, warray(i)), &
1115 safe_deallocate_a(warray)
1116 safe_deallocate_a(tarray)
1136 integer :: run_mode, order, nfrequencies, ierr, nresonances
1137 real(real64) :: omega, search_interval, final_time, damping
1138 integer,
parameter :: &
1139 ANALYZE_NTHORDER_SIGNAL = 1, &
1140 generate_nthorder_signal = 2, &
1141 read_resonances_from_file = 3, &
1142 generate_omega_file = 4
1143 character(len=100) :: ffile
1144 character(kind=c_char) :: cfile(101)
1149 message(1) =
"Your Fortran compiler doesn't support command-line arguments;"
1150 message(2) =
"the oct-oscillator-strength command is not available."
1155 run_mode = analyze_nthorder_signal
1157 search_interval = -
m_one
1160 final_time = -
m_one
1165 damping = 0.1_real64/27.2114_real64
1170 order, nresonances, nfrequencies, final_time, &
1172 call string_c_to_f(cfile, ffile)
1180 select case (run_mode)
1181 case (generate_nthorder_signal)
1183 case (analyze_nthorder_signal)
1184 call analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, damping, &
1186 case (read_resonances_from_file)
1187 call read_resonances_file(order, ffile, global_namespace, search_interval, final_time, nfrequencies)
1188 case (generate_omega_file)
1189 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