(git:374b731)
Loading...
Searching...
No Matches
input_cp2k_tmc.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \par History
10!> 06.2013 split input_cp2k into smaller modules
11!> \author Mandes
12! **************************************************************************************************
24 USE input_val_types, ONLY: char_t,&
25 integer_t,&
26 real_t
27 USE kinds, ONLY: dp
30#include "../base/base_uses.f90"
31
32 IMPLICIT NONE
33 PRIVATE
34
35 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
36 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_tmc'
37
38 PUBLIC :: create_tmc_section
39
40CONTAINS
41
42! **************************************************************************************************
43!> \brief creates the TreeMonteCarlo subsection
44!> \param section the section to be created
45!> \author Mandes
46! **************************************************************************************************
47 SUBROUTINE create_tmc_section(section)
48 TYPE(section_type), POINTER :: section
49
50 TYPE(keyword_type), POINTER :: keyword
51 TYPE(section_type), POINTER :: subsection
52
53 cpassert(.NOT. ASSOCIATED(section))
54 CALL section_create( &
55 section, __location__, name="TMC", &
56 description="A parallelized MC algorithm, presampling the configurations, espacially the Markov chain elements", &
57 citations=(/schonherr2014/), &
58 n_keywords=1, n_subsections=1, repeats=.false.)
59
60 NULLIFY (keyword, subsection)
61
62 ! size of a group calculating the exact energy
63 CALL keyword_create(keyword, __location__, &
64 name="GROUP_ENERGY_SIZE", &
65 description="amount of CPUs per group for energy calculation", &
66 usage="GROUP_ENERGY_SIZE {INTEGER}", &
67 default_i_val=1)
68 CALL section_add_keyword(section, keyword)
69 CALL keyword_release(keyword)
70
71 ! size of a group calculating the exact energy
72 CALL keyword_create(keyword, __location__, &
73 name="GROUP_ENERGY_NR", &
74 description="amount of groups for exact energy calculation", &
75 usage="GROUP_ENERGY_NR {INTEGER}", &
76 default_i_val=1)
77 CALL section_add_keyword(section, keyword)
78 CALL keyword_release(keyword)
79
80 ! size of a group calculating the exact energy
81 CALL keyword_create(keyword, __location__, &
82 name="GROUP_CC_SIZE", &
83 description="amount of of CPUs per group for configurational change", &
84 usage="GROUP_CC_SIZE {INTEGER}", &
85 default_i_val=0)
86 CALL section_add_keyword(section, keyword)
87 CALL keyword_release(keyword)
88
89 ! size of a group calculating the exact energy
90 CALL keyword_create(keyword, __location__, &
91 name="GROUP_ANLYSIS_NR", &
92 description="amount of groups (cores) for analysing the configurations", &
93 usage="GROUP_ANALYSIS_NR {INTEGER}", &
94 default_i_val=1, lone_keyword_i_val=1)
95 CALL section_add_keyword(section, keyword)
96 CALL keyword_release(keyword)
97
98 CALL keyword_create(keyword, __location__, &
99 name="NUM_MC_ELEM", &
100 description="the minimum Markov Chain elements, to be sampled", &
101 usage="NUM_MC_ELEM {INTEGER}", &
102 default_i_val=-1)
103 CALL section_add_keyword(section, keyword)
104 CALL keyword_release(keyword)
105
106 ! the start value for the random number generator
107 CALL keyword_create(keyword, __location__, &
108 name="RND_DETERMINISTIC", &
109 description="the initialisation number for the random number generator", &
110 usage="RND_INIT {INTEGER}", &
111 default_i_val=-1)
112 CALL section_add_keyword(section, keyword)
113 CALL keyword_release(keyword)
114
115 CALL keyword_create(keyword, __location__, &
116 name="TASK_TYPE", &
117 description="Select specialized types. Selectable: "// &
118 "IDEAL_GAS (constant configuration energy E=0.0)", &
119 usage="TASK_TYPE {OPTION}", &
120 default_c_val="", lone_keyword_c_val=tmc_default_unspecified_name)
121 CALL section_add_keyword(section, keyword)
122 CALL keyword_release(keyword)
123
124 CALL keyword_create(keyword, __location__, &
125 name="NR_TEMPERATURE", &
126 description="the number of different temperature for parallel tempering", &
127 usage="NR_TEMP {INTEGER}", &
128 default_i_val=1)
129 CALL section_add_keyword(section, keyword)
130 CALL keyword_release(keyword)
131
132 CALL keyword_create(keyword, __location__, &
133 name="TEMPERATURE", &
134 description="one temperature OR for parallel tempering: "// &
135 "Tmin Tmax or each temperature T1 T2 T3 ..."// &
136 " If every single temperature is specified, "// &
137 "do NOT use keyword NR_TEMPERATURE", &
138 usage="TEMPERATURE {REAL} |OR| TEMPERATURE {REAL} {REAL} ...", &
139 default_r_vals=(/330.0_dp/), &
140 n_var=-1, type_of_var=real_t)
141 CALL section_add_keyword(section, keyword)
142 CALL keyword_release(keyword)
143
144 CALL keyword_create(keyword, __location__, &
145 name="NUM_MV_ELEM_IN_CELL", &
146 description="the number of elements (atoms or molecules) "// &
147 "moves in cell or sub box. "// &
148 "if 0 all elements are moved once in a MC move", &
149 usage="NUM_MV_ELEM_IN_CELL {INTEGER}", &
150 default_i_val=0)
151 CALL section_add_keyword(section, keyword)
152 CALL keyword_release(keyword)
153
154! CALL keyword_create(keyword, __LOCATION__,&
155! name="NR_NMC_STEPS",&
156! description="the number of Nested Mont Carlo moves with in one MC move "//&
157! "should be huge enough to reach euilibrium state", &
158! usage="NR_NMC_STEPS {INTEGER}",&
159! default_i_val=-1)
160! CALL section_add_keyword(section,keyword)
161! CALL keyword_release(keyword)
162
163 ! the moves MOVE_TYPE on exact potential
164 CALL create_tmc_move_type_section(subsection)
165 CALL section_add_subsection(section, subsection)
166 CALL section_release(subsection)
167
168 ! the moves MOVE_TYPE on approx potential
169 CALL create_tmc_nmc_move_type_section(subsection)
170 CALL section_add_subsection(section, subsection)
171 CALL section_release(subsection)
172
173 CALL keyword_create(keyword, __location__, &
174 name="SUB_BOX", &
175 description="specifies the size ot the sub box. "// &
176 "Standard moves only within subbox of random position, "// &
177 "to compensate the potential difference of the approximate potential.", &
178 usage="SUB_BOX {REAL} {REAL} {REAL} OR SUB_BOX {REAL} for cubic", &
179 default_r_vals=(/-1.0_dp/), &
180 n_var=-1, type_of_var=real_t)
181 CALL section_add_keyword(section, keyword)
182 CALL keyword_release(keyword)
183
184 CALL keyword_create(keyword, __location__, &
185 name="PRESSURE", &
186 description="enables NPT calculation with specified constant pressure [bar]", &
187 usage="PRESSURE {REAL}", &
188 default_r_val=-1.0_dp)
189 CALL section_add_keyword(section, keyword)
190 CALL keyword_release(keyword)
191
192 CALL keyword_create(keyword, __location__, &
193 name="VOLUME_ISOTROPIC", &
194 description="volume move is equal in each direction", &
195 usage="VOLUME_ISOTROPIC {LOGICAL}", &
196 default_l_val=.true., lone_keyword_l_val=.true.)
197 CALL section_add_keyword(section, keyword)
198 CALL keyword_release(keyword)
199
200 CALL keyword_create(keyword, __location__, &
201 name="MOVE_CENTER_OF_MASS", &
202 description="Moves the center of mass of defined molecules (in volume moves)", &
203 usage="MOVE_CENTER_OF_MASS {LOGICAL}", &
204 default_l_val=.false., lone_keyword_l_val=.true.)
205 CALL section_add_keyword(section, keyword)
206 CALL keyword_release(keyword)
207
208 CALL keyword_create(keyword, __location__, &
209 name="ESIMATE_ACC_PROB", &
210 description="set the estimation of the acceptance probability using run time information of the energy", &
211 usage="ESIMATE_ACC_PROB {LOGICAL}", &
212 default_l_val=.true.)
213 CALL section_add_keyword(section, keyword)
214 CALL keyword_release(keyword)
215
216 CALL keyword_create(keyword, __location__, &
217 name="SPECULATIVE_CANCELING", &
218 description="enables or disables the speculative canceling. If we have further knowledge of "// &
219 "acceptance probabilities using parent acceptance or the estimated energy.", &
220 usage="SPECULATIVE_CANCELING {LOGICAL}", &
221 default_l_val=.true.)
222 CALL section_add_keyword(section, keyword)
223 CALL keyword_release(keyword)
224
225 CALL keyword_create(keyword, __location__, &
226 name="USE_SCF_ENERGY_INFO", &
227 description="enables or disables the usage of SCF energy information for "// &
228 "estimating the acceptance probability.", &
229 usage="USE_SCF_ENERGY_INFO {LOGICAL}", &
230 default_l_val=.false., lone_keyword_l_val=.true.)
231 CALL section_add_keyword(section, keyword)
232 CALL keyword_release(keyword)
233
234 CALL keyword_create(keyword, __location__, &
235 name="RESULT_LIST_IN_MEMORY", &
236 description="enables the storing of the whole Markov Chain", &
237 usage="RESULT_LIST_IN_MEMORY {LOGICAL}", &
238 default_l_val=.false.)
239 CALL section_add_keyword(section, keyword)
240 CALL keyword_release(keyword)
241
242 CALL keyword_create(keyword, __location__, &
243 name="INFO_OUT_STEP_SIZE", &
244 description="the number the amount of calculated configurations between to output printings.", &
245 usage="INFO_OUT_STEP_SIZE {INTEGER}", &
246 default_i_val=1)
247 CALL section_add_keyword(section, keyword)
248 CALL keyword_release(keyword)
249
250 CALL keyword_create(keyword, __location__, &
251 name="RESTART_IN", &
252 description="if existing use the last restart file", &
253 usage="RESTART or RSTART {FILENAME}", &
254 default_c_val="", lone_keyword_c_val=tmc_default_unspecified_name)
255 CALL section_add_keyword(section, keyword)
256 CALL keyword_release(keyword)
257
258 CALL keyword_create(keyword, __location__, &
259 name="RESTART_OUT", &
260 description="Defines the frequency to write restart files. "// &
261 "If no frequency is specified (lone keyword) "// &
262 "the restart file is written at the end (only). "// &
263 "If the value is 0, no restart file is written at all. "// &
264 "The frequency specifies is related "// &
265 "to the calculated Markov chain elements", &
266 usage="RESTART or RESTART {INTEGER}", &
267 default_i_val=-1, lone_keyword_i_val=-9)
268 CALL section_add_keyword(section, keyword)
269 CALL keyword_release(keyword)
270
271 CALL keyword_create(keyword, __location__, name="ENERGY_FILE_NAME", &
272 description="input file name for the exact potential energy calculation.", &
273 usage="ENERGY_FILE_NAME {filename}", &
274 default_c_val="")
275 CALL section_add_keyword(section, keyword)
276 CALL keyword_release(keyword)
277
278! CALL keyword_create(keyword, __LOCATION__, name="NMC_FILE_NAME",&
279! description="input file name for the approximate potential for Nested Monte Carlo.",&
280! usage="NMC_FILE_NAME {filename}",&
281! default_c_val="",lone_keyword_c_val=tmc_default_unspecified_name)
282! CALL section_add_keyword(section,keyword)
283! CALL keyword_release(keyword)
284
285 CALL keyword_create(keyword, __location__, &
286 name="PRINT_ONLY_ACC", &
287 description="printing only accepted elements of the Markov Chain.", &
288 usage="PRINT_ONLY_ACC {LOGICAL}", &
289 default_l_val=.true., lone_keyword_l_val=.true.)
290 CALL section_add_keyword(section, keyword)
291 CALL keyword_release(keyword)
292
293 CALL keyword_create(keyword, __location__, &
294 name="PRINT_COORDS", &
295 description="printing coordinates of the Markov Chain elements", &
296 usage="PRINT_COORDS {LOGICAL}", &
297 default_l_val=.true., lone_keyword_l_val=.true.)
298 CALL section_add_keyword(section, keyword)
299 CALL keyword_release(keyword)
300
301 CALL keyword_create(keyword, __location__, &
302 name="PRINT_FORCES", &
303 description="printing forces of the Markov Chain elements", &
304 usage="PRINT_FORCES {LOGICAL}", &
305 default_l_val=.false., lone_keyword_l_val=.true.)
306 CALL section_add_keyword(section, keyword)
307 CALL keyword_release(keyword)
308
309 CALL keyword_create(keyword, __location__, &
310 name="PRINT_DIPOLE", &
311 description="enables the calculation and printing the exact cell dipoles"// &
312 " (only for QS methods)", &
313 usage="PRINT_DIPOLE {LOGICAL}", &
314 default_l_val=.false., lone_keyword_l_val=.true.)
315 CALL section_add_keyword(section, keyword)
316 CALL keyword_release(keyword)
317
318 CALL keyword_create(keyword, __location__, &
319 name="PRINT_CELL", &
320 description="printing the cell vectors of the Markov Chain elements", &
321 usage="PRINT_CELL {LOGICAL}", &
322 default_l_val=.false., lone_keyword_l_val=.true.)
323 CALL section_add_keyword(section, keyword)
324 CALL keyword_release(keyword)
325
326 CALL keyword_create(keyword, __location__, &
327 name="PRINT_ENERGIES", &
328 description="printing the different calculated energies (approximated, scf and exact)", &
329 usage="PRINT_ENERGIES {LOGICAL}", &
330 default_l_val=.false., lone_keyword_l_val=.true.)
331 CALL section_add_keyword(section, keyword)
332 CALL keyword_release(keyword)
333
334 CALL keyword_create(keyword, __location__, name="DOT_TREE", &
335 description="file name for GrapgViz dot file", &
336 usage="DOT_TREE {filename}", &
337 default_c_val="", lone_keyword_c_val=tmc_default_dot_file_name)
338 CALL section_add_keyword(section, keyword)
339 CALL keyword_release(keyword)
340
341 CALL keyword_create(keyword, __location__, name="ALL_CONF_FILE_NAME", &
342 description="file name for printing every single calculated configuration (e.g. for fitting).", &
343 usage="ALL_CONF_FILE_NAME {filename}", &
344 default_lc_val="")
345 CALL section_add_keyword(section, keyword)
346 CALL keyword_release(keyword)
347
348 CALL keyword_create(keyword, __location__, &
349 name="PRINT_TEST_OUTPUT", &
350 description="printing different values for regtest comparison", &
351 usage="PRINT_TEST_OUTPUT {LOGICAL}", &
352 default_l_val=.false., lone_keyword_l_val=.true.)
353 CALL section_add_keyword(section, keyword)
354 CALL keyword_release(keyword)
355
356 CALL create_tmc_ana_section(subsection)
357 CALL section_add_subsection(section, subsection)
358 CALL section_release(subsection)
359
360 CALL create_tmc_ana_files(subsection)
361 CALL section_add_subsection(section, subsection)
362 CALL section_release(subsection)
363
364 END SUBROUTINE create_tmc_section
365
366! **************************************************************************************************
367!> \brief creates the TMC section to select the move types performed within the
368!> NMC (on approximate potential)
369!> \param section the section to be created
370!> \author Mandes
371! **************************************************************************************************
372 SUBROUTINE create_tmc_nmc_move_type_section(section)
373 TYPE(section_type), POINTER :: section
374
375 TYPE(keyword_type), POINTER :: keyword
376 TYPE(section_type), POINTER :: subsection
377
378 NULLIFY (subsection)
379
380 cpassert(.NOT. ASSOCIATED(section))
381 CALL section_create(section, __location__, name="NMC_MOVES", &
382 description="This section specifies the TMC move types, "// &
383 "which are performed within the nested Monte Carlo (NMC). "// &
384 "thus using the approximate potential.", &
385 n_keywords=1, n_subsections=0, repeats=.true.)
386
387 NULLIFY (keyword)
388
389 CALL keyword_create(keyword, __location__, &
390 name="NR_NMC_STEPS", &
391 description="the number of Nested Mont Carlo moves with in one MC move "// &
392 "should be huge enough to reach euilibrium state", &
393 usage="NR_NMC_STEPS {INTEGER}", &
394 default_i_val=-1)
395 CALL section_add_keyword(section, keyword)
396 CALL keyword_release(keyword)
397
398 CALL keyword_create(keyword, __location__, name="NMC_FILE_NAME", &
399 description="input file name for the approximate potential for Nested Monte Carlo.", &
400 usage="NMC_FILE_NAME {filename}", &
401 default_c_val="", lone_keyword_c_val=tmc_default_unspecified_name)
402 CALL section_add_keyword(section, keyword)
403 CALL keyword_release(keyword)
404
405 CALL keyword_create(keyword, __location__, name="PROB", &
406 description="Defines the probability of the NMC move "// &
407 "(considering the ration between the selected other moves) "// &
408 "the probabilities of the move types in the NMC section "// &
409 "defines only the weight within the NMC steps", &
410 usage="PROB {real}", type_of_var=real_t, &
411 default_r_val=1.0_dp)
412 CALL section_add_keyword(section, keyword)
413 CALL keyword_release(keyword)
414
415 CALL keyword_create(keyword, __location__, name="INIT_ACC_PROB", &
416 description="Defines the initial probability of accepting the move. ", &
417 usage="INIT_ACC_PROB {real}", type_of_var=real_t, &
418 default_r_val=0.5_dp, n_var=1)
419 CALL section_add_keyword(section, keyword)
420 CALL keyword_release(keyword)
421
422 ! the moves types
423 CALL create_tmc_move_type_section(subsection)
424 CALL section_add_subsection(section, subsection)
425 CALL section_release(subsection)
426 END SUBROUTINE create_tmc_nmc_move_type_section
427
428! **************************************************************************************************
429!> \brief creates the TMC section to select the move types
430!> \param section the section to be created
431!> \author Mandes
432! **************************************************************************************************
433 SUBROUTINE create_tmc_move_type_section(section)
434 TYPE(section_type), POINTER :: section
435
436 TYPE(keyword_type), POINTER :: keyword
437
438 cpassert(.NOT. ASSOCIATED(section))
439 CALL section_create(section, __location__, name="MOVE_TYPE", &
440 description="This section specifies the TMC move type, "// &
441 "and its properties. "// &
442 "Selectable types are: "// &
443 "ATOM_TRANS atom translation, "// &
444 "MOL_TRANS molecule translation, "// &
445 "MOL_ROT molecule rotation, "// &
446 "PROT_REORDER proton reordering, "// &
447 "PT_SWAP Parallel Tempering swap, "// &
448 "VOL_MOVE volume change, "// &
449 "ATOM_SWAP swaps two atoms of different type.", &
450 n_keywords=1, n_subsections=0, repeats=.true.)
451
452 NULLIFY (keyword)
453
454 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
455 description="The name of the move type described in this section.", &
456 usage="ATOM_TRANS", default_c_val="DEFAULT")
457 CALL section_add_keyword(section, keyword)
458 CALL keyword_release(keyword)
459
460 CALL keyword_create(keyword, __location__, name="SIZE", &
461 description="Defines the size of the move: "// &
462 "ATOM_TRANS [A], "// &
463 "MOL_TRANS [A], "// &
464 "MOL_ROT [degree], "// &
465 "PROT_REORDER [], "// &
466 "VOL_MOVE [A], "// &
467 "ATOM_SWAP", &
468 usage="SIZE {real}", type_of_var=real_t, &
469 default_r_val=-1.0_dp, n_var=1)
470 CALL section_add_keyword(section, keyword)
471 CALL keyword_release(keyword)
472
473 CALL keyword_create(keyword, __location__, name="PROB", &
474 description="Defines the probability of the move "// &
475 "(considering the ration between the selected moves)", &
476 usage="PROB {real}", type_of_var=real_t, &
477 default_r_val=1.0_dp, n_var=1)
478 CALL section_add_keyword(section, keyword)
479 CALL keyword_release(keyword)
480
481 CALL keyword_create(keyword, __location__, name="INIT_ACC_PROB", &
482 description="Defines the initial probability of accepting the move. ", &
483 usage="INIT_ACC_PROB {real}", type_of_var=real_t, &
484 default_r_val=0.23_dp, n_var=1)
485 CALL section_add_keyword(section, keyword)
486 CALL keyword_release(keyword)
487
488 CALL keyword_create(keyword, __location__, name="ATOMS", &
489 description="Defines the atomic kinds involved in the move. "// &
490 "Up to now only used for the atom swap.", &
491 usage="ATOMS {KIND1} {KIND2} ... ", type_of_var=char_t, &
492 n_var=-1, repeats=.true.)
493 CALL section_add_keyword(section, keyword)
494 CALL keyword_release(keyword)
495
496 END SUBROUTINE create_tmc_move_type_section
497
498! **************************************************************************************************
499!> \brief creates the TreeMonteCarlo subsection
500!> \param section the section to be created
501!> \author Mandes
502! **************************************************************************************************
503 SUBROUTINE create_tmc_ana_section(section)
504 TYPE(section_type), POINTER :: section
505
506 cpassert(.NOT. ASSOCIATED(section))
507 CALL section_create(section, __location__, name="TMC_ANALYSIS", &
508 description="Analysing the Markov Chain elements with the specified methods", &
509 n_keywords=1, n_subsections=1, repeats=.false.)
510
511 CALL create_tmc_ana_kinds(section=section)
512
513 END SUBROUTINE create_tmc_ana_section
514
515! **************************************************************************************************
516!> \brief creates the TreeMonteCarlo subsection
517!> \param section the section to be created
518!> \author Mandes
519! **************************************************************************************************
520 SUBROUTINE create_tmc_ana_files(section)
521 TYPE(section_type), POINTER :: section
522
523 TYPE(keyword_type), POINTER :: keyword
524
525 NULLIFY (keyword)
526
527 cpassert(.NOT. ASSOCIATED(section))
528 CALL section_create(section, __location__, name="TMC_ANALYSIS_FILES", &
529 description="Analysing the Markov Chain elements with the specified methods, "// &
530 "reading form default or specified files", &
531 n_keywords=1, n_subsections=1, repeats=.false.)
532
533 CALL create_tmc_ana_kinds(section=section)
534
535 CALL keyword_create(keyword, __location__, &
536 name="NR_TEMPERATURE", &
537 description="the number of different temperature for parallel tempering", &
538 usage="NR_TEMP {INTEGER}", &
539 default_i_val=1)
540 CALL section_add_keyword(section, keyword)
541 CALL keyword_release(keyword)
542
543 CALL keyword_create(keyword, __location__, &
544 name="TEMPERATURE", &
545 description="one temperature OR for parallel tempering: "// &
546 "Tmin Tmax or each temperature T1 T2 T3 ..."// &
547 " If every single temperature is specified, "// &
548 "do NOT use keyword NR_TEMPERATURE", &
549 usage="TEMPERATURE {REAL} |OR| TEMPERATURE {REAL} {REAL} ...", &
550 default_r_vals=(/330.0_dp/), &
551 n_var=-1, type_of_var=real_t)
552 CALL section_add_keyword(section, keyword)
553 CALL keyword_release(keyword)
554
555 CALL keyword_create(keyword, __location__, &
556 name="DIRECTORIES", &
557 description="Analysing multiple directories, "// &
558 "created by standard parallel MC (e.g. using TMC farming ", &
559 usage="DIRECTORIES {DIR1/} {DIR2/} ...", &
560 default_c_vals=(/"./"/), &
561 n_var=-1, type_of_var=char_t)
562 CALL section_add_keyword(section, keyword)
563 CALL keyword_release(keyword)
564
565 CALL keyword_create(keyword, __location__, name="FORCE_ENV_FILE", &
566 description="input file name for force env, "// &
567 "to get initial configuration with dimensions and cell", &
568 usage="FORCE_ENV_FILE {filename}", &
569 default_c_val="", lone_keyword_c_val="")
570 CALL section_add_keyword(section, keyword)
571 CALL keyword_release(keyword)
572
573 CALL keyword_create(keyword, __location__, name="POSITION_FILE", &
574 description="file name for analysing the position file", &
575 usage="POSITION_FILE {filename}", &
576 default_c_val="", lone_keyword_c_val="")
577 CALL section_add_keyword(section, keyword)
578 CALL keyword_release(keyword)
579
580 CALL keyword_create(keyword, __location__, name="CELL_FILE", &
581 description="file name for analysing the cell file", &
582 usage="CELL_FILE {filename}", &
583 default_c_val="", lone_keyword_c_val="")
584 CALL section_add_keyword(section, keyword)
585 CALL keyword_release(keyword)
586
587 CALL keyword_create(keyword, __location__, name="DIPOLE_FILE", &
588 description="file name for analysing the dipole file", &
589 usage="DIPOLE_FILE {filename}", &
590 default_c_val="", lone_keyword_c_val="")
591 CALL section_add_keyword(section, keyword)
592 CALL keyword_release(keyword)
593
594 CALL keyword_create(keyword, __location__, &
595 name="START_ELEM", &
596 description="start analysis at element with number #", &
597 usage="START_ELEM {INTEGER}", &
598 default_i_val=-1)
599 CALL section_add_keyword(section, keyword)
600 CALL keyword_release(keyword)
601
602 CALL keyword_create(keyword, __location__, &
603 name="END_ELEM", &
604 description="end analysis at element with number #", &
605 usage="END_ELEM {INTEGER}", &
606 default_i_val=-1)
607 CALL section_add_keyword(section, keyword)
608 CALL keyword_release(keyword)
609
610 END SUBROUTINE create_tmc_ana_files
611
612! **************************************************************************************************
613!> \brief creates the TreeMonteCarlo subsection
614!> \param section the section to be created
615!> \author Mandes
616! **************************************************************************************************
617 SUBROUTINE create_tmc_ana_kinds(section)
618 TYPE(section_type), POINTER :: section
619
620 TYPE(keyword_type), POINTER :: keyword
621 TYPE(section_type), POINTER :: subsection
622
623 NULLIFY (subsection, keyword)
624
625 CALL keyword_create(keyword, __location__, &
626 name="RESTART", &
627 description="Enables/disables the reading and writing of analysis restart files", &
628 usage="RESTART {LOGICAL}", &
629 default_l_val=.true., lone_keyword_l_val=.true.)
630 CALL section_add_keyword(section, keyword)
631 CALL keyword_release(keyword)
632
633 CALL keyword_create(keyword, __location__, name="PREFIX_ANA_FILES", &
634 description="specifies a prefix for all analysis files.", &
635 usage="ANA_FILES_PREFIX {prefix}", &
636 default_c_val="")
637 CALL section_add_keyword(section, keyword)
638 CALL keyword_release(keyword)
639
640 CALL keyword_create(keyword, __location__, &
641 name="DENSITY", &
642 description="Mass density in the simulation cell, or if specified in sub cubes", &
643 usage="DENSITY or DENSITY {INTEGER} {INTEGER} {INTEGER}", &
644 default_i_vals=(/1/), &
645 n_var=-1, type_of_var=integer_t)
646 CALL section_add_keyword(section, keyword)
647 CALL keyword_release(keyword)
648
649 CALL keyword_create(keyword, __location__, &
650 name="G_R", &
651 description="Radial Distribution Function for each pair of atoms "// &
652 "using the amount of specified bins within MAX(cell_length)/2", &
653 usage="G_R or G_R {INTEGER}", &
654 default_i_val=-1, lone_keyword_i_val=-1)
655 CALL section_add_keyword(section, keyword)
656 CALL keyword_release(keyword)
657
658 CALL keyword_create(keyword, __location__, &
659 name="CLASSICAL_DIPOLE_MOMENTS", &
660 description="calculates the classical dipole Moment. "// &
661 "Following flag specifies if they should be written. "// &
662 "Class. Dip. Mom. are also used to unfold the exact dipole moment. ", &
663 usage="CLASSICAL_DIPOLE_MOMENTS or CLASSICAL_DIPOLE_MOMENTS {LOGICAL}", &
664 default_l_val=.true., lone_keyword_l_val=.true.)
665 CALL section_add_keyword(section, keyword)
666 CALL keyword_release(keyword)
667
668 ! for calculating the classical dipole moment we need charges
669 CALL create_charge_section(subsection)
670 CALL section_add_subsection(section, subsection)
671 CALL section_release(subsection)
672
673 CALL keyword_create(keyword, __location__, &
674 name="DIPOLE_ANALYSIS", &
675 description="Enables analysis of dipole moments, espacially dielectric constant. "// &
676 "An additional type can be specified, e.g. analyzing ice structures. "// &
677 "using SYM_XYZ also dipoles (-x,y,z) .. .. (-x,-y,z).... (-x,-y-z) "// &
678 "are regarded, only use it if this configurations have "// &
679 "all the same energy.", &
680 usage="DIPOLE_ANALYSIS or DIPOLE_ANALYSIS {type}", &
681 default_c_val="", lone_keyword_c_val=tmc_default_unspecified_name)
682 CALL section_add_keyword(section, keyword)
683 CALL keyword_release(keyword)
684
685 CALL keyword_create(keyword, __location__, &
686 name="DEVIATION", &
687 description="Calculates the deviation of the position from the last configuration", &
688 usage="DEVIATION {LOGICAL}", &
689 default_l_val=.false., lone_keyword_l_val=.true.)
690 CALL section_add_keyword(section, keyword)
691 CALL keyword_release(keyword)
692 END SUBROUTINE create_tmc_ana_kinds
693
694END MODULE input_cp2k_tmc
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public schonherr2014
creates the mm section of the input
subroutine, public create_charge_section(section)
This section specifies the charge of the MM atoms.
subroutine, public create_tmc_section(section)
creates the TreeMonteCarlo subsection
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)
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 char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
tree nodes creation, searching, deallocation, references etc.
Definition tmc_stati.F:15
character(len= *), parameter, public tmc_default_unspecified_name
Definition tmc_stati.F:40
character(len= *), parameter, public tmc_default_dot_file_name
Definition tmc_stati.F:38
represent a keyword in the input
represent a section of the input file