Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2023 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \par History
10 : !> - taken out of input_cp2k_motion
11 : !> \author Ole Schuett
12 : ! **************************************************************************************************
13 :
14 : MODULE input_cp2k_md
15 : USE bibliography, ONLY: &
16 : Evans1983, Guidon2008, Kantorovich2008, Kantorovich2008a, Kuhne2007, Minary2003, &
17 : Rengaraj2020, Ricci2003, Tuckerman1992, VandeVondele2002, West2006
18 : USE cp_output_handling, ONLY: add_last_numeric,&
19 : cp_print_key_section_create,&
20 : debug_print_level,&
21 : high_print_level,&
22 : low_print_level,&
23 : medium_print_level
24 : USE cp_units, ONLY: cp_unit_to_cp2k
25 : USE input_constants, ONLY: &
26 : isokin_ensemble, langevin_ensemble, md_init_default, md_init_vib, npe_f_ensemble, &
27 : npe_i_ensemble, nph_ensemble, nph_uniaxial_damped_ensemble, nph_uniaxial_ensemble, &
28 : npt_f_ensemble, npt_i_ensemble, npt_ia_ensemble, nve_ensemble, nvt_adiabatic_ensemble, &
29 : nvt_ensemble, reftraj_ensemble
30 : USE input_cp2k_barostats, ONLY: create_barostat_section
31 : USE input_cp2k_thermostats, ONLY: create_region_section,&
32 : create_thermo_fast_section,&
33 : create_thermo_slow_section,&
34 : create_thermostat_section
35 : USE input_keyword_types, ONLY: keyword_create,&
36 : keyword_release,&
37 : keyword_type
38 : USE input_section_types, ONLY: section_add_keyword,&
39 : section_add_subsection,&
40 : section_create,&
41 : section_release,&
42 : section_type
43 : USE input_val_types, ONLY: integer_t,&
44 : lchar_t,&
45 : real_t
46 : USE kinds, ONLY: dp
47 : USE string_utilities, ONLY: s2a
48 : #include "../base/base_uses.f90"
49 :
50 : IMPLICIT NONE
51 : PRIVATE
52 :
53 : LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
54 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_md'
55 :
56 : PUBLIC :: create_md_section
57 :
58 : CONTAINS
59 :
60 : ! **************************************************************************************************
61 : !> \brief ...
62 : !> \param section will contain the md section
63 : !> \author fawzi
64 : ! **************************************************************************************************
65 28048 : SUBROUTINE create_md_section(section)
66 : TYPE(section_type), POINTER :: section
67 :
68 : TYPE(keyword_type), POINTER :: keyword
69 : TYPE(section_type), POINTER :: subsection
70 :
71 28048 : CPASSERT(.NOT. ASSOCIATED(section))
72 : CALL section_create(section, __LOCATION__, name="MD", &
73 : description="This section defines the whole set of parameters needed perform an MD run.", &
74 28048 : n_keywords=13, n_subsections=6, repeats=.FALSE.)
75 :
76 28048 : NULLIFY (keyword, subsection)
77 : CALL keyword_create(keyword, __LOCATION__, name="ensemble", &
78 : description="The ensemble/integrator that you want to use for MD propagation", &
79 : usage="ensemble nve", &
80 : default_i_val=nve_ensemble, &
81 : enum_c_vals=s2a("NVE", "NVT", "NPT_I", "NPT_F", "MSST", "MSST_DAMPED", &
82 : "HYDROSTATICSHOCK", "ISOKIN", "REFTRAJ", "LANGEVIN", "NPE_F", &
83 : "NPE_I", "NVT_ADIABATIC", "NPT_IA"), &
84 : enum_desc=s2a("constant energy (microcanonical)", &
85 : "constant temperature and volume (canonical)", &
86 : "constant temperature and pressure using an isotropic cell", &
87 : "constant temperature and pressure using a flexible cell", &
88 : "simulate steady shock (uniaxial)", &
89 : "simulate steady shock (uniaxial) with extra viscosity", &
90 : "simulate steady shock with hydrostatic pressure", &
91 : "constant kinetic energy", &
92 : "reading frames from a file called reftraj.xyz (e.g. for property calculation)", &
93 : "langevin dynamics (constant temperature)", &
94 : "constant pressure ensemble (no thermostat)", &
95 : "constant pressure ensemble using an isotropic cell (no thermostat)", &
96 : "adiabatic dynamics in constant temperature and volume ensemble (CAFES)", &
97 : "NPT_I ensemble with frozen atoms in absolute coordinate"), &
98 : citations=(/Evans1983, VandeVondele2002, Minary2003/), &
99 : enum_i_vals=(/nve_ensemble, nvt_ensemble, npt_i_ensemble, npt_f_ensemble, &
100 : nph_uniaxial_ensemble, nph_uniaxial_damped_ensemble, nph_ensemble, isokin_ensemble, &
101 : reftraj_ensemble, langevin_ensemble, npe_f_ensemble, npe_i_ensemble, &
102 112192 : nvt_adiabatic_ensemble, npt_ia_ensemble/))
103 28048 : CALL section_add_keyword(section, keyword)
104 28048 : CALL keyword_release(keyword)
105 :
106 : CALL keyword_create(keyword, __LOCATION__, name="steps", &
107 : description="The number of MD steps to perform, counting from step_start_val. ", &
108 28048 : usage="steps 100", default_i_val=3)
109 28048 : CALL section_add_keyword(section, keyword)
110 28048 : CALL keyword_release(keyword)
111 :
112 : CALL keyword_create(keyword, __LOCATION__, name="max_steps", &
113 : description="The number of MD steps to perform, counting from step 1", &
114 28048 : usage="max_steps 100", default_i_val=1000000000)
115 28048 : CALL section_add_keyword(section, keyword)
116 28048 : CALL keyword_release(keyword)
117 :
118 : CALL keyword_create(keyword, __LOCATION__, name="timestep", &
119 : description="The length of an integration step (in case RESPA the large TIMESTEP)", &
120 : usage="timestep 1.0", default_r_val=cp_unit_to_cp2k(value=0.5_dp, unit_str="fs"), &
121 28048 : unit_str="fs")
122 28048 : CALL section_add_keyword(section, keyword)
123 28048 : CALL keyword_release(keyword)
124 :
125 : CALL keyword_create(keyword, __LOCATION__, name="step_start_val", &
126 : description="The starting step value for the MD", usage="step_start_val <integer>", &
127 28048 : default_i_val=0)
128 28048 : CALL section_add_keyword(section, keyword)
129 28048 : CALL keyword_release(keyword)
130 :
131 : CALL keyword_create(keyword, __LOCATION__, name="time_start_val", &
132 : description="The starting timer value for the MD", &
133 : usage="time_start_val <real>", default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="fs"), &
134 28048 : unit_str="fs")
135 28048 : CALL section_add_keyword(section, keyword)
136 28048 : CALL keyword_release(keyword)
137 :
138 : CALL keyword_create(keyword, __LOCATION__, name="econs_start_val", &
139 : description="The starting value of the conserved quantity", &
140 : usage="econs_start_val <real>", default_r_val=0.0_dp, &
141 28048 : unit_str="hartree")
142 28048 : CALL section_add_keyword(section, keyword)
143 28048 : CALL keyword_release(keyword)
144 :
145 : CALL keyword_create(keyword, __LOCATION__, name="temperature", &
146 : description="The temperature in K used to initialize "// &
147 : "the velocities with init and pos restart, and in the NPT/NVT simulations", &
148 : usage="temperature 325.0", default_r_val=cp_unit_to_cp2k(value=300.0_dp, unit_str="K"), &
149 28048 : unit_str="K")
150 28048 : CALL section_add_keyword(section, keyword)
151 28048 : CALL keyword_release(keyword)
152 :
153 : CALL keyword_create(keyword, __LOCATION__, name="temp_tol", &
154 : variants=s2a("temp_to", "temperature_tolerance"), &
155 : description="The maximum accepted deviation of the (global) temperature"// &
156 : "from the desired target temperature before a rescaling of the velocites "// &
157 : "is performed. If it is 0 no rescaling is performed. NOTE: This keyword is "// &
158 : "obsolescent; Using a CSVR thermostat with a short timeconstant is "// &
159 : "recommended as a better alternative.", &
160 28048 : usage="temp_tol 0.0", default_r_val=0.0_dp, unit_str='K')
161 28048 : CALL section_add_keyword(section, keyword)
162 28048 : CALL keyword_release(keyword)
163 :
164 : CALL keyword_create(keyword, __LOCATION__, name="temp_kind", &
165 : description="Compute the temperature per each kind separately", &
166 : usage="temp_kind LOGICAL", &
167 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
168 28048 : CALL section_add_keyword(section, keyword)
169 28048 : CALL keyword_release(keyword)
170 :
171 : CALL keyword_create(keyword, __LOCATION__, name="scale_temp_kind", &
172 : description="When necessary rescale the temperature per each kind separately", &
173 : usage="scale_temp_kind LOGICAL", &
174 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
175 28048 : CALL section_add_keyword(section, keyword)
176 28048 : CALL keyword_release(keyword)
177 :
178 : CALL keyword_create(keyword, __LOCATION__, name="comvel_tol", &
179 : description="The maximum accepted velocity of the center of mass. "// &
180 : "With Shell-Model, comvel may drift if MD%THERMOSTAT%REGION /= GLOBAL ", &
181 28048 : usage="comvel_tol 0.1", type_of_var=real_t, n_var=1, unit_str="bohr*au_t^-1")
182 28048 : CALL section_add_keyword(section, keyword)
183 28048 : CALL keyword_release(keyword)
184 :
185 : CALL keyword_create(keyword, __LOCATION__, name="angvel_tol", &
186 : description="The maximum accepted angular velocity. This option is ignored "// &
187 : "when the system is periodic. Removes the components of the velocities that"// &
188 : "project on the external rotational degrees of freedom.", &
189 28048 : usage="angvel_tol 0.1", type_of_var=real_t, n_var=1, unit_str="bohr*au_t^-1")
190 28048 : CALL section_add_keyword(section, keyword)
191 28048 : CALL keyword_release(keyword)
192 :
193 : CALL keyword_create(keyword, __LOCATION__, name="angvel_zero", &
194 : description="Set the initial angular velocity to zero. This option is ignored "// &
195 : "when the system is periodic or when initial velocities are defined. Technically, "// &
196 : "the part of the random initial velocities that projects on the external "// &
197 : "rotational degrees of freedom is subtracted.", &
198 : usage="angvel_zero LOGICAL", &
199 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
200 28048 : CALL section_add_keyword(section, keyword)
201 28048 : CALL keyword_release(keyword)
202 :
203 : CALL keyword_create(keyword, __LOCATION__, name="ANNEALING", &
204 : description="Specifies the rescaling factor for annealing velocities. "// &
205 : "Automatically enables the annealing procedure. This scheme works only for ensembles "// &
206 : "that do not have thermostats on particles.", &
207 28048 : usage="annealing <REAL>", default_r_val=1.0_dp)
208 28048 : CALL section_add_keyword(section, keyword)
209 28048 : CALL keyword_release(keyword)
210 :
211 : CALL keyword_create(keyword, __LOCATION__, name="ANNEALING_CELL", &
212 : description="Specifies the rescaling factor for annealing velocities of the CELL "// &
213 : "Automatically enables the annealing procedure for the CELL. This scheme works only "// &
214 : "for ensambles that do not have thermostat on CELLS velocities.", &
215 28048 : usage="ANNEALING_CELL <REAL>", default_r_val=1.0_dp)
216 28048 : CALL section_add_keyword(section, keyword)
217 28048 : CALL keyword_release(keyword)
218 :
219 : CALL keyword_create(keyword, __LOCATION__, name="TEMPERATURE_ANNEALING", &
220 : description="Specifies the rescaling factor for the external temperature."// &
221 : "This scheme works only for the Langevin ensemble.", &
222 28048 : usage="TEMPERATURE_ANNEALING <REAL>", default_r_val=1.0_dp)
223 28048 : CALL section_add_keyword(section, keyword)
224 28048 : CALL keyword_release(keyword)
225 :
226 : CALL keyword_create(keyword, __LOCATION__, name="DISPLACEMENT_TOL", &
227 : description="This keyword sets a maximum atomic displacement "// &
228 : " in each Cartesian direction."// &
229 : "The maximum velocity is evaluated and if it is too large to remain"// &
230 : "within the assigned limit, the time step is rescaled accordingly,"// &
231 : "and the first half step of the velocity verlet is repeated.", &
232 : usage="DISPLACEMENT_TOL <REAL>", default_r_val=100.0_dp, &
233 28048 : unit_str='angstrom')
234 28048 : CALL section_add_keyword(section, keyword)
235 28048 : CALL keyword_release(keyword)
236 :
237 : CALL keyword_create(keyword, __LOCATION__, name="INITIALIZATION_METHOD", &
238 : description="This keyword selects which method to use to initialize MD. "// &
239 : "If velecities are not set explicitly, DEFAULT optioin will assign "// &
240 : "random velocities and then scale according to TEMPERATURE; VIBRATIONAL "// &
241 : "option will then use previously calculated vibrational modes to "// &
242 : "initialise both the atomic positions and velocities so that the "// &
243 : "starting point for MD is as close to canonical ensemble as possible, "// &
244 : "without the need for lengthy equilibration steps. See PRL 96, 115504 "// &
245 : "(2006). The user input atomic positions in this case are expected to "// &
246 : "be already geometry optimised. Further options for VIBRATIONAL mode "// &
247 : "is can be set in INITIAL_VIBRATION subsection. If unspecified, then "// &
248 : "the DEFAULT mode will be used.", &
249 : usage="INITIALIZATION_METHOD DEFAULT", &
250 : default_i_val=md_init_default, &
251 : enum_c_vals=s2a("DEFAULT", "VIBRATIONAL"), &
252 : enum_desc=s2a("Assign random velocities and then scale according to "// &
253 : "TEMPERATURE", &
254 : "Initialise positions and velocities to give canonical ensemble "// &
255 : "with TEMPERATURE, using the method described in PRL 96, 115504 (2006)"), &
256 28048 : enum_i_vals=(/md_init_default, md_init_vib/))
257 28048 : CALL section_add_keyword(section, keyword)
258 28048 : CALL keyword_release(keyword)
259 :
260 28048 : CALL create_langevin_section(subsection)
261 28048 : CALL section_add_subsection(section, subsection)
262 28048 : CALL section_release(subsection)
263 :
264 28048 : CALL create_msst_section(subsection)
265 28048 : CALL section_add_subsection(section, subsection)
266 28048 : CALL section_release(subsection)
267 :
268 28048 : CALL create_barostat_section(subsection)
269 28048 : CALL section_add_subsection(section, subsection)
270 28048 : CALL section_release(subsection)
271 :
272 28048 : CALL create_thermostat_section(subsection)
273 28048 : CALL section_add_subsection(section, subsection)
274 28048 : CALL section_release(subsection)
275 :
276 28048 : CALL create_respa_section(subsection)
277 28048 : CALL section_add_subsection(section, subsection)
278 28048 : CALL section_release(subsection)
279 :
280 28048 : CALL create_shell_section(subsection)
281 28048 : CALL section_add_subsection(section, subsection)
282 28048 : CALL section_release(subsection)
283 :
284 28048 : CALL create_adiabatic_section(subsection)
285 28048 : CALL section_add_subsection(section, subsection)
286 28048 : CALL section_release(subsection)
287 :
288 28048 : CALL create_softening_section(subsection)
289 28048 : CALL section_add_subsection(section, subsection)
290 28048 : CALL section_release(subsection)
291 :
292 28048 : CALL create_reftraj_section(subsection)
293 28048 : CALL section_add_subsection(section, subsection)
294 28048 : CALL section_release(subsection)
295 :
296 28048 : CALL create_avgs_section(subsection)
297 28048 : CALL section_add_subsection(section, subsection)
298 28048 : CALL section_release(subsection)
299 :
300 28048 : CALL create_thermal_region_section(subsection)
301 28048 : CALL section_add_subsection(section, subsection)
302 28048 : CALL section_release(subsection)
303 :
304 28048 : CALL create_md_print_section(subsection)
305 28048 : CALL section_add_subsection(section, subsection)
306 28048 : CALL section_release(subsection)
307 :
308 28048 : CALL create_cascade_section(subsection)
309 28048 : CALL section_add_subsection(section, subsection)
310 28048 : CALL section_release(subsection)
311 :
312 28048 : CALL create_vib_init_section(subsection)
313 28048 : CALL section_add_subsection(section, subsection)
314 28048 : CALL section_release(subsection)
315 :
316 28048 : END SUBROUTINE create_md_section
317 :
318 : ! **************************************************************************************************
319 : !> \brief Defines LANGEVIN section
320 : !> \param section ...
321 : !> \author teo
322 : ! **************************************************************************************************
323 28048 : SUBROUTINE create_langevin_section(section)
324 : TYPE(section_type), POINTER :: section
325 :
326 : TYPE(keyword_type), POINTER :: keyword
327 :
328 28048 : CPASSERT(.NOT. ASSOCIATED(section))
329 : CALL section_create(section, __LOCATION__, name="Langevin", &
330 : description="Controls the set of parameters to run a Langevin MD. "// &
331 : "The integrator used follows that given in the article by Ricci et al. "// &
332 : "The user can define regions in the system where the atoms inside "// &
333 : "undergoes Langevin MD, while those outside the regions undergoes "// &
334 : "NVE Born Oppenheimer MD. To define the regions, the user should "// &
335 : "use THERMAL_REGION subsection of MOTION%MD. ", &
336 : citations=(/Ricci2003, Kuhne2007, Rengaraj2020/), &
337 112192 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
338 28048 : NULLIFY (keyword)
339 :
340 : CALL keyword_create(keyword, __LOCATION__, name="gamma", &
341 : description="Gamma parameter for the Langevin dynamics (LD)", &
342 : usage="gamma 0.001", &
343 28048 : default_r_val=0.0_dp, unit_str='fs^-1')
344 28048 : CALL section_add_keyword(section, keyword)
345 28048 : CALL keyword_release(keyword)
346 :
347 : CALL keyword_create(keyword, __LOCATION__, name="Noisy_Gamma", &
348 : variants=(/"NoisyGamma"/), &
349 : description="Imaginary Langevin Friction term for LD with noisy forces.", &
350 : citations=(/Kuhne2007/), &
351 84144 : usage="Noisy_Gamma 4.0E-5", default_r_val=0.0_dp, unit_str='fs^-1')
352 28048 : CALL section_add_keyword(section, keyword)
353 28048 : CALL keyword_release(keyword)
354 :
355 : CALL keyword_create(keyword, __LOCATION__, name="Shadow_Gamma", &
356 : variants=(/"ShadowGamma"/), &
357 : description="Shadow Langevin Friction term for LD with noisy forces in order to adjust Noisy_Gamma.", &
358 : citations=(/Rengaraj2020/), &
359 84144 : usage="Shadow_Gamma 0.001", default_r_val=0.0_dp, unit_str='fs^-1')
360 28048 : CALL section_add_keyword(section, keyword)
361 28048 : CALL keyword_release(keyword)
362 28048 : END SUBROUTINE create_langevin_section
363 :
364 : ! **************************************************************************************************
365 : !> \brief Defines print section for MD
366 : !> \param section ...
367 : !> \author teo
368 : ! **************************************************************************************************
369 28048 : SUBROUTINE create_md_print_section(section)
370 : TYPE(section_type), POINTER :: section
371 :
372 : TYPE(keyword_type), POINTER :: keyword
373 : TYPE(section_type), POINTER :: print_key
374 :
375 28048 : CPASSERT(.NOT. ASSOCIATED(section))
376 : CALL section_create(section, __LOCATION__, name="print", &
377 : description="Controls the printing properties during an MD run", &
378 28048 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
379 28048 : NULLIFY (print_key, keyword)
380 :
381 : CALL keyword_create(keyword, __LOCATION__, name="FORCE_LAST", &
382 : description="Print the output and restart file if walltime is reached or "// &
383 : "if an external EXIT command is given. It still requires the keyword LAST "// &
384 : "to be present for the specific print key (in case the last step should not "// &
385 : "match with the print_key iteration number).", &
386 : usage="FORCE_LAST LOGICAL", &
387 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
388 28048 : CALL section_add_keyword(section, keyword)
389 28048 : CALL keyword_release(keyword)
390 :
391 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY", &
392 : description="Controls the output the ener file", &
393 : print_level=low_print_level, common_iter_levels=1, &
394 28048 : filename="")
395 28048 : CALL section_add_subsection(section, print_key)
396 28048 : CALL section_release(print_key)
397 :
398 : CALL cp_print_key_section_create(print_key, __LOCATION__, "SHELL_ENERGY", &
399 : description="Controls the output of the shell-energy file (only if shell-model)", &
400 : print_level=medium_print_level, common_iter_levels=1, &
401 28048 : filename="")
402 28048 : CALL section_add_subsection(section, print_key)
403 28048 : CALL section_release(print_key)
404 :
405 : CALL cp_print_key_section_create(print_key, __LOCATION__, "TEMP_KIND", &
406 : description="Controls the output of the temperature"// &
407 : " computed separately for each kind", &
408 : print_level=high_print_level, common_iter_levels=1, &
409 28048 : filename="")
410 28048 : CALL section_add_subsection(section, print_key)
411 28048 : CALL section_release(print_key)
412 :
413 : CALL cp_print_key_section_create(print_key, __LOCATION__, "TEMP_SHELL_KIND", &
414 : description="Controls the output of the temperature of the"// &
415 : " shell-core motion computed separately for each kind", &
416 : print_level=high_print_level, common_iter_levels=1, &
417 28048 : filename="")
418 28048 : CALL section_add_subsection(section, print_key)
419 28048 : CALL section_release(print_key)
420 :
421 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTER_OF_MASS", &
422 : description="Controls the printing of COM velocity during an MD", &
423 : print_level=medium_print_level, common_iter_levels=1, &
424 28048 : filename="__STD_OUT__")
425 28048 : CALL section_add_subsection(section, print_key)
426 28048 : CALL section_release(print_key)
427 :
428 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COEFFICIENTS", &
429 : description="Controls the printing of coefficients during an MD run.", &
430 : print_level=medium_print_level, common_iter_levels=1, &
431 28048 : filename="")
432 28048 : CALL section_add_subsection(section, print_key)
433 28048 : CALL section_release(print_key)
434 :
435 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ROTATIONAL_INFO", &
436 : description="Controls the printing basic info during the calculation of the "// &
437 : "translational/rotational degrees of freedom.", print_level=low_print_level, &
438 28048 : add_last=add_last_numeric, filename="__STD_OUT__")
439 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATES", &
440 : description="Prints atomic coordinates in the standard orientation. "// &
441 : "Coordinates are not affected during the calculation.", &
442 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
443 28048 : CALL section_add_keyword(print_key, keyword)
444 28048 : CALL keyword_release(keyword)
445 28048 : CALL section_add_subsection(section, print_key)
446 28048 : CALL section_release(print_key)
447 :
448 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
449 : description="Controls the printing of basic and summary information during the"// &
450 : " Molecular Dynamics", &
451 28048 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
452 28048 : CALL section_add_subsection(section, print_key)
453 28048 : CALL section_release(print_key)
454 28048 : END SUBROUTINE create_md_print_section
455 :
456 : ! **************************************************************************************************
457 : !> \brief Defines parameters for RESPA integration scheme
458 : !> \param section will contain the coeff section
459 : !> \author teo
460 : ! **************************************************************************************************
461 28048 : SUBROUTINE create_respa_section(section)
462 : TYPE(section_type), POINTER :: section
463 :
464 : TYPE(keyword_type), POINTER :: keyword
465 :
466 28048 : CPASSERT(.NOT. ASSOCIATED(section))
467 :
468 : CALL section_create(section, __LOCATION__, name="RESPA", &
469 : description="Multiple timestep integration based on RESPA (implemented for NVE only)."// &
470 : " RESPA exploits multiple force_eval."// &
471 : " In this case the order of the force_eval maps "// &
472 : " the order of the respa shells from the slowest to the fastest force evaluation."// &
473 : " If force_evals share the same subsys, it's enough then to specify the "// &
474 : " subsys in the force_eval corresponding at the first index in the multiple_force_eval list."// &
475 : " Can be used to speedup classical and ab initio MD simulations.", &
476 : n_keywords=1, n_subsections=0, repeats=.FALSE., &
477 84144 : citations=(/Tuckerman1992, Guidon2008/))
478 :
479 28048 : NULLIFY (keyword)
480 : CALL keyword_create(keyword, __LOCATION__, name="FREQUENCY", &
481 : description="The number of reference MD steps between two RESPA corrections.", &
482 28048 : usage="FREQUENCY <INTEGER>", default_i_val=5)
483 28048 : CALL section_add_keyword(section, keyword)
484 28048 : CALL keyword_release(keyword)
485 :
486 28048 : END SUBROUTINE create_respa_section
487 :
488 : ! **************************************************************************************************
489 : !> \brief Defines parameters for REFTRAJ analysis
490 : !> \param section will contain the coeff section
491 : !> \author teo
492 : ! **************************************************************************************************
493 28048 : SUBROUTINE create_reftraj_section(section)
494 : TYPE(section_type), POINTER :: section
495 :
496 : TYPE(keyword_type), POINTER :: keyword
497 : TYPE(section_type), POINTER :: print_key, subsection
498 :
499 28048 : CPASSERT(.NOT. ASSOCIATED(section))
500 :
501 : CALL section_create(section, __LOCATION__, name="REFTRAJ", &
502 : description="Loads an external trajectory file and performs analysis on the"// &
503 : " loaded snapshots.", &
504 28048 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
505 :
506 28048 : NULLIFY (keyword, print_key, subsection)
507 :
508 : CALL keyword_create(keyword, __LOCATION__, name="TRAJ_FILE_NAME", &
509 : description="Specify the filename where the trajectory is stored. "// &
510 : "If you built your own trajectory file make sure it has the trajectory format. "// &
511 : 'In particular, each structure has to be enumerated using " i = ..."', &
512 : repeats=.FALSE., &
513 28048 : usage="TRAJ_FILE_NAME <CHARACTER>", default_lc_val="reftraj.xyz")
514 28048 : CALL section_add_keyword(section, keyword)
515 28048 : CALL keyword_release(keyword)
516 :
517 : CALL keyword_create(keyword, __LOCATION__, name="CELL_FILE_NAME", &
518 : description="Specify the filename where the cell is stored "// &
519 : "(for trajectories generated within variable cell ensembles).", repeats=.FALSE., &
520 28048 : usage="CELL_FILE_NAME <CHARACTER>", default_lc_val="reftraj.cell")
521 28048 : CALL section_add_keyword(section, keyword)
522 28048 : CALL keyword_release(keyword)
523 :
524 : CALL keyword_create( &
525 : keyword, __LOCATION__, name="VARIABLE_VOLUME", &
526 : description="Enables the possibility to read a CELL file with information on the CELL size during the MD.", &
527 28048 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
528 28048 : CALL section_add_keyword(section, keyword)
529 28048 : CALL keyword_release(keyword)
530 :
531 : CALL keyword_create(keyword, __LOCATION__, name="FIRST_SNAPSHOT", &
532 : description="Index of the snapshot stored in the trajectory file "// &
533 : "from which to start a REFTRAJ run", &
534 28048 : repeats=.FALSE., usage="FIRST_SNAPSHOT <INTEGER>", default_i_val=1)
535 28048 : CALL section_add_keyword(section, keyword)
536 28048 : CALL keyword_release(keyword)
537 :
538 : CALL keyword_create(keyword, __LOCATION__, name="LAST_SNAPSHOT", &
539 : description="Index of the last snapshot stored in the trajectory file "// &
540 : "that is read along a REFTRAJ run. Must be specified as default is 0. "// &
541 : "Must be specified exactly as LAST_SNAPSHOT = FIRST_SNAPSHOT + STRIDE*(number of strides) "// &
542 : "to avoid an error 'Unexpected EOF'. Note that STRIDE*(number of strides) "// &
543 : "is simply the number of steps between the first to last snapshot.", &
544 28048 : repeats=.FALSE., usage="LAST_SNAPSHOT", default_i_val=0)
545 28048 : CALL section_add_keyword(section, keyword)
546 28048 : CALL keyword_release(keyword)
547 :
548 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
549 : description=" Stride in number of snapshot for the reftraj analysis", &
550 28048 : repeats=.FALSE., usage="STRIDE", default_i_val=1)
551 28048 : CALL section_add_keyword(section, keyword)
552 28048 : CALL keyword_release(keyword)
553 :
554 : CALL keyword_create(keyword, __LOCATION__, name="eval_energy_forces", &
555 : description="Evaluate energy and forces for each retrieved snapshot during a REFTRAJ run", &
556 28048 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
557 28048 : CALL section_add_keyword(section, keyword)
558 28048 : CALL keyword_release(keyword)
559 :
560 : CALL keyword_create(keyword, __LOCATION__, name="eval_forces", &
561 : description="Evaluate the forces for each retrieved snapshot during a REFTRAJ run", &
562 28048 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
563 28048 : CALL section_add_keyword(section, keyword)
564 28048 : CALL keyword_release(keyword)
565 :
566 28048 : CALL create_msd_section(subsection)
567 28048 : CALL section_add_subsection(section, subsection)
568 28048 : CALL section_release(subsection)
569 :
570 : CALL section_create(subsection, __LOCATION__, name="print", &
571 : description="The section that controls the output of a reftraj run", &
572 28048 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
573 :
574 28048 : NULLIFY (print_key)
575 : CALL cp_print_key_section_create(print_key, __LOCATION__, "msd_kind", &
576 : description="Controls the output of msd per kind", &
577 : print_level=low_print_level, common_iter_levels=1, &
578 28048 : filename="")
579 28048 : CALL section_add_subsection(subsection, print_key)
580 28048 : CALL section_release(print_key)
581 :
582 : CALL cp_print_key_section_create(print_key, __LOCATION__, "msd_molecule", &
583 : description="Controls the output of msd per molecule kind", &
584 : print_level=low_print_level, common_iter_levels=1, &
585 28048 : filename="")
586 28048 : CALL section_add_subsection(subsection, print_key)
587 28048 : CALL section_release(print_key)
588 :
589 : CALL cp_print_key_section_create(print_key, __LOCATION__, "displaced_atom", &
590 : description="Controls the output of index and dislacement of "// &
591 : "atoms that moved away from the initial position of more than a"// &
592 : "given distance (see msd%disp_tol)", &
593 : print_level=low_print_level, common_iter_levels=1, &
594 28048 : filename="")
595 28048 : CALL section_add_subsection(subsection, print_key)
596 28048 : CALL section_release(print_key)
597 :
598 28048 : CALL section_add_subsection(section, subsection)
599 28048 : CALL section_release(subsection)
600 :
601 28048 : END SUBROUTINE create_reftraj_section
602 :
603 : ! **************************************************************************************************
604 : !> \brief Defines parameters for MSD calculation along a REFTRAJ analysis
605 : !> \param section will contain the coeff section
606 : !> \author MI
607 : ! **************************************************************************************************
608 28048 : SUBROUTINE create_msd_section(section)
609 : TYPE(section_type), POINTER :: section
610 :
611 : TYPE(keyword_type), POINTER :: keyword
612 : TYPE(section_type), POINTER :: subsection
613 :
614 28048 : CPASSERT(.NOT. ASSOCIATED(section))
615 :
616 : CALL section_create(section, __LOCATION__, name="MSD", &
617 : description="Loads an external trajectory file and performs analysis on the"// &
618 : " loaded snapshots.", &
619 28048 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
620 :
621 28048 : NULLIFY (keyword, subsection)
622 :
623 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
624 : description="controls the activation of core-level spectroscopy simulations", &
625 : usage="&MSD T", &
626 : default_l_val=.FALSE., &
627 28048 : lone_keyword_l_val=.TRUE.)
628 28048 : CALL section_add_keyword(section, keyword)
629 28048 : CALL keyword_release(keyword)
630 :
631 : CALL keyword_create(keyword, __LOCATION__, name="REF0_FILENAME", &
632 : description="Specify the filename where the initial reference configuration is stored.", &
633 28048 : repeats=.FALSE., usage="REF0_FILENAME <CHARACTER>", default_lc_val="")
634 28048 : CALL section_add_keyword(section, keyword)
635 28048 : CALL keyword_release(keyword)
636 :
637 : CALL keyword_create(keyword, __LOCATION__, name="MSD_PER_KIND", &
638 : description="Set up the calculation of the MSD for each atomic kind", &
639 : usage="MSD_PER_KIND <LOGICAL>", repeats=.FALSE., &
640 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
641 28048 : CALL section_add_keyword(section, keyword)
642 28048 : CALL keyword_release(keyword)
643 :
644 : CALL keyword_create(keyword, __LOCATION__, name="MSD_PER_MOLKIND", &
645 : description="Set up the calculation of the MSD for each molecule kind."// &
646 : "The position of the center of mass of the molecule is considered.", &
647 : usage="MSD_PER_MOLKIND <LOGICAL>", repeats=.FALSE., &
648 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
649 28048 : CALL section_add_keyword(section, keyword)
650 28048 : CALL keyword_release(keyword)
651 :
652 : CALL keyword_create(keyword, __LOCATION__, name="MSD_PER_REGION", &
653 : description="Set up the calculation of the MSD for each defined region.", &
654 : usage="MSD_PER_REGION <LOGICAL>", repeats=.FALSE., &
655 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
656 28048 : CALL section_add_keyword(section, keyword)
657 28048 : CALL keyword_release(keyword)
658 :
659 28048 : CALL create_region_section(subsection, "MSD calculation")
660 28048 : CALL section_add_subsection(section, subsection)
661 28048 : CALL section_release(subsection)
662 :
663 : CALL keyword_create(keyword, __LOCATION__, name="DISPLACED_ATOM", &
664 : description="Identify the atoms that moved from their initial"// &
665 : "position of a distance larger than a given tolerance (see msd%displacement_tol).", &
666 : usage="DISPLACED_ATOM <LOGICAL>", repeats=.FALSE., &
667 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
668 28048 : CALL section_add_keyword(section, keyword)
669 28048 : CALL keyword_release(keyword)
670 :
671 : CALL keyword_create(keyword, __LOCATION__, name="displacement_tol", &
672 : description="Lower limit to define displaced atoms", &
673 : usage="DISPLACEMENT_TOL real", &
674 28048 : default_r_val=0._dp, n_var=1, unit_str='bohr')
675 28048 : CALL section_add_keyword(section, keyword)
676 28048 : CALL keyword_release(keyword)
677 :
678 28048 : END SUBROUTINE create_msd_section
679 :
680 : ! **************************************************************************************************
681 : !> \brief ...
682 : !> \param section will contain the coeff section
683 : !> \author teo
684 : ! **************************************************************************************************
685 28048 : SUBROUTINE create_msst_section(section)
686 : TYPE(section_type), POINTER :: section
687 :
688 : TYPE(keyword_type), POINTER :: keyword
689 :
690 28048 : CPASSERT(.NOT. ASSOCIATED(section))
691 :
692 : CALL section_create(section, __LOCATION__, name="msst", &
693 : description="Parameters for Multi-Scale Shock Technique (MSST) "// &
694 : "which simulate the effect of a steady planar shock on a unit cell. "// &
695 : "Reed et. al. Physical Review Letters 90, 235503 (2003).", &
696 28048 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
697 :
698 28048 : NULLIFY (keyword)
699 : CALL keyword_create(keyword, __LOCATION__, name="PRESSURE", &
700 : description="Initial pressure", &
701 : usage="PRESSURE real", &
702 28048 : default_r_val=0._dp, n_var=1, unit_str='bar')
703 28048 : CALL section_add_keyword(section, keyword)
704 28048 : CALL keyword_release(keyword)
705 :
706 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY", &
707 : description="Initial energy", &
708 : usage="ENERGY real", &
709 28048 : default_r_val=0._dp, n_var=1, unit_str='hartree')
710 28048 : CALL section_add_keyword(section, keyword)
711 28048 : CALL keyword_release(keyword)
712 :
713 : CALL keyword_create(keyword, __LOCATION__, name="VOLUME", &
714 : description="Initial volume", &
715 : usage="VOLUME real", &
716 28048 : default_r_val=0._dp, n_var=1, unit_str='angstrom^3')
717 28048 : CALL section_add_keyword(section, keyword)
718 28048 : CALL keyword_release(keyword)
719 :
720 : CALL keyword_create(keyword, __LOCATION__, name="CMASS", &
721 : description="Effective cell mass", &
722 : usage="CMASS real", &
723 28048 : default_r_val=0._dp, n_var=1, unit_str='au_m')
724 28048 : CALL section_add_keyword(section, keyword)
725 28048 : CALL keyword_release(keyword)
726 :
727 : CALL keyword_create(keyword, __LOCATION__, name="VSHOCK", variants=(/"V_SHOCK"/), &
728 : description="Velocity shock", &
729 : usage="VSHOCK real", &
730 56096 : default_r_val=0._dp, n_var=1, unit_str='m/s')
731 28048 : CALL section_add_keyword(section, keyword)
732 28048 : CALL keyword_release(keyword)
733 :
734 : CALL keyword_create(keyword, __LOCATION__, name="GAMMA", &
735 : description="Damping coefficient for cell volume", &
736 : usage="GAMMA real", &
737 : unit_str='fs^-1', &
738 28048 : default_r_val=0.0_dp)
739 28048 : CALL section_add_keyword(section, keyword)
740 28048 : CALL keyword_release(keyword)
741 :
742 28048 : END SUBROUTINE create_msst_section
743 :
744 : ! **************************************************************************************************
745 : !> \brief section will contain some parameters for the shells dynamics
746 : !> \param section ...
747 : ! **************************************************************************************************
748 28048 : SUBROUTINE create_shell_section(section)
749 : TYPE(section_type), POINTER :: section
750 :
751 : TYPE(keyword_type), POINTER :: keyword
752 : TYPE(section_type), POINTER :: thermo_section
753 :
754 28048 : CPASSERT(.NOT. ASSOCIATED(section))
755 :
756 : CALL section_create(section, __LOCATION__, name="shell", &
757 : description="Parameters of shell model in adiabatic dynamics.", &
758 28048 : n_keywords=4, n_subsections=1, repeats=.FALSE.)
759 :
760 28048 : NULLIFY (keyword, thermo_section)
761 :
762 : CALL keyword_create(keyword, __LOCATION__, name="temperature", &
763 : description="Temperature in K used to control "// &
764 : "the internal velocities of the core-shell motion ", &
765 : usage="temperature 5.0", &
766 : default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
767 28048 : unit_str="K")
768 28048 : CALL section_add_keyword(section, keyword)
769 28048 : CALL keyword_release(keyword)
770 :
771 : CALL keyword_create(keyword, __LOCATION__, name="temp_tol", &
772 : description="Maximum accepted temperature deviation"// &
773 : " from the expected value, for the internal core-shell motion."// &
774 : "If 0, no rescaling is performed", &
775 28048 : usage="temp_tol 0.0", default_r_val=0.0_dp, unit_str='K')
776 28048 : CALL section_add_keyword(section, keyword)
777 28048 : CALL keyword_release(keyword)
778 :
779 : CALL keyword_create(keyword, __LOCATION__, name="nose_particle", &
780 : description="If nvt or npt, the core and shell velocities are controlled "// &
781 : "by the same thermostat used for the particle. This might favour heat exchange "// &
782 : "and additional rescaling of the internal core-shell velocity is needed (TEMP_TOL)", &
783 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
784 28048 : CALL section_add_keyword(section, keyword)
785 28048 : CALL keyword_release(keyword)
786 :
787 : CALL keyword_create(keyword, __LOCATION__, name="DISPLACEMENT_SHELL_TOL", &
788 : description="This keyword sets a maximum variation of the shell "// &
789 : "core distance in each Cartesian direction."// &
790 : "The maximum internal core-shell velocity is evaluated and"// &
791 : " if it is too large to remain"// &
792 : "within the assigned limit, the time step is rescaled accordingly,"// &
793 : "and the first half step of the velocity verlet is repeated.", &
794 : usage="DISPLACEMENT_SHELL_TOL <REAL>", default_r_val=100.0_dp, &
795 28048 : unit_str='angstrom')
796 28048 : CALL section_add_keyword(section, keyword)
797 28048 : CALL keyword_release(keyword)
798 :
799 28048 : CALL create_thermostat_section(thermo_section)
800 28048 : CALL section_add_subsection(section, thermo_section)
801 28048 : CALL section_release(thermo_section)
802 :
803 28048 : END SUBROUTINE create_shell_section
804 :
805 : ! **************************************************************************************************
806 : !> \brief section will contain some parameters for the adiabatic dynamics
807 : !> \param section ...
808 : ! **************************************************************************************************
809 28048 : SUBROUTINE create_adiabatic_section(section)
810 : TYPE(section_type), POINTER :: section
811 :
812 : TYPE(keyword_type), POINTER :: keyword
813 : TYPE(section_type), POINTER :: thermo_fast_section, thermo_slow_section
814 :
815 28048 : CPASSERT(.NOT. ASSOCIATED(section))
816 :
817 : CALL section_create(section, __LOCATION__, name="ADIABATIC_DYNAMICS", &
818 : description="Parameters used in canonical adiabatic free energy sampling (CAFES).", &
819 : n_keywords=5, n_subsections=2, repeats=.FALSE., &
820 56096 : citations=(/VandeVondele2002/))
821 :
822 28048 : NULLIFY (keyword, thermo_fast_section, thermo_slow_section)
823 :
824 : CALL keyword_create(keyword, __LOCATION__, name="temp_fast", &
825 : description="Temperature in K used to control "// &
826 : "the fast degrees of freedom ", &
827 : usage="temp_fast 5.0", &
828 : default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
829 28048 : unit_str="K")
830 28048 : CALL section_add_keyword(section, keyword)
831 28048 : CALL keyword_release(keyword)
832 :
833 : CALL keyword_create(keyword, __LOCATION__, name="temp_slow", &
834 : description="Temperature in K used to control "// &
835 : "the slow degrees of freedom ", &
836 : usage="temp_slow 5.0", &
837 : default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
838 28048 : unit_str="K")
839 28048 : CALL section_add_keyword(section, keyword)
840 28048 : CALL keyword_release(keyword)
841 :
842 : CALL keyword_create(keyword, __LOCATION__, name="temp_tol_fast", &
843 : description="Maximum accepted temperature deviation"// &
844 : " from the expected value, for the fast motion."// &
845 : "If 0, no rescaling is performed", &
846 28048 : usage="temp_tol 0.0", default_r_val=0.0_dp, unit_str='K')
847 28048 : CALL section_add_keyword(section, keyword)
848 28048 : CALL keyword_release(keyword)
849 :
850 : CALL keyword_create(keyword, __LOCATION__, name="temp_tol_slow", &
851 : description="Maximum accepted temperature deviation"// &
852 : " from the expected value, for the slow motion."// &
853 : "If 0, no rescaling is performed", &
854 28048 : usage="temp_tol 0.0", default_r_val=0.0_dp, unit_str='K')
855 28048 : CALL section_add_keyword(section, keyword)
856 28048 : CALL keyword_release(keyword)
857 :
858 : CALL keyword_create(keyword, __LOCATION__, name="n_resp_fast", &
859 : description="number of respa steps for fast degrees of freedom", &
860 28048 : repeats=.FALSE., default_i_val=1)
861 28048 : CALL section_add_keyword(section, keyword)
862 28048 : CALL keyword_release(keyword)
863 :
864 28048 : CALL create_thermo_fast_section(thermo_fast_section)
865 28048 : CALL section_add_subsection(section, thermo_fast_section)
866 28048 : CALL section_release(thermo_fast_section)
867 :
868 28048 : CALL create_thermo_slow_section(thermo_slow_section)
869 28048 : CALL section_add_subsection(section, thermo_slow_section)
870 28048 : CALL section_release(thermo_slow_section)
871 :
872 28048 : END SUBROUTINE create_adiabatic_section
873 :
874 : ! **************************************************************************************************
875 : !> \brief section will contain parameters for the velocity softening
876 : !> \param section ...
877 : !> \author Ole Schuett
878 : ! **************************************************************************************************
879 28048 : SUBROUTINE create_softening_section(section)
880 : TYPE(section_type), POINTER :: section
881 :
882 : TYPE(keyword_type), POINTER :: keyword
883 :
884 : CALL section_create(section, __LOCATION__, name="VELOCITY_SOFTENING", &
885 : description="A method to initialize the velocities along low-curvature " &
886 : //"directions in order to favors MD trajectories to cross rapidly over " &
887 : //"small energy barriers into neighboring basins. " &
888 : //"In each iteration the forces are calculated at a point y, which " &
889 : //"is slightly displaced from the current positions x in the direction " &
890 : //"of the original velocities v. The velocities are then updated with " &
891 : //"the force component F_t, which is perpendicular to N. " &
892 : //"N = v / |v|; y = x + delta * N; F_t = F(y) - ⟨ F(y) | N ⟩ * N; " &
893 28048 : //"v' = v + alpha * F_t")
894 :
895 28048 : NULLIFY (keyword)
896 : CALL keyword_create(keyword, __LOCATION__, name="STEPS", &
897 : description="Number of softening iterations performed. " &
898 : //"Typical values are around 40 steps.", &
899 28048 : default_i_val=0)
900 28048 : CALL section_add_keyword(section, keyword)
901 28048 : CALL keyword_release(keyword)
902 :
903 : CALL keyword_create(keyword, __LOCATION__, name="DELTA", &
904 : description="Displacement used to obtain y.", &
905 28048 : default_r_val=0.1_dp)
906 28048 : CALL section_add_keyword(section, keyword)
907 28048 : CALL keyword_release(keyword)
908 :
909 : CALL keyword_create(keyword, __LOCATION__, name="ALPHA", &
910 : description="Mixing factor used for updating velocities.", &
911 28048 : default_r_val=0.15_dp)
912 28048 : CALL section_add_keyword(section, keyword)
913 28048 : CALL keyword_release(keyword)
914 :
915 28048 : END SUBROUTINE create_softening_section
916 :
917 : ! **************************************************************************************************
918 : !> \brief input section used to define regions with different temperature
919 : !> initialization and control
920 : !> \param section ...
921 : !> \par History
922 : !> - Added input for langevin regions in thermal regions section
923 : !> (2014/02/04, LT)
924 : ! **************************************************************************************************
925 28048 : SUBROUTINE create_thermal_region_section(section)
926 : TYPE(section_type), POINTER :: section
927 :
928 : TYPE(keyword_type), POINTER :: keyword
929 : TYPE(section_type), POINTER :: print_key, region_section, subsection
930 :
931 28048 : CPASSERT(.NOT. ASSOCIATED(section))
932 :
933 : CALL section_create(section, __LOCATION__, name="thermal_region", &
934 : description="Define regions where different initialization and control "// &
935 : "of the temperature is used. When MOTION%MD%ENSEMBLE is set to LANGEVIN, "// &
936 : "this section controls if the atoms defined inside and outside the "// &
937 : "thermal regions should undergo Langevin MD or NVE Born-Oppenheimer MD. "// &
938 : "The theory behind Langevin MD using different regions can be found in "// &
939 : "articles by Kantorovitch et al. listed below.", &
940 : citations=(/Kantorovich2008, Kantorovich2008a/), &
941 84144 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
942 :
943 28048 : NULLIFY (region_section)
944 28048 : NULLIFY (keyword, subsection)
945 :
946 : CALL keyword_create(keyword, __LOCATION__, name="force_rescaling", &
947 : description="Control the rescaling ot the velocities in all the regions, "// &
948 : "according to the temperature assigned to each reagion, when "// &
949 : "RESTART_VELOCITY in EXT_RESTART is active.", &
950 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
951 28048 : CALL section_add_keyword(section, keyword)
952 28048 : CALL keyword_release(keyword)
953 :
954 : CALL keyword_create(keyword, __LOCATION__, name="do_langevin_default", &
955 : description="If ENSEMBLE is set to LANGEVIN, controls whether the "// &
956 : "atoms NOT defined in the thermal regions to undergo langevin MD "// &
957 : "or not. If not, then the atoms will undergo NVE Born-Oppenheimer MD.", &
958 : usage="do_langevin_default .FALSE.", &
959 28048 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
960 28048 : CALL section_add_keyword(section, keyword)
961 28048 : CALL keyword_release(keyword)
962 :
963 : CALL section_create(region_section, __LOCATION__, name="DEFINE_REGION", &
964 : description="This section provides the possibility to define arbitrary region ", &
965 28048 : n_keywords=3, n_subsections=0, repeats=.TRUE.)
966 :
967 28048 : NULLIFY (keyword)
968 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
969 : description="Specifies a list of atoms belonging to the region.", &
970 : usage="LIST {integer} {integer} .. {integer}", &
971 28048 : repeats=.TRUE., n_var=-1, type_of_var=integer_t)
972 28048 : CALL section_add_keyword(region_section, keyword)
973 28048 : CALL keyword_release(keyword)
974 :
975 : CALL keyword_create(keyword, __LOCATION__, name="temperature", &
976 : description="The temperature in K used to initialize the velocities "// &
977 : "of the atoms in this region ", &
978 : usage="temperature 5.0", &
979 : default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
980 28048 : unit_str="K")
981 28048 : CALL section_add_keyword(region_section, keyword)
982 28048 : CALL keyword_release(keyword)
983 :
984 : CALL keyword_create(keyword, __LOCATION__, name="temp_tol", &
985 : description="Maximum accepted temperature deviation from the expected "// &
986 : "value for this region. If temp_tol=0 no rescaling is performed", &
987 : usage="temp_tol 0.0", &
988 28048 : default_r_val=0.0_dp, unit_str='K')
989 28048 : CALL section_add_keyword(region_section, keyword)
990 28048 : CALL keyword_release(keyword)
991 :
992 : CALL keyword_create(keyword, __LOCATION__, name="do_langevin", &
993 : description="When ENSEMBLE is set to LANGEVIN, Controls whether "// &
994 : "the atoms in the thermal region should undergo Langevin MD. If "// &
995 : "not, then they will undergo NVE Born-Oppenheimer MD.", &
996 : usage="do_langevin .TRUE.", &
997 28048 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
998 28048 : CALL section_add_keyword(region_section, keyword)
999 28048 : CALL keyword_release(keyword)
1000 :
1001 : CALL keyword_create(keyword, __LOCATION__, name="noisy_gamma_region", &
1002 : description="Special imaginary Langevin Friction term "// &
1003 : "for Langevin Dynamics with noisy forces for the atoms in this region."// &
1004 : "When set, overrides the general value set by NOISY_GAMMA in the MOTION%MD%LANGEVIN section."// &
1005 : "When unset for a defined region, the general NOISY_GAMMA value applies.", &
1006 : citations=(/Kuhne2007/), usage="noisy_gamma_region 4.0E-5", &
1007 : type_of_var=real_t, &
1008 56096 : unit_str="fs^-1")
1009 28048 : CALL section_add_keyword(region_section, keyword)
1010 28048 : CALL keyword_release(keyword)
1011 :
1012 28048 : CALL section_add_subsection(section, region_section)
1013 28048 : CALL section_release(region_section)
1014 :
1015 28048 : NULLIFY (print_key)
1016 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
1017 : description="Collects all print_keys for thermal_regions", &
1018 28048 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1019 :
1020 : CALL cp_print_key_section_create(print_key, __LOCATION__, "TEMPERATURE", &
1021 : description="Controls output of temperature per region.", &
1022 : print_level=high_print_level, common_iter_levels=1, &
1023 28048 : filename="")
1024 28048 : CALL section_add_subsection(subsection, print_key)
1025 28048 : CALL section_release(print_key)
1026 :
1027 : CALL cp_print_key_section_create(print_key, __LOCATION__, "LANGEVIN_REGIONS", &
1028 : description="Controls output of information on which atoms "// &
1029 : "underwent Langevin MD and which atoms did not.", &
1030 : print_level=high_print_level, &
1031 28048 : filename="")
1032 28048 : CALL section_add_subsection(subsection, print_key)
1033 28048 : CALL section_release(print_key)
1034 :
1035 28048 : CALL section_add_subsection(section, subsection)
1036 28048 : CALL section_release(subsection)
1037 :
1038 28048 : END SUBROUTINE create_thermal_region_section
1039 :
1040 : ! **************************************************************************************************
1041 : !> \brief Defines the parameters for the setup of a cascade simulation
1042 : !> \param section ...
1043 : !> \date 03.02.2012
1044 : !> \author Matthias Krack (MK)
1045 : !> \version 1.0
1046 : ! **************************************************************************************************
1047 28048 : SUBROUTINE create_cascade_section(section)
1048 :
1049 : TYPE(section_type), POINTER :: section
1050 :
1051 : TYPE(keyword_type), POINTER :: keyword
1052 : TYPE(section_type), POINTER :: subsection
1053 :
1054 28048 : NULLIFY (keyword)
1055 28048 : NULLIFY (subsection)
1056 28048 : CPASSERT(.NOT. ASSOCIATED(section))
1057 :
1058 : CALL section_create(section, __LOCATION__, name="CASCADE", &
1059 : description="Defines the parameters for the setup of a cascade simulation.", &
1060 : n_keywords=1, &
1061 : n_subsections=1, &
1062 28048 : repeats=.FALSE.)
1063 :
1064 : CALL keyword_create(keyword, __LOCATION__, &
1065 : name="_SECTION_PARAMETERS_", &
1066 : description="Controls the activation of the CASCADE section.", &
1067 : usage="&CASCADE on", &
1068 : default_l_val=.FALSE., &
1069 28048 : lone_keyword_l_val=.TRUE.)
1070 28048 : CALL section_add_keyword(section, keyword)
1071 28048 : CALL keyword_release(keyword)
1072 :
1073 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY", &
1074 : description="Total energy transferred to the system during the cascade event.", &
1075 : usage="ENERGY 20.0", &
1076 : default_r_val=0.0_dp, &
1077 28048 : unit_str="keV")
1078 28048 : CALL section_add_keyword(section, keyword)
1079 28048 : CALL keyword_release(keyword)
1080 :
1081 : CALL section_create(subsection, __LOCATION__, name="ATOM_LIST", &
1082 : description="Defines a list of atoms for which the initial velocities are modified", &
1083 : n_keywords=1, &
1084 : n_subsections=0, &
1085 28048 : repeats=.FALSE.)
1086 :
1087 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
1088 : description="Defines the list of atoms for which the velocities are modified. "// &
1089 : "Each record consists of the atomic index, the velocity vector, and "// &
1090 : "a weight to define which fraction of the total energy is assigned "// &
1091 : "to the current atom:"// &
1092 : "<p><tt><big>Atomic_index v<sub>x</sub> v<sub>y</sub> v<sub>z</sub> "// &
1093 : "Weight</big></tt></p>", &
1094 : usage="{{Integer} {Real} {Real} {Real} {Real}}", &
1095 : repeats=.TRUE., &
1096 28048 : type_of_var=lchar_t)
1097 28048 : CALL section_add_keyword(subsection, keyword)
1098 28048 : CALL keyword_release(keyword)
1099 :
1100 28048 : CALL section_add_subsection(section, subsection)
1101 28048 : CALL section_release(subsection)
1102 :
1103 28048 : END SUBROUTINE create_cascade_section
1104 :
1105 : ! **************************************************************************************************
1106 : !> \brief Defines AVERAGES section
1107 : !> \param section ...
1108 : !> \author teo
1109 : ! **************************************************************************************************
1110 28048 : SUBROUTINE create_avgs_section(section)
1111 : TYPE(section_type), POINTER :: section
1112 :
1113 : TYPE(keyword_type), POINTER :: keyword
1114 : TYPE(section_type), POINTER :: print_key, subsection
1115 :
1116 28048 : CPASSERT(.NOT. ASSOCIATED(section))
1117 : CALL section_create(section, __LOCATION__, name="Averages", &
1118 : description="Controls the calculation of the averages during an MD run.", &
1119 28048 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
1120 28048 : NULLIFY (keyword, print_key, subsection)
1121 :
1122 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
1123 : description="Controls the calculations of the averages.", &
1124 28048 : usage="&AVERAGES T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1125 28048 : CALL section_add_keyword(section, keyword)
1126 28048 : CALL keyword_release(keyword)
1127 :
1128 : CALL keyword_create(keyword, __LOCATION__, name="ACQUISITION_START_TIME", &
1129 : description="Setup up the simulation time when the acquisition process to compute "// &
1130 : " averages is started.", &
1131 : usage="ACQUISITION_START_TIME <REAL>", &
1132 28048 : default_r_val=0.0_dp, unit_str='fs')
1133 28048 : CALL section_add_keyword(section, keyword)
1134 28048 : CALL keyword_release(keyword)
1135 :
1136 : CALL keyword_create(keyword, __LOCATION__, name="AVERAGE_COLVAR", &
1137 : description="Switch for computing the averages of COLVARs.", &
1138 : usage="AVERAGE_COLVAR <LOGICAL>", default_l_val=.FALSE., &
1139 28048 : lone_keyword_l_val=.TRUE.)
1140 28048 : CALL section_add_keyword(section, keyword)
1141 28048 : CALL keyword_release(keyword)
1142 :
1143 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PRINT_AVERAGES", &
1144 : description="Controls the output the averaged quantities", &
1145 : print_level=debug_print_level + 1, common_iter_levels=1, &
1146 28048 : filename="")
1147 28048 : CALL section_add_subsection(section, print_key)
1148 28048 : CALL section_release(print_key)
1149 :
1150 28048 : CALL create_avgs_restart_section(subsection)
1151 28048 : CALL section_add_subsection(section, subsection)
1152 28048 : CALL section_release(subsection)
1153 28048 : END SUBROUTINE create_avgs_section
1154 :
1155 : ! **************************************************************************************************
1156 : !> \brief Defines the AVERAGES RESTART section
1157 : !> \param section ...
1158 : !> \author teo
1159 : ! **************************************************************************************************
1160 28048 : SUBROUTINE create_avgs_restart_section(section)
1161 : TYPE(section_type), POINTER :: section
1162 :
1163 : TYPE(keyword_type), POINTER :: keyword
1164 :
1165 28048 : CPASSERT(.NOT. ASSOCIATED(section))
1166 : CALL section_create(section, __LOCATION__, name="RESTART_AVERAGES", &
1167 : description="Stores information for restarting averages.", &
1168 28048 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
1169 28048 : NULLIFY (keyword)
1170 :
1171 : CALL keyword_create(keyword, __LOCATION__, name="ITIMES_START", &
1172 : description="TIME STEP starting the evaluation of averages", &
1173 28048 : usage="ITIMES_START <INTEGER>", type_of_var=integer_t, n_var=1)
1174 28048 : CALL section_add_keyword(section, keyword)
1175 28048 : CALL keyword_release(keyword)
1176 :
1177 : CALL keyword_create(keyword, __LOCATION__, name="AVECPU", &
1178 : description="CPU average", usage="AVECPU <REAL>", &
1179 28048 : type_of_var=real_t, n_var=1)
1180 28048 : CALL section_add_keyword(section, keyword)
1181 28048 : CALL keyword_release(keyword)
1182 :
1183 : CALL keyword_create(keyword, __LOCATION__, name="AVEHUGONIOT", &
1184 : description="HUGONIOT average", usage="AVEHUGONIOT <REAL>", &
1185 28048 : type_of_var=real_t, n_var=1)
1186 28048 : CALL section_add_keyword(section, keyword)
1187 28048 : CALL keyword_release(keyword)
1188 :
1189 : CALL keyword_create(keyword, __LOCATION__, name="AVETEMP_BARO", &
1190 : description="BAROSTAT TEMPERATURE average", usage="AVETEMP_BARO <REAL>", &
1191 28048 : type_of_var=real_t, n_var=1)
1192 28048 : CALL section_add_keyword(section, keyword)
1193 28048 : CALL keyword_release(keyword)
1194 :
1195 : CALL keyword_create(keyword, __LOCATION__, name="AVEPOT", &
1196 : description="POTENTIAL ENERGY average", usage="AVEPOT <REAL>", &
1197 28048 : type_of_var=real_t, n_var=1)
1198 28048 : CALL section_add_keyword(section, keyword)
1199 28048 : CALL keyword_release(keyword)
1200 :
1201 : CALL keyword_create(keyword, __LOCATION__, name="AVEKIN", &
1202 : description="KINETIC ENERGY average", usage="AVEKIN <REAL>", &
1203 28048 : type_of_var=real_t, n_var=1)
1204 28048 : CALL section_add_keyword(section, keyword)
1205 28048 : CALL keyword_release(keyword)
1206 :
1207 : CALL keyword_create(keyword, __LOCATION__, name="AVETEMP", &
1208 : description="TEMPERATURE average", usage="AVETEMP <REAL>", &
1209 28048 : type_of_var=real_t, n_var=1)
1210 28048 : CALL section_add_keyword(section, keyword)
1211 28048 : CALL keyword_release(keyword)
1212 :
1213 : CALL keyword_create(keyword, __LOCATION__, name="AVEKIN_QM", &
1214 : description="QM KINETIC ENERGY average in QMMM runs", usage="AVEKIN_QM <REAL>", &
1215 28048 : type_of_var=real_t, n_var=1)
1216 28048 : CALL section_add_keyword(section, keyword)
1217 28048 : CALL keyword_release(keyword)
1218 :
1219 : CALL keyword_create(keyword, __LOCATION__, name="AVETEMP_QM", &
1220 : description="QM TEMPERATURE average in QMMM runs", usage="AVETEMP_QM <REAL>", &
1221 28048 : type_of_var=real_t, n_var=1)
1222 28048 : CALL section_add_keyword(section, keyword)
1223 28048 : CALL keyword_release(keyword)
1224 :
1225 : CALL keyword_create(keyword, __LOCATION__, name="AVEVOL", &
1226 : description="VOLUME average", usage="AVEVOL <REAL>", &
1227 28048 : type_of_var=real_t, n_var=1)
1228 28048 : CALL section_add_keyword(section, keyword)
1229 28048 : CALL keyword_release(keyword)
1230 :
1231 : CALL keyword_create(keyword, __LOCATION__, name="AVECELL_A", &
1232 : description="CELL VECTOR A average", usage="AVECELL_A <REAL>", &
1233 28048 : type_of_var=real_t, n_var=1)
1234 28048 : CALL section_add_keyword(section, keyword)
1235 28048 : CALL keyword_release(keyword)
1236 :
1237 : CALL keyword_create(keyword, __LOCATION__, name="AVECELL_B", &
1238 : description="CELL VECTOR B average", usage="AVECELL_B <REAL>", &
1239 28048 : type_of_var=real_t, n_var=1)
1240 28048 : CALL section_add_keyword(section, keyword)
1241 28048 : CALL keyword_release(keyword)
1242 :
1243 : CALL keyword_create(keyword, __LOCATION__, name="AVECELL_C", &
1244 : description="CELL VECTOR C average", usage="AVECELL_C <REAL>", &
1245 28048 : type_of_var=real_t, n_var=1)
1246 28048 : CALL section_add_keyword(section, keyword)
1247 28048 : CALL keyword_release(keyword)
1248 :
1249 : CALL keyword_create(keyword, __LOCATION__, name="AVEALPHA", &
1250 : description="ALPHA cell angle average", usage="AVEALPHA <REAL>", &
1251 28048 : type_of_var=real_t, n_var=1)
1252 28048 : CALL section_add_keyword(section, keyword)
1253 28048 : CALL keyword_release(keyword)
1254 :
1255 : CALL keyword_create(keyword, __LOCATION__, name="AVEBETA", &
1256 : description="BETA cell angle average", usage="AVEBETA <REAL>", &
1257 28048 : type_of_var=real_t, n_var=1)
1258 28048 : CALL section_add_keyword(section, keyword)
1259 28048 : CALL keyword_release(keyword)
1260 :
1261 : CALL keyword_create(keyword, __LOCATION__, name="AVEGAMMA", &
1262 : description="GAMMA cell angle average", usage="AVEGAMMA <REAL>", &
1263 28048 : type_of_var=real_t, n_var=1)
1264 28048 : CALL section_add_keyword(section, keyword)
1265 28048 : CALL keyword_release(keyword)
1266 :
1267 : CALL keyword_create(keyword, __LOCATION__, name="AVE_ECONS", &
1268 : description="CONSTANT ENERGY average", usage="AVE_ECONS <REAL>", &
1269 28048 : type_of_var=real_t, n_var=1)
1270 28048 : CALL section_add_keyword(section, keyword)
1271 28048 : CALL keyword_release(keyword)
1272 :
1273 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PRESS", &
1274 : description="PRESSURE average", usage="AVE_PRESS <REAL>", &
1275 28048 : type_of_var=real_t, n_var=1)
1276 28048 : CALL section_add_keyword(section, keyword)
1277 28048 : CALL keyword_release(keyword)
1278 :
1279 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PXX", &
1280 : description="P_{XX} average", usage="AVE_PXX <REAL>", &
1281 28048 : type_of_var=real_t, n_var=1)
1282 28048 : CALL section_add_keyword(section, keyword)
1283 28048 : CALL keyword_release(keyword)
1284 :
1285 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PV_VIR", &
1286 : description="PV VIRIAL average", usage="AVE_PV_VIR <REAL> .. <REAL>", &
1287 28048 : type_of_var=real_t, n_var=9)
1288 28048 : CALL section_add_keyword(section, keyword)
1289 28048 : CALL keyword_release(keyword)
1290 :
1291 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PV_TOT", &
1292 : description="PV TOTAL average", usage="AVE_PV_TOT <REAL> .. <REAL>", &
1293 28048 : type_of_var=real_t, n_var=9)
1294 28048 : CALL section_add_keyword(section, keyword)
1295 28048 : CALL keyword_release(keyword)
1296 :
1297 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PV_KIN", &
1298 : description="PV KINETIC average", usage="AVE_PV_KIN <REAL> .. <REAL>", &
1299 28048 : type_of_var=real_t, n_var=9)
1300 28048 : CALL section_add_keyword(section, keyword)
1301 28048 : CALL keyword_release(keyword)
1302 :
1303 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PV_CNSTR", &
1304 : description="PV CONSTRAINTS average", usage="AVE_PV_CNSTR <REAL> .. <REAL>", &
1305 28048 : type_of_var=real_t, n_var=9)
1306 28048 : CALL section_add_keyword(section, keyword)
1307 28048 : CALL keyword_release(keyword)
1308 :
1309 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PV_XC", &
1310 : description="PV XC average", usage="AVE_PV_XC <REAL> .. <REAL>", &
1311 28048 : type_of_var=real_t, n_var=9)
1312 28048 : CALL section_add_keyword(section, keyword)
1313 28048 : CALL keyword_release(keyword)
1314 :
1315 : CALL keyword_create(keyword, __LOCATION__, name="AVE_PV_FOCK_4C", &
1316 : description="PV XC average", usage="AVE_PV_FOCK_4C <REAL> .. <REAL>", &
1317 28048 : type_of_var=real_t, n_var=9)
1318 28048 : CALL section_add_keyword(section, keyword)
1319 28048 : CALL keyword_release(keyword)
1320 :
1321 : CALL keyword_create(keyword, __LOCATION__, name="AVE_COLVARS", &
1322 : description="COLVARS averages", usage="AVE_COLVARS <REAL> .. <REAL>", &
1323 28048 : type_of_var=real_t, n_var=-1)
1324 28048 : CALL section_add_keyword(section, keyword)
1325 28048 : CALL keyword_release(keyword)
1326 :
1327 : CALL keyword_create(keyword, __LOCATION__, name="AVE_MMATRIX", &
1328 : description="METRIC TENSOR averages", usage="AVE_MMATRIX <REAL> .. <REAL>", &
1329 28048 : type_of_var=real_t, n_var=-1)
1330 28048 : CALL section_add_keyword(section, keyword)
1331 28048 : CALL keyword_release(keyword)
1332 28048 : END SUBROUTINE create_avgs_restart_section
1333 :
1334 : ! **************************************************************************************************
1335 : !> \brief Defines the INITIAL_VIBRATION section
1336 : !> \param section ...
1337 : !> \author Lianheng Tong
1338 : ! **************************************************************************************************
1339 28048 : SUBROUTINE create_vib_init_section(section)
1340 : TYPE(section_type), POINTER :: section
1341 :
1342 : TYPE(keyword_type), POINTER :: keyword
1343 :
1344 28048 : CPASSERT(.NOT. ASSOCIATED(section))
1345 : CALL section_create(section, __LOCATION__, name="INITIAL_VIBRATION", &
1346 : description="Controls the set of parameters for MD initialisation "// &
1347 : "based on vibration analysis data. The starting atomic coordinates "// &
1348 : "should be based on the relaxed positions obtained from a previous "// &
1349 : "geometry/cell optimisation calculation, and the vibrational "// &
1350 : "frequencies and displacements data should be obtained from a "// &
1351 : "vibrational analysis calculation done based on the relaxed "// &
1352 : "coordinates. The MD initialisation process expects the user has "// &
1353 : "performed both geometry optimisation and vibrational analysis "// &
1354 : "before hand, and won't perform those calculations automatically ", &
1355 : citations=(/West2006/), &
1356 56096 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1357 28048 : NULLIFY (keyword)
1358 : CALL keyword_create(keyword, __LOCATION__, name="VIB_EIGS_FILE_NAME", &
1359 : description="The file name of vibrational frequency (eigenvalue)"// &
1360 : "and displacement (eigenvector) data calculated from the a "// &
1361 : "vibrational analysis calculation done previously. This file must "// &
1362 : "be the same unformatted binary file as referred to by "// &
1363 : "VIBRATIONAL_ANALYSIS%PRINT%CARTESIAN_EIGS keyword. If this keyword "// &
1364 : "is not explicitly defined by the user, then the default file "// &
1365 : "name of: <project_name>-<CARTESIAN_EIGS_FILENAME>.eig will be used", &
1366 : usage="VIB_EIGS_FILE_NAME <FILENAME>", &
1367 28048 : type_of_var=lchar_t)
1368 28048 : CALL section_add_keyword(section, keyword)
1369 28048 : CALL keyword_release(keyword)
1370 28048 : NULLIFY (keyword)
1371 : CALL keyword_create(keyword, __LOCATION__, name="PHASE", &
1372 : description="Controls the initial ratio of potential and kinetic "// &
1373 : "contribution to the total energy. The contribution is determined by"// &
1374 : "COS**2(2*pi*PHASE) for potential energy, and SIN**2(2*pi*PHASE) "// &
1375 : "for kinetic energy. If PHASE is negative, then for each vibration "// &
1376 : "mode the phase is determined randomly. Otherwise, PHASE must be "// &
1377 : "between 0.0 and 1.0 and will be the same for all vibration modes. "// &
1378 : "If value > 1.0 it will just be treated as 1.0. "// &
1379 : "For example, setting PHASE = 0.25 would set all modes to "// &
1380 : "begin with entirely kinetic energy --- in other words, the initial "// &
1381 : "atomic positions will remain at their optimised location", &
1382 : default_r_val=-1.0_dp, &
1383 28048 : usage="PHASE <REAL>")
1384 28048 : CALL section_add_keyword(section, keyword)
1385 28048 : CALL keyword_release(keyword)
1386 28048 : END SUBROUTINE create_vib_init_section
1387 :
1388 : END MODULE input_cp2k_md
|