(git:1f9fd2c)
Loading...
Searching...
No Matches
input_cp2k_md.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 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
15 USE bibliography, ONLY: &
24 USE cp_units, ONLY: cp_unit_to_cp2k
25 USE fparser, ONLY: docf
26 USE input_constants, ONLY: &
44 USE input_val_types, ONLY: char_t,&
45 integer_t,&
46 lchar_t,&
47 real_t
48 USE kinds, ONLY: dp
55 USE string_utilities, ONLY: newline,&
56 s2a
57#include "../base/base_uses.f90"
58
59 IMPLICIT NONE
60 PRIVATE
61
62 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
63 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_md'
64
65 PUBLIC :: create_md_section
66
67CONTAINS
68
69! **************************************************************************************************
70!> \brief ...
71!> \param section will contain the md section
72!> \author fawzi
73! **************************************************************************************************
74 SUBROUTINE create_md_section(section)
75 TYPE(section_type), POINTER :: section
76
77 TYPE(keyword_type), POINTER :: keyword
78 TYPE(section_type), POINTER :: subsection
79
80 cpassert(.NOT. ASSOCIATED(section))
81 CALL section_create(section, __location__, name="MD", &
82 description="This section defines the whole set of parameters needed perform an MD run.", &
83 n_keywords=13, n_subsections=6, repeats=.false.)
84
85 NULLIFY (keyword, subsection)
86 CALL keyword_create(keyword, __location__, name="ensemble", &
87 description="The ensemble/integrator that you want to use for MD propagation", &
88 usage="ensemble nve", &
89 default_i_val=nve_ensemble, &
90 enum_c_vals=s2a("NVE", "NVT", "NPT_I", "NPT_F", "MSST", "MSST_DAMPED", &
91 "HYDROSTATICSHOCK", "ISOKIN", "REFTRAJ", "LANGEVIN", "NPE_F", &
92 "NPE_I", "NVT_ADIABATIC", "NPT_IA"), &
93 enum_desc=s2a("constant energy (microcanonical)", &
94 "constant temperature and volume (canonical)", &
95 "constant temperature and pressure using an isotropic cell", &
96 "constant temperature and pressure using a flexible cell", &
97 "simulate steady shock (uniaxial)", &
98 "simulate steady shock (uniaxial) with extra viscosity", &
99 "simulate steady shock with hydrostatic pressure", &
100 "constant kinetic energy", &
101 "reading frames from a file called reftraj.xyz (e.g. for property calculation)", &
102 "langevin dynamics (constant temperature)", &
103 "constant pressure ensemble (no thermostat)", &
104 "constant pressure ensemble using an isotropic cell (no thermostat)", &
105 "adiabatic dynamics in constant temperature and volume ensemble (CAFES)", &
106 "NPT_I ensemble with frozen atoms in absolute coordinate"), &
107 citations=[evans1983, vandevondele2002, minary2003], &
112 CALL section_add_keyword(section, keyword)
113 CALL keyword_release(keyword)
114
115 CALL keyword_create(keyword, __location__, name="STEPS", &
116 description="The number of MD steps to perform, counting from step_start_val. ", &
117 usage="STEPS 100", default_i_val=3)
118 CALL section_add_keyword(section, keyword)
119 CALL keyword_release(keyword)
120
121 CALL keyword_create(keyword, __location__, name="MAX_STEPS", &
122 description="The number of MD steps to perform, counting from step 1", &
123 usage="MAX_STEPS 100", default_i_val=1000000000)
124 CALL section_add_keyword(section, keyword)
125 CALL keyword_release(keyword)
126
127 CALL keyword_create(keyword, __location__, name="TIMESTEP", &
128 description="The length of an integration step (in case RESPA the large TIMESTEP)", &
129 usage="TIMESTEP 1.0", default_r_val=cp_unit_to_cp2k(value=0.5_dp, unit_str="fs"), &
130 unit_str="fs")
131 CALL section_add_keyword(section, keyword)
132 CALL keyword_release(keyword)
133
134 CALL keyword_create(keyword, __location__, name="STEP_START_VAL", &
135 description="The starting step value for the MD", usage="STEP_START_VAL <integer>", &
136 default_i_val=0)
137 CALL section_add_keyword(section, keyword)
138 CALL keyword_release(keyword)
139
140 CALL keyword_create(keyword, __location__, name="TIME_START_VAL", &
141 description="The starting timer value for the MD", &
142 usage="TIME_START_VAL <real>", default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="fs"), &
143 unit_str="fs")
144 CALL section_add_keyword(section, keyword)
145 CALL keyword_release(keyword)
146
147 CALL keyword_create(keyword, __location__, name="ECONS_START_VAL", &
148 description="The starting value of the conserved quantity", &
149 usage="ECONS_START_VAL <real>", default_r_val=0.0_dp, &
150 unit_str="hartree")
151 CALL section_add_keyword(section, keyword)
152 CALL keyword_release(keyword)
153
154 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
155 description="The temperature in K used to initialize "// &
156 "the velocities with init and pos restart, and in the NPT/NVT simulations", &
157 usage="TEMPERATURE 325.0", default_r_val=cp_unit_to_cp2k(value=300.0_dp, unit_str="K"), &
158 unit_str="K")
159 CALL section_add_keyword(section, keyword)
160 CALL keyword_release(keyword)
161
162 CALL keyword_create(keyword, __location__, name="TEMP_TOL", &
163 variants=s2a("temp_to", "temperature_tolerance"), &
164 description="The maximum accepted deviation of the (global) temperature "// &
165 "from the desired target temperature before a rescaling of the velocities "// &
166 "is performed. If it is 0 no rescaling is performed. NOTE: This keyword is "// &
167 "obsolescent; Using a CSVR thermostat with a short timeconstant is "// &
168 "recommended as a better alternative.", &
169 usage="TEMP_TOL 0.0", default_r_val=0.0_dp, unit_str='K')
170 CALL section_add_keyword(section, keyword)
171 CALL keyword_release(keyword)
172
173 CALL keyword_create(keyword, __location__, name="TEMP_KIND", &
174 description="Compute the temperature per each kind separately", &
175 usage="TEMP_KIND LOGICAL", &
176 default_l_val=.false., lone_keyword_l_val=.true.)
177 CALL section_add_keyword(section, keyword)
178 CALL keyword_release(keyword)
179
180 CALL keyword_create(keyword, __location__, name="SCALE_TEMP_KIND", &
181 description="When necessary rescale the temperature per each kind separately", &
182 usage="SCALE_TEMP_KIND LOGICAL", &
183 default_l_val=.false., lone_keyword_l_val=.true.)
184 CALL section_add_keyword(section, keyword)
185 CALL keyword_release(keyword)
186
187 CALL keyword_create(keyword, __location__, name="COMVEL_TOL", &
188 description="The maximum accepted velocity of the center of mass. "// &
189 "With Shell-Model, comvel may drift if MD%THERMOSTAT%REGION /= GLOBAL ", &
190 usage="COMVEL_TOL 0.1", type_of_var=real_t, n_var=1, unit_str="bohr*au_t^-1")
191 CALL section_add_keyword(section, keyword)
192 CALL keyword_release(keyword)
193
194 CALL keyword_create(keyword, __location__, name="ANGVEL_TOL", &
195 description="The maximum accepted angular velocity. This option is ignored "// &
196 "when the system is periodic. Removes the components of the velocities that "// &
197 "project on the external rotational degrees of freedom.", &
198 usage="ANGVEL_TOL 0.1", type_of_var=real_t, n_var=1, unit_str="bohr*au_t^-1")
199 CALL section_add_keyword(section, keyword)
200 CALL keyword_release(keyword)
201
202 CALL keyword_create(keyword, __location__, name="ANGVEL_ZERO", &
203 description="Set the initial angular velocity to zero. This option is ignored "// &
204 "when the system is periodic or when initial velocities are defined. Technically, "// &
205 "the part of the random initial velocities that projects on the external "// &
206 "rotational degrees of freedom is subtracted.", &
207 usage="ANGVEL_ZERO LOGICAL", &
208 default_l_val=.false., lone_keyword_l_val=.true.)
209 CALL section_add_keyword(section, keyword)
210 CALL keyword_release(keyword)
211
212 CALL keyword_create(keyword, __location__, name="ANNEALING", &
213 description="Specifies the rescaling factor for annealing velocities. "// &
214 "Automatically enables the annealing procedure. This scheme works only for ensembles "// &
215 "that do not have thermostats on particles.", &
216 usage="annealing <REAL>", default_r_val=1.0_dp)
217 CALL section_add_keyword(section, keyword)
218 CALL keyword_release(keyword)
219
220 CALL keyword_create(keyword, __location__, name="ANNEALING_CELL", &
221 description="Specifies the rescaling factor for annealing velocities of the CELL "// &
222 "Automatically enables the annealing procedure for the CELL. This scheme works only "// &
223 "for ensambles that do not have thermostat on CELLS velocities.", &
224 usage="ANNEALING_CELL <REAL>", default_r_val=1.0_dp)
225 CALL section_add_keyword(section, keyword)
226 CALL keyword_release(keyword)
227
228 CALL keyword_create(keyword, __location__, name="TEMPERATURE_ANNEALING", &
229 description="Specifies the rescaling factor for the external temperature. "// &
230 "This scheme works only for the Langevin ensemble.", &
231 usage="TEMPERATURE_ANNEALING <REAL>", default_r_val=1.0_dp)
232 CALL section_add_keyword(section, keyword)
233 CALL keyword_release(keyword)
234
235 CALL keyword_create(keyword, __location__, name="DISPLACEMENT_TOL", &
236 description="This keyword sets a maximum atomic displacement "// &
237 "in each Cartesian direction. "// &
238 "The maximum velocity is evaluated and if it is too large to remain "// &
239 "within the assigned limit, the time step is rescaled accordingly, "// &
240 "and the first half step of the velocity verlet is repeated.", &
241 usage="DISPLACEMENT_TOL <REAL>", default_r_val=100.0_dp, &
242 unit_str='angstrom')
243 CALL section_add_keyword(section, keyword)
244 CALL keyword_release(keyword)
245
246 CALL keyword_create(keyword, __location__, name="INITIALIZATION_METHOD", &
247 description="This keyword selects which method to use to initialize MD. "// &
248 "If velecities are not set explicitly, DEFAULT optioin will assign "// &
249 "random velocities and then scale according to TEMPERATURE; VIBRATIONAL "// &
250 "option will then use previously calculated vibrational modes to "// &
251 "initialise both the atomic positions and velocities so that the "// &
252 "starting point for MD is as close to canonical ensemble as possible, "// &
253 "without the need for lengthy equilibration steps. See PRL 96, 115504 "// &
254 "(2006). The user input atomic positions in this case are expected to "// &
255 "be already geometry optimised. Further options for VIBRATIONAL mode "// &
256 "is can be set in INITIAL_VIBRATION subsection. If unspecified, then "// &
257 "the DEFAULT mode will be used.", &
258 usage="INITIALIZATION_METHOD DEFAULT", &
259 default_i_val=md_init_default, &
260 enum_c_vals=s2a("DEFAULT", "VIBRATIONAL"), &
261 enum_desc=s2a("Assign random velocities and then scale according to "// &
262 "TEMPERATURE", &
263 "Initialise positions and velocities to give canonical ensemble "// &
264 "with TEMPERATURE, using the method described in PRL 96, 115504 (2006)"), &
265 enum_i_vals=[md_init_default, md_init_vib])
266 CALL section_add_keyword(section, keyword)
267 CALL keyword_release(keyword)
268
269 CALL create_langevin_section(subsection)
270 CALL section_add_subsection(section, subsection)
271 CALL section_release(subsection)
272
273 CALL create_msst_section(subsection)
274 CALL section_add_subsection(section, subsection)
275 CALL section_release(subsection)
276
277 CALL create_barostat_section(subsection)
278 CALL section_add_subsection(section, subsection)
279 CALL section_release(subsection)
280
281 CALL create_thermostat_section(subsection)
282 CALL section_add_subsection(section, subsection)
283 CALL section_release(subsection)
284
285 CALL create_respa_section(subsection)
286 CALL section_add_subsection(section, subsection)
287 CALL section_release(subsection)
288
289 CALL create_shell_section(subsection)
290 CALL section_add_subsection(section, subsection)
291 CALL section_release(subsection)
292
293 CALL create_adiabatic_section(subsection)
294 CALL section_add_subsection(section, subsection)
295 CALL section_release(subsection)
296
297 CALL create_softening_section(subsection)
298 CALL section_add_subsection(section, subsection)
299 CALL section_release(subsection)
300
301 CALL create_reftraj_section(subsection)
302 CALL section_add_subsection(section, subsection)
303 CALL section_release(subsection)
304
305 CALL create_avgs_section(subsection)
306 CALL section_add_subsection(section, subsection)
307 CALL section_release(subsection)
308
309 CALL create_thermal_region_section(subsection)
310 CALL section_add_subsection(section, subsection)
311 CALL section_release(subsection)
312
313 CALL create_md_print_section(subsection)
314 CALL section_add_subsection(section, subsection)
315 CALL section_release(subsection)
316
317 CALL create_cascade_section(subsection)
318 CALL section_add_subsection(section, subsection)
319 CALL section_release(subsection)
320
321 CALL create_vib_init_section(subsection)
322 CALL section_add_subsection(section, subsection)
323 CALL section_release(subsection)
324
325 END SUBROUTINE create_md_section
326
327! **************************************************************************************************
328!> \brief Defines LANGEVIN section
329!> \param section ...
330!> \author teo
331! **************************************************************************************************
332 SUBROUTINE create_langevin_section(section)
333 TYPE(section_type), POINTER :: section
334
335 TYPE(keyword_type), POINTER :: keyword
336
337 cpassert(.NOT. ASSOCIATED(section))
338 CALL section_create(section, __location__, name="Langevin", &
339 description="Controls the set of parameters to run a Langevin MD. "// &
340 "The integrator used follows that given in the article by Ricci et al. "// &
341 "The user can define regions in the system where the atoms inside "// &
342 "undergoes Langevin MD, while those outside the regions undergoes "// &
343 "NVE Born Oppenheimer MD. To define the regions, the user should "// &
344 "use THERMAL_REGION subsection of MOTION%MD. ", &
345 citations=[ricci2003, kuhne2007, rengaraj2020], &
346 n_keywords=0, n_subsections=1, repeats=.false.)
347 NULLIFY (keyword)
348
349 CALL keyword_create(keyword, __location__, name="gamma", &
350 description="Gamma parameter for the Langevin dynamics (LD)", &
351 usage="gamma 0.001", &
352 default_r_val=0.0_dp, unit_str='fs^-1')
353 CALL section_add_keyword(section, keyword)
354 CALL keyword_release(keyword)
355
356 CALL keyword_create(keyword, __location__, name="Noisy_Gamma", &
357 variants=["NoisyGamma"], &
358 description="Imaginary Langevin Friction term for LD with noisy forces.", &
359 citations=[kuhne2007], &
360 usage="Noisy_Gamma 4.0E-5", default_r_val=0.0_dp, unit_str='fs^-1')
361 CALL section_add_keyword(section, keyword)
362 CALL keyword_release(keyword)
363
364 CALL keyword_create(keyword, __location__, name="Shadow_Gamma", &
365 variants=["ShadowGamma"], &
366 description="Shadow Langevin Friction term for LD with noisy forces in order to adjust Noisy_Gamma.", &
367 citations=[rengaraj2020], &
368 usage="Shadow_Gamma 0.001", default_r_val=0.0_dp, unit_str='fs^-1')
369 CALL section_add_keyword(section, keyword)
370 CALL keyword_release(keyword)
371 END SUBROUTINE create_langevin_section
372
373! **************************************************************************************************
374!> \brief Defines print section for MD
375!> \param section ...
376!> \author teo
377! **************************************************************************************************
378 SUBROUTINE create_md_print_section(section)
379 TYPE(section_type), POINTER :: section
380
381 TYPE(keyword_type), POINTER :: keyword
382 TYPE(section_type), POINTER :: print_key
383
384 cpassert(.NOT. ASSOCIATED(section))
385 CALL section_create(section, __location__, name="print", &
386 description="Controls the printing properties during an MD run", &
387 n_keywords=0, n_subsections=1, repeats=.false.)
388 NULLIFY (print_key, keyword)
389
390 CALL keyword_create(keyword, __location__, name="FORCE_LAST", &
391 description="Print the output and restart file if walltime is reached or "// &
392 "if an external EXIT command is given. It still requires the keyword LAST "// &
393 "to be present for the specific print key (in case the last step should not "// &
394 "match with the print_key iteration number).", &
395 usage="FORCE_LAST LOGICAL", &
396 default_l_val=.false., lone_keyword_l_val=.true.)
397 CALL section_add_keyword(section, keyword)
398 CALL keyword_release(keyword)
399
400 CALL cp_print_key_section_create(print_key, __location__, "ENERGY", &
401 description="Controls the output the ener file", &
402 print_level=low_print_level, common_iter_levels=1, &
403 filename="")
404 CALL section_add_subsection(section, print_key)
405 CALL section_release(print_key)
406
407 CALL cp_print_key_section_create(print_key, __location__, "SHELL_ENERGY", &
408 description="Controls the output of the shell-energy file (only if shell-model)", &
409 print_level=medium_print_level, common_iter_levels=1, &
410 filename="")
411 CALL section_add_subsection(section, print_key)
412 CALL section_release(print_key)
413
414 CALL cp_print_key_section_create(print_key, __location__, "TEMP_KIND", &
415 description="Controls the output of the temperature"// &
416 " computed separately for each kind", &
417 print_level=high_print_level, common_iter_levels=1, &
418 filename="")
419 CALL section_add_subsection(section, print_key)
420 CALL section_release(print_key)
421
422 CALL cp_print_key_section_create(print_key, __location__, "TEMP_SHELL_KIND", &
423 description="Controls the output of the temperature of the"// &
424 " shell-core motion computed separately for each kind", &
425 print_level=high_print_level, common_iter_levels=1, &
426 filename="")
427 CALL section_add_subsection(section, print_key)
428 CALL section_release(print_key)
429
430 CALL cp_print_key_section_create(print_key, __location__, "CENTER_OF_MASS", &
431 description="Controls the printing of COM velocity during an MD", &
432 print_level=medium_print_level, common_iter_levels=1, &
433 filename="__STD_OUT__")
434 CALL section_add_subsection(section, print_key)
435 CALL section_release(print_key)
436
437 CALL cp_print_key_section_create(print_key, __location__, "COEFFICIENTS", &
438 description="Controls the printing of coefficients during an MD run.", &
439 print_level=medium_print_level, common_iter_levels=1, &
440 filename="")
441 CALL section_add_subsection(section, print_key)
442 CALL section_release(print_key)
443
444 CALL cp_print_key_section_create(print_key, __location__, "ROTATIONAL_INFO", &
445 description="Controls the printing basic info during the calculation of the "// &
446 "translational/rotational degrees of freedom.", print_level=low_print_level, &
447 add_last=add_last_numeric, filename="__STD_OUT__")
448 CALL keyword_create(keyword, __location__, name="COORDINATES", &
449 description="Prints atomic coordinates in the standard orientation. "// &
450 "Coordinates are not affected during the calculation.", &
451 default_l_val=.false., lone_keyword_l_val=.true.)
452 CALL section_add_keyword(print_key, keyword)
453 CALL keyword_release(keyword)
454 CALL section_add_subsection(section, print_key)
455 CALL section_release(print_key)
456
457 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
458 description="Controls the printing of basic and summary information during the"// &
459 " Molecular Dynamics", &
460 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
461 CALL section_add_subsection(section, print_key)
462 CALL section_release(print_key)
463 END SUBROUTINE create_md_print_section
464
465! **************************************************************************************************
466!> \brief Defines parameters for RESPA integration scheme
467!> \param section will contain the coeff section
468!> \author teo
469! **************************************************************************************************
470 SUBROUTINE create_respa_section(section)
471 TYPE(section_type), POINTER :: section
472
473 TYPE(keyword_type), POINTER :: keyword
474
475 cpassert(.NOT. ASSOCIATED(section))
476
477 CALL section_create(section, __location__, name="RESPA", &
478 description="Multiple timestep integration based on RESPA (implemented for NVE only)."// &
479 " RESPA exploits multiple force_eval."// &
480 " In this case the order of the force_eval maps"// &
481 " the order of the respa shells from the slowest to the fastest force evaluation."// &
482 " If force_evals share the same subsys, it's enough then to specify the"// &
483 " subsys in the force_eval corresponding at the first index in the multiple_force_eval list."// &
484 " Can be used to speedup classical and ab initio MD simulations.", &
485 n_keywords=1, n_subsections=0, repeats=.false., &
486 citations=[tuckerman1992, guidon2008])
487
488 NULLIFY (keyword)
489 CALL keyword_create(keyword, __location__, name="FREQUENCY", &
490 description="The number of reference MD steps between two RESPA corrections.", &
491 usage="FREQUENCY <INTEGER>", default_i_val=5)
492 CALL section_add_keyword(section, keyword)
493 CALL keyword_release(keyword)
494
495 END SUBROUTINE create_respa_section
496
497! **************************************************************************************************
498!> \brief Defines parameters for REFTRAJ analysis
499!> \param section will contain the coeff section
500!> \author teo
501! **************************************************************************************************
502 SUBROUTINE create_reftraj_section(section)
503 TYPE(section_type), POINTER :: section
504
505 TYPE(keyword_type), POINTER :: keyword
506 TYPE(section_type), POINTER :: print_key, subsection
507
508 cpassert(.NOT. ASSOCIATED(section))
509
510 CALL section_create(section, __location__, name="REFTRAJ", &
511 description="Loads an external trajectory file and performs analysis on "// &
512 "the loaded snapshots; optionally, calculates per-frame potential energy, "// &
513 "forces and other properties as requested by the keyword `EVAL` below with "// &
514 "the force method specified in the `&FORCE_EVAL` section. Time integration "// &
515 "is not performed here, and quantities of velocity, temperature and kinetic "// &
516 "energy from nuclear motion are therefore irrelevant. Such a REFTRAJ run is "// &
517 "essentially a series of single-point calculations; the snapshots are not "// &
518 "necessarily from MD and may be from custom concatenation."//newline//newline// &
519 "The trajectory should be a multi-frame XYZ file where each frame has the "// &
520 "same number of atoms and kind specification as the `&FORCE_EVAL/&SUBSYS` "// &
521 "down to the exact ordering, but cell (box) size and shape can be different. "// &
522 "The comment line of each frame is parsed for additional information such "// &
523 "as cell, step, time and energy; currently the parser supports the same "// &
524 "formats as the XYZ option of `&FORCE_EVAL/&SUBSYS/&CELL/CELL_FILE_FORMAT`, "// &
525 "corresponding to trajectory files printed from `&MOTION/&PRINT/&TRAJECTORY` "// &
526 "as XYZ and EXTXYZ and from the external `dumpdcd` tool."//newline//newline// &
527 "A minimal working example trajectory in the extended XYZ format should have "// &
528 '`Lattice="<Ax> <Ay> <Az> <Bx> <By> <Bz> <Cx> <Cy> <Cz>"` for the components '// &
529 "of cell vectors A, B, C, and `Step=<integer>` for the integer timestep. "// &
530 "`Time=<real>` and `Energy=<real>` for simulation time and potential energy "// &
531 "respectively are also parsed; if omitted, the default value will be 0.0 . "// &
532 "Note that the parser is case insensitive, but whitespaces are only used "// &
533 "between key-value pairs as delimiters and not around the = signs in an "// &
534 "extended XYZ file. `Properties=species:S:1:pos:R:3` is always assumed for "// &
535 "backwards compatibility with the primitive XYZ specification: the first "// &
536 "column is a string for element symbol (or kind alias), followed by three "// &
537 "columns of real values for Cartesian coordinates in angstrom."//newline//newline// &
538 "Alternatively, the legacy brief format from `&TRAJECTORY` output where the "// &
539 "comment line starts with `i = <integer>` for the integer timestep can also "// &
540 "be used, this time with the = sign surrounded by whitespaces. The cell "// &
541 "information may come from a separate file requested by `CELL_FILE_NAME` if "// &
542 "variable, or may be taken as the `&FORCE_EVAL/&SUBSYS/&CELL` if constant.", &
543 n_keywords=1, n_subsections=1, repeats=.false.)
544
545 NULLIFY (keyword, print_key, subsection)
546
547 CALL keyword_create(keyword, __location__, name="TRAJ_FILE_NAME", &
548 description="Specify the filename where the trajectory is stored.", &
549 repeats=.false., &
550 usage="TRAJ_FILE_NAME <CHARACTER>", default_lc_val="reftraj.xyz")
551 CALL section_add_keyword(section, keyword)
552 CALL keyword_release(keyword)
553
554 CALL keyword_create(keyword, __location__, name="CELL_FILE_NAME", &
555 description="Specify the filename where the cell is stored "// &
556 "(for trajectories generated within variable cell ensembles). "// &
557 "This file will be parsed only when no cell information is found "// &
558 "in the trajectory file and VARIABLE_VOLUME is set to .TRUE.", &
559 repeats=.false., &
560 usage="CELL_FILE_NAME <CHARACTER>", default_lc_val="reftraj.cell")
561 CALL section_add_keyword(section, keyword)
562 CALL keyword_release(keyword)
563
564 CALL keyword_create(keyword, __location__, name="VARIABLE_VOLUME", &
565 description="Enables the possibility to read a CELL file with "// &
566 "information on the CELL size during the MD. This keyword will be "// &
567 "ignored if cell information is already available in the trajectory file.", &
568 repeats=.false., default_l_val=.false., lone_keyword_l_val=.true.)
569 CALL section_add_keyword(section, keyword)
570 CALL keyword_release(keyword)
571
572 CALL keyword_create(keyword, __location__, name="FIRST_SNAPSHOT", &
573 description="Index of the snapshot stored in the trajectory file "// &
574 "from which to start a REFTRAJ run", &
575 repeats=.false., usage="FIRST_SNAPSHOT <INTEGER>", default_i_val=1)
576 CALL section_add_keyword(section, keyword)
577 CALL keyword_release(keyword)
578
579 CALL keyword_create(keyword, __location__, name="LAST_SNAPSHOT", &
580 description="Index of the last snapshot stored in the trajectory file "// &
581 "that is read along a REFTRAJ run. Must be specified as default is 0. "// &
582 "Must be specified exactly as LAST_SNAPSHOT = FIRST_SNAPSHOT + STRIDE*(number of strides) "// &
583 "to avoid an error 'Unexpected EOF'. Note that STRIDE*(number of strides) "// &
584 "is simply the number of steps between the first to last snapshot.", &
585 repeats=.false., usage="LAST_SNAPSHOT", default_i_val=0)
586 CALL section_add_keyword(section, keyword)
587 CALL keyword_release(keyword)
588
589 CALL keyword_create(keyword, __location__, name="STRIDE", &
590 description=" Stride in number of snapshot for the reftraj analysis", &
591 repeats=.false., usage="STRIDE", default_i_val=1)
592 CALL section_add_keyword(section, keyword)
593 CALL keyword_release(keyword)
594
595 CALL keyword_create(keyword, __location__, name="EVAL", &
596 description="Selects the mode of energy and force evaluation for each "// &
597 "retrieved snapshot during a REFTRAJ run, which determines availability "// &
598 "of other properties and the time consumption in the computation. The "// &
599 "default is NONE, a conservative option useful for analyses concerning "// &
600 "structure only that are independent of force method, such as MSD and "// &
601 "`&MOTION/&PRINT/&STRUCTURE_DATA`. This keyword supersedes the logical "// &
602 "keywords `EVAL_<mode>` in older versions of the program.", &
603 default_i_val=reftraj_eval_none, &
605 enum_c_vals=s2a("NONE", "ENERGY", "ENERGY_FORCES"), &
606 enum_desc=s2a("Do not evaluate energy or force", &
607 "Evaluate only the energy", &
608 "Evaluate energy and forces"))
609 CALL section_add_keyword(section, keyword)
610 CALL keyword_release(keyword)
611
612 CALL keyword_create(keyword, __location__, name="WRAP", &
613 description="Whether and how atoms would be wrapped to inside the "// &
614 "simulation box according to periodic boundary condition before any "// &
615 "subsequent analysis. Useful when there is need to convert the raw, "// &
616 "unwrapped coordinates produced from `MOTION%PRINT%TRAJECTORY` for "// &
617 "post-processing. This keyword will be ignored when requesting MSD "// &
618 "calculation because wrapping coordinates makes displacement discontinuous.", &
619 default_i_val=reftraj_wrap_none, &
621 enum_c_vals=s2a("NONE", "POSITIVE", "CENTRAL"), &
622 enum_desc=s2a("Do not wrap atoms at all and use coordinates exactly as input", &
623 "Wrap atoms so that fractional coordinates are within [0, 1]", &
624 "Wrap atoms so that fractional coordinates are within [-1/2, +1/2]"))
625 CALL section_add_keyword(section, keyword)
626 CALL keyword_release(keyword)
627
628 CALL create_msd_section(subsection)
629 CALL section_add_subsection(section, subsection)
630 CALL section_release(subsection)
631
632 CALL section_create(subsection, __location__, name="print", &
633 description="The section that controls the output of a reftraj run", &
634 n_keywords=1, n_subsections=0, repeats=.false.)
635
636 NULLIFY (print_key)
637 CALL cp_print_key_section_create(print_key, __location__, "msd_kind", &
638 description="Controls the output of msd per kind", &
639 print_level=low_print_level, common_iter_levels=1, &
640 filename="")
641 CALL section_add_subsection(subsection, print_key)
642 CALL section_release(print_key)
643
644 CALL cp_print_key_section_create(print_key, __location__, "msd_molecule", &
645 description="Controls the output of msd per molecule kind", &
646 print_level=low_print_level, common_iter_levels=1, &
647 filename="")
648 CALL section_add_subsection(subsection, print_key)
649 CALL section_release(print_key)
650
651 CALL cp_print_key_section_create(print_key, __location__, "displaced_atom", &
652 description="Controls the output of index and dislacement of "// &
653 "atoms that moved away from the initial position of more than a "// &
654 "given distance (see msd%disp_tol)", &
655 print_level=low_print_level, common_iter_levels=1, &
656 filename="")
657 CALL section_add_subsection(subsection, print_key)
658 CALL section_release(print_key)
659
660 CALL section_add_subsection(section, subsection)
661 CALL section_release(subsection)
662
663 END SUBROUTINE create_reftraj_section
664
665! **************************************************************************************************
666!> \brief Defines parameters for MSD calculation along a REFTRAJ analysis
667!> \param section will contain the coeff section
668!> \author MI
669! **************************************************************************************************
670 SUBROUTINE create_msd_section(section)
671 TYPE(section_type), POINTER :: section
672
673 TYPE(keyword_type), POINTER :: keyword
674 TYPE(section_type), POINTER :: subsection
675
676 cpassert(.NOT. ASSOCIATED(section))
677
678 CALL section_create(section, __location__, name="MSD", &
679 description="Loads an external trajectory file and performs analysis on the"// &
680 " loaded snapshots.", &
681 n_keywords=3, n_subsections=0, repeats=.false.)
682
683 NULLIFY (keyword, subsection)
684
685 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
686 description="controls the activation of core-level spectroscopy simulations", &
687 usage="&MSD T", &
688 default_l_val=.false., &
689 lone_keyword_l_val=.true.)
690 CALL section_add_keyword(section, keyword)
691 CALL keyword_release(keyword)
692
693 CALL keyword_create(keyword, __location__, name="REF0_FILENAME", &
694 description="Specify the filename where the initial reference configuration is stored.", &
695 repeats=.false., usage="REF0_FILENAME <CHARACTER>", default_lc_val="")
696 CALL section_add_keyword(section, keyword)
697 CALL keyword_release(keyword)
698
699 CALL keyword_create(keyword, __location__, name="MSD_PER_KIND", &
700 description="Set up the calculation of the MSD for each atomic kind", &
701 usage="MSD_PER_KIND <LOGICAL>", repeats=.false., &
702 default_l_val=.false., lone_keyword_l_val=.true.)
703 CALL section_add_keyword(section, keyword)
704 CALL keyword_release(keyword)
705
706 CALL keyword_create(keyword, __location__, name="MSD_PER_MOLKIND", &
707 description="Set up the calculation of the MSD for each molecule kind. "// &
708 "The position of the center of mass of the molecule is considered.", &
709 usage="MSD_PER_MOLKIND <LOGICAL>", repeats=.false., &
710 default_l_val=.false., lone_keyword_l_val=.true.)
711 CALL section_add_keyword(section, keyword)
712 CALL keyword_release(keyword)
713
714 CALL keyword_create(keyword, __location__, name="MSD_PER_REGION", &
715 description="Set up the calculation of the MSD for each defined region.", &
716 usage="MSD_PER_REGION <LOGICAL>", repeats=.false., &
717 default_l_val=.false., lone_keyword_l_val=.true.)
718 CALL section_add_keyword(section, keyword)
719 CALL keyword_release(keyword)
720
721 CALL create_region_section(subsection, "MSD calculation")
722 CALL section_add_subsection(section, subsection)
723 CALL section_release(subsection)
724
725 CALL keyword_create(keyword, __location__, name="DISPLACED_ATOM", &
726 description="Identify the atoms that moved from their initial "// &
727 "position of a distance larger than a given tolerance (see msd%displacement_tol).", &
728 usage="DISPLACED_ATOM <LOGICAL>", repeats=.false., &
729 default_l_val=.false., lone_keyword_l_val=.true.)
730 CALL section_add_keyword(section, keyword)
731 CALL keyword_release(keyword)
732
733 CALL keyword_create(keyword, __location__, name="displacement_tol", &
734 description="Lower limit to define displaced atoms", &
735 usage="DISPLACEMENT_TOL real", &
736 default_r_val=0._dp, n_var=1, unit_str='bohr')
737 CALL section_add_keyword(section, keyword)
738 CALL keyword_release(keyword)
739
740 END SUBROUTINE create_msd_section
741
742! **************************************************************************************************
743!> \brief ...
744!> \param section will contain the coeff section
745!> \author teo
746! **************************************************************************************************
747 SUBROUTINE create_msst_section(section)
748 TYPE(section_type), POINTER :: section
749
750 TYPE(keyword_type), POINTER :: keyword
751
752 cpassert(.NOT. ASSOCIATED(section))
753
754 CALL section_create(section, __location__, name="msst", &
755 description="Parameters for Multi-Scale Shock Technique (MSST) "// &
756 "which simulate the effect of a steady planar shock on a unit cell. "// &
757 "Reed et. al. Physical Review Letters 90, 235503 (2003).", &
758 n_keywords=1, n_subsections=0, repeats=.false.)
759
760 NULLIFY (keyword)
761 CALL keyword_create(keyword, __location__, name="PRESSURE", &
762 description="Initial pressure", &
763 usage="PRESSURE real", &
764 default_r_val=0._dp, n_var=1, unit_str='bar')
765 CALL section_add_keyword(section, keyword)
766 CALL keyword_release(keyword)
767
768 CALL keyword_create(keyword, __location__, name="ENERGY", &
769 description="Initial energy", &
770 usage="ENERGY real", &
771 default_r_val=0._dp, n_var=1, unit_str='hartree')
772 CALL section_add_keyword(section, keyword)
773 CALL keyword_release(keyword)
774
775 CALL keyword_create(keyword, __location__, name="VOLUME", &
776 description="Initial volume", &
777 usage="VOLUME real", &
778 default_r_val=0._dp, n_var=1, unit_str='angstrom^3')
779 CALL section_add_keyword(section, keyword)
780 CALL keyword_release(keyword)
781
782 CALL keyword_create(keyword, __location__, name="CMASS", &
783 description="Effective cell mass", &
784 usage="CMASS real", &
785 default_r_val=0._dp, n_var=1, unit_str='au_m')
786 CALL section_add_keyword(section, keyword)
787 CALL keyword_release(keyword)
788
789 CALL keyword_create(keyword, __location__, name="VSHOCK", variants=["V_SHOCK"], &
790 description="Velocity shock", &
791 usage="VSHOCK real", &
792 default_r_val=0._dp, n_var=1, unit_str='m/s')
793 CALL section_add_keyword(section, keyword)
794 CALL keyword_release(keyword)
795
796 CALL keyword_create(keyword, __location__, name="GAMMA", &
797 description="Damping coefficient for cell volume", &
798 usage="GAMMA real", &
799 unit_str='fs^-1', &
800 default_r_val=0.0_dp)
801 CALL section_add_keyword(section, keyword)
802 CALL keyword_release(keyword)
803
804 END SUBROUTINE create_msst_section
805
806! **************************************************************************************************
807!> \brief section will contain some parameters for the shells dynamics
808!> \param section ...
809! **************************************************************************************************
810 SUBROUTINE create_shell_section(section)
811 TYPE(section_type), POINTER :: section
812
813 TYPE(keyword_type), POINTER :: keyword
814 TYPE(section_type), POINTER :: thermo_section
815
816 cpassert(.NOT. ASSOCIATED(section))
817
818 CALL section_create(section, __location__, name="shell", &
819 description="Parameters of shell model in adiabatic dynamics.", &
820 n_keywords=4, n_subsections=1, repeats=.false.)
821
822 NULLIFY (keyword, thermo_section)
823
824 CALL keyword_create(keyword, __location__, name="temperature", &
825 description="Temperature in K used to control "// &
826 "the internal velocities of the core-shell motion ", &
827 usage="temperature 5.0", &
828 default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
829 unit_str="K")
830 CALL section_add_keyword(section, keyword)
831 CALL keyword_release(keyword)
832
833 CALL keyword_create(keyword, __location__, name="temp_tol", &
834 description="Maximum accepted temperature deviation"// &
835 " from the expected value, for the internal core-shell motion."// &
836 " If 0, no rescaling is performed", &
837 usage="temp_tol 0.0", default_r_val=0.0_dp, unit_str='K')
838 CALL section_add_keyword(section, keyword)
839 CALL keyword_release(keyword)
840
841 CALL keyword_create(keyword, __location__, name="nose_particle", &
842 description="If nvt or npt, the core and shell velocities are controlled "// &
843 "by the same thermostat used for the particle. This might favour heat exchange "// &
844 "and additional rescaling of the internal core-shell velocity is needed (TEMP_TOL)", &
845 default_l_val=.false., lone_keyword_l_val=.true.)
846 CALL section_add_keyword(section, keyword)
847 CALL keyword_release(keyword)
848
849 CALL keyword_create(keyword, __location__, name="DISPLACEMENT_SHELL_TOL", &
850 description="This keyword sets a maximum variation of the shell"// &
851 " core distance in each Cartesian direction."// &
852 " The maximum internal core-shell velocity is evaluated and"// &
853 " if it is too large to remain"// &
854 " within the assigned limit, the time step is rescaled accordingly,"// &
855 " and the first half step of the velocity verlet is repeated.", &
856 usage="DISPLACEMENT_SHELL_TOL <REAL>", default_r_val=100.0_dp, &
857 unit_str='angstrom')
858 CALL section_add_keyword(section, keyword)
859 CALL keyword_release(keyword)
860
861 CALL create_thermostat_section(thermo_section)
862 CALL section_add_subsection(section, thermo_section)
863 CALL section_release(thermo_section)
864
865 END SUBROUTINE create_shell_section
866
867! **************************************************************************************************
868!> \brief section will contain some parameters for the adiabatic dynamics
869!> \param section ...
870! **************************************************************************************************
871 SUBROUTINE create_adiabatic_section(section)
872 TYPE(section_type), POINTER :: section
873
874 TYPE(keyword_type), POINTER :: keyword
875 TYPE(section_type), POINTER :: thermo_fast_section, thermo_slow_section
876
877 cpassert(.NOT. ASSOCIATED(section))
878
879 CALL section_create(section, __location__, name="ADIABATIC_DYNAMICS", &
880 description="Parameters used in canonical adiabatic free energy sampling (CAFES).", &
881 n_keywords=5, n_subsections=2, repeats=.false., &
882 citations=[vandevondele2002])
883
884 NULLIFY (keyword, thermo_fast_section, thermo_slow_section)
885
886 CALL keyword_create(keyword, __location__, name="temp_fast", &
887 description="Temperature in K used to control "// &
888 "the fast degrees of freedom ", &
889 usage="temp_fast 5.0", &
890 default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
891 unit_str="K")
892 CALL section_add_keyword(section, keyword)
893 CALL keyword_release(keyword)
894
895 CALL keyword_create(keyword, __location__, name="temp_slow", &
896 description="Temperature in K used to control "// &
897 "the slow degrees of freedom ", &
898 usage="temp_slow 5.0", &
899 default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
900 unit_str="K")
901 CALL section_add_keyword(section, keyword)
902 CALL keyword_release(keyword)
903
904 CALL keyword_create(keyword, __location__, name="temp_tol_fast", &
905 description="Maximum accepted temperature deviation"// &
906 " from the expected value, for the fast motion."// &
907 " If 0, no rescaling is performed", &
908 usage="temp_tol_fast 0.0", default_r_val=0.0_dp, unit_str='K')
909 CALL section_add_keyword(section, keyword)
910 CALL keyword_release(keyword)
911
912 CALL keyword_create(keyword, __location__, name="temp_tol_slow", &
913 description="Maximum accepted temperature deviation"// &
914 " from the expected value, for the slow motion."// &
915 " If 0, no rescaling is performed", &
916 usage="temp_tol_slow 0.0", default_r_val=0.0_dp, unit_str='K')
917 CALL section_add_keyword(section, keyword)
918 CALL keyword_release(keyword)
919
920 CALL keyword_create(keyword, __location__, name="n_resp_fast", &
921 description="number of respa steps for fast degrees of freedom", &
922 repeats=.false., default_i_val=1)
923 CALL section_add_keyword(section, keyword)
924 CALL keyword_release(keyword)
925
926 CALL create_thermo_fast_section(thermo_fast_section)
927 CALL section_add_subsection(section, thermo_fast_section)
928 CALL section_release(thermo_fast_section)
929
930 CALL create_thermo_slow_section(thermo_slow_section)
931 CALL section_add_subsection(section, thermo_slow_section)
932 CALL section_release(thermo_slow_section)
933
934 END SUBROUTINE create_adiabatic_section
935
936! **************************************************************************************************
937!> \brief section will contain parameters for the velocity softening
938!> \param section ...
939!> \author Ole Schuett
940! **************************************************************************************************
941 SUBROUTINE create_softening_section(section)
942 TYPE(section_type), POINTER :: section
943
944 TYPE(keyword_type), POINTER :: keyword
945
946 CALL section_create(section, __location__, name="VELOCITY_SOFTENING", &
947 description="A method to initialize the velocities along low-curvature " &
948 //"directions in order to favors MD trajectories to cross rapidly over " &
949 //"small energy barriers into neighboring basins. " &
950 //"In each iteration the forces are calculated at a point y, which " &
951 //"is slightly displaced from the current positions x in the direction " &
952 //"of the original velocities v. The velocities are then updated with " &
953 //"the force component F_t, which is perpendicular to N. " &
954 //"N = v / |v|; y = x + delta * N; F_t = F(y) - &lang; F(y) | N &rang; * N; " &
955 //"v' = v + alpha * F_t")
956
957 NULLIFY (keyword)
958 CALL keyword_create(keyword, __location__, name="STEPS", &
959 description="Number of softening iterations performed. " &
960 //"Typical values are around 40 steps.", &
961 default_i_val=0)
962 CALL section_add_keyword(section, keyword)
963 CALL keyword_release(keyword)
964
965 CALL keyword_create(keyword, __location__, name="DELTA", &
966 description="Displacement used to obtain y.", &
967 default_r_val=0.1_dp)
968 CALL section_add_keyword(section, keyword)
969 CALL keyword_release(keyword)
970
971 CALL keyword_create(keyword, __location__, name="ALPHA", &
972 description="Mixing factor used for updating velocities.", &
973 default_r_val=0.15_dp)
974 CALL section_add_keyword(section, keyword)
975 CALL keyword_release(keyword)
976
977 END SUBROUTINE create_softening_section
978
979! **************************************************************************************************
980!> \brief input section used to define regions with different temperature
981!> initialization and control
982!> \param section ...
983!> \par History
984!> - Added input for langevin regions in thermal regions section
985!> (2014/02/04, LT)
986! **************************************************************************************************
987 SUBROUTINE create_thermal_region_section(section)
988 TYPE(section_type), POINTER :: section
989
990 TYPE(keyword_type), POINTER :: keyword
991 TYPE(section_type), POINTER :: print_key, region_section, subsection, &
992 tfunc_section
993
994 cpassert(.NOT. ASSOCIATED(section))
995
996 CALL section_create(section, __location__, name="THERMAL_REGION", &
997 description="Define regions where different initialization and control "// &
998 "of the temperature is used. When MOTION%MD%ENSEMBLE is set to LANGEVIN, "// &
999 "this section controls if the atoms defined inside and outside the "// &
1000 "thermal regions should undergo Langevin MD or NVE Born-Oppenheimer MD. "// &
1001 "The theory behind Langevin MD using different regions can be found in "// &
1002 "articles by Kantorovitch et al. listed below.", &
1003 citations=[kantorovich2008, kantorovich2008a], &
1004 n_keywords=0, n_subsections=1, repeats=.false.)
1005
1006 NULLIFY (region_section)
1007 NULLIFY (keyword, subsection, tfunc_section)
1008
1009 CALL keyword_create(keyword, __location__, name="FORCE_RESCALING", &
1010 description="Control the rescaling ot the velocities in all the regions, "// &
1011 "according to the temperature assigned to each reagion, when "// &
1012 "RESTART_VELOCITY in EXT_RESTART is active.", &
1013 default_l_val=.false., lone_keyword_l_val=.true.)
1014 CALL section_add_keyword(section, keyword)
1015 CALL keyword_release(keyword)
1016
1017 CALL keyword_create(keyword, __location__, name="DO_LANGEVIN_DEFAULT", &
1018 description="If ENSEMBLE is set to LANGEVIN, controls whether the "// &
1019 "atoms NOT defined in the thermal regions to undergo langevin MD "// &
1020 "or not. If not, then the atoms will undergo NVE Born-Oppenheimer MD.", &
1021 usage="DO_LANGEVIN_DEFAULT .FALSE.", &
1022 default_l_val=.false., lone_keyword_l_val=.true.)
1023 CALL section_add_keyword(section, keyword)
1024 CALL keyword_release(keyword)
1025
1026 CALL section_create(region_section, __location__, name="DEFINE_REGION", &
1027 description="Define arbitrary thermal region with distinct "// &
1028 "temperature controls. For thermostat regions, see section "// &
1029 "MOTION%MD%THERMOSTAT%DEFINE_REGION; when the keyword "// &
1030 "MOTION%MD%THERMOSTAT%REGION is set to THERMAL, the "// &
1031 "definition of thermostat regions will be the same as "// &
1032 "that of thermal regions.", &
1033 n_keywords=3, n_subsections=1, repeats=.true.)
1034
1035 NULLIFY (keyword)
1036 CALL keyword_create(keyword, __location__, name="LIST", &
1037 description="Specifies a list of atoms belonging to the region.", &
1038 usage="LIST {integer} {integer} .. {integer}", &
1039 repeats=.true., n_var=-1, type_of_var=integer_t)
1040 CALL section_add_keyword(region_section, keyword)
1041 CALL keyword_release(keyword)
1042
1043 CALL keyword_create(keyword, __location__, name="MOLNAME", &
1044 variants=["SEGNAME"], &
1045 description="Specifies the name of the molecules belonging to the region.", &
1046 usage="MOLNAME WAT MEOH", repeats=.true., &
1047 n_var=-1, type_of_var=char_t)
1048 CALL section_add_keyword(region_section, keyword)
1049 CALL keyword_release(keyword)
1050
1051 CALL keyword_create(keyword, __location__, name="MM_SUBSYS", &
1052 variants=["PROTEIN"], &
1053 description="Not yet implemented: In a QM/MM run all "// &
1054 "MM atoms are specified as a whole region", &
1055 usage="MM_SUBSYS (NONE|ATOMIC|MOLECULAR)", &
1056 enum_c_vals=s2a("NONE", "ATOMIC", "MOLECULAR"), &
1058 enum_desc=s2a("Nothing in the region", &
1059 "Only the MM atoms itself", &
1060 "The full molecule/residue that contains a MM atom"), &
1061 default_i_val=do_constr_none, repeats=.false.)
1062 CALL section_add_keyword(region_section, keyword)
1063 CALL keyword_release(keyword)
1064
1065 CALL keyword_create(keyword, __location__, name="QM_SUBSYS", &
1066 description="Not yet implemented: In a QM/MM run all "// &
1067 "QM atoms are specified as a whole region", &
1068 usage="QM_SUBSYS (NONE|ATOMIC|MOLECULAR)", &
1069 enum_c_vals=s2a("NONE", "ATOMIC", "MOLECULAR"), &
1070 enum_desc=s2a("Nothing in the region", &
1071 "Only the QM atoms itself", &
1072 "The full molecule/residue that contains a QM atom"), &
1074 default_i_val=do_constr_none, repeats=.false.)
1075 CALL section_add_keyword(region_section, keyword)
1076 CALL keyword_release(keyword)
1077
1078 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
1079 description="The temperature in K used to initialize the velocities "// &
1080 "of the atoms in this region. It overrides the value evaluated by the "// &
1081 "function defined in TFUNC section.", &
1082 usage="TEMPERATURE 5.0", &
1083 default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="K"), &
1084 unit_str="K")
1085 CALL section_add_keyword(region_section, keyword)
1086 CALL keyword_release(keyword)
1087
1088 CALL keyword_create(keyword, __location__, name="TEMP_TOL", &
1089 description="Maximum accepted temperature deviation from the target "// &
1090 "value for this region, which is defined by TEMPERATURE or evaluated "// &
1091 "with the function defined in TFUNC section. Default value is 0 that "// &
1092 "turns off rescaling.", &
1093 usage="TEMP_TOL 0.0", &
1094 default_r_val=0.0_dp, unit_str='K')
1095 CALL section_add_keyword(region_section, keyword)
1096 CALL keyword_release(keyword)
1097
1098 CALL keyword_create(keyword, __location__, name="DO_LANGEVIN", &
1099 description="When ENSEMBLE is set to LANGEVIN, Controls whether "// &
1100 "the atoms in the thermal region should undergo Langevin MD. If "// &
1101 "not, then they will undergo NVE Born-Oppenheimer MD.", &
1102 usage="DO_LANGEVIN .TRUE.", &
1103 default_l_val=.true., lone_keyword_l_val=.true.)
1104 CALL section_add_keyword(region_section, keyword)
1105 CALL keyword_release(keyword)
1106
1107 CALL keyword_create(keyword, __location__, name="NOISY_GAMMA_REGION", &
1108 description="Special imaginary Langevin Friction term"// &
1109 " for Langevin Dynamics with noisy forces for the atoms in this region."// &
1110 " When set, overrides the general value set by NOISY_GAMMA in the MOTION%MD%LANGEVIN section."// &
1111 " When unset for a defined region, the general NOISY_GAMMA value applies.", &
1112 citations=[kuhne2007], usage="NOISY_GAMMA_REGION 4.0E-5", &
1113 type_of_var=real_t, &
1114 unit_str="fs^-1")
1115 CALL section_add_keyword(region_section, keyword)
1116 CALL keyword_release(keyword)
1117
1118 ! Define temperature function start
1119 CALL section_create(tfunc_section, __location__, name="TFUNC", &
1120 description="This section specifies the target temperature by using "// &
1121 "the time step and the temperature of the last step, allowing for "// &
1122 "simple region-wise simulated annealing (heating/cooling) controls. "// &
1123 "When the absolute difference between target and actual temperature "// &
1124 "is larger than TEMP_TOL value, the atomic velocities in this region "// &
1125 "are rescaled to match the target temperature. However, note that "// &
1126 "the actual temperature is subject to thermostat coupling as well "// &
1127 "and a small restrictive TEMP_TOL together with a rapidly varying "// &
1128 "target temperature function leaves little time for the system to "// &
1129 "adjust itself, possibly showing unphysical relaxation behaviors. "// &
1130 newline//newline//"Further notes about temperature. "//docf(), &
1131 n_keywords=4, n_subsections=0, repeats=.false.)
1132
1133 NULLIFY (keyword)
1134 CALL keyword_create(keyword, __location__, name="FUNCTION", &
1135 description="Specifies the functional form of the temperature "// &
1136 "in Kelvin in mathematical notation. Two variables are available "// &
1137 "with one denoted S for the integer time step and another denoted "// &
1138 "T for the temperature of the last step in Kelvin respectively. When "// &
1139 "DEFINE_REGION%TEMPERATURE is not explicitly set, the function "// &
1140 "will be evaluated at S set in MD%STEP_START_VAL and T = 0.0 "// &
1141 "to initialize the velocities of atoms in the region.", &
1142 usage="FUNCTION A*T+(1-A)*B*(2/(1+EXP(-0.001*S))-1)", &
1143 type_of_var=lchar_t, n_var=1)
1144 CALL section_add_keyword(tfunc_section, keyword)
1145 CALL keyword_release(keyword)
1146
1147 CALL keyword_create(keyword, __location__, name="PARAMETERS", &
1148 description="Defines the parameters of the functional form", &
1149 usage="PARAMETERS A B", type_of_var=char_t, &
1150 n_var=-1, repeats=.true.)
1151 CALL section_add_keyword(tfunc_section, keyword)
1152 CALL keyword_release(keyword)
1153
1154 CALL keyword_create(keyword, __location__, name="UNITS", &
1155 description="Optionally, allows to define valid CP2K unit strings for each parameter value. "// &
1156 "It is assumed that the corresponding parameter value is specified in this unit.", &
1157 usage="UNITS ", type_of_var=char_t, &
1158 n_var=-1, repeats=.true.)
1159 CALL section_add_keyword(tfunc_section, keyword)
1160 CALL keyword_release(keyword)
1161
1162 CALL keyword_create(keyword, __location__, name="VALUES", &
1163 description="Defines the values of the parameter of the functional form", &
1164 usage="VALUES 0.75 3.00E+2", type_of_var=real_t, &
1165 n_var=-1, repeats=.true., unit_str="internal_cp2k")
1166 CALL section_add_keyword(tfunc_section, keyword)
1167 CALL keyword_release(keyword)
1168
1169 CALL section_add_subsection(region_section, tfunc_section)
1170 CALL section_release(tfunc_section)
1171 ! Define temperature function end
1172
1173 CALL section_add_subsection(section, region_section)
1174 CALL section_release(region_section)
1175
1176 NULLIFY (print_key)
1177 CALL section_create(subsection, __location__, name="PRINT", &
1178 description="Collects all print_keys for thermal_regions", &
1179 n_keywords=1, n_subsections=0, repeats=.false.)
1180
1181 CALL cp_print_key_section_create(print_key, __location__, "TEMPERATURE", &
1182 description="Controls the output of the temperature per "// &
1183 "region. The first three columns are: step number, time "// &
1184 "(in fs), and the temperature of atoms not in any temperature "// &
1185 "region (or zero if all atoms are in some temperature region). "// &
1186 "Subsequent columns are, in pairs, the target value "// &
1187 "(calculated by TFUNC or specified by TEMPERATURE) "// &
1188 "and the actual value of the temperature for each region.", &
1189 print_level=high_print_level, common_iter_levels=1, &
1190 filename="")
1191 CALL section_add_subsection(subsection, print_key)
1192 CALL section_release(print_key)
1193
1194 CALL cp_print_key_section_create(print_key, __location__, "LANGEVIN_REGIONS", &
1195 description="Controls output of information on which atoms "// &
1196 "underwent Langevin MD and which atoms did not.", &
1197 print_level=high_print_level, &
1198 filename="")
1199 CALL section_add_subsection(subsection, print_key)
1200 CALL section_release(print_key)
1201
1202 CALL section_add_subsection(section, subsection)
1203 CALL section_release(subsection)
1204
1205 END SUBROUTINE create_thermal_region_section
1206
1207! **************************************************************************************************
1208!> \brief Defines the parameters for the setup of a cascade simulation
1209!> \param section ...
1210!> \date 03.02.2012
1211!> \author Matthias Krack (MK)
1212!> \version 1.0
1213! **************************************************************************************************
1214 SUBROUTINE create_cascade_section(section)
1215
1216 TYPE(section_type), POINTER :: section
1217
1218 TYPE(keyword_type), POINTER :: keyword
1219 TYPE(section_type), POINTER :: subsection
1220
1221 NULLIFY (keyword)
1222 NULLIFY (subsection)
1223 cpassert(.NOT. ASSOCIATED(section))
1224
1225 CALL section_create(section, __location__, name="CASCADE", &
1226 description="Defines the parameters for the setup of a cascade simulation.", &
1227 n_keywords=1, &
1228 n_subsections=1, &
1229 repeats=.false.)
1230
1231 CALL keyword_create(keyword, __location__, &
1232 name="_SECTION_PARAMETERS_", &
1233 description="Controls the activation of the CASCADE section.", &
1234 usage="&CASCADE on", &
1235 default_l_val=.false., &
1236 lone_keyword_l_val=.true.)
1237 CALL section_add_keyword(section, keyword)
1238 CALL keyword_release(keyword)
1239
1240 CALL keyword_create(keyword, __location__, name="ENERGY", &
1241 description="Total energy transferred to the system during the cascade event.", &
1242 usage="ENERGY 20.0", &
1243 default_r_val=0.0_dp, &
1244 unit_str="keV")
1245 CALL section_add_keyword(section, keyword)
1246 CALL keyword_release(keyword)
1247
1248 CALL section_create(subsection, __location__, name="ATOM_LIST", &
1249 description="Defines a list of atoms for which the initial velocities are modified", &
1250 n_keywords=1, &
1251 n_subsections=0, &
1252 repeats=.false.)
1253
1254 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1255 description="Defines the list of atoms for which the velocities are modified. "// &
1256 "Each record consists of the atomic index, the velocity vector, and "// &
1257 "a weight to define which fraction of the total energy is assigned "// &
1258 "to the current atom: `Atomic_index v_x v_y v_z Weight`", &
1259 usage="{{Integer} {Real} {Real} {Real} {Real}}", &
1260 repeats=.true., &
1261 type_of_var=lchar_t)
1262 CALL section_add_keyword(subsection, keyword)
1263 CALL keyword_release(keyword)
1264
1265 CALL section_add_subsection(section, subsection)
1266 CALL section_release(subsection)
1267
1268 END SUBROUTINE create_cascade_section
1269
1270! **************************************************************************************************
1271!> \brief Defines AVERAGES section
1272!> \param section ...
1273!> \author teo
1274! **************************************************************************************************
1275 SUBROUTINE create_avgs_section(section)
1276 TYPE(section_type), POINTER :: section
1277
1278 TYPE(keyword_type), POINTER :: keyword
1279 TYPE(section_type), POINTER :: print_key, subsection
1280
1281 cpassert(.NOT. ASSOCIATED(section))
1282 CALL section_create(section, __location__, name="Averages", &
1283 description="Controls the calculation of the averages during an MD run.", &
1284 n_keywords=1, n_subsections=1, repeats=.false.)
1285 NULLIFY (keyword, print_key, subsection)
1286
1287 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1288 description="Controls the calculations of the averages.", &
1289 usage="&AVERAGES T", default_l_val=.true., lone_keyword_l_val=.true.)
1290 CALL section_add_keyword(section, keyword)
1291 CALL keyword_release(keyword)
1292
1293 CALL keyword_create(keyword, __location__, name="ACQUISITION_START_TIME", &
1294 description="Setup up the simulation time when the acquisition process to compute"// &
1295 " averages is started.", &
1296 usage="ACQUISITION_START_TIME <REAL>", &
1297 default_r_val=0.0_dp, unit_str='fs')
1298 CALL section_add_keyword(section, keyword)
1299 CALL keyword_release(keyword)
1300
1301 CALL keyword_create(keyword, __location__, name="AVERAGE_COLVAR", &
1302 description="Switch for computing the averages of COLVARs.", &
1303 usage="AVERAGE_COLVAR <LOGICAL>", default_l_val=.false., &
1304 lone_keyword_l_val=.true.)
1305 CALL section_add_keyword(section, keyword)
1306 CALL keyword_release(keyword)
1307
1308 CALL cp_print_key_section_create(print_key, __location__, "PRINT_AVERAGES", &
1309 description="Controls the output the averaged quantities", &
1310 print_level=debug_print_level + 1, common_iter_levels=1, &
1311 filename="")
1312 CALL section_add_subsection(section, print_key)
1313 CALL section_release(print_key)
1314
1315 CALL create_avgs_restart_section(subsection)
1316 CALL section_add_subsection(section, subsection)
1317 CALL section_release(subsection)
1318 END SUBROUTINE create_avgs_section
1319
1320! **************************************************************************************************
1321!> \brief Defines the AVERAGES RESTART section
1322!> \param section ...
1323!> \author teo
1324! **************************************************************************************************
1325 SUBROUTINE create_avgs_restart_section(section)
1326 TYPE(section_type), POINTER :: section
1327
1328 TYPE(keyword_type), POINTER :: keyword
1329
1330 cpassert(.NOT. ASSOCIATED(section))
1331 CALL section_create(section, __location__, name="RESTART_AVERAGES", &
1332 description="Stores information for restarting averages.", &
1333 n_keywords=1, n_subsections=1, repeats=.false.)
1334 NULLIFY (keyword)
1335
1336 CALL keyword_create(keyword, __location__, name="ITIMES_START", &
1337 description="TIME STEP starting the evaluation of averages", &
1338 usage="ITIMES_START <INTEGER>", type_of_var=integer_t, n_var=1)
1339 CALL section_add_keyword(section, keyword)
1340 CALL keyword_release(keyword)
1341
1342 CALL keyword_create(keyword, __location__, name="AVECPU", &
1343 description="CPU average", usage="AVECPU <REAL>", &
1344 type_of_var=real_t, n_var=1)
1345 CALL section_add_keyword(section, keyword)
1346 CALL keyword_release(keyword)
1347
1348 CALL keyword_create(keyword, __location__, name="AVEHUGONIOT", &
1349 description="HUGONIOT average", usage="AVEHUGONIOT <REAL>", &
1350 type_of_var=real_t, n_var=1)
1351 CALL section_add_keyword(section, keyword)
1352 CALL keyword_release(keyword)
1353
1354 CALL keyword_create(keyword, __location__, name="AVETEMP_BARO", &
1355 description="BAROSTAT TEMPERATURE average", usage="AVETEMP_BARO <REAL>", &
1356 type_of_var=real_t, n_var=1)
1357 CALL section_add_keyword(section, keyword)
1358 CALL keyword_release(keyword)
1359
1360 CALL keyword_create(keyword, __location__, name="AVEPOT", &
1361 description="POTENTIAL ENERGY average", usage="AVEPOT <REAL>", &
1362 type_of_var=real_t, n_var=1)
1363 CALL section_add_keyword(section, keyword)
1364 CALL keyword_release(keyword)
1365
1366 CALL keyword_create(keyword, __location__, name="AVEKIN", &
1367 description="KINETIC ENERGY average", usage="AVEKIN <REAL>", &
1368 type_of_var=real_t, n_var=1)
1369 CALL section_add_keyword(section, keyword)
1370 CALL keyword_release(keyword)
1371
1372 CALL keyword_create(keyword, __location__, name="AVETEMP", &
1373 description="TEMPERATURE average", usage="AVETEMP <REAL>", &
1374 type_of_var=real_t, n_var=1)
1375 CALL section_add_keyword(section, keyword)
1376 CALL keyword_release(keyword)
1377
1378 CALL keyword_create(keyword, __location__, name="AVEKIN_QM", &
1379 description="QM KINETIC ENERGY average in QMMM runs", usage="AVEKIN_QM <REAL>", &
1380 type_of_var=real_t, n_var=1)
1381 CALL section_add_keyword(section, keyword)
1382 CALL keyword_release(keyword)
1383
1384 CALL keyword_create(keyword, __location__, name="AVETEMP_QM", &
1385 description="QM TEMPERATURE average in QMMM runs", usage="AVETEMP_QM <REAL>", &
1386 type_of_var=real_t, n_var=1)
1387 CALL section_add_keyword(section, keyword)
1388 CALL keyword_release(keyword)
1389
1390 CALL keyword_create(keyword, __location__, name="AVEVOL", &
1391 description="VOLUME average", usage="AVEVOL <REAL>", &
1392 type_of_var=real_t, n_var=1)
1393 CALL section_add_keyword(section, keyword)
1394 CALL keyword_release(keyword)
1395
1396 CALL keyword_create(keyword, __location__, name="AVECELL_A", &
1397 description="CELL VECTOR A average", usage="AVECELL_A <REAL>", &
1398 type_of_var=real_t, n_var=1)
1399 CALL section_add_keyword(section, keyword)
1400 CALL keyword_release(keyword)
1401
1402 CALL keyword_create(keyword, __location__, name="AVECELL_B", &
1403 description="CELL VECTOR B average", usage="AVECELL_B <REAL>", &
1404 type_of_var=real_t, n_var=1)
1405 CALL section_add_keyword(section, keyword)
1406 CALL keyword_release(keyword)
1407
1408 CALL keyword_create(keyword, __location__, name="AVECELL_C", &
1409 description="CELL VECTOR C average", usage="AVECELL_C <REAL>", &
1410 type_of_var=real_t, n_var=1)
1411 CALL section_add_keyword(section, keyword)
1412 CALL keyword_release(keyword)
1413
1414 CALL keyword_create(keyword, __location__, name="AVEALPHA", &
1415 description="ALPHA cell angle average", usage="AVEALPHA <REAL>", &
1416 type_of_var=real_t, n_var=1)
1417 CALL section_add_keyword(section, keyword)
1418 CALL keyword_release(keyword)
1419
1420 CALL keyword_create(keyword, __location__, name="AVEBETA", &
1421 description="BETA cell angle average", usage="AVEBETA <REAL>", &
1422 type_of_var=real_t, n_var=1)
1423 CALL section_add_keyword(section, keyword)
1424 CALL keyword_release(keyword)
1425
1426 CALL keyword_create(keyword, __location__, name="AVEGAMMA", &
1427 description="GAMMA cell angle average", usage="AVEGAMMA <REAL>", &
1428 type_of_var=real_t, n_var=1)
1429 CALL section_add_keyword(section, keyword)
1430 CALL keyword_release(keyword)
1431
1432 CALL keyword_create(keyword, __location__, name="AVE_ECONS", &
1433 description="CONSTANT ENERGY average", usage="AVE_ECONS <REAL>", &
1434 type_of_var=real_t, n_var=1)
1435 CALL section_add_keyword(section, keyword)
1436 CALL keyword_release(keyword)
1437
1438 CALL keyword_create(keyword, __location__, name="AVE_PRESS", &
1439 description="PRESSURE average", usage="AVE_PRESS <REAL>", &
1440 type_of_var=real_t, n_var=1)
1441 CALL section_add_keyword(section, keyword)
1442 CALL keyword_release(keyword)
1443
1444 CALL keyword_create(keyword, __location__, name="AVE_PXX", &
1445 description="P_{XX} average", usage="AVE_PXX <REAL>", &
1446 type_of_var=real_t, n_var=1)
1447 CALL section_add_keyword(section, keyword)
1448 CALL keyword_release(keyword)
1449
1450 CALL keyword_create(keyword, __location__, name="AVE_PV_VIR", &
1451 description="PV VIRIAL average", usage="AVE_PV_VIR <REAL> .. <REAL>", &
1452 type_of_var=real_t, n_var=9)
1453 CALL section_add_keyword(section, keyword)
1454 CALL keyword_release(keyword)
1455
1456 CALL keyword_create(keyword, __location__, name="AVE_PV_TOT", &
1457 description="PV TOTAL average", usage="AVE_PV_TOT <REAL> .. <REAL>", &
1458 type_of_var=real_t, n_var=9)
1459 CALL section_add_keyword(section, keyword)
1460 CALL keyword_release(keyword)
1461
1462 CALL keyword_create(keyword, __location__, name="AVE_PV_KIN", &
1463 description="PV KINETIC average", usage="AVE_PV_KIN <REAL> .. <REAL>", &
1464 type_of_var=real_t, n_var=9)
1465 CALL section_add_keyword(section, keyword)
1466 CALL keyword_release(keyword)
1467
1468 CALL keyword_create(keyword, __location__, name="AVE_PV_CNSTR", &
1469 description="PV CONSTRAINTS average", usage="AVE_PV_CNSTR <REAL> .. <REAL>", &
1470 type_of_var=real_t, n_var=9)
1471 CALL section_add_keyword(section, keyword)
1472 CALL keyword_release(keyword)
1473
1474 CALL keyword_create(keyword, __location__, name="AVE_PV_XC", &
1475 description="PV XC average", usage="AVE_PV_XC <REAL> .. <REAL>", &
1476 type_of_var=real_t, n_var=9)
1477 CALL section_add_keyword(section, keyword)
1478 CALL keyword_release(keyword)
1479
1480 CALL keyword_create(keyword, __location__, name="AVE_PV_FOCK_4C", &
1481 description="PV XC average", usage="AVE_PV_FOCK_4C <REAL> .. <REAL>", &
1482 type_of_var=real_t, n_var=9)
1483 CALL section_add_keyword(section, keyword)
1484 CALL keyword_release(keyword)
1485
1486 CALL keyword_create(keyword, __location__, name="AVE_COLVARS", &
1487 description="COLVARS averages", usage="AVE_COLVARS <REAL> .. <REAL>", &
1488 type_of_var=real_t, n_var=-1)
1489 CALL section_add_keyword(section, keyword)
1490 CALL keyword_release(keyword)
1491
1492 CALL keyword_create(keyword, __location__, name="AVE_MMATRIX", &
1493 description="METRIC TENSOR averages", usage="AVE_MMATRIX <REAL> .. <REAL>", &
1494 type_of_var=real_t, n_var=-1)
1495 CALL section_add_keyword(section, keyword)
1496 CALL keyword_release(keyword)
1497 END SUBROUTINE create_avgs_restart_section
1498
1499! **************************************************************************************************
1500!> \brief Defines the INITIAL_VIBRATION section
1501!> \param section ...
1502!> \author Lianheng Tong
1503! **************************************************************************************************
1504 SUBROUTINE create_vib_init_section(section)
1505 TYPE(section_type), POINTER :: section
1506
1507 TYPE(keyword_type), POINTER :: keyword
1508
1509 cpassert(.NOT. ASSOCIATED(section))
1510 CALL section_create(section, __location__, name="INITIAL_VIBRATION", &
1511 description="Controls the set of parameters for MD initialisation "// &
1512 "based on vibration analysis data. The starting atomic coordinates "// &
1513 "should be based on the relaxed positions obtained from a previous "// &
1514 "geometry/cell optimisation calculation, and the vibrational "// &
1515 "frequencies and displacements data should be obtained from a "// &
1516 "vibrational analysis calculation done based on the relaxed "// &
1517 "coordinates. The MD initialisation process expects the user has "// &
1518 "performed both geometry optimisation and vibrational analysis "// &
1519 "before hand, and won't perform those calculations automatically ", &
1520 citations=[west2006], &
1521 n_keywords=0, n_subsections=1, repeats=.false.)
1522 NULLIFY (keyword)
1523 CALL keyword_create(keyword, __location__, name="VIB_EIGS_FILE_NAME", &
1524 description="The file name of vibrational frequency (eigenvalue) "// &
1525 "and displacement (eigenvector) data calculated from the a "// &
1526 "vibrational analysis calculation done previously. This file must "// &
1527 "be the same unformatted binary file as referred to by "// &
1528 "VIBRATIONAL_ANALYSIS%PRINT%CARTESIAN_EIGS keyword. If this keyword "// &
1529 "is not explicitly defined by the user, then the default file "// &
1530 "name of: <project_name>-<CARTESIAN_EIGS_FILENAME>.eig will be used", &
1531 usage="VIB_EIGS_FILE_NAME <FILENAME>", &
1532 type_of_var=lchar_t)
1533 CALL section_add_keyword(section, keyword)
1534 CALL keyword_release(keyword)
1535 NULLIFY (keyword)
1536 CALL keyword_create(keyword, __location__, name="PHASE", &
1537 description="Controls the initial ratio of potential and kinetic "// &
1538 "contribution to the total energy. The contribution is determined by "// &
1539 "COS**2(2*pi*PHASE) for potential energy, and SIN**2(2*pi*PHASE) "// &
1540 "for kinetic energy. If PHASE is negative, then for each vibration "// &
1541 "mode the phase is determined randomly. Otherwise, PHASE must be "// &
1542 "between 0.0 and 1.0 and will be the same for all vibration modes. "// &
1543 "If value > 1.0 it will just be treated as 1.0. "// &
1544 "For example, setting PHASE = 0.25 would set all modes to "// &
1545 "begin with entirely kinetic energy --- in other words, the initial "// &
1546 "atomic positions will remain at their optimised location", &
1547 default_r_val=-1.0_dp, &
1548 usage="PHASE <REAL>")
1549 CALL section_add_keyword(section, keyword)
1550 CALL keyword_release(keyword)
1551 END SUBROUTINE create_vib_init_section
1552
1553END MODULE input_cp2k_md
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public rengaraj2020
integer, save, public vandevondele2002
integer, save, public west2006
integer, save, public tuckerman1992
integer, save, public kuhne2007
integer, save, public ricci2003
integer, save, public guidon2008
integer, save, public kantorovich2008
integer, save, public minary2003
integer, save, public kantorovich2008a
integer, save, public evans1983
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
unit conversion facility
Definition cp_units.F:30
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Definition cp_units.F:1210
This public domain function parser module is intended for applications where a set of mathematical ex...
Definition fparser.F:17
character(len=:) function, allocatable, public docf()
...
Definition fparser.F:1151
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_constr_atomic
integer, parameter, public nvt_adiabatic_ensemble
integer, parameter, public nph_uniaxial_ensemble
integer, parameter, public npt_i_ensemble
integer, parameter, public isokin_ensemble
integer, parameter, public nph_uniaxial_damped_ensemble
integer, parameter, public npe_f_ensemble
integer, parameter, public langevin_ensemble
integer, parameter, public npe_i_ensemble
integer, parameter, public do_constr_molec
integer, parameter, public md_init_default
integer, parameter, public npt_ia_ensemble
integer, parameter, public nve_ensemble
integer, parameter, public npt_f_ensemble
integer, parameter, public do_constr_none
integer, parameter, public md_init_vib
integer, parameter, public reftraj_ensemble
integer, parameter, public nvt_ensemble
integer, parameter, public nph_ensemble
subroutine, public create_barostat_section(section)
...
subroutine, public create_md_section(section)
...
subroutine, public create_thermo_fast_section(section, coupled_thermostat)
Specifies parameter for thermostat for constant temperature ensembles.
subroutine, public create_thermo_slow_section(section, coupled_thermostat)
Specifies parameter for thermostat for constant temperature ensembles.
subroutine, public create_thermostat_section(section, coupled_thermostat)
Specifies parameter for thermostat for constant temperature ensembles.
subroutine, public create_region_section(section, label)
Creates a section to arbitrary define a region to thermostat.
represents keywords in an input
subroutine, public keyword_release(keyword)
releases the given keyword (see doc/ReferenceCounting.html)
subroutine, public keyword_create(keyword, location, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations, deprecation_notice, removed)
creates a keyword object
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_create(section, location, name, description, n_keywords, n_subsections, repeats, citations, deprecation_notice)
creates a list of keywords
subroutine, public section_add_keyword(section, keyword)
adds a keyword to the given section
subroutine, public section_add_subsection(section, subsection)
adds a subsection to the given section
recursive subroutine, public section_release(section)
releases the given keyword list (see doc/ReferenceCounting.html)
a wrapper for basic fortran types.
integer, parameter, public real_t
integer, parameter, public lchar_t
integer, parameter, public char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
initialization of the reftraj structure used to analyse previously generated trajectories
integer, parameter, public reftraj_wrap_central
integer, parameter, public reftraj_wrap_positive
integer, parameter, public reftraj_eval_energy
integer, parameter, public reftraj_wrap_none
integer, parameter, public reftraj_eval_energy_forces
integer, parameter, public reftraj_eval_none
Utilities for string manipulations.
character(len=1), parameter, public newline
represent a keyword in the input
represent a section of the input file