diff --git a/source/f90/eels-boson.f90 b/source/f90/eels-boson.f90 index d6a952b9610946265ec471ff57e6bc319c7d60a1..6904453d55b67c712bea295a26935947e1580f65 100644 --- a/source/f90/eels-boson.f90 +++ b/source/f90/eels-boson.f90 @@ -227,13 +227,6 @@ program eels_boson endif jos = jos + 1 call getOscillator(termListItem, oscType, osc, jos) -! read(11, *) (osc(k, jos), k = 1, 3) -! oscType(jos) = Lorentz -! if (osc(2, jos) == -1.0) then ! Drude term -! osc(2, jos) = osc(3, jos) -! osc(3, jos) = 0.0 -! oscType(jos) = Drude -! endif if ((j == nos(l) / 2 + 1) .and. (nos(l) > 1)) then write(6, 106) write(6, 107) @@ -255,8 +248,6 @@ program eels_boson write(*,*) endif -! close(unit = 11) - nw = 1 + int((wmax - wmin) / dw) allocate (wn_array(nw), f(nw)) @@ -265,19 +256,44 @@ program eels_boson layers, neps, nper, name, size(name), thick, epsinf, nos, oscType, osc, size(osc, 2),& contrl, wn_array, debug, f, size(wn_array)) - open(unit = 13, file = eelsin_name) + select type (root) + class is (type_dictionary) ! target temperature (Kelvin) - read(13, *) t + t = root%get_real('T', error = io_err) + if (allocated(io_err)) then + print *, io_err%message + stop 1 + endif ! width of the instrumental response (cm**-1) - read(13, *) width + width = root%get_real('Width', error = io_err) + if (allocated(io_err)) then + print *, io_err%message + stop 1 + endif ! fraction of gaussian for the instrumental response - read(13, *) gauss + gauss = root%get_real('Gauss', error = io_err) + if (allocated(io_err)) then + print *, io_err%message + stop 1 + endif ! asymmetry of the instrumental response - read(13, *) asym + asym = root%get_real('Asym', error = io_err) + if (allocated(io_err)) then + print *, io_err%message + stop 1 + endif ! lower and upper energy losses for this computation (cm**-1) - read(13, *) emin - read(13, *) emax - close(unit=13) + emin = root%get_real('EMin', error = io_err) + if (allocated(io_err)) then + print *, io_err%message + stop 1 + endif + emax = root%get_real('EMax', error = io_err) + if (allocated(io_err)) then + print *, io_err%message + stop 1 + endif + end select write(*,*) 'program boson (September 2020)' write(*,'(a, f6.1, a, f7.2, a)') ' t =', t, ' K, width =', width, ' cm**-1' diff --git a/source/f90/getOscillator.f90 b/source/f90/getOscillator.f90 index 73f403c925c10cb2db6aa5d03f604730711c362a..ed5a91f452236d5dfff1742867bec5732f5c3bb7 100644 --- a/source/f90/getOscillator.f90 +++ b/source/f90/getOscillator.f90 @@ -35,16 +35,16 @@ module getOscillator_mod osc(1,jos) = oscillatorTerm%get_real('wTO', error = io_err) osc(2,jos) = oscillatorTerm%get_real('GammaTO', error = io_err) osc(3,jos) = oscillatorTerm%get_real('wLO', error = io_err) - osc(4,jos) = oscillatorTerm%get_real('GammaTO', error = io_err) + osc(4,jos) = oscillatorTerm%get_real('GammaLO', error = io_err) case (Drude) - osc(1,jos) = oscillatorTerm%get_real('wTO', error = io_err) - osc(2,jos) = oscillatorTerm%get_real('lambda', error = io_err) + osc(1,jos) = oscillatorTerm%get_real('wP', error = io_err) + osc(2,jos) = oscillatorTerm%get_real('Gamma', error = io_err) osc(3,jos) = 0.0 osc(4,jos) = 0.0 case (extendedDrude) - osc(1,jos) = oscillatorTerm%get_real('wTO', error = io_err) - osc(2,jos) = oscillatorTerm%get_real('lambda', error = io_err) - osc(3,jos) = 0.0 + osc(1,jos) = oscillatorTerm%get_real('wP', error = io_err) + osc(2,jos) = oscillatorTerm%get_real('Gamma0', error = io_err) + osc(3,jos) = oscillatorTerm%get_real('GammaP', error = io_err) osc(4,jos) = 0.0 end select end select diff --git a/tests/inputFiles/eelsbosin001.yaml b/tests/inputFiles/eelsbosin001.yaml index 8fdfcd948e616af2cc8fb4258547db47ecc4f7f7..3cfd29cf0eec97786e6114ef19bbfa7553f29108 100644 --- a/tests/inputFiles/eelsbosin001.yaml +++ b/tests/inputFiles/eelsbosin001.yaml @@ -32,8 +32,8 @@ Layers: Terms: [ {Type: Drude, - wTO: 160000.0, - lambda: 0.012} + wP: 160000.0, + Gamma: 0.012} ] } @@ -43,5 +43,5 @@ T: 300.0 Width: 57.0 Gauss: 0.5 Asym: 0.3 -Emin: -500.0 +EMin: -500.0 EMax: 750.0