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', die=.false.)
196 write(
message(1),
'(a)')
'Could not open '//trim(ffile)//
' file.'
204 read(iunit, *, iostat = ios) dummy, dummy
206 nresonances = nresonances + 1
209 npairs = (nresonances*(nresonances-1))/2
211 safe_allocate(omega(1:nresonances))
212 safe_allocate( c0i(1:nresonances))
213 safe_allocate(wij(1:npairs))
216 do i = 1, nresonances
217 read(iunit, *) omega(i), c0i(i)
221 do i = 1, nresonances
222 do j = i + 1, nresonances
223 wij(k) = omega(j) - omega(i)
228 if (search_interval >
m_zero)
then
234 call read_ot(namespace, nspin, order_in_file, nw_subtracted)
236 if (order_in_file /= order)
then
237 write(
message(1),
'(a)')
'The ot file should contain the second-order response in this run mode.'
241 if (final_time >
m_zero)
then
243 if (total_time > dt*time_steps)
then
244 total_time = dt*time_steps
245 write(
message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
246 write(
message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
250 time_steps = int(total_time / dt)
251 total_time = time_steps * dt
253 total_time = dt*time_steps
256 dw = (rightbound-leftbound) / (nfrequencies - 1)
261 call modify_ot(time_steps, dt, order, ot, w, power)
262 nw_subtracted = nw_subtracted + 1
266 do i = 1, nresonances
267 do j = i + 1, nresonances
268 leftbound = wij(k) - search_interval
269 rightbound = wij(k) + search_interval
272 call modify_ot(time_steps, dt, order, ot, wij(k), power)
273 nw_subtracted = nw_subtracted + 1
278 safe_deallocate_a(wij)
279 safe_deallocate_a(c0i)
280 safe_deallocate_a(omega)
289 subroutine analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, &
291 integer,
intent(inout) :: order
292 real(real64),
intent(inout) :: omega
293 real(real64),
intent(inout) :: search_interval
294 real(real64),
intent(inout) :: final_time
295 integer,
intent(inout) :: nresonances
296 integer,
intent(inout) :: nfrequencies
297 real(real64),
intent(in) :: damping
300 real(real64) :: leftbound, rightbound, dw, power
301 real(real64),
allocatable :: w(:), c0I2(:)
302 integer :: nspin, i, ierr, order_in_file, nw_subtracted
303 logical :: file_exists
308 inquire(file=
"ot", exist = file_exists)
309 if (.not. file_exists)
then
310 write(
message(1),
'(a)')
"Could not find 'ot' file."
317 write(
message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
327 if (search_interval >
m_zero)
then
333 leftbound = omega - search_interval
334 rightbound = omega + search_interval
336 call read_ot(namespace, nspin, order_in_file, nw_subtracted)
338 if (order_in_file /= order)
then
339 write(
message(1),
'(a)')
'Internal error in analyze_signal'
343 if (mod(order, 2) == 1)
then
344 mode = sine_transform
349 if (final_time >
m_zero)
then
351 if (total_time > dt*time_steps)
then
352 total_time = dt*time_steps
353 write(
message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
354 write(
message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
358 time_steps = int(total_time / dt)
359 total_time = time_steps * dt
361 total_time = dt*time_steps
364 dw = (rightbound-leftbound) / (nfrequencies - 1)
366 safe_allocate( w(1:nresonances))
367 safe_allocate(c0i2(1:nresonances))
373 if (nw_subtracted >= nresonances)
exit
391 call modify_ot(time_steps, dt, order, ot, omega, power)
393 nw_subtracted = nw_subtracted + 1
402 safe_deallocate_a(ot)
404 safe_deallocate_a(c0i2)
417 integer,
intent(in) :: nfrequencies, nresonances
418 real(real64),
intent(in) :: dw
419 real(real64),
intent(in) :: w(nresonances), c0I2(nresonances)
420 real(real64),
intent(in) :: gamma
422 integer :: iunit, i, j
424 complex(real64) :: pol
428 iunit =
io_open(
'polarizability', namespace, action =
'write', status=
'replace', die=.false.)
429 write(iunit,
'(a)')
'# Polarizability file. Generated using the SOS formula with the following data:'
430 write(iunit,
'(a)')
'#'
432 do i = 1, nresonances
433 write(iunit,
'(a1,3e20.12)')
'#', w(i),
sqrt(abs(c0i2(i))), c0i2(i)
436 write(iunit,
'(a10,f12.6)')
'# Gamma = ', gamma
437 write(iunit,
'(a)')
'#'
439 do i = 1, nfrequencies
442 do j = 1, nresonances
443 pol = pol + c0i2(j) * (
m_one / (w(j) - e -
m_zi * gamma) +
m_one/(w(j) + e +
m_zi * gamma))
445 write(iunit,
'(3e20.12)') e, pol
457 subroutine find_resonance(omega, leftbound, rightbound, nfrequencies)
458 real(real64),
intent(inout) :: omega
459 real(real64),
intent(in) :: leftbound, rightbound
460 integer,
intent(in) :: nfrequencies
463 real(real64) :: dw, w, aw, min_aw, min_w, omega_orig, min_w1, min_w2
464 real(real64),
allocatable :: warray(:), tarray(:)
468 safe_allocate(warray(1:nfrequencies))
469 safe_allocate(tarray(1:nfrequencies))
473 dw = (rightbound-leftbound) / (nfrequencies - 1)
474 do i = 1, nfrequencies
475 w = leftbound + (i-1)*dw
483 do i = 1, nfrequencies
484 w = leftbound + (i-1)*dw
485 if (tarray(i) < min_aw)
then
493 min_w1 = min_w - 2*dw
494 min_w2 = min_w + 2*dw
498 write(
message(1),
'(a)')
'Could not find a maximum.'
500 write(
message(3),
'(a,f12.8,a,f12.8,a)')
' Search interval = [', &
502 write(
message(4),
'(a,f12.4,a)')
' Search discretization = ', &
507 safe_deallocate_a(warray)
508 safe_deallocate_a(tarray)
517 real(real64),
intent(in) :: omega
518 real(real64),
intent(out) :: power
519 integer,
intent(in) :: nw_subtracted
520 real(real64),
intent(in) :: dw, leftbound, rightbound
524 call ft(omega, power)
527 case (sine_transform)
533 write(
message(1),
'(a)')
'******************************************************************'
534 write(
message(2),
'(a,i3)')
'Resonance #', nw_subtracted + 1
541 write(
message(6),
'(a,f12.8)')
'f[O->I] = ',
m_two*omega*power
543 write(
message(8),
'(a,f12.8,a,f12.8,a)')
' Search interval = [',
units_from_atomic(
units_out%energy, leftbound),
',', &
547 write(
message(10),
'(a)')
'******************************************************************'
559 real(real64),
intent(in) :: omega
560 real(real64),
intent(out) :: power
561 integer,
intent(in) :: nw_subtracted
562 real(real64),
intent(in) :: leftbound, rightbound
563 real(real64),
intent(in) :: c01, c02
567 call ft(omega, power)
569 case (sine_transform)
576 power = power /
m_two
580 write(
message(1),
'(a)')
'******************************************************************'
581 write(
message(2),
'(a,i3)')
'Resonance #', nw_subtracted + 1
589 write(
message(1),
'(a,f12.8)')
' C(omega)/(C0i*C0j) = ', power / (c01 * c02)
594 write(
message(2),
'(a,f12.8,a,f12.8,a)')
' Search interval = [',
units_from_atomic(
units_out%energy, leftbound),
',', &
596 write(
message(3),
'(a)')
'******************************************************************'
608 integer,
intent(in) :: order
609 integer,
intent(in) :: observable(2)
611 logical :: file_exists
612 integer :: i, j, nspin, time_steps, lmax, nfiles, k, add_lm, l, m, max_add_lm
613 integer,
allocatable :: iunit(:)
614 real(real64) :: dt, lambda, dump, o0
616 real(real64),
allocatable :: q(:), mu(:), qq(:, :), c(:)
617 character(len=20) :: filename
620 real(real64),
allocatable :: multipole(:, :, :), ot(:), dipole(:, :)
629 write(filename,
'(a11,i1)')
'multipoles.', nfiles+1
630 inquire(file=trim(filename), exist = file_exists)
631 if (.not. file_exists)
exit
636 if (nfiles == 0)
then
637 write(
message(1),
'(a)')
'No multipoles.x file was found'
640 if (order > nfiles)
then
641 write(
message(1),
'(a)')
'The order that you ask for is higher than the number'
642 write(
message(2),
'(a)')
'of multipoles.x file that you supply.'
647 safe_allocate(iunit(1:nfiles))
649 write(filename,
'(a11,i1)')
'multipoles.', j
650 iunit(j) =
io_open(trim(filename), namespace, action=
'read', status=
'old', die=.false.)
653 safe_allocate( q(1:nfiles))
654 safe_allocate(mu(1:nfiles))
655 safe_allocate(qq(1:nfiles, 1:nfiles))
656 safe_allocate( c(1:nfiles))
662 call spectrum_mult_info(namespace, iunit(1), nspin, kick, time_steps, dt, units, lmax=lmax)
665 if (kick%n_multipoles > 0)
then
666 kick_operator%n_multipoles = kick%n_multipoles
667 safe_allocate( kick_operator%l(1:kick_operator%n_multipoles))
668 safe_allocate( kick_operator%m(1:kick_operator%n_multipoles))
669 safe_allocate(kick_operator%weight(1:kick_operator%n_multipoles))
670 do i = 1, kick_operator%n_multipoles
671 kick_operator%l(i) = kick%l(i)
672 kick_operator%m(i) = kick%m(i)
673 kick_operator%weight(i) = kick%weight(i)
676 kick_operator%n_multipoles = 3
677 safe_allocate( kick_operator%l(1:kick_operator%n_multipoles))
678 safe_allocate( kick_operator%m(1:kick_operator%n_multipoles))
679 safe_allocate(kick_operator%weight(1:kick_operator%n_multipoles))
680 kick_operator%l(1:3) = 1
681 kick_operator%m(1) = -1
682 kick_operator%m(2) = 0
683 kick_operator%m(3) = 1
691 select case (observable(1))
700 safe_allocate(obs%l(1:1))
701 safe_allocate(obs%m(1:1))
702 safe_allocate(obs%weight(1:1))
704 select case (observable(2))
718 safe_allocate(obs%l(1:1))
719 safe_allocate(obs%m(1:1))
720 safe_allocate(obs%weight(1:1))
721 obs%weight(1) =
m_one
722 obs%l(1) = observable(1)
723 obs%m(1) = observable(2)
726 lambda = abs(kick%delta_strength)
727 q(1) = kick%delta_strength / lambda
730 call spectrum_mult_info(namespace, iunit(j), nspin, kick, time_steps, dt, units, lmax=lmax)
731 q(j) = kick%delta_strength / lambda
744 if (kick%n_multipoles > 0)
then
745 lmax = maxval(kick%l(1:obs%n_multipoles))
746 max_add_lm = (lmax+1)**2-1
747 safe_allocate(multipole(1:max_add_lm, 0:time_steps, 1:nspin))
749 mp_unit = units%length**kick%l(1)
752 safe_allocate(multipole(1:3, 0:time_steps, 1:nspin))
753 mp_unit = units%length
755 safe_allocate(ot(0:time_steps))
760 safe_allocate(dipole(1:3, 1:nspin))
768 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), 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)
773 read(iunit(j), *) k, dump, dump, (multipole(add_lm, i, 1), add_lm = 1, max_add_lm), &
774 dump, (multipole(add_lm, i, 2), add_lm = 1, max_add_lm), &
775 dump, (multipole(add_lm, i, 3), add_lm = 1, max_add_lm), &
776 dump, (multipole(add_lm, i, 4), add_lm = 1, max_add_lm)
778 multipole(1:max_add_lm, i, :) =
units_to_atomic(mp_unit, multipole(1:max_add_lm, i, :))
782 dipole(1:3, 1:nspin) = - multipole(1:3, i, 1:nspin)
789 do k = 1, obs%n_multipoles
794 if (l == obs%l(k) .and. m == obs%m(k))
exit lcycle
800 dump = dump + obs%weight(k) * sum(multipole(add_lm, i, 1:nspin))
803 if (i == 0) o0 = dump
804 ot(i) = ot(i) + mu(j)*(dump - o0)
809 ot = ot / lambda**order
811 call write_ot(namespace, nspin, time_steps, dt, kick, order, ot(0:time_steps), observable)
817 safe_deallocate_a(iunit)
819 safe_deallocate_a(mu)
820 safe_deallocate_a(qq)
822 safe_deallocate_a(ot)
823 safe_deallocate_a(multipole)
824 safe_deallocate_a(dipole)
832 subroutine modify_ot(time_steps, dt, order, ot, omega, power)
833 integer,
intent(in) :: time_steps
834 real(real64),
intent(in) :: dt
835 integer,
intent(in) :: order
836 real(real64),
intent(inout) :: ot(0:time_steps)
837 real(real64),
intent(in) :: omega
838 real(real64),
intent(in) :: power
844 select case (mod(order, 2))
847 ot(i) = ot(i) -
m_two * power *
sin(omega*i*dt)
852 ot(i) = ot(i) - power *
cos(omega*i*dt)
856 ot(i) = ot(i) -
m_two * power *
cos(omega*i*dt)
867 subroutine write_ot(namespace, nspin, time_steps, dt, kick, order, ot, observable)
869 integer,
intent(in) :: nspin, time_steps
870 real(real64),
intent(in) :: dt
871 type(
kick_t),
intent(in) :: kick
872 integer,
intent(in) :: order
873 real(real64),
intent(in) :: ot(0:time_steps)
874 integer,
intent(in) :: observable(2)
877 character(len=20) :: header_string
882 iunit =
io_open(
'ot', namespace, action=
'write', status=
'replace')
884 write(iunit,
'(a15,i2)')
'# nspin ', nspin
885 write(iunit,
'(a15,i2)')
'# Order ', order
886 write(iunit,
'(a28,i2)')
'# Frequencies subtracted = ', 0
887 select case (observable(1))
889 write(iunit,
'(a)')
'# Observable operator = kick operator'
890 if (kick%n_multipoles > 0)
then
896 select case (observable(2))
898 write(iunit,
'(a)')
'# O = x'
900 write(iunit,
'(a)')
'# O = y'
902 write(iunit,
'(a)')
'# O = z'
906 ot_unit =
units_out%length**observable(1)
907 write(iunit,
'(a12,i1,a1,i2,a1)')
'# (l, m) = (', observable(1),
',',observable(2),
')'
912 write(iunit,
'(a1)', advance =
'no')
'#'
913 write(iunit,
'(a20)', advance =
'no')
str_center(
't', 19)
914 write(iunit,
'(a20)', advance =
'yes')
str_center(
'<O>(t)', 20)
915 write(iunit,
'(a1)', advance =
'no')
'#'
917 write(iunit,
'(a20)', advance =
'no')
str_center(trim(header_string), 19)
919 write(iunit,
'(a20)', advance =
'yes')
str_center(trim(header_string), 20)
931 subroutine read_ot(namespace, nspin, order, nw_subtracted)
933 integer,
intent(out) :: nspin
934 integer,
intent(out) :: order
935 integer,
intent(out) :: nw_subtracted
937 integer :: iunit, i, ierr
938 character(len=100) :: line
939 character(len=12) :: dummychar
940 real(real64) :: dummy, t1, t2
945 iunit =
io_open(
'ot', namespace, action=
'read', status=
'old')
947 write(
message(1),
'(a)')
'A file called ot should be present and was not found.'
951 read(iunit,
'(15x,i2)') nspin
952 read(iunit,
'(15x,i2)') order
953 read(iunit,
'(28x,i2)') nw_subtracted
954 read(iunit,
'(a)') line
956 i = index(line,
'Observable')
957 if (index(line,
'Observable') /= 0)
then
959 elseif (index(line,
'# O =') /= 0)
then
961 if (index(line,
'x') /= 0)
then
963 elseif (index(line,
'y') /= 0)
then
965 elseif (index(line,
'z') /= 0)
then
968 elseif (index(line,
'# (l, m) = ') /= 0)
then
969 read(line,
'(a12,i1,a1,i2,a1)') dummychar(1:12), observable(1), dummychar(1:1), observable(2), dummychar(1:1)
971 write(
message(1),
'(a)')
'Problem reading "ot" file: could not figure out the shape'
972 write(
message(2),
'(a)')
'of the observation operator.'
977 read(iunit,
'(a)') line
978 read(iunit,
'(a)') line
984 write(
message(1),
'(a)')
'Could not figure out the units in file "ot".'
988 select case (observable(1))
990 if (kick%n_multipoles > 0)
then
998 ot_unit =
units_out%length**observable(1)
1004 read(iunit, *,
end=100) dummy
1005 time_steps = time_steps + 1
1006 if (time_steps == 1) t1 = dummy
1007 if (time_steps == 2) t2 = dummy
1014 safe_allocate(ot(0:time_steps))
1016 do i = 0, time_steps-1
1017 read(iunit, *) dummy, ot(i)
1026 subroutine print_omega_file(namespace, omega, search_interval, final_time, nfrequencies)
1027 type(namespace_t),
intent(in) :: namespace
1028 real(real64),
intent(inout) :: omega
1029 real(real64),
intent(inout) :: search_interval
1030 real(real64),
intent(inout) :: final_time
1031 integer,
intent(inout) :: nfrequencies
1033 integer :: iunit, i, ierr, nspin, order, nw_subtracted
1034 logical :: file_exists
1035 character(len=20) :: header_string
1036 real(real64),
allocatable :: warray(:), tarray(:)
1037 real(real64) :: leftbound, rightbound, dw, w, aw
1042 inquire(file=
"ot", exist = file_exists)
1043 if (.not. file_exists)
then
1044 write(message(1),
'(a)')
"Could not find 'ot' file."
1045 call messages_fatal(1, namespace=namespace)
1049 call unit_system_from_file(
units,
"ot", namespace, ierr)
1051 write(message(1),
'(a)')
"Could not retrieve units in the 'ot' file."
1052 call messages_fatal(1, namespace=namespace)
1055 if (omega > m_zero)
then
1056 omega = units_to_atomic(
units%energy, omega)
1061 if (search_interval > m_zero)
then
1062 search_interval = units_to_atomic(
units%energy, search_interval)
1064 search_interval = m_half
1067 leftbound = omega - search_interval
1068 rightbound = omega + search_interval
1070 safe_allocate(warray(1:nfrequencies))
1071 safe_allocate(tarray(1:nfrequencies))
1073 call read_ot(namespace, nspin, order, nw_subtracted)
1075 if (mod(order, 2) == 1)
then
1081 if (final_time > m_zero)
then
1085 write(message(1),
'(a)')
'The requested total time to process is larger than the time available in the input file.'
1086 write(message(2),
'(a,f8.4,a)')
'The time has been adjusted to ', &
1087 units_from_atomic(units_out%time,
total_time), trim(units_abbrev(units_out%time))
1088 call messages_warning(2, namespace=namespace)
1098 dw = (rightbound-leftbound) / (nfrequencies - 1)
1099 do i = 1, nfrequencies
1100 w = leftbound + (i-1)*dw
1106 iunit = io_open(
'omega', namespace, action=
'write', status=
'replace')
1107 write(iunit,
'(a15,i2)')
'# nspin ', nspin
1108 call kick_write(
kick, iunit)
1109 write(iunit,
'(a)')
'#%'
1110 write(iunit,
'(a1,a20)', advance =
'no')
'#', str_center(
"omega", 20)
1111 write(header_string,
'(a)')
'F(omega)'
1112 write(iunit,
'(a20)', advance =
'yes') str_center(trim(header_string), 20)
1113 write(iunit,
'(a1,a20)', advance =
'no')
'#', str_center(
'['//trim(units_abbrev(units_out%energy)) //
']', 20)
1115 write(iunit,
'(a)', advance =
'yes')
1117 do i = 1, nfrequencies
1118 write(iunit,
'(2e20.8)') units_from_atomic(units_out%energy, warray(i)), &
1122 safe_deallocate_a(warray)
1123 safe_deallocate_a(tarray)
1143 integer :: run_mode, order, nfrequencies, ierr, nresonances
1144 real(real64) :: omega, search_interval, final_time, damping
1145 integer,
parameter :: &
1146 ANALYZE_NTHORDER_SIGNAL = 1, &
1147 generate_nthorder_signal = 2, &
1148 read_resonances_from_file = 3, &
1149 generate_omega_file = 4
1150 character(len=100) :: ffile
1155 message(1) =
"Your Fortran compiler doesn't support command-line arguments;"
1156 message(2) =
"the oct-oscillator-strength command is not available."
1161 run_mode = analyze_nthorder_signal
1163 search_interval = -
m_one
1166 final_time = -
m_one
1171 damping = 0.1_real64/27.2114_real64
1175 order, nresonances, nfrequencies, final_time, &
1184 select case (run_mode)
1185 case (generate_nthorder_signal)
1187 case (analyze_nthorder_signal)
1188 call analyze_signal(order, omega, search_interval, final_time, nresonances, nfrequencies, damping, &
1190 case (read_resonances_from_file)
1191 call read_resonances_file(order, ffile, global_namespace, search_interval, final_time, nfrequencies)
1192 case (generate_omega_file)
1193 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)
subroutine, public messages_info(no_lines, iunit, verbose_limit, stress, 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 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