35 #include "./base/base_uses.f90"
40 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_field'
52 TYPE(section_type),
POINTER :: section
54 TYPE(keyword_type),
POINTER :: keyword
56 cpassert(.NOT.
ASSOCIATED(section))
57 CALL section_create(section, __location__, name=
"PERIODIC_EFIELD", &
58 description=
"parameters for finite periodic electric field computed using"// &
59 " the Berry phase approach. IMPORTANT: Can only be used in combination"// &
60 " with OT. Can not be used in combination with RTP or EMD,"// &
61 " e.g. RESTART_RTP has to be .FALSE. when restarting the job.", &
63 n_keywords=6, n_subsections=1, repeats=.true.)
68 description=
"Intensity of the electric field in a.u", &
69 usage=
"INTENSITY 0.001", &
75 description=
"Polarisation vector of electric field", &
76 usage=
"POLARISIATION 0.0 0.0 1.0", &
77 repeats=.false., n_var=3, &
78 type_of_var=
real_t, default_r_vals=(/0.0_dp, 0.0_dp, 1.0_dp/))
82 CALL keyword_create(keyword, __location__, name=
"DISPLACEMENT_FIELD", &
83 description=
"Use the displacement field formulation.", &
84 usage=
"DISPLACEMENT_FIELD T", &
86 default_l_val=.false., &
87 lone_keyword_l_val=.true.)
92 description=
"Filter for displacement field (x,y,z-dirction)", &
93 usage=
"D_FILTER 1.0 0.0 0.0", &
94 repeats=.false., n_var=3, &
95 type_of_var=
real_t, default_r_vals=(/1.0_dp, 1.0_dp, 1.0_dp/))
106 TYPE(section_type),
POINTER :: section
108 TYPE(keyword_type),
POINTER :: keyword
109 TYPE(section_type),
POINTER :: subsection
111 cpassert(.NOT.
ASSOCIATED(section))
113 description=
"Parameters for finite, time dependent electric fields. "// &
114 "For time dependent propagation in periodic systems, set "// &
115 "DFT%REAL_TIME_PROPAGATION%VELOCITY_GAUGE to true. "// &
116 "For static fields use EXTERNAL_POTENTIAL.", &
117 n_keywords=6, n_subsections=1, repeats=.true.)
119 NULLIFY (keyword, subsection)
122 description=
"Intensity of the electric field. For real-time propagation (RTP) units are "// &
123 "in W*cm-2 which corresponds "// &
124 "to a maximal amplitude in a.u. of sqrt(I/(3.50944*10^16)). "// &
125 "For a constant local field in isolated system calclulations, units are in a.u..", &
126 usage=
"INTENSITY 0.001", &
132 description=
"Polarisation vector of electric field", &
133 usage=
"POLARISATION 0.0 0.0 1.0", &
134 repeats=.false., n_var=3, &
135 type_of_var=
real_t, default_r_vals=(/0.0_dp, 0.0_dp, 1.0_dp/))
140 description=
"Wavelength of efield field for real-time propagation (RTP) calculations.", &
141 usage=
"Wavelength 1.E0", &
142 default_r_val=0._dp, unit_str=
"nm")
147 description=
"Phase offset of the cosine given in multiples of pi. "// &
148 "Used in real-time propagation (RTP) calculations.", &
149 usage=
"Phase 1.E0", &
155 description=
"Shape of the efield pulse used in real-time propagation (RTP) calculations.", &
156 usage=
"ENVELOP CONSTANT", &
158 enum_c_vals=s2a(
"CONSTANT",
"GAUSSIAN",
"RAMP",
"CUSTOM"), &
159 enum_desc=s2a(
"No envelop function is applied to the strength", &
160 "A Gaussian function is used as envelop ", &
161 "Linear tune in/out of the field", &
162 "A custom field read from a file"), &
167 CALL keyword_create(keyword, __location__, name=
"VEC_POT_INITIAL", &
168 description=
"Initial value of the vector "// &
169 "potential (for velocity gauge). This input is "// &
170 "made especially for restarting RTP calculation. "// &
171 "Unit is atomic unit. "// &
172 "Note that if several field sections are defined, only the first one will be used.", &
173 usage=
"vec_pot_initial 1.0E-2 0.0 0.0", &
175 n_var=3, type_of_var=
real_t, &
176 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
180 CALL create_constant_env_section(subsection)
184 CALL create_gaussian_env_section(subsection)
188 CALL create_ramp_env_section(subsection)
192 CALL create_custom_env_section(subsection)
202 SUBROUTINE create_constant_env_section(section)
203 TYPE(section_type),
POINTER :: section
205 TYPE(keyword_type),
POINTER :: keyword
207 cpassert(.NOT.
ASSOCIATED(section))
209 description=
"parameters for a constant envelop", &
210 n_keywords=6, n_subsections=1, repeats=.true.)
215 description=
"First step the field is applied ", &
216 usage=
"START_STEP 0", &
222 description=
"Last step the field is applied", &
223 usage=
"END_STEP 2", &
228 END SUBROUTINE create_constant_env_section
234 SUBROUTINE create_gaussian_env_section(section)
235 TYPE(section_type),
POINTER :: section
237 TYPE(keyword_type),
POINTER :: keyword
239 cpassert(.NOT.
ASSOCIATED(section))
241 description=
"parameters for a gaussian envelop", &
242 n_keywords=6, n_subsections=1, repeats=.true.)
247 description=
"Center of the gaussian envelop (maximum of the gaussian)", &
249 default_r_val=0.0e0_dp, &
255 description=
"Width of the gaussian ", &
256 usage=
"SIGMA 2.0E0", &
257 default_r_val=-1.0e0_dp, &
262 END SUBROUTINE create_gaussian_env_section
268 SUBROUTINE create_ramp_env_section(section)
269 TYPE(section_type),
POINTER :: section
271 TYPE(keyword_type),
POINTER :: keyword
273 cpassert(.NOT.
ASSOCIATED(section))
275 description=
"Parameters for an trapeziodal envelop ", &
276 n_keywords=6, n_subsections=1, repeats=.true.)
280 CALL keyword_create(keyword, __location__, name=
"START_STEP_IN", &
281 description=
"Step when the electric field starts to be applied ", &
282 usage=
"START_STEP_IN 0", &
288 description=
"Step when the field reaches the full strength", &
289 usage=
"END_STEP_IN 2", &
294 CALL keyword_create(keyword, __location__, name=
"START_STEP_OUT", &
295 description=
"Step when the field starts to vanish ", &
296 usage=
"START_STEP 0", &
302 description=
"Step when the field disappears", &
303 usage=
"END_TIME 2", &
308 END SUBROUTINE create_ramp_env_section
314 SUBROUTINE create_custom_env_section(section)
315 TYPE(section_type),
POINTER :: section
317 TYPE(keyword_type),
POINTER :: keyword
319 cpassert(.NOT.
ASSOCIATED(section))
321 description=
"Parameters for a custom efield", &
322 n_keywords=2, n_subsections=1, repeats=.true.)
326 CALL keyword_create(keyword, __location__, name=
"EFIELD_FILE_NAME", &
327 description=
"Specify file that contains the electric field [V/m].", &
328 usage=
"EFIELD_FILE_NAME filename", &
329 n_var=1, type_of_var=
char_t, default_c_val=
"")
334 description=
"The time step between the entries in the list with the electric field.", &
335 usage=
"TIME_STEP 1", &
337 default_r_val=1.0_dp)
341 END SUBROUTINE create_custom_env_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public umari2002
integer, save, public stengel2009
integer, save, public souza2002
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.