Line data Source code
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 : !> \brief function that build the dft section of the input
10 : !> \par History
11 : !> 01.2013 moved out of input_cp2k_dft [MI]
12 : !> \author MI
13 : ! **************************************************************************************************
14 : MODULE input_cp2k_properties_dft
15 : USE bibliography, ONLY: Futera2017, &
16 : Iannuzzi2005, &
17 : Kondov2007, &
18 : Luber2014, &
19 : Putrino2000, &
20 : Putrino2002, &
21 : Sebastiani2001, &
22 : Weber2009
23 : USE cp_output_handling, ONLY: add_last_numeric, &
24 : cp_print_key_section_create, &
25 : debug_print_level, &
26 : high_print_level, &
27 : low_print_level, &
28 : medium_print_level, &
29 : silent_print_level
30 : USE cp_units, ONLY: cp_unit_to_cp2k
31 : USE input_constants, ONLY: &
32 : current_gauge_atom, current_gauge_r, current_gauge_r_and_step_func, &
33 : current_orb_center_atom, current_orb_center_box, current_orb_center_common, &
34 : current_orb_center_wannier, do_et_ddapc, do_full_density, do_no_et, do_spin_density, &
35 : gto_cartesian, gto_spherical, int_ldos_none, int_ldos_x, int_ldos_y, int_ldos_z, oe_gllb, &
36 : oe_lb, oe_none, oe_saop, oe_shift, ot_precond_full_all, ot_precond_full_kinetic, &
37 : ot_precond_full_single, ot_precond_full_single_inverse, ot_precond_none, &
38 : ot_precond_s_inverse, scan_x, scan_xy, scan_xyz, scan_xz, scan_y, scan_yz, scan_z, &
39 : tddfpt_dipole_berry, tddfpt_dipole_length, tddfpt_dipole_velocity, tddfpt_kernel_full, &
40 : tddfpt_kernel_none, tddfpt_kernel_stda, use_mom_ref_coac, use_mom_ref_com, &
41 : use_mom_ref_user, use_mom_ref_zero
42 : USE input_cp2k_atprop, ONLY: create_atprop_section
43 : USE input_cp2k_dft, ONLY: create_interp_section, &
44 : create_mgrid_section
45 : USE input_cp2k_qs, ONLY: create_ddapc_restraint_section, &
46 : create_lrigpw_section
47 : USE input_cp2k_kpoints, ONLY: create_kpoint_set_section
48 : USE input_cp2k_loc, ONLY: create_localize_section
49 : USE input_cp2k_resp, ONLY: create_resp_section
50 : USE input_cp2k_xc, ONLY: create_xc_section
51 : USE input_keyword_types, ONLY: keyword_create, &
52 : keyword_release, &
53 : keyword_type
54 : USE input_section_types, ONLY: section_add_keyword, &
55 : section_add_subsection, &
56 : section_create, &
57 : section_release, &
58 : section_type
59 : USE input_val_types, ONLY: char_t, &
60 : integer_t, &
61 : lchar_t, &
62 : logical_t, &
63 : real_t
64 : USE kinds, ONLY: dp
65 : USE string_utilities, ONLY: s2a
66 : #include "./base/base_uses.f90"
67 :
68 : IMPLICIT NONE
69 : PRIVATE
70 :
71 : LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
72 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_properties_dft'
73 :
74 : PUBLIC :: create_properties_section
75 :
76 : CONTAINS
77 :
78 : ! **************************************************************************************************
79 : !> \brief Create the PROPERTIES section
80 : !> \param section the section to create
81 : !> \author teo
82 : ! **************************************************************************************************
83 8428 : SUBROUTINE create_properties_section(section)
84 : TYPE(section_type), POINTER :: section
85 :
86 : TYPE(keyword_type), POINTER :: keyword
87 : TYPE(section_type), POINTER :: subsection
88 :
89 8428 : CPASSERT(.NOT. ASSOCIATED(section))
90 : CALL section_create(section, __LOCATION__, name="PROPERTIES", &
91 : description="This section is used to set up the PROPERTIES calculation.", &
92 8428 : n_keywords=0, n_subsections=6, repeats=.FALSE.)
93 :
94 8428 : NULLIFY (subsection, keyword)
95 :
96 8428 : CALL create_linres_section(subsection, create_subsections=.TRUE.)
97 8428 : CALL section_add_subsection(section, subsection)
98 8428 : CALL section_release(subsection)
99 :
100 8428 : CALL create_et_coupling_section(subsection)
101 8428 : CALL section_add_subsection(section, subsection)
102 8428 : CALL section_release(subsection)
103 :
104 8428 : CALL create_resp_section(subsection)
105 8428 : CALL section_add_subsection(section, subsection)
106 8428 : CALL section_release(subsection)
107 :
108 8428 : CALL create_atprop_section(subsection)
109 8428 : CALL section_add_subsection(section, subsection)
110 8428 : CALL section_release(subsection)
111 :
112 : CALL cp_print_key_section_create(subsection, __LOCATION__, name="FIT_CHARGE", &
113 : description="This section is used to print the density derived atomic point charges. "// &
114 : "The fit of the charges is controlled through the DENSITY_FITTING section", &
115 8428 : print_level=high_print_level, filename="__STD_OUT__")
116 : CALL keyword_create(keyword, __LOCATION__, name="TYPE_OF_DENSITY", &
117 : description="Specifies the type of density used for the fitting", &
118 : usage="TYPE_OF_DENSITY (FULL|SPIN)", &
119 : enum_c_vals=s2a("FULL", "SPIN"), &
120 : enum_i_vals=(/do_full_density, do_spin_density/), &
121 : enum_desc=s2a("Full density", "Spin density"), &
122 8428 : default_i_val=do_full_density)
123 8428 : CALL section_add_keyword(subsection, keyword)
124 8428 : CALL keyword_release(keyword)
125 8428 : CALL section_add_subsection(section, subsection)
126 8428 : CALL section_release(subsection)
127 :
128 8428 : CALL create_tddfpt2_section(subsection)
129 8428 : CALL section_add_subsection(section, subsection)
130 8428 : CALL section_release(subsection)
131 :
132 8428 : CALL create_bandstructure_section(subsection)
133 8428 : CALL section_add_subsection(section, subsection)
134 8428 : CALL section_release(subsection)
135 :
136 8428 : CALL create_tipscan_section(subsection)
137 8428 : CALL section_add_subsection(section, subsection)
138 8428 : CALL section_release(subsection)
139 :
140 8428 : END SUBROUTINE create_properties_section
141 :
142 : ! **************************************************************************************************
143 : !> \brief creates the input structure used to activate
144 : !> a linear response calculation
145 : !> Available properties : none
146 : !> \param section the section to create
147 : !> \param create_subsections indicates whether or not subsections should be created
148 : !> \param default_set_tdlr default parameters to be used if called from TDDFPT
149 : !> \author MI
150 : ! **************************************************************************************************
151 16856 : SUBROUTINE create_linres_section(section, create_subsections, default_set_tdlr)
152 : TYPE(section_type), POINTER :: section
153 : LOGICAL, INTENT(in) :: create_subsections
154 : LOGICAL, INTENT(IN), OPTIONAL :: default_set_tdlr
155 :
156 : INTEGER :: def_max_iter, def_precond
157 : REAL(KIND=DP) :: def_egap, def_eps, def_eps_filter
158 : TYPE(keyword_type), POINTER :: keyword
159 : TYPE(section_type), POINTER :: print_key, subsection
160 :
161 16856 : NULLIFY (keyword, print_key)
162 :
163 16856 : IF (PRESENT(default_set_tdlr)) THEN
164 8428 : def_egap = 0.02_dp
165 8428 : def_eps = 1.0e-10_dp
166 8428 : def_eps_filter = 1.0e-15_dp
167 8428 : def_max_iter = 100
168 8428 : def_precond = ot_precond_full_single_inverse
169 : ELSE
170 8428 : def_egap = 0.2_dp
171 8428 : def_eps = 1.e-6_dp
172 8428 : def_eps_filter = 0.0_dp
173 8428 : def_max_iter = 50
174 8428 : def_precond = ot_precond_none
175 : END IF
176 :
177 16856 : CPASSERT(.NOT. ASSOCIATED(section))
178 : CALL section_create(section, __LOCATION__, name="linres", &
179 : description="The linear response is used to calculate one of the "// &
180 : "following properties: nmr, epr, raman, ... ", &
181 : n_keywords=5, n_subsections=2, repeats=.FALSE., &
182 33712 : citations=(/Putrino2000/))
183 :
184 : CALL keyword_create(keyword, __LOCATION__, name="EPS", &
185 : description="target accuracy for the convergence of the conjugate gradient.", &
186 16856 : usage="EPS 1.e-6", default_r_val=def_eps)
187 16856 : CALL section_add_keyword(section, keyword)
188 16856 : CALL keyword_release(keyword)
189 :
190 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
191 : description="Filter threshold for response density matrix.", &
192 16856 : usage="EPS 1.e-8", default_r_val=def_eps_filter)
193 16856 : CALL section_add_keyword(section, keyword)
194 16856 : CALL keyword_release(keyword)
195 :
196 : CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
197 : description="Maximum number of conjugate gradient iteration to be performed for one optimization.", &
198 16856 : usage="MAX_ITER 200", default_i_val=def_max_iter)
199 16856 : CALL section_add_keyword(section, keyword)
200 16856 : CALL keyword_release(keyword)
201 :
202 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_EVERY", &
203 : description="Restart the conjugate gradient after the specified number of iterations.", &
204 16856 : usage="RESTART_EVERY 200", default_i_val=50)
205 16856 : CALL section_add_keyword(section, keyword)
206 16856 : CALL keyword_release(keyword)
207 :
208 : CALL keyword_create( &
209 : keyword, __LOCATION__, name="PRECONDITIONER", &
210 : description="Type of preconditioner to be used with all minimization schemes. "// &
211 : "They differ in effectiveness, cost of construction, cost of application. "// &
212 : "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", &
213 : usage="PRECONDITIONER FULL_ALL", &
214 : default_i_val=def_precond, &
215 : enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", &
216 : "NONE"), &
217 : enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// &
218 : "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// &
219 : "This preconditioner is recommended for almost all systems, except very large systems where "// &
220 : "make_preconditioner would dominate the total computational cost.", &
221 : "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// &
222 : "but cheaper to construct, "// &
223 : "might be somewhat less robust. Recommended for large systems.", &
224 : "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", &
225 : "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// &
226 : "use for very large systems.", &
227 : "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", &
228 : "skip preconditioning"), &
229 : enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_full_single, &
230 16856 : ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_none/))
231 16856 : CALL section_add_keyword(section, keyword)
232 16856 : CALL keyword_release(keyword)
233 :
234 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_GAP", &
235 : description="Energy gap estimate [a.u.] for preconditioning", &
236 : usage="ENERGY_GAP 0.1", &
237 16856 : default_r_val=def_egap)
238 16856 : CALL section_add_keyword(section, keyword)
239 16856 : CALL keyword_release(keyword)
240 :
241 : CALL keyword_create(keyword, __LOCATION__, name="RESTART", &
242 : description="Restart the response calculation if the restart file exists", &
243 : usage="RESTART", &
244 16856 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
245 16856 : CALL section_add_keyword(section, keyword)
246 16856 : CALL keyword_release(keyword)
247 :
248 : CALL keyword_create(keyword, __LOCATION__, name="WFN_RESTART_FILE_NAME", &
249 : variants=(/"RESTART_FILE_NAME"/), &
250 : description="Root of the file names where to read the response functions from "// &
251 : "which to restart the calculation of the linear response", &
252 : usage="WFN_RESTART_FILE_NAME <FILENAME>", &
253 33712 : type_of_var=lchar_t)
254 16856 : CALL section_add_keyword(section, keyword)
255 16856 : CALL keyword_release(keyword)
256 :
257 16856 : IF (create_subsections) THEN
258 8428 : NULLIFY (subsection)
259 :
260 8428 : CALL create_localize_section(subsection)
261 8428 : CALL section_add_subsection(section, subsection)
262 8428 : CALL section_release(subsection)
263 :
264 8428 : CALL create_current_section(subsection)
265 8428 : CALL section_add_subsection(section, subsection)
266 8428 : CALL section_release(subsection)
267 :
268 8428 : CALL create_nmr_section(subsection)
269 8428 : CALL section_add_subsection(section, subsection)
270 8428 : CALL section_release(subsection)
271 :
272 8428 : CALL create_spin_spin_section(subsection)
273 8428 : CALL section_add_subsection(section, subsection)
274 8428 : CALL section_release(subsection)
275 :
276 8428 : CALL create_epr_section(subsection)
277 8428 : CALL section_add_subsection(section, subsection)
278 8428 : CALL section_release(subsection)
279 :
280 8428 : CALL create_polarizability_section(subsection)
281 8428 : CALL section_add_subsection(section, subsection)
282 8428 : CALL section_release(subsection)
283 :
284 8428 : CALL create_dcdr_section(subsection)
285 8428 : CALL section_add_subsection(section, subsection)
286 8428 : CALL section_release(subsection)
287 :
288 8428 : CALL create_vcd_section(subsection)
289 8428 : CALL section_add_subsection(section, subsection)
290 8428 : CALL section_release(subsection)
291 :
292 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
293 : description="printing of information during the linear response calculation", &
294 8428 : repeats=.FALSE.)
295 :
296 : CALL cp_print_key_section_create( &
297 : print_key, __LOCATION__, "program_run_info", &
298 : description="Controls the printing of basic iteration information during the LINRES calculation", &
299 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
300 8428 : CALL section_add_subsection(subsection, print_key)
301 8428 : CALL section_release(print_key)
302 :
303 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESTART", &
304 : description="Controls the dumping of restart file of the response wavefunction. "// &
305 : "For each set of response functions, i.e. for each perturbation, "// &
306 : "one different restart file is dumped. These restart files should be "// &
307 : "employed only to restart the same type of LINRES calculation, "// &
308 : "i.e. with the same perturbation.", &
309 : print_level=low_print_level, common_iter_levels=3, each_iter_names=s2a("ITER"), &
310 8428 : add_last=add_last_numeric, each_iter_values=(/3/), filename="")
311 8428 : CALL section_add_subsection(subsection, print_key)
312 8428 : CALL section_release(print_key)
313 :
314 8428 : CALL section_add_subsection(section, subsection)
315 8428 : CALL section_release(subsection)
316 :
317 : END IF
318 :
319 16856 : END SUBROUTINE create_linres_section
320 :
321 : ! **************************************************************************************************
322 : !> \brief creates the input structure used to activate
323 : !> calculation of position perturbation DFPT
324 : !> \param section ...
325 : !> \author Sandra Luber, Edward Ditler
326 : ! **************************************************************************************************
327 8428 : SUBROUTINE create_dcdr_section(section)
328 :
329 : TYPE(section_type), POINTER :: section
330 :
331 : LOGICAL :: failure
332 : TYPE(keyword_type), POINTER :: keyword
333 : TYPE(section_type), POINTER :: print_key, subsection
334 :
335 8428 : failure = .FALSE.
336 8428 : NULLIFY (keyword, print_key, subsection)
337 :
338 8428 : CPASSERT(.NOT. ASSOCIATED(section))
339 :
340 : IF (.NOT. failure) THEN
341 : CALL section_create(section, __LOCATION__, name="DCDR", &
342 : description="Compute analytical gradients the dipole moments.", &
343 8428 : n_keywords=50, n_subsections=1, repeats=.FALSE.)
344 :
345 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
346 : description="controls the activation of the APT calculation", &
347 : usage="&DCDR T", &
348 : default_l_val=.FALSE., &
349 8428 : lone_keyword_l_val=.TRUE.)
350 8428 : CALL section_add_keyword(section, keyword)
351 8428 : CALL keyword_release(keyword)
352 :
353 : CALL keyword_create(keyword, __LOCATION__, name="LIST_OF_ATOMS", &
354 : description="Specifies a list of atoms.", &
355 : usage="LIST {integer} {integer} .. {integer}", repeats=.TRUE., &
356 8428 : n_var=-1, type_of_var=integer_t)
357 8428 : CALL section_add_keyword(section, keyword)
358 8428 : CALL keyword_release(keyword)
359 :
360 : CALL keyword_create(keyword, __LOCATION__, name="DISTRIBUTED_ORIGIN", &
361 : variants=(/"DO_GAUGE"/), &
362 : description="Use the distributed origin (DO) gauge?", &
363 : usage="DISTRIBUTED_ORIGIN T", &
364 16856 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
365 8428 : CALL section_add_keyword(section, keyword)
366 8428 : CALL keyword_release(keyword)
367 :
368 : CALL keyword_create(keyword, __LOCATION__, name="ORBITAL_CENTER", &
369 : description="The orbital center.", &
370 : usage="ORBITAL_CENTER WANNIER", &
371 : default_i_val=current_orb_center_wannier, &
372 : enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
373 : enum_desc=s2a("Use the Wannier centers.", &
374 : "Use a common center (works only for an isolate molecule).", &
375 : "Use the atoms as center.", &
376 : "Boxing."), &
377 : enum_i_vals=(/current_orb_center_wannier, current_orb_center_common, &
378 8428 : current_orb_center_atom, current_orb_center_box/))
379 8428 : CALL section_add_keyword(section, keyword)
380 8428 : CALL keyword_release(keyword)
381 :
382 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE", &
383 : description="Gauge origin of the velocity gauge factor.", &
384 : enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
385 : enum_desc=s2a("Use Center of Mass", &
386 : "Use Center of Atomic Charges", &
387 : "Use User-defined Point", &
388 : "Use Origin of Coordinate System"), &
389 : enum_i_vals=(/use_mom_ref_com, &
390 : use_mom_ref_coac, &
391 : use_mom_ref_user, &
392 : use_mom_ref_zero/), &
393 8428 : default_i_val=use_mom_ref_zero)
394 8428 : CALL section_add_keyword(section, keyword)
395 8428 : CALL keyword_release(keyword)
396 :
397 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT", &
398 : description="User-defined reference point of the velocity gauge factor.", &
399 : usage="REFERENCE_POINT x y z", &
400 8428 : repeats=.FALSE., n_var=3, type_of_var=real_t, unit_str='bohr')
401 8428 : CALL section_add_keyword(section, keyword)
402 8428 : CALL keyword_release(keyword)
403 :
404 8428 : NULLIFY (subsection)
405 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
406 : description="print results of the magnetic dipole moment calculation", &
407 8428 : repeats=.FALSE.)
408 :
409 : CALL cp_print_key_section_create(print_key, __LOCATION__, "APT", &
410 : description="Controls the printing of the electric dipole gradient", &
411 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="")
412 8428 : CALL section_add_subsection(subsection, print_key)
413 8428 : CALL section_release(print_key)
414 :
415 8428 : CALL section_add_subsection(section, subsection)
416 8428 : CALL section_release(subsection)
417 :
418 8428 : NULLIFY (subsection)
419 8428 : CALL create_interp_section(subsection)
420 8428 : CALL section_add_subsection(section, subsection)
421 8428 : CALL section_release(subsection)
422 :
423 : END IF
424 :
425 8428 : END SUBROUTINE create_dcdr_section
426 :
427 : ! **************************************************************************************************
428 : !> \brief creates the input structure used to activate
429 : !> calculation of VCD spectra using DFPT
430 : !> \param section ...
431 : !> \author Sandra Luber, Tomas Zimmermann, Edward Ditler
432 : ! **************************************************************************************************
433 8428 : SUBROUTINE create_vcd_section(section)
434 :
435 : TYPE(section_type), POINTER :: section
436 :
437 : TYPE(keyword_type), POINTER :: keyword
438 : TYPE(section_type), POINTER :: print_key, subsection
439 :
440 8428 : NULLIFY (keyword, print_key, subsection)
441 :
442 8428 : CPASSERT(.NOT. ASSOCIATED(section))
443 :
444 : CALL section_create(section, __LOCATION__, name="VCD", &
445 : description="Carry out a VCD calculation.", &
446 8428 : n_keywords=50, n_subsections=1, repeats=.FALSE.)
447 :
448 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
449 : description="controls the activation of the APT/AAT calculation", &
450 : usage="&VCD T", &
451 : default_l_val=.FALSE., &
452 8428 : lone_keyword_l_val=.TRUE.)
453 8428 : CALL section_add_keyword(section, keyword)
454 8428 : CALL keyword_release(keyword)
455 :
456 : CALL keyword_create(keyword, __LOCATION__, name="LIST_OF_ATOMS", &
457 : description="Specifies a list of atoms.", &
458 : usage="LIST {integer} {integer} .. {integer}", repeats=.TRUE., &
459 8428 : n_var=-1, type_of_var=integer_t)
460 8428 : CALL section_add_keyword(section, keyword)
461 8428 : CALL keyword_release(keyword)
462 :
463 : CALL keyword_create(keyword, __LOCATION__, name="DISTRIBUTED_ORIGIN", &
464 : variants=(/"DO_GAUGE"/), &
465 : description="Use the distributed origin (DO) gauge?", &
466 : usage="DISTRIBUTED_ORIGIN T", &
467 16856 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
468 8428 : CALL section_add_keyword(section, keyword)
469 8428 : CALL keyword_release(keyword)
470 :
471 : CALL keyword_create(keyword, __LOCATION__, name="ORIGIN_DEPENDENT_MFP", &
472 : description="Use the origin dependent MFP operator.", &
473 : usage="ORIGIN_DEPENDENT_MFP T", &
474 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
475 8428 : CALL section_add_keyword(section, keyword)
476 8428 : CALL keyword_release(keyword)
477 :
478 : CALL keyword_create(keyword, __LOCATION__, name="ORBITAL_CENTER", &
479 : description="The orbital center.", &
480 : usage="ORBITAL_CENTER WANNIER", &
481 : default_i_val=current_orb_center_wannier, &
482 : enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
483 : enum_desc=s2a("Use the Wannier centers.", &
484 : "Use a common center (works only for an isolate molecule).", &
485 : "Use the atoms as center.", &
486 : "Boxing."), &
487 : enum_i_vals=(/current_orb_center_wannier, current_orb_center_common, &
488 8428 : current_orb_center_atom, current_orb_center_box/))
489 8428 : CALL section_add_keyword(section, keyword)
490 8428 : CALL keyword_release(keyword)
491 :
492 : ! The origin of the magnetic dipole operator (r - MAGNETIC_ORIGIN) x momentum
493 : CALL keyword_create(keyword, __LOCATION__, name="MAGNETIC_ORIGIN", &
494 : description="Gauge origin of the magnetic dipole operator.", &
495 : enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
496 : enum_desc=s2a("Use Center of Mass", &
497 : "Use Center of Atomic Charges", &
498 : "Use User-defined Point", &
499 : "Use Origin of Coordinate System"), &
500 : enum_i_vals=(/use_mom_ref_com, &
501 : use_mom_ref_coac, &
502 : use_mom_ref_user, &
503 : use_mom_ref_zero/), &
504 8428 : default_i_val=use_mom_ref_zero)
505 8428 : CALL section_add_keyword(section, keyword)
506 8428 : CALL keyword_release(keyword)
507 :
508 : CALL keyword_create(keyword, __LOCATION__, name="MAGNETIC_ORIGIN_REFERENCE", &
509 : description="User-defined reference point of the magnetic dipole operator.", &
510 : usage="REFERENCE_POINT x y z", &
511 8428 : repeats=.FALSE., n_var=3, type_of_var=real_t, unit_str='bohr')
512 8428 : CALL section_add_keyword(section, keyword)
513 8428 : CALL keyword_release(keyword)
514 :
515 : ! The origin of the coordinate system
516 : CALL keyword_create(keyword, __LOCATION__, name="SPATIAL_ORIGIN", &
517 : description="Gauge origin of the velocity gauge factor/spatial origin.", &
518 : enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
519 : enum_desc=s2a("Use Center of Mass", &
520 : "Use Center of Atomic Charges", &
521 : "Use User-defined Point", &
522 : "Use Origin of Coordinate System"), &
523 : enum_i_vals=(/use_mom_ref_com, &
524 : use_mom_ref_coac, &
525 : use_mom_ref_user, &
526 : use_mom_ref_zero/), &
527 8428 : default_i_val=use_mom_ref_zero)
528 8428 : CALL section_add_keyword(section, keyword)
529 8428 : CALL keyword_release(keyword)
530 :
531 : CALL keyword_create(keyword, __LOCATION__, name="SPATIAL_ORIGIN_REFERENCE", &
532 : description="User-defined reference point of the velocity gauge factor/spatial origin.", &
533 : usage="REFERENCE_POINT x y z", &
534 8428 : repeats=.FALSE., n_var=3, type_of_var=real_t, unit_str='bohr')
535 8428 : CALL section_add_keyword(section, keyword)
536 8428 : CALL keyword_release(keyword)
537 :
538 8428 : NULLIFY (subsection)
539 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
540 : description="print results of the magnetic dipole moment calculation", &
541 8428 : repeats=.FALSE.)
542 :
543 : CALL cp_print_key_section_create(print_key, __LOCATION__, "VCD", &
544 : description="Controls the printing of the APTs and AATs", &
545 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="")
546 8428 : CALL section_add_subsection(subsection, print_key)
547 8428 : CALL section_release(print_key)
548 :
549 8428 : CALL section_add_subsection(section, subsection)
550 8428 : CALL section_release(subsection)
551 :
552 8428 : NULLIFY (subsection)
553 8428 : CALL create_interp_section(subsection)
554 8428 : CALL section_add_subsection(section, subsection)
555 8428 : CALL section_release(subsection)
556 :
557 8428 : END SUBROUTINE create_vcd_section
558 :
559 : ! **************************************************************************************************
560 : !> \brief creates the input structure used to activate
561 : !> calculation of induced current DFPT
562 : !> Available properties : none
563 : !> \param section the section to create
564 : !> \author MI/VW
565 : ! **************************************************************************************************
566 8428 : SUBROUTINE create_current_section(section)
567 : TYPE(section_type), POINTER :: section
568 :
569 : TYPE(keyword_type), POINTER :: keyword
570 : TYPE(section_type), POINTER :: print_key, subsection
571 :
572 8428 : NULLIFY (keyword, print_key, subsection)
573 :
574 8428 : CPASSERT(.NOT. ASSOCIATED(section))
575 : CALL section_create(section, __LOCATION__, name="current", &
576 : description="The induced current density is calculated by DFPT.", &
577 : n_keywords=4, n_subsections=1, repeats=.FALSE., &
578 25284 : citations=(/Sebastiani2001, Weber2009/))
579 :
580 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
581 : description="controls the activation of the induced current calculation", &
582 : usage="&CURRENT T", &
583 : default_l_val=.FALSE., &
584 8428 : lone_keyword_l_val=.TRUE.)
585 8428 : CALL section_add_keyword(section, keyword)
586 8428 : CALL keyword_release(keyword)
587 :
588 : CALL keyword_create(keyword, __LOCATION__, name="GAUGE", &
589 : description="The gauge used to compute the induced current within GAPW.", &
590 : usage="GAUGE R", &
591 : default_i_val=current_gauge_r_and_step_func, &
592 : enum_c_vals=s2a("R", "R_AND_STEP_FUNCTION", "ATOM"), &
593 : enum_desc=s2a("Position gauge (doesnt work well).", &
594 : "Position and step function for the soft and the local parts, respectively.", &
595 : "Atoms."), &
596 8428 : enum_i_vals=(/current_gauge_r, current_gauge_r_and_step_func, current_gauge_atom/))
597 8428 : CALL section_add_keyword(section, keyword)
598 8428 : CALL keyword_release(keyword)
599 :
600 : CALL keyword_create(keyword, __LOCATION__, name="GAUGE_ATOM_RADIUS", &
601 : description="Build the gauge=atom using only the atoms within this radius.", &
602 : usage="GAUGE_ATOM_RADIUS 10.0", &
603 : type_of_var=real_t, &
604 : default_r_val=cp_unit_to_cp2k(value=4.0_dp, unit_str="angstrom"), &
605 8428 : unit_str="angstrom")
606 8428 : CALL section_add_keyword(section, keyword)
607 8428 : CALL keyword_release(keyword)
608 :
609 : CALL keyword_create(keyword, __LOCATION__, name="USE_OLD_GAUGE_ATOM", &
610 : description="Use the old way to compute the gauge.", &
611 : usage="USE_OLD_GAUGE_ATOM T", &
612 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
613 8428 : CALL section_add_keyword(section, keyword)
614 8428 : CALL keyword_release(keyword)
615 :
616 : CALL keyword_create(keyword, __LOCATION__, name="ORBITAL_CENTER", &
617 : description="The orbital center.", &
618 : usage="ORBITAL_CENTER WANNIER", &
619 : default_i_val=current_orb_center_wannier, &
620 : enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
621 : enum_desc=s2a("Use the Wannier centers.", &
622 : "Use a common center (works only for an isolate molecule).", &
623 : "Use the atoms as center.", &
624 : "Boxing."), &
625 : enum_i_vals=(/current_orb_center_wannier, current_orb_center_common, &
626 8428 : current_orb_center_atom, current_orb_center_box/))
627 8428 : CALL section_add_keyword(section, keyword)
628 8428 : CALL keyword_release(keyword)
629 :
630 : CALL keyword_create(keyword, __LOCATION__, name="COMMON_CENTER", &
631 : description="The common center ", usage="COMMON_CENTER 0.0 1.0 0.0", &
632 : n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/), type_of_var=real_t, &
633 8428 : unit_str="angstrom")
634 8428 : CALL section_add_keyword(section, keyword)
635 8428 : CALL keyword_release(keyword)
636 :
637 : CALL keyword_create(keyword, __LOCATION__, name="NBOX", &
638 : description="How many boxes along each directions ", usage="NBOX 6 6 5", &
639 8428 : n_var=3, default_i_vals=(/4, 4, 4/), type_of_var=integer_t)
640 8428 : CALL section_add_keyword(section, keyword)
641 8428 : CALL keyword_release(keyword)
642 :
643 : CALL keyword_create(keyword, __LOCATION__, name="CHI_PBC", &
644 : description="Calculate the succeptibility correction to the shift with PBC", &
645 : usage="CHI_PBC T", &
646 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
647 8428 : CALL section_add_keyword(section, keyword)
648 8428 : CALL keyword_release(keyword)
649 :
650 : CALL keyword_create(keyword, __LOCATION__, name="FORCE_NO_FULL", &
651 : description="Avoid the calculation of the state dependent perturbation term, "// &
652 : "even if the orbital centers are set at Wannier centers or at Atom centers", &
653 : usage="FORCE_NO_FULL T", &
654 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
655 8428 : CALL section_add_keyword(section, keyword)
656 8428 : CALL keyword_release(keyword)
657 :
658 : CALL keyword_create(keyword, __LOCATION__, name="SELECTED_STATES_ON_ATOM_LIST", &
659 : description="Indexes of the atoms for selecting"// &
660 : " the states to be used for the response calculations.", &
661 : usage="SELECTED_STATES_ON_ATOM_LIST 1 2 10", &
662 8428 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
663 8428 : CALL section_add_keyword(section, keyword)
664 8428 : CALL keyword_release(keyword)
665 :
666 : CALL keyword_create(keyword, __LOCATION__, name="SELECTED_STATES_ATOM_RADIUS", &
667 : description="Select all the states included in the given radius around each atoms "// &
668 : "in SELECTED_STATES_ON_ATOM_LIST.", &
669 : usage="SELECTED_STATES_ATOM_RADIUS 2.0", &
670 : type_of_var=real_t, &
671 : default_r_val=cp_unit_to_cp2k(value=4.0_dp, unit_str="angstrom"), &
672 8428 : unit_str="angstrom")
673 8428 : CALL section_add_keyword(section, keyword)
674 8428 : CALL keyword_release(keyword)
675 :
676 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_CURRENT", &
677 : description="Restart the induced current density calculation"// &
678 : " from a previous run (not working yet).", &
679 : usage="RESTART_CURRENT", default_l_val=.FALSE., &
680 8428 : lone_keyword_l_val=.TRUE.)
681 8428 : CALL section_add_keyword(section, keyword)
682 8428 : CALL keyword_release(keyword)
683 :
684 8428 : NULLIFY (subsection)
685 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
686 : description="print results of induced current density calculation", &
687 8428 : repeats=.FALSE.)
688 :
689 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CURRENT_CUBES", &
690 : description="Controls the printing of the induced current density (not working yet).", &
691 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
692 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
693 : description="The stride (X,Y,Z) used to write the cube file "// &
694 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
695 : " 1 number valid for all components (not working yet).", &
696 8428 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
697 8428 : CALL section_add_keyword(print_key, keyword)
698 8428 : CALL keyword_release(keyword)
699 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
700 : description="append the cube files when they already exist", &
701 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
702 8428 : CALL section_add_keyword(print_key, keyword)
703 8428 : CALL keyword_release(keyword)
704 :
705 8428 : CALL section_add_subsection(subsection, print_key)
706 8428 : CALL section_release(print_key)
707 :
708 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESPONSE_FUNCTION_CUBES", &
709 : description="Controls the printing of the response functions (not working yet).", &
710 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
711 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
712 : description="The stride (X,Y,Z) used to write the cube file "// &
713 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
714 : " 1 number valid for all components (not working yet).", &
715 8428 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
716 8428 : CALL section_add_keyword(print_key, keyword)
717 8428 : CALL keyword_release(keyword)
718 :
719 : CALL keyword_create(keyword, __LOCATION__, name="CUBES_LU_BOUNDS", &
720 : variants=(/"CUBES_LU"/), &
721 : description="The lower and upper index of the states to be printed as cube (not working yet).", &
722 : usage="CUBES_LU_BOUNDS integer integer", &
723 16856 : n_var=2, default_i_vals=(/0, -2/), type_of_var=integer_t)
724 8428 : CALL section_add_keyword(print_key, keyword)
725 8428 : CALL keyword_release(keyword)
726 :
727 : CALL keyword_create(keyword, __LOCATION__, name="CUBES_LIST", &
728 : description="Indexes of the states to be printed as cube files "// &
729 : "This keyword can be repeated several times "// &
730 : "(useful if you have to specify many indexes) (not working yet).", &
731 : usage="CUBES_LIST 1 2", &
732 8428 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
733 8428 : CALL section_add_keyword(print_key, keyword)
734 8428 : CALL keyword_release(keyword)
735 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
736 : description="append the cube files when they already exist", &
737 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
738 8428 : CALL section_add_keyword(print_key, keyword)
739 8428 : CALL keyword_release(keyword)
740 :
741 8428 : CALL section_add_subsection(subsection, print_key)
742 8428 : CALL section_release(print_key)
743 :
744 8428 : CALL section_add_subsection(section, subsection)
745 8428 : CALL section_release(subsection)
746 :
747 8428 : NULLIFY (subsection)
748 8428 : CALL create_interp_section(subsection)
749 8428 : CALL section_add_subsection(section, subsection)
750 8428 : CALL section_release(subsection)
751 :
752 8428 : END SUBROUTINE create_current_section
753 :
754 : ! **************************************************************************************************
755 : !> \brief creates the input structure used to activate
756 : !> calculation of NMR chemical shift using
757 : !> the induced current obtained from DFPT
758 : !> Available properties : none
759 : !> \param section the section to create
760 : !> \author MI/VW
761 : ! **************************************************************************************************
762 8428 : SUBROUTINE create_nmr_section(section)
763 : TYPE(section_type), POINTER :: section
764 :
765 : TYPE(keyword_type), POINTER :: keyword
766 : TYPE(section_type), POINTER :: print_key, subsection
767 :
768 8428 : NULLIFY (keyword, print_key, subsection)
769 :
770 8428 : CPASSERT(.NOT. ASSOCIATED(section))
771 : CALL section_create(section, __LOCATION__, name="nmr", &
772 : description="The chemical shift is calculated by DFPT.", &
773 : n_keywords=5, n_subsections=1, repeats=.FALSE., &
774 16856 : citations=(/Weber2009/))
775 :
776 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
777 : description="controls the activation of the nmr calculation", &
778 : usage="&NMR T", &
779 : default_l_val=.FALSE., &
780 8428 : lone_keyword_l_val=.TRUE.)
781 8428 : CALL section_add_keyword(section, keyword)
782 8428 : CALL keyword_release(keyword)
783 :
784 : CALL keyword_create(keyword, __LOCATION__, name="INTERPOLATE_SHIFT", &
785 : description="Calculate the soft part of the chemical shift by interpolation ", &
786 : usage="INTERPOLATE_SHIFT T", &
787 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
788 8428 : CALL section_add_keyword(section, keyword)
789 8428 : CALL keyword_release(keyword)
790 :
791 : CALL keyword_create(keyword, __LOCATION__, name="NICS", &
792 : description="Calculate the chemical shift in a set of points"// &
793 : " given from an external file", usage="NICS", &
794 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
795 8428 : CALL section_add_keyword(section, keyword)
796 8428 : CALL keyword_release(keyword)
797 :
798 : CALL keyword_create(keyword, __LOCATION__, name="NICS_FILE_NAME", &
799 : description="Name of the file with the NICS points coordinates", &
800 : usage="NICS_FILE_NAME nics_file", &
801 8428 : default_lc_val="nics_file")
802 8428 : CALL section_add_keyword(section, keyword)
803 8428 : CALL keyword_release(keyword)
804 :
805 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_NMR", &
806 : description="Restart the NMR calculation from a previous run (NOT WORKING YET)", &
807 : usage="RESTART_NMR", default_l_val=.FALSE., &
808 8428 : lone_keyword_l_val=.TRUE.)
809 8428 : CALL section_add_keyword(section, keyword)
810 8428 : CALL keyword_release(keyword)
811 :
812 : CALL keyword_create(keyword, __LOCATION__, name="SHIFT_GAPW_RADIUS", &
813 : description="While computing the local part of the shift (GAPW), "// &
814 : "the integration is restricted to nuclei that are within this radius.", &
815 : usage="SHIFT_GAPW_RADIUS 20.0", &
816 : type_of_var=real_t, &
817 : default_r_val=cp_unit_to_cp2k(value=60.0_dp, unit_str="angstrom"), &
818 8428 : unit_str="angstrom")
819 8428 : CALL section_add_keyword(section, keyword)
820 8428 : CALL keyword_release(keyword)
821 :
822 8428 : NULLIFY (subsection)
823 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
824 : description="print results of nmr calculation", &
825 8428 : repeats=.FALSE.)
826 :
827 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESPONSE_FUNCTION_CUBES", &
828 : description="Controls the printing of the response functions ", &
829 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
830 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
831 : description="The stride (X,Y,Z) used to write the cube file "// &
832 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
833 : " 1 number valid for all components.", &
834 8428 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
835 8428 : CALL section_add_keyword(print_key, keyword)
836 8428 : CALL keyword_release(keyword)
837 :
838 : CALL keyword_create(keyword, __LOCATION__, name="CUBES_LU_BOUNDS", &
839 : variants=(/"CUBES_LU"/), &
840 : description="The lower and upper index of the states to be printed as cube", &
841 : usage="CUBES_LU_BOUNDS integer integer", &
842 16856 : n_var=2, default_i_vals=(/0, -2/), type_of_var=integer_t)
843 8428 : CALL section_add_keyword(print_key, keyword)
844 8428 : CALL keyword_release(keyword)
845 :
846 : CALL keyword_create(keyword, __LOCATION__, name="CUBES_LIST", &
847 : description="Indexes of the states to be printed as cube files "// &
848 : "This keyword can be repeated several times "// &
849 : "(useful if you have to specify many indexes).", &
850 : usage="CUBES_LIST 1 2", &
851 8428 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
852 8428 : CALL section_add_keyword(print_key, keyword)
853 8428 : CALL keyword_release(keyword)
854 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
855 : description="append the cube files when they already exist", &
856 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
857 8428 : CALL section_add_keyword(print_key, keyword)
858 8428 : CALL keyword_release(keyword)
859 :
860 8428 : CALL section_add_subsection(subsection, print_key)
861 8428 : CALL section_release(print_key)
862 :
863 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CHI_TENSOR", &
864 : description="Controls the printing of susceptibility", &
865 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
866 8428 : CALL section_add_subsection(subsection, print_key)
867 8428 : CALL section_release(print_key)
868 :
869 : CALL cp_print_key_section_create(print_key, __LOCATION__, "SHIELDING_TENSOR", &
870 : description="Controls the printing of the chemical shift", &
871 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="")
872 :
873 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS_LU_BOUNDS", &
874 : variants=(/"ATOMS_LU"/), &
875 : description="The lower and upper atomic index for which the tensor is printed", &
876 : usage="ATOMS_LU_BOUNDS integer integer", &
877 16856 : n_var=2, default_i_vals=(/0, -2/), type_of_var=integer_t)
878 8428 : CALL section_add_keyword(print_key, keyword)
879 8428 : CALL keyword_release(keyword)
880 :
881 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS_LIST", &
882 : description="list of atoms for which the shift is printed into a file ", &
883 : usage="LIST_ATOMS 1 2", n_var=-1, &
884 8428 : type_of_var=integer_t, repeats=.TRUE.)
885 8428 : CALL section_add_keyword(print_key, keyword)
886 8428 : CALL keyword_release(keyword)
887 :
888 8428 : CALL section_add_subsection(subsection, print_key)
889 8428 : CALL section_release(print_key)
890 :
891 8428 : CALL section_add_subsection(section, subsection)
892 8428 : CALL section_release(subsection)
893 :
894 8428 : NULLIFY (subsection)
895 8428 : CALL create_interp_section(subsection)
896 8428 : CALL section_add_subsection(section, subsection)
897 8428 : CALL section_release(subsection)
898 :
899 8428 : END SUBROUTINE create_nmr_section
900 :
901 : ! **************************************************************************************************
902 : !> \brief creates the input structure used to activate
903 : !> calculation of NMR spin-spin coupling (implementation not operating)
904 : !> Available properties : none
905 : !> \param section the section to create
906 : !> \author VW
907 : ! **************************************************************************************************
908 8428 : SUBROUTINE create_spin_spin_section(section)
909 : TYPE(section_type), POINTER :: section
910 :
911 : TYPE(keyword_type), POINTER :: keyword
912 : TYPE(section_type), POINTER :: print_key, subsection
913 :
914 8428 : NULLIFY (keyword, print_key, subsection)
915 :
916 8428 : CPASSERT(.NOT. ASSOCIATED(section))
917 : CALL section_create(section, __LOCATION__, name="spinspin", &
918 : description="Compute indirect spin-spin coupling constants.", &
919 8428 : n_keywords=5, n_subsections=1, repeats=.FALSE.)
920 :
921 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
922 : description="controls the activation of the nmr calculation", &
923 : usage="&SPINSPIN T", &
924 : default_l_val=.FALSE., &
925 8428 : lone_keyword_l_val=.TRUE.)
926 8428 : CALL section_add_keyword(section, keyword)
927 8428 : CALL keyword_release(keyword)
928 :
929 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_SPINSPIN", &
930 : description="Restart the spin-spin calculation from a previous run (NOT WORKING YET)", &
931 : usage="RESTART_SPINSPIN", default_l_val=.FALSE., &
932 8428 : lone_keyword_l_val=.TRUE.)
933 8428 : CALL section_add_keyword(section, keyword)
934 8428 : CALL keyword_release(keyword)
935 :
936 : CALL keyword_create(keyword, __LOCATION__, name="ISSC_ON_ATOM_LIST", &
937 : description="Atoms for which the issc is computed.", &
938 : usage="ISSC_ON_ATOM_LIST 1 2 10", &
939 8428 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
940 8428 : CALL section_add_keyword(section, keyword)
941 8428 : CALL keyword_release(keyword)
942 :
943 : CALL keyword_create(keyword, __LOCATION__, name="DO_FC", &
944 : description="Compute the Fermi contact contribution", &
945 : usage="DO_FC F", &
946 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
947 8428 : CALL section_add_keyword(section, keyword)
948 8428 : CALL keyword_release(keyword)
949 :
950 : CALL keyword_create(keyword, __LOCATION__, name="DO_SD", &
951 : description="Compute the spin-dipolar contribution", &
952 : usage="DO_SD F", &
953 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
954 8428 : CALL section_add_keyword(section, keyword)
955 8428 : CALL keyword_release(keyword)
956 :
957 : CALL keyword_create(keyword, __LOCATION__, name="DO_PSO", &
958 : description="Compute the paramagnetic spin-orbit contribution", &
959 : usage="DO_PSO F", &
960 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
961 8428 : CALL section_add_keyword(section, keyword)
962 8428 : CALL keyword_release(keyword)
963 :
964 : CALL keyword_create(keyword, __LOCATION__, name="DO_DSO", &
965 : description="Compute the diamagnetic spin-orbit contribution (NOT YET IMPLEMENTED)", &
966 : usage="DO_DSO F", &
967 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
968 8428 : CALL section_add_keyword(section, keyword)
969 8428 : CALL keyword_release(keyword)
970 :
971 8428 : NULLIFY (subsection)
972 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
973 : description="print results of the indirect spin-spin calculation", &
974 8428 : repeats=.FALSE.)
975 :
976 : CALL cp_print_key_section_create(print_key, __LOCATION__, "K_MATRIX", &
977 : description="Controls the printing of the indirect spin-spin matrix", &
978 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="")
979 :
980 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS_LIST", &
981 : description="list of atoms for which the indirect spin-spin is printed into a file ", &
982 : usage="LIST_ATOMS 1 2", n_var=-1, &
983 8428 : type_of_var=integer_t, repeats=.TRUE.)
984 8428 : CALL section_add_keyword(print_key, keyword)
985 8428 : CALL keyword_release(keyword)
986 :
987 8428 : CALL section_add_subsection(subsection, print_key)
988 8428 : CALL section_release(print_key)
989 :
990 8428 : CALL section_add_subsection(section, subsection)
991 8428 : CALL section_release(subsection)
992 :
993 8428 : NULLIFY (subsection)
994 8428 : CALL create_interp_section(subsection)
995 8428 : CALL section_add_subsection(section, subsection)
996 8428 : CALL section_release(subsection)
997 :
998 8428 : END SUBROUTINE create_spin_spin_section
999 :
1000 : ! **************************************************************************************************
1001 : !> \brief creates the input structure used to activate
1002 : !> calculation of EPR using
1003 : !> the induced current obtained from DFPT
1004 : !> Available properties : none
1005 : !> \param section the section to create
1006 : !> \author VW
1007 : ! **************************************************************************************************
1008 8428 : SUBROUTINE create_epr_section(section)
1009 : TYPE(section_type), POINTER :: section
1010 :
1011 : TYPE(keyword_type), POINTER :: keyword
1012 : TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1013 :
1014 8428 : NULLIFY (keyword, print_key, subsection, subsubsection)
1015 :
1016 8428 : CPASSERT(.NOT. ASSOCIATED(section))
1017 : CALL section_create(section, __LOCATION__, name="EPR", &
1018 : description="The g tensor is calculated by DFPT ", &
1019 : n_keywords=5, n_subsections=1, repeats=.FALSE., &
1020 16856 : citations=(/Weber2009/))
1021 :
1022 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
1023 : description="controls the activation of the epr calculation", &
1024 : usage="&EPR T", &
1025 : default_l_val=.FALSE., &
1026 8428 : lone_keyword_l_val=.TRUE.)
1027 8428 : CALL section_add_keyword(section, keyword)
1028 8428 : CALL keyword_release(keyword)
1029 :
1030 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_EPR", &
1031 : description="Restart the EPR calculation from a previous run (NOT WORKING)", &
1032 : usage="RESTART_EPR", default_l_val=.FALSE., &
1033 8428 : lone_keyword_l_val=.TRUE.)
1034 8428 : CALL section_add_keyword(section, keyword)
1035 8428 : CALL keyword_release(keyword)
1036 :
1037 8428 : NULLIFY (subsection)
1038 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
1039 : description="print results of epr calculation", &
1040 8428 : repeats=.FALSE.)
1041 :
1042 : CALL cp_print_key_section_create(print_key, __LOCATION__, "NABLAVKS_CUBES", &
1043 : description="Controls the printing of the components of nabla v_ks ", &
1044 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
1045 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1046 : description="The stride (X,Y,Z) used to write the cube file "// &
1047 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1048 : " 1 number valid for all components.", &
1049 8428 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
1050 8428 : CALL section_add_keyword(print_key, keyword)
1051 8428 : CALL keyword_release(keyword)
1052 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1053 : description="append the cube files when they already exist", &
1054 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1055 8428 : CALL section_add_keyword(print_key, keyword)
1056 8428 : CALL keyword_release(keyword)
1057 :
1058 8428 : CALL section_add_subsection(subsection, print_key)
1059 8428 : CALL section_release(print_key)
1060 :
1061 : CALL cp_print_key_section_create(print_key, __LOCATION__, "G_TENSOR", &
1062 : description="Controls the printing of the g tensor", &
1063 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
1064 8428 : CALL create_xc_section(subsubsection)
1065 8428 : CALL section_add_subsection(print_key, subsubsection)
1066 8428 : CALL section_release(subsubsection)
1067 :
1068 : CALL keyword_create(keyword, __LOCATION__, name="GAPW_MAX_ALPHA", &
1069 : description="Maximum alpha of GTH potentials allowed on the soft grids ", &
1070 8428 : usage="GAPW_MAX_ALPHA real", default_r_val=5.0_dp)
1071 8428 : CALL section_add_keyword(print_key, keyword)
1072 8428 : CALL keyword_release(keyword)
1073 :
1074 : CALL keyword_create(keyword, __LOCATION__, name="SOO_RHO_HARD", &
1075 : description="Whether or not to include the atomic parts of the density "// &
1076 : "in the SOO part of the g tensor", usage="SOO_RHO_HARD", &
1077 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1078 8428 : CALL section_add_keyword(print_key, keyword)
1079 8428 : CALL keyword_release(keyword)
1080 :
1081 8428 : CALL section_add_subsection(subsection, print_key)
1082 8428 : CALL section_release(print_key)
1083 :
1084 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESPONSE_FUNCTION_CUBES", &
1085 : description="Controls the printing of the response functions ", &
1086 8428 : print_level=high_print_level, add_last=add_last_numeric, filename="")
1087 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1088 : description="The stride (X,Y,Z) used to write the cube file "// &
1089 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1090 : " 1 number valid for all components.", &
1091 8428 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
1092 8428 : CALL section_add_keyword(print_key, keyword)
1093 8428 : CALL keyword_release(keyword)
1094 :
1095 : CALL keyword_create(keyword, __LOCATION__, name="CUBES_LU_BOUNDS", &
1096 : variants=(/"CUBES_LU"/), &
1097 : description="The lower and upper index of the states to be printed as cube", &
1098 : usage="CUBES_LU_BOUNDS integer integer", &
1099 16856 : n_var=2, default_i_vals=(/0, -2/), type_of_var=integer_t)
1100 8428 : CALL section_add_keyword(print_key, keyword)
1101 8428 : CALL keyword_release(keyword)
1102 :
1103 : CALL keyword_create(keyword, __LOCATION__, name="CUBES_LIST", &
1104 : description="Indexes of the states to be printed as cube files "// &
1105 : "This keyword can be repeated several times "// &
1106 : "(useful if you have to specify many indexes).", &
1107 : usage="CUBES_LIST 1 2", &
1108 8428 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
1109 8428 : CALL section_add_keyword(print_key, keyword)
1110 8428 : CALL keyword_release(keyword)
1111 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1112 : description="append the cube files when they already exist", &
1113 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1114 8428 : CALL section_add_keyword(print_key, keyword)
1115 8428 : CALL keyword_release(keyword)
1116 :
1117 8428 : CALL section_add_subsection(subsection, print_key)
1118 8428 : CALL section_release(print_key)
1119 :
1120 8428 : CALL section_add_subsection(section, subsection)
1121 8428 : CALL section_release(subsection)
1122 :
1123 8428 : NULLIFY (subsection)
1124 8428 : CALL create_interp_section(subsection)
1125 8428 : CALL section_add_subsection(section, subsection)
1126 8428 : CALL section_release(subsection)
1127 :
1128 8428 : END SUBROUTINE create_epr_section
1129 :
1130 : ! **************************************************************************************************
1131 : !> \brief creates the input structure used to activate
1132 : !> calculation of polarizability tensor DFPT
1133 : !> Available properties : none
1134 : !> \param section the section to create
1135 : !> \author SL
1136 : ! **************************************************************************************************
1137 8428 : SUBROUTINE create_polarizability_section(section)
1138 :
1139 : TYPE(section_type), POINTER :: section
1140 :
1141 : TYPE(keyword_type), POINTER :: keyword
1142 : TYPE(section_type), POINTER :: print_key, subsection
1143 :
1144 8428 : NULLIFY (keyword, print_key, subsection)
1145 :
1146 8428 : CPASSERT(.NOT. ASSOCIATED(section))
1147 : CALL section_create(section, __LOCATION__, name="POLAR", &
1148 : description="Compute polarizabilities.", &
1149 : n_keywords=5, n_subsections=1, repeats=.FALSE., &
1150 16856 : citations=(/Putrino2002/))
1151 :
1152 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
1153 : description="controls the activation of the polarizability calculation", &
1154 : usage="&POLAR T", &
1155 : default_l_val=.FALSE., &
1156 8428 : lone_keyword_l_val=.TRUE.)
1157 8428 : CALL section_add_keyword(section, keyword)
1158 8428 : CALL keyword_release(keyword)
1159 :
1160 : CALL keyword_create(keyword, __LOCATION__, name="DO_RAMAN", &
1161 : description="Compute the electric-dipole--electric-dipole polarizability", &
1162 : usage="DO_RAMAN F", &
1163 : citations=(/Luber2014/), &
1164 16856 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1165 8428 : CALL section_add_keyword(section, keyword)
1166 8428 : CALL keyword_release(keyword)
1167 :
1168 : CALL keyword_create(keyword, __LOCATION__, name="PERIODIC_DIPOLE_OPERATOR", &
1169 : description="Type of dipole operator: Berry phase(T) or Local(F)", &
1170 : usage="PERIODIC_DIPOLE_OPERATOR T", &
1171 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1172 8428 : CALL section_add_keyword(section, keyword)
1173 8428 : CALL keyword_release(keyword)
1174 :
1175 8428 : NULLIFY (subsection)
1176 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
1177 : description="print results of the polarizability calculation", &
1178 8428 : repeats=.FALSE.)
1179 :
1180 : CALL cp_print_key_section_create(print_key, __LOCATION__, "POLAR_MATRIX", &
1181 : description="Controls the printing of the polarizabilities", &
1182 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="")
1183 :
1184 8428 : CALL section_add_subsection(subsection, print_key)
1185 8428 : CALL section_release(print_key)
1186 8428 : CALL section_add_subsection(section, subsection)
1187 8428 : CALL section_release(subsection)
1188 :
1189 8428 : NULLIFY (subsection)
1190 8428 : CALL create_interp_section(subsection)
1191 8428 : CALL section_add_subsection(section, subsection)
1192 8428 : CALL section_release(subsection)
1193 :
1194 8428 : END SUBROUTINE create_polarizability_section
1195 :
1196 : ! **************************************************************************************************
1197 : !> \brief creates the section for electron transfer coupling
1198 : !> \param section ...
1199 : !> \author fschiff
1200 : ! **************************************************************************************************
1201 8428 : SUBROUTINE create_et_coupling_section(section)
1202 : TYPE(section_type), POINTER :: section
1203 :
1204 : TYPE(keyword_type), POINTER :: keyword
1205 : TYPE(section_type), POINTER :: print_key, subsection
1206 :
1207 8428 : NULLIFY (keyword)
1208 8428 : CPASSERT(.NOT. ASSOCIATED(section))
1209 : CALL section_create(section, __LOCATION__, name="ET_COUPLING", &
1210 : description="specifies the two constraints/restraints for extracting ET coupling elements", &
1211 25284 : n_keywords=1, n_subsections=4, repeats=.FALSE., citations=(/Kondov2007, Futera2017/))
1212 :
1213 8428 : NULLIFY (subsection)
1214 8428 : CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT_A")
1215 8428 : CALL section_add_subsection(section, subsection)
1216 8428 : CALL section_release(subsection)
1217 :
1218 8428 : NULLIFY (subsection)
1219 8428 : CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT_B")
1220 8428 : CALL section_add_subsection(section, subsection)
1221 8428 : CALL section_release(subsection)
1222 :
1223 8428 : NULLIFY (subsection)
1224 8428 : CALL create_projection(subsection, "PROJECTION")
1225 8428 : CALL section_add_subsection(section, subsection)
1226 8428 : CALL section_release(subsection)
1227 :
1228 : CALL keyword_create(keyword, __LOCATION__, name="TYPE_OF_CONSTRAINT", &
1229 : description="Specifies the type of constraint", &
1230 : usage="TYPE_OF_CONSTRAINT DDAPC", &
1231 : enum_c_vals=s2a("NONE", "DDAPC"), &
1232 : enum_i_vals=(/do_no_et, do_et_ddapc/), &
1233 : enum_desc=s2a("NONE", "DDAPC Constraint"), &
1234 8428 : default_i_val=do_no_et)
1235 8428 : CALL section_add_keyword(section, keyword)
1236 8428 : CALL keyword_release(keyword)
1237 :
1238 8428 : NULLIFY (print_key)
1239 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
1240 : description="Controls the printing basic info about the method", &
1241 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1242 8428 : CALL section_add_subsection(section, print_key)
1243 8428 : CALL section_release(print_key)
1244 :
1245 8428 : END SUBROUTINE create_et_coupling_section
1246 :
1247 : ! **************************************************************************************************
1248 : !> \brief defines input sections for specification of Hilbert space partitioning
1249 : !> in projection-operator approach of electronic coupling calulation
1250 : !> \param section pointer to the section data structure
1251 : !> \param section_name name of the projection section
1252 : !> \author Z. Futera (02.2017)
1253 : ! **************************************************************************************************
1254 8428 : SUBROUTINE create_projection(section, section_name)
1255 :
1256 : ! Routine arguments
1257 : TYPE(section_type), POINTER :: section
1258 : CHARACTER(len=*), INTENT(in) :: section_name
1259 :
1260 : TYPE(keyword_type), POINTER :: keyword
1261 : TYPE(section_type), POINTER :: print_key, section_block, section_print
1262 :
1263 : ! Routine name for dubug purposes
1264 :
1265 : ! Sanity check
1266 0 : CPASSERT(.NOT. ASSOCIATED(section))
1267 :
1268 : ! Initialization
1269 8428 : NULLIFY (keyword)
1270 8428 : NULLIFY (print_key)
1271 8428 : NULLIFY (section_block)
1272 8428 : NULLIFY (section_print)
1273 :
1274 : ! Input-file section definition
1275 : CALL section_create(section, __LOCATION__, name=TRIM(ADJUSTL(section_name)), &
1276 : description="Projection-operator approach fo ET coupling calculation", &
1277 8428 : n_keywords=0, n_subsections=2, repeats=.FALSE.)
1278 :
1279 : ! Subsection #0: Log printing
1280 : CALL cp_print_key_section_create(print_key, __LOCATION__, 'PROGRAM_RUN_INFO', &
1281 : description="Controls printing of data and informations to log file", &
1282 8428 : print_level=low_print_level, filename="__STD_OUT__")
1283 8428 : CALL section_add_subsection(section, print_key)
1284 8428 : CALL section_release(print_key)
1285 :
1286 : ! Subsection #1: Atomic blocks
1287 : CALL section_create(section_block, __LOCATION__, name='BLOCK', &
1288 : description="Part of the system (donor, acceptor, bridge,...)", &
1289 8428 : n_keywords=2, n_subsections=1, repeats=.TRUE.)
1290 8428 : CALL section_add_subsection(section, section_block)
1291 :
1292 : ! S#1 - Keyword #1: Atom IDs defining a Hilbert space block
1293 : CALL keyword_create(keyword, __LOCATION__, name='ATOMS', &
1294 : description="Array of atom IDs in the system part", &
1295 : usage="ATOMS {integer} {integer} .. {integer}", &
1296 8428 : n_var=-1, type_of_var=integer_t, repeats=.FALSE.)
1297 8428 : CALL section_add_keyword(section_block, keyword)
1298 8428 : CALL keyword_release(keyword)
1299 :
1300 : ! S#1 - Keyword #1: Atom IDs defining a Hilbert space block
1301 : CALL keyword_create(keyword, __LOCATION__, name='NELECTRON', &
1302 : description="Number of electrons expected in the system part", &
1303 8428 : usage="NELECTRON {integer}", default_i_val=0)
1304 8428 : CALL section_add_keyword(section_block, keyword)
1305 8428 : CALL keyword_release(keyword)
1306 :
1307 : ! S#1 - Subsection #1: Printing setting
1308 : CALL section_create(section_print, __LOCATION__, name='PRINT', &
1309 : description="Possible printing options in ET system part", &
1310 8428 : n_keywords=0, n_subsections=0, repeats=.FALSE.)
1311 8428 : CALL section_add_subsection(section_block, section_print)
1312 :
1313 : ! S#1 - S#1 - Keyword #1: MO coefficient on specific atom
1314 : CALL keyword_create(keyword, __LOCATION__, name='MO_COEFF_ATOM', &
1315 : description="Print out MO coeffiecients on given atom", &
1316 : usage="MO_COEFF_ATOM {integer} {integer} .. {integer}", &
1317 8428 : type_of_var=integer_t, n_var=-1, repeats=.TRUE.)
1318 8428 : CALL section_add_keyword(section_print, keyword)
1319 8428 : CALL keyword_release(keyword)
1320 :
1321 : ! S#1 - S#1 - Keyword #1: MO coefficient of specific state
1322 : CALL keyword_create(keyword, __LOCATION__, name='MO_COEFF_ATOM_STATE', &
1323 : description="Print out MO coeffiecients of specific state", &
1324 : usage="MO_COEFF_ATOM_STATE {integer} {integer} .. {integer}", &
1325 8428 : type_of_var=integer_t, n_var=-1, repeats=.TRUE.)
1326 8428 : CALL section_add_keyword(section_print, keyword)
1327 8428 : CALL keyword_release(keyword)
1328 :
1329 : ! S#1 - S#1 - Subsection #1: Saving MOs to CUBE files
1330 : CALL cp_print_key_section_create(print_key, __LOCATION__, 'MO_CUBES', &
1331 : description="Controls saving of MO cube files", &
1332 8428 : print_level=high_print_level, filename="")
1333 :
1334 : ! S#1 - S#1 - S#1 - Keyword #1: Stride
1335 : CALL keyword_create(keyword, __LOCATION__, name='STRIDE', &
1336 : description="The stride (X,Y,Z) used to write the cube file", &
1337 : usage="STRIDE {integer} {integer} {integer}", n_var=-1, &
1338 8428 : default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
1339 8428 : CALL section_add_keyword(print_key, keyword)
1340 8428 : CALL keyword_release(keyword)
1341 :
1342 : ! S#1 - S#1 - S#1 - Keyword #2: List of MO IDs
1343 : CALL keyword_create(keyword, __LOCATION__, name='MO_LIST', &
1344 : description="Indices of molecular orbitals to save", &
1345 : usage="MO_LIST {integer} {integer} .. {integer}", &
1346 8428 : type_of_var=integer_t, n_var=-1, repeats=.TRUE.)
1347 8428 : CALL section_add_keyword(print_key, keyword)
1348 8428 : CALL keyword_release(keyword)
1349 :
1350 : ! S#1 - S#1 - S#1 - Keyword #2: Number of unoccupied states
1351 : CALL keyword_create(keyword, __LOCATION__, name='NLUMO', &
1352 : description="Number of unoccupied molecular orbitals to save", &
1353 8428 : usage="NLUMO {integer}", default_i_val=1)
1354 8428 : CALL section_add_keyword(print_key, keyword)
1355 8428 : CALL keyword_release(keyword)
1356 :
1357 : ! S#1 - S#1 - S#1 - Keyword #3: Number of occupied states
1358 : CALL keyword_create(keyword, __LOCATION__, name='NHOMO', &
1359 : description="Number of occupied molecular orbitals to save", &
1360 8428 : usage="NHOMO {integer}", default_i_val=1)
1361 8428 : CALL section_add_keyword(print_key, keyword)
1362 8428 : CALL keyword_release(keyword)
1363 :
1364 8428 : CALL section_add_subsection(section_print, print_key)
1365 8428 : CALL section_release(print_key)
1366 :
1367 : ! S#1 - S#1 - Clean
1368 8428 : CALL section_release(section_print)
1369 :
1370 : ! S#1 - Clean
1371 8428 : CALL section_release(section_block)
1372 :
1373 : ! S#1 - Subsection #1: Printing setting
1374 : CALL section_create(section_print, __LOCATION__, name='PRINT', &
1375 : description="Possible printing options in ET", &
1376 8428 : n_keywords=0, n_subsections=0, repeats=.FALSE.)
1377 8428 : CALL section_add_subsection(section, section_print)
1378 :
1379 : ! Print couplings
1380 : CALL cp_print_key_section_create(print_key, __LOCATION__, 'COUPLINGS', &
1381 : description="Controls printing couplings onto file", &
1382 8428 : print_level=low_print_level, filename="")
1383 :
1384 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1385 : description="append the files when they already exist", &
1386 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1387 8428 : CALL section_add_keyword(print_key, keyword)
1388 8428 : CALL keyword_release(keyword)
1389 :
1390 8428 : CALL section_add_subsection(section_print, print_key)
1391 8428 : CALL section_release(print_key)
1392 :
1393 8428 : CALL section_release(section_print)
1394 :
1395 8428 : END SUBROUTINE create_projection
1396 :
1397 : ! **************************************************************************************************
1398 : !> \brief creates an input section for tddfpt calculation
1399 : !> \param section section to create
1400 : !> \par History
1401 : !> * 05.2016 forked from create_tddfpt_section [Sergey Chulkov]
1402 : !> * 08.2016 moved from module input_cp2k_dft [Sergey Chulkov]
1403 : ! **************************************************************************************************
1404 8428 : SUBROUTINE create_tddfpt2_section(section)
1405 : TYPE(section_type), POINTER :: section
1406 :
1407 : TYPE(keyword_type), POINTER :: keyword
1408 : TYPE(section_type), POINTER :: print_key, subsection
1409 :
1410 8428 : CPASSERT(.NOT. ASSOCIATED(section))
1411 : CALL section_create(section, __LOCATION__, name="TDDFPT", &
1412 : description="Parameters needed to set up the Time-Dependent "// &
1413 : "Density Functional Perturbation Theory. "// &
1414 : "Current implementation works for hybrid functionals. "// &
1415 : "Can be used with Gaussian and Plane Waves (GPW) method only.", &
1416 : n_keywords=12, n_subsections=4, repeats=.FALSE., &
1417 16856 : citations=(/Iannuzzi2005/))
1418 :
1419 8428 : NULLIFY (keyword, print_key, subsection)
1420 :
1421 : CALL keyword_create(keyword, __LOCATION__, &
1422 : name="_SECTION_PARAMETERS_", &
1423 : description="Controls the activation of the TDDFPT procedure", &
1424 : default_l_val=.FALSE., &
1425 8428 : lone_keyword_l_val=.TRUE.)
1426 8428 : CALL section_add_keyword(section, keyword)
1427 8428 : CALL keyword_release(keyword)
1428 :
1429 : ! Integer
1430 : CALL keyword_create(keyword, __LOCATION__, name="NSTATES", &
1431 : description="Number of excited states to converge.", &
1432 : n_var=1, type_of_var=integer_t, &
1433 8428 : default_i_val=1)
1434 8428 : CALL section_add_keyword(section, keyword)
1435 8428 : CALL keyword_release(keyword)
1436 :
1437 : CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
1438 : description="Maximal number of iterations to be performed.", &
1439 : n_var=1, type_of_var=integer_t, &
1440 8428 : default_i_val=50)
1441 8428 : CALL section_add_keyword(section, keyword)
1442 8428 : CALL keyword_release(keyword)
1443 :
1444 : CALL keyword_create(keyword, __LOCATION__, name="MAX_KV", &
1445 : description="Maximal number of Krylov space vectors. "// &
1446 : "Davidson iterations will be restarted upon reaching this limit.", &
1447 : n_var=1, type_of_var=integer_t, &
1448 8428 : default_i_val=5000)
1449 8428 : CALL section_add_keyword(section, keyword)
1450 8428 : CALL keyword_release(keyword)
1451 :
1452 : CALL keyword_create(keyword, __LOCATION__, name="NLUMO", &
1453 : description="Number of unoccupied orbitals to consider. "// &
1454 : "Default is to use all unoccupied orbitals (-1).", &
1455 : n_var=1, type_of_var=integer_t, &
1456 8428 : default_i_val=-1)
1457 8428 : CALL section_add_keyword(section, keyword)
1458 8428 : CALL keyword_release(keyword)
1459 :
1460 : CALL keyword_create(keyword, __LOCATION__, name="NPROC_STATE", &
1461 : description="Number of MPI processes to be used per excited state. "// &
1462 : "Default is to use all processors (0).", &
1463 : n_var=1, type_of_var=integer_t, &
1464 8428 : default_i_val=0)
1465 8428 : CALL section_add_keyword(section, keyword)
1466 8428 : CALL keyword_release(keyword)
1467 :
1468 : ! kernel type
1469 : CALL keyword_create(keyword, __LOCATION__, name="KERNEL", &
1470 : description="Options to compute the kernel", &
1471 : usage="KERNEL FULL", &
1472 : enum_c_vals=s2a("FULL", "sTDA", "NONE"), &
1473 : enum_i_vals=(/tddfpt_kernel_full, tddfpt_kernel_stda, tddfpt_kernel_none/), &
1474 8428 : default_i_val=tddfpt_kernel_full)
1475 8428 : CALL section_add_keyword(section, keyword)
1476 8428 : CALL keyword_release(keyword)
1477 :
1478 : CALL keyword_create(keyword, __LOCATION__, name="OE_CORR", &
1479 : description="Orbital energy correction potential.", &
1480 : enum_c_vals=s2a("NONE", "LB94", "GLLB", "SAOP", "SHIFT"), &
1481 : enum_i_vals=(/oe_none, oe_lb, oe_gllb, oe_saop, oe_shift/), &
1482 : enum_desc=s2a("No orbital correction scheme is used", &
1483 : "van Leeuwen and Baerends. PRA, 49:2421, 1994", &
1484 : "Gritsenko, van Leeuwen, van Lenthe, Baerends. PRA, 51:1944, 1995", &
1485 : "Gritsenko, Schipper, Baerends. Chem. Phys. Lett., 302:199, 1999", &
1486 : "Constant shift of virtual and/or open-shell orbitals"), &
1487 8428 : default_i_val=oe_none)
1488 8428 : CALL section_add_keyword(section, keyword)
1489 8428 : CALL keyword_release(keyword)
1490 :
1491 : ! SHIFTS
1492 : CALL keyword_create(keyword, __LOCATION__, name="EV_SHIFT", &
1493 : variants=s2a("VIRTUAL_SHIFT"), &
1494 : description="Constant shift of virtual state eigenvalues.", &
1495 : usage="EV_SHIFT 0.500", &
1496 : n_var=1, type_of_var=real_t, &
1497 : unit_str="eV", &
1498 8428 : default_r_val=0.0_dp)
1499 8428 : CALL section_add_keyword(section, keyword)
1500 8428 : CALL keyword_release(keyword)
1501 : !
1502 : CALL keyword_create(keyword, __LOCATION__, name="EOS_SHIFT", &
1503 : variants=s2a("OPEN_SHELL_SHIFT"), &
1504 : description="Constant shift of open shell eigenvalues.", &
1505 : usage="EOS_SHIFT 0.200", &
1506 : n_var=1, type_of_var=real_t, &
1507 : unit_str="eV", &
1508 8428 : default_r_val=0.0_dp)
1509 8428 : CALL section_add_keyword(section, keyword)
1510 8428 : CALL keyword_release(keyword)
1511 :
1512 : ! Real
1513 : CALL keyword_create(keyword, __LOCATION__, name="CONVERGENCE", &
1514 : description="Target accuracy for excited state energies.", &
1515 : n_var=1, type_of_var=real_t, unit_str="hartree", &
1516 8428 : default_r_val=1.0e-5_dp)
1517 8428 : CALL section_add_keyword(section, keyword)
1518 8428 : CALL keyword_release(keyword)
1519 :
1520 : CALL keyword_create(keyword, __LOCATION__, name="MIN_AMPLITUDE", &
1521 : description="The smallest excitation amplitude to print.", &
1522 : n_var=1, type_of_var=real_t, &
1523 8428 : default_r_val=5.0e-2_dp)
1524 8428 : CALL section_add_keyword(section, keyword)
1525 8428 : CALL keyword_release(keyword)
1526 :
1527 : CALL keyword_create(keyword, __LOCATION__, name="ORTHOGONAL_EPS", &
1528 : description="The largest possible overlap between the ground state and "// &
1529 : "orthogonalised excited state wave-functions. Davidson iterations "// &
1530 : "will be restarted when the overlap goes beyond this threshold in "// &
1531 : "order to prevent numerical instability.", &
1532 : n_var=1, type_of_var=real_t, &
1533 8428 : default_r_val=1.0e-4_dp)
1534 8428 : CALL section_add_keyword(section, keyword)
1535 8428 : CALL keyword_release(keyword)
1536 :
1537 : ! Logical
1538 : CALL keyword_create(keyword, __LOCATION__, name="RESTART", &
1539 : description="Restart the TDDFPT calculation if a restart file exists", &
1540 : n_var=1, type_of_var=logical_t, &
1541 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1542 8428 : CALL section_add_keyword(section, keyword)
1543 8428 : CALL keyword_release(keyword)
1544 :
1545 : CALL keyword_create(keyword, __LOCATION__, name="RKS_TRIPLETS", &
1546 : description="Compute triplet excited states using spin-unpolarised molecular orbitals.", &
1547 : n_var=1, type_of_var=logical_t, &
1548 8428 : default_l_val=.FALSE.)
1549 8428 : CALL section_add_keyword(section, keyword)
1550 8428 : CALL keyword_release(keyword)
1551 :
1552 : CALL keyword_create(keyword, __LOCATION__, name="ADMM_KERNEL_XC_CORRECTION", &
1553 : description="Use/Ignore ADMM correction xc functional for TD kernel. "// &
1554 : "XC correction functional is defined in ground state XC section.", &
1555 : n_var=1, type_of_var=logical_t, &
1556 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1557 8428 : CALL section_add_keyword(section, keyword)
1558 8428 : CALL keyword_release(keyword)
1559 :
1560 : CALL keyword_create(keyword, __LOCATION__, name="ADMM_KERNEL_CORRECTION_SYMMETRIC", &
1561 : description="ADMM correction functional in kernel is applied symmetrically. "// &
1562 : "Original implementation is using a non-symmetric formula.", &
1563 : n_var=1, type_of_var=logical_t, &
1564 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1565 8428 : CALL section_add_keyword(section, keyword)
1566 8428 : CALL keyword_release(keyword)
1567 :
1568 : CALL keyword_create(keyword, __LOCATION__, name="DO_LRIGPW", &
1569 : description="Local resolution of identity for Coulomb contribution.", &
1570 : n_var=1, type_of_var=logical_t, &
1571 8428 : default_l_val=.FALSE.)
1572 8428 : CALL section_add_keyword(section, keyword)
1573 8428 : CALL keyword_release(keyword)
1574 :
1575 : CALL keyword_create(keyword, __LOCATION__, name="AUTO_BASIS", &
1576 : description="Specify size of automatically generated auxiliary basis sets: "// &
1577 : "Options={small,medium,large,huge}", &
1578 : usage="AUTO_BASIS {basis_type} {basis_size}", &
1579 25284 : type_of_var=char_t, repeats=.TRUE., n_var=-1, default_c_vals=(/"X", "X"/))
1580 8428 : CALL section_add_keyword(section, keyword)
1581 8428 : CALL keyword_release(keyword)
1582 :
1583 : ! Strings
1584 : CALL keyword_create(keyword, __LOCATION__, name="WFN_RESTART_FILE_NAME", &
1585 : variants=(/"RESTART_FILE_NAME"/), &
1586 : description="Name of the wave function restart file, may include a path."// &
1587 : " If no file is specified, the default is to open the file as generated by"// &
1588 : " the wave function restart print key.", &
1589 : usage="WFN_RESTART_FILE_NAME <FILENAME>", &
1590 16856 : type_of_var=lchar_t)
1591 8428 : CALL section_add_keyword(section, keyword)
1592 8428 : CALL keyword_release(keyword)
1593 :
1594 : ! DIPOLE subsection
1595 : CALL section_create(subsection, __LOCATION__, name="DIPOLE_MOMENTS", &
1596 : description="Parameters to compute oscillator strengths in the dipole approximation.", &
1597 8428 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
1598 :
1599 : CALL keyword_create(keyword, __LOCATION__, name="DIPOLE_FORM", &
1600 : description="Form of dipole transition integrals.", &
1601 : enum_c_vals=s2a("BERRY", "LENGTH", "VELOCITY"), &
1602 : enum_desc=s2a("Based on Berry phase formula (valid for fully periodic molecular systems only)", &
1603 : "Length form ⟨ i | r | j ⟩ (valid for non-periodic molecular systems only)", &
1604 : "Velocity form ⟨ i | d/dr | j ⟩"), &
1605 : enum_i_vals=(/tddfpt_dipole_berry, tddfpt_dipole_length, tddfpt_dipole_velocity/), &
1606 8428 : default_i_val=tddfpt_dipole_velocity)
1607 8428 : CALL section_add_keyword(subsection, keyword)
1608 8428 : CALL keyword_release(keyword)
1609 :
1610 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE", &
1611 : description="Reference point to calculate electric "// &
1612 : "dipole moments using the dipole integrals in the length form.", &
1613 : enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
1614 : enum_desc=s2a("Use Center of Mass", &
1615 : "Use Center of Atomic Charges", &
1616 : "Use User-defined Point", &
1617 : "Use Origin of Coordinate System"), &
1618 : enum_i_vals=(/use_mom_ref_com, &
1619 : use_mom_ref_coac, &
1620 : use_mom_ref_user, &
1621 : use_mom_ref_zero/), &
1622 8428 : default_i_val=use_mom_ref_com)
1623 8428 : CALL section_add_keyword(subsection, keyword)
1624 8428 : CALL keyword_release(keyword)
1625 :
1626 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT", &
1627 : description="User-defined reference point.", &
1628 : usage="REFERENCE_POINT x y z", &
1629 8428 : repeats=.FALSE., n_var=3, type_of_var=real_t, unit_str='bohr')
1630 8428 : CALL section_add_keyword(subsection, keyword)
1631 8428 : CALL keyword_release(keyword)
1632 :
1633 8428 : CALL section_add_subsection(section, subsection)
1634 8428 : CALL section_release(subsection)
1635 :
1636 : ! SOC functional
1637 :
1638 : CALL section_create(subsection, __LOCATION__, name="SOC", &
1639 : description="Is jet to be implemented", &
1640 8428 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
1641 :
1642 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
1643 : variants=s2a("EPS_FILTER_MATRIX"), &
1644 : description="The threshold used for sparse matrix operations", &
1645 : usage="EPS_FILTER {real}", &
1646 : type_of_var=real_t, &
1647 8428 : default_r_val=1.0E-10_dp)
1648 8428 : CALL section_add_keyword(subsection, keyword)
1649 8428 : CALL keyword_release(keyword)
1650 :
1651 : CALL keyword_create(keyword, __LOCATION__, name="GRID", &
1652 : variants=(/"ATOMIC_GRID"/), &
1653 : description="Specification of the atomic angular and radial grids for "// &
1654 : "a atomic kind. This keyword must be repeated for all kinds! "// &
1655 : "Usage: GRID < LEBEDEV_GRID > < RADIAL_GRID >", &
1656 : usage="GRID {string} {integer} {integer}", &
1657 16856 : n_var=3, type_of_var=char_t, repeats=.TRUE.)
1658 8428 : CALL section_add_keyword(subsection, keyword)
1659 8428 : CALL keyword_release(keyword)
1660 :
1661 8428 : CALL section_add_subsection(section, subsection)
1662 8428 : CALL section_release(subsection)
1663 :
1664 : ! kernel XC functional
1665 8428 : CALL create_xc_section(subsection)
1666 8428 : CALL section_add_subsection(section, subsection)
1667 8428 : CALL section_release(subsection)
1668 :
1669 : ! MGRID subsection
1670 8428 : CALL create_mgrid_section(subsection, create_subsections=.FALSE.)
1671 8428 : CALL section_add_subsection(section, subsection)
1672 8428 : CALL section_release(subsection)
1673 :
1674 : ! sTDA subsection
1675 8428 : CALL create_stda_section(subsection)
1676 8428 : CALL section_add_subsection(section, subsection)
1677 8428 : CALL section_release(subsection)
1678 :
1679 : ! LRI subsection
1680 8428 : CALL create_lrigpw_section(subsection)
1681 8428 : CALL section_add_subsection(section, subsection)
1682 8428 : CALL section_release(subsection)
1683 :
1684 : ! LINRES section
1685 8428 : CALL create_linres_section(subsection, create_subsections=.FALSE., default_set_tdlr=.TRUE.)
1686 8428 : CALL section_add_subsection(section, subsection)
1687 8428 : CALL section_release(subsection)
1688 :
1689 : ! PRINT subsection
1690 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
1691 8428 : description="Printing of information during the TDDFT run.", repeats=.FALSE.)
1692 :
1693 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="PROGRAM_BANNER", &
1694 : description="Controls the printing of the banner for TDDFPT program", &
1695 8428 : print_level=silent_print_level, filename="__STD_OUT__")
1696 8428 : CALL section_add_subsection(subsection, print_key)
1697 8428 : CALL section_release(print_key)
1698 :
1699 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="GUESS_VECTORS", &
1700 : description="Controls the printing of initial guess vectors.", &
1701 8428 : print_level=low_print_level, filename="__STD_OUT__")
1702 8428 : CALL section_add_subsection(subsection, print_key)
1703 8428 : CALL section_release(print_key)
1704 :
1705 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="ITERATION_INFO", &
1706 : description="Controls the printing of basic iteration information "// &
1707 : "during the TDDFT run.", &
1708 8428 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1709 8428 : CALL section_add_subsection(subsection, print_key)
1710 8428 : CALL section_release(print_key)
1711 :
1712 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="DETAILED_ENERGY", &
1713 : description="Controls the printing of detailed energy information "// &
1714 : "during the TDDFT run.", &
1715 8428 : print_level=medium_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1716 8428 : CALL section_add_subsection(subsection, print_key)
1717 8428 : CALL section_release(print_key)
1718 :
1719 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="BASIS_SET_FILE", &
1720 : description="Controls the printing of a file with all basis sets used.", &
1721 8428 : print_level=debug_print_level, filename="BASIS_SETS")
1722 8428 : CALL section_add_subsection(subsection, print_key)
1723 8428 : CALL section_release(print_key)
1724 :
1725 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="RESTART", &
1726 : description="Controls the dumping of the MO restart file during TDDFPT. "// &
1727 : "By default keeps a short history of three restarts.", &
1728 : print_level=low_print_level, common_iter_levels=3, &
1729 : each_iter_names=s2a("TDDFT_SCF"), each_iter_values=(/10/), &
1730 8428 : add_last=add_last_numeric, filename="RESTART")
1731 : CALL keyword_create(keyword, __LOCATION__, name="BACKUP_COPIES", &
1732 : description="Specifies the maximum number of backup copies.", &
1733 : usage="BACKUP_COPIES {int}", &
1734 8428 : default_i_val=1)
1735 8428 : CALL section_add_keyword(print_key, keyword)
1736 8428 : CALL keyword_release(keyword)
1737 8428 : CALL section_add_subsection(subsection, print_key)
1738 8428 : CALL section_release(print_key)
1739 :
1740 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="NTO_ANALYSIS", &
1741 : description="Perform a natural transition orbital analysis.", &
1742 8428 : print_level=medium_print_level)
1743 : CALL keyword_create(keyword, __LOCATION__, name="THRESHOLD", &
1744 : description="Threshold for sum of NTO eigenvalues considered", &
1745 : usage="Threshold 0.95", &
1746 : n_var=1, &
1747 : type_of_var=real_t, &
1748 8428 : default_r_val=0.975_dp)
1749 8428 : CALL section_add_keyword(print_key, keyword)
1750 8428 : CALL keyword_release(keyword)
1751 : CALL keyword_create(keyword, __LOCATION__, name="INTENSITY_THRESHOLD", &
1752 : description="Threshold for oscillator strength to screen states.", &
1753 : usage="Intensity_threshold 0.01", &
1754 : n_var=1, &
1755 : type_of_var=real_t, &
1756 8428 : default_r_val=0.0_dp)
1757 8428 : CALL section_add_keyword(print_key, keyword)
1758 8428 : CALL keyword_release(keyword)
1759 : CALL keyword_create(keyword, __LOCATION__, name="STATE_LIST", &
1760 : description="Specifies a list of states for the NTO calculations.", &
1761 : usage="STATE_LIST {integer} {integer} .. {integer}", &
1762 8428 : n_var=-1, type_of_var=integer_t)
1763 8428 : CALL section_add_keyword(print_key, keyword)
1764 8428 : CALL keyword_release(keyword)
1765 : CALL keyword_create(keyword, __LOCATION__, name="CUBE_FILES", &
1766 : description="Print NTOs on Cube Files", &
1767 : usage="CUBE_FILES {logical}", repeats=.FALSE., n_var=1, &
1768 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1769 8428 : CALL section_add_keyword(print_key, keyword)
1770 8428 : CALL keyword_release(keyword)
1771 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
1772 : description="The stride (X,Y,Z) used to write the cube file "// &
1773 : "(larger values result in smaller cube files). Provide 3 numbers (for X,Y,Z) or"// &
1774 : " 1 number valid for all components.", &
1775 8428 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
1776 8428 : CALL section_add_keyword(print_key, keyword)
1777 8428 : CALL keyword_release(keyword)
1778 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1779 : description="append the cube files when they already exist", &
1780 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1781 8428 : CALL section_add_keyword(print_key, keyword)
1782 8428 : CALL keyword_release(keyword)
1783 8428 : CALL section_add_subsection(subsection, print_key)
1784 8428 : CALL section_release(print_key)
1785 :
1786 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MOS_MOLDEN", &
1787 : description="Write the NTO in Molden file format, for visualisation.", &
1788 8428 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MOS")
1789 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
1790 : description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
1791 : usage="NDIGITS {int}", &
1792 8428 : default_i_val=3)
1793 8428 : CALL section_add_keyword(print_key, keyword)
1794 8428 : CALL keyword_release(keyword)
1795 : CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
1796 : description="Representation of Gaussian-type orbitals", &
1797 : default_i_val=gto_spherical, &
1798 : enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
1799 : enum_desc=s2a( &
1800 : "Cartesian Gaussian orbitals. Use with caution", &
1801 : "Spherical Gaussian orbitals. Incompatible with VMD"), &
1802 8428 : enum_i_vals=(/gto_cartesian, gto_spherical/))
1803 8428 : CALL section_add_keyword(print_key, keyword)
1804 8428 : CALL keyword_release(keyword)
1805 8428 : CALL section_add_subsection(subsection, print_key)
1806 8428 : CALL section_release(print_key)
1807 :
1808 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="NAMD_PRINT", &
1809 : description="Controls the printout required for NAMD with NEWTONX.", &
1810 8428 : print_level=debug_print_level + 1, filename="CP2K_NEWTONX")
1811 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_VIRTUALS", &
1812 : description="Print occupied AND virtual molecular orbital coefficients", &
1813 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1814 8428 : CALL section_add_keyword(print_key, keyword)
1815 8428 : CALL keyword_release(keyword)
1816 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_PHASES", &
1817 : description="Print phases of occupied and virtuals MOs.", &
1818 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1819 8428 : CALL section_add_keyword(print_key, keyword)
1820 8428 : CALL keyword_release(keyword)
1821 : CALL keyword_create(keyword, __LOCATION__, name="SCALE_WITH_PHASES", &
1822 : description="Scale ES eigenvectors with phases of occupied and virtuals MOs.", &
1823 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1824 8428 : CALL section_add_keyword(print_key, keyword)
1825 8428 : CALL keyword_release(keyword)
1826 8428 : CALL section_add_subsection(subsection, print_key)
1827 8428 : CALL section_release(print_key)
1828 :
1829 : !! SOC PRINT SECTION
1830 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="SOC_PRINT", &
1831 : description="Controls the printout of the tddfpt2_soc modul", &
1832 8428 : print_level=debug_print_level + 1, filename="SOC")
1833 : CALL keyword_create(keyword, __LOCATION__, name="UNIT_eV", &
1834 : description="Will detrement if output in eVolt will be printef.", &
1835 8428 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1836 8428 : CALL section_add_keyword(print_key, keyword)
1837 8428 : CALL keyword_release(keyword)
1838 : CALL keyword_create(keyword, __LOCATION__, name="UNIT_wn", &
1839 : description="Will detrement if output in wavenumbers will be printed.", &
1840 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1841 8428 : CALL section_add_keyword(print_key, keyword)
1842 8428 : CALL keyword_release(keyword)
1843 : CALL keyword_create(keyword, __LOCATION__, name="SPLITTING", &
1844 : description="Will add the SOC-Splitting as additional output", &
1845 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1846 8428 : CALL section_add_keyword(print_key, keyword)
1847 8428 : CALL keyword_release(keyword)
1848 : CALL keyword_create(keyword, __LOCATION__, name="SOME", &
1849 : description="Will add the SOC-Matrix as additional output in a different file", &
1850 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1851 8428 : CALL section_add_keyword(print_key, keyword)
1852 8428 : CALL keyword_release(keyword)
1853 8428 : CALL section_add_subsection(subsection, print_key)
1854 8428 : CALL section_release(print_key)
1855 :
1856 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="FORCES", &
1857 : description="Controls the calculation and printing of excited state forces. "// &
1858 : "This needs a RUN_TYPE that includes force evaluation, e.g. ENERGY_FORCE", &
1859 8428 : print_level=debug_print_level, filename="TDFORCE")
1860 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
1861 : description="Specifies a list of states for the force calculations.", &
1862 : usage="LIST {integer} {integer} .. {integer}", repeats=.TRUE., &
1863 8428 : n_var=-1, type_of_var=integer_t)
1864 8428 : CALL section_add_keyword(print_key, keyword)
1865 8428 : CALL keyword_release(keyword)
1866 : CALL keyword_create(keyword, __LOCATION__, name="THRESHOLD", &
1867 : description="Threshold for oszillator strength to screen states.", &
1868 : usage="Threshold 0.01", &
1869 : n_var=1, &
1870 : type_of_var=real_t, &
1871 8428 : default_r_val=0.0_dp)
1872 8428 : CALL section_add_keyword(print_key, keyword)
1873 8428 : CALL keyword_release(keyword)
1874 8428 : CALL section_add_subsection(subsection, print_key)
1875 8428 : CALL section_release(print_key)
1876 :
1877 8428 : CALL section_add_subsection(section, subsection)
1878 8428 : CALL section_release(subsection)
1879 :
1880 8428 : END SUBROUTINE create_tddfpt2_section
1881 :
1882 : ! **************************************************************************************************
1883 : !> \brief creates the stda input section (simplified Tamm Dancoff Approximation)
1884 : !> \param section the section to create
1885 : ! **************************************************************************************************
1886 8428 : SUBROUTINE create_stda_section(section)
1887 : TYPE(section_type), POINTER :: section
1888 :
1889 : TYPE(keyword_type), POINTER :: keyword
1890 :
1891 8428 : CPASSERT(.NOT. ASSOCIATED(section))
1892 : CALL section_create(section, __LOCATION__, name="sTDA", &
1893 : description="parameters needed and setup for sTDA calculations", &
1894 8428 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
1895 8428 : NULLIFY (keyword)
1896 :
1897 : CALL keyword_create(keyword, __LOCATION__, name="FRACTION", &
1898 : variants=(/"HFX_FRACTION"/), &
1899 : description="The fraction of TB Hartree-Fock exchange to use in the Kernel. "// &
1900 : "0.0 implies no HFX part is used in the kernel. ", &
1901 16856 : usage="FRACTION 0.0", default_r_val=0.0_dp)
1902 8428 : CALL section_add_keyword(section, keyword)
1903 8428 : CALL keyword_release(keyword)
1904 :
1905 : ! even if scaling parameter for exchange FRACTION (see above) is zero, the semi-empirical electron repulsion
1906 : ! operator for exchange is not, so that a keyword is required to switch off sTDA exchange (if wanted)
1907 : CALL keyword_create(keyword, __LOCATION__, name="DO_EXCHANGE", &
1908 : description="Explicitly including or switching off sTDA exchange", &
1909 8428 : usage="DO_EXCHANGE", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1910 8428 : CALL section_add_keyword(section, keyword)
1911 8428 : CALL keyword_release(keyword)
1912 :
1913 : CALL keyword_create(keyword, __LOCATION__, name="DO_EWALD", &
1914 : description="Use Ewald type method for Coulomb interaction", &
1915 8428 : usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1916 8428 : CALL section_add_keyword(section, keyword)
1917 8428 : CALL keyword_release(keyword)
1918 :
1919 : CALL keyword_create(keyword, __LOCATION__, name="EPS_TD_FILTER", &
1920 : description="Threshold for filtering the transition density matrix", &
1921 8428 : usage="EPS_TD_FILTER epsf", default_r_val=1.e-10_dp)
1922 8428 : CALL section_add_keyword(section, keyword)
1923 8428 : CALL keyword_release(keyword)
1924 :
1925 : CALL keyword_create(keyword, __LOCATION__, name="MATAGA_NISHIMOTO_CEXP", &
1926 : description="Exponent used in Mataga-Nishimoto formula for Coulomb (alpha). "// &
1927 : "Default value is method dependent!", &
1928 8428 : usage="MATAGA_NISHIMOTO_CEXP cexp", default_r_val=-99.0_dp)
1929 8428 : CALL section_add_keyword(section, keyword)
1930 8428 : CALL keyword_release(keyword)
1931 :
1932 : CALL keyword_create(keyword, __LOCATION__, name="MATAGA_NISHIMOTO_XEXP", &
1933 : description="Exponent used in Mataga-Nishimoto formula for Exchange (beta). "// &
1934 : "Default value is method dependent!", &
1935 8428 : usage="MATAGA_NISHIMOTO_XEXP xexp", default_r_val=-99.0_dp)
1936 8428 : CALL section_add_keyword(section, keyword)
1937 8428 : CALL keyword_release(keyword)
1938 :
1939 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_SR_CUT", &
1940 : description="Maximum range of short range part of Coulomb interaction.", &
1941 8428 : usage="COULOMB_SR_CUT rcut", default_r_val=20.0_dp)
1942 8428 : CALL section_add_keyword(section, keyword)
1943 8428 : CALL keyword_release(keyword)
1944 :
1945 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_SR_EPS", &
1946 : description="Threshold for short range part of Coulomb interaction.", &
1947 8428 : usage="COULOMB_SR_EPS sreps", default_r_val=1.e-03_dp)
1948 8428 : CALL section_add_keyword(section, keyword)
1949 8428 : CALL keyword_release(keyword)
1950 :
1951 8428 : END SUBROUTINE create_stda_section
1952 :
1953 : ! **************************************************************************************************
1954 : !> \brief creates an input section for electronic band structure calculations
1955 : !> \param section section to create
1956 : !> \par History
1957 : !> * 07.2023 created [Jan Wilhelm]
1958 : ! **************************************************************************************************
1959 8428 : SUBROUTINE create_bandstructure_section(section)
1960 : TYPE(section_type), POINTER :: section
1961 :
1962 : TYPE(keyword_type), POINTER :: keyword
1963 : TYPE(section_type), POINTER :: subsection
1964 :
1965 8428 : CPASSERT(.NOT. ASSOCIATED(section))
1966 : CALL section_create(section, __LOCATION__, name="BANDSTRUCTURE", &
1967 : description="Parameters needed to set up a calculation for "// &
1968 : "electronic level energies of molecules and the electronic band "// &
1969 : "structure of materials from post-SCF schemes (GW, perturbative "// &
1970 : "spin-orbit coupling). Also, the density of states (DOS), "// &
1971 : "projected density of states (PDOS), local density of states (LDOS), "// &
1972 : "local valence band maximum (LVBM), local conduction band minimum "// &
1973 : "(LCBM) and local band gap can be calculated. Please note that "// &
1974 : "all methods in this section start from a Gamma-only DFT SCF. "// &
1975 : "You need to make sure that the cell chosen in the DFT SCF is "// &
1976 : "converged in the cell size. Band structures are computed "// &
1977 : "for the primitive cell (i.e. the smallest possible unit cell of "// &
1978 : "the input structure which is detected automatically). Moreover, "// &
1979 : "spin-orbit coupling (SOC) on eigenvalues and band structures is "// &
1980 : "available using Hartwigsen-Goedecker-Hutter "// &
1981 : "pseudopotentials.", &
1982 8428 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
1983 :
1984 8428 : NULLIFY (keyword, subsection)
1985 : CALL keyword_create(keyword, __LOCATION__, &
1986 : name="_SECTION_PARAMETERS_", &
1987 : description="Controls the activation of the band structure calculation.", &
1988 : default_l_val=.FALSE., &
1989 8428 : lone_keyword_l_val=.TRUE.)
1990 8428 : CALL section_add_keyword(section, keyword)
1991 8428 : CALL keyword_release(keyword)
1992 :
1993 : ! here we generate a subsection for getting a k-point path for the bandstructure
1994 8428 : CALL create_kpoint_set_section(subsection, "BANDSTRUCTURE_PATH")
1995 8428 : CALL section_add_subsection(section, subsection)
1996 8428 : CALL section_release(subsection)
1997 :
1998 8428 : CALL create_gw_section(subsection)
1999 8428 : CALL section_add_subsection(section, subsection)
2000 8428 : CALL section_release(subsection)
2001 :
2002 8428 : CALL create_soc_section(subsection)
2003 8428 : CALL section_add_subsection(section, subsection)
2004 8428 : CALL section_release(subsection)
2005 :
2006 8428 : CALL create_dos_section(subsection)
2007 8428 : CALL section_add_subsection(section, subsection)
2008 8428 : CALL section_release(subsection)
2009 :
2010 8428 : END SUBROUTINE create_bandstructure_section
2011 :
2012 : ! **************************************************************************************************
2013 : !> \brief creates an input section for a GW calculation for the electronic band structure
2014 : !> \param section section to create
2015 : !> \par History
2016 : !> * 07.2023 created [Jan Wilhelm]
2017 : ! **************************************************************************************************
2018 8428 : SUBROUTINE create_gw_section(section)
2019 : TYPE(section_type), POINTER :: section
2020 :
2021 : TYPE(keyword_type), POINTER :: keyword
2022 : TYPE(section_type), POINTER :: print_key, subsection
2023 :
2024 8428 : CPASSERT(.NOT. ASSOCIATED(section))
2025 : CALL section_create(section, __LOCATION__, name="GW", &
2026 : description="Parameters needed to set up a GW calculation for "// &
2027 : "electronic level energies of molecules and the band structure of "// &
2028 : "materials (currently only 2D materials tested). For the GW "// &
2029 : "algorithm for molecules, see "// &
2030 : "<https://doi.org/10.1021/acs.jctc.0c01282>. "// &
2031 : "For 2D materials, see <http://arxiv.org/abs/2306.16066>.", &
2032 8428 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
2033 :
2034 8428 : NULLIFY (keyword)
2035 : CALL keyword_create(keyword, __LOCATION__, &
2036 : name="_SECTION_PARAMETERS_", &
2037 : description="Controls the activation of the GW calculation.", &
2038 : default_l_val=.FALSE., &
2039 8428 : lone_keyword_l_val=.TRUE.)
2040 8428 : CALL section_add_keyword(section, keyword)
2041 8428 : CALL keyword_release(keyword)
2042 :
2043 : CALL keyword_create(keyword, __LOCATION__, name="NUM_TIME_FREQ_POINTS", &
2044 : description="Number of discrete points for the imaginary-time "// &
2045 : "grid and the imaginary-frequency grid. The more points, the more "// &
2046 : "precise is the calculation. Typically, 10 points are good "// &
2047 : "for 0.1 eV precision of band structures and molecular energy "// &
2048 : "levels, 20 points for 0.03 eV precision, "// &
2049 : "and 30 points for 0.01 eV precision, see Table I in "// &
2050 : "<https://doi.org/10.1021/acs.jctc.0c01282>. GW computation time "// &
2051 : "increases linearly with `NUM_TIME_FREQ_POINTS`.", &
2052 : usage="NUM_TIME_FREQ_POINTS 30", &
2053 8428 : default_i_val=30)
2054 8428 : CALL section_add_keyword(section, keyword)
2055 8428 : CALL keyword_release(keyword)
2056 :
2057 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
2058 : description="Determines a threshold for the DBCSR based sparse "// &
2059 : "multiplications. Normally, `EPS_FILTER` determines accuracy "// &
2060 : "and timing of low-scaling GW calculations. (Lower filter means "// &
2061 : "higher numerical precision, but higher computational cost.)", &
2062 : usage="EPS_FILTER 1.0E-6", &
2063 8428 : default_r_val=1.0E-8_dp)
2064 8428 : CALL section_add_keyword(section, keyword)
2065 8428 : CALL keyword_release(keyword)
2066 :
2067 : CALL keyword_create(keyword, __LOCATION__, name="REGULARIZATION_RI", &
2068 : description="Parameter for RI regularization, setting a negative "// &
2069 : "value triggers the default value. Affects RI basis set convergence "// &
2070 : "but in any case large RI basis will give RI basis set convergence.", &
2071 : usage="REGULARIZATION_RI 1.0E-4", &
2072 8428 : default_r_val=-1.0_dp)
2073 8428 : CALL section_add_keyword(section, keyword)
2074 8428 : CALL keyword_release(keyword)
2075 :
2076 : CALL keyword_create(keyword, __LOCATION__, name="CUTOFF_RADIUS_RI", &
2077 : description="The cutoff radius (in Angstrom) for the truncated "// &
2078 : "Coulomb operator. The larger the cutoff radius, the faster "// &
2079 : "converges the resolution of the identity (RI) with respect to the "// &
2080 : "RI basis set size. Larger cutoff radius means higher computational "// &
2081 : "cost.", &
2082 : usage="CUTOFF_RADIUS_RI 3.0", &
2083 : default_r_val=cp_unit_to_cp2k(value=3.0_dp, unit_str="angstrom"), &
2084 8428 : type_of_var=real_t, unit_str="angstrom")
2085 8428 : CALL section_add_keyword(section, keyword)
2086 8428 : CALL keyword_release(keyword)
2087 :
2088 : CALL keyword_create(keyword, __LOCATION__, name="MEMORY_PER_PROC", &
2089 : description="Specify the available memory per MPI process. Set "// &
2090 : "`MEMORY_PER_PROC` as accurately as possible for good performance. If "// &
2091 : "`MEMORY_PER_PROC` is set lower as the actually available "// &
2092 : "memory per MPI process, the performance will be "// &
2093 : "bad; if `MEMORY_PER_PROC` is set higher as the actually "// &
2094 : "available memory per MPI process, the program might run out of "// &
2095 : "memory. You can calculate `MEMORY_PER_PROC` as follows: "// &
2096 : "Get the memory per node on your machine, mem_per_node "// &
2097 : "(for example, from a supercomputer website, typically between "// &
2098 : "100 GB and 2 TB), get the number of "// &
2099 : "MPI processes per node, n_MPI_proc_per_node"// &
2100 : " (for example from your run-script; if you "// &
2101 : "use slurm, the number behind '--ntasks-per-node' is the number "// &
2102 : "of MPI processes per node). Then calculate "// &
2103 : "`MEMORY_PER_PROC` = mem_per_node / n_MPI_proc_per_node "// &
2104 : "(typically between 2 GB and 50 GB). Unit of keyword: Gigabyte (GB).", &
2105 : usage="MEMORY_PER_PROC 16", &
2106 8428 : default_r_val=2.0_dp)
2107 8428 : CALL section_add_keyword(section, keyword)
2108 8428 : CALL keyword_release(keyword)
2109 :
2110 : CALL keyword_create(keyword, __LOCATION__, name="APPROX_KP_EXTRAPOL", &
2111 : description="If true, use only a 4x4 kpoint mesh for frequency "// &
2112 : "points $\omega_j, j \ge 2$ (instead of a 4x4 and 6x6 k-point mesh). "// &
2113 : "The k-point extrapolation of $W_{PQ}(i\omega_j,\mathbf{q})$ "// &
2114 : "is done approximately from $W_{PQ}(i\omega_1,\mathbf{q})$.", &
2115 : usage="APPROX_KP_EXTRAPOL", &
2116 8428 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2117 8428 : CALL section_add_keyword(section, keyword)
2118 8428 : CALL keyword_release(keyword)
2119 :
2120 : CALL keyword_create(keyword, __LOCATION__, name="HEDIN_SHIFT", &
2121 : description="If true, use Hedin's shift in G0W0, evGW and evGW0. "// &
2122 : "Details see in Li et al. JCTC 18, 7570 "// &
2123 : "(2022), Figure 1. G0W0 with Hedin's shift should give "// &
2124 : "similar GW eigenvalues as evGW0; at a lower "// &
2125 : "computational cost.", &
2126 : usage="HEDIN_SHIFT", &
2127 : default_l_val=.FALSE., &
2128 8428 : lone_keyword_l_val=.TRUE.)
2129 8428 : CALL section_add_keyword(section, keyword)
2130 8428 : CALL keyword_release(keyword)
2131 :
2132 8428 : NULLIFY (subsection, print_key)
2133 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
2134 : description="Printing of GW restarts.", &
2135 8428 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
2136 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESTART", &
2137 : description="Controls the printing of restart files "// &
2138 : "for χ, W, Σ.", &
2139 : filename="", print_level=low_print_level, &
2140 8428 : common_iter_levels=3)
2141 8428 : CALL section_add_subsection(subsection, print_key)
2142 8428 : CALL section_release(print_key)
2143 :
2144 8428 : CALL section_add_subsection(section, subsection)
2145 8428 : CALL section_release(subsection)
2146 :
2147 8428 : END SUBROUTINE create_gw_section
2148 :
2149 : ! **************************************************************************************************
2150 : !> \brief creates an input section for calculation SOC for the electronic band structure
2151 : !> \param section section to create
2152 : !> \par History
2153 : !> * 09.2023 created [Jan Wilhelm]
2154 : ! **************************************************************************************************
2155 8428 : SUBROUTINE create_soc_section(section)
2156 : TYPE(section_type), POINTER :: section
2157 :
2158 : TYPE(keyword_type), POINTER :: keyword
2159 :
2160 8428 : CPASSERT(.NOT. ASSOCIATED(section))
2161 : CALL section_create(section, __LOCATION__, name="SOC", &
2162 : description="Switch on or off spin-orbit coupling. Use SOC "// &
2163 : "parameters from non-local pseudopotentials as given in "// &
2164 : "Hartwigsen, Goedecker, Hutter, Eq.(18), (19), "// &
2165 : "<https://doi.org/10.1103/PhysRevB.58.3641>, "// &
2166 : "$V_{\mu\nu}^{\mathrm{SOC}, (\alpha)} = "// &
2167 : "(\hbar/2) \langle \phi_\mu | \sum_l \Delta "// &
2168 : "V_l^\mathrm{SO}(\mathbf{r},\mathbf{r}') "// &
2169 : "L^{(\alpha)} | \phi_\nu \rangle, "// &
2170 : "\alpha = x, y, z$.", &
2171 8428 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
2172 :
2173 8428 : NULLIFY (keyword)
2174 : CALL keyword_create(keyword, __LOCATION__, &
2175 : name="_SECTION_PARAMETERS_", &
2176 : description="Controls the activation of the SOC calculation.", &
2177 : default_l_val=.FALSE., &
2178 8428 : lone_keyword_l_val=.TRUE.)
2179 8428 : CALL section_add_keyword(section, keyword)
2180 8428 : CALL keyword_release(keyword)
2181 :
2182 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_WINDOW", &
2183 : description="Apply SOC only for states with eigenvalues in the "// &
2184 : "interval $[\varepsilon_\mathrm{VBM}-E_\mathrm{window}/2, "// &
2185 : "\varepsilon_\mathrm{CBM}+E_\mathrm{window}/2]$. Might be necessary "// &
2186 : "to use for large systems to prevent numerical instabilities.", &
2187 : usage="ENERGY_WINDOW 5.0", &
2188 : default_r_val=cp_unit_to_cp2k(value=40.0_dp, unit_str="eV"), &
2189 8428 : unit_str="eV")
2190 8428 : CALL section_add_keyword(section, keyword)
2191 8428 : CALL keyword_release(keyword)
2192 :
2193 8428 : END SUBROUTINE create_soc_section
2194 :
2195 : ! **************************************************************************************************
2196 : !> \brief input section for computing the density of states and the projected density of states
2197 : !> \param section section to create
2198 : !> \par History
2199 : !> * 09.2023 created [Jan Wilhelm]
2200 : ! **************************************************************************************************
2201 8428 : SUBROUTINE create_dos_section(section)
2202 : TYPE(section_type), POINTER :: section
2203 :
2204 : TYPE(keyword_type), POINTER :: keyword
2205 : TYPE(section_type), POINTER :: subsection
2206 :
2207 8428 : CPASSERT(.NOT. ASSOCIATED(section))
2208 : CALL section_create(section, __LOCATION__, name="DOS", &
2209 : description="Parameters needed to calculate the density of states "// &
2210 : "(DOS) and the projected density of states (PDOS).", &
2211 8428 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
2212 :
2213 8428 : NULLIFY (keyword)
2214 : CALL keyword_create(keyword, __LOCATION__, &
2215 : name="_SECTION_PARAMETERS_", &
2216 : description="Controls the activation of the DOS calculation.", &
2217 : default_l_val=.FALSE., &
2218 8428 : lone_keyword_l_val=.TRUE.)
2219 8428 : CALL section_add_keyword(section, keyword)
2220 8428 : CALL keyword_release(keyword)
2221 :
2222 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_WINDOW", &
2223 : description="Print DOS and PDOS in the energy window "// &
2224 : "$[\varepsilon_\mathrm{VBM}-E_\mathrm{window}/2, "// &
2225 : "\varepsilon_\mathrm{CBM}+E_\mathrm{window}/2]$,"// &
2226 : " where VBM is the valence "// &
2227 : "band maximum (or highest occupied molecular orbital, HOMO, for "// &
2228 : "molecules) and CBM the conduction band minimum (or lowest "// &
2229 : "unoccupied molecular orbital, LUMO, for molecules).", &
2230 : usage="ENERGY_WINDOW 5.0", &
2231 : default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"), &
2232 8428 : unit_str="eV")
2233 8428 : CALL section_add_keyword(section, keyword)
2234 8428 : CALL keyword_release(keyword)
2235 :
2236 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_STEP", &
2237 : description="Resolution of the energy E when computing the $\rho(E)$.", &
2238 : usage="ENERGY_STEP 0.01", &
2239 : default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
2240 8428 : unit_str="eV")
2241 8428 : CALL section_add_keyword(section, keyword)
2242 8428 : CALL keyword_release(keyword)
2243 :
2244 : CALL keyword_create(keyword, __LOCATION__, name="BROADENING", &
2245 : description="Broadening α in Gaussians used in the DOS; "// &
2246 : "$\rho(E) = \sum_n \exp(((E-\varepsilon_n)/\alpha)^2)/("// &
2247 : " \sqrt{2\pi} \alpha)$.", &
2248 : usage="BROADENING 0.01", &
2249 : default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
2250 8428 : unit_str="eV")
2251 8428 : CALL section_add_keyword(section, keyword)
2252 8428 : CALL keyword_release(keyword)
2253 :
2254 : CALL keyword_create( &
2255 : keyword, __LOCATION__, name="KPOINTS", &
2256 : description="Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
2257 : "the density of states (DOS). In GW, the KPOINT_DOS mesh is thus used as k-point "// &
2258 : "mesh for the self-energy. For non-periodic directions α, choose N_α = 1. "// &
2259 : "Automatic choice of the k-point mesh for negative "// &
2260 : "values, e.g. KPOINTS_DOS -1 -1 -1 (automatic choice: N_α = 1 in non-periodic "// &
2261 : "direction, 8 k-points in periodic direction). If you like to compute a "// &
2262 : "band structure along a k-path, you can specify the k-path in "// &
2263 : "&KPOINT_SET.", &
2264 : usage="KPOINTS N_x N_y N_z", &
2265 8428 : n_var=3, type_of_var=integer_t, default_i_vals=(/-1, -1, -1/))
2266 8428 : CALL section_add_keyword(section, keyword)
2267 8428 : CALL keyword_release(keyword)
2268 :
2269 8428 : NULLIFY (subsection)
2270 8428 : CALL create_ldos_section(subsection)
2271 8428 : CALL section_add_subsection(section, subsection)
2272 8428 : CALL section_release(subsection)
2273 :
2274 8428 : END SUBROUTINE create_dos_section
2275 :
2276 : ! **************************************************************************************************
2277 : !> \brief ...
2278 : !> \param section ...
2279 : ! **************************************************************************************************
2280 8428 : SUBROUTINE create_ldos_section(section)
2281 : TYPE(section_type), POINTER :: section
2282 :
2283 : TYPE(keyword_type), POINTER :: keyword
2284 :
2285 8428 : CPASSERT(.NOT. ASSOCIATED(section))
2286 : CALL section_create(section, __LOCATION__, name="LDOS", &
2287 : description="Parameters needed to calculate the local density "// &
2288 : "of states (LDOS). "// &
2289 : "The LDOS is computed as $\rho(\mathbf{r},E) = "// &
2290 : "\sum\limits_{n,\mathbf{k}}"// &
2291 : " |\psi_{n\mathbf{k}}(r)|^2\, w_\mathbf{k}\, g(E-\varepsilon_{n\mathbf{k}})$ "// &
2292 : "using the Gaussian weight function "// &
2293 : "$g(x) = \exp(x^2/\alpha^2)/(\sqrt{2\pi}\alpha)$, $\alpha$ is the broadening "// &
2294 : "from the &DOS section, and the k-point weight "// &
2295 : "$w_\mathbf{k}$. The k-mesh is taken from the &DOS section.", &
2296 8428 : n_keywords=2, repeats=.FALSE.)
2297 :
2298 8428 : NULLIFY (keyword)
2299 : CALL keyword_create(keyword, __LOCATION__, &
2300 : name="_SECTION_PARAMETERS_", &
2301 : description="Activates the local VBM CBM gap calculation.", &
2302 : default_l_val=.FALSE., &
2303 8428 : lone_keyword_l_val=.TRUE.)
2304 8428 : CALL section_add_keyword(section, keyword)
2305 8428 : CALL keyword_release(keyword)
2306 :
2307 : CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION", &
2308 : description="Defines whether the LDOS is integrated along a "// &
2309 : "coordinate. As an example, for INTEGRATION Z, the LDOS "// &
2310 : "$\rho(x,y,E) = \int dz\, \rho(x,y,z,E)$ is computed.", &
2311 : usage="INTEGRATION Z", &
2312 : enum_c_vals=s2a("X", "Y", "Z", "NONE"), &
2313 : enum_i_vals=(/int_ldos_x, int_ldos_y, int_ldos_z, int_ldos_none/), &
2314 : enum_desc=s2a("Integrate over x coordinate (not yet implemented).", &
2315 : "Integrate over y coordinate (not yet implemented).", &
2316 : "Integrate over z coordinate.", &
2317 : "No integration, print cube file as function "// &
2318 : "of x,y,z (not yet implemented)."), &
2319 8428 : default_i_val=int_ldos_z)
2320 8428 : CALL section_add_keyword(section, keyword)
2321 8428 : CALL keyword_release(keyword)
2322 :
2323 : CALL keyword_create( &
2324 : keyword, __LOCATION__, name="BIN_MESH", &
2325 : description="Mesh of size n x m for binning the space coordinates x and y of "// &
2326 : "the LDOS $\rho(x,y,E)$. If -1, no binning is performed and the "// &
2327 : "fine x, y resolution of the electron density from SCF is used.", &
2328 : usage="BIN_MESH n m", &
2329 8428 : n_var=2, type_of_var=integer_t, default_i_vals=(/10, 10/))
2330 8428 : CALL section_add_keyword(section, keyword)
2331 8428 : CALL keyword_release(keyword)
2332 :
2333 8428 : END SUBROUTINE create_ldos_section
2334 :
2335 : ! **************************************************************************************************
2336 : !> \brief creates an input section for a tip scan calculation
2337 : !> \param section section to create
2338 : !> \par History
2339 : !> * 04.2021 created [JGH]
2340 : ! **************************************************************************************************
2341 8428 : SUBROUTINE create_tipscan_section(section)
2342 : TYPE(section_type), POINTER :: section
2343 :
2344 : TYPE(keyword_type), POINTER :: keyword
2345 :
2346 8428 : CPASSERT(.NOT. ASSOCIATED(section))
2347 : CALL section_create(section, __LOCATION__, name="TIP_SCAN", &
2348 : description="Parameters needed to set up a Tip Scan. "// &
2349 : "Needs external definition of tip induced field.", &
2350 8428 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
2351 :
2352 8428 : NULLIFY (keyword)
2353 :
2354 : CALL keyword_create(keyword, __LOCATION__, &
2355 : name="_SECTION_PARAMETERS_", &
2356 : description="Controls the activation of the Tip Scan procedure", &
2357 : default_l_val=.FALSE., &
2358 8428 : lone_keyword_l_val=.TRUE.)
2359 8428 : CALL section_add_keyword(section, keyword)
2360 8428 : CALL keyword_release(keyword)
2361 :
2362 : CALL keyword_create(keyword, __LOCATION__, name="SCAN_DIRECTION", &
2363 : description="Defines scan direction and scan type(line, plane).", &
2364 : usage="SCAN_DIRECTION XY", &
2365 : enum_c_vals=s2a("X", "Y", "Z", "XY", "XZ", "YZ", "XYZ"), &
2366 : enum_i_vals=(/scan_x, scan_y, scan_z, scan_xy, scan_xz, scan_yz, scan_xyz/), &
2367 8428 : default_i_val=scan_xy)
2368 8428 : CALL section_add_keyword(section, keyword)
2369 8428 : CALL keyword_release(keyword)
2370 :
2371 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT", &
2372 : description="The reference point to define the absolute position of the scan. ", &
2373 : usage="REFERENCE_POINT 0.0 0.0 1.0", &
2374 : n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/), type_of_var=real_t, &
2375 8428 : unit_str="angstrom")
2376 8428 : CALL section_add_keyword(section, keyword)
2377 8428 : CALL keyword_release(keyword)
2378 :
2379 : CALL keyword_create(keyword, __LOCATION__, name="SCAN_POINTS", &
2380 : description="Number of points calculated for each scan direction.", &
2381 : usage="SCAN_POINTS 20 20", &
2382 8428 : n_var=-1, type_of_var=integer_t)
2383 8428 : CALL section_add_keyword(section, keyword)
2384 8428 : CALL keyword_release(keyword)
2385 :
2386 : CALL keyword_create(keyword, __LOCATION__, name="SCAN_STEP", &
2387 : description="Step size for each scan direction.", &
2388 : usage="SCAN_STEP 0.01 0.01", &
2389 8428 : n_var=-1, type_of_var=real_t, unit_str="angstrom")
2390 8428 : CALL section_add_keyword(section, keyword)
2391 8428 : CALL keyword_release(keyword)
2392 :
2393 : CALL keyword_create(keyword, __LOCATION__, name="TIP_FILENAME", &
2394 : description="Filename of tip potential defined in cube file format.", &
2395 : usage="TIP_FILENAME <filename>", &
2396 8428 : type_of_var=lchar_t)
2397 8428 : CALL section_add_keyword(section, keyword)
2398 8428 : CALL keyword_release(keyword)
2399 :
2400 8428 : END SUBROUTINE create_tipscan_section
2401 :
2402 : END MODULE input_cp2k_properties_dft
|