-
Notifications
You must be signed in to change notification settings - Fork 1
/
input_cp2k_resp.F
535 lines (461 loc) · 30.6 KB
/
input_cp2k_resp.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
!--------------------------------------------------------------------------------------------------!
! CP2K: A general program to perform molecular dynamics simulations !
! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
! !
! SPDX-License-Identifier: GPL-2.0-or-later !
!--------------------------------------------------------------------------------------------------!
! **************************************************************************************************
!> \brief function that builds the resp section of the input
!> \par History
!> 02.2007 created
!> \author Joost VandeVondele
! **************************************************************************************************
MODULE input_cp2k_resp
USE bibliography, ONLY: Campana2009,&
Golze2015,&
Rappe1992
USE cp_output_handling, ONLY: add_last_numeric,&
cp_print_key_section_create,&
high_print_level,&
low_print_level
USE cp_units, ONLY: cp_unit_to_cp2k
USE input_constants, ONLY: &
do_resp_minus_x_dir, do_resp_minus_y_dir, do_resp_minus_z_dir, do_resp_x_dir, &
do_resp_y_dir, do_resp_z_dir, gaussian, use_cambridge_vdw_radii, use_uff_vdw_radii
USE input_keyword_types, ONLY: keyword_create,&
keyword_release,&
keyword_type
USE input_section_types, ONLY: section_add_keyword,&
section_add_subsection,&
section_create,&
section_release,&
section_type
USE input_val_types, ONLY: char_t,&
integer_t,&
real_t
USE kinds, ONLY: dp
USE string_utilities, ONLY: s2a
#include "./base/base_uses.f90"
IMPLICIT NONE
PRIVATE
LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_resp'
PUBLIC :: create_resp_section
CONTAINS
! **************************************************************************************************
!> \brief Creates the RESP section
!> \param section the section to create
!> \author Joost VandeVondele
! **************************************************************************************************
SUBROUTINE create_resp_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RESP", &
description="Requests a RESP fit of charges. When using a periodic "// &
"Poisson solver and a periodic cell, the periodic RESP routines are "// &
"used. If the Hartree potential matches with the one of an isolated "// &
"system (i.e. isolated Poisson solver and big, nonperiodic cells), "// &
"the nonperiodic RESP routines are automatically used. All restraints "// &
"are harmonic!", &
n_keywords=2, n_subsections=2, repeats=.FALSE., citations=(/Golze2015/))
NULLIFY (keyword, subsection)
CALL keyword_create(keyword, __LOCATION__, name="stride", &
description="The stride (X,Y,Z) used to write the cube file "// &
"(larger values result in smaller cube files). You can provide "// &
"3 numbers (for X,Y,Z) or 1 number valid for all components.", &
usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="INTEGER_TOTAL_CHARGE", &
description="Forces the total charge to be integer", &
usage="INTEGER_TOTAL_CHARGE TRUE", &
default_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RESTRAIN_HEAVIES_TO_ZERO", &
description="Restrain non-hydrogen atoms to zero.", &
usage="RESTRAIN_HEAVIES_TO_ZERO FALSE", &
default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RESTRAIN_HEAVIES_STRENGTH", &
description="If defined, enforce the restraint of non-hydrogen "// &
"atoms to zero. Its value is the strength of the restraint on "// &
"the heavy atoms.", &
usage="RESTRAIN_HEAVIES_STRENGTH 0.0001 ", &
default_r_val=1.0E-6_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="WIDTH", &
description="Specifies the value of the width of the Gaussian "// &
"charge distribution carried by each atom. Needs only "// &
"to be specified when using a periodic Poisson solver.", &
usage="WIDTH <real> ", n_var=1, type_of_var=real_t, &
default_r_val=cp_unit_to_cp2k(value=11.249_dp, unit_str="angstrom^-2"), &
unit_str="angstrom^-2")
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="USE_REPEAT_METHOD", &
description="Fits the variance of the potential, i.e. the deviation "// &
"from the mean value of the potential within the selected "// &
"range. The evaluation of the potentials is still treated "// &
"within the GPW approach as described in [Golze2015]. "// &
"When used in conjunction with INTEGER_TOTAL_CHARGE = T "// &
"and SPHERE_SAMPLING, the results will be very similar to "// &
"the REPEAT charges given in [Campana2009]. In most "// &
"cases switching on this option gives reasonable "// &
"atomic charges without the need to define any "// &
"restraints. Note that by switching on this option, "// &
"RESTRAIN_HEAVIES_TO_ZERO will be switched off. ", &
usage="USE_REPEAT_METHOD", &
default_l_val=.FALSE., lone_keyword_l_val=.TRUE., &
citations=(/Campana2009/))
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL create_constraint_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_restraint_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_sphere_sampling_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_slab_sampling_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_print_resp_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_resp_section
! **************************************************************************************************
!> \brief specifies constraints to be satisfied in a resp fit
!> \param section the section to create
!> \author Joost VandeVondele
! **************************************************************************************************
SUBROUTINE create_constraint_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="CONSTRAINT", &
description="specifies a linear constraint on the fitted charges. "// &
"This can be used to give equal values to equivalent atoms. "// &
"sum over atom_list c_i * q_i = t", &
n_keywords=1, n_subsections=0, repeats=.TRUE.)
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="TARGET", &
description="the target value for the constraint", &
usage="TARGET 0.0", &
n_var=1, default_r_val=0.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EQUAL_CHARGES", &
description="All atoms in ATOM_LIST are constrained to have the "// &
"same charges. When using this keyword, TARGET and ATOM_COEF do "// &
"not need to be set and will be ignored. Instead of using this "// &
"keyword, the constraint section could be repeated.", &
usage="EQUAL_CHARGES", &
default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
description="Defines the list of atoms involved in this constraint", &
usage="ATOM_LIST 3 4", &
type_of_var=integer_t, n_var=-1, repeats=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ATOM_COEF", &
description="Defines the coefficient of the atom in this "// &
"linear constraint", &
usage="ATOM_COEF 1.0 -1.0", &
type_of_var=real_t, n_var=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_constraint_section
! **************************************************************************************************
!> \brief specifies restraints to be added to a resp fit
!> \param section the section to create
!> \author Joost VandeVondele
! **************************************************************************************************
SUBROUTINE create_restraint_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RESTRAINT", &
description="specifies a restraint on the fitted charges. "// &
"This can be used to restrain values to zero. "// &
"s*(sum over atom_list q_i - t)**2", &
n_keywords=1, n_subsections=0, repeats=.TRUE.)
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="TARGET", &
description="the target value for the restraint", &
usage="TARGET 0.0", &
n_var=1, default_r_val=0.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="STRENGTH", &
description="the target value for the constraint", &
usage="STRENGTH 0.001", &
n_var=1, default_r_val=0.001_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
description="Defines the list of atoms involved in this restraint", &
usage="ATOM_LIST 3 4", &
type_of_var=integer_t, n_var=-1, repeats=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ATOM_COEF", &
description="Defines the coefficient of the atom in this "// &
"linear restraint. If given, the restraint will be: "// &
"s*(sum over atom_list c_i * q_i - t)**2 ", &
usage="ATOM_COEF 1.0 -1.0", &
type_of_var=real_t, n_var=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_restraint_section
! **************************************************************************************************
!> \brief specifies the parameter for sampling the resp fitting points for
!> molecular structures; sampling in spheres around the atoms
!> \param section the section to create
!> \author Dorothea Golze
! **************************************************************************************************
SUBROUTINE create_sphere_sampling_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="SPHERE_SAMPLING", &
description="Specifies the parameter for sampling the RESP fitting points "// &
"for molecular structures, i.e. systems that do not involve "// &
"surfaces. Fitting points are sampled in spheres around the "// &
"atom. All grid points in the shell defined by rmin and rmax "// &
"are accepted for fitting. Default is that rmin is the vdW "// &
"radius and rmax=100.0*vdW_radius, which can be overwritten "// &
"by the keywords below.", &
n_keywords=1, n_subsections=0, repeats=.FALSE.)
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="X_LOW", &
description="Specifies the lower boundary of the box along X used to "// &
"sample the potential. Only valid for nonperiodic RESP fitting.", &
usage="X_LOW -15.", type_of_var=real_t, n_var=1, unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="X_HI", &
description="Specifies the upper boundary of the box along X used to "// &
"sample the potential. Only valid for nonperiodic RESP fitting.", &
usage="X_HI 5.", type_of_var=real_t, n_var=1, unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="Y_LOW", &
description="Specifies the lower boundary of the box along Y used to "// &
"sample the potential. Only valid for nonperiodic RESP fitting.", &
usage="Y_LOW -15.", type_of_var=real_t, n_var=1, unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="Y_HI", &
description="Specifies the upper boundary of the box along Y used to "// &
"sample the potential. Only valid for nonperiodic RESP fitting.", &
usage="Y_HI 5.", type_of_var=real_t, n_var=1, unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="Z_LOW", &
description="Specifies the lower boundary of the box along Z used to "// &
"sample the potential. Only valid for nonperiodic RESP fitting.", &
usage="Z_LOW -15.", type_of_var=real_t, n_var=1, unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="Z_HI", &
description="Specifies the upper boundary of the box along Z used to "// &
"sample the potential. Only valid for nonperiodic RESP fitting.", &
usage="Z_HI 5.", type_of_var=real_t, n_var=1, unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="AUTO_VDW_RADII_TABLE", &
description="Select which vdW radii table to use for automatic "// &
"determination of RMIN_KIND and RMAX_KIND if those "// &
"are not declared explicitly", &
usage="AUTO_VDW_RADII_TABLE UFF", &
default_i_val=use_cambridge_vdw_radii, &
enum_c_vals=s2a("CAMBRIDGE", &
"UFF"), &
enum_desc=s2a("Cambridge Structural Database", &
"Universal Force Field: "// &
"Rappe et al. J. Am. Chem. Soc. 114, 10024 (1992)"), &
enum_i_vals=(/use_cambridge_vdw_radii, &
use_uff_vdw_radii/), &
citations=(/Rappe1992/))
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="AUTO_RMAX_SCALE", &
description="IF RMAX or RMAX_KIND keywords are not present, defines the "// &
"maximumn distance a fit point is away from an atom based on "// &
"the formula: rmax(kind) = AUTO_RMAX_SCALE * vdW_radius(kind). "// &
"The van der Waals radiii of the elements are based on data from "// &
"table chosen by AUTO_VDW_RADII_TABLE.", &
usage="AUTO_RMAX_SCALE 60.0", &
default_r_val=100.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="AUTO_RMIN_SCALE", &
description="IF RMIN or RMIN_KIND keywords are not present, defines the "// &
"minimum distance a fit point is away from an atom based on "// &
"the formula: rmin(kind) = AUTO_RMIN_SCALE * vdW_radius(kind). "// &
"The van der Waals radii of the elements are based on data from "// &
"table chosen by AUTO_VDW_RADII_TABLE.", &
usage="AUTO_RMIN_SCALE 1.5", &
default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
description="Specifies the maximum distance a fit point is away from an atom. "// &
"Valid for all atomic kinds for which no RMAX_KIND are specified.", &
usage="RMAX 2.5", &
default_r_val=cp_unit_to_cp2k(value=2.5_dp, unit_str="angstrom"), &
unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
description="Specifies the minimum distance a fit point is away from an atom. "// &
"Valid for all atomic kinds for which no RMIN_KIND are specified.", &
usage="RMIN 2.1", &
default_r_val=cp_unit_to_cp2k(value=2.1_dp, unit_str="angstrom"), &
unit_str='angstrom')
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RMAX_KIND", &
description="Specifies the maximum distance a fit point is away from an atom "// &
"of a given kind", &
usage="RMAX 2.5 Br", repeats=.TRUE., &
n_var=-1, type_of_var=char_t)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RMIN_KIND", &
description="Specifies the minimum distance a fit point is away from an atom "// &
"of a given kind", &
usage="RMIN 2.1 Br", repeats=.TRUE., &
n_var=-1, type_of_var=char_t)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_sphere_sampling_section
! **************************************************************************************************
!> \brief specifies the parameter for sampling the resp fitting points for
!> slab-like periodic systems, i.e. systems that involve surfaces
!> \param section the section to create
!> \author Dorothea Golze
! **************************************************************************************************
SUBROUTINE create_slab_sampling_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="SLAB_SAMPLING", &
description="Specifies the parameter for sampling the RESP fitting "// &
"points for slab-like periodic systems, i.e. systems that "// &
"involve surfaces. This section can only be used with periodic "// &
"Poisson solver and cell. To see, which grid points were "// &
"used, switch on COORD_FIT_POINTS in the PRINT section.", &
n_keywords=1, n_subsections=0, repeats=.TRUE.)
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
description="Specifies the list of indexes of atoms used to define "// &
"the region for the RESP fitting. The list should "// &
"contain indexes of atoms of the first surface layer.", &
usage="ATOM_LIST 1 2 3 or 1..3", &
type_of_var=integer_t, n_var=-1, repeats=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RANGE", &
description="Range where the fitting points are sampled. A range of "// &
"3 to 5 Angstroms means that the fitting points are sampled in the region "// &
"of 3 to 5 Angstroms above the surface which is defined by atom indexes given "// &
"in ATOM_LIST.", &
usage="RANGE <real> <real>", unit_str="angstrom", n_var=2, type_of_var=real_t)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="LENGTH", &
description="Length of the sampling box, i.e. a box of this length and "// &
"the height specified by RANGE is defined above each surface atom given "// &
"in ATOM_LIST. The grid points in the boxes are accepted as fitting point. "// &
"Should be in the range of the nearest neighbour distance (a bit larger to be "// &
"on the safe side). Allows for a refined sampling of grid points in case of "// &
"corrugated surfaces.", &
usage="LENGTH <real> ", unit_str="angstrom", n_var=1, type_of_var=real_t, &
default_r_val=cp_unit_to_cp2k(value=3.0_dp, unit_str="angstrom"))
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SURF_DIRECTION", &
description="Specifies what above the surface means. Defines the direction.", &
usage="SURF_DIRECTION Z", &
enum_c_vals=s2a("X", "Y", "Z", "-X", "-Y", "-Z"), &
enum_i_vals=(/do_resp_x_dir, do_resp_y_dir, do_resp_z_dir, &
do_resp_minus_x_dir, do_resp_minus_y_dir, do_resp_minus_z_dir/), &
enum_desc=s2a("surface layers are piled up in x-direction", &
"surface layers are piled up in y-direction", &
"surface layers are piled up in z-direction", &
"surface layers are piled up in -x-direction", &
"surface layers are piled up in -y-direction", &
"surface layers are piled up in -z-direction"), &
default_i_val=do_resp_z_dir)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_slab_sampling_section
! **************************************************************************************************
!> \brief create the resp print section
!> \param section the section to create
!> \author Dorothea Golze
! **************************************************************************************************
SUBROUTINE create_print_resp_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: print_key
CPASSERT(.NOT. ASSOCIATED(section))
NULLIFY (print_key, keyword)
CALL section_create(section, __LOCATION__, name="print", &
description="Section of possible print options specific for the RESP code.", &
n_keywords=0, n_subsections=1, repeats=.FALSE.)
CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
description="Controls the printing of information regarding the run.", &
print_level=low_print_level, filename="__STD_OUT__")
CALL section_add_subsection(section, print_key)
CALL section_release(print_key)
CALL cp_print_key_section_create(print_key, __LOCATION__, "COORD_FIT_POINTS", &
description="Controls the printing of the coordinates of the "// &
"grid points used for periodic RESP fitting. This section "// &
"is intended to be only used for testing (you can get large files).", &
print_level=high_print_level, add_last=add_last_numeric, &
filename="RESP_FIT_POINTS", &
common_iter_levels=3)
CALL section_add_subsection(section, print_key)
CALL section_release(print_key)
CALL cp_print_key_section_create(print_key, __LOCATION__, "RESP_CHARGES_TO_FILE", &
description="Controls the printing of the RESP charges "// &
"to a file.", &
print_level=high_print_level, add_last=add_last_numeric, &
filename="RESP_CHARGES", &
common_iter_levels=3)
CALL section_add_subsection(section, print_key)
CALL section_release(print_key)
CALL cp_print_key_section_create(print_key, __LOCATION__, "V_RESP_CUBE", &
description="Controls the printing of the potential generated "// &
"by the RESP CHARGES to a cube file. Prints the relative "// &
"root-mean-square (RRMS) and root-mean-square (RMS) errors.", &
print_level=high_print_level, add_last=add_last_numeric, &
filename="RESP_POTENTIAL", &
common_iter_levels=3)
CALL keyword_create(keyword, __LOCATION__, name="stride", &
description="The stride (X,Y,Z) used to write the cube file "// &
"(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
" 1 number valid for all components.", &
usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
CALL section_add_keyword(print_key, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
description="append the cube files when they already exist", &
default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(print_key, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, print_key)
CALL section_release(print_key)
END SUBROUTINE create_print_resp_section
END MODULE input_cp2k_resp