diff --git a/src/utils/infrared.F90 b/src/utils/infrared.F90 index e8883fa3ffc10cd632609959a0c60fbc93bf6fe1..8bd1ca68f32a3ee7cc4e6f476434f9dc207ea6ae 100644 --- a/src/utils/infrared.F90 +++ b/src/utils/infrared.F90 @@ -33,7 +33,7 @@ program infrared implicit none integer :: iunit, ierr, ii, jj, iter, read_iter, max_iter, ini_iter, end_iter - FLOAT :: start_time, end_time + FLOAT :: start_time, end_time, mu FLOAT, allocatable :: time(:), dipole(:,:) CMPLX, allocatable :: ftdipole(:,:) type(space_t) :: space @@ -59,6 +59,7 @@ program infrared !These variables are documented in src/td/spectrum.F90 call parse_variable(global_namespace, 'TDMaxSteps', 1500, max_iter) + call parse_variable(global_namespace, 'TDIonicTimeScale', CNST(1.0), mu) call parse_variable(global_namespace, 'PropagationSpectrumStartTime', M_ZERO, start_time, units_inp%time) call parse_variable(global_namespace, 'PropagationSpectrumEndTime', -M_ONE, end_time, units_inp%time) call parse_variable(global_namespace, 'PropagationSpectrumMaxEnergy', & @@ -72,7 +73,7 @@ program infrared SAFE_ALLOCATE(dipole(0:max_iter+1, 1:3)) - call read_dipole(dipole) + call read_dipole(dipole, mu) SAFE_ALLOCATE(ftdipole(1:max_freq, 1:3)) @@ -113,9 +114,9 @@ program infrared contains - subroutine read_dipole(dipole) + subroutine read_dipole(dipole, mu) FLOAT, intent(out) :: dipole(0:, :) - + FLOAT, intent(in) :: mu FLOAT :: charge PUSH_SUB(read_dipole) @@ -135,7 +136,7 @@ contains read(unit = iunit, iostat = ierr, fmt = *) read_iter, time(iter), & charge, dipole(iter, 1), dipole(iter, 2), dipole(iter, 3) - time(iter) = units_to_atomic(units_out%time, time(iter)) + time(iter) = units_to_atomic(units_out%time, time(iter))*mu !dipole moment has unit of charge*length, charge has the same unit in both systems do ii = 1, 3