35#include "./base/base_uses.f90"
40 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_field'
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 "not allowed together with INTENSITY_LIST", &
70 usage=
"INTENSITY 0.001", &
76 description=
"Polarisation vector of electric field", &
77 usage=
"POLARISATION 0.0 0.0 1.0", &
78 repeats=.false., n_var=3, &
79 type_of_var=
real_t, default_r_vals=(/0.0_dp, 0.0_dp, 1.0_dp/))
83 CALL keyword_create(keyword, __location__, name=
"DISPLACEMENT_FIELD", &
84 description=
"Use the displacement field formulation.", &
85 usage=
"DISPLACEMENT_FIELD T", &
87 default_l_val=.false., &
88 lone_keyword_l_val=.true.)
93 description=
"Filter for displacement field (x,y,z-direction)", &
94 usage=
"D_FILTER 1.0 0.0 0.0", &
95 repeats=.false., n_var=3, &
96 type_of_var=
real_t, default_r_vals=(/1.0_dp, 1.0_dp, 1.0_dp/))
100 CALL keyword_create(keyword, __location__, name=
"INTENSITY_LIST", &
101 description=
"Intensities of the electric field in a.u. "// &
102 "They are applied sequentially, one per frame. "// &
103 "If the number of frames exceeds the number of values, "// &
104 "the list is cyclically repeated. Attention: not implemented for eeq.", &
105 usage=
"INTENSITY_LIST {real} {real} .. {real}", &
106 n_var=-1, type_of_var=
real_t, default_r_vals=(/0.0_dp/))
110 CALL keyword_create(keyword, __location__, name=
"INTENSITIES_FILE_NAME", &
111 description=
"File containting a list of intensities, "// &
112 "one per line, in a.u. "// &
113 "They are applied sequentially, one per frame. "// &
114 "If the number of frames exceeds the number of values, "// &
115 "the list is cyclically repeated. Attention: not implemented for eeq.", &
116 usage=
"INTENSITIES_FILE_NAME filename", &
122 description=
"First frame the field is applied. "// &
123 "(0: first frame) "// &
124 "Attention: ignored for eeq", &
125 usage=
"START_FRAME 0", &
131 description=
"Last frame the field is applied. "// &
132 "If an end frame is specified, the number of active frames "// &
133 "must be a multiple of the number of "// &
134 "the given intensity values. (-1: no end) "// &
135 "Attention: ignored for eeq", &
136 usage=
"END_FRAME -1", &
153 cpassert(.NOT.
ASSOCIATED(section))
155 description=
"Parameters for finite, time dependent electric fields. "// &
156 "For time dependent propagation in periodic systems, set "// &
157 "DFT%REAL_TIME_PROPAGATION%VELOCITY_GAUGE to true. "// &
158 "For static fields use EXTERNAL_POTENTIAL.", &
159 n_keywords=6, n_subsections=1, repeats=.true.)
161 NULLIFY (keyword, subsection)
164 description=
"Intensity of the electric field. For real-time propagation (RTP) units are "// &
165 "in W*cm-2 which corresponds "// &
166 "to a maximal amplitude in a.u. of sqrt(I/(3.50944*10^16)). "// &
167 "For a constant local field in isolated system calclulations, units are in a.u..", &
168 usage=
"INTENSITY 0.001", &
174 description=
"Polarisation vector of electric field", &
175 usage=
"POLARISATION 0.0 0.0 1.0", &
176 repeats=.false., n_var=3, &
177 type_of_var=
real_t, default_r_vals=(/0.0_dp, 0.0_dp, 1.0_dp/))
182 description=
"Wavelength of efield field for real-time propagation (RTP) calculations.", &
183 usage=
"Wavelength 1.E0", &
184 default_r_val=0._dp, unit_str=
"nm")
189 description=
"Phase offset of the cosine given in multiples of pi. "// &
190 "Used in real-time propagation (RTP) calculations.", &
191 usage=
"Phase 1.E0", &
197 description=
"Shape of the efield pulse used in real-time propagation (RTP) calculations.", &
198 usage=
"ENVELOP CONSTANT", &
200 enum_c_vals=
s2a(
"CONSTANT",
"GAUSSIAN",
"RAMP",
"CUSTOM"), &
201 enum_desc=
s2a(
"No envelop function is applied to the strength", &
202 "A Gaussian function is used as envelop ", &
203 "Linear tune in/out of the field", &
204 "A custom field read from a file"), &
209 CALL keyword_create(keyword, __location__, name=
"VEC_POT_INITIAL", &
210 description=
"Initial value of the vector "// &
211 "potential (for velocity gauge). This input is "// &
212 "made especially for restarting RTP calculation. "// &
213 "Unit is atomic unit. "// &
214 "Note that if several field sections are defined, only the first one will be used.", &
215 usage=
"vec_pot_initial 1.0E-2 0.0 0.0", &
217 n_var=3, type_of_var=
real_t, &
218 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
222 CALL create_constant_env_section(subsection)
226 CALL create_gaussian_env_section(subsection)
230 CALL create_ramp_env_section(subsection)
234 CALL create_custom_env_section(subsection)
244 SUBROUTINE create_constant_env_section(section)
249 cpassert(.NOT.
ASSOCIATED(section))
251 description=
"parameters for a constant envelop", &
252 n_keywords=6, n_subsections=1, repeats=.true.)
257 description=
"First step the field is applied ", &
258 usage=
"START_STEP 0", &
264 description=
"Last step the field is applied", &
265 usage=
"END_STEP 2", &
270 END SUBROUTINE create_constant_env_section
276 SUBROUTINE create_gaussian_env_section(section)
281 cpassert(.NOT.
ASSOCIATED(section))
283 description=
"parameters for a gaussian envelop", &
284 n_keywords=6, n_subsections=1, repeats=.true.)
289 description=
"Center of the gaussian envelop (maximum of the gaussian)", &
291 default_r_val=0.0e0_dp, &
297 description=
"Width of the gaussian ", &
298 usage=
"SIGMA 2.0E0", &
299 default_r_val=-1.0e0_dp, &
304 END SUBROUTINE create_gaussian_env_section
310 SUBROUTINE create_ramp_env_section(section)
315 cpassert(.NOT.
ASSOCIATED(section))
317 description=
"Parameters for an trapeziodal envelop ", &
318 n_keywords=6, n_subsections=1, repeats=.true.)
322 CALL keyword_create(keyword, __location__, name=
"START_STEP_IN", &
323 description=
"Step when the electric field starts to be applied ", &
324 usage=
"START_STEP_IN 0", &
330 description=
"Step when the field reaches the full strength", &
331 usage=
"END_STEP_IN 2", &
336 CALL keyword_create(keyword, __location__, name=
"START_STEP_OUT", &
337 description=
"Step when the field starts to vanish ", &
338 usage=
"START_STEP_OUT 0", &
344 description=
"Step when the field disappears", &
345 usage=
"END_STEP_OUT 2", &
350 END SUBROUTINE create_ramp_env_section
356 SUBROUTINE create_custom_env_section(section)
361 cpassert(.NOT.
ASSOCIATED(section))
363 description=
"Parameters for a custom efield", &
364 n_keywords=2, n_subsections=1, repeats=.true.)
368 CALL keyword_create(keyword, __location__, name=
"EFIELD_FILE_NAME", &
369 description=
"Specify file that contains the electric field [V/m].", &
370 usage=
"EFIELD_FILE_NAME filename", &
371 n_var=1, type_of_var=
char_t, default_c_val=
"")
376 description=
"The time step between the entries in the list with the electric field.", &
377 usage=
"TIMESTEP 1", &
379 default_r_val=1.0_dp)
383 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.