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