Problem in modifying the subroutine


Click here for full thread
Clicked A Few Times
Thank you very much for your kind reply.
I tried the partial recompile/relinking using the “computes Hann function for windowing pulse” in rf_tddft_excite.F.
I changed the equation from hout=sin(arg)*sin(arg) to hout=sin(arg), and calculate the E-Field using the following .nw input file.
Then I executed the repeating test.
However the results were inconsistent as shown in below.
There may be something wrong.
If you have any comments, please teach me.

Best regard,
Toshiharu Higuchi
Yokohama, Japan


<<<Repeating Test>>>
[1] Step 1: original
(1-1)Equation of rt_tddft_excite.F ; hout=sin(arg) * sin(arg)
(1-2)make & make link ; Not Execute
(1-3)Result: E-Field
     Peak Field = 5.49E7 V/cm
Width = 1.26 fs

[2] Step 2:
Using the original file (Step 1 file), changed the equation and then executed the “make & make install”. I get the reasonable result.

(2-1)Equation of rt_tddft_excite.F ; hout=sin(arg)
(2-2)make & make link ; Execute
(2-3)Result: E-Field
     Peak Field = -3.35E7 V/cm
Width = 1.26 fs

[3] Step 3:
Using the Step 2 file, no change the equation and then no execution the “make & make install”. It is a repeatable test. Thus we should get a same result with Step 2. However Result was same as Step 1. Why??

(3-1)Equation of rt_tddft_excite.F ; hout=sin(arg)
(3-2)make & make link ; Not Execute
(3-3)Result: E-Field
     Peak Field = 5.89E7 V/cm
Width = 1.26 fs

[4] Step 4:
Using the Step 3 file, no change the equation and then execute the “make & make install”. It is a repeatable test. Equation is same as Step 3. Thus we should get a same result with Step 3. However Result was not same as Step 3. Why??

(4-1)Equation of rt_tddft_excite.F ; hout=sin(arg)
(4-2)make & make link ; Execute
(4-3)Result: E-Field
     Peak Field = -7.3E7 V/cm
Width = 1.26 fs


<<<Input file: H-GRH_SrcCode_170121A.nw>>>
Note: 1. means #.
        In the .nw file, I used #, however in this post # is changed 1..

title "h_grh H-GRH_SrcCode_170121A"

  1. define a simulation cell###
NWPW
 SIMULATION_CELL
cell_name h-termi-gra
boundary_conditions periodic
lattice_vectors
22.500d0 0.000d0 0.000d0
0.000d0 6.9635973d0 0.000d0
0.000d0 0.000d0 2.4869877d0
ngrid 100 31 12
END
END

  1. geometry###
geometry "system" units angstrom nocenter noautosym noautoz
   H     13.682904016    1.740899325    1.243493850    
C 14.777498488 1.740899325 1.243493850
C 15.442484477 1.740899325 0.000000000
C 16.872015021 1.740899325 0.000000000
C 17.564308380 1.740899325 1.243493850
H 18.658900000 1.740899325 1.243493850
end

set geometry "system"

basis
   H  library 3-21G
C library 3-21G
end

  1. task dft###

dft
xc pbe0
convergence energy 1e-5
iterations 300
vectors output H-GRH_SrcCode_170121A.movecs

end

  1. task dft energy

  1. dplot###
dplot
 TITLE HGRA
vectors H-GRH_SrcCode_170121A.movecs
LimitXYZ
0.0 22.5 100
0.0 6.9635973 31
0.0 2.4869877 12
spin total
gaussian
output chargedenity.cube
end

task dft
task dplot

  1. rt-tddft###

unset rt_tddft:*
rt_tddft
 tmax 400.0
dt 0.2

 field "hpulse"
type hann
polarization x
frequency 0.12
center 200.0
width 50.0
max 0.01459
spin total
end

excite "system" with "hpulse"

  1. Visualization###

 visualization
tstart 0.0
tend 400.0
treference 0.0
dplot
end

end

task dft rt_tddft