Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \brief function that build the print section of the dft input
10 : !> \par History
11 : !> 10.2005 moved out of input_cp2k [fawzi]
12 : !> 07.2024 moved out of input_cp2k_dft [JGH]
13 : !> \author fawzi
14 : ! **************************************************************************************************
15 : MODULE input_cp2k_print_dft
16 : USE basis_set_types, ONLY: basis_sort_default, &
17 : basis_sort_zet
18 : USE bibliography, ONLY: &
19 : Andermatt2016, Andreussi2012, Avezac2005, BaniHashemian2016, Becke1988b, Bengtsson1999, &
20 : Blochl1995, Brehm2018, Brelaz1979, Dewar1977, Dewar1985, Dudarev1997, Dudarev1998, &
21 : Ehrhardt1985, Eriksen2020, Fattebert2002, Golze2017a, Golze2017b, Grimme2015FOD, Guidon2010, &
22 : Heinzmann1976, Holmberg2017, Holmberg2018, Iannuzzi2005, Iannuzzi2006, Iannuzzi2007, &
23 : Knizia2013, Kolafa2004, Krack2000, Krack2002, Kuhne2007, Kunert2003, Lippert1997, &
24 : Lippert1999, Lu2004, Merlot2014, Perdew1981, Repasky2002, Rocha2006, Schenter2008, Schiffmann2015, &
25 : Shigeta2001, Stewart1982, Stewart1989, Stewart2007, Thiel1992, VanVoorhis2015, &
26 : VandeVondele2003, VandeVondele2005a, VandeVondele2005b, VandeVondele2006, Weber2008, &
27 : Yin2017, Pracht2019, Caldeweyher2019, Caldeweyher2020, Gresch2017, Soluyanov2011, &
28 : Pizzi2020, Marzari1997, Souza2001, Mattiat2022
29 : USE cp_output_handling, ONLY: add_last_numeric, &
30 : cp_print_key_section_create, &
31 : debug_print_level, &
32 : high_print_level, &
33 : low_print_level, &
34 : medium_print_level, &
35 : silent_print_level
36 : USE cp_spline_utils, ONLY: pw_interp, &
37 : spline3_nopbc_interp, &
38 : spline3_pbc_interp
39 : USE cp_units, ONLY: cp_unit_to_cp2k
40 : USE input_constants, ONLY: &
41 : atomic_guess, becke_cutoff_element, becke_cutoff_global, bqb_opt_exhaustive, &
42 : bqb_opt_normal, bqb_opt_off, bqb_opt_patient, bqb_opt_quick, broyden_type_1, &
43 : broyden_type_1_explicit, broyden_type_1_explicit_ls, broyden_type_1_ls, broyden_type_2, &
44 : broyden_type_2_explicit, broyden_type_2_explicit_ls, broyden_type_2_ls, casci_canonical, &
45 : cdft_alpha_constraint, cdft_beta_constraint, cdft_charge_constraint, &
46 : cdft_magnetization_constraint, cholesky_dbcsr, cholesky_inverse, cholesky_off, &
47 : cholesky_reduce, cholesky_restore, core_guess, diag_block_davidson, diag_block_krylov, &
48 : diag_filter_matrix, diag_ot, diag_standard, do_admm_aux_exch_func_bee, &
49 : do_admm_aux_exch_func_bee_libxc, do_admm_aux_exch_func_default, &
50 : do_admm_aux_exch_func_default_libxc, do_admm_aux_exch_func_none, &
51 : do_admm_aux_exch_func_opt, do_admm_aux_exch_func_opt_libxc, do_admm_aux_exch_func_pbex, &
52 : do_admm_aux_exch_func_pbex_libxc, do_admm_aux_exch_func_sx_libxc, &
53 : do_admm_basis_projection, do_admm_blocked_projection, do_admm_blocking_purify_full, &
54 : do_admm_charge_constrained_projection, do_admm_exch_scaling_merlot, &
55 : do_admm_exch_scaling_none, do_admm_purify_cauchy, do_admm_purify_cauchy_subspace, &
56 : do_admm_purify_mcweeny, do_admm_purify_mo_diag, do_admm_purify_mo_no_diag, &
57 : do_admm_purify_none, do_admm_purify_none_dm, do_arnoldi, do_bch, do_cn, &
58 : do_ddapc_constraint, do_ddapc_restraint, do_em, do_etrs, do_full_density, do_gapw_gcs, &
59 : do_gapw_gct, do_gapw_log, do_iaoloc_energy, do_iaoloc_enone, do_iaoloc_l1, do_iaoloc_occ, &
60 : do_iaoloc_pm2, do_iaoloc_pm4, do_lri_inv, do_lri_inv_auto, do_lri_opt_all, &
61 : do_lri_opt_coeff, do_lri_opt_exps, do_lri_pseudoinv_diag, do_lri_pseudoinv_svd, &
62 : do_method_am1, do_method_dftb, do_method_gapw, do_method_gapw_xc, do_method_gpw, &
63 : do_method_lrigpw, do_method_mndo, do_method_mndod, do_method_ofgpw, do_method_pdg, &
64 : do_method_pm3, do_method_pm6, do_method_pm6fm, do_method_pnnl, do_method_rigpw, &
65 : do_method_rm1, do_method_xtb, do_pade, do_potential_coulomb, do_potential_id, &
66 : do_potential_short, do_potential_truncated, do_ppl_analytic, do_ppl_grid, &
67 : do_pwgrid_ns_fullspace, do_pwgrid_ns_halfspace, do_pwgrid_spherical, do_s2_constraint, &
68 : do_s2_restraint, do_se_is_kdso, do_se_is_kdso_d, do_se_is_slater, do_se_lr_ewald, &
69 : do_se_lr_ewald_gks, do_se_lr_ewald_r3, do_se_lr_none, do_spin_density, do_taylor, &
70 : ehrenfest, embed_diff, embed_fa, embed_grid_angstrom, embed_grid_bohr, embed_level_shift, &
71 : embed_none, embed_quasi_newton, embed_resp, embed_steep_desc, eri_method_full_gpw, &
72 : eri_method_gpw_ht, eri_operator_trunc, eri_operator_coulomb, eri_operator_erf, eri_operator_erfc, &
73 : eri_operator_gaussian, eri_operator_yukawa, gapw_1c_large, gapw_1c_medium, gapw_1c_orb, &
74 : gapw_1c_small, gapw_1c_very_large, gaussian, general_roks, gto_cartesian, gto_spherical, &
75 : high_spin_roks, history_guess, jacobian_fd1, jacobian_fd1_backward, &
76 : jacobian_fd1_central, jacobian_fd2, jacobian_fd2_backward, kg_color_dsatur, &
77 : kg_color_greedy, kg_tnadd_atomic, kg_tnadd_embed, kg_tnadd_embed_ri, kg_tnadd_none, &
78 : ls_2pnt, ls_3pnt, ls_gold, ls_none, manual_selection, mao_basis_ext, mao_basis_orb, &
79 : mao_basis_prim, mao_projection, mopac_guess, no_excitations, no_guess, no_solver, &
80 : numerical, oe_gllb, oe_lb, oe_none, oe_saop, oe_sic, orb_dx2, orb_dxy, orb_dy2, orb_dyz, &
81 : orb_dz2, orb_dzx, orb_px, orb_py, orb_pz, orb_s, ot_algo_irac, ot_algo_taylor_or_diag, &
82 : ot_chol_irac, ot_lwdn_irac, ot_mini_broyden, ot_mini_cg, ot_mini_diis, ot_mini_sd, &
83 : ot_poly_irac, ot_precond_full_all, ot_precond_full_kinetic, ot_precond_full_single, &
84 : ot_precond_full_single_inverse, ot_precond_none, ot_precond_s_inverse, &
85 : ot_precond_solver_default, ot_precond_solver_direct, ot_precond_solver_inv_chol, &
86 : ot_precond_solver_update, outer_scf_basis_center_opt, outer_scf_becke_constraint, &
87 : outer_scf_cdft_constraint, outer_scf_ddapc_constraint, outer_scf_hirshfeld_constraint, &
88 : outer_scf_none, outer_scf_optimizer_bisect, outer_scf_optimizer_broyden, &
89 : outer_scf_optimizer_diis, outer_scf_optimizer_newton, outer_scf_optimizer_newton_ls, &
90 : outer_scf_optimizer_none, outer_scf_optimizer_sd, outer_scf_optimizer_secant, &
91 : outer_scf_s2_constraint, plus_u_lowdin, plus_u_mulliken, plus_u_mulliken_charges, &
92 : plus_u_tensorial, qiskit_solver, radius_covalent, radius_default, radius_single, radius_user, &
93 : radius_vdw, random_guess, real_time_propagation, ref_charge_atomic, ref_charge_mulliken, &
94 : rel_dkh, rel_none, rel_pot_erfc, rel_pot_full, rel_sczora_mp, rel_trans_atom, rel_trans_full, &
95 : rel_trans_molecule, rel_zora, rel_zora_full, rel_zora_mp, restart_guess, &
96 : sccs_andreussi, sccs_derivative_cd3, sccs_derivative_cd5, sccs_derivative_cd7, &
97 : sccs_derivative_fft, sccs_fattebert_gygi, shape_function_density, shape_function_gaussian, &
98 : sic_ad, sic_eo, sic_list_all, sic_list_unpaired, sic_mauri_spz, sic_mauri_us, sic_none, &
99 : slater, smear_energy_window, smear_fermi_dirac, smear_list, sparse_guess, tddfpt_davidson, &
100 : tddfpt_excitations, tddfpt_lanczos, tddfpt_singlet, tddfpt_spin_cons, tddfpt_spin_flip, &
101 : tddfpt_triplet, use_mom_ref_coac, use_mom_ref_com, use_mom_ref_user, use_mom_ref_zero, &
102 : moments_format_detailed, moments_format_trajectory, &
103 : use_restart_wfn, use_rt_restart, use_scf_wfn, wannier_projection, weight_type_mass, &
104 : weight_type_unit, wfi_aspc_nr, wfi_gext_proj_nr, wfi_gext_proj_qtr_nr, wfi_frozen_method_nr, &
105 : wfi_linear_p_method_nr, wfi_linear_ps_method_nr, wfi_linear_wf_method_nr, wfi_ps_method_nr, &
106 : wfi_use_guess_method_nr, wfi_use_prev_p_method_nr, wfi_use_prev_wf_method_nr, &
107 : wfn_mix_orig_external, wfn_mix_orig_occ, wfn_mix_orig_virtual, &
108 : xas_1s_type, xas_2p_type, xas_2s_type, xas_3d_type, xas_3p_type, xas_3s_type, xas_4d_type, &
109 : xas_4f_type, xas_4p_type, xas_4s_type, xas_dip_len, xas_dip_vel, xas_dscf, xas_none, &
110 : xas_not_excited, xas_tdp_by_index, xas_tdp_by_kind, xas_tp_fh, xas_tp_flex, xas_tp_hh, &
111 : xas_tp_xfh, xas_tp_xhh, xes_tp_val, &
112 : no_admm_type, admm1_type, admm2_type, admms_type, admmp_type, admmq_type, &
113 : e_dens_total_hard_approx, e_dens_total_density, e_dens_soft_density
114 : USE input_cp2k_almo, ONLY: create_almo_scf_section
115 : USE input_cp2k_distribution, ONLY: create_distribution_section
116 : USE input_cp2k_ec, ONLY: create_ec_section
117 : USE input_cp2k_exstate, ONLY: create_exstate_section
118 : USE input_cp2k_external, ONLY: create_ext_den_section, &
119 : create_ext_pot_section, &
120 : create_ext_vxc_section
121 : USE input_cp2k_field, ONLY: create_efield_section, &
122 : create_per_efield_section
123 : USE input_cp2k_kpoints, ONLY: create_kpoint_set_section, &
124 : create_kpoints_section
125 : USE input_cp2k_loc, ONLY: create_localize_section, &
126 : print_wanniers
127 : USE input_cp2k_ls, ONLY: create_ls_scf_section
128 : USE input_cp2k_mm, ONLY: create_dipoles_section, &
129 : create_neighbor_lists_section
130 : USE input_cp2k_poisson, ONLY: create_poisson_section
131 : USE input_cp2k_projection_rtp, ONLY: create_projection_rtp_section
132 : USE input_cp2k_rsgrid, ONLY: create_rsgrid_section
133 : USE input_cp2k_tb, ONLY: create_dftb_control_section, &
134 : create_xtb_control_section
135 : USE input_cp2k_transport, ONLY: create_transport_section
136 : USE input_cp2k_voronoi, ONLY: create_print_voronoi_section
137 : USE input_cp2k_scf, ONLY: create_scf_section, &
138 : create_cdft_control_section
139 : USE input_cp2k_xc, ONLY: create_xc_fun_section, &
140 : create_xc_section
141 : USE input_keyword_types, ONLY: keyword_create, &
142 : keyword_release, &
143 : keyword_type
144 : USE input_section_types, ONLY: section_add_keyword, &
145 : section_add_subsection, &
146 : section_create, &
147 : section_release, &
148 : section_type
149 : USE input_val_types, ONLY: char_t, &
150 : enum_t, &
151 : integer_t, &
152 : lchar_t, &
153 : logical_t, &
154 : real_t
155 : USE kinds, ONLY: dp
156 : USE kpoint_mo_dump, ONLY: mokp_ao_gto_basis, mokp_ao_overlap_matrix
157 : USE pw_grids, ONLY: do_pw_grid_blocked_false, &
158 : do_pw_grid_blocked_free, &
159 : do_pw_grid_blocked_true
160 : USE pw_spline_utils, ONLY: no_precond, &
161 : precond_spl3_1, &
162 : precond_spl3_2, &
163 : precond_spl3_3, &
164 : precond_spl3_aint, &
165 : precond_spl3_aint2
166 : USE qs_density_mixing_types, ONLY: create_mixing_section
167 : USE qs_fb_input, ONLY: create_filtermatrix_section
168 : USE qs_mom_types, ONLY: create_mom_section
169 : USE string_utilities, ONLY: s2a
170 :
171 : USE cp_output_handling_openpmd, ONLY: cp_openpmd_get_default_extension
172 :
173 : #include "./base/base_uses.f90"
174 :
175 : IMPLICIT NONE
176 : PRIVATE
177 :
178 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_print_dft'
179 :
180 : PUBLIC :: add_dos_keywords, create_print_dft_section
181 :
182 : CONTAINS
183 :
184 : ! **************************************************************************************************
185 : !> \brief Create the print dft section
186 : !> \param section the section to create
187 : !> \author teo
188 : ! **************************************************************************************************
189 1481 : SUBROUTINE create_print_dft_section(section)
190 : TYPE(section_type), POINTER :: section
191 :
192 : TYPE(keyword_type), POINTER :: keyword
193 : TYPE(section_type), POINTER :: print_key, sub_print_key, subsection
194 :
195 1481 : CPASSERT(.NOT. ASSOCIATED(section))
196 : CALL section_create(section, __LOCATION__, name="PRINT", &
197 : description="Section of possible print options in DFT code.", &
198 1481 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
199 :
200 1481 : NULLIFY (print_key, keyword, subsection)
201 :
202 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_BANNER", &
203 : description="Controls the printing of the banner of the MM program", &
204 1481 : print_level=silent_print_level, filename="__STD_OUT__")
205 1481 : CALL section_add_subsection(section, print_key)
206 1481 : CALL section_release(print_key)
207 :
208 : CALL cp_print_key_section_create(print_key, __LOCATION__, "BASIS_SET_FILE", &
209 : description="Controls the printing of a file with all basis sets used.", &
210 1481 : print_level=high_print_level, filename="LOCAL_BASIS_SETS")
211 1481 : CALL section_add_subsection(section, print_key)
212 1481 : CALL section_release(print_key)
213 :
214 : CALL cp_print_key_section_create(print_key, __LOCATION__, "KINETIC_ENERGY", &
215 : description="Controls the printing of the kinetic energy", &
216 1481 : print_level=high_print_level, filename="__STD_OUT__")
217 1481 : CALL section_add_subsection(section, print_key)
218 1481 : CALL section_release(print_key)
219 :
220 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DERIVATIVES", &
221 : description="Print all derivatives after the DFT calculation", &
222 1481 : print_level=high_print_level, filename="__STD_OUT__")
223 : CALL keyword_create(keyword, __LOCATION__, &
224 : name="ndigits", &
225 : description="Specify the number of digits used to print derivatives", &
226 1481 : default_i_val=6)
227 1481 : CALL section_add_keyword(print_key, keyword)
228 1481 : CALL keyword_release(keyword)
229 :
230 1481 : CALL section_add_subsection(section, print_key)
231 1481 : CALL section_release(print_key)
232 :
233 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="neighbor_lists", &
234 : description="Controls the printing of the neighbor lists", &
235 1481 : print_level=debug_print_level, filename="", unit_str="angstrom")
236 : CALL keyword_create(keyword, __LOCATION__, &
237 : name="sab_orb", &
238 : description="Activates the printing of the orbital "// &
239 : "orbital neighbor lists, "// &
240 : "i.e. the overlap neighbor lists", &
241 : default_l_val=.FALSE., &
242 1481 : lone_keyword_l_val=.TRUE.)
243 1481 : CALL section_add_keyword(print_key, keyword)
244 1481 : CALL keyword_release(keyword)
245 :
246 : CALL keyword_create(keyword, __LOCATION__, &
247 : name="sab_aux_fit", &
248 : description="Activates the printing of the orbital "// &
249 : "orbital neighbor lists wavefunction fitting basis, "// &
250 : "i.e. the overlap neighbor lists", &
251 : default_l_val=.FALSE., &
252 1481 : lone_keyword_l_val=.TRUE.)
253 1481 : CALL section_add_keyword(print_key, keyword)
254 1481 : CALL keyword_release(keyword)
255 :
256 : CALL keyword_create(keyword, __LOCATION__, &
257 : name="sab_aux_fit_vs_orb", &
258 : description="Activates the printing of the orbital "// &
259 : "orbital mixed neighbor lists of wavefunction fitting basis, "// &
260 : "and the orbital basis, i.e. the overlap neighbor lists", &
261 : default_l_val=.FALSE., &
262 1481 : lone_keyword_l_val=.TRUE.)
263 1481 : CALL section_add_keyword(print_key, keyword)
264 1481 : CALL keyword_release(keyword)
265 :
266 : CALL keyword_create(keyword, __LOCATION__, &
267 : name="sab_scp", &
268 : description="Activates the printing of the vdW SCP "// &
269 : "neighbor lists ", &
270 : default_l_val=.FALSE., &
271 1481 : lone_keyword_l_val=.TRUE.)
272 1481 : CALL section_add_keyword(print_key, keyword)
273 1481 : CALL keyword_release(keyword)
274 :
275 : CALL keyword_create(keyword, __LOCATION__, &
276 : name="sab_vdw", &
277 : description="Activates the printing of the vdW "// &
278 : "neighbor lists (from DFT, DFTB, SE), "// &
279 : "i.e. the dispersion neighbor lists", &
280 : default_l_val=.FALSE., &
281 1481 : lone_keyword_l_val=.TRUE.)
282 1481 : CALL section_add_keyword(print_key, keyword)
283 1481 : CALL keyword_release(keyword)
284 :
285 : CALL keyword_create(keyword, __LOCATION__, &
286 : name="sab_cn", &
287 : description="Activates the printing of the "// &
288 : "neighbor lists used for coordination numbers in vdW DFT-D3", &
289 : default_l_val=.FALSE., &
290 1481 : lone_keyword_l_val=.TRUE.)
291 1481 : CALL section_add_keyword(print_key, keyword)
292 1481 : CALL keyword_release(keyword)
293 :
294 : CALL keyword_create(keyword, __LOCATION__, &
295 : name="sac_ae", &
296 : description="Activates the printing of the orbital "// &
297 : "nuclear attraction neighbor lists (erfc potential)", &
298 : default_l_val=.FALSE., &
299 1481 : lone_keyword_l_val=.TRUE.)
300 1481 : CALL section_add_keyword(print_key, keyword)
301 1481 : CALL keyword_release(keyword)
302 :
303 : CALL keyword_create(keyword, __LOCATION__, &
304 : name="sac_ppl", &
305 : description="Activates the printing of the orbital "// &
306 : "GTH-PPL neighbor lists (local part of the "// &
307 : "Goedecker-Teter-Hutter pseudo potentials)", &
308 : default_l_val=.FALSE., &
309 1481 : lone_keyword_l_val=.TRUE.)
310 1481 : CALL section_add_keyword(print_key, keyword)
311 1481 : CALL keyword_release(keyword)
312 :
313 : CALL keyword_create(keyword, __LOCATION__, &
314 : name="sap_ppnl", &
315 : description="Activates the printing of the orbital "// &
316 : "GTH-PPNL neighbor lists (non-local part of the "// &
317 : "Goedecker-Teter-Hutter pseudo potentials)", &
318 : default_l_val=.FALSE., &
319 1481 : lone_keyword_l_val=.TRUE.)
320 1481 : CALL section_add_keyword(print_key, keyword)
321 1481 : CALL keyword_release(keyword)
322 :
323 : CALL keyword_create(keyword, __LOCATION__, &
324 : name="sap_oce", &
325 : description="Activates the printing of the orbital "// &
326 : "PAW-projector neighbor lists (only GAPW)", &
327 : default_l_val=.FALSE., &
328 1481 : lone_keyword_l_val=.TRUE.)
329 1481 : CALL section_add_keyword(print_key, keyword)
330 1481 : CALL keyword_release(keyword)
331 :
332 : CALL keyword_create(keyword, __LOCATION__, &
333 : name="sab_se", &
334 : description="Activates the printing of the two-center "// &
335 : "neighbor lists for Coulomb type interactions in NDDO ", &
336 : default_l_val=.FALSE., &
337 1481 : lone_keyword_l_val=.TRUE.)
338 1481 : CALL section_add_keyword(print_key, keyword)
339 1481 : CALL keyword_release(keyword)
340 :
341 : CALL keyword_create(keyword, __LOCATION__, &
342 : name="sab_lrc", &
343 : description="Activates the printing of the long-range SE correction "// &
344 : "neighbor lists (only when doing long-range SE with integral scheme KDSO and KDSO-d)", &
345 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
346 1481 : CALL section_add_keyword(print_key, keyword)
347 1481 : CALL keyword_release(keyword)
348 :
349 : CALL keyword_create(keyword, __LOCATION__, &
350 : name="sab_tbe", &
351 : description="Activates the printing of the DFTB Ewald "// &
352 : "neighbor lists ", &
353 : default_l_val=.FALSE., &
354 1481 : lone_keyword_l_val=.TRUE.)
355 1481 : CALL section_add_keyword(print_key, keyword)
356 1481 : CALL keyword_release(keyword)
357 :
358 : CALL keyword_create(keyword, __LOCATION__, &
359 : name="sab_xtbe", &
360 : description="Activates the printing of the xTB sr-Coulomb "// &
361 : "neighbor lists ", &
362 : default_l_val=.FALSE., &
363 1481 : lone_keyword_l_val=.TRUE.)
364 1481 : CALL section_add_keyword(print_key, keyword)
365 1481 : CALL keyword_release(keyword)
366 :
367 : CALL keyword_create(keyword, __LOCATION__, &
368 : name="sab_core", &
369 : description="Activates the printing of core interaction "// &
370 : "neighbor lists ", &
371 : default_l_val=.FALSE., &
372 1481 : lone_keyword_l_val=.TRUE.)
373 1481 : CALL section_add_keyword(print_key, keyword)
374 1481 : CALL keyword_release(keyword)
375 :
376 : CALL keyword_create(keyword, __LOCATION__, &
377 : name="sab_xb", &
378 : description="Activates the printing of XB interaction from (xTB) "// &
379 : "neighbor lists ", &
380 : default_l_val=.FALSE., &
381 1481 : lone_keyword_l_val=.TRUE.)
382 1481 : CALL section_add_keyword(print_key, keyword)
383 1481 : CALL keyword_release(keyword)
384 :
385 : CALL keyword_create(keyword, __LOCATION__, &
386 : name="sab_xtb_nonbond", &
387 : description="Activates the printing of nonbonded interaction from (xTB) "// &
388 : "neighbor lists ", &
389 : default_l_val=.FALSE., &
390 1481 : lone_keyword_l_val=.TRUE.)
391 1481 : CALL section_add_keyword(print_key, keyword)
392 1481 : CALL keyword_release(keyword)
393 :
394 : CALL keyword_create(keyword, __LOCATION__, &
395 : name="soo_list", &
396 : description="Activates the printing of RI orbital-orbital "// &
397 : "neighbor lists ", &
398 : default_l_val=.FALSE., &
399 1481 : lone_keyword_l_val=.TRUE.)
400 1481 : CALL section_add_keyword(print_key, keyword)
401 1481 : CALL keyword_release(keyword)
402 :
403 : CALL keyword_create(keyword, __LOCATION__, &
404 : name="sip_list", &
405 : description="Activates the printing of RI basis-projector interaction "// &
406 : "neighbor lists ", &
407 : default_l_val=.FALSE., &
408 1481 : lone_keyword_l_val=.TRUE.)
409 1481 : CALL section_add_keyword(print_key, keyword)
410 1481 : CALL keyword_release(keyword)
411 :
412 : CALL keyword_create(keyword, __LOCATION__, &
413 : name="sab_cneo", &
414 : description="Activates the printing of the nuclear orbital "// &
415 : "nuclear repulsion neighbor lists (erfc potential)", &
416 : default_l_val=.FALSE., &
417 1481 : lone_keyword_l_val=.TRUE.)
418 1481 : CALL section_add_keyword(print_key, keyword)
419 1481 : CALL keyword_release(keyword)
420 :
421 1481 : CALL section_add_subsection(section, print_key)
422 1481 : CALL section_release(print_key)
423 :
424 : CALL cp_print_key_section_create(print_key, __LOCATION__, "SUBCELL", &
425 : description="Activates the printing of the subcells used for the "// &
426 : "generation of neighbor lists.", unit_str="angstrom", &
427 1481 : print_level=high_print_level, filename="__STD_OUT__")
428 1481 : CALL section_add_subsection(section, print_key)
429 1481 : CALL section_release(print_key)
430 :
431 : CALL cp_print_key_section_create(print_key, __LOCATION__, "AO_MATRICES", &
432 : description="Controls the printing of the ao (i.e. contracted gaussian) matrices (debug).", &
433 1481 : print_level=debug_print_level, filename="__STD_OUT__")
434 : CALL keyword_create(keyword, __LOCATION__, name="OMIT_HEADERS", &
435 : description="Print only the matrix data, not the row and column headers", &
436 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
437 1481 : CALL section_add_keyword(print_key, keyword)
438 1481 : CALL keyword_release(keyword)
439 :
440 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
441 : description="Specify the number of digits used to print the AO matrices", &
442 1481 : default_i_val=6)
443 1481 : CALL section_add_keyword(print_key, keyword)
444 1481 : CALL keyword_release(keyword)
445 : CALL keyword_create(keyword, __LOCATION__, name="CORE_HAMILTONIAN", &
446 : description="If the printkey is activated controls the printing of the hamiltonian matrix", &
447 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
448 1481 : CALL section_add_keyword(print_key, keyword)
449 1481 : CALL keyword_release(keyword)
450 : CALL keyword_create(keyword, __LOCATION__, name="DENSITY", &
451 : description="If the printkey is activated controls the printing of the density (P) matrix", &
452 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
453 1481 : CALL section_add_keyword(print_key, keyword)
454 1481 : CALL keyword_release(keyword)
455 :
456 : CALL keyword_create(keyword, __LOCATION__, name="KINETIC_ENERGY", &
457 : description="If the printkey is activated controls the printing of the kinetic energy matrix", &
458 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
459 1481 : CALL section_add_keyword(print_key, keyword)
460 1481 : CALL keyword_release(keyword)
461 : CALL keyword_create(keyword, __LOCATION__, name="KOHN_SHAM_MATRIX", &
462 : description="If the printkey is activated controls the printing of the Kohn-Sham matrix", &
463 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
464 1481 : CALL section_add_keyword(print_key, keyword)
465 1481 : CALL keyword_release(keyword)
466 : CALL keyword_create( &
467 : keyword, __LOCATION__, name="MATRIX_VXC", &
468 : description="If the printkey is activated compute and print the matrix of the exchange and correlation potential. "// &
469 : "Only the GGA part for GPW is printed", &
470 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
471 1481 : CALL section_add_keyword(print_key, keyword)
472 1481 : CALL keyword_release(keyword)
473 : CALL keyword_create(keyword, __LOCATION__, name="ORTHO", &
474 : description="If the printkey is activated controls the printing of the orthogonalization matrix", &
475 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
476 1481 : CALL section_add_keyword(print_key, keyword)
477 1481 : CALL keyword_release(keyword)
478 : CALL keyword_create(keyword, __LOCATION__, name="OVERLAP", &
479 : description="If the printkey is activated controls the printing of the overlap matrix", &
480 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
481 1481 : CALL section_add_keyword(print_key, keyword)
482 1481 : CALL keyword_release(keyword)
483 :
484 : CALL keyword_create(keyword, __LOCATION__, name="COMMUTATOR_HR", &
485 : description="Controls the printing of the [H,r] commutator matrix", &
486 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
487 1481 : CALL section_add_keyword(print_key, keyword)
488 1481 : CALL keyword_release(keyword)
489 :
490 : CALL keyword_create(keyword, __LOCATION__, name="POSITION", &
491 : description="Print the analytic AO matrices <mu|x,y,z|nu> in Bohr, relative to "// &
492 : "the coordinate origin, in the same AO ordering as OVERLAP and KOHN_SHAM_MATRIX. "// &
493 : "Only isolated GPW/GAPW systems; not a periodic Berry-phase operator. "// &
494 : "Use NDIGITS 16 for numerical postprocessing.", &
495 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
496 1481 : CALL section_add_keyword(print_key, keyword)
497 1481 : CALL keyword_release(keyword)
498 :
499 : CALL keyword_create(keyword, __LOCATION__, name="SOC", &
500 : description="Print the three real antisymmetric AO GTH SOC components Vx, Vy, Vz in hartree. "// &
501 : "The physical orbital operators are i*Vx, i*Vy, i*Vz. "// &
502 : "Requires a restricted, isolated GPW/GAPW calculation with GTH SOC potentials.", &
503 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
504 1481 : CALL section_add_keyword(print_key, keyword)
505 1481 : CALL keyword_release(keyword)
506 :
507 : CALL keyword_create(keyword, __LOCATION__, name="FERMI_CONTACT", &
508 : description="If the printkey is activated controls the printing of the Fermi contact matrix", &
509 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
510 1481 : CALL section_add_keyword(print_key, keyword)
511 1481 : CALL keyword_release(keyword)
512 : CALL keyword_create( &
513 : keyword, __LOCATION__, name="PSO", &
514 : description="If the printkey is activated controls the printing of the paramagnetic spin-orbit matrices", &
515 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
516 1481 : CALL section_add_keyword(print_key, keyword)
517 1481 : CALL keyword_release(keyword)
518 : CALL keyword_create( &
519 : keyword, __LOCATION__, name="EFG", &
520 : description="If the printkey is activated controls the printing of the electric field gradient matrices", &
521 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
522 1481 : CALL section_add_keyword(print_key, keyword)
523 1481 : CALL keyword_release(keyword)
524 : CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_ENERGY", &
525 : description="If the printkey is activated controls the printing of the potential energy matrix", &
526 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
527 1481 : CALL section_add_keyword(print_key, keyword)
528 1481 : CALL keyword_release(keyword)
529 : CALL keyword_create(keyword, __LOCATION__, name="OCE_HARD", &
530 : description="If the printkey is activated controls the printing of the OCE HARD matrix", &
531 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
532 1481 : CALL section_add_keyword(print_key, keyword)
533 1481 : CALL keyword_release(keyword)
534 : CALL keyword_create(keyword, __LOCATION__, name="OCE_SOFT", &
535 : description="If the printkey is activated controls the printing of the OCE SOFT matrix", &
536 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
537 1481 : CALL section_add_keyword(print_key, keyword)
538 1481 : CALL keyword_release(keyword)
539 : CALL keyword_create(keyword, __LOCATION__, name="W_MATRIX", &
540 : description="If the printkey is activated controls the printing of the w matrix", &
541 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
542 1481 : CALL section_add_keyword(print_key, keyword)
543 1481 : CALL keyword_release(keyword)
544 : CALL keyword_create(keyword, __LOCATION__, name="W_MATRIX_AUX_FIT", &
545 : description="If the printkey is activated controls the printing of the w matrix", &
546 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
547 1481 : CALL section_add_keyword(print_key, keyword)
548 1481 : CALL keyword_release(keyword)
549 : CALL keyword_create(keyword, __LOCATION__, name="DERIVATIVES", &
550 : description="If the printkey is activated controls the printing "// &
551 : "of derivatives (for the matrixes that support this)", &
552 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
553 1481 : CALL section_add_keyword(print_key, keyword)
554 1481 : CALL keyword_release(keyword)
555 1481 : CALL section_add_subsection(section, print_key)
556 1481 : CALL section_release(print_key)
557 :
558 : CALL cp_print_key_section_create( &
559 : print_key, __LOCATION__, "MO", &
560 : description="Controls the printing of the molecular orbital (MO) information. The requested MO information "// &
561 : "is printed for all occupied MOs by default. Use the MO_INDEX_RANGE keyword to restrict the number "// &
562 : "of the MOs or to print the MO information for unoccupied MOs. With diagonalization, an explicit "// &
563 : "positive range or -1 as its last index makes the requested MOs available automatically, up to the "// &
564 : "AO basis size. ADDED_MOS can make extra MOs available independently of this print request. With OT, "// &
565 : "it is sufficient to specify the desired MO_INDEX_RANGE. The OT eigensolver can be controlled with "// &
566 : "the EPS_LUMO and MAX_ITER_LUMO keywords in the SCF section.", &
567 1481 : print_level=high_print_level, filename="__STD_OUT__")
568 : CALL keyword_create(keyword, __LOCATION__, name="CARTESIAN", &
569 : description="Print the MOs in the Cartesian basis instead of the default spherical basis.", &
570 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
571 1481 : CALL section_add_keyword(print_key, keyword)
572 1481 : CALL keyword_release(keyword)
573 : CALL keyword_create(keyword, __LOCATION__, name="CARTESIAN_OVERLAP", &
574 : description="Print the Cartesian overlap matrix in line with Cartesian MO coefficients.", &
575 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
576 1481 : CALL section_add_keyword(print_key, keyword)
577 1481 : CALL keyword_release(keyword)
578 : CALL keyword_create(keyword, __LOCATION__, name="ENERGIES", &
579 : variants=s2a("EIGENVALUES", "EIGVALS"), &
580 : description="Print the MO energies (eigenvalues).", &
581 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
582 1481 : CALL section_add_keyword(print_key, keyword)
583 1481 : CALL keyword_release(keyword)
584 : CALL keyword_create(keyword, __LOCATION__, name="COEFFICIENTS", &
585 : variants=s2a("EIGENVECTORS", "EIGVECS"), &
586 : description="Print the MO coefficients (eigenvectors).", &
587 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
588 1481 : CALL section_add_keyword(print_key, keyword)
589 1481 : CALL keyword_release(keyword)
590 : CALL keyword_create(keyword, __LOCATION__, name="OCCUPATION_NUMBERS", &
591 : variants=s2a("OCCNUMS"), &
592 : description="Print the MO occupation numbers.", &
593 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
594 1481 : CALL section_add_keyword(print_key, keyword)
595 1481 : CALL keyword_release(keyword)
596 : CALL keyword_create(keyword, __LOCATION__, name="OCCUPATION_NUMBERS_STATS", &
597 : variants=s2a("OCCNUMSTATS"), &
598 : description="Print some stats (max number of occupied MOs, etc.) of the MO occupation numbers."// &
599 : " First logical toggles stats printing, first real is the occupied threshold.", &
600 : type_of_var=char_t, n_var=-1, &
601 : default_c_vals=[".FALSE.", "1.0E-6 "], &
602 : lone_keyword_c_vals=[".TRUE."], &
603 5924 : usage="OCCUPATION_NUMBERS_STATS {Logical} [{Real}]")
604 1481 : CALL section_add_keyword(print_key, keyword)
605 1481 : CALL keyword_release(keyword)
606 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
607 : description="Specify the number of digits used to print the MO information.", &
608 1481 : default_i_val=6)
609 1481 : CALL section_add_keyword(print_key, keyword)
610 1481 : CALL keyword_release(keyword)
611 : CALL keyword_create(keyword, __LOCATION__, &
612 : name="MO_INDEX_RANGE", &
613 : variants=s2a("MO_RANGE", "RANGE"), &
614 : description="Print only the requested subset of MOs. The indices of the first and "// &
615 : "the last MO have to be specified to define the range. A positive range makes the "// &
616 : "requested MOs available automatically. -1 as the last MO index makes and prints all "// &
617 : "available orbitals with diagonalization and all orbitals with OT.", &
618 : repeats=.FALSE., &
619 : n_var=2, &
620 : type_of_var=integer_t, &
621 : default_i_vals=[0, 0], &
622 1481 : usage="MO_INDEX_RANGE 10 15")
623 1481 : CALL section_add_keyword(print_key, keyword)
624 1481 : CALL keyword_release(keyword)
625 1481 : CALL section_add_subsection(section, print_key)
626 1481 : CALL section_release(print_key)
627 :
628 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MO_MOLDEN", &
629 : description="Write the molecular orbitals in Molden file format, for visualisation.", &
630 1481 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MOS")
631 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
632 : description="Unit for coordinates and cell in the MOLDEN file.", &
633 : usage="UNIT ANGSTROM", &
634 : enum_c_vals=s2a("BOHR", "ANGSTROM"), &
635 : enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
636 : enum_i_vals=[1, 2], &
637 1481 : default_i_val=1)
638 1481 : CALL section_add_keyword(print_key, keyword)
639 1481 : CALL keyword_release(keyword)
640 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_CELL", &
641 : description="Controls whether the [Cell] block is written to the MOLDEN file.", &
642 : usage="WRITE_CELL T", &
643 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
644 1481 : CALL section_add_keyword(print_key, keyword)
645 1481 : CALL keyword_release(keyword)
646 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_PSEUDO", &
647 : description="Controls whether the [Pseudo] block is written to the MOLDEN file.", &
648 : usage="WRITE_PSEUDO T", &
649 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
650 1481 : CALL section_add_keyword(print_key, keyword)
651 1481 : CALL keyword_release(keyword)
652 : CALL keyword_create(keyword, __LOCATION__, name="MARK_GHOST", &
653 : description="Controls whether ghost atoms are marked in the [Atoms] block by "// &
654 : "setting their atomic number to zero.", &
655 : usage="MARK_GHOST T", &
656 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
657 1481 : CALL section_add_keyword(print_key, keyword)
658 1481 : CALL keyword_release(keyword)
659 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
660 : description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
661 : usage="NDIGITS {int}", &
662 1481 : default_i_val=3)
663 1481 : CALL section_add_keyword(print_key, keyword)
664 1481 : CALL keyword_release(keyword)
665 : CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
666 : description="Representation of Gaussian-type orbitals", &
667 : default_i_val=gto_spherical, &
668 : enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
669 : enum_desc=s2a( &
670 : "Cartesian Gaussian orbitals. Use with caution", &
671 : "Spherical Gaussian orbitals. Incompatible with VMD"), &
672 1481 : enum_i_vals=[gto_cartesian, gto_spherical])
673 1481 : CALL section_add_keyword(print_key, keyword)
674 1481 : CALL keyword_release(keyword)
675 : CALL keyword_create(keyword, __LOCATION__, name="NLUMO", &
676 : description="Number of unoccupied orbitals to include in the Molden file. "// &
677 : "For OT calculations, the requested virtual orbitals are generated after "// &
678 : "SCF using the OT eigensolver. For diagonalization calculations, "// &
679 : "SCF%ADDED_MOS is increased if needed to make the requested unoccupied "// &
680 : "orbitals available. 0 means no virtual orbitals, -1 means all available.", &
681 : usage="NLUMO integer", &
682 1481 : default_i_val=0)
683 1481 : CALL section_add_keyword(print_key, keyword)
684 1481 : CALL keyword_release(keyword)
685 1481 : CALL section_add_subsection(section, print_key)
686 1481 : CALL section_release(print_key)
687 :
688 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MO_KP", &
689 : description="Write k-point MO information to `.mokp` file. "// &
690 : "The information of cell and k-points is given at first. Then, "// &
691 : "the coefficients of molecular orbitals are always written, "// &
692 : "while users can choose whether to write GTO basis information "// &
693 : "or explicit overlap matrices through the `AO_EXPORT_TYPE` keyword.", &
694 1481 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="")
695 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
696 : description="Unit for coordinates and cell in the .mokp file.", &
697 : usage="UNIT ANGSTROM", &
698 : enum_c_vals=s2a("BOHR", "ANGSTROM"), &
699 : enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
700 : enum_i_vals=[1, 2], &
701 1481 : default_i_val=1)
702 1481 : CALL section_add_keyword(print_key, keyword)
703 1481 : CALL keyword_release(keyword)
704 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
705 : description="Specifies the number of significant digits retained.", &
706 : usage="NDIGITS {int}", &
707 1481 : default_i_val=9)
708 1481 : CALL section_add_keyword(print_key, keyword)
709 1481 : CALL keyword_release(keyword)
710 : CALL keyword_create(keyword, __LOCATION__, name="AO_EXPORT_TYPE", &
711 : description="How AO information is provided for interpreting MO coefficients. "// &
712 : "GTO_BASIS writes basis set exponents/coefficients (compact, post-processing reconstructs S(k)). "// &
713 : "OVERLAP_MATRIX writes S(k) directly (larger file, ready to use).", &
714 : default_i_val=mokp_ao_gto_basis, &
715 : enum_c_vals=s2a("GTO_BASIS", "OVERLAP_MATRIX"), &
716 : enum_desc=s2a("Write GTO basis set definition (MOLDEN denormalization convention)", &
717 : "Write explicit overlap matrices S(k) for all k-points"), &
718 1481 : enum_i_vals=[mokp_ao_gto_basis, mokp_ao_overlap_matrix])
719 1481 : CALL section_add_keyword(print_key, keyword)
720 1481 : CALL keyword_release(keyword)
721 1481 : CALL section_add_subsection(section, print_key)
722 1481 : CALL section_release(print_key)
723 :
724 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CC4S", &
725 : description="Export a restricted RI-HF reference and CC4S input after converged single-point SCF. "// &
726 : "Requires RI_FLAVOR MO, XC_FUNCTIONAL NONE, HF FRACTION 1 and identical HF and RI operators. "// &
727 : "Use COULOMB for molecules or TRUNCATED for neutral, fully periodic Gamma-point cells. "// &
728 : "Complete distributed intermediates; no k-point sampling. "// &
729 : "FILENAME sets the common file prefix; exact names (=name) and stdout are unsupported.", &
730 1481 : print_level=debug_print_level + 1, filename="cc4s", common_iter_levels=2)
731 : CALL keyword_create(keyword, __LOCATION__, name="METHOD", &
732 : description="Correlation method requested in the generated CC4S input file.", default_i_val=2, &
733 : enum_c_vals=s2a("MP2", "CCSD", "CCSD_T"), enum_i_vals=[1, 2, 3], &
734 1481 : enum_desc=s2a("MP2", "MP2 and CCSD", "MP2, CCSD and perturbative triples"))
735 1481 : CALL section_add_keyword(print_key, keyword)
736 1481 : CALL keyword_release(keyword)
737 : CALL keyword_create(keyword, __LOCATION__, name="N_FROZEN_CORE", &
738 1481 : description="Number of lowest occupied spatial orbitals omitted from the export.", default_i_val=0)
739 1481 : CALL section_add_keyword(print_key, keyword)
740 1481 : CALL keyword_release(keyword)
741 : CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
742 1481 : description="Maximum CC4S coupled-cluster iterations.", default_i_val=100)
743 1481 : CALL section_add_keyword(print_key, keyword)
744 1481 : CALL keyword_release(keyword)
745 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_CONVERGENCE", &
746 : description="CC4S correlation-energy convergence in Hartree.", &
747 1481 : default_r_val=1.0e-7_dp)
748 1481 : CALL section_add_keyword(print_key, keyword)
749 1481 : CALL keyword_release(keyword)
750 : CALL keyword_create(keyword, __LOCATION__, name="AMPLITUDES_CONVERGENCE", &
751 : description="CC4S amplitude convergence threshold.", &
752 1481 : default_r_val=1.0e-6_dp)
753 1481 : CALL section_add_keyword(print_key, keyword)
754 1481 : CALL keyword_release(keyword)
755 : CALL keyword_create(keyword, __LOCATION__, name="OUTPUT_BUFFER_SIZE", &
756 : description="Maximum output buffer size per MPI rank in MiB (1 MiB = 1048576 bytes). "// &
757 : "Positive real value; rounded down to whole Real64 elements and capped by the vertex size. "// &
758 : "The element count must fit a default INTEGER. Does not directly set transformation batch sizes.", &
759 1481 : default_r_val=8.0_dp)
760 1481 : CALL section_add_keyword(print_key, keyword)
761 1481 : CALL keyword_release(keyword)
762 : CALL keyword_create(keyword, __LOCATION__, name="MAX_MEMORY", &
763 : description="Maximum estimated export workspace per MPI rank in MB, "// &
764 : "Selects orbital and auxiliary batch sizes; includes output and reduction buffers. "// &
765 : "Excludes existing SCF storage, allocator overhead and CC4S. This is not a process memory limit.", &
766 1481 : default_r_val=1024.0_dp)
767 1481 : CALL section_add_keyword(print_key, keyword)
768 1481 : CALL keyword_release(keyword)
769 1481 : CALL section_add_subsection(section, print_key)
770 1481 : CALL section_release(print_key)
771 :
772 1481 : CALL create_mo_section(print_key, "MO_CUBES", "cube", [2, 2, 2], "STRIDE 1 1 1", high_print_level, "write_cube")
773 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
774 : description="append the cube files when they already exist", &
775 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
776 1481 : CALL section_add_keyword(print_key, keyword)
777 1481 : CALL keyword_release(keyword)
778 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
779 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
780 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
781 1481 : CALL section_add_keyword(print_key, keyword)
782 1481 : CALL keyword_release(keyword)
783 1481 : CALL section_add_subsection(section, print_key)
784 1481 : CALL section_release(print_key)
785 :
786 : CALL create_mo_section( &
787 1481 : print_key, "MO_OPENPMD", "openPMD", [1, 1, 1], "STRIDE 2 2 2", debug_print_level + 1, "write_openpmd")
788 1481 : CALL add_generic_openpmd_arguments(print_key)
789 1481 : CALL section_add_subsection(section, print_key)
790 1481 : CALL section_release(print_key)
791 :
792 1481 : CALL create_stm_section(print_key)
793 1481 : CALL section_add_subsection(section, print_key)
794 1481 : CALL section_release(print_key)
795 :
796 1481 : CALL create_wfn_mix_section(subsection)
797 1481 : CALL section_add_subsection(section, subsection)
798 1481 : CALL section_release(subsection)
799 :
800 : CALL section_create(subsection, __LOCATION__, name="TREXIO", &
801 : description="Write a TREXIO file to disk.", &
802 1481 : n_keywords=4, n_subsections=0, repeats=.FALSE.)
803 : CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
804 : description="Body of Filename for the trexio file.", &
805 : usage="FILENAME {name}", default_c_val="TREXIO", &
806 1481 : type_of_var=char_t)
807 1481 : CALL section_add_keyword(subsection, keyword)
808 1481 : CALL keyword_release(keyword)
809 : CALL keyword_create(keyword, __LOCATION__, name="CARTESIAN", &
810 : description="Store the MOs in the Cartesian basis instead of the default spherical basis.", &
811 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
812 1481 : CALL section_add_keyword(subsection, keyword)
813 1481 : CALL keyword_release(keyword)
814 : CALL keyword_create(keyword, __LOCATION__, name="FULL_KPOINT_GRID", &
815 : description="For symmetry-reduced k-point SCF calculations, export MOs on the "// &
816 : "full unreduced k-point grid instead of the irreducible grid.", &
817 : usage="FULL_KPOINT_GRID <LOGICAL>", default_l_val=.FALSE., &
818 1481 : lone_keyword_l_val=.TRUE.)
819 1481 : CALL section_add_keyword(subsection, keyword)
820 1481 : CALL keyword_release(keyword)
821 : CALL keyword_create(keyword, __LOCATION__, name="REUSE_SCF_MOS", &
822 : description="When FULL_KPOINT_GRID is active, try to reconstruct the full-grid "// &
823 : "MO coefficients from the symmetry-reduced SCF orbitals before falling back to "// &
824 : "a full-grid diagonalization.", &
825 1481 : usage="REUSE_SCF_MOS T", default_l_val=.TRUE.)
826 1481 : CALL section_add_keyword(subsection, keyword)
827 1481 : CALL keyword_release(keyword)
828 1481 : CALL section_add_subsection(section, subsection)
829 1481 : CALL section_release(subsection)
830 :
831 : CALL section_create(subsection, __LOCATION__, name="CASINO", &
832 : description="Write a CASINO gwfn.data file to disk.", &
833 1481 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
834 : CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
835 : description="Filename for the CASINO gwfn.data file.", &
836 : usage="FILENAME {name}", default_c_val="gwfn.data", &
837 1481 : type_of_var=char_t)
838 1481 : CALL section_add_keyword(subsection, keyword)
839 1481 : CALL keyword_release(keyword)
840 : CALL keyword_create(keyword, __LOCATION__, name="EPS_KPOINT_REAL", &
841 : description="Tolerance for detecting Gamma/BZ-edge k-points with real orbitals.", &
842 1481 : usage="EPS_KPOINT_REAL 1.0E-10", default_r_val=1.0E-10_dp)
843 1481 : CALL section_add_keyword(subsection, keyword)
844 1481 : CALL keyword_release(keyword)
845 : CALL keyword_create(keyword, __LOCATION__, name="FULL_KPOINT_GRID", &
846 : description="For symmetry-reduced k-point SCF calculations, export orbitals on the "// &
847 : "full unreduced k-point grid required by CASINO.", &
848 : usage="FULL_KPOINT_GRID <LOGICAL>", default_l_val=.TRUE., &
849 1481 : lone_keyword_l_val=.TRUE.)
850 1481 : CALL section_add_keyword(subsection, keyword)
851 1481 : CALL keyword_release(keyword)
852 : CALL keyword_create(keyword, __LOCATION__, name="REUSE_SCF_MOS", &
853 : description="When FULL_KPOINT_GRID is active, try to reconstruct the full-grid "// &
854 : "MO coefficients from the symmetry-reduced SCF orbitals before falling back to "// &
855 : "a full-grid diagonalization.", &
856 1481 : usage="REUSE_SCF_MOS T", default_l_val=.TRUE.)
857 1481 : CALL section_add_keyword(subsection, keyword)
858 1481 : CALL keyword_release(keyword)
859 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_PSEUDOPOTENTIALS", &
860 : description="Write CASINO *_pp.data files for CP2K semilocal ECP potentials. "// &
861 : "GTH pseudopotentials are marked in gwfn.data, but require externally supplied "// &
862 : "CASINO pseudopotential files.", &
863 : usage="WRITE_PSEUDOPOTENTIALS T", default_l_val=.TRUE., &
864 1481 : lone_keyword_l_val=.TRUE.)
865 1481 : CALL section_add_keyword(subsection, keyword)
866 1481 : CALL keyword_release(keyword)
867 1481 : CALL section_add_subsection(section, subsection)
868 1481 : CALL section_release(subsection)
869 :
870 : CALL section_create(subsection, __LOCATION__, name="GAPW", &
871 : description="Controls the printing of some gapw related information (debug).", &
872 1481 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
873 : CALL cp_print_key_section_create(print_key, __LOCATION__, "projectors", &
874 : description="If the printkey is activated controls if information on"// &
875 : " the projectors is printed.", &
876 1481 : print_level=debug_print_level, filename="__STD_OUT__")
877 1481 : CALL section_add_subsection(subsection, print_key)
878 1481 : CALL section_release(print_key)
879 : CALL cp_print_key_section_create(print_key, __LOCATION__, "rho0_information", &
880 : description="If the printkey is activated controls if information on rho0 is printed.", &
881 1481 : print_level=debug_print_level, filename="__STD_OUT__", unit_str="angstrom")
882 1481 : CALL section_add_subsection(subsection, print_key)
883 1481 : CALL section_release(print_key)
884 1481 : CALL section_add_subsection(section, subsection)
885 1481 : CALL section_release(subsection)
886 :
887 : CALL cp_print_key_section_create(print_key, __LOCATION__, "dft_control_parameters", &
888 : description="Controls the printing of dft control parameters.", &
889 1481 : print_level=medium_print_level, filename="__STD_OUT__")
890 1481 : CALL section_add_subsection(section, print_key)
891 1481 : CALL section_release(print_key)
892 :
893 : CALL cp_print_key_section_create(print_key, __LOCATION__, "KPOINTS", &
894 : description="Controls the printing of kpoint information.", &
895 1481 : print_level=medium_print_level, filename="__STD_OUT__")
896 1481 : CALL section_add_subsection(section, print_key)
897 1481 : CALL section_release(print_key)
898 :
899 1481 : NULLIFY (subsection)
900 1481 : CALL create_bandstructure_section(subsection)
901 1481 : CALL section_add_subsection(section, subsection)
902 1481 : CALL section_release(subsection)
903 :
904 : CALL cp_print_key_section_create(print_key, __LOCATION__, "OVERLAP_CONDITION", &
905 : description="Controls the checking and printing of an estimate "// &
906 : "of the overlap matrix condition number", &
907 1481 : print_level=debug_print_level, filename="__STD_OUT__")
908 : CALL keyword_create(keyword, __LOCATION__, name="1-NORM", &
909 : description="Calculate an estimate of the 1-norm condition number", &
910 1481 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
911 1481 : CALL section_add_keyword(print_key, keyword)
912 1481 : CALL keyword_release(keyword)
913 : CALL keyword_create(keyword, __LOCATION__, name="DIAGONALIZATION", &
914 : description="Calculate the 1- and 2-norm condition numbers using diagonalization", &
915 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
916 1481 : CALL section_add_keyword(print_key, keyword)
917 1481 : CALL keyword_release(keyword)
918 : CALL keyword_create(keyword, __LOCATION__, name="ARNOLDI", &
919 : description="Calculate the 2-norm condition number using the Arnoldi code (may not be reliable)", &
920 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
921 1481 : CALL section_add_keyword(print_key, keyword)
922 1481 : CALL keyword_release(keyword)
923 1481 : CALL section_add_subsection(section, print_key)
924 1481 : CALL section_release(print_key)
925 :
926 : CALL create_e_density_section( &
927 : print_key, &
928 : "E_DENSITY_OPENPMD", &
929 : "openPMD", &
930 : [1, 1, 1], &
931 : "STRIDE 1 1 1", &
932 1481 : debug_print_level + 1)
933 1481 : CALL add_generic_openpmd_arguments(print_key)
934 1481 : CALL section_add_subsection(section, print_key)
935 1481 : CALL section_release(print_key)
936 :
937 1481 : CALL create_e_density_section(print_key, "E_DENSITY_CUBE", "cube", [2, 2, 2], "STRIDE 2 2 2", high_print_level)
938 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
939 : description="append the cube files when they already exist", &
940 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
941 1481 : CALL section_add_keyword(print_key, keyword)
942 1481 : CALL keyword_release(keyword)
943 :
944 : CALL keyword_create(keyword, __LOCATION__, name="XRD_INTERFACE", &
945 : description="It activates the print out of exponents and coefficients for the"// &
946 : " Gaussian expansion of the core densities, based on atom calculations for each kind."// &
947 : " The resulting core dansities are needed to compute the form factors."// &
948 : " If GAPW the local densities are also given in terms of a Gaussian expansion,"// &
949 : " by fitting the difference between local-fhard and local-soft density for each atom."// &
950 : " In this case the keyword SOFT_DENSITY is enabled.", &
951 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
952 1481 : CALL section_add_keyword(print_key, keyword)
953 1481 : CALL keyword_release(keyword)
954 :
955 : CALL keyword_create(keyword, __LOCATION__, name="NGAUSS", &
956 : description="Number of Gaussian functions used in the expansion of atomic (core) density "// &
957 : "for XRD_INTERFACE. Does not select a valence-only density.", &
958 1481 : usage="NGAUSS 10", n_var=1, default_i_val=12, type_of_var=integer_t)
959 1481 : CALL section_add_keyword(print_key, keyword)
960 1481 : CALL keyword_release(keyword)
961 :
962 1481 : CALL section_add_subsection(section, print_key)
963 1481 : CALL section_release(print_key)
964 :
965 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FOD", &
966 : description="Fractional occupation number weighted density (FOD) of Grimme and Hansen "// &
967 : "[doi:10.1002/anie.201501887]. Prints the orbital sum N_FOD. "// &
968 : "Requires GPW at Gamma and positive-temperature Fermi-Dirac smearing. "// &
969 : "FOD is a qualitative static-correlation diagnostic, not a proof of "// &
970 : "multireference character. Results depend on the functional and electronic "// &
971 : "temperature; metallic occupations need a different interpretation.", &
972 2962 : print_level=debug_print_level + 1, filename="", citations=[Grimme2015FOD])
973 : CALL keyword_create(keyword, __LOCATION__, name="CUBE", &
974 : description="Also collocate the FOD density, print its grid integral and write a cube "// &
975 : "in electrons/bohr**3. Without this option only the inexpensive orbital sum is computed.", &
976 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
977 1481 : CALL section_add_keyword(print_key, keyword)
978 1481 : CALL keyword_release(keyword)
979 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
980 : description="Cube sampling stride. Supply one value for all directions or three values.", &
981 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
982 1481 : CALL section_add_keyword(print_key, keyword)
983 1481 : CALL keyword_release(keyword)
984 1481 : CALL section_add_subsection(section, print_key)
985 1481 : CALL section_release(print_key)
986 :
987 : CALL cp_print_key_section_create(print_key, __LOCATION__, "tot_density_cube", &
988 : description="Controls printing of cube files with "// &
989 : "the total density (electrons+atomic core). Note that "// &
990 : "the value of the total density is positive where the "// &
991 : "electron density dominates and negative where the core is. "// &
992 : "When GPW is enabled this will simply print the combined density "// &
993 : "of the valence electrons and charge-balanced core. In GAPW the "// &
994 : "electronic density (hard+soft plus a correction term) is printed "// &
995 : "together with the charge-balanced core density to produce a complete "// &
996 : "representation of the total density.", &
997 1481 : print_level=high_print_level, filename="")
998 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
999 : description="The stride (X,Y,Z) used to write the cube file "// &
1000 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1001 : " 1 number valid for all components.", &
1002 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1003 1481 : CALL section_add_keyword(print_key, keyword)
1004 1481 : CALL keyword_release(keyword)
1005 :
1006 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1007 : description="append the cube files when they already exist", &
1008 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1009 1481 : CALL section_add_keyword(print_key, keyword)
1010 1481 : CALL keyword_release(keyword)
1011 :
1012 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
1013 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
1014 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
1015 1481 : CALL section_add_keyword(print_key, keyword)
1016 1481 : CALL keyword_release(keyword)
1017 :
1018 1481 : CALL section_add_subsection(section, print_key)
1019 1481 : CALL section_release(print_key)
1020 :
1021 : CALL cp_print_key_section_create(print_key, __LOCATION__, "v_hartree_cube", &
1022 : description="Controls the printing of a cube file with eletrostatic"// &
1023 : " potential generated by the total density (electrons+ions). It is"// &
1024 : " valid only for QS with GPW formalism."// &
1025 : " Note that by convention the potential has opposite sign than the expected physical one.", &
1026 1481 : print_level=high_print_level, filename="")
1027 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1028 : description="The stride (X,Y,Z) used to write the cube file "// &
1029 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1030 : " 1 number valid for all components.", &
1031 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1032 1481 : CALL section_add_keyword(print_key, keyword)
1033 1481 : CALL keyword_release(keyword)
1034 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1035 : description="append the cube files when they already exist", &
1036 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1037 1481 : CALL section_add_keyword(print_key, keyword)
1038 1481 : CALL keyword_release(keyword)
1039 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
1040 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
1041 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
1042 1481 : CALL section_add_keyword(print_key, keyword)
1043 1481 : CALL keyword_release(keyword)
1044 :
1045 1481 : CALL section_add_subsection(section, print_key)
1046 1481 : CALL section_release(print_key)
1047 :
1048 : CALL cp_print_key_section_create(print_key, __LOCATION__, "external_potential_cube", &
1049 : description="Controls the printing of a cube file with external"// &
1050 : " potential from the DFT%EXTERNAL_POTENTIAL section only.", &
1051 1481 : print_level=high_print_level, filename="")
1052 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1053 : description="The stride (X,Y,Z) used to write the cube file "// &
1054 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1055 : " 1 number valid for all components.", &
1056 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1057 1481 : CALL section_add_keyword(print_key, keyword)
1058 1481 : CALL keyword_release(keyword)
1059 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1060 : description="append the cube files when they already exist", &
1061 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1062 1481 : CALL section_add_keyword(print_key, keyword)
1063 1481 : CALL keyword_release(keyword)
1064 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
1065 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
1066 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
1067 1481 : CALL section_add_keyword(print_key, keyword)
1068 1481 : CALL keyword_release(keyword)
1069 1481 : CALL section_add_subsection(section, print_key)
1070 1481 : CALL section_release(print_key)
1071 :
1072 : ! Output of BQB volumetric files
1073 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="E_DENSITY_BQB", &
1074 : description="Controls the output of the electron density to the losslessly"// &
1075 : " compressed BQB file format, see [Brehm2018]"// &
1076 : " (via LibBQB see <https://brehm-research.de/bqb>)."// &
1077 : " Currently does not work with changing cell vector (NpT ensemble).", &
1078 : print_level=debug_print_level + 1, filename="", &
1079 2962 : citations=[Brehm2018])
1080 :
1081 : CALL keyword_create(keyword, __LOCATION__, name="SKIP_FIRST", &
1082 : description="Skips the first step of a MD run (avoids duplicate step if restarted).", &
1083 1481 : usage="SKIP_FIRST T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1084 1481 : CALL section_add_keyword(print_key, keyword)
1085 1481 : CALL keyword_release(keyword)
1086 :
1087 : CALL keyword_create(keyword, __LOCATION__, name="STORE_STEP_NUMBER", &
1088 : description="Stores the step number and simulation time in the comment line of each BQB"// &
1089 : " frame. Switch it off for binary compatibility with original CP2k CUBE files.", &
1090 1481 : usage="STORE_STEP_NUMBER F", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1091 1481 : CALL section_add_keyword(print_key, keyword)
1092 1481 : CALL keyword_release(keyword)
1093 :
1094 : CALL keyword_create(keyword, __LOCATION__, name="CHECK", &
1095 : description="Performs an on-the-fly decompression of each compressed BQB frame to check"// &
1096 : " whether the volumetric data exactly matches, and aborts the run if not so.", &
1097 1481 : usage="CHECK T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1098 1481 : CALL section_add_keyword(print_key, keyword)
1099 1481 : CALL keyword_release(keyword)
1100 :
1101 : CALL keyword_create(keyword, __LOCATION__, name="OVERWRITE", &
1102 : description="Specify this keyword to overwrite the output BQB file if"// &
1103 : " it already exists. By default, the data is appended to an existing file.", &
1104 1481 : usage="OVERWRITE T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1105 1481 : CALL section_add_keyword(print_key, keyword)
1106 1481 : CALL keyword_release(keyword)
1107 :
1108 : CALL keyword_create(keyword, __LOCATION__, name="HISTORY", &
1109 : description="Controls how many previous steps are taken into account for extrapolation in"// &
1110 : " compression. Use a value of 1 to compress the frames independently.", &
1111 1481 : usage="HISTORY 10", n_var=1, default_i_val=10, type_of_var=integer_t)
1112 1481 : CALL section_add_keyword(print_key, keyword)
1113 1481 : CALL keyword_release(keyword)
1114 :
1115 : CALL keyword_create(keyword, __LOCATION__, name="PARAMETER_KEY", &
1116 : description="Allows to supply previously optimized compression parameters via a"// &
1117 : " parameter key (alphanumeric character sequence starting with 'at')."// &
1118 : " Just leave away the 'at' sign here, because CP2k will otherwise"// &
1119 : " assume it is a variable name in the input", &
1120 1481 : usage="PARAMETER_KEY <KEY>", n_var=1, default_c_val="", type_of_var=char_t)
1121 1481 : CALL section_add_keyword(print_key, keyword)
1122 1481 : CALL keyword_release(keyword)
1123 :
1124 : CALL keyword_create(keyword, __LOCATION__, name="OPTIMIZE", &
1125 : description="Controls the time spent to optimize the parameters for compression efficiency.", &
1126 : usage="OPTIMIZE {OFF,QUICK,NORMAL,PATIENT,EXHAUSTIVE}", repeats=.FALSE., n_var=1, &
1127 : default_i_val=bqb_opt_quick, &
1128 : enum_c_vals=s2a("OFF", "QUICK", "NORMAL", "PATIENT", "EXHAUSTIVE"), &
1129 : enum_desc=s2a("No optimization (use defaults)", "Quick optimization", &
1130 : "Standard optimization", "Precise optimization", "Exhaustive optimization"), &
1131 1481 : enum_i_vals=[bqb_opt_off, bqb_opt_quick, bqb_opt_normal, bqb_opt_patient, bqb_opt_exhaustive])
1132 1481 : CALL section_add_keyword(print_key, keyword)
1133 1481 : CALL keyword_release(keyword)
1134 :
1135 1481 : CALL section_add_subsection(section, print_key)
1136 1481 : CALL section_release(print_key)
1137 :
1138 : ! Voronoi Integration via LibVori
1139 1481 : CALL create_print_voronoi_section(print_key)
1140 1481 : CALL section_add_subsection(section, print_key)
1141 1481 : CALL section_release(print_key)
1142 :
1143 : ! cube files for data generated by the implicit (generalized) Poisson solver
1144 1481 : CALL create_implicit_psolver_section(subsection)
1145 1481 : CALL section_add_subsection(section, subsection)
1146 1481 : CALL section_release(subsection)
1147 :
1148 : ! ZMP adding the print section for the v_xc cube
1149 : CALL cp_print_key_section_create(print_key, __LOCATION__, "v_xc_cube", &
1150 : description="Controls the printing of a cube file with xc"// &
1151 : " potential generated by the ZMP method (for the moment). It is"// &
1152 : " valid only for QS with GPW formalism .", &
1153 1481 : print_level=high_print_level, filename="")
1154 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1155 : description="The stride (X,Y,Z) used to write the cube file "// &
1156 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1157 : " 1 number valid for all components.", &
1158 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1159 1481 : CALL section_add_keyword(print_key, keyword)
1160 1481 : CALL keyword_release(keyword)
1161 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1162 : description="append the cube files when they already exist", &
1163 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1164 1481 : CALL section_add_keyword(print_key, keyword)
1165 1481 : CALL keyword_release(keyword)
1166 :
1167 1481 : CALL section_add_subsection(section, print_key)
1168 1481 : CALL section_release(print_key)
1169 :
1170 : CALL cp_print_key_section_create(print_key, __LOCATION__, "efield_cube", &
1171 : description="Controls the printing of cube files with electric"// &
1172 : " field generated by the total density (electrons+ions). It is"// &
1173 : " valid only for QS with GPW formalism.", &
1174 1481 : print_level=high_print_level, filename="")
1175 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1176 : description="The stride (X,Y,Z) used to write the cube file "// &
1177 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1178 : " 1 number valid for all components.", &
1179 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1180 1481 : CALL section_add_keyword(print_key, keyword)
1181 1481 : CALL keyword_release(keyword)
1182 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1183 : description="append the cube files when they already exist", &
1184 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1185 1481 : CALL section_add_keyword(print_key, keyword)
1186 1481 : CALL keyword_release(keyword)
1187 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
1188 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
1189 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
1190 1481 : CALL section_add_keyword(print_key, keyword)
1191 1481 : CALL keyword_release(keyword)
1192 :
1193 1481 : CALL section_add_subsection(section, print_key)
1194 1481 : CALL section_release(print_key)
1195 :
1196 : CALL create_elf_print_section(print_key, "ELF_CUBE", &
1197 : "cube", &
1198 1481 : [2, 2, 2], "STRIDE 2 2 2", high_print_level, "")
1199 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1200 : description="append the cube files when they already exist", &
1201 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1202 1481 : CALL section_add_keyword(print_key, keyword)
1203 1481 : CALL keyword_release(keyword)
1204 :
1205 1481 : CALL section_add_subsection(section, print_key)
1206 1481 : CALL section_release(print_key)
1207 :
1208 : CALL create_elf_print_section(print_key, "ELF_OPENPMD", &
1209 : "openPMD", &
1210 1481 : [1, 1, 1], "STRIDE 1 1 1", debug_print_level + 1, "")
1211 1481 : CALL add_generic_openpmd_arguments(print_key)
1212 1481 : CALL section_add_subsection(section, print_key)
1213 1481 : CALL section_release(print_key)
1214 :
1215 : CALL cp_print_key_section_create(print_key, __LOCATION__, "LOCAL_ENERGY_CUBE", &
1216 : description="Controls the printing of cube files with the local"// &
1217 : " energy. It is valid only for QS with GPW/GAPW formalism."// &
1218 : " Meta and hybrid functionals are not possible. For GAPW/GAPW_XC"// &
1219 : " and ADMM-GAPW this regular-grid cube keeps the existing soft-grid"// &
1220 : " semantics; atom-centered hard one-center terms are not projected"// &
1221 : " onto the cube grid.", &
1222 1481 : print_level=debug_print_level, filename="")
1223 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1224 : description="The stride (X,Y,Z) used to write the cube file "// &
1225 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1226 : " 1 number valid for all components.", &
1227 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1228 1481 : CALL section_add_keyword(print_key, keyword)
1229 1481 : CALL keyword_release(keyword)
1230 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1231 : description="append the cube files when they already exist", &
1232 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1233 1481 : CALL section_add_keyword(print_key, keyword)
1234 1481 : CALL keyword_release(keyword)
1235 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
1236 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
1237 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
1238 1481 : CALL section_add_keyword(print_key, keyword)
1239 1481 : CALL keyword_release(keyword)
1240 :
1241 1481 : CALL section_add_subsection(section, print_key)
1242 1481 : CALL section_release(print_key)
1243 :
1244 : CALL cp_print_key_section_create(print_key, __LOCATION__, "LOCAL_STRESS_CUBE", &
1245 : description="Controls the printing of cube files with the local"// &
1246 : " stress. It is valid only for QS with GPW/GAPW formalism."// &
1247 : " Meta and hybrid functionals are not possible. For GAPW/GAPW_XC"// &
1248 : " and ADMM-GAPW this regular-grid cube keeps the existing soft-grid"// &
1249 : " semantics; atom-centered hard one-center terms are not projected"// &
1250 : " onto the cube grid.", &
1251 1481 : print_level=debug_print_level, filename="")
1252 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
1253 : description="The stride (X,Y,Z) used to write the cube file "// &
1254 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1255 : " 1 number valid for all components.", &
1256 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1257 1481 : CALL section_add_keyword(print_key, keyword)
1258 1481 : CALL keyword_release(keyword)
1259 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1260 : description="append the cube files when they already exist", &
1261 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1262 1481 : CALL section_add_keyword(print_key, keyword)
1263 1481 : CALL keyword_release(keyword)
1264 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
1265 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
1266 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
1267 1481 : CALL section_add_keyword(print_key, keyword)
1268 1481 : CALL keyword_release(keyword)
1269 :
1270 1481 : CALL section_add_subsection(section, print_key)
1271 1481 : CALL section_release(print_key)
1272 :
1273 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DOS", &
1274 : description="Print density of states (DOS). "// &
1275 : "Projected DOS output can be enabled with PDOS.", &
1276 1481 : print_level=debug_print_level, common_iter_levels=1, filename="")
1277 :
1278 1481 : CALL add_dos_keywords(print_key, xas_mode=.FALSE.)
1279 :
1280 : CALL keyword_create(keyword, __LOCATION__, name="MP_GRID", &
1281 : description="Specify a Monkhorst-Pack grid with which to compute the density of states. "// &
1282 : "Works only for a k-point calculation", &
1283 : usage="MP_GRID {integer} {integer} {integer}", default_i_vals=[-1], &
1284 1481 : n_var=3, type_of_var=integer_t)
1285 1481 : CALL section_add_keyword(print_key, keyword)
1286 1481 : CALL keyword_release(keyword)
1287 :
1288 1481 : CALL section_add_subsection(section, print_key)
1289 1481 : CALL section_release(print_key)
1290 :
1291 1481 : CALL create_wannier_section(print_key)
1292 1481 : CALL section_add_subsection(section, print_key)
1293 1481 : CALL section_release(print_key)
1294 :
1295 : !Printing of Moments
1296 1481 : CALL create_dipoles_section(print_key, "MOMENTS", high_print_level)
1297 : CALL keyword_create( &
1298 : keyword, __LOCATION__, &
1299 : name="MAX_MOMENT", &
1300 : description="Maximum moment to be calculated. Values higher than 1 not implemented under periodic boundaries.", &
1301 : usage="MAX_MOMENT {integer}", &
1302 : repeats=.FALSE., &
1303 : n_var=1, &
1304 : type_of_var=integer_t, &
1305 1481 : default_i_val=1)
1306 1481 : CALL section_add_keyword(print_key, keyword)
1307 1481 : CALL keyword_release(keyword)
1308 : CALL keyword_create( &
1309 : keyword, __LOCATION__, &
1310 : name="UNIT", &
1311 : description="Unit of the printed electric multipole moments. Multipoles of order L are "// &
1312 : "printed in UNIT*length^(L-1), where length is angstrom for debye and e_angstrom, bohr for "// &
1313 : "au_dip (atomic unit of the dipole) and m for C_m (Coulomb meter). For k-point calculations the "// &
1314 : "dipole matrix elements are printed in UNIT and the Berry curvature in length^2. The FORMAT "// &
1315 : "TRAJECTORY output is always in Debye.", &
1316 : usage="UNIT {debye|e_angstrom|au_dip|C_m}", &
1317 : repeats=.FALSE., &
1318 : n_var=1, &
1319 : type_of_var=char_t, &
1320 1481 : default_c_val="debye")
1321 1481 : CALL section_add_keyword(print_key, keyword)
1322 1481 : CALL keyword_release(keyword)
1323 : CALL keyword_create( &
1324 : keyword, __LOCATION__, &
1325 : name="FORMAT", &
1326 : description="Format of the moments output. DETAILED prints the traditional multi-line report. "// &
1327 : "TRAJECTORY prints one machine-readable electric-dipole record per iteration. For periodic "// &
1328 : "calculations each record also contains the cell matrix in Debye, which is required to unwrap "// &
1329 : "Berry-phase jumps in variable cells.", &
1330 : usage="FORMAT {DETAILED|TRAJECTORY}", &
1331 : enum_c_vals=s2a("DETAILED", "TRAJECTORY"), &
1332 : enum_desc=s2a("Traditional multi-line moments report", &
1333 : "One electric-dipole record per iteration"), &
1334 : enum_i_vals=[moments_format_detailed, moments_format_trajectory], &
1335 1481 : default_i_val=moments_format_detailed)
1336 1481 : CALL section_add_keyword(print_key, keyword)
1337 1481 : CALL keyword_release(keyword)
1338 : CALL keyword_create(keyword, __LOCATION__, &
1339 : name="MAGNETIC", &
1340 : description="Calculate also magnetic moments, only implemented without periodic boundaries", &
1341 : usage="MAGNETIC yes", &
1342 : repeats=.FALSE., &
1343 : n_var=1, &
1344 : default_l_val=.FALSE., &
1345 1481 : lone_keyword_l_val=.TRUE.)
1346 1481 : CALL section_add_keyword(print_key, keyword)
1347 1481 : CALL keyword_release(keyword)
1348 : CALL keyword_create(keyword, __LOCATION__, &
1349 : name="VEL_REPRS", &
1350 : description="Calculate expectation values of the el. multipole moments in their velocity "// &
1351 : "representation during RTP. Implemented up to el. quadrupole moment.", &
1352 : usage="VEL_REPRS yes", &
1353 : repeats=.FALSE., &
1354 : n_var=1, &
1355 : default_l_val=.FALSE., &
1356 : lone_keyword_l_val=.TRUE., &
1357 2962 : citations=[Mattiat2022])
1358 1481 : CALL section_add_keyword(print_key, keyword)
1359 1481 : CALL keyword_release(keyword)
1360 : CALL keyword_create(keyword, __LOCATION__, &
1361 : name="COM_NL", &
1362 : description="Include non local commutator for velocity representations. "// &
1363 : "Necessary for origin independent results.", &
1364 : usage="COM_NL yes", &
1365 : repeats=.FALSE., &
1366 : n_var=1, &
1367 : default_l_val=.FALSE., &
1368 : lone_keyword_l_val=.TRUE., &
1369 2962 : citations=[Mattiat2022])
1370 1481 : CALL section_add_keyword(print_key, keyword)
1371 1481 : CALL keyword_release(keyword)
1372 : CALL keyword_create(keyword, __LOCATION__, &
1373 : name="SECOND_REFERENCE_POINT", &
1374 : description="Use second reference point", &
1375 : usage="SECOND_REFERENCE_POINT .TRUE.", &
1376 : repeats=.FALSE., &
1377 : n_var=1, &
1378 : default_l_val=.FALSE., &
1379 1481 : lone_keyword_l_val=.TRUE.)
1380 1481 : CALL section_add_keyword(print_key, keyword)
1381 1481 : CALL keyword_release(keyword)
1382 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_2", &
1383 : variants=s2a("REF_2"), &
1384 : description="Define a second reference point for the calculation of the electrostatic moment.", &
1385 : usage="REFERENCE_2 COM", &
1386 : enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
1387 : enum_desc=s2a("Use Center of Mass", &
1388 : "Use Center of Atomic Charges", &
1389 : "Use User Defined Point (Keyword:REF_POINT)", &
1390 : "Use Origin of Coordinate System"), &
1391 : enum_i_vals=[use_mom_ref_com, &
1392 : use_mom_ref_coac, &
1393 : use_mom_ref_user, &
1394 : use_mom_ref_zero], &
1395 1481 : default_i_val=use_mom_ref_zero)
1396 1481 : CALL section_add_keyword(print_key, keyword)
1397 1481 : CALL keyword_release(keyword)
1398 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT_2", &
1399 : variants=s2a("REF_POINT_2"), &
1400 : description="Fixed second reference point for the calculations of the electrostatic moment.", &
1401 : usage="REFERENCE_POINT_2 x y z", &
1402 : repeats=.FALSE., &
1403 : n_var=3, default_r_vals=[0._dp, 0._dp, 0._dp], &
1404 : type_of_var=real_t, &
1405 1481 : unit_str='bohr')
1406 1481 : CALL section_add_keyword(print_key, keyword)
1407 1481 : CALL keyword_release(keyword)
1408 : CALL keyword_create(keyword, __LOCATION__, name="MAX_NMO", &
1409 : description="Maximum number of molecular orbitals closest to the Fermi "// &
1410 : "level for which dipole matrix elements and Berry curvatures are printed "// &
1411 : "per k-point. 0 for all orbitals. Ignored if not a KPOINT calculation.", &
1412 : usage="MAX_NMO {integer}", &
1413 : repeats=.FALSE., &
1414 : n_var=1, default_i_val=10, &
1415 1481 : type_of_var=integer_t)
1416 1481 : CALL section_add_keyword(print_key, keyword)
1417 1481 : CALL keyword_release(keyword)
1418 : CALL keyword_create(keyword, __LOCATION__, name="SOC", &
1419 : description="Compute the k-point dipole matrix elements and Berry "// &
1420 : "curvature with spin-orbit coupling (SOC) included, in the 2*n_ao "// &
1421 : "spinor basis.", &
1422 : usage="SOC .TRUE.", &
1423 : repeats=.FALSE., &
1424 : n_var=1, &
1425 : default_l_val=.FALSE., &
1426 1481 : lone_keyword_l_val=.TRUE.)
1427 1481 : CALL section_add_keyword(print_key, keyword)
1428 1481 : CALL keyword_release(keyword)
1429 : CALL keyword_create(keyword, __LOCATION__, name="KPOINT_DIPOLE_FILE", &
1430 : description="Write the k-point dipole matrix elements to this file. "// &
1431 : "Without a value, the file kpoint_dipoles.dat "// &
1432 : "is used. Only used for KPOINT calculations.", &
1433 : usage="KPOINT_DIPOLE_FILE {filename}", &
1434 : repeats=.FALSE., &
1435 : n_var=1, &
1436 : type_of_var=char_t, &
1437 : default_c_val="", &
1438 1481 : lone_keyword_c_val="kpoint_dipoles.dat")
1439 1481 : CALL section_add_keyword(print_key, keyword)
1440 1481 : CALL keyword_release(keyword)
1441 : CALL keyword_create(keyword, __LOCATION__, name="BERRY_CURVATURE_FILE", &
1442 : description="Write the k-point Berry curvature to this file. "// &
1443 : "Without a value, the file berry_curvature.dat "// &
1444 : "is used. Only used for KPOINT calculations.", &
1445 : usage="BERRY_CURVATURE_FILE {filename}", &
1446 : repeats=.FALSE., &
1447 : n_var=1, &
1448 : type_of_var=char_t, &
1449 : default_c_val="", &
1450 1481 : lone_keyword_c_val="berry_curvature.dat")
1451 1481 : CALL section_add_keyword(print_key, keyword)
1452 1481 : CALL keyword_release(keyword)
1453 1481 : CALL create_kpoint_set_section(subsection)
1454 1481 : CALL section_add_subsection(print_key, subsection)
1455 1481 : CALL section_release(subsection)
1456 1481 : CALL create_kpoints_section(subsection)
1457 1481 : CALL section_add_subsection(print_key, subsection)
1458 1481 : CALL section_release(subsection)
1459 : CALL keyword_create(keyword, __LOCATION__, name="KG", &
1460 : description="Print the electronic moments separately for KG subsystems", &
1461 : usage="KG .TRUE.", &
1462 : repeats=.FALSE., &
1463 : n_var=1, &
1464 : default_l_val=.FALSE., &
1465 1481 : lone_keyword_l_val=.TRUE.)
1466 1481 : CALL section_add_keyword(print_key, keyword)
1467 1481 : CALL keyword_release(keyword)
1468 1481 : CALL section_add_subsection(section, print_key)
1469 1481 : CALL section_release(print_key)
1470 :
1471 : ! Mulliken population analysis
1472 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MULLIKEN", &
1473 : description="Controls the printing of the Mulliken (spin) population analysis", &
1474 : print_level=medium_print_level, filename="__STD_OUT__", &
1475 1481 : common_iter_levels=1)
1476 : CALL keyword_create( &
1477 : keyword, __LOCATION__, &
1478 : name="PRINT_GOP", &
1479 : description="Print the gross orbital populations (GOP) in addition to the gross atomic populations (GAP) "// &
1480 : "and net charges", &
1481 : usage="PRINT_GOP yes", &
1482 : repeats=.FALSE., &
1483 : n_var=1, &
1484 : default_l_val=.FALSE., &
1485 1481 : lone_keyword_l_val=.TRUE.)
1486 1481 : CALL section_add_keyword(print_key, keyword)
1487 1481 : CALL keyword_release(keyword)
1488 : CALL keyword_create( &
1489 : keyword, __LOCATION__, &
1490 : name="PRINT_ALL", &
1491 : description="Print all information including the full net AO and overlap population matrix", &
1492 : usage="PRINT_ALL yes", &
1493 : repeats=.FALSE., &
1494 : n_var=1, &
1495 : default_l_val=.FALSE., &
1496 1481 : lone_keyword_l_val=.TRUE.)
1497 1481 : CALL section_add_keyword(print_key, keyword)
1498 1481 : CALL keyword_release(keyword)
1499 1481 : CALL section_add_subsection(section, print_key)
1500 1481 : CALL section_release(print_key)
1501 :
1502 : ! Lowdin population analysis (fairly expensive to compute, so only at high)
1503 : CALL cp_print_key_section_create(print_key, __LOCATION__, "LOWDIN", &
1504 : description="Controls the printing of the Lowdin (spin) population analysis", &
1505 : print_level=high_print_level, filename="__STD_OUT__", &
1506 1481 : common_iter_levels=1)
1507 : CALL keyword_create( &
1508 : keyword, __LOCATION__, &
1509 : name="PRINT_GOP", &
1510 : description="Print the orbital populations in addition to the atomic populations and net charges", &
1511 : usage="PRINT_GOP yes", &
1512 : repeats=.FALSE., &
1513 : n_var=1, &
1514 : default_l_val=.FALSE., &
1515 1481 : lone_keyword_l_val=.TRUE.)
1516 1481 : CALL section_add_keyword(print_key, keyword)
1517 1481 : CALL keyword_release(keyword)
1518 : CALL keyword_create( &
1519 : keyword, __LOCATION__, &
1520 : name="PRINT_ALL", &
1521 : description="Print all information including the full symmetrically orthogonalised density matrix", &
1522 : usage="PRINT_ALL yes", &
1523 : repeats=.FALSE., &
1524 : n_var=1, &
1525 : default_l_val=.FALSE., &
1526 1481 : lone_keyword_l_val=.TRUE.)
1527 1481 : CALL section_add_keyword(print_key, keyword)
1528 1481 : CALL keyword_release(keyword)
1529 1481 : CALL section_add_subsection(section, print_key)
1530 1481 : CALL section_release(print_key)
1531 :
1532 : ! Hirshfeld population analysis
1533 : CALL cp_print_key_section_create(print_key, __LOCATION__, "HIRSHFELD", &
1534 : description="Controls the printing of the Hirshfeld (spin) population analysis", &
1535 : print_level=medium_print_level, filename="__STD_OUT__", &
1536 1481 : common_iter_levels=1)
1537 : CALL keyword_create(keyword, __LOCATION__, name="SELF_CONSISTENT", &
1538 : description="Calculate charges from the Hirscheld-I (self_consistent) method."// &
1539 : " This scales only the full shape function, not the added charge as in the original scheme.", &
1540 : usage="SELF_CONSISTENT yes", repeats=.FALSE., n_var=1, &
1541 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1542 1481 : CALL section_add_keyword(print_key, keyword)
1543 1481 : CALL keyword_release(keyword)
1544 : CALL keyword_create(keyword, __LOCATION__, name="SHAPE_FUNCTION", &
1545 : description="Type of shape function used for Hirshfeld partitioning.", &
1546 : usage="SHAPE_FUNCTION {Gaussian,Density}", repeats=.FALSE., n_var=1, &
1547 : default_i_val=shape_function_gaussian, &
1548 : enum_c_vals=s2a("GAUSSIAN", "DENSITY"), &
1549 : enum_desc=s2a("Single Gaussian with Colvalent radius", &
1550 : "Atomic density expanded in multiple Gaussians"), &
1551 1481 : enum_i_vals=[shape_function_gaussian, shape_function_density])
1552 1481 : CALL section_add_keyword(print_key, keyword)
1553 1481 : CALL keyword_release(keyword)
1554 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_CHARGE", &
1555 : description="Charge of atomic partitioning function for Hirshfeld method.", &
1556 : usage="REFERENCE_CHARGE {Atomic,Mulliken}", repeats=.FALSE., n_var=1, &
1557 : default_i_val=ref_charge_atomic, &
1558 : enum_c_vals=s2a("ATOMIC", "MULLIKEN"), &
1559 : enum_desc=s2a("Use atomic core charges", "Calculate Mulliken charges"), &
1560 1481 : enum_i_vals=[ref_charge_atomic, ref_charge_mulliken])
1561 1481 : CALL section_add_keyword(print_key, keyword)
1562 1481 : CALL keyword_release(keyword)
1563 : CALL keyword_create(keyword, __LOCATION__, name="USER_RADIUS", &
1564 : description="Use user defined radii to generate Gaussians."// &
1565 : " These radii are defined by the keyword ATOMIC_RADII", &
1566 : usage="USER_RADIUS yes", repeats=.FALSE., n_var=1, &
1567 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1568 1481 : CALL section_add_keyword(print_key, keyword)
1569 1481 : CALL keyword_release(keyword)
1570 : CALL keyword_create(keyword, __LOCATION__, name="ATOMIC_RADII", &
1571 : description="Defines custom radii to setup the spherical Gaussians.", &
1572 : usage="ATOMIC_RADII {real} {real} {real}", repeats=.FALSE., &
1573 : unit_str="angstrom", &
1574 1481 : type_of_var=real_t, n_var=-1)
1575 1481 : CALL section_add_keyword(print_key, keyword)
1576 1481 : CALL keyword_release(keyword)
1577 1481 : CALL section_add_subsection(section, print_key)
1578 1481 : CALL section_release(print_key)
1579 :
1580 : ! Print EEQ Charges
1581 : CALL cp_print_key_section_create(print_key, __LOCATION__, "EEQ_CHARGES", &
1582 : description="Controls the printing of the EEQ charges", &
1583 : print_level=debug_print_level, filename="__STD_OUT__", &
1584 : common_iter_levels=1, &
1585 5924 : citations=[Pracht2019, Caldeweyher2019, Caldeweyher2020])
1586 1481 : CALL section_add_subsection(section, print_key)
1587 1481 : CALL section_release(print_key)
1588 :
1589 : ! MAO (modified atomic orbital) analysis
1590 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MAO_ANALYSIS", &
1591 : description="Controls the printing of the MAO (modified atomic orbital) analysis", &
1592 : print_level=debug_print_level, filename="__STD_OUT__", &
1593 : common_iter_levels=1, &
1594 4443 : citations=[Heinzmann1976, Ehrhardt1985])
1595 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
1596 : description="Threshold for matrix elements in MAO determination.", &
1597 : usage="EPS_FILTER reps", repeats=.FALSE., n_var=1, &
1598 1481 : default_r_val=1.e-8_dp, type_of_var=real_t)
1599 1481 : CALL section_add_keyword(print_key, keyword)
1600 1481 : CALL keyword_release(keyword)
1601 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_BASIS", &
1602 : description="Basis set used to construct MAO's.", &
1603 : usage="REFERENCE_BASIS {ORBITAL,PRIMITIVE,EXTERNAL}", repeats=.FALSE., n_var=1, &
1604 : default_i_val=mao_basis_orb, &
1605 : enum_c_vals=s2a("ORBITAL", "PRIMITIVE", "EXTERNAL"), &
1606 : enum_desc=s2a("Use standard orbital basis set", "Construct basis from primitives of the orbital basis", &
1607 : "Read external basis (MAO)"), &
1608 1481 : enum_i_vals=[mao_basis_orb, mao_basis_prim, mao_basis_ext])
1609 1481 : CALL section_add_keyword(print_key, keyword)
1610 1481 : CALL keyword_release(keyword)
1611 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_BASIS", &
1612 : description="Print out MAO reference basis.", &
1613 : usage="PRINT_BASIS {logical}", repeats=.FALSE., n_var=1, &
1614 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1615 1481 : CALL section_add_keyword(print_key, keyword)
1616 1481 : CALL keyword_release(keyword)
1617 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_PAO", &
1618 : description="Print out MAO in PAO format to be used for optimization or learning.", &
1619 : usage="PRINT_PAO {logical}", repeats=.FALSE., n_var=1, &
1620 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1621 1481 : CALL section_add_keyword(print_key, keyword)
1622 1481 : CALL keyword_release(keyword)
1623 : CALL keyword_create(keyword, __LOCATION__, name="EPS_GRAD", &
1624 : description="Threshold for gradient in MAO optimization.", &
1625 : usage="EPS_GRAD reps", repeats=.FALSE., n_var=1, &
1626 1481 : default_r_val=1.e-4_dp, type_of_var=real_t)
1627 1481 : CALL section_add_keyword(print_key, keyword)
1628 1481 : CALL keyword_release(keyword)
1629 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FUNCTION", &
1630 : description="Threshold for electron defect in MAO optimization.", &
1631 : usage="EPS_FUNCTION feps", repeats=.FALSE., n_var=1, &
1632 1481 : default_r_val=1.e-3_dp, type_of_var=real_t)
1633 1481 : CALL section_add_keyword(print_key, keyword)
1634 1481 : CALL keyword_release(keyword)
1635 : CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
1636 : description="Maximum allowed iterations for MAO optimization.", &
1637 : usage="MAX_ITER iter", repeats=.FALSE., n_var=1, &
1638 1481 : default_i_val=0, type_of_var=integer_t)
1639 1481 : CALL section_add_keyword(print_key, keyword)
1640 1481 : CALL keyword_release(keyword)
1641 : CALL keyword_create(keyword, __LOCATION__, name="NEGLECT_ABC", &
1642 : description="Neglect 3 atom terms in MAO analysis.", &
1643 : usage="NEGLECT_ABC {logical}", repeats=.FALSE., n_var=1, &
1644 1481 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1645 1481 : CALL section_add_keyword(print_key, keyword)
1646 1481 : CALL keyword_release(keyword)
1647 : CALL keyword_create(keyword, __LOCATION__, name="AB_THRESHOLD", &
1648 : description="Threshold for printing of AB shared electron numbers.", &
1649 : usage="AB_THRESHOLD thr", repeats=.FALSE., n_var=1, &
1650 1481 : default_r_val=1.e-2_dp, type_of_var=real_t)
1651 1481 : CALL section_add_keyword(print_key, keyword)
1652 1481 : CALL keyword_release(keyword)
1653 : CALL keyword_create(keyword, __LOCATION__, name="ABC_THRESHOLD", &
1654 : description="Threshold for printing of ABC shared electron numbers.", &
1655 : usage="ABC_THRESHOLD thr", repeats=.FALSE., n_var=1, &
1656 1481 : default_r_val=1.e-5_dp, type_of_var=real_t)
1657 1481 : CALL section_add_keyword(print_key, keyword)
1658 1481 : CALL keyword_release(keyword)
1659 : CALL keyword_create(keyword, __LOCATION__, name="ANALYZE_UNASSIGNED_CHARGE", &
1660 : description="Calculate atomic contributions to the unassigned charge.", &
1661 : usage="ANALYZE_UNASSIGNED_CHARGE {logical}", repeats=.FALSE., n_var=1, &
1662 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1663 1481 : CALL section_add_keyword(print_key, keyword)
1664 1481 : CALL keyword_release(keyword)
1665 1481 : CALL section_add_subsection(section, print_key)
1666 1481 : CALL section_release(print_key)
1667 :
1668 : !Minimal localized basis analysis
1669 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MINBAS_ANALYSIS", &
1670 : description="Controls the printing of the minimal localized basis analysis", &
1671 : print_level=debug_print_level, filename="__STD_OUT__", &
1672 : common_iter_levels=1, &
1673 2962 : citations=[Lu2004])
1674 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
1675 : description="Threshold for matrix elements in basis determination.", &
1676 : usage="EPS_FILTER reps", repeats=.FALSE., n_var=1, &
1677 1481 : default_r_val=1.e-8_dp, type_of_var=real_t)
1678 1481 : CALL section_add_keyword(print_key, keyword)
1679 1481 : CALL keyword_release(keyword)
1680 : CALL keyword_create(keyword, __LOCATION__, name="FULL_ORTHOGONALIZATION", &
1681 : description="Orthogonalize the localized minimal basis.", &
1682 : usage="FULL_ORTHOGONALIZATION {logical}", repeats=.FALSE., n_var=1, &
1683 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1684 1481 : CALL section_add_keyword(print_key, keyword)
1685 1481 : CALL keyword_release(keyword)
1686 : CALL keyword_create(keyword, __LOCATION__, name="BOND_ORDER", &
1687 : description="Calculate Mayer Bond Orders.", &
1688 : usage="BOND_ORDER {logical}", repeats=.FALSE., n_var=1, &
1689 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1690 1481 : CALL section_add_keyword(print_key, keyword)
1691 1481 : CALL keyword_release(keyword)
1692 :
1693 1481 : NULLIFY (sub_print_key)
1694 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "MINBAS_CUBE", &
1695 : description="Write the minimal basis on Cube files.", &
1696 1481 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MINBAS")
1697 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
1698 : description="The stride (X,Y,Z) used to write the cube file "// &
1699 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1700 : " 1 number valid for all components.", &
1701 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1702 1481 : CALL section_add_keyword(sub_print_key, keyword)
1703 1481 : CALL keyword_release(keyword)
1704 : CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
1705 : description="Indexes of the atoms minimal basis to be printed as cube files "// &
1706 : "This keyword can be repeated several times "// &
1707 : "(useful if you have to specify many indexes).", &
1708 : usage="ATOM_LIST 1 2", &
1709 1481 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
1710 1481 : CALL section_add_keyword(sub_print_key, keyword)
1711 1481 : CALL keyword_release(keyword)
1712 1481 : CALL section_add_subsection(print_key, sub_print_key)
1713 1481 : CALL section_release(sub_print_key)
1714 :
1715 1481 : NULLIFY (sub_print_key)
1716 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "MINBAS_MOLDEN", &
1717 : description="Write the minimal basis in Molden file format, for visualisation.", &
1718 1481 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MINBAS")
1719 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
1720 : description="Unit for coordinates and cell in the MOLDEN file.", &
1721 : usage="UNIT ANGSTROM", &
1722 : enum_c_vals=s2a("BOHR", "ANGSTROM"), &
1723 : enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
1724 : enum_i_vals=[1, 2], &
1725 1481 : default_i_val=1)
1726 1481 : CALL section_add_keyword(sub_print_key, keyword)
1727 1481 : CALL keyword_release(keyword)
1728 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_CELL", &
1729 : description="Controls whether the [Cell] block is written to the MOLDEN file.", &
1730 : usage="WRITE_CELL T", &
1731 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1732 1481 : CALL section_add_keyword(sub_print_key, keyword)
1733 1481 : CALL keyword_release(keyword)
1734 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_PSEUDO", &
1735 : description="Controls whether the [Pseudo] block is written to the MOLDEN file.", &
1736 : usage="WRITE_PSEUDO T", &
1737 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1738 1481 : CALL section_add_keyword(sub_print_key, keyword)
1739 1481 : CALL keyword_release(keyword)
1740 : CALL keyword_create(keyword, __LOCATION__, name="MARK_GHOST", &
1741 : description="Controls whether ghost atoms are marked in the [Atoms] block by "// &
1742 : "setting their atomic number to zero.", &
1743 : usage="MARK_GHOST T", &
1744 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1745 1481 : CALL section_add_keyword(sub_print_key, keyword)
1746 1481 : CALL keyword_release(keyword)
1747 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
1748 : description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
1749 : usage="NDIGITS {int}", &
1750 1481 : default_i_val=3)
1751 1481 : CALL section_add_keyword(sub_print_key, keyword)
1752 1481 : CALL keyword_release(keyword)
1753 : CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
1754 : description="Representation of Gaussian-type orbitals", &
1755 : default_i_val=gto_spherical, &
1756 : enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
1757 : enum_desc=s2a( &
1758 : "Cartesian Gaussian orbitals. Use with caution", &
1759 : "Spherical Gaussian orbitals. Incompatible with VMD"), &
1760 1481 : enum_i_vals=[gto_cartesian, gto_spherical])
1761 1481 : CALL section_add_keyword(sub_print_key, keyword)
1762 1481 : CALL keyword_release(keyword)
1763 1481 : CALL section_add_subsection(print_key, sub_print_key)
1764 1481 : CALL section_release(sub_print_key)
1765 :
1766 1481 : CALL section_add_subsection(section, print_key)
1767 1481 : CALL section_release(print_key)
1768 :
1769 : !Energy Decomposition Analysis
1770 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY_DECOMPOSITION_ANALYSIS", &
1771 : description="Controls energy decomposition analysis", &
1772 : print_level=debug_print_level, filename="__STD_OUT__", &
1773 : common_iter_levels=1, &
1774 2962 : citations=[Eriksen2020])
1775 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_ORB_CANONICAL", &
1776 : description="Use reference orbitals in canonical form.", &
1777 : usage="REFERENCE_ORB_CANONICAL {logical}", repeats=.FALSE., n_var=1, &
1778 1481 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1779 1481 : CALL section_add_keyword(print_key, keyword)
1780 1481 : CALL keyword_release(keyword)
1781 : CALL keyword_create(keyword, __LOCATION__, name="SKIP_LOCALIZATION", &
1782 : description="Don't localize the MOs.", &
1783 : usage="SKIP_LOCALIZATION {logical}", repeats=.FALSE., n_var=1, &
1784 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1785 1481 : CALL section_add_keyword(print_key, keyword)
1786 1481 : CALL keyword_release(keyword)
1787 : CALL keyword_create(keyword, __LOCATION__, name="DETAILED_ENERGY", &
1788 : description="Calculate detailed atomic decomposition energies.", &
1789 : usage="DETAILED_ENERGY {logical}", repeats=.FALSE., n_var=1, &
1790 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1791 1481 : CALL section_add_keyword(print_key, keyword)
1792 1481 : CALL keyword_release(keyword)
1793 : CALL keyword_create(keyword, __LOCATION__, name="EWALD_ALPHA_PARAMETER", &
1794 : description="Calculate Energy Decomposition for a specific alpha value. "// &
1795 : "alpha = 1/(2*rc**2), see GTH pseudopotentials.", &
1796 : usage="EWALD_ALPHA_PARAMETER alpha", repeats=.FALSE., n_var=1, &
1797 1481 : default_r_val=0.0_dp, type_of_var=real_t)
1798 1481 : CALL section_add_keyword(print_key, keyword)
1799 1481 : CALL keyword_release(keyword)
1800 :
1801 1481 : CALL section_add_subsection(section, print_key)
1802 1481 : CALL section_release(print_key)
1803 :
1804 : ! IAO (Intrinsic atomic orbital) analysis
1805 : CALL cp_print_key_section_create(print_key, __LOCATION__, "IAO_ANALYSIS", &
1806 : description="Controls the printing of the IAO (intrinsic atomic orbital) analysis", &
1807 : print_level=debug_print_level, filename="__STD_OUT__", &
1808 : common_iter_levels=1, &
1809 2962 : citations=[Knizia2013])
1810 : CALL keyword_create(keyword, __LOCATION__, name="EPS_SVD", &
1811 : description="Threshold for matrix inversion eigenvalues.", &
1812 : usage="EPS_SVD reps", repeats=.FALSE., n_var=1, &
1813 1481 : default_r_val=0.0_dp, type_of_var=real_t)
1814 1481 : CALL section_add_keyword(print_key, keyword)
1815 1481 : CALL keyword_release(keyword)
1816 : CALL keyword_create(keyword, __LOCATION__, name="EPS_OCC", &
1817 : description="Threshold in occupation for vectors included.", &
1818 : usage="EPS_OCC reps", repeats=.FALSE., n_var=1, &
1819 1481 : default_r_val=0.0_dp, type_of_var=real_t)
1820 1481 : CALL section_add_keyword(print_key, keyword)
1821 1481 : CALL keyword_release(keyword)
1822 : CALL keyword_create(keyword, __LOCATION__, name="ATOMIC_CHARGES", &
1823 : description="Calculate atomic charges from IAO.", &
1824 : usage="ATOMIC_CHARGES {logical}", repeats=.FALSE., n_var=1, &
1825 1481 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
1826 1481 : CALL section_add_keyword(print_key, keyword)
1827 1481 : CALL keyword_release(keyword)
1828 : ! IAO_MOLDEN
1829 1481 : NULLIFY (sub_print_key)
1830 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "IAO_MOLDEN", &
1831 : description="Write the IAO basis in Molden file format, for visualisation.", &
1832 1481 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="IAOBAS")
1833 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
1834 : description="Unit for coordinates and cell in the MOLDEN file.", &
1835 : usage="UNIT ANGSTROM", &
1836 : enum_c_vals=s2a("BOHR", "ANGSTROM"), &
1837 : enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
1838 : enum_i_vals=[1, 2], &
1839 1481 : default_i_val=1)
1840 1481 : CALL section_add_keyword(sub_print_key, keyword)
1841 1481 : CALL keyword_release(keyword)
1842 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_CELL", &
1843 : description="Controls whether the [Cell] block is written to the MOLDEN file.", &
1844 : usage="WRITE_CELL T", &
1845 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1846 1481 : CALL section_add_keyword(sub_print_key, keyword)
1847 1481 : CALL keyword_release(keyword)
1848 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_PSEUDO", &
1849 : description="Controls whether the [Pseudo] block is written to the MOLDEN file.", &
1850 : usage="WRITE_PSEUDO T", &
1851 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1852 1481 : CALL section_add_keyword(sub_print_key, keyword)
1853 1481 : CALL keyword_release(keyword)
1854 : CALL keyword_create(keyword, __LOCATION__, name="MARK_GHOST", &
1855 : description="Controls whether ghost atoms are marked in the [Atoms] block by "// &
1856 : "setting their atomic number to zero.", &
1857 : usage="MARK_GHOST T", &
1858 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1859 1481 : CALL section_add_keyword(sub_print_key, keyword)
1860 1481 : CALL keyword_release(keyword)
1861 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
1862 : description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
1863 : usage="NDIGITS {int}", &
1864 1481 : default_i_val=3)
1865 1481 : CALL section_add_keyword(sub_print_key, keyword)
1866 1481 : CALL keyword_release(keyword)
1867 : CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
1868 : description="Representation of Gaussian-type orbitals", &
1869 : default_i_val=gto_spherical, &
1870 : enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
1871 : enum_desc=s2a( &
1872 : "Cartesian Gaussian orbitals. Use with caution", &
1873 : "Spherical Gaussian orbitals. Incompatible with VMD"), &
1874 1481 : enum_i_vals=[gto_cartesian, gto_spherical])
1875 1481 : CALL section_add_keyword(sub_print_key, keyword)
1876 1481 : CALL keyword_release(keyword)
1877 1481 : CALL section_add_subsection(print_key, sub_print_key)
1878 1481 : CALL section_release(sub_print_key)
1879 : ! IAO_CUBES
1880 1481 : NULLIFY (sub_print_key)
1881 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "IAO_CUBES", &
1882 : description="Controls the printing of the IAO basis "// &
1883 : "as *.cube files.", &
1884 : print_level=high_print_level, common_iter_levels=1, &
1885 1481 : add_last=add_last_numeric, filename="")
1886 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
1887 : description="The stride (X,Y,Z) used to write the cube file "// &
1888 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1889 : " 1 number valid for all components.", &
1890 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1891 1481 : CALL section_add_keyword(sub_print_key, keyword)
1892 1481 : CALL keyword_release(keyword)
1893 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1894 : description="append the cube files when they already exist", &
1895 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1896 1481 : CALL section_add_keyword(sub_print_key, keyword)
1897 1481 : CALL keyword_release(keyword)
1898 : CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
1899 : description="Indices of the atoms to be included in basis CUBE file printing. ", &
1900 : usage="ATOM_LIST {integer} {integer} .. {integer} ", &
1901 1481 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
1902 1481 : CALL section_add_keyword(sub_print_key, keyword)
1903 1481 : CALL keyword_release(keyword)
1904 1481 : CALL section_add_subsection(print_key, sub_print_key)
1905 1481 : CALL section_release(sub_print_key)
1906 : ! One Center Expansion of IAO
1907 1481 : NULLIFY (sub_print_key)
1908 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "ONE_CENTER_EXPANSION", &
1909 : description="Calculates single center expansion of IAOs ", &
1910 : print_level=high_print_level, common_iter_levels=1, &
1911 1481 : add_last=add_last_numeric, filename="")
1912 : CALL keyword_create(keyword, __LOCATION__, name="LMAX", &
1913 : description="Maximum l quantum number used in the expansion.", &
1914 1481 : usage="LMAX 2", n_var=1, default_i_val=3, type_of_var=integer_t)
1915 1481 : CALL section_add_keyword(sub_print_key, keyword)
1916 1481 : CALL keyword_release(keyword)
1917 : CALL keyword_create(keyword, __LOCATION__, name="NBAS", &
1918 : description="Max number of basis functions used in the expansion."// &
1919 : " Default is determined by the orbital basis set.", &
1920 1481 : usage="NBAS 10", n_var=1, default_i_val=-1, type_of_var=integer_t)
1921 1481 : CALL section_add_keyword(sub_print_key, keyword)
1922 1481 : CALL keyword_release(keyword)
1923 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
1924 : description="Append the OCE basis files when it already exists", &
1925 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1926 1481 : CALL section_add_keyword(sub_print_key, keyword)
1927 1481 : CALL keyword_release(keyword)
1928 1481 : CALL section_add_subsection(print_key, sub_print_key)
1929 1481 : CALL section_release(sub_print_key)
1930 : ! Intrinsic Bond orbitals
1931 1481 : NULLIFY (sub_print_key)
1932 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "BOND_ORBITALS", &
1933 : description="Calculate intrinsic bond orbitals using "// &
1934 : "localized MOs in IAO basis.", &
1935 : print_level=high_print_level, common_iter_levels=1, &
1936 1481 : add_last=add_last_numeric, filename="")
1937 :
1938 : CALL keyword_create(keyword, __LOCATION__, name="LOCALIZATION_OPERATOR", &
1939 : description="Operator to be optimized for orbital localization", &
1940 : enum_c_vals=s2a("PIPEK_MEZEY", "PIPEK_MEZEY_4", "L1NORM"), &
1941 : enum_i_vals=[do_iaoloc_pm2, do_iaoloc_pm4, do_iaoloc_l1], &
1942 : enum_desc=s2a("Use Pipek-Mezey operator (order 2)", &
1943 : "Use Pipek-Mezey operator (order 4)", &
1944 : "Use L1 norm"), &
1945 1481 : default_i_val=do_iaoloc_pm2)
1946 1481 : CALL section_add_keyword(sub_print_key, keyword)
1947 1481 : CALL keyword_release(keyword)
1948 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_LOCALIZATION_FUNCTION", &
1949 : description="Function for energy localization: f(e_i), e_i orbital energy", &
1950 : enum_c_vals=s2a("NONE", "ENERGY", "OCCUPATION"), &
1951 : enum_i_vals=[do_iaoloc_enone, do_iaoloc_energy, do_iaoloc_occ], &
1952 : enum_desc=s2a("Don't use energy localization.", &
1953 : "Use orbital energies for localization.", &
1954 : "Use occupation numbers for localization."), &
1955 1481 : default_i_val=do_iaoloc_enone)
1956 1481 : CALL section_add_keyword(sub_print_key, keyword)
1957 1481 : CALL keyword_release(keyword)
1958 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_LOCALIZATION_WEIGHT", &
1959 : description="Weight given to energy localization, using f(e_i) function", &
1960 : usage="ENERGY_LOCALIZATION_WEIGHT 0.1", n_var=1, &
1961 1481 : default_r_val=0.0_dp, type_of_var=real_t)
1962 1481 : CALL section_add_keyword(sub_print_key, keyword)
1963 1481 : CALL keyword_release(keyword)
1964 :
1965 : ! CHARGE CENTER AND SPREAD
1966 1481 : NULLIFY (subsection)
1967 : CALL cp_print_key_section_create(subsection, __LOCATION__, "CHARGE_CENTER", &
1968 : description="Calculation and printing of centers and spreads "// &
1969 : "of localized orbitals.", &
1970 : print_level=high_print_level, common_iter_levels=1, &
1971 1481 : add_last=add_last_numeric, filename="")
1972 : CALL keyword_create(keyword, __LOCATION__, name="POSITION_OPERATOR_BERRY", &
1973 : description="Use Berry phase position operator.", &
1974 : usage="POSITION_OPERATOR_BERRY T", n_var=1, &
1975 1481 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1976 1481 : CALL section_add_keyword(subsection, keyword)
1977 1481 : CALL keyword_release(keyword)
1978 1481 : CALL section_add_subsection(sub_print_key, subsection)
1979 1481 : CALL section_release(subsection)
1980 : ! IBO_MOLDEN
1981 1481 : NULLIFY (subsection)
1982 : CALL cp_print_key_section_create(subsection, __LOCATION__, "IBO_MOLDEN", &
1983 : description="Write the IBO orbitals in Molden file format, for visualisation.", &
1984 1481 : print_level=debug_print_level + 1, add_last=add_last_numeric, filename="IBOBAS")
1985 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
1986 : description="Unit for coordinates and cell in the MOLDEN file.", &
1987 : usage="UNIT ANGSTROM", &
1988 : enum_c_vals=s2a("BOHR", "ANGSTROM"), &
1989 : enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
1990 : enum_i_vals=[1, 2], &
1991 1481 : default_i_val=1)
1992 1481 : CALL section_add_keyword(subsection, keyword)
1993 1481 : CALL keyword_release(keyword)
1994 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_CELL", &
1995 : description="Controls whether the [Cell] block is written to the MOLDEN file.", &
1996 : usage="WRITE_CELL T", &
1997 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1998 1481 : CALL section_add_keyword(subsection, keyword)
1999 1481 : CALL keyword_release(keyword)
2000 : CALL keyword_create(keyword, __LOCATION__, name="WRITE_PSEUDO", &
2001 : description="Controls whether the [Pseudo] block is written to the MOLDEN file.", &
2002 : usage="WRITE_PSEUDO T", &
2003 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2004 1481 : CALL section_add_keyword(subsection, keyword)
2005 1481 : CALL keyword_release(keyword)
2006 : CALL keyword_create(keyword, __LOCATION__, name="MARK_GHOST", &
2007 : description="Controls whether ghost atoms are marked in the [Atoms] block by "// &
2008 : "setting their atomic number to zero.", &
2009 : usage="MARK_GHOST T", &
2010 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2011 1481 : CALL section_add_keyword(subsection, keyword)
2012 1481 : CALL keyword_release(keyword)
2013 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
2014 : description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
2015 : usage="NDIGITS {int}", &
2016 1481 : default_i_val=3)
2017 1481 : CALL section_add_keyword(subsection, keyword)
2018 1481 : CALL keyword_release(keyword)
2019 : CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
2020 : description="Representation of Gaussian-type orbitals", &
2021 : default_i_val=gto_spherical, &
2022 : enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
2023 : enum_desc=s2a( &
2024 : "Cartesian Gaussian orbitals. Use with caution", &
2025 : "Spherical Gaussian orbitals. Incompatible with VMD"), &
2026 1481 : enum_i_vals=[gto_cartesian, gto_spherical])
2027 1481 : CALL section_add_keyword(subsection, keyword)
2028 1481 : CALL keyword_release(keyword)
2029 1481 : CALL section_add_subsection(sub_print_key, subsection)
2030 1481 : CALL section_release(subsection)
2031 : ! IAO_CUBES
2032 1481 : NULLIFY (subsection)
2033 : CALL cp_print_key_section_create(subsection, __LOCATION__, "IBO_CUBES", &
2034 : description="Controls the printing of the IBO orbitals "// &
2035 : "as *.cube files.", &
2036 : print_level=high_print_level, common_iter_levels=1, &
2037 1481 : add_last=add_last_numeric, filename="")
2038 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2039 : description="The stride (X,Y,Z) used to write the cube file "// &
2040 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
2041 : " 1 number valid for all components.", &
2042 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
2043 1481 : CALL section_add_keyword(subsection, keyword)
2044 1481 : CALL keyword_release(keyword)
2045 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2046 : description="append the cube files when they already exist", &
2047 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2048 1481 : CALL section_add_keyword(subsection, keyword)
2049 1481 : CALL keyword_release(keyword)
2050 : CALL keyword_create(keyword, __LOCATION__, name="STATE_LIST", &
2051 : description="Indices of the orbitals to be included in IBO CUBE file printing. ", &
2052 : usage="STATE_LIST {integer} {integer} .. {integer} ", &
2053 1481 : n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
2054 1481 : CALL section_add_keyword(subsection, keyword)
2055 1481 : CALL keyword_release(keyword)
2056 :
2057 1481 : CALL section_add_subsection(sub_print_key, subsection)
2058 1481 : CALL section_release(subsection)
2059 1481 : CALL section_add_subsection(print_key, sub_print_key)
2060 1481 : CALL section_release(sub_print_key)
2061 :
2062 1481 : NULLIFY (sub_print_key)
2063 : CALL cp_print_key_section_create(sub_print_key, __LOCATION__, name="IAO_OVERLAP", &
2064 : description="Controls the printout required for ROSE.", &
2065 1481 : print_level=debug_print_level, filename="CP2K_ROSE")
2066 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
2067 : description="Specify the number of digits used to print the MO information.", &
2068 1481 : default_i_val=6)
2069 1481 : CALL section_add_keyword(sub_print_key, keyword)
2070 1481 : CALL keyword_release(keyword)
2071 1481 : CALL section_add_subsection(print_key, sub_print_key)
2072 1481 : CALL section_release(sub_print_key)
2073 :
2074 1481 : CALL section_add_subsection(section, print_key)
2075 1481 : CALL section_release(print_key)
2076 : ! END OF IAO_ANALYSIS SECTION
2077 :
2078 : !DOS from density matrix
2079 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY_WINDOWS", &
2080 : description="Controls the printing of the DOS from the density matrix. "// &
2081 : "This allows the calculation of the DOS even in density matrix based "// &
2082 : "REAL_TIME_PROPAGATION and LS_SCF. "// &
2083 : "However, it requires a cubically scaling diagonalization of the Hamiltonian. "// &
2084 : "Hartree-Fock NYI, values will be wrong. "// &
2085 : "Careful, the orbitals in rtp/emd are not actually eigenstates of the Hamiltonian. "// &
2086 : "Assumes absence of spin polarization (so far).", &
2087 : print_level=high_print_level, common_iter_levels=3, &
2088 : each_iter_names=s2a("MD"), each_iter_values=[100], &
2089 1481 : add_last=add_last_numeric, filename="energy-windows")
2090 : CALL keyword_create(keyword, __LOCATION__, name="N_WINDOWS", &
2091 : description="The number of energy windows.", &
2092 : usage="N_WINDOWS 200", &
2093 1481 : default_i_val=100)
2094 1481 : CALL section_add_keyword(print_key, keyword)
2095 1481 : CALL keyword_release(keyword)
2096 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
2097 : description="Filtering threshold for sparse matrix operations.", &
2098 : usage="EPS_FILTER 1.0E-6", &
2099 1481 : default_r_val=1.0E-14_dp)
2100 1481 : CALL section_add_keyword(print_key, keyword)
2101 1481 : CALL keyword_release(keyword)
2102 : CALL keyword_create(keyword, __LOCATION__, name="RESTRICT_RANGE", &
2103 : description="Restricts the energy windows to states close to the fermi level", &
2104 : usage="RESTRICT_RANGE .TRUE.", &
2105 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2106 1481 : CALL section_add_keyword(print_key, keyword)
2107 1481 : CALL keyword_release(keyword)
2108 : CALL keyword_create(keyword, __LOCATION__, name="RANGE", &
2109 : description="If the RESTRICT_RANGE keyword is set, then all energy widnows will"// &
2110 : " be placed in an interval from from the fermi level minus to the fermi level plus this keyword", &
2111 : usage="RANGE 1", &
2112 1481 : default_r_val=1.0_dp)
2113 1481 : CALL section_add_keyword(print_key, keyword)
2114 1481 : CALL keyword_release(keyword)
2115 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_CUBES", &
2116 : description="Print the energy windows to cube files", &
2117 : usage="PRINT_CUBES .TRUE.", &
2118 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2119 1481 : CALL section_add_keyword(print_key, keyword)
2120 1481 : CALL keyword_release(keyword)
2121 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2122 : description="The stride (X,Y,Z) used to write the energy windows cube files (if enabled) "// &
2123 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
2124 : " 1 number valid for all components.", &
2125 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
2126 1481 : CALL section_add_keyword(print_key, keyword)
2127 1481 : CALL keyword_release(keyword)
2128 1481 : CALL section_add_subsection(section, print_key)
2129 1481 : CALL section_release(print_key)
2130 :
2131 : ! Hamiltonian in CSR format
2132 : CALL cp_print_key_section_create(print_key, __LOCATION__, "KS_CSR_WRITE", &
2133 : description="Write the KS matrix in CSR format into a file.", &
2134 1481 : print_level=debug_print_level, filename="")
2135 : CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
2136 : description="Threshold on the absolute value of the elements to be printed out. "// &
2137 : "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
2138 : "if the block contains at least one non-zero element.", &
2139 : usage="THRESHOLD {real}", &
2140 : repeats=.FALSE., &
2141 1481 : default_r_val=0.0_dp)
2142 1481 : CALL section_add_keyword(print_key, keyword)
2143 1481 : CALL keyword_release(keyword)
2144 : CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
2145 : description="Print only the upper triangular part of the matrix. ", &
2146 : usage="UPPER_TRIANGULAR {logical}", &
2147 : repeats=.FALSE., &
2148 : default_l_val=.FALSE., &
2149 1481 : lone_keyword_l_val=.TRUE.)
2150 1481 : CALL section_add_keyword(print_key, keyword)
2151 1481 : CALL keyword_release(keyword)
2152 : CALL keyword_create(keyword, __LOCATION__, name="Binary", &
2153 : description="Whether or not to generate the file in a binary format. ", &
2154 : usage="BINARY {logical}", &
2155 : repeats=.FALSE., &
2156 : default_l_val=.FALSE., &
2157 1481 : lone_keyword_l_val=.TRUE.)
2158 1481 : CALL section_add_keyword(print_key, keyword)
2159 1481 : CALL keyword_release(keyword)
2160 : CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
2161 : description="Print the KS matrix in real-space instead of k-space.. ", &
2162 : usage="REAL_SPACE {logical}", &
2163 : repeats=.FALSE., &
2164 : default_l_val=.FALSE., &
2165 1481 : lone_keyword_l_val=.TRUE.)
2166 1481 : CALL section_add_keyword(print_key, keyword)
2167 1481 : CALL keyword_release(keyword)
2168 1481 : CALL section_add_subsection(section, print_key)
2169 1481 : CALL section_release(print_key)
2170 :
2171 : ! Overlap in CSR format
2172 : CALL cp_print_key_section_create(print_key, __LOCATION__, "S_CSR_WRITE", &
2173 : description="Write the overlap matrix in CSR format into a file.", &
2174 1481 : print_level=debug_print_level, filename="")
2175 : CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
2176 : description="Threshold on the absolute value of the elements to be printed out. "// &
2177 : "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
2178 : "if the block contains at least one non-zero element.", &
2179 : usage="THRESHOLD {real}", &
2180 : repeats=.FALSE., &
2181 1481 : default_r_val=0.0_dp)
2182 1481 : CALL section_add_keyword(print_key, keyword)
2183 1481 : CALL keyword_release(keyword)
2184 : CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
2185 : description="Print only the upper triangular part of the matrix. ", &
2186 : usage="UPPER_TRIANGULAR {logical}", &
2187 : repeats=.FALSE., &
2188 : default_l_val=.FALSE., &
2189 1481 : lone_keyword_l_val=.TRUE.)
2190 1481 : CALL section_add_keyword(print_key, keyword)
2191 1481 : CALL keyword_release(keyword)
2192 : CALL keyword_create(keyword, __LOCATION__, name="Binary", &
2193 : description="Whether or not to generate the file in a binary format. ", &
2194 : usage="BINARY {logical}", &
2195 : repeats=.FALSE., &
2196 : default_l_val=.FALSE., &
2197 1481 : lone_keyword_l_val=.TRUE.)
2198 1481 : CALL section_add_keyword(print_key, keyword)
2199 1481 : CALL keyword_release(keyword)
2200 : CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
2201 : description="Print the overlap matrix in real-space instead of k-space.. ", &
2202 : usage="REAL_SPACE {logical}", &
2203 : repeats=.FALSE., &
2204 : default_l_val=.FALSE., &
2205 1481 : lone_keyword_l_val=.TRUE.)
2206 1481 : CALL section_add_keyword(print_key, keyword)
2207 1481 : CALL keyword_release(keyword)
2208 1481 : CALL section_add_subsection(section, print_key)
2209 1481 : CALL section_release(print_key)
2210 :
2211 : ! Core Hamiltonian in CSR format
2212 : CALL cp_print_key_section_create(print_key, __LOCATION__, "HCORE_CSR_WRITE", &
2213 : description="Write the core Hamiltonian matrix in CSR format into a file.", &
2214 1481 : print_level=debug_print_level, filename="")
2215 : CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
2216 : description="Threshold on the absolute value of the elements to be printed out. "// &
2217 : "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
2218 : "if the block contains at least one non-zero element.", &
2219 : usage="THRESHOLD {real}", &
2220 : repeats=.FALSE., &
2221 1481 : default_r_val=0.0_dp)
2222 1481 : CALL section_add_keyword(print_key, keyword)
2223 1481 : CALL keyword_release(keyword)
2224 : CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
2225 : description="Print only the upper triangular part of the matrix. ", &
2226 : usage="UPPER_TRIANGULAR {logical}", &
2227 : repeats=.FALSE., &
2228 : default_l_val=.FALSE., &
2229 1481 : lone_keyword_l_val=.TRUE.)
2230 1481 : CALL section_add_keyword(print_key, keyword)
2231 1481 : CALL keyword_release(keyword)
2232 : CALL keyword_create(keyword, __LOCATION__, name="Binary", &
2233 : description="Whether or not to generate the file in a binary format. ", &
2234 : usage="BINARY {logical}", &
2235 : repeats=.FALSE., &
2236 : default_l_val=.FALSE., &
2237 1481 : lone_keyword_l_val=.TRUE.)
2238 1481 : CALL section_add_keyword(print_key, keyword)
2239 1481 : CALL keyword_release(keyword)
2240 : CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
2241 : description="Print the core Hamiltonian matrix in real-space instead of k-space.. ", &
2242 : usage="REAL_SPACE {logical}", &
2243 : repeats=.FALSE., &
2244 : default_l_val=.FALSE., &
2245 1481 : lone_keyword_l_val=.TRUE.)
2246 1481 : CALL section_add_keyword(print_key, keyword)
2247 1481 : CALL keyword_release(keyword)
2248 1481 : CALL section_add_subsection(section, print_key)
2249 1481 : CALL section_release(print_key)
2250 :
2251 : ! Density Matrix in CSR format
2252 : CALL cp_print_key_section_create(print_key, __LOCATION__, "P_CSR_WRITE", &
2253 : description="Write the density matrix in CSR format into a file.", &
2254 1481 : print_level=debug_print_level, filename="")
2255 : CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
2256 : description="Threshold on the absolute value of the elements to be printed out. "// &
2257 : "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
2258 : "if the block contains at least one non-zero element.", &
2259 : usage="THRESHOLD {real}", &
2260 : repeats=.FALSE., &
2261 1481 : default_r_val=0.0_dp)
2262 1481 : CALL section_add_keyword(print_key, keyword)
2263 1481 : CALL keyword_release(keyword)
2264 : CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
2265 : description="Print only the upper triangular part of the matrix. ", &
2266 : usage="UPPER_TRIANGULAR {logical}", &
2267 : repeats=.FALSE., &
2268 : default_l_val=.FALSE., &
2269 1481 : lone_keyword_l_val=.TRUE.)
2270 1481 : CALL section_add_keyword(print_key, keyword)
2271 1481 : CALL keyword_release(keyword)
2272 : CALL keyword_create(keyword, __LOCATION__, name="Binary", &
2273 : description="Whether or not to generate the file in a binary format. ", &
2274 : usage="BINARY {logical}", &
2275 : repeats=.FALSE., &
2276 : default_l_val=.FALSE., &
2277 1481 : lone_keyword_l_val=.TRUE.)
2278 1481 : CALL section_add_keyword(print_key, keyword)
2279 1481 : CALL keyword_release(keyword)
2280 : CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
2281 : description="Print the density matrix in real-space instead of k-space.. ", &
2282 : usage="REAL_SPACE {logical}", &
2283 : repeats=.FALSE., &
2284 : default_l_val=.FALSE., &
2285 1481 : lone_keyword_l_val=.TRUE.)
2286 1481 : CALL section_add_keyword(print_key, keyword)
2287 1481 : CALL keyword_release(keyword)
2288 1481 : CALL section_add_subsection(section, print_key)
2289 1481 : CALL section_release(print_key)
2290 :
2291 : ! interaction adjacency matrix
2292 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ADJMAT_WRITE", &
2293 : description="Writes an (upper-triangular) adjacency matrix indicating the "// &
2294 : "interaction between atoms (according to overlapping basis functions). The "// &
2295 : "columns are: iatom, jatom, ikind, jkind; where iatom and jatom are the atom "// &
2296 : "indices (based on the coordinate file), ikind and jkind are the atomic kinds "// &
2297 : "(indeces as shown in the ATOMIC KIND INFORMATION section of a CP2K output). ", &
2298 1481 : print_level=debug_print_level, filename="")
2299 1481 : CALL section_add_subsection(section, print_key)
2300 1481 : CALL section_release(print_key)
2301 :
2302 : ! Xray diffraction
2303 : CALL cp_print_key_section_create( &
2304 : print_key, __LOCATION__, name="XRAY_DIFFRACTION_SPECTRUM", &
2305 : description="Calculate and print the coherent X-ray "// &
2306 : "diffraction spectrum", &
2307 : print_level=debug_print_level, &
2308 : filename="", &
2309 4443 : citations=[Krack2000, Krack2002])
2310 : CALL keyword_create( &
2311 : keyword, __LOCATION__, &
2312 : name="Q_MAX", &
2313 : variants=["Q_MAXIMUM"], &
2314 : description="Maximum Q value calculated for the spectrum", &
2315 : usage="Q_MAX {real}", &
2316 : repeats=.FALSE., &
2317 : n_var=1, &
2318 : type_of_var=real_t, &
2319 : default_r_val=cp_unit_to_cp2k(value=20.0_dp, &
2320 : unit_str="angstrom^-1"), &
2321 2962 : unit_str="angstrom^-1")
2322 1481 : CALL section_add_keyword(print_key, keyword)
2323 1481 : CALL keyword_release(keyword)
2324 1481 : CALL section_add_subsection(section, print_key)
2325 1481 : CALL section_release(print_key)
2326 :
2327 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="ELECTRIC_FIELD_GRADIENT", &
2328 : description="Calculate and print the electric field gradients "// &
2329 : "at atomic positions", &
2330 : print_level=debug_print_level, &
2331 1481 : filename="__STD_OUT__")
2332 :
2333 : CALL keyword_create(keyword, __LOCATION__, &
2334 : name="INTERPOLATION", &
2335 : description="Use interpolation method from real space grid", &
2336 : usage="INTERPOLATION {logical}", &
2337 : repeats=.FALSE., &
2338 : n_var=1, &
2339 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2340 1481 : CALL section_add_keyword(print_key, keyword)
2341 1481 : CALL keyword_release(keyword)
2342 :
2343 : CALL keyword_create(keyword, __LOCATION__, &
2344 : name="GSPACE_SMOOTHING", &
2345 : description="Use a G-space smoothing function", &
2346 : usage="GSPACE_SMOOTHING cutoff {real}, width {real}", &
2347 : repeats=.FALSE., &
2348 : n_var=2, default_r_vals=[-1._dp, -1._dp], &
2349 1481 : type_of_var=real_t)
2350 1481 : CALL section_add_keyword(print_key, keyword)
2351 1481 : CALL keyword_release(keyword)
2352 :
2353 : CALL keyword_create(keyword, __LOCATION__, &
2354 : name="DEBUG", &
2355 : description="Print additional debug output", &
2356 : usage="DEBUG {logical}", &
2357 : repeats=.FALSE., &
2358 : n_var=1, &
2359 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2360 1481 : CALL section_add_keyword(print_key, keyword)
2361 1481 : CALL keyword_release(keyword)
2362 :
2363 1481 : CALL create_gspace_interp_section(subsection)
2364 1481 : CALL section_add_subsection(print_key, subsection)
2365 1481 : CALL section_release(subsection)
2366 :
2367 1481 : CALL section_add_subsection(section, print_key)
2368 1481 : CALL section_release(print_key)
2369 :
2370 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="BASIS_MOLOPT_QUANTITIES", &
2371 : description="Print the two quantities needed in the basis molopt generation:"// &
2372 : " total energy and condition number of the overlap matrix (S matrix)", &
2373 : print_level=debug_print_level, &
2374 1481 : filename="__STD_OUT__")
2375 1481 : CALL section_add_subsection(section, print_key)
2376 1481 : CALL section_release(print_key)
2377 :
2378 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="HYPERFINE_COUPLING_TENSOR", &
2379 : description="Calculate and print the EPR hyperfine coupling tensor"// &
2380 : " at atomic positions", &
2381 : print_level=debug_print_level, &
2382 1481 : filename="__STD_OUT__")
2383 :
2384 : CALL keyword_create(keyword, __LOCATION__, &
2385 : name="INTERACTION_RADIUS", &
2386 : description="Radius of interaction for EPR hyperfine tensor calculation", &
2387 : usage="INTERACTION_RADIUS radius {real}", &
2388 : repeats=.FALSE., &
2389 : n_var=1, default_r_val=10._dp, &
2390 1481 : type_of_var=real_t)
2391 1481 : CALL section_add_keyword(print_key, keyword)
2392 1481 : CALL keyword_release(keyword)
2393 :
2394 1481 : CALL section_add_subsection(section, print_key)
2395 1481 : CALL section_release(print_key)
2396 :
2397 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="OPTIMIZE_LRI_BASIS", &
2398 : description="Optimize the exponents of the LRI basis set", &
2399 : print_level=low_print_level, &
2400 1481 : filename="OPTIMIZED_LRI_BASIS")
2401 1481 : CALL section_add_subsection(section, print_key)
2402 1481 : CALL section_release(print_key)
2403 :
2404 : CALL cp_print_key_section_create( &
2405 : print_key, __LOCATION__, name="PLUS_U", &
2406 : description="Controls the printing for the DFT+U methods", &
2407 : print_level=high_print_level, &
2408 : filename="__STD_OUT__", &
2409 : each_iter_names=s2a("QS_SCF"), &
2410 : each_iter_values=[0], &
2411 4443 : citations=[Dudarev1997, Dudarev1998])
2412 1481 : CALL section_add_subsection(section, print_key)
2413 1481 : CALL section_release(print_key)
2414 :
2415 : CALL cp_print_key_section_create( &
2416 : print_key, __LOCATION__, name="CHARGEMOL", &
2417 : description="Write a Gaussian-orbital .wfx file for external Chargemol analysis. "// &
2418 : "For all-electron calculations, the file includes core and valence electrons. "// &
2419 : "OT output requires uniform occupied-orbital occupations within each spin channel. "// &
2420 : "It uses private canonical occupied orbitals and leaves the SCF state unchanged. "// &
2421 : "Only Gamma-point (un)restricted HF and Kohn-Sham wavefunctions are supported.", &
2422 : print_level=debug_print_level + 1, &
2423 : filename="CHARGEMOL", &
2424 1481 : add_last=add_last_numeric, do_backup=.TRUE.)
2425 : CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
2426 : description="Write information about cell periodicity.", &
2427 : usage="PERIODIC {LOGICAL}", &
2428 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2429 1481 : CALL section_add_keyword(print_key, keyword)
2430 1481 : CALL keyword_release(keyword)
2431 1481 : CALL section_add_subsection(section, print_key)
2432 1481 : CALL section_release(print_key)
2433 :
2434 : CALL cp_print_key_section_create( &
2435 : print_key, __LOCATION__, name="SCCS", &
2436 : description="Controls the printing for the SCCS models", &
2437 : print_level=high_print_level, &
2438 : filename="__STD_OUT__", &
2439 : each_iter_names=s2a("QS_SCF"), &
2440 : each_iter_values=[0], &
2441 5924 : citations=[Fattebert2002, Andreussi2012, Yin2017])
2442 :
2443 1481 : NULLIFY (sub_print_key)
2444 :
2445 : CALL cp_print_key_section_create( &
2446 : sub_print_key, __LOCATION__, name="DENSITY_GRADIENT", &
2447 : description="Controls the printing of the cube files with "// &
2448 : "the norm of the density gradient |∇ρ| "// &
2449 : "used by the SCCS model.", &
2450 : print_level=debug_print_level, &
2451 : filename="", &
2452 : each_iter_names=s2a("QS_SCF"), &
2453 1481 : each_iter_values=[0])
2454 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2455 : description="The stride (X,Y,Z) used to write the cube file "// &
2456 : "(larger values result in smaller cube files). You can provide 3 "// &
2457 : "numbers (for X,Y,Z) or 1 number valid for all components.", &
2458 : n_var=-1, &
2459 : default_i_vals=[2, 2, 2], &
2460 : type_of_var=integer_t, &
2461 1481 : repeats=.FALSE.)
2462 1481 : CALL section_add_keyword(sub_print_key, keyword)
2463 1481 : CALL keyword_release(keyword)
2464 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2465 : description="Append the cube files when they already exist", &
2466 : default_l_val=.FALSE., &
2467 : lone_keyword_l_val=.TRUE., &
2468 1481 : repeats=.FALSE.)
2469 1481 : CALL section_add_keyword(sub_print_key, keyword)
2470 1481 : CALL keyword_release(keyword)
2471 1481 : CALL section_add_subsection(print_key, sub_print_key)
2472 1481 : CALL section_release(sub_print_key)
2473 :
2474 : CALL cp_print_key_section_create( &
2475 : sub_print_key, __LOCATION__, name="DIELECTRIC_FUNCTION", &
2476 : description="Controls the printing of the cube files with "// &
2477 : "the dielectric function used by the SCCS model. "// &
2478 : "This function determines the cavity formed by a solute in "// &
2479 : "a solvent and thus it can be used for the visualisaton of the cavity.", &
2480 : print_level=debug_print_level, &
2481 : filename="", &
2482 : each_iter_names=s2a("QS_SCF"), &
2483 : each_iter_values=[0], &
2484 5924 : citations=[Fattebert2002, Andreussi2012, Yin2017])
2485 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2486 : description="The stride (X,Y,Z) used to write the cube file "// &
2487 : "(larger values result in smaller cube files). You can provide 3 "// &
2488 : "numbers (for X,Y,Z) or 1 number valid for all components.", &
2489 : n_var=-1, &
2490 : default_i_vals=[2, 2, 2], &
2491 : type_of_var=integer_t, &
2492 1481 : repeats=.FALSE.)
2493 1481 : CALL section_add_keyword(sub_print_key, keyword)
2494 1481 : CALL keyword_release(keyword)
2495 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2496 : description="Append the cube files when they already exist", &
2497 : default_l_val=.FALSE., &
2498 : lone_keyword_l_val=.TRUE., &
2499 1481 : repeats=.FALSE.)
2500 1481 : CALL section_add_keyword(sub_print_key, keyword)
2501 1481 : CALL keyword_release(keyword)
2502 1481 : CALL section_add_subsection(print_key, sub_print_key)
2503 1481 : CALL section_release(sub_print_key)
2504 :
2505 : CALL cp_print_key_section_create( &
2506 : sub_print_key, __LOCATION__, name="TOTAL_CHARGE_DENSITY", &
2507 : description="Controls the printing of the cube files with the "// &
2508 : "total charge density $\rho^\text{tot}$ used by the SCCS model.", &
2509 : print_level=debug_print_level, &
2510 : filename="", &
2511 : each_iter_names=s2a("QS_SCF"), &
2512 : each_iter_values=[0], &
2513 5924 : citations=[Fattebert2002, Andreussi2012, Yin2017])
2514 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2515 : description="The stride (X,Y,Z) used to write the cube file "// &
2516 : "(larger values result in smaller cube files). You can provide 3 "// &
2517 : "numbers (for X,Y,Z) or 1 number valid for all components.", &
2518 : n_var=-1, &
2519 : default_i_vals=[2, 2, 2], &
2520 : type_of_var=integer_t, &
2521 1481 : repeats=.FALSE.)
2522 1481 : CALL section_add_keyword(sub_print_key, keyword)
2523 1481 : CALL keyword_release(keyword)
2524 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2525 : description="Append the cube files when they already exist", &
2526 : default_l_val=.FALSE., &
2527 : lone_keyword_l_val=.TRUE., &
2528 1481 : repeats=.FALSE.)
2529 1481 : CALL section_add_keyword(sub_print_key, keyword)
2530 1481 : CALL keyword_release(keyword)
2531 1481 : CALL section_add_subsection(print_key, sub_print_key)
2532 1481 : CALL section_release(sub_print_key)
2533 :
2534 : CALL cp_print_key_section_create( &
2535 : sub_print_key, __LOCATION__, name="POLARISATION_CHARGE_DENSITY", &
2536 : description="Controls the printing of the cube files with the "// &
2537 : "polarisation charge density $\rho^\text{pol}$ used by the SCCS model with the "// &
2538 : "total charge density $\rho^\text{tot} = \rho^\text{sol} + \rho^\text{pol}", &
2539 : print_level=debug_print_level, &
2540 : filename="", &
2541 : each_iter_names=s2a("QS_SCF"), &
2542 : each_iter_values=[0], &
2543 5924 : citations=[Fattebert2002, Andreussi2012, Yin2017])
2544 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2545 : description="The stride (X,Y,Z) used to write the cube file "// &
2546 : "(larger values result in smaller cube files). You can provide 3 "// &
2547 : "numbers (for X,Y,Z) or 1 number valid for all components.", &
2548 : n_var=-1, &
2549 : default_i_vals=[2, 2, 2], &
2550 : type_of_var=integer_t, &
2551 1481 : repeats=.FALSE.)
2552 1481 : CALL section_add_keyword(sub_print_key, keyword)
2553 1481 : CALL keyword_release(keyword)
2554 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2555 : description="Append the cube files when they already exist", &
2556 : default_l_val=.FALSE., &
2557 : lone_keyword_l_val=.TRUE., &
2558 1481 : repeats=.FALSE.)
2559 1481 : CALL section_add_keyword(sub_print_key, keyword)
2560 1481 : CALL keyword_release(keyword)
2561 1481 : CALL section_add_subsection(print_key, sub_print_key)
2562 1481 : CALL section_release(sub_print_key)
2563 :
2564 : CALL cp_print_key_section_create( &
2565 : sub_print_key, __LOCATION__, name="POLARISATION_POTENTIAL", &
2566 : description="Controls the printing of the cube files with the "// &
2567 : "polarisation potential $\phi^\text{pol}$ used by the SCCS model with the "// &
2568 : "total potential $\phi^\text{tot} = \phi^\text{sol} + \phi^\text{pol}$", &
2569 : print_level=debug_print_level, &
2570 : filename="", &
2571 : each_iter_names=s2a("QS_SCF"), &
2572 : each_iter_values=[0], &
2573 5924 : citations=[Fattebert2002, Andreussi2012, Yin2017])
2574 : CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
2575 : description="The stride (X,Y,Z) used to write the cube file "// &
2576 : "(larger values result in smaller cube files). You can provide 3 "// &
2577 : "numbers (for X,Y,Z) or 1 number valid for all components.", &
2578 : n_var=-1, &
2579 : default_i_vals=[2, 2, 2], &
2580 : type_of_var=integer_t, &
2581 1481 : repeats=.FALSE.)
2582 1481 : CALL section_add_keyword(sub_print_key, keyword)
2583 1481 : CALL keyword_release(keyword)
2584 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2585 : description="Append the cube files when they already exist", &
2586 : default_l_val=.FALSE., &
2587 : lone_keyword_l_val=.TRUE., &
2588 1481 : repeats=.FALSE.)
2589 1481 : CALL section_add_keyword(sub_print_key, keyword)
2590 1481 : CALL keyword_release(keyword)
2591 1481 : CALL section_add_subsection(print_key, sub_print_key)
2592 1481 : CALL section_release(sub_print_key)
2593 :
2594 1481 : CALL section_add_subsection(section, print_key)
2595 1481 : CALL section_release(print_key)
2596 :
2597 1481 : END SUBROUTINE create_print_dft_section
2598 :
2599 : ! **************************************************************************************************
2600 : !> \brief ...
2601 : !> \param section ...
2602 : !> \author JGH
2603 : ! **************************************************************************************************
2604 1481 : SUBROUTINE create_bandstructure_section(section)
2605 : TYPE(section_type), POINTER :: section
2606 :
2607 : TYPE(keyword_type), POINTER :: keyword
2608 : TYPE(section_type), POINTER :: subsection
2609 :
2610 1481 : CPASSERT(.NOT. ASSOCIATED(section))
2611 : CALL section_create(section, __LOCATION__, name="BAND_STRUCTURE", &
2612 : description="Specifies the k-points used in band structure calculation.", &
2613 1481 : n_keywords=0, n_subsections=0, repeats=.FALSE.)
2614 :
2615 1481 : NULLIFY (keyword)
2616 : CALL keyword_create(keyword, __LOCATION__, name="FILE_NAME", &
2617 : description="File name used for band structure", &
2618 : usage="FILE_NAME <filename>", default_c_val="", &
2619 1481 : type_of_var=char_t, n_var=1)
2620 1481 : CALL section_add_keyword(section, keyword)
2621 1481 : CALL keyword_release(keyword)
2622 :
2623 : CALL keyword_create(keyword, __LOCATION__, name="ADDED_MOS", &
2624 : variants=["ADDED_BANDS"], &
2625 : description="Number of MOs/Bands added to the Band Structure calculation.", &
2626 2962 : default_i_val=0)
2627 1481 : CALL section_add_keyword(section, keyword)
2628 1481 : CALL keyword_release(keyword)
2629 :
2630 1481 : NULLIFY (subsection)
2631 1481 : CALL create_kpoint_set_section(subsection)
2632 1481 : CALL section_add_subsection(section, subsection)
2633 1481 : CALL section_release(subsection)
2634 :
2635 1481 : END SUBROUTINE create_bandstructure_section
2636 :
2637 4443 : SUBROUTINE add_generic_openpmd_arguments(print_key)
2638 : TYPE(section_type), POINTER :: print_key
2639 :
2640 : TYPE(keyword_type), POINTER :: keyword
2641 4443 : NULLIFY (keyword)
2642 :
2643 : CALL keyword_create(keyword, __LOCATION__, name="OPENPMD_EXTENSION", &
2644 : description="Filename extension for openPMD files, including the dot and "// &
2645 : "(for optionally activating file encoding) a file expansion pattern.", &
2646 : default_c_val="_%06T."//cp_openpmd_get_default_extension(), &
2647 4443 : type_of_var=char_t)
2648 4443 : CALL section_add_keyword(print_key, keyword)
2649 4443 : CALL keyword_release(keyword)
2650 :
2651 : CALL keyword_create(keyword, __LOCATION__, name="OPENPMD_CFG", &
2652 : description="Inline runtime config for openPMD output. Note that inline "// &
2653 : "specifications are subject to restrictions imposed by the input "// &
2654 : "file format, making this option useful only for very simple use cases. "// &
2655 : "Refer to OPENPMD_CFG_FILE for anything else.", &
2656 4443 : default_c_val="{}", type_of_var=char_t)
2657 4443 : CALL section_add_keyword(print_key, keyword)
2658 4443 : CALL keyword_release(keyword)
2659 :
2660 : CALL keyword_create(keyword, __LOCATION__, name="OPENPMD_CFG_FILE", &
2661 : description="Runtime config file for openPMD output. This parameter takes precedence over OPENPMD_CFG.", default_c_val="", &
2662 4443 : type_of_var=char_t)
2663 4443 : CALL section_add_keyword(print_key, keyword)
2664 4443 : CALL keyword_release(keyword)
2665 :
2666 4443 : END SUBROUTINE add_generic_openpmd_arguments
2667 :
2668 : ! **************************************************************************************************
2669 : !> \brief creates the input section for dealing with homo lumos, including dumping cubes
2670 : !> \param print_key ...
2671 : ! **************************************************************************************************
2672 2962 : SUBROUTINE create_mo_section( &
2673 : print_key, section_name, description, stride_default, stride_usage, &
2674 : print_level, do_write_keyname)
2675 :
2676 : TYPE(section_type), POINTER :: print_key
2677 : CHARACTER(len=*), INTENT(IN) :: section_name, description, stride_usage, do_write_keyname
2678 : INTEGER, DIMENSION(3), INTENT(IN) :: stride_default
2679 : INTEGER, INTENT(IN) :: print_level
2680 :
2681 : TYPE(keyword_type), POINTER :: keyword
2682 :
2683 2962 : NULLIFY (keyword)
2684 :
2685 : CALL cp_print_key_section_create(print_key, __LOCATION__, section_name, &
2686 : description="Controls the printing of the molecular orbitals (MOs) as " &
2687 : //TRIM(ADJUSTL(description))// &
2688 : " files."// &
2689 : " It can be used during a Real Time calculation to print the MOs."// &
2690 : " In this case, the density corresponding to the time dependent MO is printed"// &
2691 : " instead of the wave-function.", &
2692 2962 : print_level=print_level, filename="")
2693 :
2694 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
2695 : description="The stride (X,Y,Z) used to write the "//TRIM(ADJUSTL(description))//" file "// &
2696 : "(larger values result in smaller "// &
2697 : TRIM(ADJUSTL(description))// &
2698 : " files). You can provide 3 numbers (for X,Y,Z) or"// &
2699 : " 1 number valid for all components.", &
2700 2962 : usage=stride_usage, n_var=-1, default_i_vals=stride_default, type_of_var=integer_t)
2701 2962 : CALL section_add_keyword(print_key, keyword)
2702 2962 : CALL keyword_release(keyword)
2703 :
2704 : CALL keyword_create(keyword, __LOCATION__, name=do_write_keyname, &
2705 : description="If the MO " &
2706 : //TRIM(ADJUSTL(description)) &
2707 : //" file should be written. If false, the eigenvalues are still computed."// &
2708 : " Can also be useful in combination with STM calculations", &
2709 2962 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
2710 2962 : CALL section_add_keyword(print_key, keyword)
2711 2962 : CALL keyword_release(keyword)
2712 :
2713 : CALL keyword_create(keyword, __LOCATION__, name="nlumo", &
2714 : description="If the printkey is activated controls the number of lumos"// &
2715 : " that are printed and dumped as "//TRIM(ADJUSTL(description))//" (-1=all)", &
2716 2962 : default_i_val=0)
2717 2962 : CALL section_add_keyword(print_key, keyword)
2718 2962 : CALL keyword_release(keyword)
2719 :
2720 : CALL keyword_create( &
2721 : keyword, __LOCATION__, name="nhomo", &
2722 : description="If the printkey is activated controls the number of homos that dumped as "// &
2723 : TRIM(ADJUSTL(description))// &
2724 : " (-1=all),"// &
2725 : " eigenvalues are always all dumped", &
2726 2962 : default_i_val=1)
2727 2962 : CALL section_add_keyword(print_key, keyword)
2728 2962 : CALL keyword_release(keyword)
2729 :
2730 : CALL keyword_create( &
2731 : keyword, __LOCATION__, name="homo_list", &
2732 : description="If the printkey is activated controls the index of homos dumped as openPMD,"// &
2733 : " eigenvalues are always all dumped. It overrides nhomo.", &
2734 : usage="HOMO_LIST {integer} {integer} .. {integer} ", type_of_var=integer_t, &
2735 2962 : n_var=-1, repeats=.TRUE.)
2736 2962 : CALL section_add_keyword(print_key, keyword)
2737 2962 : CALL keyword_release(keyword)
2738 :
2739 2962 : END SUBROUTINE create_mo_section
2740 :
2741 2962 : SUBROUTINE create_e_density_section( &
2742 : print_key, section_name, description, stride_default, &
2743 : stride_usage, print_level)
2744 :
2745 : TYPE(section_type), POINTER :: print_key
2746 : CHARACTER(len=*), INTENT(IN) :: section_name, description, stride_usage
2747 : INTEGER, DIMENSION(3), INTENT(IN) :: stride_default
2748 : INTEGER, INTENT(IN) :: print_level
2749 :
2750 : TYPE(keyword_type), POINTER :: keyword
2751 :
2752 2962 : NULLIFY (keyword)
2753 :
2754 : CALL cp_print_key_section_create(print_key, __LOCATION__, name=section_name, &
2755 : description="Controls the printing of "//TRIM(ADJUSTL(description))//" files with "// &
2756 : "the electronic density and, for LSD calculations, the spin density.", &
2757 2962 : print_level=print_level, filename="")
2758 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
2759 : description="The stride (X,Y,Z) used to write the "//TRIM(ADJUSTL(description))//" file "// &
2760 : "(larger values result in smaller "// &
2761 : TRIM(ADJUSTL(description))// &
2762 : " files). You can provide 3 numbers (for X,Y,Z) or"// &
2763 : " 1 number valid for all components.", &
2764 2962 : usage=stride_usage, n_var=-1, default_i_vals=stride_default, type_of_var=integer_t)
2765 2962 : CALL section_add_keyword(print_key, keyword)
2766 2962 : CALL keyword_release(keyword)
2767 :
2768 : CALL keyword_create(keyword, __LOCATION__, name="DENSITY_INCLUDE", &
2769 : description="Which parts of the density to include. In GAPW the electronic density "// &
2770 : "is divided into a hard and a soft component, and the default (TOTAL_HARD_APPROX) "// &
2771 : "is to approximate the hard density as a spherical gaussian and to print the smooth "// &
2772 : "density accurately. This avoids potential artefacts originating from the hard density. "// &
2773 : "If the TOTAL_DENSITY keyword is used the hard density will be computed more accurately "// &
2774 : "but may introduce non-physical features. The SOFT_DENSITY keyword will lead to only the "// &
2775 : "soft density being printed. In GPW these options have no effect and the cube file will "// &
2776 : "only contain the valence electron density. In all-electron GAPW, hard+soft contains "// &
2777 : "all electrons. The soft part is not a valence-only density and need not integrate "// &
2778 : "to the chemical valence electron count. Use CHARGEMOL for a Gaussian-orbital export "// &
2779 : "that avoids representing core peaks on a regular grid.", &
2780 : usage="DENSITY_INCLUDE TOTAL_HARD_APPROX", &
2781 : enum_c_vals=s2a("TOTAL_HARD_APPROX", "TOTAL_DENSITY", "SOFT_DENSITY"), &
2782 : enum_desc=s2a("Print (hard+soft) density where the hard components shape is approximated", &
2783 : "Print (hard+soft) density. Only has an effect "// &
2784 : "if PAW atoms are present. NOTE: The total "// &
2785 : "in real space might exhibit unphysical features "// &
2786 : "like spikes due to the finite and thus "// &
2787 : "truncated g vector", &
2788 : "Print only the soft density"), &
2789 : enum_i_vals=[e_dens_total_hard_approx, &
2790 : e_dens_total_density, &
2791 : e_dens_soft_density], &
2792 2962 : default_i_val=e_dens_total_hard_approx)
2793 2962 : CALL section_add_keyword(print_key, keyword)
2794 2962 : CALL keyword_release(keyword)
2795 :
2796 2962 : END SUBROUTINE create_e_density_section
2797 :
2798 : ! **************************************************************************************************
2799 : !> \brief Helper to create ELF print sections (cube or openPMD)
2800 : !> \param print_key section handle (output)
2801 : !> \param section_name name of the section (e.g. "ELF_CUBE" or "ELF_OPENPMD")
2802 : !> \param description Either "cube" or "openPMD", for the descriptions.
2803 : !> \param stride_default default stride values
2804 : !> \param stride_usage usage string for stride
2805 : !> \param print_level print level
2806 : !> \param filename output filename (empty string for default)
2807 2962 : SUBROUTINE create_elf_print_section( &
2808 : print_key, section_name, description, stride_default, stride_usage, print_level, filename)
2809 :
2810 : TYPE(section_type), POINTER :: print_key
2811 : CHARACTER(len=*), INTENT(IN) :: section_name, description, stride_usage, filename
2812 : INTEGER, DIMENSION(3), INTENT(IN) :: stride_default
2813 : INTEGER, INTENT(IN) :: print_level
2814 : TYPE(keyword_type), POINTER :: keyword
2815 :
2816 2962 : NULLIFY (keyword)
2817 :
2818 : CALL cp_print_key_section_create(print_key, __LOCATION__, section_name, &
2819 : description="Controls printing of "//TRIM(ADJUSTL(description))// &
2820 : " files with the electron localization function (ELF). "// &
2821 : "Note that the value of ELF is defined between 0 and 1: "// &
2822 : "Pauli kinetic energy density normalized by the kinetic energy density "// &
2823 2962 : "of a uniform el. gas of same density.", print_level=print_level, filename=filename)
2824 :
2825 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
2826 : description="The stride (X,Y,Z) used to write the file (larger values result in smaller files). "// &
2827 : "You can provide 3 numbers (for X,Y,Z) or 1 number valid for all components.", &
2828 2962 : usage=stride_usage, n_var=-1, default_i_vals=stride_default, type_of_var=integer_t)
2829 2962 : CALL section_add_keyword(print_key, keyword)
2830 2962 : CALL keyword_release(keyword)
2831 :
2832 : CALL keyword_create(keyword, __LOCATION__, name="density_cutoff", &
2833 : description=" ", usage="density_cutoff 0.0001", repeats=.FALSE., n_var=1, &
2834 2962 : type_of_var=real_t, default_r_val=1.0e-10_dp)
2835 2962 : CALL section_add_keyword(print_key, keyword)
2836 2962 : CALL keyword_release(keyword)
2837 2962 : END SUBROUTINE create_elf_print_section
2838 :
2839 : ! **************************************************************************************************
2840 : !> \brief Add projected-DOS related keywords to a DOS or XAS PDOS print section.
2841 : !> \param print_key print key section to add keywords to
2842 : !> \param xas_mode if true, add keywords for the XAS-specific standalone PDOS section
2843 : ! **************************************************************************************************
2844 5905 : SUBROUTINE add_dos_keywords(print_key, xas_mode)
2845 :
2846 : TYPE(section_type), POINTER :: print_key
2847 : LOGICAL, INTENT(IN) :: xas_mode
2848 :
2849 : TYPE(keyword_type), POINTER :: keyword
2850 : TYPE(section_type), POINTER :: broaden_subsection, pdos_section, subsection
2851 :
2852 5905 : NULLIFY (broaden_subsection, pdos_section, subsection)
2853 5905 : NULLIFY (keyword)
2854 :
2855 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
2856 : description="Append the DOS/PDOS obtained at different iterations to the output file. "// &
2857 : "By default the file is overwritten", &
2858 5905 : usage="APPEND", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2859 5905 : CALL section_add_keyword(print_key, keyword)
2860 5905 : CALL keyword_release(keyword)
2861 :
2862 : CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
2863 : description="Specify the number of digits used to print DOS/PDOS values.", &
2864 5905 : default_i_val=6)
2865 5905 : CALL section_add_keyword(print_key, keyword)
2866 5905 : CALL keyword_release(keyword)
2867 :
2868 : CALL keyword_create(keyword, __LOCATION__, name="DELTA_E", &
2869 : description="Energy spacing of the DOS/PDOS output grid.", &
2870 5905 : usage="DELTA_E 0.0005", type_of_var=real_t, default_r_val=0.001_dp)
2871 5905 : CALL section_add_keyword(print_key, keyword)
2872 5905 : CALL keyword_release(keyword)
2873 :
2874 : CALL keyword_create(keyword, __LOCATION__, name="NLUMO", &
2875 : description="Number of unoccupied orbitals to include in the DOS/PDOS (-1=all). "// &
2876 : "For OT calculations, the requested virtual orbitals are generated after SCF using the "// &
2877 : "OT eigensolver. For diagonalization calculations, SCF%ADDED_MOS is increased if needed "// &
2878 : "to make the requested unoccupied orbitals available.", &
2879 5905 : usage="NLUMO integer", default_i_val=0)
2880 5905 : CALL section_add_keyword(print_key, keyword)
2881 5905 : CALL keyword_release(keyword)
2882 :
2883 5905 : IF (.NOT. xas_mode) THEN
2884 : CALL section_create(pdos_section, __LOCATION__, name="PDOS", &
2885 : description="Controls the printing of kind-resolved projected DOS.", &
2886 1481 : n_keywords=1, n_subsections=0)
2887 : ELSE
2888 4424 : pdos_section => print_key
2889 : END IF
2890 : CALL keyword_create(keyword, __LOCATION__, name="COMPONENTS", &
2891 : description="Print out PDOS distinguishing all angular momentum components.", &
2892 5905 : usage="COMPONENTS", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2893 5905 : CALL section_add_keyword(pdos_section, keyword)
2894 5905 : CALL keyword_release(keyword)
2895 5905 : IF (.NOT. xas_mode) THEN
2896 1481 : CALL section_add_subsection(print_key, pdos_section)
2897 1481 : CALL section_release(pdos_section)
2898 : END IF
2899 :
2900 : CALL section_create(subsection, __LOCATION__, name="CURVE", &
2901 : description="Controls the printing of broadened DOS/PDOS curves.", &
2902 5905 : n_keywords=2, n_subsections=1, repeats=.FALSE.)
2903 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_UNIT", &
2904 : description="Energy unit used for the printed DOS/PDOS energy axis. "// &
2905 : "Intensities are converted consistently to the selected energy unit.", &
2906 : usage="ENERGY_UNIT HARTREE", type_of_var=enum_t, &
2907 : enum_c_vals=s2a("HARTREE", "EV"), &
2908 : enum_i_vals=[1, 2], &
2909 : enum_desc=s2a("Print energies in Hartree (a.u.).", &
2910 : "Print energies in electronvolt."), &
2911 5905 : default_i_val=1)
2912 5905 : CALL section_add_keyword(subsection, keyword)
2913 5905 : CALL keyword_release(keyword)
2914 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_ZERO", &
2915 : description="Reference energy used for the printed DOS/PDOS energy axis. "// &
2916 : "With AUTO, the Fermi energy is used if smearing is enabled or fractional "// &
2917 : "occupations are found; otherwise the highest occupied crystal orbital is used.", &
2918 : usage="ENERGY_ZERO AUTO", type_of_var=enum_t, &
2919 : enum_c_vals=s2a("AUTO", "ABSOLUTE", "FERMI", "HOCO"), &
2920 : enum_i_vals=[1, 2, 3, 4], &
2921 : enum_desc=s2a("Choose FERMI for smeared or fractionally occupied systems, otherwise HOCO.", &
2922 : "Print absolute orbital energies.", &
2923 : "Shift orbital energies by the Fermi energy.", &
2924 : "Shift orbital energies by the highest occupied crystal orbital."), &
2925 5905 : default_i_val=1)
2926 5905 : CALL section_add_keyword(subsection, keyword)
2927 5905 : CALL keyword_release(keyword)
2928 :
2929 : CALL section_create(broaden_subsection, __LOCATION__, name="BROADEN", &
2930 : description="Controls the line shape used for broadened DOS/PDOS curves.", &
2931 5905 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
2932 : CALL keyword_create(keyword, __LOCATION__, name="TYPE", &
2933 : description="Type of broadening function used to produce the DOS/PDOS curve.", &
2934 : usage="TYPE GAUSSIAN", type_of_var=enum_t, &
2935 : enum_c_vals=s2a("GAUSSIAN", "LORENTZIAN", "PSEUDO_VOIGT"), &
2936 : enum_i_vals=[1, 2, 3], &
2937 : enum_desc=s2a("Use a Gaussian broadening function.", &
2938 : "Use a Lorentzian broadening function.", &
2939 : "Use a pseudo-Voigt mixture of Lorentzian and Gaussian functions."), &
2940 5905 : default_i_val=1)
2941 5905 : CALL section_add_keyword(broaden_subsection, keyword)
2942 5905 : CALL keyword_release(keyword)
2943 : CALL keyword_create(keyword, __LOCATION__, name="WIDTH", &
2944 : description="Full width at half maximum (FWHM) of the DOS/PDOS broadening function.", &
2945 : usage="WIDTH [eV] 0.1", type_of_var=real_t, &
2946 5905 : default_r_val=cp_unit_to_cp2k(value=0.1_dp, unit_str="eV"), unit_str="eV")
2947 5905 : CALL section_add_keyword(broaden_subsection, keyword)
2948 5905 : CALL keyword_release(keyword)
2949 : CALL keyword_create(keyword, __LOCATION__, name="VOIGT_MIXING", &
2950 : description="Lorentzian fraction of the pseudo-Voigt broadening function.", &
2951 5905 : usage="VOIGT_MIXING 0.5", type_of_var=real_t, default_r_val=0.5_dp)
2952 5905 : CALL section_add_keyword(broaden_subsection, keyword)
2953 5905 : CALL keyword_release(keyword)
2954 5905 : CALL section_add_subsection(subsection, broaden_subsection)
2955 5905 : CALL section_release(broaden_subsection)
2956 5905 : CALL section_add_subsection(print_key, subsection)
2957 5905 : CALL section_release(subsection)
2958 :
2959 : CALL keyword_create(keyword, __LOCATION__, name="OUT_EACH_STATE", &
2960 : variants=["OUT_EACH_MO"], &
2961 : description="Output on the status of the calculation every OUT_EACH_MO states. If -1 no output", &
2962 11810 : usage="OUT_EACH_STATE integer", default_i_val=-1)
2963 5905 : CALL section_add_keyword(print_key, keyword)
2964 5905 : CALL keyword_release(keyword)
2965 :
2966 : CALL section_create(subsection, __LOCATION__, name="LDOS", &
2967 : description="Controls the printing of local PDOS, projected on subsets"// &
2968 : " of atoms given through lists", &
2969 5905 : n_keywords=4, n_subsections=0, repeats=.TRUE.)
2970 : CALL keyword_create(keyword, __LOCATION__, name="COMPONENTS", &
2971 : description="Print out PDOS distinguishing all angular momentum components.", &
2972 5905 : usage="COMPONENTS", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2973 5905 : CALL section_add_keyword(subsection, keyword)
2974 5905 : CALL keyword_release(keyword)
2975 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
2976 : description="Specifies a list of indexes of atoms where to project the DOS", &
2977 : usage="LIST {integer} {integer} .. {integer}", type_of_var=integer_t, &
2978 5905 : n_var=-1, repeats=.TRUE.)
2979 5905 : CALL section_add_keyword(subsection, keyword)
2980 5905 : CALL keyword_release(keyword)
2981 5905 : CALL section_add_subsection(print_key, subsection)
2982 5905 : CALL section_release(subsection)
2983 :
2984 : CALL section_create(subsection, __LOCATION__, name="R_LDOS", &
2985 : description="Controls the printing of local PDOS, projected on 3D volume in real space, "// &
2986 : "the volume is defined in terms of position with respect to atoms in the lists", &
2987 5905 : n_keywords=4, n_subsections=0, repeats=.TRUE.)
2988 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
2989 : description="Specifies a list of indexes of atoms used to define the real space volume", &
2990 : usage="LIST {integer} {integer} .. {integer}", type_of_var=integer_t, &
2991 5905 : n_var=-1, repeats=.TRUE.)
2992 5905 : CALL section_add_keyword(subsection, keyword)
2993 5905 : CALL keyword_release(keyword)
2994 : CALL keyword_create(keyword, __LOCATION__, name="XRANGE", &
2995 : description="range of positions in Cartesian direction x: all grid points within "// &
2996 : "this range from at least one atom of the list are considered", &
2997 5905 : usage="XRANGE -10.0 10.0", unit_str="angstrom", n_var=2, type_of_var=real_t)
2998 5905 : CALL section_add_keyword(subsection, keyword)
2999 5905 : CALL keyword_release(keyword)
3000 : CALL keyword_create(keyword, __LOCATION__, name="YRANGE", &
3001 : description="range of positions in Cartesian direction y: all grid points within "// &
3002 : "this range from at least one atom of the list are considered", &
3003 5905 : usage="YRANGE -10.0 10.0", unit_str="angstrom", n_var=2, type_of_var=real_t)
3004 5905 : CALL section_add_keyword(subsection, keyword)
3005 5905 : CALL keyword_release(keyword)
3006 : CALL keyword_create(keyword, __LOCATION__, name="ZRANGE", &
3007 : description="range of positions in Cartesian direction z: all grid points within "// &
3008 : "this range from at least one atom of the list are considered", &
3009 5905 : usage="ZRANGE -10.0 10.0", unit_str="angstrom", n_var=2, type_of_var=real_t)
3010 5905 : CALL section_add_keyword(subsection, keyword)
3011 5905 : CALL keyword_release(keyword)
3012 : CALL keyword_create(keyword, __LOCATION__, name="ERANGE", &
3013 : description="Only project states with the energy values in the given interval. "// &
3014 : "Default is all states.", &
3015 5905 : usage="ERANGE -1.0 1.0", unit_str="hartree", n_var=2, type_of_var=real_t)
3016 5905 : CALL section_add_keyword(subsection, keyword)
3017 5905 : CALL keyword_release(keyword)
3018 5905 : CALL section_add_subsection(print_key, subsection)
3019 5905 : CALL section_release(subsection)
3020 :
3021 5905 : END SUBROUTINE add_dos_keywords
3022 :
3023 : ! **************************************************************************************************
3024 : !> \brief Create WANNIER90 print section.
3025 : !> \param print_key print key section to create
3026 : ! **************************************************************************************************
3027 1481 : SUBROUTINE create_wannier_section(print_key)
3028 :
3029 : TYPE(section_type), POINTER :: print_key
3030 :
3031 : TYPE(keyword_type), POINTER :: keyword
3032 :
3033 1481 : NULLIFY (keyword)
3034 :
3035 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WANNIER90", &
3036 : description="Interface to Wannier90 code. (EXPERIMENTAL)", &
3037 1481 : print_level=debug_print_level, common_iter_levels=1, filename="")
3038 :
3039 : CALL keyword_create(keyword, __LOCATION__, name="SEED_NAME", &
3040 : description="The seedname for the Wannier90 calculation (body of filenames).", &
3041 : usage="SEED_NAME filename", default_c_val="wannier90", &
3042 1481 : n_var=1, type_of_var=char_t)
3043 1481 : CALL section_add_keyword(print_key, keyword)
3044 1481 : CALL keyword_release(keyword)
3045 :
3046 : CALL keyword_create(keyword, __LOCATION__, name="SPIN_CHANNEL", &
3047 : description="Collinear spin channel to export or localize. "// &
3048 : "Spin-polarized calculations use separate SEED_NAME_up and SEED_NAME_down files. "// &
3049 : "BOTH runs the channels independently with their respective MO band counts. "// &
3050 : "The numeric values 1 and 2 remain aliases for ALPHA and BETA. "// &
3051 : "With SOC, use the restricted channel ALPHA (1).", &
3052 : usage="SPIN_CHANNEL BOTH", default_i_val=0, n_var=1, type_of_var=enum_t, &
3053 1481 : enum_c_vals=s2a("BOTH", "ALPHA", "BETA", "1", "2"), enum_i_vals=[0, 1, 2, 1, 2])
3054 1481 : CALL section_add_keyword(print_key, keyword)
3055 1481 : CALL keyword_release(keyword)
3056 :
3057 : CALL keyword_create(keyword, __LOCATION__, name="MP_GRID", &
3058 : description="The dimensions of the Monkhorst-Pack k-point grid. ", &
3059 1481 : usage="MP_GRID 6 6 6", n_var=-1, default_i_vals=[10, 10, 10], type_of_var=integer_t)
3060 1481 : CALL section_add_keyword(print_key, keyword)
3061 1481 : CALL keyword_release(keyword)
3062 :
3063 : CALL keyword_create(keyword, __LOCATION__, name="KPOINTS_SOURCE", &
3064 : description="Select the k-point source for the Wannier90 export. MP_GRID keeps "// &
3065 : "the historical behavior and builds a full grid from WANNIER90%MP_GRID. SCF uses "// &
3066 : "the full k-point mesh from DFT%KPOINTS for Monkhorst-Pack, MacDonald, Gamma, or "// &
3067 : "explicit GENERAL k-points. If the SCF calculation uses K290 or SPGLIB symmetry "// &
3068 : "reduction, the corresponding unreduced mesh is used for Wannier90 because "// &
3069 : "Wannier90 requires a complete mesh. NNKP reads explicit k-points and directed "// &
3070 : "overlap connections from NNKP_FILE, without a regular-mesh requirement. "// &
3071 : "WILSON generates and refines a surface of closed loops at the SCF potential. "// &
3072 : "TRIM generates four or eight time-reversal-invariant points for native parity analysis.", &
3073 : usage="KPOINTS_SOURCE MP_GRID", type_of_var=enum_t, &
3074 : enum_c_vals=s2a("MP_GRID", "SCF", "NNKP", "WILSON", "TRIM"), &
3075 : enum_i_vals=[0, 1, 2, 3, 4], &
3076 : enum_desc=s2a("Build the Wannier90 k-point mesh from WANNIER90%MP_GRID.", &
3077 : "Use the full k-point mesh from DFT%KPOINTS.", &
3078 : "Read explicit k-points and connections from NNKP_FILE.", &
3079 : "Generate a family of closed Wilson loops.", &
3080 : "Generate TRIM and enable native inversion-parity analysis."), &
3081 1481 : default_i_val=0)
3082 1481 : CALL section_add_keyword(print_key, keyword)
3083 1481 : CALL keyword_release(keyword)
3084 :
3085 : CALL keyword_create(keyword, __LOCATION__, name="NNKP_FILE", &
3086 : description="Wannier90 nnkp file for KPOINTS_SOURCE NNKP. Required literal block names: "// &
3087 : "real_lattice (Angstrom), recip_lattice (2*pi/Angstrom), kpoints (fractional), "// &
3088 : "and nnkpts (nearest-neighbour point indices and reciprocal lattice shifts). Nonzero exclusions "// &
3089 : "in the file are unsupported; use EXCLUDE_BANDS in CP2K instead.", &
3090 : usage="NNKP_FILE loop.nnkp", default_c_val="wannier90.nnkp", &
3091 1481 : n_var=1, type_of_var=char_t)
3092 1481 : CALL section_add_keyword(print_key, keyword)
3093 1481 : CALL keyword_release(keyword)
3094 :
3095 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_LOOP", &
3096 : description="Compute native SVD-unitarized Wilson loops for NNKP connections. "// &
3097 : "Requires one directed neighbour per point and contiguous, closed loops. "// &
3098 : "Automatically enabled by KPOINTS_SOURCE WILSON.", default_l_val=.FALSE., &
3099 2962 : citations=[Gresch2017])
3100 1481 : CALL section_add_keyword(print_key, keyword)
3101 1481 : CALL keyword_release(keyword)
3102 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_MESH", &
3103 : description="Points per closed loop and number of transverse loops. "// &
3104 : "Only for KPOINTS_SOURCE WILSON; loops include both transverse endpoints.", &
3105 1481 : n_var=2, default_i_vals=[16, 9], type_of_var=integer_t)
3106 1481 : CALL section_add_keyword(print_key, keyword)
3107 1481 : CALL keyword_release(keyword)
3108 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_ORIGIN", &
3109 : description="Origin of Wilson surface in fractional reciprocal coordinates.", &
3110 1481 : n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp], type_of_var=real_t)
3111 1481 : CALL section_add_keyword(print_key, keyword)
3112 1481 : CALL keyword_release(keyword)
3113 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_DIRECTION", &
3114 : description="Integer reciprocal vector along each closed Wilson loop.", &
3115 1481 : n_var=3, default_i_vals=[1, 0, 0], type_of_var=integer_t)
3116 1481 : CALL section_add_keyword(print_key, keyword)
3117 1481 : CALL keyword_release(keyword)
3118 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_TRANSVERSE", &
3119 : description="Fractional reciprocal vector spanning the transverse surface. "// &
3120 : "For Z2 choose a time-reversal half-plane, e.g. 0 0.5 0.", &
3121 1481 : n_var=3, default_r_vals=[0.0_dp, 0.5_dp, 0.0_dp], type_of_var=real_t)
3122 1481 : CALL section_add_keyword(print_key, keyword)
3123 1481 : CALL keyword_release(keyword)
3124 : CALL keyword_create(keyword, __LOCATION__, name="Z2", &
3125 : description="Compute native largest-gap crossing parity on a WILSON half-surface. "// &
3126 : "Requires SOC, a nonmagnetic time-reversal-invariant Hamiltonian, an isolated "// &
3127 : "occupied subspace, and converged Wilson spectra. TIME_REVERSAL must be set.", &
3128 4443 : default_l_val=.FALSE., citations=[Soluyanov2011, Gresch2017])
3129 1481 : CALL section_add_keyword(print_key, keyword)
3130 1481 : CALL keyword_release(keyword)
3131 : CALL keyword_create(keyword, __LOCATION__, name="CHERN", &
3132 : description="Compute the native first Chern number from determinant Wilson winding. "// &
3133 : "Requires KPOINTS_SOURCE WILSON and a closed full surface with integer transverse "// &
3134 : "winding, e.g. WILSON_TRANSVERSE 0 1 0. Not compatible with Z2 half-surfaces. "// &
3135 : "The selected bands must be isolated; SOC and time reversal are not required.", &
3136 2962 : default_l_val=.FALSE., citations=[Gresch2017])
3137 1481 : CALL section_add_keyword(print_key, keyword)
3138 1481 : CALL keyword_release(keyword)
3139 : CALL keyword_create(keyword, __LOCATION__, name="PARITY", &
3140 : description="Compute native even/odd inversion irreps at explicit TRIM. Uses the Gaussian "// &
3141 : "AO metric, orbital parities, atom permutations and Bloch lattice phases. Validates the "// &
3142 : "selected representation and its energy commutator. No Z2Pack or Wannier fit is needed.", &
3143 1481 : default_l_val=.FALSE.)
3144 1481 : CALL section_add_keyword(print_key, keyword)
3145 1481 : CALL keyword_release(keyword)
3146 : CALL keyword_create(keyword, __LOCATION__, name="INVERSION_TQC", &
3147 : description="Enable PARITY and classify the inversion-subgroup symmetry signature of "// &
3148 : "the occupied spinor bands. Requires SOC and TIME_REVERSAL and all four/eight TRIM. "// &
3149 : "Reports Fu-Kane indices, 3D Z4, and an exact signed/nonnegative atomic EBR-signature test. "// &
3150 : "Not a full-space-group TQC classifier or a certificate of a bulk gap/trivial topology.", &
3151 1481 : default_l_val=.FALSE.)
3152 1481 : CALL section_add_keyword(print_key, keyword)
3153 1481 : CALL keyword_release(keyword)
3154 : CALL keyword_create(keyword, __LOCATION__, name="TQC_DIMENSION", &
3155 : description="Dimension of the inversion analysis: 2 uses the four kz=0 TRIM; "// &
3156 : "3 uses all eight TRIM of the supplied reciprocal cell. All cell directions must be periodic.", &
3157 1481 : default_i_val=3)
3158 1481 : CALL section_add_keyword(print_key, keyword)
3159 1481 : CALL keyword_release(keyword)
3160 : CALL keyword_create(keyword, __LOCATION__, name="PARITY_ORIGIN", &
3161 : description="Inversion center in fractional direct-cell coordinates. The operation is "// &
3162 : "r -> 2*center-r. Atomic kinds, basis and the selected Hamiltonian subspace must be invariant.", &
3163 1481 : n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp], type_of_var=real_t)
3164 1481 : CALL section_add_keyword(print_key, keyword)
3165 1481 : CALL keyword_release(keyword)
3166 : CALL keyword_create(keyword, __LOCATION__, name="PARITY_TOLERANCE", &
3167 : description="Tolerance for parity metric, subspace and character checks. Also used "// &
3168 : "as the inversion geometry tolerance in Bohr. Tighten with numerical convergence.", &
3169 1481 : default_r_val=1.e-6_dp)
3170 1481 : CALL section_add_keyword(print_key, keyword)
3171 1481 : CALL keyword_release(keyword)
3172 : CALL keyword_create(keyword, __LOCATION__, name="PARITY_ENERGY_TOL", &
3173 : description="Maximum projected symmetry/eigenvalue commutator in Hartree.", &
3174 1481 : default_r_val=1.e-6_dp)
3175 1481 : CALL section_add_keyword(print_key, keyword)
3176 1481 : CALL keyword_release(keyword)
3177 : CALL keyword_create(keyword, __LOCATION__, name="REQUIRE_GLOBAL_GAP", &
3178 : description="Require a positive sampled indirect gap above the lowest selected bands. "// &
3179 : "Unlike the direct subspace gap this tests a common energy interval over all sampled "// &
3180 : "points. A finite sampling does not prove a bulk gap. No per-point Fermi shifts are applied.", &
3181 1481 : default_l_val=.FALSE.)
3182 1481 : CALL section_add_keyword(print_key, keyword)
3183 1481 : CALL keyword_release(keyword)
3184 : CALL keyword_create(keyword, __LOCATION__, name="STATE_EXPORT", &
3185 : description="Export selected complex AO states, all eigenvalues and full contracted "// &
3186 : "Gaussian basis to SEED_NAME.topology for cross-geometry/phason overlaps. "// &
3187 : "Requires NNKP, WILSON or TRIM, uses atomic units, and can generate large files. "// &
3188 : "Spinor coefficients include second-variational SOC when enabled. "// &
3189 1481 : "No Wannier fit or Fermi-energy alignment is performed.", default_l_val=.FALSE.)
3190 1481 : CALL section_add_keyword(print_key, keyword)
3191 1481 : CALL keyword_release(keyword)
3192 : CALL keyword_create(keyword, __LOCATION__, name="TIME_REVERSAL", &
3193 : description="User confirmation that the Hamiltonian is time-reversal invariant. "// &
3194 : "Boundary Kramers degeneracy is additionally checked; it is not a proof of TR symmetry.", &
3195 1481 : default_l_val=.FALSE.)
3196 1481 : CALL section_add_keyword(print_key, keyword)
3197 1481 : CALL keyword_release(keyword)
3198 : CALL keyword_create(keyword, __LOCATION__, name="SOC", &
3199 : description="Second-variational pseudopotential SOC for explicit-loop exports. "// &
3200 : "Requires a restricted SCF and SOC-capable pseudopotentials. ADDED_MOS controls "// &
3201 : "the scalar basis; EXCLUDE_BANDS then refers to spinor bands. Converge ADDED_MOS.", &
3202 1481 : default_l_val=.FALSE.)
3203 1481 : CALL section_add_keyword(print_key, keyword)
3204 1481 : CALL keyword_release(keyword)
3205 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_MAX_REFINEMENT", &
3206 : description="Maximum joint doublings of loop and transverse resolution; at least "// &
3207 1481 : "one doubling is required for generated WILSON surfaces.", default_i_val=3)
3208 1481 : CALL section_add_keyword(print_key, keyword)
3209 1481 : CALL keyword_release(keyword)
3210 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_TOL", &
3211 : description="Tolerance of Wilson centres between successive meshes (reduced units).", &
3212 1481 : default_r_val=1.e-3_dp)
3213 1481 : CALL section_add_keyword(print_key, keyword)
3214 1481 : CALL keyword_release(keyword)
3215 : CALL keyword_create(keyword, __LOCATION__, name="WILSON_GAP_TOL", &
3216 : description="Minimum sampled separation from excluded bands in Hartree.", &
3217 1481 : default_r_val=1.e-7_dp)
3218 1481 : CALL section_add_keyword(print_key, keyword)
3219 1481 : CALL keyword_release(keyword)
3220 :
3221 : CALL keyword_create(keyword, __LOCATION__, name="REUSE_SCF_MOS", &
3222 : description="Try to reuse the SCF k-point MO coefficients when KPOINTS_SOURCE SCF "// &
3223 : "is active. CP2K can directly reuse full SCF meshes, time-reversal partners, "// &
3224 : "non-degenerate atom/AO symmetry images, and atom/AO symmetry images whose "// &
3225 : "degenerate band subspaces are fully contained in the exported Wannier90 band "// &
3226 : "window. If the Wannier90 band window cuts through a degenerate subspace, CP2K "// &
3227 : "falls back to the historical full-mesh diagonalization.", &
3228 1481 : usage="REUSE_SCF_MOS T", default_l_val=.TRUE.)
3229 1481 : CALL section_add_keyword(print_key, keyword)
3230 1481 : CALL keyword_release(keyword)
3231 :
3232 : CALL keyword_create(keyword, __LOCATION__, name="VALIDATE_REUSE_SCF_MOS", &
3233 : description="When KPOINTS_SOURCE SCF and REUSE_SCF_MOS are active, first build a "// &
3234 : "full-mesh diagonalization reference and validate the reconstructed SCF MO "// &
3235 : "subspaces against it before writing Wannier90 files. This diagnostic option is "// &
3236 : "expensive and intended for development of symmetry-reconstructed Wannier90 "// &
3237 : "exports.", &
3238 1481 : usage="VALIDATE_REUSE_SCF_MOS T", default_l_val=.FALSE.)
3239 1481 : CALL section_add_keyword(print_key, keyword)
3240 1481 : CALL keyword_release(keyword)
3241 :
3242 : CALL keyword_create(keyword, __LOCATION__, name="USE_BLOCH_PHASES", &
3243 : description="Apply the CP2K Bloch-phase gauge to reused SCF band subspaces. "// &
3244 : "INITIAL_PROJECTIONS determines projections in the same gauge. With NONE, "// &
3245 : "write identity projections and require equal band and Wannier counts. "// &
3246 : "AO_SCDM and AO_HYBRID also support disentanglement.", &
3247 1481 : usage="USE_BLOCH_PHASES T", default_l_val=.FALSE.)
3248 1481 : CALL section_add_keyword(print_key, keyword)
3249 1481 : CALL keyword_release(keyword)
3250 :
3251 : CALL keyword_create(keyword, __LOCATION__, name="ADDED_MOS", &
3252 : variants=["ADDED_BANDS"], &
3253 : description="Number of MOs/Bands added to the Band Structure calculation.", &
3254 2962 : default_i_val=0)
3255 1481 : CALL section_add_keyword(print_key, keyword)
3256 1481 : CALL keyword_release(keyword)
3257 :
3258 : CALL keyword_create(keyword, __LOCATION__, name="EXCLUDE_BANDS", &
3259 : description="One-based MO indices removed before the Wannier calculation. "// &
3260 : "Retained bands are exported in ascending order and renumbered from one; "// &
3261 : "the original indices are written to SEED_NAME_band_indices.dat. "// &
3262 : "Band exclusions must retain or remove complete degenerate subspaces "// &
3263 : "inside the outer energy window.", &
3264 : usage="EXCLUDE_BANDS b1 b2 ...", n_var=-1, repeats=.TRUE., &
3265 1481 : type_of_var=integer_t)
3266 1481 : CALL section_add_keyword(print_key, keyword)
3267 1481 : CALL keyword_release(keyword)
3268 :
3269 : CALL keyword_create(keyword, __LOCATION__, name="WANNIER_FUNCTIONS", &
3270 : description="Number of Wannier functions to be calculated. "// &
3271 : "Specify once for all spin channels, or twice for separate alpha and beta counts.", &
3272 : usage="WANNIER_FUNCTIONS 6", n_var=1, default_i_val=0, &
3273 1481 : repeats=.TRUE., type_of_var=integer_t)
3274 1481 : CALL section_add_keyword(print_key, keyword)
3275 1481 : CALL keyword_release(keyword)
3276 :
3277 : CALL keyword_create(keyword, __LOCATION__, name="INITIAL_PROJECTIONS", &
3278 : description="Initial projections written to SEED_NAME.amn for external Wannier90. "// &
3279 : "NONE preserves the historical export without projections, except that "// &
3280 : "USE_BLOCH_PHASES writes IDENTITY for complete band spaces. AO_SCDM selects "// &
3281 : "fixed AO trials by pivoted QR across the entire mesh. This is AO-based, not "// &
3282 : "real-space SCDM. AO_HYBRID forms tetrahedral trials from all on-atom radial "// &
3283 : "s/p pairs before selection, retaining other AOs. Both use the overlap metric "// &
3284 : "and the exported Bloch gauge and allow rectangular projections. "// &
3285 : "IDENTITY requires equal band and Wannier counts. AO trials require "// &
3286 : "KPOINTS_SOURCE MP_GRID or SCF. Localization is performed by external Wannier90.", &
3287 : type_of_var=enum_t, enum_c_vals=s2a("NONE", "IDENTITY", "AO_SCDM", "AO_HYBRID"), &
3288 2962 : enum_i_vals=[-1, 0, 1, 2], default_i_val=-1, citations=[Pizzi2020])
3289 1481 : CALL section_add_keyword(print_key, keyword)
3290 1481 : CALL keyword_release(keyword)
3291 : CALL keyword_create(keyword, __LOCATION__, name="DIS_WIN_MIN", &
3292 : description="Lower edge of the disentanglement outer energy window; defaults to the lowest exported eigenvalue.", &
3293 1481 : type_of_var=real_t, unit_str="eV")
3294 1481 : CALL section_add_keyword(print_key, keyword)
3295 1481 : CALL keyword_release(keyword)
3296 : CALL keyword_create(keyword, __LOCATION__, name="DIS_WIN_MAX", &
3297 : description="Upper edge of the disentanglement outer energy window; defaults to the highest exported eigenvalue.", &
3298 1481 : type_of_var=real_t, unit_str="eV")
3299 1481 : CALL section_add_keyword(print_key, keyword)
3300 1481 : CALL keyword_release(keyword)
3301 : CALL keyword_create(keyword, __LOCATION__, name="DIS_FROZ_MIN", &
3302 : description="Lower edge of the frozen energy window. Requires DIS_FROZ_MAX; "// &
3303 1481 : "if omitted, the lower spectrum edge is used.", type_of_var=real_t, unit_str="eV")
3304 1481 : CALL section_add_keyword(print_key, keyword)
3305 1481 : CALL keyword_release(keyword)
3306 : CALL keyword_create(keyword, __LOCATION__, name="DIS_FROZ_MAX", &
3307 : description="Upper edge of the frozen energy window. States inside this window "// &
3308 1481 : "must be retained in the optimized subspace.", type_of_var=real_t, unit_str="eV")
3309 1481 : CALL section_add_keyword(print_key, keyword)
3310 1481 : CALL keyword_release(keyword)
3311 :
3312 1481 : END SUBROUTINE create_wannier_section
3313 :
3314 : ! **************************************************************************************************
3315 : !> \brief ...
3316 : !> \param print_key ...
3317 : ! **************************************************************************************************
3318 1481 : SUBROUTINE create_stm_section(print_key)
3319 : TYPE(section_type), POINTER :: print_key
3320 :
3321 : TYPE(keyword_type), POINTER :: keyword
3322 :
3323 1481 : NULLIFY (keyword)
3324 :
3325 : CALL cp_print_key_section_create(print_key, __LOCATION__, "STM", &
3326 : description="Controls the printing of cubes for the generation of STM images.", &
3327 1481 : print_level=debug_print_level, filename="")
3328 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
3329 : description="The stride (X,Y,Z) used to write the cube file "// &
3330 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
3331 : " 1 number valid for all components.", &
3332 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
3333 1481 : CALL section_add_keyword(print_key, keyword)
3334 1481 : CALL keyword_release(keyword)
3335 :
3336 : CALL keyword_create(keyword, __LOCATION__, name="nlumo", &
3337 : description="If the printkey is activated controls the number of additional lumos"// &
3338 : " that are computed to be able to reproduce STM images obtained"// &
3339 : " from positive bias (imaging unoccupied states)", &
3340 1481 : default_i_val=0)
3341 1481 : CALL section_add_keyword(print_key, keyword)
3342 1481 : CALL keyword_release(keyword)
3343 :
3344 : CALL keyword_create(keyword, __LOCATION__, name="BIAS", &
3345 : description="Bias energy for scanning tunneling microscopy (STM) image generation. "// &
3346 : "Orbital densities are summed according to the bias energy. "// &
3347 : "For negative values, states in the range ]EF+bias,EF] are summed, "// &
3348 : "While positive values sum states in the range [EF,EF+bias[. "// &
3349 : "If positive biases are used, sufficiently many unoccupied stated "// &
3350 : "(see ADDED_MOS and NLUMO ) should be computed.", &
3351 1481 : n_var=-1, type_of_var=real_t, default_r_vals=[0.0_dp], unit_str='eV')
3352 1481 : CALL section_add_keyword(print_key, keyword)
3353 1481 : CALL keyword_release(keyword)
3354 :
3355 : CALL keyword_create(keyword, __LOCATION__, name="TH_TORB", &
3356 : description="Tip orbital symmetry in Tersoff-Hamann approximation to compute STM images", &
3357 : repeats=.TRUE., &
3358 : default_i_val=orb_s, &
3359 : usage="TH_TORB s dz2", &
3360 : enum_c_vals=s2a("S", "PX", "PY", "PZ", "DXY", "DYZ", "DZX", "DX2", "DY2", "DZ2"), &
3361 : enum_i_vals=[orb_s, orb_px, orb_py, orb_pz, orb_dxy, orb_dyz, orb_dzx, orb_dx2, orb_dy2, orb_dz2], &
3362 : enum_desc=s2a("s orbital", "px orbital", "py orbital", "pz orbital", &
3363 1481 : "dxy orbital", "dyz orbital", "dzx orbital", "x^2 orbital", "y^2 orbital", "z^2 orbital"))
3364 1481 : CALL section_add_keyword(print_key, keyword)
3365 1481 : CALL keyword_release(keyword)
3366 :
3367 : CALL keyword_create(keyword, __LOCATION__, name="REF_ENERGY", &
3368 : description="By default the reference energy is the Fermi energy. In order to compare"// &
3369 : " with STS experiments, where specific energy ranges are addressed, here"// &
3370 : " one can set a different reference energy."// &
3371 : " The energy range is anyway controlled by the BIAS", &
3372 1481 : type_of_var=real_t, default_r_val=0.0_dp, unit_str='eV')
3373 1481 : CALL section_add_keyword(print_key, keyword)
3374 1481 : CALL keyword_release(keyword)
3375 :
3376 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
3377 : description="append the cube files when they already exist", &
3378 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3379 1481 : CALL section_add_keyword(print_key, keyword)
3380 1481 : CALL keyword_release(keyword)
3381 :
3382 1481 : END SUBROUTINE create_stm_section
3383 :
3384 : ! **************************************************************************************************
3385 : !> \brief ...
3386 : !> \param section ...
3387 : ! **************************************************************************************************
3388 1481 : SUBROUTINE create_wfn_mix_section(section)
3389 :
3390 : TYPE(section_type), POINTER :: section
3391 :
3392 : TYPE(keyword_type), POINTER :: keyword
3393 : TYPE(section_type), POINTER :: subsection
3394 :
3395 1481 : NULLIFY (subsection)
3396 1481 : NULLIFY (keyword)
3397 :
3398 1481 : CPASSERT(.NOT. ASSOCIATED(section))
3399 :
3400 : CALL section_create(section, __LOCATION__, name="WFN_MIX", &
3401 : description="A section that allows manipulation of the MO coeffs, "// &
3402 : "e.g. for changing a ground state into an excited state. "// &
3403 : "Starting from a copy of the original MOs, changes can be made "// &
3404 : "by adding linear combinations of HOMO/LUMO of the original MOs to the result MOs. "// &
3405 : "This method is called after an SCF optimization or before an RTP run if "// &
3406 : "INITIAL_WFN=RESTART_WFN. Note that if called after an SCF optimization, a restart file "// &
3407 : "with the mixed MOs is saved. This is not the case for an RTP with "// &
3408 : "INITIAL_WFN=RESTART_WFN.", &
3409 1481 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
3410 :
3411 : CALL keyword_create(keyword, __LOCATION__, name="OVERWRITE_MOS", &
3412 : description="If set to True, the active molecular orbitals in memory will be replaced by the mixed wfn "// &
3413 : "at the end of the wfn mixing procedure. For instance, you can then use this new set of MOs to perform "// &
3414 : "RTP or EMD directly. Note that in the case of an RTP run with INITIAL_WFN=RESTART_WFN, the OVERWRITE_MOS "// &
3415 : "keyword is not used.", &
3416 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3417 1481 : CALL section_add_keyword(section, keyword)
3418 1481 : CALL keyword_release(keyword)
3419 :
3420 : CALL section_create(subsection, __LOCATION__, name="UPDATE", &
3421 : description="Update a result MO with with a linear combination of original MOs."// &
3422 : " This section can be repeated to build arbitrary linear combinations using repeatedly y=a*y+b*x. "// &
3423 : "RESULT is (y), RESULT_SCALE is (a), ORIG is (x), ORIG_SCALE is (b)", &
3424 1481 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
3425 :
3426 : CALL keyword_create(keyword, __LOCATION__, name="RESULT_MO_INDEX", &
3427 : description="Index of the MO (y) to be modified. Counting down in energy: "// &
3428 : "set to 1 for the highest MO, to 3 for the highest MO-2.", &
3429 1481 : usage="RESULT_MO_INDEX 1", type_of_var=integer_t, default_i_val=0)
3430 1481 : CALL section_add_keyword(subsection, keyword)
3431 1481 : CALL keyword_release(keyword)
3432 :
3433 : CALL keyword_create(keyword, __LOCATION__, name="RESULT_MARKED_STATE", &
3434 : description="Specifies the MO according to "// &
3435 : "the marks set in MOLECULAR_STATES. The value corresponds to the repetition "// &
3436 : "of MARK_STATES in MOLECULAR_STATES", &
3437 1481 : usage="RESULT_MARKED_STATE 1", type_of_var=integer_t, default_i_val=0)
3438 1481 : CALL section_add_keyword(subsection, keyword)
3439 1481 : CALL keyword_release(keyword)
3440 :
3441 : CALL keyword_create(keyword, __LOCATION__, name="REVERSE_MO_INDEX", &
3442 : description="Reverses the index order of the OCCUPIED and EXTERNAL MOs. With this keyword "// &
3443 : "ORIG_MO_INDEX/RESULT_MO_INDEX 1 point to the lowest energy MO (instead of the highest) "// &
3444 : "and counts up in energy. The VIRTUAL MOs indexing is unchanged.", &
3445 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3446 1481 : CALL section_add_keyword(subsection, keyword)
3447 1481 : CALL keyword_release(keyword)
3448 :
3449 : CALL keyword_create(keyword, __LOCATION__, name="RESULT_SPIN_INDEX", &
3450 : description="Spin of the MO (y) to be modified.", &
3451 : enum_c_vals=s2a("Alpha", "Beta"), &
3452 : enum_i_vals=[1, 2], & ! direct index in array
3453 : default_i_val=1, &
3454 1481 : enum_desc=s2a("Majority spin", "Minority spin"))
3455 1481 : CALL section_add_keyword(subsection, keyword)
3456 1481 : CALL keyword_release(keyword)
3457 :
3458 : CALL keyword_create(keyword, __LOCATION__, name="RESULT_SCALE", &
3459 : description="Scaling factor of the result variable (a).", &
3460 1481 : usage="RESULT_SCALE 0.0", type_of_var=real_t)
3461 1481 : CALL section_add_keyword(subsection, keyword)
3462 1481 : CALL keyword_release(keyword)
3463 :
3464 : CALL keyword_create(keyword, __LOCATION__, name="ORIG_MO_INDEX", &
3465 : description="Index of the original MO (x). "// &
3466 : "If ORIG_TYPE is OCCUPIED, it counts down in energy: set to 1 to point to "// &
3467 : "the highest MO and to 3 for the highest MO-2. "// &
3468 : "If ORIG_TYPE is VIRTUAL, it counts up in energy: set to 1 to point to "// &
3469 : "the lowest virtual MO and to 3 for the lowest MO+2. "// &
3470 : "If ORIG_TYPE is EXTERNAL, it counts down in energy for the external "// &
3471 : "set of MOs: set to 1 to point to the highest MO and to 3 for the highest MO-2. "// &
3472 : "Do not set to zero or negative values.", &
3473 1481 : usage="ORIG_MO_INDEX 1", type_of_var=integer_t, default_i_val=0)
3474 1481 : CALL section_add_keyword(subsection, keyword)
3475 1481 : CALL keyword_release(keyword)
3476 :
3477 : CALL keyword_create(keyword, __LOCATION__, name="ORIG_MARKED_STATE", &
3478 : description="Specifies the MO according to "// &
3479 : "the marks set in MOLECULAR_STATES. The value corresponds to the repetition "// &
3480 : "of MARK_STATES in MOLECULAR_STATES", &
3481 1481 : usage="ORIG_MARKED_STATE 1", type_of_var=integer_t, default_i_val=0)
3482 1481 : CALL section_add_keyword(subsection, keyword)
3483 1481 : CALL keyword_release(keyword)
3484 :
3485 : CALL keyword_create(keyword, __LOCATION__, name="ORIG_SPIN_INDEX", &
3486 : description="Spin of the MO (x) to be modified.", &
3487 : enum_c_vals=s2a("Alpha", "Beta"), &
3488 : enum_i_vals=[1, 2], & ! direct index in array
3489 : default_i_val=1, &
3490 1481 : enum_desc=s2a("Majority spin", "Minority spin"))
3491 1481 : CALL section_add_keyword(subsection, keyword)
3492 1481 : CALL keyword_release(keyword)
3493 :
3494 : CALL keyword_create(keyword, __LOCATION__, name="ORIG_SCALE", &
3495 : description="Scaling factor of the original variable (b).", &
3496 1481 : usage="ORIG_SCALE 0.0", type_of_var=real_t)
3497 1481 : CALL section_add_keyword(subsection, keyword)
3498 1481 : CALL keyword_release(keyword)
3499 :
3500 : CALL keyword_create(keyword, __LOCATION__, name="ORIG_TYPE", &
3501 : description="Type of the original MO. Note that if ADDED_MOS was used in the "// &
3502 : "SCF construction of the MO matrix, these extra MOs are also treated as OCCUPIED. ", &
3503 : enum_c_vals=s2a("OCCUPIED", "VIRTUAL", 'EXTERNAL'), &
3504 : usage="ORIG_TYPE OCCUPIED", &
3505 : default_i_val=wfn_mix_orig_occ, &
3506 : enum_desc=s2a("The original MO is the result of the SCF procedure. This can also contain "// &
3507 : "unoccupied MOs if the SCF%ADDED_MOS keyword was used.", &
3508 : "The original MO is taken from the result of additional MOs calculated a "// &
3509 : "posteriori of the SCF by request of the user. E.g. by specifying print%mo_cubes%nlumo. ", &
3510 : "The orginal MO is from an external .wfn file. Use the keyword "// &
3511 : "ORIG_EXT_FILE_NAME to define its name."), &
3512 1481 : enum_i_vals=[wfn_mix_orig_occ, wfn_mix_orig_virtual, wfn_mix_orig_external])
3513 1481 : CALL section_add_keyword(subsection, keyword)
3514 1481 : CALL keyword_release(keyword)
3515 :
3516 : CALL keyword_create(keyword, __LOCATION__, name="ORIG_EXT_FILE_NAME", &
3517 : description="Name of the wavefunction file to read the original MO from. "// &
3518 : "For instance, a restart wfn file from SCF calculation or an excited state from XAS_TDP calculation. "// &
3519 : "If no file is specified, the run will crash. "// &
3520 : "Currently, a RTP restart file (.rtpwfn) cannot be used as reference. "// &
3521 : "Currently, this file SHALL have the basis set, number of MO and the same number of spin as the one "// &
3522 : "from the SCF cycle.", &
3523 : usage="ORIG_EXT_FILE_NAME <FILENAME>", &
3524 1481 : default_lc_val="EMPTY")
3525 1481 : CALL section_add_keyword(subsection, keyword)
3526 1481 : CALL keyword_release(keyword)
3527 :
3528 1481 : CALL section_add_subsection(section, subsection)
3529 1481 : CALL section_release(subsection)
3530 :
3531 1481 : END SUBROUTINE create_wfn_mix_section
3532 :
3533 : ! **************************************************************************************************
3534 : !> \brief Creates the section for cube files related to the implicit Poisson solver.
3535 : !> \param section the section to be created
3536 : !> \par History
3537 : !> 03.2016 refactored from create_print_dft_section [Hossein Bani-Hashemian]
3538 : !> \author Mohammad Hossein Bani-Hashemian
3539 : ! **************************************************************************************************
3540 1481 : SUBROUTINE create_implicit_psolver_section(section)
3541 : TYPE(section_type), POINTER :: section
3542 :
3543 : TYPE(keyword_type), POINTER :: keyword
3544 : TYPE(section_type), POINTER :: print_key
3545 :
3546 1481 : CPASSERT(.NOT. ASSOCIATED(section))
3547 : CALL section_create(section, __LOCATION__, name="IMPLICIT_PSOLVER", &
3548 : description="Controls printing of cube files for data from the implicit "// &
3549 : "(generalized) Poisson solver.", &
3550 : citations=[BaniHashemian2016], &
3551 2962 : n_keywords=0, n_subsections=3, repeats=.FALSE.)
3552 :
3553 1481 : NULLIFY (keyword, print_key)
3554 :
3555 : ! dielectric constant function
3556 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DIELECTRIC_CUBE", &
3557 : description="Controls the printing of a cube file with dielectric constant from "// &
3558 : "the implicit (generalized) Poisson solver.", &
3559 1481 : print_level=high_print_level, filename="")
3560 :
3561 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
3562 : description="The stride (X,Y,Z) used to write the cube file "// &
3563 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
3564 : " 1 number valid for all components.", &
3565 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
3566 1481 : CALL section_add_keyword(print_key, keyword)
3567 1481 : CALL keyword_release(keyword)
3568 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
3569 : description="append the cube files when they already exist", &
3570 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3571 1481 : CALL section_add_keyword(print_key, keyword)
3572 1481 : CALL keyword_release(keyword)
3573 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
3574 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
3575 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
3576 1481 : CALL section_add_keyword(print_key, keyword)
3577 1481 : CALL keyword_release(keyword)
3578 :
3579 1481 : CALL section_add_subsection(section, print_key)
3580 1481 : CALL section_release(print_key)
3581 :
3582 : ! dirichlet type constraints
3583 : CALL cp_print_key_section_create( &
3584 : print_key, __LOCATION__, "DIRICHLET_BC_CUBE", &
3585 : description="Controls the printing of cube files with unit step functions (constraints)"// &
3586 : " representing Dirichlet-type (boundary) regions defined in the implicit (generalized) Poisson"// &
3587 : " solver section. The regions remain unchanged throughout the calculations. If the Dirichlet"// &
3588 : " regions are relatively large and/or the number of partitions is quite high, in order to save memory,"// &
3589 : " generate the cube files in early steps and perform the rest of the calculations with this keyword"// &
3590 : " switched off.", &
3591 1481 : print_level=high_print_level, filename="")
3592 :
3593 : CALL keyword_create(keyword, __LOCATION__, name="TILE_CUBES", &
3594 : description="Print tiles that tessellate the Dirichlet regions into cube files. If TRUE, "// &
3595 : "generates cube files as many as the total number of tiles.", &
3596 : usage="TILE_CUBES <logical>", &
3597 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3598 1481 : CALL section_add_keyword(print_key, keyword)
3599 1481 : CALL keyword_release(keyword)
3600 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
3601 : description="The stride (X,Y,Z) used to write the cube file "// &
3602 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
3603 : " 1 number valid for all components.", &
3604 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
3605 1481 : CALL section_add_keyword(print_key, keyword)
3606 1481 : CALL keyword_release(keyword)
3607 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
3608 : description="append the cube files when they already exist", &
3609 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3610 1481 : CALL section_add_keyword(print_key, keyword)
3611 1481 : CALL keyword_release(keyword)
3612 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
3613 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
3614 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
3615 1481 : CALL section_add_keyword(print_key, keyword)
3616 1481 : CALL keyword_release(keyword)
3617 :
3618 1481 : CALL section_add_subsection(section, print_key)
3619 1481 : CALL section_release(print_key)
3620 :
3621 : ! charge introduced by Lagrange multipliers
3622 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DIRICHLET_CSTR_CHARGE_CUBE", &
3623 : description="Controls the printing of cube files with penalty charges induced to "// &
3624 : "Dirichlet regions by Lagrange multipliers (implicit Poisson solver).", &
3625 1481 : print_level=high_print_level, filename="")
3626 :
3627 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
3628 : description="The stride (X,Y,Z) used to write the cube file "// &
3629 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
3630 : " 1 number valid for all components.", &
3631 1481 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
3632 1481 : CALL section_add_keyword(print_key, keyword)
3633 1481 : CALL keyword_release(keyword)
3634 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
3635 : description="append the cube files when they already exist", &
3636 1481 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
3637 1481 : CALL section_add_keyword(print_key, keyword)
3638 1481 : CALL keyword_release(keyword)
3639 : CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
3640 : description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
3641 1481 : usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
3642 1481 : CALL section_add_keyword(print_key, keyword)
3643 1481 : CALL keyword_release(keyword)
3644 :
3645 1481 : CALL section_add_subsection(section, print_key)
3646 1481 : CALL section_release(print_key)
3647 :
3648 1481 : END SUBROUTINE create_implicit_psolver_section
3649 :
3650 : ! **************************************************************************************************
3651 : !> \brief creates the interpolation section for the periodic QM/MM
3652 : !> \param section ...
3653 : !> \author tlaino
3654 : ! **************************************************************************************************
3655 1481 : SUBROUTINE create_gspace_interp_section(section)
3656 : TYPE(section_type), POINTER :: section
3657 :
3658 : TYPE(keyword_type), POINTER :: keyword
3659 : TYPE(section_type), POINTER :: print_key
3660 :
3661 1481 : CPASSERT(.NOT. ASSOCIATED(section))
3662 : CALL section_create(section, __LOCATION__, name="interpolator", &
3663 : description="controls the interpolation for the G-space term", &
3664 1481 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
3665 :
3666 1481 : NULLIFY (keyword, print_key)
3667 :
3668 : CALL keyword_create(keyword, __LOCATION__, name="aint_precond", &
3669 : description="the approximate inverse to use to get the starting point"// &
3670 : " for the linear solver of the spline3 methods", &
3671 : usage="aint_precond copy", &
3672 : default_i_val=precond_spl3_aint, &
3673 : enum_c_vals=s2a("copy", "spl3_nopbc_aint1", "spl3_nopbc_precond1", &
3674 : "spl3_nopbc_aint2", "spl3_nopbc_precond2", "spl3_nopbc_precond3"), &
3675 : enum_i_vals=[no_precond, precond_spl3_aint, precond_spl3_1, &
3676 1481 : precond_spl3_aint2, precond_spl3_2, precond_spl3_3])
3677 1481 : CALL section_add_keyword(section, keyword)
3678 1481 : CALL keyword_release(keyword)
3679 :
3680 : CALL keyword_create(keyword, __LOCATION__, name="precond", &
3681 : description="The preconditioner used"// &
3682 : " for the linear solver of the spline3 methods", &
3683 : usage="precond copy", &
3684 : default_i_val=precond_spl3_3, &
3685 : enum_c_vals=s2a("copy", "spl3_nopbc_aint1", "spl3_nopbc_precond1", &
3686 : "spl3_nopbc_aint2", "spl3_nopbc_precond2", "spl3_nopbc_precond3"), &
3687 : enum_i_vals=[no_precond, precond_spl3_aint, precond_spl3_1, &
3688 1481 : precond_spl3_aint2, precond_spl3_2, precond_spl3_3])
3689 1481 : CALL section_add_keyword(section, keyword)
3690 1481 : CALL keyword_release(keyword)
3691 :
3692 : CALL keyword_create(keyword, __LOCATION__, name="eps_x", &
3693 : description="accuracy on the solution for spline3 the interpolators", &
3694 1481 : usage="eps_x 1.e-15", default_r_val=1.e-10_dp)
3695 1481 : CALL section_add_keyword(section, keyword)
3696 1481 : CALL keyword_release(keyword)
3697 :
3698 : CALL keyword_create(keyword, __LOCATION__, name="eps_r", &
3699 : description="accuracy on the residual for spline3 the interpolators", &
3700 1481 : usage="eps_r 1.e-15", default_r_val=1.e-10_dp)
3701 1481 : CALL section_add_keyword(section, keyword)
3702 1481 : CALL keyword_release(keyword)
3703 :
3704 : CALL keyword_create(keyword, __LOCATION__, name="max_iter", &
3705 : variants=['maxiter'], &
3706 : description="the maximum number of iterations", &
3707 2962 : usage="max_iter 200", default_i_val=100)
3708 1481 : CALL section_add_keyword(section, keyword)
3709 1481 : CALL keyword_release(keyword)
3710 :
3711 1481 : NULLIFY (print_key)
3712 : CALL cp_print_key_section_create(print_key, __LOCATION__, "conv_info", &
3713 : description="if convergence information about the linear solver"// &
3714 : " of the spline methods should be printed", &
3715 : print_level=medium_print_level, each_iter_names=s2a("SPLINE_FIND_COEFFS"), &
3716 : each_iter_values=[10], filename="__STD_OUT__", &
3717 1481 : add_last=add_last_numeric)
3718 1481 : CALL section_add_subsection(section, print_key)
3719 1481 : CALL section_release(print_key)
3720 :
3721 1481 : END SUBROUTINE create_gspace_interp_section
3722 :
3723 : END MODULE input_cp2k_print_dft
|