LCOV - code coverage report
Current view: top level - src - input_cp2k_print_dft.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:51fc4cd) Lines: 100.0 % 1085 1085
Test Date: 2026-02-04 06:28:27 Functions: 100.0 % 13 13

            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, 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
      28              :    USE cp_output_handling, ONLY: add_last_numeric, &
      29              :                                  cp_print_key_section_create, &
      30              :                                  debug_print_level, &
      31              :                                  high_print_level, &
      32              :                                  low_print_level, &
      33              :                                  medium_print_level, &
      34              :                                  silent_print_level
      35              :    USE cp_spline_utils, ONLY: pw_interp, &
      36              :                               spline3_nopbc_interp, &
      37              :                               spline3_pbc_interp
      38              :    USE cp_units, ONLY: cp_unit_to_cp2k
      39              :    USE input_constants, ONLY: &
      40              :       atomic_guess, becke_cutoff_element, becke_cutoff_global, bqb_opt_exhaustive, &
      41              :       bqb_opt_normal, bqb_opt_off, bqb_opt_patient, bqb_opt_quick, broyden_type_1, &
      42              :       broyden_type_1_explicit, broyden_type_1_explicit_ls, broyden_type_1_ls, broyden_type_2, &
      43              :       broyden_type_2_explicit, broyden_type_2_explicit_ls, broyden_type_2_ls, casci_canonical, &
      44              :       cdft_alpha_constraint, cdft_beta_constraint, cdft_charge_constraint, &
      45              :       cdft_magnetization_constraint, cholesky_dbcsr, cholesky_inverse, cholesky_off, &
      46              :       cholesky_reduce, cholesky_restore, core_guess, diag_block_davidson, diag_block_krylov, &
      47              :       diag_filter_matrix, diag_ot, diag_standard, do_admm_aux_exch_func_bee, &
      48              :       do_admm_aux_exch_func_bee_libxc, do_admm_aux_exch_func_default, &
      49              :       do_admm_aux_exch_func_default_libxc, do_admm_aux_exch_func_none, &
      50              :       do_admm_aux_exch_func_opt, do_admm_aux_exch_func_opt_libxc, do_admm_aux_exch_func_pbex, &
      51              :       do_admm_aux_exch_func_pbex_libxc, do_admm_aux_exch_func_sx_libxc, &
      52              :       do_admm_basis_projection, do_admm_blocked_projection, do_admm_blocking_purify_full, &
      53              :       do_admm_charge_constrained_projection, do_admm_exch_scaling_merlot, &
      54              :       do_admm_exch_scaling_none, do_admm_purify_cauchy, do_admm_purify_cauchy_subspace, &
      55              :       do_admm_purify_mcweeny, do_admm_purify_mo_diag, do_admm_purify_mo_no_diag, &
      56              :       do_admm_purify_none, do_admm_purify_none_dm, do_arnoldi, do_bch, do_cn, &
      57              :       do_ddapc_constraint, do_ddapc_restraint, do_em, do_etrs, do_full_density, do_gapw_gcs, &
      58              :       do_gapw_gct, do_gapw_log, do_iaoloc_energy, do_iaoloc_enone, do_iaoloc_l1, do_iaoloc_occ, &
      59              :       do_iaoloc_pm2, do_iaoloc_pm4, do_lri_inv, do_lri_inv_auto, do_lri_opt_all, &
      60              :       do_lri_opt_coeff, do_lri_opt_exps, do_lri_pseudoinv_diag, do_lri_pseudoinv_svd, &
      61              :       do_method_am1, do_method_dftb, do_method_gapw, do_method_gapw_xc, do_method_gpw, &
      62              :       do_method_lrigpw, do_method_mndo, do_method_mndod, do_method_ofgpw, do_method_pdg, &
      63              :       do_method_pm3, do_method_pm6, do_method_pm6fm, do_method_pnnl, do_method_rigpw, &
      64              :       do_method_rm1, do_method_xtb, do_pade, do_potential_coulomb, do_potential_id, &
      65              :       do_potential_short, do_potential_truncated, do_ppl_analytic, do_ppl_grid, &
      66              :       do_pwgrid_ns_fullspace, do_pwgrid_ns_halfspace, do_pwgrid_spherical, do_s2_constraint, &
      67              :       do_s2_restraint, do_se_is_kdso, do_se_is_kdso_d, do_se_is_slater, do_se_lr_ewald, &
      68              :       do_se_lr_ewald_gks, do_se_lr_ewald_r3, do_se_lr_none, do_spin_density, do_taylor, &
      69              :       ehrenfest, embed_diff, embed_fa, embed_grid_angstrom, embed_grid_bohr, embed_level_shift, &
      70              :       embed_none, embed_quasi_newton, embed_resp, embed_steep_desc, eri_method_full_gpw, &
      71              :       eri_method_gpw_ht, eri_operator_trunc, eri_operator_coulomb, eri_operator_erf, eri_operator_erfc, &
      72              :       eri_operator_gaussian, eri_operator_yukawa, gapw_1c_large, gapw_1c_medium, gapw_1c_orb, &
      73              :       gapw_1c_small, gapw_1c_very_large, gaussian, general_roks, gto_cartesian, gto_spherical, &
      74              :       high_spin_roks, history_guess, jacobian_fd1, jacobian_fd1_backward, &
      75              :       jacobian_fd1_central, jacobian_fd2, jacobian_fd2_backward, kg_color_dsatur, &
      76              :       kg_color_greedy, kg_tnadd_atomic, kg_tnadd_embed, kg_tnadd_embed_ri, kg_tnadd_none, &
      77              :       ls_2pnt, ls_3pnt, ls_gold, ls_none, manual_selection, mao_basis_ext, mao_basis_orb, &
      78              :       mao_basis_prim, mao_projection, mopac_guess, no_excitations, no_guess, no_solver, &
      79              :       numerical, oe_gllb, oe_lb, oe_none, oe_saop, oe_sic, orb_dx2, orb_dxy, orb_dy2, orb_dyz, &
      80              :       orb_dz2, orb_dzx, orb_px, orb_py, orb_pz, orb_s, ot_algo_irac, ot_algo_taylor_or_diag, &
      81              :       ot_chol_irac, ot_lwdn_irac, ot_mini_broyden, ot_mini_cg, ot_mini_diis, ot_mini_sd, &
      82              :       ot_poly_irac, ot_precond_full_all, ot_precond_full_kinetic, ot_precond_full_single, &
      83              :       ot_precond_full_single_inverse, ot_precond_none, ot_precond_s_inverse, &
      84              :       ot_precond_solver_default, ot_precond_solver_direct, ot_precond_solver_inv_chol, &
      85              :       ot_precond_solver_update, outer_scf_basis_center_opt, outer_scf_becke_constraint, &
      86              :       outer_scf_cdft_constraint, outer_scf_ddapc_constraint, outer_scf_hirshfeld_constraint, &
      87              :       outer_scf_none, outer_scf_optimizer_bisect, outer_scf_optimizer_broyden, &
      88              :       outer_scf_optimizer_diis, outer_scf_optimizer_newton, outer_scf_optimizer_newton_ls, &
      89              :       outer_scf_optimizer_none, outer_scf_optimizer_sd, outer_scf_optimizer_secant, &
      90              :       outer_scf_s2_constraint, plus_u_lowdin, plus_u_mulliken, plus_u_mulliken_charges, &
      91              :       qiskit_solver, radius_covalent, radius_default, radius_single, radius_user, radius_vdw, &
      92              :       random_guess, real_time_propagation, ref_charge_atomic, ref_charge_mulliken, rel_dkh, &
      93              :       rel_none, rel_pot_erfc, rel_pot_full, rel_sczora_mp, rel_trans_atom, rel_trans_full, &
      94              :       rel_trans_molecule, rel_zora, rel_zora_full, rel_zora_mp, restart_guess, &
      95              :       sccs_andreussi, sccs_derivative_cd3, sccs_derivative_cd5, sccs_derivative_cd7, &
      96              :       sccs_derivative_fft, sccs_fattebert_gygi, shape_function_density, shape_function_gaussian, &
      97              :       sic_ad, sic_eo, sic_list_all, sic_list_unpaired, sic_mauri_spz, sic_mauri_us, sic_none, &
      98              :       slater, smear_energy_window, smear_fermi_dirac, smear_list, sparse_guess, tddfpt_davidson, &
      99              :       tddfpt_excitations, tddfpt_lanczos, tddfpt_singlet, tddfpt_spin_cons, tddfpt_spin_flip, &
     100              :       tddfpt_triplet, use_mom_ref_coac, use_mom_ref_com, use_mom_ref_user, use_mom_ref_zero, &
     101              :       use_restart_wfn, use_rt_restart, use_scf_wfn, wannier_projection, weight_type_mass, &
     102              :       weight_type_unit, wfi_aspc_nr, wfi_frozen_method_nr, wfi_linear_p_method_nr, &
     103              :       wfi_linear_ps_method_nr, wfi_linear_wf_method_nr, wfi_ps_method_nr, &
     104              :       wfi_use_guess_method_nr, wfi_use_prev_p_method_nr, wfi_use_prev_rho_r_method_nr, &
     105              :       wfi_use_prev_wf_method_nr, wfn_mix_orig_external, wfn_mix_orig_occ, wfn_mix_orig_virtual, &
     106              :       xas_1s_type, xas_2p_type, xas_2s_type, xas_3d_type, xas_3p_type, xas_3s_type, xas_4d_type, &
     107              :       xas_4f_type, xas_4p_type, xas_4s_type, xas_dip_len, xas_dip_vel, xas_dscf, xas_none, &
     108              :       xas_not_excited, xas_tdp_by_index, xas_tdp_by_kind, xas_tp_fh, xas_tp_flex, xas_tp_hh, &
     109              :       xas_tp_xfh, xas_tp_xhh, xes_tp_val, &
     110              :       no_admm_type, admm1_type, admm2_type, admms_type, admmp_type, admmq_type, &
     111              :       e_dens_total_hard_approx, e_dens_total_density, e_dens_soft_density
     112              :    USE input_cp2k_almo, ONLY: create_almo_scf_section
     113              :    USE input_cp2k_distribution, ONLY: create_distribution_section
     114              :    USE input_cp2k_ec, ONLY: create_ec_section
     115              :    USE input_cp2k_exstate, ONLY: create_exstate_section
     116              :    USE input_cp2k_external, ONLY: create_ext_den_section, &
     117              :                                   create_ext_pot_section, &
     118              :                                   create_ext_vxc_section
     119              :    USE input_cp2k_field, ONLY: create_efield_section, &
     120              :                                create_per_efield_section
     121              :    USE input_cp2k_kpoints, ONLY: create_kpoint_set_section, &
     122              :                                  create_kpoints_section
     123              :    USE input_cp2k_loc, ONLY: create_localize_section, &
     124              :                              print_wanniers
     125              :    USE input_cp2k_ls, ONLY: create_ls_scf_section
     126              :    USE input_cp2k_mm, ONLY: create_dipoles_section, &
     127              :                             create_neighbor_lists_section
     128              :    USE input_cp2k_poisson, ONLY: create_poisson_section
     129              :    USE input_cp2k_projection_rtp, ONLY: create_projection_rtp_section
     130              :    USE input_cp2k_rsgrid, ONLY: create_rsgrid_section
     131              :    USE input_cp2k_tb, ONLY: create_dftb_control_section, &
     132              :                             create_xtb_control_section
     133              :    USE input_cp2k_transport, ONLY: create_transport_section
     134              :    USE input_cp2k_voronoi, ONLY: create_print_voronoi_section
     135              :    USE input_cp2k_scf, ONLY: create_scf_section, &
     136              :                              create_cdft_control_section
     137              :    USE input_cp2k_xc, ONLY: create_xc_fun_section, &
     138              :                             create_xc_section
     139              :    USE input_keyword_types, ONLY: keyword_create, &
     140              :                                   keyword_release, &
     141              :                                   keyword_type
     142              :    USE input_section_types, ONLY: section_add_keyword, &
     143              :                                   section_add_subsection, &
     144              :                                   section_create, &
     145              :                                   section_release, &
     146              :                                   section_type
     147              :    USE input_val_types, ONLY: char_t, &
     148              :                               integer_t, &
     149              :                               lchar_t, &
     150              :                               logical_t, &
     151              :                               real_t
     152              :    USE kinds, ONLY: dp
     153              :    USE pw_grids, ONLY: do_pw_grid_blocked_false, &
     154              :                        do_pw_grid_blocked_free, &
     155              :                        do_pw_grid_blocked_true
     156              :    USE pw_spline_utils, ONLY: no_precond, &
     157              :                               precond_spl3_1, &
     158              :                               precond_spl3_2, &
     159              :                               precond_spl3_3, &
     160              :                               precond_spl3_aint, &
     161              :                               precond_spl3_aint2
     162              :    USE qs_density_mixing_types, ONLY: create_mixing_section
     163              :    USE qs_fb_input, ONLY: create_filtermatrix_section
     164              :    USE qs_mom_types, ONLY: create_mom_section
     165              :    USE string_utilities, ONLY: newline, &
     166              :                                s2a
     167              : 
     168              :    USE cp_output_handling_openpmd, ONLY: cp_openpmd_get_default_extension
     169              : 
     170              : #include "./base/base_uses.f90"
     171              : 
     172              :    IMPLICIT NONE
     173              :    PRIVATE
     174              : 
     175              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_print_dft'
     176              : 
     177              :    PUBLIC :: create_print_dft_section, create_pdos_section
     178              : 
     179              : CONTAINS
     180              : 
     181              : ! **************************************************************************************************
     182              : !> \brief Create the print dft section
     183              : !> \param section the section to create
     184              : !> \author teo
     185              : ! **************************************************************************************************
     186         9368 :    SUBROUTINE create_print_dft_section(section)
     187              :       TYPE(section_type), POINTER                        :: section
     188              : 
     189              :       TYPE(keyword_type), POINTER                        :: keyword
     190              :       TYPE(section_type), POINTER                        :: print_key, sub_print_key, subsection
     191              : 
     192         9368 :       CPASSERT(.NOT. ASSOCIATED(section))
     193              :       CALL section_create(section, __LOCATION__, name="PRINT", &
     194              :                           description="Section of possible print options in DFT code.", &
     195         9368 :                           n_keywords=0, n_subsections=1, repeats=.FALSE.)
     196              : 
     197         9368 :       NULLIFY (print_key, keyword, subsection)
     198              : 
     199              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_BANNER", &
     200              :                                        description="Controls the printing of the banner of the MM program", &
     201         9368 :                                        print_level=silent_print_level, filename="__STD_OUT__")
     202         9368 :       CALL section_add_subsection(section, print_key)
     203         9368 :       CALL section_release(print_key)
     204              : 
     205              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "BASIS_SET_FILE", &
     206              :                                        description="Controls the printing of a file with all basis sets used.", &
     207         9368 :                                        print_level=high_print_level, filename="LOCAL_BASIS_SETS")
     208         9368 :       CALL section_add_subsection(section, print_key)
     209         9368 :       CALL section_release(print_key)
     210              : 
     211              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "KINETIC_ENERGY", &
     212              :                                        description="Controls the printing of the kinetic energy", &
     213         9368 :                                        print_level=high_print_level, filename="__STD_OUT__")
     214         9368 :       CALL section_add_subsection(section, print_key)
     215         9368 :       CALL section_release(print_key)
     216              : 
     217              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "DERIVATIVES", &
     218              :                                        description="Print all derivatives after the DFT calculation", &
     219         9368 :                                        print_level=high_print_level, filename="__STD_OUT__")
     220              :       CALL keyword_create(keyword, __LOCATION__, &
     221              :                           name="ndigits", &
     222              :                           description="Specify the number of digits used to print derivatives", &
     223         9368 :                           default_i_val=6)
     224         9368 :       CALL section_add_keyword(print_key, keyword)
     225         9368 :       CALL keyword_release(keyword)
     226              : 
     227         9368 :       CALL section_add_subsection(section, print_key)
     228         9368 :       CALL section_release(print_key)
     229              : 
     230              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name="neighbor_lists", &
     231              :                                        description="Controls the printing of the neighbor lists", &
     232         9368 :                                        print_level=debug_print_level, filename="", unit_str="angstrom")
     233              :       CALL keyword_create(keyword, __LOCATION__, &
     234              :                           name="sab_orb", &
     235              :                           description="Activates the printing of the orbital "// &
     236              :                           "orbital neighbor lists, "// &
     237              :                           "i.e. the overlap neighbor lists", &
     238              :                           default_l_val=.FALSE., &
     239         9368 :                           lone_keyword_l_val=.TRUE.)
     240         9368 :       CALL section_add_keyword(print_key, keyword)
     241         9368 :       CALL keyword_release(keyword)
     242              : 
     243              :       CALL keyword_create(keyword, __LOCATION__, &
     244              :                           name="sab_aux_fit", &
     245              :                           description="Activates the printing of the orbital "// &
     246              :                           "orbital neighbor lists wavefunction fitting basis, "// &
     247              :                           "i.e. the overlap neighbor lists", &
     248              :                           default_l_val=.FALSE., &
     249         9368 :                           lone_keyword_l_val=.TRUE.)
     250         9368 :       CALL section_add_keyword(print_key, keyword)
     251         9368 :       CALL keyword_release(keyword)
     252              : 
     253              :       CALL keyword_create(keyword, __LOCATION__, &
     254              :                           name="sab_aux_fit_vs_orb", &
     255              :                           description="Activates the printing of the orbital "// &
     256              :                           "orbital mixed neighbor lists of wavefunction fitting basis, "// &
     257              :                           "and the orbital basis, i.e. the overlap neighbor lists", &
     258              :                           default_l_val=.FALSE., &
     259         9368 :                           lone_keyword_l_val=.TRUE.)
     260         9368 :       CALL section_add_keyword(print_key, keyword)
     261         9368 :       CALL keyword_release(keyword)
     262              : 
     263              :       CALL keyword_create(keyword, __LOCATION__, &
     264              :                           name="sab_scp", &
     265              :                           description="Activates the printing of the vdW SCP "// &
     266              :                           "neighbor lists ", &
     267              :                           default_l_val=.FALSE., &
     268         9368 :                           lone_keyword_l_val=.TRUE.)
     269         9368 :       CALL section_add_keyword(print_key, keyword)
     270         9368 :       CALL keyword_release(keyword)
     271              : 
     272              :       CALL keyword_create(keyword, __LOCATION__, &
     273              :                           name="sab_vdw", &
     274              :                           description="Activates the printing of the vdW "// &
     275              :                           "neighbor lists (from DFT, DFTB, SE), "// &
     276              :                           "i.e. the dispersion neighbor lists", &
     277              :                           default_l_val=.FALSE., &
     278         9368 :                           lone_keyword_l_val=.TRUE.)
     279         9368 :       CALL section_add_keyword(print_key, keyword)
     280         9368 :       CALL keyword_release(keyword)
     281              : 
     282              :       CALL keyword_create(keyword, __LOCATION__, &
     283              :                           name="sab_cn", &
     284              :                           description="Activates the printing of the "// &
     285              :                           "neighbor lists used for coordination numbers in vdW DFT-D3", &
     286              :                           default_l_val=.FALSE., &
     287         9368 :                           lone_keyword_l_val=.TRUE.)
     288         9368 :       CALL section_add_keyword(print_key, keyword)
     289         9368 :       CALL keyword_release(keyword)
     290              : 
     291              :       CALL keyword_create(keyword, __LOCATION__, &
     292              :                           name="sac_ae", &
     293              :                           description="Activates the printing of the orbital "// &
     294              :                           "nuclear attraction neighbor lists (erfc potential)", &
     295              :                           default_l_val=.FALSE., &
     296         9368 :                           lone_keyword_l_val=.TRUE.)
     297         9368 :       CALL section_add_keyword(print_key, keyword)
     298         9368 :       CALL keyword_release(keyword)
     299              : 
     300              :       CALL keyword_create(keyword, __LOCATION__, &
     301              :                           name="sac_ppl", &
     302              :                           description="Activates the printing of the orbital "// &
     303              :                           "GTH-PPL neighbor lists (local part of the "// &
     304              :                           "Goedecker-Teter-Hutter pseudo potentials)", &
     305              :                           default_l_val=.FALSE., &
     306         9368 :                           lone_keyword_l_val=.TRUE.)
     307         9368 :       CALL section_add_keyword(print_key, keyword)
     308         9368 :       CALL keyword_release(keyword)
     309              : 
     310              :       CALL keyword_create(keyword, __LOCATION__, &
     311              :                           name="sap_ppnl", &
     312              :                           description="Activates the printing of the orbital "// &
     313              :                           "GTH-PPNL neighbor lists (non-local part of the "// &
     314              :                           "Goedecker-Teter-Hutter pseudo potentials)", &
     315              :                           default_l_val=.FALSE., &
     316         9368 :                           lone_keyword_l_val=.TRUE.)
     317         9368 :       CALL section_add_keyword(print_key, keyword)
     318         9368 :       CALL keyword_release(keyword)
     319              : 
     320              :       CALL keyword_create(keyword, __LOCATION__, &
     321              :                           name="sap_oce", &
     322              :                           description="Activates the printing of the orbital "// &
     323              :                           "PAW-projector neighbor lists (only GAPW)", &
     324              :                           default_l_val=.FALSE., &
     325         9368 :                           lone_keyword_l_val=.TRUE.)
     326         9368 :       CALL section_add_keyword(print_key, keyword)
     327         9368 :       CALL keyword_release(keyword)
     328              : 
     329              :       CALL keyword_create(keyword, __LOCATION__, &
     330              :                           name="sab_se", &
     331              :                           description="Activates the printing of the two-center "// &
     332              :                           "neighbor lists for Coulomb type interactions in NDDO ", &
     333              :                           default_l_val=.FALSE., &
     334         9368 :                           lone_keyword_l_val=.TRUE.)
     335         9368 :       CALL section_add_keyword(print_key, keyword)
     336         9368 :       CALL keyword_release(keyword)
     337              : 
     338              :       CALL keyword_create(keyword, __LOCATION__, &
     339              :                           name="sab_lrc", &
     340              :                           description="Activates the printing of the long-range SE correction "// &
     341              :                           "neighbor lists (only when doing long-range SE with integral scheme KDSO and KDSO-d)", &
     342         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     343         9368 :       CALL section_add_keyword(print_key, keyword)
     344         9368 :       CALL keyword_release(keyword)
     345              : 
     346              :       CALL keyword_create(keyword, __LOCATION__, &
     347              :                           name="sab_tbe", &
     348              :                           description="Activates the printing of the DFTB Ewald "// &
     349              :                           "neighbor lists ", &
     350              :                           default_l_val=.FALSE., &
     351         9368 :                           lone_keyword_l_val=.TRUE.)
     352         9368 :       CALL section_add_keyword(print_key, keyword)
     353         9368 :       CALL keyword_release(keyword)
     354              : 
     355              :       CALL keyword_create(keyword, __LOCATION__, &
     356              :                           name="sab_xtbe", &
     357              :                           description="Activates the printing of the xTB sr-Coulomb "// &
     358              :                           "neighbor lists ", &
     359              :                           default_l_val=.FALSE., &
     360         9368 :                           lone_keyword_l_val=.TRUE.)
     361         9368 :       CALL section_add_keyword(print_key, keyword)
     362         9368 :       CALL keyword_release(keyword)
     363              : 
     364              :       CALL keyword_create(keyword, __LOCATION__, &
     365              :                           name="sab_core", &
     366              :                           description="Activates the printing of core interaction "// &
     367              :                           "neighbor lists ", &
     368              :                           default_l_val=.FALSE., &
     369         9368 :                           lone_keyword_l_val=.TRUE.)
     370         9368 :       CALL section_add_keyword(print_key, keyword)
     371         9368 :       CALL keyword_release(keyword)
     372              : 
     373              :       CALL keyword_create(keyword, __LOCATION__, &
     374              :                           name="sab_xb", &
     375              :                           description="Activates the printing of XB interaction from (xTB) "// &
     376              :                           "neighbor lists ", &
     377              :                           default_l_val=.FALSE., &
     378         9368 :                           lone_keyword_l_val=.TRUE.)
     379         9368 :       CALL section_add_keyword(print_key, keyword)
     380         9368 :       CALL keyword_release(keyword)
     381              : 
     382              :       CALL keyword_create(keyword, __LOCATION__, &
     383              :                           name="sab_xtb_nonbond", &
     384              :                           description="Activates the printing of nonbonded interaction from (xTB) "// &
     385              :                           "neighbor lists ", &
     386              :                           default_l_val=.FALSE., &
     387         9368 :                           lone_keyword_l_val=.TRUE.)
     388         9368 :       CALL section_add_keyword(print_key, keyword)
     389         9368 :       CALL keyword_release(keyword)
     390              : 
     391              :       CALL keyword_create(keyword, __LOCATION__, &
     392              :                           name="soo_list", &
     393              :                           description="Activates the printing of RI orbital-orbital "// &
     394              :                           "neighbor lists ", &
     395              :                           default_l_val=.FALSE., &
     396         9368 :                           lone_keyword_l_val=.TRUE.)
     397         9368 :       CALL section_add_keyword(print_key, keyword)
     398         9368 :       CALL keyword_release(keyword)
     399              : 
     400              :       CALL keyword_create(keyword, __LOCATION__, &
     401              :                           name="sip_list", &
     402              :                           description="Activates the printing of RI basis-projector interaction "// &
     403              :                           "neighbor lists ", &
     404              :                           default_l_val=.FALSE., &
     405         9368 :                           lone_keyword_l_val=.TRUE.)
     406         9368 :       CALL section_add_keyword(print_key, keyword)
     407         9368 :       CALL keyword_release(keyword)
     408              : 
     409              :       CALL keyword_create(keyword, __LOCATION__, &
     410              :                           name="sab_cneo", &
     411              :                           description="Activates the printing of the nuclear orbital "// &
     412              :                           "nuclear repulsion neighbor lists (erfc potential)", &
     413              :                           default_l_val=.FALSE., &
     414         9368 :                           lone_keyword_l_val=.TRUE.)
     415         9368 :       CALL section_add_keyword(print_key, keyword)
     416         9368 :       CALL keyword_release(keyword)
     417              : 
     418         9368 :       CALL section_add_subsection(section, print_key)
     419         9368 :       CALL section_release(print_key)
     420              : 
     421              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "SUBCELL", &
     422              :                                        description="Activates the printing of the subcells used for the "// &
     423              :                                        "generation of neighbor lists.", unit_str="angstrom", &
     424         9368 :                                        print_level=high_print_level, filename="__STD_OUT__")
     425         9368 :       CALL section_add_subsection(section, print_key)
     426         9368 :       CALL section_release(print_key)
     427              : 
     428              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "AO_MATRICES", &
     429              :                                        description="Controls the printing of the ao (i.e. contracted gaussian) matrices (debug).", &
     430         9368 :                                        print_level=debug_print_level, filename="__STD_OUT__")
     431              :       CALL keyword_create(keyword, __LOCATION__, name="OMIT_HEADERS", &
     432              :                           description="Print only the matrix data, not the row and column headers", &
     433         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     434         9368 :       CALL section_add_keyword(print_key, keyword)
     435         9368 :       CALL keyword_release(keyword)
     436              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
     437              :                           description="Specify the number of digits used to print the AO matrices", &
     438         9368 :                           default_i_val=6)
     439         9368 :       CALL section_add_keyword(print_key, keyword)
     440         9368 :       CALL keyword_release(keyword)
     441              :       CALL keyword_create(keyword, __LOCATION__, name="CORE_HAMILTONIAN", &
     442              :                           description="If the printkey is activated controls the printing of the hamiltonian matrix", &
     443         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     444         9368 :       CALL section_add_keyword(print_key, keyword)
     445         9368 :       CALL keyword_release(keyword)
     446              :       CALL keyword_create(keyword, __LOCATION__, name="DENSITY", &
     447              :                           description="If the printkey is activated controls the printing of the density (P) matrix", &
     448         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     449         9368 :       CALL section_add_keyword(print_key, keyword)
     450         9368 :       CALL keyword_release(keyword)
     451              : 
     452              :       CALL keyword_create(keyword, __LOCATION__, name="KINETIC_ENERGY", &
     453              :                           description="If the printkey is activated controls the printing of the kinetic energy matrix", &
     454         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     455         9368 :       CALL section_add_keyword(print_key, keyword)
     456         9368 :       CALL keyword_release(keyword)
     457              :       CALL keyword_create(keyword, __LOCATION__, name="KOHN_SHAM_MATRIX", &
     458              :                           description="If the printkey is activated controls the printing of the Kohn-Sham matrix", &
     459         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     460         9368 :       CALL section_add_keyword(print_key, keyword)
     461         9368 :       CALL keyword_release(keyword)
     462              :       CALL keyword_create( &
     463              :          keyword, __LOCATION__, name="MATRIX_VXC", &
     464              :          description="If the printkey is activated compute and print the matrix of the exchange and correlation potential. "// &
     465              :          "Only the GGA part for GPW is printed", &
     466         9368 :          default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     467         9368 :       CALL section_add_keyword(print_key, keyword)
     468         9368 :       CALL keyword_release(keyword)
     469              :       CALL keyword_create(keyword, __LOCATION__, name="ORTHO", &
     470              :                           description="If the printkey is activated controls the printing of the orthogonalization matrix", &
     471         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     472         9368 :       CALL section_add_keyword(print_key, keyword)
     473         9368 :       CALL keyword_release(keyword)
     474              :       CALL keyword_create(keyword, __LOCATION__, name="OVERLAP", &
     475              :                           description="If the printkey is activated controls the printing of the overlap matrix", &
     476         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     477         9368 :       CALL section_add_keyword(print_key, keyword)
     478         9368 :       CALL keyword_release(keyword)
     479              :       CALL keyword_create(keyword, __LOCATION__, name="COMMUTATOR_HR", &
     480              :                           description="Controls the printing of the [H,r] commutator matrix", &
     481         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     482         9368 :       CALL section_add_keyword(print_key, keyword)
     483         9368 :       CALL keyword_release(keyword)
     484              : 
     485              :       CALL keyword_create(keyword, __LOCATION__, name="FERMI_CONTACT", &
     486              :                           description="If the printkey is activated controls the printing of the Fermi contact matrix", &
     487         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     488         9368 :       CALL section_add_keyword(print_key, keyword)
     489         9368 :       CALL keyword_release(keyword)
     490              :       CALL keyword_create( &
     491              :          keyword, __LOCATION__, name="PSO", &
     492              :          description="If the printkey is activated controls the printing of the paramagnetic spin-orbit matrices", &
     493         9368 :          default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     494         9368 :       CALL section_add_keyword(print_key, keyword)
     495         9368 :       CALL keyword_release(keyword)
     496              :       CALL keyword_create( &
     497              :          keyword, __LOCATION__, name="EFG", &
     498              :          description="If the printkey is activated controls the printing of the electric field gradient matrices", &
     499         9368 :          default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     500         9368 :       CALL section_add_keyword(print_key, keyword)
     501         9368 :       CALL keyword_release(keyword)
     502              :       CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_ENERGY", &
     503              :                           description="If the printkey is activated controls the printing of the potential energy matrix", &
     504         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     505         9368 :       CALL section_add_keyword(print_key, keyword)
     506         9368 :       CALL keyword_release(keyword)
     507              :       CALL keyword_create(keyword, __LOCATION__, name="OCE_HARD", &
     508              :                           description="If the printkey is activated controls the printing of the OCE HARD matrix", &
     509         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     510         9368 :       CALL section_add_keyword(print_key, keyword)
     511         9368 :       CALL keyword_release(keyword)
     512              :       CALL keyword_create(keyword, __LOCATION__, name="OCE_SOFT", &
     513              :                           description="If the printkey is activated controls the printing of the OCE SOFT matrix", &
     514         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     515         9368 :       CALL section_add_keyword(print_key, keyword)
     516         9368 :       CALL keyword_release(keyword)
     517              :       CALL keyword_create(keyword, __LOCATION__, name="W_MATRIX", &
     518              :                           description="If the printkey is activated controls the printing of the w matrix", &
     519         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     520         9368 :       CALL section_add_keyword(print_key, keyword)
     521         9368 :       CALL keyword_release(keyword)
     522              :       CALL keyword_create(keyword, __LOCATION__, name="W_MATRIX_AUX_FIT", &
     523              :                           description="If the printkey is activated controls the printing of the w matrix", &
     524         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     525         9368 :       CALL section_add_keyword(print_key, keyword)
     526         9368 :       CALL keyword_release(keyword)
     527              :       CALL keyword_create(keyword, __LOCATION__, name="DERIVATIVES", &
     528              :                           description="If the printkey is activated controls the printing "// &
     529              :                           "of derivatives (for the matrixes that support this)", &
     530         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     531         9368 :       CALL section_add_keyword(print_key, keyword)
     532         9368 :       CALL keyword_release(keyword)
     533         9368 :       CALL section_add_subsection(section, print_key)
     534         9368 :       CALL section_release(print_key)
     535              : 
     536              :       CALL cp_print_key_section_create( &
     537              :          print_key, __LOCATION__, "MO", &
     538              :          description="Controls the printing of the molecular orbital (MO) information. The requested MO information "// &
     539              :          "is printed for all occupied MOs by default. Use the MO_INDEX_RANGE keyword to restrict the number "// &
     540              :          "of the MOs or to print the MO information for unoccupied MOs. With diagonalization, additional MOs "// &
     541              :          "have to be made available for printout using the ADDED_MOS keyword in the SCF section. With OT, "// &
     542              :          "it is sufficient to specify the desired MO_INDEX_RANGE. The OT eigensolver can be controlled with "// &
     543              :          "the EPS_LUMO and MAX_ITER_LUMO keywords in the SCF section.", &
     544         9368 :          print_level=high_print_level, filename="__STD_OUT__")
     545              :       CALL keyword_create(keyword, __LOCATION__, name="CARTESIAN", &
     546              :                           description="Print the MOs in the Cartesian basis instead of the default spherical basis.", &
     547         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     548         9368 :       CALL section_add_keyword(print_key, keyword)
     549         9368 :       CALL keyword_release(keyword)
     550              :       CALL keyword_create(keyword, __LOCATION__, name="ENERGIES", &
     551              :                           variants=s2a("EIGENVALUES", "EIGVALS"), &
     552              :                           description="Print the MO energies (eigenvalues).", &
     553         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     554         9368 :       CALL section_add_keyword(print_key, keyword)
     555         9368 :       CALL keyword_release(keyword)
     556              :       CALL keyword_create(keyword, __LOCATION__, name="COEFFICIENTS", &
     557              :                           variants=s2a("EIGENVECTORS", "EIGVECS"), &
     558              :                           description="Print the MO coefficients (eigenvectors).", &
     559         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     560         9368 :       CALL section_add_keyword(print_key, keyword)
     561         9368 :       CALL keyword_release(keyword)
     562              :       CALL keyword_create(keyword, __LOCATION__, name="OCCUPATION_NUMBERS", &
     563              :                           variants=s2a("OCCNUMS"), &
     564              :                           description="Print the MO occupation numbers.", &
     565         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     566         9368 :       CALL section_add_keyword(print_key, keyword)
     567         9368 :       CALL keyword_release(keyword)
     568              :       CALL keyword_create(keyword, __LOCATION__, name="OCCUPATION_NUMBERS_STATS", &
     569              :                           variants=s2a("OCCNUMSTATS"), &
     570              :                           description="Print some stats (max number of occupied MOs, etc.) of the MO occupation numbers."// &
     571              :                           " First logical toggles stats printing, first real is the occupied threshold.", &
     572              :                           type_of_var=char_t, n_var=-1, &
     573              :                           default_c_vals=[".FALSE.", "1.0E-6 "], &
     574              :                           lone_keyword_c_vals=[".TRUE."], &
     575        37472 :                           usage="OCCUPATION_NUMBERS_STATS {Logical} [{Real}]")
     576         9368 :       CALL section_add_keyword(print_key, keyword)
     577         9368 :       CALL keyword_release(keyword)
     578              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
     579              :                           description="Specify the number of digits used to print the MO information.", &
     580         9368 :                           default_i_val=6)
     581         9368 :       CALL section_add_keyword(print_key, keyword)
     582         9368 :       CALL keyword_release(keyword)
     583              :       CALL keyword_create(keyword, __LOCATION__, &
     584              :                           name="MO_INDEX_RANGE", &
     585              :                           variants=s2a("MO_RANGE", "RANGE"), &
     586              :                           description="Print only the requested subset of MOs. The indices of the first and "// &
     587              :                           "the last MO have to be specified to define the range. -1 as the last MO index "// &
     588              :                           "prints all available orbitals with diagonalisation (ADDED_MOS) and all orbitals with OT.", &
     589              :                           repeats=.FALSE., &
     590              :                           n_var=2, &
     591              :                           type_of_var=integer_t, &
     592              :                           default_i_vals=[0, 0], &
     593         9368 :                           usage="MO_INDEX_RANGE 10 15")
     594         9368 :       CALL section_add_keyword(print_key, keyword)
     595         9368 :       CALL keyword_release(keyword)
     596         9368 :       CALL section_add_subsection(section, print_key)
     597         9368 :       CALL section_release(print_key)
     598              : 
     599              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "MO_MOLDEN", &
     600              :                                        description="Write the molecular orbitals in Molden file format, for visualisation.", &
     601         9368 :                                        print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MOS")
     602              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
     603              :                           description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
     604              :                           usage="NDIGITS {int}", &
     605         9368 :                           default_i_val=3)
     606         9368 :       CALL section_add_keyword(print_key, keyword)
     607         9368 :       CALL keyword_release(keyword)
     608              :       CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
     609              :                           description="Representation of Gaussian-type orbitals", &
     610              :                           default_i_val=gto_spherical, &
     611              :                           enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
     612              :                           enum_desc=s2a( &
     613              :                           "Cartesian Gaussian orbitals. Use with caution", &
     614              :                           "Spherical Gaussian orbitals. Incompatible with VMD"), &
     615         9368 :                           enum_i_vals=[gto_cartesian, gto_spherical])
     616         9368 :       CALL section_add_keyword(print_key, keyword)
     617         9368 :       CALL keyword_release(keyword)
     618         9368 :       CALL section_add_subsection(section, print_key)
     619         9368 :       CALL section_release(print_key)
     620              : 
     621         9368 :       CALL create_mo_section(print_key, "MO_CUBES", "cube", [2, 2, 2], "STRIDE 1 1 1", high_print_level, "write_cube")
     622              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     623              :                           description="append the cube files when they already exist", &
     624         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     625         9368 :       CALL section_add_keyword(print_key, keyword)
     626         9368 :       CALL keyword_release(keyword)
     627              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
     628              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
     629         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
     630         9368 :       CALL section_add_keyword(print_key, keyword)
     631         9368 :       CALL keyword_release(keyword)
     632         9368 :       CALL section_add_subsection(section, print_key)
     633         9368 :       CALL section_release(print_key)
     634              : 
     635              :       CALL create_mo_section( &
     636         9368 :          print_key, "MO_OPENPMD", "openPMD", [1, 1, 1], "STRIDE 2 2 2", debug_print_level + 1, "write_openpmd")
     637         9368 :       CALL add_generic_openpmd_arguments(print_key)
     638         9368 :       CALL section_add_subsection(section, print_key)
     639         9368 :       CALL section_release(print_key)
     640              : 
     641         9368 :       CALL create_stm_section(print_key)
     642         9368 :       CALL section_add_subsection(section, print_key)
     643         9368 :       CALL section_release(print_key)
     644              : 
     645         9368 :       CALL create_wfn_mix_section(subsection)
     646         9368 :       CALL section_add_subsection(section, subsection)
     647         9368 :       CALL section_release(subsection)
     648              : 
     649              :       CALL section_create(subsection, __LOCATION__, name="TREXIO", &
     650              :                           description="Write a TREXIO file to disk.", &
     651         9368 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
     652              :       CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
     653              :                           description="Body of Filename for the trexio file.", &
     654              :                           usage="FILENAME {name}", default_c_val="TREXIO", &
     655         9368 :                           type_of_var=char_t)
     656         9368 :       CALL section_add_keyword(subsection, keyword)
     657         9368 :       CALL keyword_release(keyword)
     658              :       CALL keyword_create(keyword, __LOCATION__, name="CARTESIAN", &
     659              :                           description="Store the MOs in the Cartesian basis instead of the default spherical basis.", &
     660         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     661         9368 :       CALL section_add_keyword(subsection, keyword)
     662         9368 :       CALL keyword_release(keyword)
     663         9368 :       CALL section_add_subsection(section, subsection)
     664         9368 :       CALL section_release(subsection)
     665              : 
     666              :       CALL section_create(subsection, __LOCATION__, name="GAPW", &
     667              :                           description="Controls the printing of some gapw related information (debug).", &
     668         9368 :                           n_keywords=0, n_subsections=1, repeats=.FALSE.)
     669              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "projectors", &
     670              :                                        description="If the printkey is activated controls if information on"// &
     671              :                                        " the projectors is printed.", &
     672         9368 :                                        print_level=debug_print_level, filename="__STD_OUT__")
     673         9368 :       CALL section_add_subsection(subsection, print_key)
     674         9368 :       CALL section_release(print_key)
     675              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "rho0_information", &
     676              :                                        description="If the printkey is activated controls if information on rho0 is printed.", &
     677         9368 :                                        print_level=debug_print_level, filename="__STD_OUT__", unit_str="angstrom")
     678         9368 :       CALL section_add_subsection(subsection, print_key)
     679         9368 :       CALL section_release(print_key)
     680         9368 :       CALL section_add_subsection(section, subsection)
     681         9368 :       CALL section_release(subsection)
     682              : 
     683              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "dft_control_parameters", &
     684              :                                        description="Controls the printing of dft control parameters.", &
     685         9368 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     686         9368 :       CALL section_add_subsection(section, print_key)
     687         9368 :       CALL section_release(print_key)
     688              : 
     689              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "KPOINTS", &
     690              :                                        description="Controls the printing of kpoint information.", &
     691         9368 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     692         9368 :       CALL section_add_subsection(section, print_key)
     693         9368 :       CALL section_release(print_key)
     694              : 
     695         9368 :       NULLIFY (subsection)
     696         9368 :       CALL create_bandstructure_section(subsection)
     697         9368 :       CALL section_add_subsection(section, subsection)
     698         9368 :       CALL section_release(subsection)
     699              : 
     700              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "OVERLAP_CONDITION", &
     701              :                                        description="Controls the checking and printing of an estimate "// &
     702              :                                        "of the overlap matrix condition number", &
     703         9368 :                                        print_level=debug_print_level, filename="__STD_OUT__")
     704              :       CALL keyword_create(keyword, __LOCATION__, name="1-NORM", &
     705              :                           description="Calculate an estimate of the 1-norm condition number", &
     706         9368 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     707         9368 :       CALL section_add_keyword(print_key, keyword)
     708         9368 :       CALL keyword_release(keyword)
     709              :       CALL keyword_create(keyword, __LOCATION__, name="DIAGONALIZATION", &
     710              :                           description="Calculate the 1- and 2-norm condition numbers using diagonalization", &
     711         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     712         9368 :       CALL section_add_keyword(print_key, keyword)
     713         9368 :       CALL keyword_release(keyword)
     714              :       CALL keyword_create(keyword, __LOCATION__, name="ARNOLDI", &
     715              :                           description="Calculate the 2-norm condition number using the Arnoldi code (may not be reliable)", &
     716         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     717         9368 :       CALL section_add_keyword(print_key, keyword)
     718         9368 :       CALL keyword_release(keyword)
     719         9368 :       CALL section_add_subsection(section, print_key)
     720         9368 :       CALL section_release(print_key)
     721              : 
     722              :       CALL create_e_density_section( &
     723              :          print_key, &
     724              :          "E_DENSITY_OPENPMD", &
     725              :          "openPMD", &
     726              :          [1, 1, 1], &
     727              :          "STRIDE 1 1 1", &
     728         9368 :          debug_print_level + 1)
     729         9368 :       CALL add_generic_openpmd_arguments(print_key)
     730         9368 :       CALL section_add_subsection(section, print_key)
     731         9368 :       CALL section_release(print_key)
     732              : 
     733         9368 :       CALL create_e_density_section(print_key, "E_DENSITY_CUBE", "cube", [2, 2, 2], "STRIDE 2 2 2", high_print_level)
     734              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     735              :                           description="append the cube files when they already exist", &
     736         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     737         9368 :       CALL section_add_keyword(print_key, keyword)
     738         9368 :       CALL keyword_release(keyword)
     739              : 
     740              :       CALL keyword_create(keyword, __LOCATION__, name="XRD_INTERFACE", &
     741              :                           description="It activates the print out of exponents and coefficients for the"// &
     742              :                           " Gaussian expansion of the core densities, based on atom calculations for each kind."// &
     743              :                           " The resulting core dansities are needed to compute the form factors."// &
     744              :                           " If GAPW the local densities are also given in terms of a Gaussian expansion,"// &
     745              :                           " by fitting the difference between local-fhard and local-soft density for each atom."// &
     746              :                           " In this case the keyword SOFT_DENSITY is enabled.", &
     747         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     748         9368 :       CALL section_add_keyword(print_key, keyword)
     749         9368 :       CALL keyword_release(keyword)
     750              : 
     751              :       CALL keyword_create(keyword, __LOCATION__, name="NGAUSS", &
     752              :                           description="Number of Gaussian functions used in the expansion of atomic (core) density", &
     753         9368 :                           usage="NGAUSS 10", n_var=1, default_i_val=12, type_of_var=integer_t)
     754         9368 :       CALL section_add_keyword(print_key, keyword)
     755         9368 :       CALL keyword_release(keyword)
     756              : 
     757         9368 :       CALL section_add_subsection(section, print_key)
     758         9368 :       CALL section_release(print_key)
     759              : 
     760              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "tot_density_cube", &
     761              :                                        description="Controls printing of cube files with "// &
     762              :                                        "the total density (electrons+atomic core). Note that "// &
     763              :                                        "the value of the total density is positive where the "// &
     764              :                                        "electron density dominates and negative where the core is. "// &
     765              :                                        "When GPW is enabled this will simply print the combined density "// &
     766              :                                        "of the valence electrons and charge-balanced core. In GAPW the "// &
     767              :                                        "electronic density (hard+soft plus a correction term) is printed "// &
     768              :                                        "together with the charge-balanced core density to produce a complete "// &
     769              :                                        "representation of the total density.", &
     770         9368 :                                        print_level=high_print_level, filename="")
     771              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
     772              :                           description="The stride (X,Y,Z) used to write the cube file "// &
     773              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
     774              :                           " 1 number valid for all components.", &
     775         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
     776         9368 :       CALL section_add_keyword(print_key, keyword)
     777         9368 :       CALL keyword_release(keyword)
     778              : 
     779              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     780              :                           description="append the cube files when they already exist", &
     781         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     782         9368 :       CALL section_add_keyword(print_key, keyword)
     783         9368 :       CALL keyword_release(keyword)
     784              : 
     785              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
     786              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
     787         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
     788         9368 :       CALL section_add_keyword(print_key, keyword)
     789         9368 :       CALL keyword_release(keyword)
     790              : 
     791         9368 :       CALL section_add_subsection(section, print_key)
     792         9368 :       CALL section_release(print_key)
     793              : 
     794              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "v_hartree_cube", &
     795              :                                        description="Controls the printing of a cube file with eletrostatic"// &
     796              :                                        " potential generated by the total density (electrons+ions). It is"// &
     797              :                                        " valid only for QS with GPW formalism."// &
     798              :                                        " Note that by convention the potential has opposite sign than the expected physical one.", &
     799         9368 :                                        print_level=high_print_level, filename="")
     800              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
     801              :                           description="The stride (X,Y,Z) used to write the cube file "// &
     802              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
     803              :                           " 1 number valid for all components.", &
     804         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
     805         9368 :       CALL section_add_keyword(print_key, keyword)
     806         9368 :       CALL keyword_release(keyword)
     807              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     808              :                           description="append the cube files when they already exist", &
     809         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     810         9368 :       CALL section_add_keyword(print_key, keyword)
     811         9368 :       CALL keyword_release(keyword)
     812              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
     813              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
     814         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
     815         9368 :       CALL section_add_keyword(print_key, keyword)
     816         9368 :       CALL keyword_release(keyword)
     817              : 
     818         9368 :       CALL section_add_subsection(section, print_key)
     819         9368 :       CALL section_release(print_key)
     820              : 
     821              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "external_potential_cube", &
     822              :                                        description="Controls the printing of a cube file with external"// &
     823              :                                        " potential from the DFT%EXTERNAL_POTENTIAL section only.", &
     824         9368 :                                        print_level=high_print_level, filename="")
     825              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
     826              :                           description="The stride (X,Y,Z) used to write the cube file "// &
     827              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
     828              :                           " 1 number valid for all components.", &
     829         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
     830         9368 :       CALL section_add_keyword(print_key, keyword)
     831         9368 :       CALL keyword_release(keyword)
     832              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     833              :                           description="append the cube files when they already exist", &
     834         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     835         9368 :       CALL section_add_keyword(print_key, keyword)
     836         9368 :       CALL keyword_release(keyword)
     837              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
     838              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
     839         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
     840         9368 :       CALL section_add_keyword(print_key, keyword)
     841         9368 :       CALL keyword_release(keyword)
     842         9368 :       CALL section_add_subsection(section, print_key)
     843         9368 :       CALL section_release(print_key)
     844              : 
     845              :       ! Output of BQB volumetric files
     846              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name="E_DENSITY_BQB", &
     847              :                                        description="Controls the output of the electron density to the losslessly"// &
     848              :                                        " compressed BQB file format, see [Brehm2018]"// &
     849              :                                        " (via LibBQB see <https://brehm-research.de/bqb>)."// &
     850              :                                        " Currently does not work with changing cell vector (NpT ensemble).", &
     851              :                                        print_level=debug_print_level + 1, filename="", &
     852        18736 :                                        citations=[Brehm2018])
     853              : 
     854              :       CALL keyword_create(keyword, __LOCATION__, name="SKIP_FIRST", &
     855              :                           description="Skips the first step of a MD run (avoids duplicate step if restarted).", &
     856         9368 :                           usage="SKIP_FIRST T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     857         9368 :       CALL section_add_keyword(print_key, keyword)
     858         9368 :       CALL keyword_release(keyword)
     859              : 
     860              :       CALL keyword_create(keyword, __LOCATION__, name="STORE_STEP_NUMBER", &
     861              :                           description="Stores the step number and simulation time in the comment line of each BQB"// &
     862              :                           " frame. Switch it off for binary compatibility with original CP2k CUBE files.", &
     863         9368 :                           usage="STORE_STEP_NUMBER F", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     864         9368 :       CALL section_add_keyword(print_key, keyword)
     865         9368 :       CALL keyword_release(keyword)
     866              : 
     867              :       CALL keyword_create(keyword, __LOCATION__, name="CHECK", &
     868              :                           description="Performs an on-the-fly decompression of each compressed BQB frame to check"// &
     869              :                           " whether the volumetric data exactly matches, and aborts the run if not so.", &
     870         9368 :                           usage="CHECK T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     871         9368 :       CALL section_add_keyword(print_key, keyword)
     872         9368 :       CALL keyword_release(keyword)
     873              : 
     874              :       CALL keyword_create(keyword, __LOCATION__, name="OVERWRITE", &
     875              :                           description="Specify this keyword to overwrite the output BQB file if"// &
     876              :                           " it already exists. By default, the data is appended to an existing file.", &
     877         9368 :                           usage="OVERWRITE T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     878         9368 :       CALL section_add_keyword(print_key, keyword)
     879         9368 :       CALL keyword_release(keyword)
     880              : 
     881              :       CALL keyword_create(keyword, __LOCATION__, name="HISTORY", &
     882              :                           description="Controls how many previous steps are taken into account for extrapolation in"// &
     883              :                           " compression. Use a value of 1 to compress the frames independently.", &
     884         9368 :                           usage="HISTORY 10", n_var=1, default_i_val=10, type_of_var=integer_t)
     885         9368 :       CALL section_add_keyword(print_key, keyword)
     886         9368 :       CALL keyword_release(keyword)
     887              : 
     888              :       CALL keyword_create(keyword, __LOCATION__, name="PARAMETER_KEY", &
     889              :                           description="Allows to supply previously optimized compression parameters via a"// &
     890              :                           " parameter key (alphanumeric character sequence starting with 'at')."// &
     891              :                           " Just leave away the 'at' sign here, because CP2k will otherwise"// &
     892              :                           " assume it is a variable name in the input", &
     893         9368 :                           usage="PARAMETER_KEY <KEY>", n_var=1, default_c_val="", type_of_var=char_t)
     894         9368 :       CALL section_add_keyword(print_key, keyword)
     895         9368 :       CALL keyword_release(keyword)
     896              : 
     897              :       CALL keyword_create(keyword, __LOCATION__, name="OPTIMIZE", &
     898              :                           description="Controls the time spent to optimize the parameters for compression efficiency.", &
     899              :                           usage="OPTIMIZE {OFF,QUICK,NORMAL,PATIENT,EXHAUSTIVE}", repeats=.FALSE., n_var=1, &
     900              :                           default_i_val=bqb_opt_quick, &
     901              :                           enum_c_vals=s2a("OFF", "QUICK", "NORMAL", "PATIENT", "EXHAUSTIVE"), &
     902              :                           enum_desc=s2a("No optimization (use defaults)", "Quick optimization", &
     903              :                                         "Standard optimization", "Precise optimization", "Exhaustive optimization"), &
     904         9368 :                           enum_i_vals=[bqb_opt_off, bqb_opt_quick, bqb_opt_normal, bqb_opt_patient, bqb_opt_exhaustive])
     905         9368 :       CALL section_add_keyword(print_key, keyword)
     906         9368 :       CALL keyword_release(keyword)
     907              : 
     908         9368 :       CALL section_add_subsection(section, print_key)
     909         9368 :       CALL section_release(print_key)
     910              : 
     911              :       ! Voronoi Integration via LibVori
     912         9368 :       CALL create_print_voronoi_section(print_key)
     913         9368 :       CALL section_add_subsection(section, print_key)
     914         9368 :       CALL section_release(print_key)
     915              : 
     916              :       ! cube files for data generated by the implicit (generalized) Poisson solver
     917         9368 :       CALL create_implicit_psolver_section(subsection)
     918         9368 :       CALL section_add_subsection(section, subsection)
     919         9368 :       CALL section_release(subsection)
     920              : 
     921              :       ! ZMP adding the print section for  the v_xc cube
     922              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "v_xc_cube", &
     923              :                                        description="Controls the printing of a cube file with xc"// &
     924              :                                        " potential generated by the ZMP method (for the moment). It is"// &
     925              :                                        " valid only for QS with GPW formalism .", &
     926         9368 :                                        print_level=high_print_level, filename="")
     927              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
     928              :                           description="The stride (X,Y,Z) used to write the cube file "// &
     929              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
     930              :                           " 1 number valid for all components.", &
     931         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
     932         9368 :       CALL section_add_keyword(print_key, keyword)
     933         9368 :       CALL keyword_release(keyword)
     934              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     935              :                           description="append the cube files when they already exist", &
     936         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     937         9368 :       CALL section_add_keyword(print_key, keyword)
     938         9368 :       CALL keyword_release(keyword)
     939              : 
     940         9368 :       CALL section_add_subsection(section, print_key)
     941         9368 :       CALL section_release(print_key)
     942              : 
     943              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "efield_cube", &
     944              :                                        description="Controls the printing of cube files with electric"// &
     945              :                                        " field generated by the total density (electrons+ions). It is"// &
     946              :                                        " valid only for QS with GPW formalism.", &
     947         9368 :                                        print_level=high_print_level, filename="")
     948              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
     949              :                           description="The stride (X,Y,Z) used to write the cube file "// &
     950              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
     951              :                           " 1 number valid for all components.", &
     952         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
     953         9368 :       CALL section_add_keyword(print_key, keyword)
     954         9368 :       CALL keyword_release(keyword)
     955              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     956              :                           description="append the cube files when they already exist", &
     957         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     958         9368 :       CALL section_add_keyword(print_key, keyword)
     959         9368 :       CALL keyword_release(keyword)
     960              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
     961              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
     962         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
     963         9368 :       CALL section_add_keyword(print_key, keyword)
     964         9368 :       CALL keyword_release(keyword)
     965              : 
     966         9368 :       CALL section_add_subsection(section, print_key)
     967         9368 :       CALL section_release(print_key)
     968              : 
     969              :       CALL create_elf_print_section(print_key, "ELF_CUBE", &
     970              :                                     "cube", &
     971         9368 :                                     [2, 2, 2], "STRIDE 2 2 2", high_print_level, "")
     972              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
     973              :                           description="append the cube files when they already exist", &
     974         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     975         9368 :       CALL section_add_keyword(print_key, keyword)
     976         9368 :       CALL keyword_release(keyword)
     977              : 
     978         9368 :       CALL section_add_subsection(section, print_key)
     979         9368 :       CALL section_release(print_key)
     980              : 
     981              :       CALL create_elf_print_section(print_key, "ELF_OPENPMD", &
     982              :                                     "openPMD", &
     983         9368 :                                     [1, 1, 1], "STRIDE 1 1 1", debug_print_level + 1, "")
     984         9368 :       CALL add_generic_openpmd_arguments(print_key)
     985         9368 :       CALL section_add_subsection(section, print_key)
     986         9368 :       CALL section_release(print_key)
     987              : 
     988              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "LOCAL_ENERGY_CUBE", &
     989              :                                        description="Controls the printing of cube files with the local"// &
     990              :                                        " energy. It is valid only for QS with GPW/GAPW formalism."// &
     991              :                                        " Meta and hybrid functionals are not possible.", &
     992         9368 :                                        print_level=debug_print_level, filename="")
     993              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
     994              :                           description="The stride (X,Y,Z) used to write the cube file "// &
     995              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
     996              :                           " 1 number valid for all components.", &
     997         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
     998         9368 :       CALL section_add_keyword(print_key, keyword)
     999         9368 :       CALL keyword_release(keyword)
    1000              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    1001              :                           description="append the cube files when they already exist", &
    1002         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1003         9368 :       CALL section_add_keyword(print_key, keyword)
    1004         9368 :       CALL keyword_release(keyword)
    1005              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
    1006              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
    1007         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
    1008         9368 :       CALL section_add_keyword(print_key, keyword)
    1009         9368 :       CALL keyword_release(keyword)
    1010              : 
    1011         9368 :       CALL section_add_subsection(section, print_key)
    1012         9368 :       CALL section_release(print_key)
    1013              : 
    1014              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "LOCAL_STRESS_CUBE", &
    1015              :                                        description="Controls the printing of cube files with the local"// &
    1016              :                                        " stress. It is valid only for QS with GPW/GAPW formalism."// &
    1017              :                                        " Meta and hybrid functionals are not possible.", &
    1018         9368 :                                        print_level=debug_print_level, filename="")
    1019              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    1020              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    1021              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    1022              :                           " 1 number valid for all components.", &
    1023         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    1024         9368 :       CALL section_add_keyword(print_key, keyword)
    1025         9368 :       CALL keyword_release(keyword)
    1026              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    1027              :                           description="append the cube files when they already exist", &
    1028         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1029         9368 :       CALL section_add_keyword(print_key, keyword)
    1030         9368 :       CALL keyword_release(keyword)
    1031              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
    1032              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
    1033         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
    1034         9368 :       CALL section_add_keyword(print_key, keyword)
    1035         9368 :       CALL keyword_release(keyword)
    1036              : 
    1037         9368 :       CALL section_add_subsection(section, print_key)
    1038         9368 :       CALL section_release(print_key)
    1039              : 
    1040         9368 :       CALL create_dos_section(print_key)
    1041         9368 :       CALL section_add_subsection(section, print_key)
    1042         9368 :       CALL section_release(print_key)
    1043              : 
    1044         9368 :       CALL create_pdos_section(print_key)
    1045         9368 :       CALL section_add_subsection(section, print_key)
    1046         9368 :       CALL section_release(print_key)
    1047              : 
    1048         9368 :       CALL create_wannier_section(print_key)
    1049         9368 :       CALL section_add_subsection(section, print_key)
    1050         9368 :       CALL section_release(print_key)
    1051              : 
    1052              :       !Printing of Moments
    1053         9368 :       CALL create_dipoles_section(print_key, "MOMENTS", high_print_level)
    1054              :       CALL keyword_create( &
    1055              :          keyword, __LOCATION__, &
    1056              :          name="MAX_MOMENT", &
    1057              :          description="Maximum moment to be calculated. Values higher than 1 not implemented under periodic boundaries.", &
    1058              :          usage="MAX_MOMENT {integer}", &
    1059              :          repeats=.FALSE., &
    1060              :          n_var=1, &
    1061              :          type_of_var=integer_t, &
    1062         9368 :          default_i_val=1)
    1063         9368 :       CALL section_add_keyword(print_key, keyword)
    1064         9368 :       CALL keyword_release(keyword)
    1065              :       CALL keyword_create(keyword, __LOCATION__, &
    1066              :                           name="MAGNETIC", &
    1067              :                           description="Calculate also magnetic moments, only implemented without periodic boundaries", &
    1068              :                           usage="MAGNETIC yes", &
    1069              :                           repeats=.FALSE., &
    1070              :                           n_var=1, &
    1071              :                           default_l_val=.FALSE., &
    1072         9368 :                           lone_keyword_l_val=.TRUE.)
    1073         9368 :       CALL section_add_keyword(print_key, keyword)
    1074         9368 :       CALL keyword_release(keyword)
    1075              :       CALL keyword_create(keyword, __LOCATION__, &
    1076              :                           name="VEL_REPRS", &
    1077              :                           description="Calculate expectation values of the el. multipole moments in their velocity "// &
    1078              :                           "representation during RTP. Implemented up to el. quadrupole moment.", &
    1079              :                           usage="VEL_REPRS yes", &
    1080              :                           repeats=.FALSE., &
    1081              :                           n_var=1, &
    1082              :                           default_l_val=.FALSE., &
    1083         9368 :                           lone_keyword_l_val=.TRUE.)
    1084         9368 :       CALL section_add_keyword(print_key, keyword)
    1085         9368 :       CALL keyword_release(keyword)
    1086              :       CALL keyword_create(keyword, __LOCATION__, &
    1087              :                           name="COM_NL", &
    1088              :                           description="Include non local commutator for velocity representations. "// &
    1089              :                           "Necessary for origin independent results.", &
    1090              :                           usage="COM_NL yes", &
    1091              :                           repeats=.FALSE., &
    1092              :                           n_var=1, &
    1093              :                           default_l_val=.FALSE., &
    1094         9368 :                           lone_keyword_l_val=.TRUE.)
    1095         9368 :       CALL section_add_keyword(print_key, keyword)
    1096         9368 :       CALL keyword_release(keyword)
    1097              :       CALL keyword_create(keyword, __LOCATION__, &
    1098              :                           name="SECOND_REFERENCE_POINT", &
    1099              :                           description="Use second reference point", &
    1100              :                           usage="SECOND_REFERENCE_POINT .TRUE.", &
    1101              :                           repeats=.FALSE., &
    1102              :                           n_var=1, &
    1103              :                           default_l_val=.FALSE., &
    1104         9368 :                           lone_keyword_l_val=.TRUE.)
    1105         9368 :       CALL section_add_keyword(print_key, keyword)
    1106         9368 :       CALL keyword_release(keyword)
    1107              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_2", &
    1108              :                           variants=s2a("REF_2"), &
    1109              :                           description="Define a second reference point for the calculation of the electrostatic moment.", &
    1110              :                           usage="REFERENCE_2 COM", &
    1111              :                           enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
    1112              :                           enum_desc=s2a("Use Center of Mass", &
    1113              :                                         "Use Center of Atomic Charges", &
    1114              :                                         "Use User Defined Point (Keyword:REF_POINT)", &
    1115              :                                         "Use Origin of Coordinate System"), &
    1116              :                           enum_i_vals=[use_mom_ref_com, &
    1117              :                                        use_mom_ref_coac, &
    1118              :                                        use_mom_ref_user, &
    1119              :                                        use_mom_ref_zero], &
    1120         9368 :                           default_i_val=use_mom_ref_zero)
    1121         9368 :       CALL section_add_keyword(print_key, keyword)
    1122         9368 :       CALL keyword_release(keyword)
    1123              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT_2", &
    1124              :                           variants=s2a("REF_POINT_2"), &
    1125              :                           description="Fixed second reference point for the calculations of the electrostatic moment.", &
    1126              :                           usage="REFERENCE_POINT_2 x y z", &
    1127              :                           repeats=.FALSE., &
    1128              :                           n_var=3, default_r_vals=[0._dp, 0._dp, 0._dp], &
    1129              :                           type_of_var=real_t, &
    1130         9368 :                           unit_str='bohr')
    1131         9368 :       CALL section_add_keyword(print_key, keyword)
    1132         9368 :       CALL keyword_release(keyword)
    1133              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_NMO", &
    1134              :                           description="Maximum number of molecular orbitals closest to the Fermi "// &
    1135              :                           "level for which dipole matrix elements and Berry curvatures are printed "// &
    1136              :                           "per k-point. 0 for all orbitals. Ignored if not a KPOINT calculation.", &
    1137              :                           usage="MAX_NMO {integer}", &
    1138              :                           repeats=.FALSE., &
    1139              :                           n_var=1, default_i_val=10, &
    1140         9368 :                           type_of_var=integer_t)
    1141         9368 :       CALL section_add_keyword(print_key, keyword)
    1142         9368 :       CALL keyword_release(keyword)
    1143         9368 :       CALL create_kpoint_set_section(subsection)
    1144         9368 :       CALL section_add_subsection(print_key, subsection)
    1145         9368 :       CALL section_release(subsection)
    1146         9368 :       CALL create_kpoints_section(subsection)
    1147         9368 :       CALL section_add_subsection(print_key, subsection)
    1148         9368 :       CALL section_release(subsection)
    1149         9368 :       CALL section_add_subsection(section, print_key)
    1150         9368 :       CALL section_release(print_key)
    1151              : 
    1152              :       ! Mulliken population analysis
    1153              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "MULLIKEN", &
    1154              :                                        description="Controls the printing of the Mulliken (spin) population analysis", &
    1155              :                                        print_level=medium_print_level, filename="__STD_OUT__", &
    1156         9368 :                                        common_iter_levels=1)
    1157              :       CALL keyword_create( &
    1158              :          keyword, __LOCATION__, &
    1159              :          name="PRINT_GOP", &
    1160              :          description="Print the gross orbital populations (GOP) in addition to the gross atomic populations (GAP) "// &
    1161              :          "and net charges", &
    1162              :          usage="PRINT_GOP yes", &
    1163              :          repeats=.FALSE., &
    1164              :          n_var=1, &
    1165              :          default_l_val=.FALSE., &
    1166         9368 :          lone_keyword_l_val=.TRUE.)
    1167         9368 :       CALL section_add_keyword(print_key, keyword)
    1168         9368 :       CALL keyword_release(keyword)
    1169              :       CALL keyword_create( &
    1170              :          keyword, __LOCATION__, &
    1171              :          name="PRINT_ALL", &
    1172              :          description="Print all information including the full net AO and overlap population matrix", &
    1173              :          usage="PRINT_ALL yes", &
    1174              :          repeats=.FALSE., &
    1175              :          n_var=1, &
    1176              :          default_l_val=.FALSE., &
    1177         9368 :          lone_keyword_l_val=.TRUE.)
    1178         9368 :       CALL section_add_keyword(print_key, keyword)
    1179         9368 :       CALL keyword_release(keyword)
    1180         9368 :       CALL section_add_subsection(section, print_key)
    1181         9368 :       CALL section_release(print_key)
    1182              : 
    1183              :       ! Lowdin population analysis (fairly expensive to compute, so only at high)
    1184              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "LOWDIN", &
    1185              :                                        description="Controls the printing of the Lowdin (spin) population analysis", &
    1186              :                                        print_level=high_print_level, filename="__STD_OUT__", &
    1187         9368 :                                        common_iter_levels=1)
    1188              :       CALL keyword_create( &
    1189              :          keyword, __LOCATION__, &
    1190              :          name="PRINT_GOP", &
    1191              :          description="Print the orbital populations in addition to the atomic populations and net charges", &
    1192              :          usage="PRINT_GOP yes", &
    1193              :          repeats=.FALSE., &
    1194              :          n_var=1, &
    1195              :          default_l_val=.FALSE., &
    1196         9368 :          lone_keyword_l_val=.TRUE.)
    1197         9368 :       CALL section_add_keyword(print_key, keyword)
    1198         9368 :       CALL keyword_release(keyword)
    1199              :       CALL keyword_create( &
    1200              :          keyword, __LOCATION__, &
    1201              :          name="PRINT_ALL", &
    1202              :          description="Print all information including the full symmetrically orthogonalised density matrix", &
    1203              :          usage="PRINT_ALL yes", &
    1204              :          repeats=.FALSE., &
    1205              :          n_var=1, &
    1206              :          default_l_val=.FALSE., &
    1207         9368 :          lone_keyword_l_val=.TRUE.)
    1208         9368 :       CALL section_add_keyword(print_key, keyword)
    1209         9368 :       CALL keyword_release(keyword)
    1210         9368 :       CALL section_add_subsection(section, print_key)
    1211         9368 :       CALL section_release(print_key)
    1212              : 
    1213              :       ! Hirshfeld population analysis
    1214              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "HIRSHFELD", &
    1215              :                                        description="Controls the printing of the Hirshfeld (spin) population analysis", &
    1216              :                                        print_level=medium_print_level, filename="__STD_OUT__", &
    1217         9368 :                                        common_iter_levels=1)
    1218              :       CALL keyword_create(keyword, __LOCATION__, name="SELF_CONSISTENT", &
    1219              :                           description="Calculate charges from the Hirscheld-I (self_consistent) method."// &
    1220              :                           " This scales only the full shape function, not the added charge as in the original scheme.", &
    1221              :                           usage="SELF_CONSISTENT yes", repeats=.FALSE., n_var=1, &
    1222         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1223         9368 :       CALL section_add_keyword(print_key, keyword)
    1224         9368 :       CALL keyword_release(keyword)
    1225              :       CALL keyword_create(keyword, __LOCATION__, name="SHAPE_FUNCTION", &
    1226              :                           description="Type of shape function used for Hirshfeld partitioning.", &
    1227              :                           usage="SHAPE_FUNCTION {Gaussian,Density}", repeats=.FALSE., n_var=1, &
    1228              :                           default_i_val=shape_function_gaussian, &
    1229              :                           enum_c_vals=s2a("GAUSSIAN", "DENSITY"), &
    1230              :                           enum_desc=s2a("Single Gaussian with Colvalent radius", &
    1231              :                                         "Atomic density expanded in multiple Gaussians"), &
    1232         9368 :                           enum_i_vals=[shape_function_gaussian, shape_function_density])
    1233         9368 :       CALL section_add_keyword(print_key, keyword)
    1234         9368 :       CALL keyword_release(keyword)
    1235              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_CHARGE", &
    1236              :                           description="Charge of atomic partitioning function for Hirshfeld method.", &
    1237              :                           usage="REFERENCE_CHARGE {Atomic,Mulliken}", repeats=.FALSE., n_var=1, &
    1238              :                           default_i_val=ref_charge_atomic, &
    1239              :                           enum_c_vals=s2a("ATOMIC", "MULLIKEN"), &
    1240              :                           enum_desc=s2a("Use atomic core charges", "Calculate Mulliken charges"), &
    1241         9368 :                           enum_i_vals=[ref_charge_atomic, ref_charge_mulliken])
    1242         9368 :       CALL section_add_keyword(print_key, keyword)
    1243         9368 :       CALL keyword_release(keyword)
    1244              :       CALL keyword_create(keyword, __LOCATION__, name="USER_RADIUS", &
    1245              :                           description="Use user defined radii to generate Gaussians."// &
    1246              :                           " These radii are defined by the keyword ATOMIC_RADII", &
    1247              :                           usage="USER_RADIUS yes", repeats=.FALSE., n_var=1, &
    1248         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1249         9368 :       CALL section_add_keyword(print_key, keyword)
    1250         9368 :       CALL keyword_release(keyword)
    1251              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMIC_RADII", &
    1252              :                           description="Defines custom radii to setup the spherical Gaussians.", &
    1253              :                           usage="ATOMIC_RADII {real} {real} {real}", repeats=.FALSE., &
    1254              :                           unit_str="angstrom", &
    1255         9368 :                           type_of_var=real_t, n_var=-1)
    1256         9368 :       CALL section_add_keyword(print_key, keyword)
    1257         9368 :       CALL keyword_release(keyword)
    1258         9368 :       CALL section_add_subsection(section, print_key)
    1259         9368 :       CALL section_release(print_key)
    1260              : 
    1261              :       ! Print EEQ Charges
    1262              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "EEQ_CHARGES", &
    1263              :                                        description="Controls the printing of the EEQ charges", &
    1264              :                                        print_level=debug_print_level, filename="__STD_OUT__", &
    1265              :                                        common_iter_levels=1, &
    1266        37472 :                                        citations=[Pracht2019, Caldeweyher2019, Caldeweyher2020])
    1267         9368 :       CALL section_add_subsection(section, print_key)
    1268         9368 :       CALL section_release(print_key)
    1269              : 
    1270              :       ! MAO (modified atomic orbital) analysis
    1271              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "MAO_ANALYSIS", &
    1272              :                                        description="Controls the printing of the MAO (modified atomic orbital) analysis", &
    1273              :                                        print_level=debug_print_level, filename="__STD_OUT__", &
    1274              :                                        common_iter_levels=1, &
    1275        28104 :                                        citations=[Heinzmann1976, Ehrhardt1985])
    1276              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
    1277              :                           description="Threshold for matrix elements in MAO determination.", &
    1278              :                           usage="EPS_FILTER reps", repeats=.FALSE., n_var=1, &
    1279         9368 :                           default_r_val=1.e-8_dp, type_of_var=real_t)
    1280         9368 :       CALL section_add_keyword(print_key, keyword)
    1281         9368 :       CALL keyword_release(keyword)
    1282              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_BASIS", &
    1283              :                           description="Basis set used to construct MAO's.", &
    1284              :                           usage="REFERENCE_BASIS {ORBITAL,PRIMITIVE,EXTERNAL}", repeats=.FALSE., n_var=1, &
    1285              :                           default_i_val=mao_basis_orb, &
    1286              :                           enum_c_vals=s2a("ORBITAL", "PRIMITIVE", "EXTERNAL"), &
    1287              :                           enum_desc=s2a("Use standard orbital basis set", "Construct basis from primitives of the orbital basis", &
    1288              :                                         "Read external basis (MAO)"), &
    1289         9368 :                           enum_i_vals=[mao_basis_orb, mao_basis_prim, mao_basis_ext])
    1290         9368 :       CALL section_add_keyword(print_key, keyword)
    1291         9368 :       CALL keyword_release(keyword)
    1292              :       CALL keyword_create(keyword, __LOCATION__, name="PRINT_BASIS", &
    1293              :                           description="Print out MAO reference basis.", &
    1294              :                           usage="PRINT_BASIS {logical}", repeats=.FALSE., n_var=1, &
    1295         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1296         9368 :       CALL section_add_keyword(print_key, keyword)
    1297         9368 :       CALL keyword_release(keyword)
    1298              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_GRAD", &
    1299              :                           description="Threshold for gradient in MAO optimization.", &
    1300              :                           usage="EPS_GRAD reps", repeats=.FALSE., n_var=1, &
    1301         9368 :                           default_r_val=1.e-4_dp, type_of_var=real_t)
    1302         9368 :       CALL section_add_keyword(print_key, keyword)
    1303         9368 :       CALL keyword_release(keyword)
    1304              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_FUNCTION", &
    1305              :                           description="Threshold for electron defect in MAO optimization.", &
    1306              :                           usage="EPS_FUNCTION feps", repeats=.FALSE., n_var=1, &
    1307         9368 :                           default_r_val=1.e-3_dp, type_of_var=real_t)
    1308         9368 :       CALL section_add_keyword(print_key, keyword)
    1309         9368 :       CALL keyword_release(keyword)
    1310              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
    1311              :                           description="Maximum allowed iterations for MAO optimization.", &
    1312              :                           usage="MAX_ITER iter", repeats=.FALSE., n_var=1, &
    1313         9368 :                           default_i_val=0, type_of_var=integer_t)
    1314         9368 :       CALL section_add_keyword(print_key, keyword)
    1315         9368 :       CALL keyword_release(keyword)
    1316              :       CALL keyword_create(keyword, __LOCATION__, name="NEGLECT_ABC", &
    1317              :                           description="Neglect 3 atom terms in MAO analysis.", &
    1318              :                           usage="NEGLECT_ABC {logical}", repeats=.FALSE., n_var=1, &
    1319         9368 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1320         9368 :       CALL section_add_keyword(print_key, keyword)
    1321         9368 :       CALL keyword_release(keyword)
    1322              :       CALL keyword_create(keyword, __LOCATION__, name="AB_THRESHOLD", &
    1323              :                           description="Threshold for printing of AB shared electron numbers.", &
    1324              :                           usage="AB_THRESHOLD thr", repeats=.FALSE., n_var=1, &
    1325         9368 :                           default_r_val=1.e-2_dp, type_of_var=real_t)
    1326         9368 :       CALL section_add_keyword(print_key, keyword)
    1327         9368 :       CALL keyword_release(keyword)
    1328              :       CALL keyword_create(keyword, __LOCATION__, name="ABC_THRESHOLD", &
    1329              :                           description="Threshold for printing of ABC shared electron numbers.", &
    1330              :                           usage="ABC_THRESHOLD thr", repeats=.FALSE., n_var=1, &
    1331         9368 :                           default_r_val=1.e-5_dp, type_of_var=real_t)
    1332         9368 :       CALL section_add_keyword(print_key, keyword)
    1333         9368 :       CALL keyword_release(keyword)
    1334              :       CALL keyword_create(keyword, __LOCATION__, name="ANALYZE_UNASSIGNED_CHARGE", &
    1335              :                           description="Calculate atomic contributions to the unassigned charge.", &
    1336              :                           usage="ANALYZE_UNASSIGNED_CHARGE {logical}", repeats=.FALSE., n_var=1, &
    1337         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1338         9368 :       CALL section_add_keyword(print_key, keyword)
    1339         9368 :       CALL keyword_release(keyword)
    1340         9368 :       CALL section_add_subsection(section, print_key)
    1341         9368 :       CALL section_release(print_key)
    1342              : 
    1343              :       !Minimal localized basis analysis
    1344              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "MINBAS_ANALYSIS", &
    1345              :                                        description="Controls the printing of the minimal localized basis analysis", &
    1346              :                                        print_level=debug_print_level, filename="__STD_OUT__", &
    1347              :                                        common_iter_levels=1, &
    1348        18736 :                                        citations=[Lu2004])
    1349              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
    1350              :                           description="Threshold for matrix elements in basis determination.", &
    1351              :                           usage="EPS_FILTER reps", repeats=.FALSE., n_var=1, &
    1352         9368 :                           default_r_val=1.e-8_dp, type_of_var=real_t)
    1353         9368 :       CALL section_add_keyword(print_key, keyword)
    1354         9368 :       CALL keyword_release(keyword)
    1355              :       CALL keyword_create(keyword, __LOCATION__, name="FULL_ORTHOGONALIZATION", &
    1356              :                           description="Orthogonalize the localized minimal basis.", &
    1357              :                           usage="FULL_ORTHOGONALIZATION {logical}", repeats=.FALSE., n_var=1, &
    1358         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1359         9368 :       CALL section_add_keyword(print_key, keyword)
    1360         9368 :       CALL keyword_release(keyword)
    1361              :       CALL keyword_create(keyword, __LOCATION__, name="BOND_ORDER", &
    1362              :                           description="Calculate Mayer Bond Orders.", &
    1363              :                           usage="BOND_ORDER {logical}", repeats=.FALSE., n_var=1, &
    1364         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1365         9368 :       CALL section_add_keyword(print_key, keyword)
    1366         9368 :       CALL keyword_release(keyword)
    1367              : 
    1368         9368 :       NULLIFY (sub_print_key)
    1369              :       CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "MINBAS_CUBE", &
    1370              :                                        description="Write the minimal basis on Cube files.", &
    1371         9368 :                                        print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MINBAS")
    1372              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    1373              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    1374              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    1375              :                           " 1 number valid for all components.", &
    1376         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    1377         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1378         9368 :       CALL keyword_release(keyword)
    1379              :       CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
    1380              :                           description="Indexes of the atoms minimal basis to be printed as cube files "// &
    1381              :                           "This keyword can be repeated several times "// &
    1382              :                           "(useful if you have to specify many indexes).", &
    1383              :                           usage="ATOM_LIST 1 2", &
    1384         9368 :                           n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
    1385         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1386         9368 :       CALL keyword_release(keyword)
    1387         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    1388         9368 :       CALL section_release(sub_print_key)
    1389              : 
    1390         9368 :       NULLIFY (sub_print_key)
    1391              :       CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "MINBAS_MOLDEN", &
    1392              :                                        description="Write the minimal basis in Molden file format, for visualisation.", &
    1393         9368 :                                        print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MINBAS")
    1394              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
    1395              :                           description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
    1396              :                           usage="NDIGITS {int}", &
    1397         9368 :                           default_i_val=3)
    1398         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1399         9368 :       CALL keyword_release(keyword)
    1400              :       CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
    1401              :                           description="Representation of Gaussian-type orbitals", &
    1402              :                           default_i_val=gto_spherical, &
    1403              :                           enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
    1404              :                           enum_desc=s2a( &
    1405              :                           "Cartesian Gaussian orbitals. Use with caution", &
    1406              :                           "Spherical Gaussian orbitals. Incompatible with VMD"), &
    1407         9368 :                           enum_i_vals=[gto_cartesian, gto_spherical])
    1408         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1409         9368 :       CALL keyword_release(keyword)
    1410         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    1411         9368 :       CALL section_release(sub_print_key)
    1412              : 
    1413         9368 :       CALL section_add_subsection(section, print_key)
    1414         9368 :       CALL section_release(print_key)
    1415              : 
    1416              :       !Energy Decomposition Analysis
    1417              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY_DECOMPOSITION_ANALYSIS", &
    1418              :                                        description="Controls energy decomposition analysis", &
    1419              :                                        print_level=debug_print_level, filename="__STD_OUT__", &
    1420              :                                        common_iter_levels=1, &
    1421        18736 :                                        citations=[Eriksen2020])
    1422              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_ORB_CANONICAL", &
    1423              :                           description="Use reference orbitals in canonical form.", &
    1424              :                           usage="REFERENCE_ORB_CANONICAL {logical}", repeats=.FALSE., n_var=1, &
    1425         9368 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1426         9368 :       CALL section_add_keyword(print_key, keyword)
    1427         9368 :       CALL keyword_release(keyword)
    1428              :       CALL keyword_create(keyword, __LOCATION__, name="SKIP_LOCALIZATION", &
    1429              :                           description="Don't localize the MOs.", &
    1430              :                           usage="SKIP_LOCALIZATION {logical}", repeats=.FALSE., n_var=1, &
    1431         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1432         9368 :       CALL section_add_keyword(print_key, keyword)
    1433         9368 :       CALL keyword_release(keyword)
    1434              :       CALL keyword_create(keyword, __LOCATION__, name="DETAILED_ENERGY", &
    1435              :                           description="Calculate detailed atomic decomposition energies.", &
    1436              :                           usage="DETAILED_ENERGY {logical}", repeats=.FALSE., n_var=1, &
    1437         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1438         9368 :       CALL section_add_keyword(print_key, keyword)
    1439         9368 :       CALL keyword_release(keyword)
    1440              :       CALL keyword_create(keyword, __LOCATION__, name="EWALD_ALPHA_PARAMETER", &
    1441              :                           description="Calculate Energy Decomposition for a specific alpha value. "// &
    1442              :                           "alpha = 1/(2*rc**2), see GTH pseudopotentials.", &
    1443              :                           usage="EWALD_ALPHA_PARAMETER alpha", repeats=.FALSE., n_var=1, &
    1444         9368 :                           default_r_val=0.0_dp, type_of_var=real_t)
    1445         9368 :       CALL section_add_keyword(print_key, keyword)
    1446         9368 :       CALL keyword_release(keyword)
    1447              : 
    1448         9368 :       CALL section_add_subsection(section, print_key)
    1449         9368 :       CALL section_release(print_key)
    1450              : 
    1451              :       ! IAO (Intrinsic atomic orbital) analysis
    1452              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "IAO_ANALYSIS", &
    1453              :                                        description="Controls the printing of the IAO (intrinsic atomic orbital) analysis", &
    1454              :                                        print_level=debug_print_level, filename="__STD_OUT__", &
    1455              :                                        common_iter_levels=1, &
    1456        18736 :                                        citations=[Knizia2013])
    1457              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_SVD", &
    1458              :                           description="Threshold for matrix inversion eigenvalues.", &
    1459              :                           usage="EPS_SVD reps", repeats=.FALSE., n_var=1, &
    1460         9368 :                           default_r_val=0.0_dp, type_of_var=real_t)
    1461         9368 :       CALL section_add_keyword(print_key, keyword)
    1462         9368 :       CALL keyword_release(keyword)
    1463              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_OCC", &
    1464              :                           description="Threshold in occupation for vectors included.", &
    1465              :                           usage="EPS_OCC reps", repeats=.FALSE., n_var=1, &
    1466         9368 :                           default_r_val=0.0_dp, type_of_var=real_t)
    1467         9368 :       CALL section_add_keyword(print_key, keyword)
    1468         9368 :       CALL keyword_release(keyword)
    1469              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMIC_CHARGES", &
    1470              :                           description="Calculate atomic charges from IAO.", &
    1471              :                           usage="ATOMIC_CHARGES {logical}", repeats=.FALSE., n_var=1, &
    1472         9368 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE., type_of_var=logical_t)
    1473         9368 :       CALL section_add_keyword(print_key, keyword)
    1474         9368 :       CALL keyword_release(keyword)
    1475              :       ! IAO_MOLDEN
    1476         9368 :       NULLIFY (sub_print_key)
    1477              :       CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "IAO_MOLDEN", &
    1478              :                                        description="Write the IAO basis in Molden file format, for visualisation.", &
    1479         9368 :                                        print_level=debug_print_level + 1, add_last=add_last_numeric, filename="IAOBAS")
    1480              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
    1481              :                           description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
    1482              :                           usage="NDIGITS {int}", &
    1483         9368 :                           default_i_val=3)
    1484         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1485         9368 :       CALL keyword_release(keyword)
    1486              :       CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
    1487              :                           description="Representation of Gaussian-type orbitals", &
    1488              :                           default_i_val=gto_spherical, &
    1489              :                           enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
    1490              :                           enum_desc=s2a( &
    1491              :                           "Cartesian Gaussian orbitals. Use with caution", &
    1492              :                           "Spherical Gaussian orbitals. Incompatible with VMD"), &
    1493         9368 :                           enum_i_vals=[gto_cartesian, gto_spherical])
    1494         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1495         9368 :       CALL keyword_release(keyword)
    1496         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    1497         9368 :       CALL section_release(sub_print_key)
    1498              :       ! IAO_CUBES
    1499         9368 :       NULLIFY (sub_print_key)
    1500              :       CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "IAO_CUBES", &
    1501              :                                        description="Controls the printing of the IAO basis "// &
    1502              :                                        "as *.cube files.", &
    1503              :                                        print_level=high_print_level, common_iter_levels=1, &
    1504         9368 :                                        add_last=add_last_numeric, filename="")
    1505              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    1506              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    1507              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    1508              :                           " 1 number valid for all components.", &
    1509         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    1510         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1511         9368 :       CALL keyword_release(keyword)
    1512              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    1513              :                           description="append the cube files when they already exist", &
    1514         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1515         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1516         9368 :       CALL keyword_release(keyword)
    1517              :       CALL keyword_create(keyword, __LOCATION__, name="ATOM_LIST", &
    1518              :                           description="Indices of the atoms to be included in basis CUBE file printing. ", &
    1519              :                           usage="ATOM_LIST {integer}  {integer} ..  {integer} ", &
    1520         9368 :                           n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
    1521         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1522         9368 :       CALL keyword_release(keyword)
    1523         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    1524         9368 :       CALL section_release(sub_print_key)
    1525              :       ! One Center Expansion of IAO
    1526         9368 :       NULLIFY (sub_print_key)
    1527              :       CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "ONE_CENTER_EXPANSION", &
    1528              :                                        description="Calculates single center expansion of IAOs ", &
    1529              :                                        print_level=high_print_level, common_iter_levels=1, &
    1530         9368 :                                        add_last=add_last_numeric, filename="")
    1531              :       CALL keyword_create(keyword, __LOCATION__, name="LMAX", &
    1532              :                           description="Maximum l quantum number used in the expansion.", &
    1533         9368 :                           usage="LMAX 2", n_var=1, default_i_val=3, type_of_var=integer_t)
    1534         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1535         9368 :       CALL keyword_release(keyword)
    1536              :       CALL keyword_create(keyword, __LOCATION__, name="NBAS", &
    1537              :                           description="Max number of basis functions used in the expansion."// &
    1538              :                           " Default is determined by the orbital basis set.", &
    1539         9368 :                           usage="NBAS 10", n_var=1, default_i_val=-1, type_of_var=integer_t)
    1540         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1541         9368 :       CALL keyword_release(keyword)
    1542              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    1543              :                           description="Append the OCE basis files when it already exists", &
    1544         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1545         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1546         9368 :       CALL keyword_release(keyword)
    1547         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    1548         9368 :       CALL section_release(sub_print_key)
    1549              :       ! Intrinsic Bond orbitals
    1550         9368 :       NULLIFY (sub_print_key)
    1551              :       CALL cp_print_key_section_create(sub_print_key, __LOCATION__, "BOND_ORBITALS", &
    1552              :                                        description="Calculate intrinsic bond orbitals using "// &
    1553              :                                        "localized MOs in IAO basis.", &
    1554              :                                        print_level=high_print_level, common_iter_levels=1, &
    1555         9368 :                                        add_last=add_last_numeric, filename="")
    1556              : 
    1557              :       CALL keyword_create(keyword, __LOCATION__, name="LOCALIZATION_OPERATOR", &
    1558              :                           description="Operator to be optimized for orbital localization", &
    1559              :                           enum_c_vals=s2a("PIPEK_MEZEY", "PIPEK_MEZEY_4", "L1NORM"), &
    1560              :                           enum_i_vals=[do_iaoloc_pm2, do_iaoloc_pm4, do_iaoloc_l1], &
    1561              :                           enum_desc=s2a("Use Pipek-Mezey operator (order 2)", &
    1562              :                                         "Use Pipek-Mezey operator (order 4)", &
    1563              :                                         "Use L1 norm"), &
    1564         9368 :                           default_i_val=do_iaoloc_pm2)
    1565         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1566         9368 :       CALL keyword_release(keyword)
    1567              :       CALL keyword_create(keyword, __LOCATION__, name="ENERGY_LOCALIZATION_FUNCTION", &
    1568              :                           description="Function for energy localization: f(e_i), e_i orbital energy", &
    1569              :                           enum_c_vals=s2a("NONE", "ENERGY", "OCCUPATION"), &
    1570              :                           enum_i_vals=[do_iaoloc_enone, do_iaoloc_energy, do_iaoloc_occ], &
    1571              :                           enum_desc=s2a("Don't use energy localization.", &
    1572              :                                         "Use orbital energies for localization.", &
    1573              :                                         "Use occupation numbers for localization."), &
    1574         9368 :                           default_i_val=do_iaoloc_enone)
    1575         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1576         9368 :       CALL keyword_release(keyword)
    1577              :       CALL keyword_create(keyword, __LOCATION__, name="ENERGY_LOCALIZATION_WEIGHT", &
    1578              :                           description="Weight given to energy localization, using f(e_i) function", &
    1579              :                           usage="ENERGY_LOCALIZATION_WEIGHT 0.1", n_var=1, &
    1580         9368 :                           default_r_val=0.0_dp, type_of_var=real_t)
    1581         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    1582         9368 :       CALL keyword_release(keyword)
    1583              : 
    1584              :       ! CHARGE CENTER AND SPREAD
    1585         9368 :       NULLIFY (subsection)
    1586              :       CALL cp_print_key_section_create(subsection, __LOCATION__, "CHARGE_CENTER", &
    1587              :                                        description="Calculation and printing of centers and spreads "// &
    1588              :                                        "of localized orbitals.", &
    1589              :                                        print_level=high_print_level, common_iter_levels=1, &
    1590         9368 :                                        add_last=add_last_numeric, filename="")
    1591              :       CALL keyword_create(keyword, __LOCATION__, name="POSITION_OPERATOR_BERRY", &
    1592              :                           description="Use Berry phase position operator.", &
    1593              :                           usage="POSITION_OPERATOR_BERRY T", n_var=1, &
    1594         9368 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
    1595         9368 :       CALL section_add_keyword(subsection, keyword)
    1596         9368 :       CALL keyword_release(keyword)
    1597         9368 :       CALL section_add_subsection(sub_print_key, subsection)
    1598         9368 :       CALL section_release(subsection)
    1599              :       ! IBO_MOLDEN
    1600         9368 :       NULLIFY (subsection)
    1601              :       CALL cp_print_key_section_create(subsection, __LOCATION__, "IBO_MOLDEN", &
    1602              :                                        description="Write the IBO orbitals in Molden file format, for visualisation.", &
    1603         9368 :                                        print_level=debug_print_level + 1, add_last=add_last_numeric, filename="IBOBAS")
    1604              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
    1605              :                           description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
    1606              :                           usage="NDIGITS {int}", &
    1607         9368 :                           default_i_val=3)
    1608         9368 :       CALL section_add_keyword(subsection, keyword)
    1609         9368 :       CALL keyword_release(keyword)
    1610              :       CALL keyword_create(keyword, __LOCATION__, name="GTO_KIND", &
    1611              :                           description="Representation of Gaussian-type orbitals", &
    1612              :                           default_i_val=gto_spherical, &
    1613              :                           enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
    1614              :                           enum_desc=s2a( &
    1615              :                           "Cartesian Gaussian orbitals. Use with caution", &
    1616              :                           "Spherical Gaussian orbitals. Incompatible with VMD"), &
    1617         9368 :                           enum_i_vals=[gto_cartesian, gto_spherical])
    1618         9368 :       CALL section_add_keyword(subsection, keyword)
    1619         9368 :       CALL keyword_release(keyword)
    1620         9368 :       CALL section_add_subsection(sub_print_key, subsection)
    1621         9368 :       CALL section_release(subsection)
    1622              :       ! IAO_CUBES
    1623         9368 :       NULLIFY (subsection)
    1624              :       CALL cp_print_key_section_create(subsection, __LOCATION__, "IBO_CUBES", &
    1625              :                                        description="Controls the printing of the IBO orbitals "// &
    1626              :                                        "as *.cube files.", &
    1627              :                                        print_level=high_print_level, common_iter_levels=1, &
    1628         9368 :                                        add_last=add_last_numeric, filename="")
    1629              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    1630              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    1631              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    1632              :                           " 1 number valid for all components.", &
    1633         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    1634         9368 :       CALL section_add_keyword(subsection, keyword)
    1635         9368 :       CALL keyword_release(keyword)
    1636              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    1637              :                           description="append the cube files when they already exist", &
    1638         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1639         9368 :       CALL section_add_keyword(subsection, keyword)
    1640         9368 :       CALL keyword_release(keyword)
    1641              :       CALL keyword_create(keyword, __LOCATION__, name="STATE_LIST", &
    1642              :                           description="Indices of the orbitals to be included in IBO CUBE file printing. ", &
    1643              :                           usage="STATE_LIST {integer}  {integer} ..  {integer} ", &
    1644         9368 :                           n_var=-1, type_of_var=integer_t, repeats=.TRUE.)
    1645         9368 :       CALL section_add_keyword(subsection, keyword)
    1646         9368 :       CALL keyword_release(keyword)
    1647         9368 :       CALL section_add_subsection(sub_print_key, subsection)
    1648         9368 :       CALL section_release(subsection)
    1649         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    1650         9368 :       CALL section_release(sub_print_key)
    1651              : 
    1652         9368 :       CALL section_add_subsection(section, print_key)
    1653         9368 :       CALL section_release(print_key)
    1654              :       ! END OF IAO_ANALYSIS SECTION
    1655              : 
    1656              :       !DOS from density matrix
    1657              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY_WINDOWS", &
    1658              :                                        description="Controls the printing of the DOS from the density matrix. "// &
    1659              :                                        "This allows the calculation of the DOS even in density matrix based "// &
    1660              :                                        "REAL_TIME_PROPAGATION and LS_SCF. "// &
    1661              :                                        "However, it requires a cubically scaling diagonalization of the Hamiltonian. "// &
    1662              :                                        "Hartree-Fock NYI, values will be wrong. "// &
    1663              :                                        "Careful, the orbitals in rtp/emd are not actually eigenstates of the Hamiltonian. "// &
    1664              :                                        "Assumes absence of spin polarization (so far).", &
    1665              :                                        print_level=high_print_level, common_iter_levels=3, &
    1666              :                                        each_iter_names=s2a("MD"), each_iter_values=[100], &
    1667         9368 :                                        add_last=add_last_numeric, filename="energy-windows")
    1668              :       CALL keyword_create(keyword, __LOCATION__, name="N_WINDOWS", &
    1669              :                           description="The number of energy windows.", &
    1670              :                           usage="N_WINDOWS 200", &
    1671         9368 :                           default_i_val=100)
    1672         9368 :       CALL section_add_keyword(print_key, keyword)
    1673         9368 :       CALL keyword_release(keyword)
    1674              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
    1675              :                           description="Filtering threshold for sparse matrix operations.", &
    1676              :                           usage="EPS_FILTER 1.0E-6", &
    1677         9368 :                           default_r_val=1.0E-14_dp)
    1678         9368 :       CALL section_add_keyword(print_key, keyword)
    1679         9368 :       CALL keyword_release(keyword)
    1680              :       CALL keyword_create(keyword, __LOCATION__, name="RESTRICT_RANGE", &
    1681              :                           description="Restricts the energy windows to states close to the fermi level", &
    1682              :                           usage="RESTRICT_RANGE .TRUE.", &
    1683         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1684         9368 :       CALL section_add_keyword(print_key, keyword)
    1685         9368 :       CALL keyword_release(keyword)
    1686              :       CALL keyword_create(keyword, __LOCATION__, name="RANGE", &
    1687              :                           description="If the RESTRICT_RANGE keyword is set, then all energy widnows will"// &
    1688              :                           " be placed in an interval from from the fermi level minus to the fermi level plus this keyword", &
    1689              :                           usage="RANGE 1", &
    1690         9368 :                           default_r_val=1.0_dp)
    1691         9368 :       CALL section_add_keyword(print_key, keyword)
    1692         9368 :       CALL keyword_release(keyword)
    1693              :       CALL keyword_create(keyword, __LOCATION__, name="PRINT_CUBES", &
    1694              :                           description="Print the energy windows to cube files", &
    1695              :                           usage="PRINT_CUBES .TRUE.", &
    1696         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1697         9368 :       CALL section_add_keyword(print_key, keyword)
    1698         9368 :       CALL keyword_release(keyword)
    1699              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    1700              :                           description="The stride (X,Y,Z) used to write the energy windows cube files (if enabled) "// &
    1701              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    1702              :                           " 1 number valid for all components.", &
    1703         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    1704         9368 :       CALL section_add_keyword(print_key, keyword)
    1705         9368 :       CALL keyword_release(keyword)
    1706         9368 :       CALL section_add_subsection(section, print_key)
    1707         9368 :       CALL section_release(print_key)
    1708              : 
    1709              :       ! Hamiltonian in CSR format
    1710              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "KS_CSR_WRITE", &
    1711              :                                        description="Write the KS matrix in CSR format into a file.", &
    1712         9368 :                                        print_level=debug_print_level, filename="")
    1713              :       CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
    1714              :                           description="Threshold on the absolute value of the elements to be printed out. "// &
    1715              :                           "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
    1716              :                           "if the block contains at least one non-zero element.", &
    1717              :                           usage="THRESHOLD {real}", &
    1718              :                           repeats=.FALSE., &
    1719         9368 :                           default_r_val=0.0_dp)
    1720         9368 :       CALL section_add_keyword(print_key, keyword)
    1721         9368 :       CALL keyword_release(keyword)
    1722              :       CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
    1723              :                           description="Print only the upper triangular part of the matrix. ", &
    1724              :                           usage="UPPER_TRIANGULAR {logical}", &
    1725              :                           repeats=.FALSE., &
    1726              :                           default_l_val=.FALSE., &
    1727         9368 :                           lone_keyword_l_val=.TRUE.)
    1728         9368 :       CALL section_add_keyword(print_key, keyword)
    1729         9368 :       CALL keyword_release(keyword)
    1730              :       CALL keyword_create(keyword, __LOCATION__, name="Binary", &
    1731              :                           description="Whether or not to generate the file in a binary format. ", &
    1732              :                           usage="BINARY {logical}", &
    1733              :                           repeats=.FALSE., &
    1734              :                           default_l_val=.FALSE., &
    1735         9368 :                           lone_keyword_l_val=.TRUE.)
    1736         9368 :       CALL section_add_keyword(print_key, keyword)
    1737         9368 :       CALL keyword_release(keyword)
    1738              :       CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
    1739              :                           description="Print the KS matrix in real-space instead of k-space.. ", &
    1740              :                           usage="REAL_SPACE {logical}", &
    1741              :                           repeats=.FALSE., &
    1742              :                           default_l_val=.FALSE., &
    1743         9368 :                           lone_keyword_l_val=.TRUE.)
    1744         9368 :       CALL section_add_keyword(print_key, keyword)
    1745         9368 :       CALL keyword_release(keyword)
    1746         9368 :       CALL section_add_subsection(section, print_key)
    1747         9368 :       CALL section_release(print_key)
    1748              : 
    1749              :       ! Overlap in CSR format
    1750              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "S_CSR_WRITE", &
    1751              :                                        description="Write the overlap matrix in CSR format into a file.", &
    1752         9368 :                                        print_level=debug_print_level, filename="")
    1753              :       CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
    1754              :                           description="Threshold on the absolute value of the elements to be printed out. "// &
    1755              :                           "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
    1756              :                           "if the block contains at least one non-zero element.", &
    1757              :                           usage="THRESHOLD {real}", &
    1758              :                           repeats=.FALSE., &
    1759         9368 :                           default_r_val=0.0_dp)
    1760         9368 :       CALL section_add_keyword(print_key, keyword)
    1761         9368 :       CALL keyword_release(keyword)
    1762              :       CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
    1763              :                           description="Print only the upper triangular part of the matrix. ", &
    1764              :                           usage="UPPER_TRIANGULAR {logical}", &
    1765              :                           repeats=.FALSE., &
    1766              :                           default_l_val=.FALSE., &
    1767         9368 :                           lone_keyword_l_val=.TRUE.)
    1768         9368 :       CALL section_add_keyword(print_key, keyword)
    1769         9368 :       CALL keyword_release(keyword)
    1770              :       CALL keyword_create(keyword, __LOCATION__, name="Binary", &
    1771              :                           description="Whether or not to generate the file in a binary format. ", &
    1772              :                           usage="BINARY {logical}", &
    1773              :                           repeats=.FALSE., &
    1774              :                           default_l_val=.FALSE., &
    1775         9368 :                           lone_keyword_l_val=.TRUE.)
    1776         9368 :       CALL section_add_keyword(print_key, keyword)
    1777         9368 :       CALL keyword_release(keyword)
    1778              :       CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
    1779              :                           description="Print the overlap matrix in real-space instead of k-space.. ", &
    1780              :                           usage="REAL_SPACE {logical}", &
    1781              :                           repeats=.FALSE., &
    1782              :                           default_l_val=.FALSE., &
    1783         9368 :                           lone_keyword_l_val=.TRUE.)
    1784         9368 :       CALL section_add_keyword(print_key, keyword)
    1785         9368 :       CALL keyword_release(keyword)
    1786         9368 :       CALL section_add_subsection(section, print_key)
    1787         9368 :       CALL section_release(print_key)
    1788              : 
    1789              :       ! Core Hamiltonian in CSR format
    1790              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "HCORE_CSR_WRITE", &
    1791              :                                        description="Write the core Hamiltonian matrix in CSR format into a file.", &
    1792         9368 :                                        print_level=debug_print_level, filename="")
    1793              :       CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
    1794              :                           description="Threshold on the absolute value of the elements to be printed out. "// &
    1795              :                           "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
    1796              :                           "if the block contains at least one non-zero element.", &
    1797              :                           usage="THRESHOLD {real}", &
    1798              :                           repeats=.FALSE., &
    1799         9368 :                           default_r_val=0.0_dp)
    1800         9368 :       CALL section_add_keyword(print_key, keyword)
    1801         9368 :       CALL keyword_release(keyword)
    1802              :       CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
    1803              :                           description="Print only the upper triangular part of the matrix. ", &
    1804              :                           usage="UPPER_TRIANGULAR {logical}", &
    1805              :                           repeats=.FALSE., &
    1806              :                           default_l_val=.FALSE., &
    1807         9368 :                           lone_keyword_l_val=.TRUE.)
    1808         9368 :       CALL section_add_keyword(print_key, keyword)
    1809         9368 :       CALL keyword_release(keyword)
    1810              :       CALL keyword_create(keyword, __LOCATION__, name="Binary", &
    1811              :                           description="Whether or not to generate the file in a binary format. ", &
    1812              :                           usage="BINARY {logical}", &
    1813              :                           repeats=.FALSE., &
    1814              :                           default_l_val=.FALSE., &
    1815         9368 :                           lone_keyword_l_val=.TRUE.)
    1816         9368 :       CALL section_add_keyword(print_key, keyword)
    1817         9368 :       CALL keyword_release(keyword)
    1818              :       CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
    1819              :                           description="Print the core Hamiltonian matrix in real-space instead of k-space.. ", &
    1820              :                           usage="REAL_SPACE {logical}", &
    1821              :                           repeats=.FALSE., &
    1822              :                           default_l_val=.FALSE., &
    1823         9368 :                           lone_keyword_l_val=.TRUE.)
    1824         9368 :       CALL section_add_keyword(print_key, keyword)
    1825         9368 :       CALL keyword_release(keyword)
    1826         9368 :       CALL section_add_subsection(section, print_key)
    1827         9368 :       CALL section_release(print_key)
    1828              : 
    1829              :       ! Density Matrix in CSR format
    1830              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "P_CSR_WRITE", &
    1831              :                                        description="Write the density matrix in CSR format into a file.", &
    1832         9368 :                                        print_level=debug_print_level, filename="")
    1833              :       CALL keyword_create(keyword, __LOCATION__, name="Threshold", &
    1834              :                           description="Threshold on the absolute value of the elements to be printed out. "// &
    1835              :                           "In CP2K all the elements in a (atomic) matrix block are considered non-zero, "// &
    1836              :                           "if the block contains at least one non-zero element.", &
    1837              :                           usage="THRESHOLD {real}", &
    1838              :                           repeats=.FALSE., &
    1839         9368 :                           default_r_val=0.0_dp)
    1840         9368 :       CALL section_add_keyword(print_key, keyword)
    1841         9368 :       CALL keyword_release(keyword)
    1842              :       CALL keyword_create(keyword, __LOCATION__, name="Upper_triangular", &
    1843              :                           description="Print only the upper triangular part of the matrix. ", &
    1844              :                           usage="UPPER_TRIANGULAR {logical}", &
    1845              :                           repeats=.FALSE., &
    1846              :                           default_l_val=.FALSE., &
    1847         9368 :                           lone_keyword_l_val=.TRUE.)
    1848         9368 :       CALL section_add_keyword(print_key, keyword)
    1849         9368 :       CALL keyword_release(keyword)
    1850              :       CALL keyword_create(keyword, __LOCATION__, name="Binary", &
    1851              :                           description="Whether or not to generate the file in a binary format. ", &
    1852              :                           usage="BINARY {logical}", &
    1853              :                           repeats=.FALSE., &
    1854              :                           default_l_val=.FALSE., &
    1855         9368 :                           lone_keyword_l_val=.TRUE.)
    1856         9368 :       CALL section_add_keyword(print_key, keyword)
    1857         9368 :       CALL keyword_release(keyword)
    1858              :       CALL keyword_create(keyword, __LOCATION__, name="Real_space", &
    1859              :                           description="Print the density matrix in real-space instead of k-space.. ", &
    1860              :                           usage="REAL_SPACE {logical}", &
    1861              :                           repeats=.FALSE., &
    1862              :                           default_l_val=.FALSE., &
    1863         9368 :                           lone_keyword_l_val=.TRUE.)
    1864         9368 :       CALL section_add_keyword(print_key, keyword)
    1865         9368 :       CALL keyword_release(keyword)
    1866         9368 :       CALL section_add_subsection(section, print_key)
    1867         9368 :       CALL section_release(print_key)
    1868              : 
    1869              :       ! interaction adjacency matrix
    1870              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "ADJMAT_WRITE", &
    1871              :                                        description="Writes an (upper-triangular) adjacency matrix indicating the "// &
    1872              :                                        "interaction between atoms (according to overlapping basis functions). The "// &
    1873              :                                        "columns are: iatom, jatom, ikind, jkind; where iatom and jatom are the atom "// &
    1874              :                                        "indices (based on the coordinate file), ikind and jkind are the atomic kinds "// &
    1875              :                                        "(indeces as shown in the ATOMIC KIND INFORMATION section of a CP2K output). ", &
    1876         9368 :                                        print_level=debug_print_level, filename="")
    1877         9368 :       CALL section_add_subsection(section, print_key)
    1878         9368 :       CALL section_release(print_key)
    1879              : 
    1880              :       ! Xray diffraction
    1881              :       CALL cp_print_key_section_create( &
    1882              :          print_key, __LOCATION__, name="XRAY_DIFFRACTION_SPECTRUM", &
    1883              :          description="Calculate and print the coherent X-ray "// &
    1884              :          "diffraction spectrum", &
    1885              :          print_level=debug_print_level, &
    1886              :          filename="", &
    1887        28104 :          citations=[Krack2000, Krack2002])
    1888              :       CALL keyword_create( &
    1889              :          keyword, __LOCATION__, &
    1890              :          name="Q_MAX", &
    1891              :          variants=["Q_MAXIMUM"], &
    1892              :          description="Maximum Q value calculated for the spectrum", &
    1893              :          usage="Q_MAX {real}", &
    1894              :          repeats=.FALSE., &
    1895              :          n_var=1, &
    1896              :          type_of_var=real_t, &
    1897              :          default_r_val=cp_unit_to_cp2k(value=20.0_dp, &
    1898              :                                        unit_str="angstrom^-1"), &
    1899        18736 :          unit_str="angstrom^-1")
    1900         9368 :       CALL section_add_keyword(print_key, keyword)
    1901         9368 :       CALL keyword_release(keyword)
    1902         9368 :       CALL section_add_subsection(section, print_key)
    1903         9368 :       CALL section_release(print_key)
    1904              : 
    1905              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name="ELECTRIC_FIELD_GRADIENT", &
    1906              :                                        description="Calculate and print the electric field gradients "// &
    1907              :                                        "at atomic positions", &
    1908              :                                        print_level=debug_print_level, &
    1909         9368 :                                        filename="__STD_OUT__")
    1910              : 
    1911              :       CALL keyword_create(keyword, __LOCATION__, &
    1912              :                           name="INTERPOLATION", &
    1913              :                           description="Use interpolation method from real space grid", &
    1914              :                           usage="INTERPOLATION {logical}", &
    1915              :                           repeats=.FALSE., &
    1916              :                           n_var=1, &
    1917         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1918         9368 :       CALL section_add_keyword(print_key, keyword)
    1919         9368 :       CALL keyword_release(keyword)
    1920              : 
    1921              :       CALL keyword_create(keyword, __LOCATION__, &
    1922              :                           name="GSPACE_SMOOTHING", &
    1923              :                           description="Use a G-space smoothing function", &
    1924              :                           usage="GSPACE_SMOOTHING cutoff {real}, width {real}", &
    1925              :                           repeats=.FALSE., &
    1926              :                           n_var=2, default_r_vals=[-1._dp, -1._dp], &
    1927         9368 :                           type_of_var=real_t)
    1928         9368 :       CALL section_add_keyword(print_key, keyword)
    1929         9368 :       CALL keyword_release(keyword)
    1930              : 
    1931              :       CALL keyword_create(keyword, __LOCATION__, &
    1932              :                           name="DEBUG", &
    1933              :                           description="Print additional debug output", &
    1934              :                           usage="DEBUG {logical}", &
    1935              :                           repeats=.FALSE., &
    1936              :                           n_var=1, &
    1937         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1938         9368 :       CALL section_add_keyword(print_key, keyword)
    1939         9368 :       CALL keyword_release(keyword)
    1940              : 
    1941         9368 :       CALL create_gspace_interp_section(subsection)
    1942         9368 :       CALL section_add_subsection(print_key, subsection)
    1943         9368 :       CALL section_release(subsection)
    1944              : 
    1945         9368 :       CALL section_add_subsection(section, print_key)
    1946         9368 :       CALL section_release(print_key)
    1947              : 
    1948              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name="BASIS_MOLOPT_QUANTITIES", &
    1949              :                                        description="Print the two quantities needed in the basis molopt generation:"// &
    1950              :                                        " total energy and condition number of the overlap matrix (S matrix)", &
    1951              :                                        print_level=debug_print_level, &
    1952         9368 :                                        filename="__STD_OUT__")
    1953         9368 :       CALL section_add_subsection(section, print_key)
    1954         9368 :       CALL section_release(print_key)
    1955              : 
    1956              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name="HYPERFINE_COUPLING_TENSOR", &
    1957              :                                        description="Calculate and print the EPR hyperfine coupling tensor"// &
    1958              :                                        " at atomic positions", &
    1959              :                                        print_level=debug_print_level, &
    1960         9368 :                                        filename="__STD_OUT__")
    1961              : 
    1962              :       CALL keyword_create(keyword, __LOCATION__, &
    1963              :                           name="INTERACTION_RADIUS", &
    1964              :                           description="Radius of interaction for EPR hyperfine tensor calculation", &
    1965              :                           usage="INTERACTION_RADIUS radius {real}", &
    1966              :                           repeats=.FALSE., &
    1967              :                           n_var=1, default_r_val=10._dp, &
    1968         9368 :                           type_of_var=real_t)
    1969         9368 :       CALL section_add_keyword(print_key, keyword)
    1970         9368 :       CALL keyword_release(keyword)
    1971              : 
    1972         9368 :       CALL section_add_subsection(section, print_key)
    1973         9368 :       CALL section_release(print_key)
    1974              : 
    1975              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name="OPTIMIZE_LRI_BASIS", &
    1976              :                                        description="Optimize the exponents of the LRI basis set", &
    1977              :                                        print_level=low_print_level, &
    1978         9368 :                                        filename="OPTIMIZED_LRI_BASIS")
    1979         9368 :       CALL section_add_subsection(section, print_key)
    1980         9368 :       CALL section_release(print_key)
    1981              : 
    1982              :       CALL cp_print_key_section_create( &
    1983              :          print_key, __LOCATION__, name="PLUS_U", &
    1984              :          description="Controls the printing for the DFT+U methods", &
    1985              :          print_level=high_print_level, &
    1986              :          filename="__STD_OUT__", &
    1987              :          each_iter_names=s2a("QS_SCF"), &
    1988              :          each_iter_values=[0], &
    1989        28104 :          citations=[Dudarev1997, Dudarev1998])
    1990         9368 :       CALL section_add_subsection(section, print_key)
    1991         9368 :       CALL section_release(print_key)
    1992              : 
    1993              :       CALL cp_print_key_section_create( &
    1994              :          print_key, __LOCATION__, name="CHARGEMOL", &
    1995              :          description="Write .wfx input file for Chargemol", &
    1996              :          print_level=debug_print_level + 1, &
    1997              :          filename="CHARGEMOL", &
    1998         9368 :          add_last=add_last_numeric)
    1999              :       CALL keyword_create(keyword, __LOCATION__, name="BACKUP_COPIES", &
    2000              :                           description="Specifies the maximum number of backup copies.", &
    2001              :                           usage="BACKUP_COPIES {int}", &
    2002         9368 :                           default_i_val=1)
    2003         9368 :       CALL section_add_keyword(print_key, keyword)
    2004         9368 :       CALL keyword_release(keyword)
    2005              :       CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
    2006              :                           description="Write information about cell periodicity.", &
    2007              :                           usage="PERIODIC {LOGICAL}", &
    2008         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2009         9368 :       CALL section_add_keyword(print_key, keyword)
    2010         9368 :       CALL keyword_release(keyword)
    2011         9368 :       CALL section_add_subsection(section, print_key)
    2012         9368 :       CALL section_release(print_key)
    2013              : 
    2014              :       CALL cp_print_key_section_create( &
    2015              :          print_key, __LOCATION__, name="SCCS", &
    2016              :          description="Controls the printing for the SCCS models", &
    2017              :          print_level=high_print_level, &
    2018              :          filename="__STD_OUT__", &
    2019              :          each_iter_names=s2a("QS_SCF"), &
    2020              :          each_iter_values=[0], &
    2021        37472 :          citations=[Fattebert2002, Andreussi2012, Yin2017])
    2022              : 
    2023         9368 :       NULLIFY (sub_print_key)
    2024              : 
    2025              :       CALL cp_print_key_section_create( &
    2026              :          sub_print_key, __LOCATION__, name="DENSITY_GRADIENT", &
    2027              :          description="Controls the printing of the cube files with "// &
    2028              :          "the norm of the density gradient |&nabla;&rho;| "// &
    2029              :          "used by the SCCS model.", &
    2030              :          print_level=debug_print_level, &
    2031              :          filename="", &
    2032              :          each_iter_names=s2a("QS_SCF"), &
    2033         9368 :          each_iter_values=[0])
    2034              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    2035              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2036              :                           "(larger values result in smaller cube files). You can provide 3 "// &
    2037              :                           "numbers (for X,Y,Z) or 1 number valid for all components.", &
    2038              :                           n_var=-1, &
    2039              :                           default_i_vals=[2, 2, 2], &
    2040              :                           type_of_var=integer_t, &
    2041         9368 :                           repeats=.FALSE.)
    2042         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2043         9368 :       CALL keyword_release(keyword)
    2044              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2045              :                           description="Append the cube files when they already exist", &
    2046              :                           default_l_val=.FALSE., &
    2047              :                           lone_keyword_l_val=.TRUE., &
    2048         9368 :                           repeats=.FALSE.)
    2049         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2050         9368 :       CALL keyword_release(keyword)
    2051         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    2052         9368 :       CALL section_release(sub_print_key)
    2053              : 
    2054              :       CALL cp_print_key_section_create( &
    2055              :          sub_print_key, __LOCATION__, name="DIELECTRIC_FUNCTION", &
    2056              :          description="Controls the printing of the cube files with "// &
    2057              :          "the dielectric function used by the SCCS model. "// &
    2058              :          "This function determines the cavity formed by a solute in "// &
    2059              :          "a solvent and thus it can be used for the visualisaton of the cavity.", &
    2060              :          print_level=debug_print_level, &
    2061              :          filename="", &
    2062              :          each_iter_names=s2a("QS_SCF"), &
    2063              :          each_iter_values=[0], &
    2064        37472 :          citations=[Fattebert2002, Andreussi2012, Yin2017])
    2065              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    2066              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2067              :                           "(larger values result in smaller cube files). You can provide 3 "// &
    2068              :                           "numbers (for X,Y,Z) or 1 number valid for all components.", &
    2069              :                           n_var=-1, &
    2070              :                           default_i_vals=[2, 2, 2], &
    2071              :                           type_of_var=integer_t, &
    2072         9368 :                           repeats=.FALSE.)
    2073         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2074         9368 :       CALL keyword_release(keyword)
    2075              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2076              :                           description="Append the cube files when they already exist", &
    2077              :                           default_l_val=.FALSE., &
    2078              :                           lone_keyword_l_val=.TRUE., &
    2079         9368 :                           repeats=.FALSE.)
    2080         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2081         9368 :       CALL keyword_release(keyword)
    2082         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    2083         9368 :       CALL section_release(sub_print_key)
    2084              : 
    2085              :       CALL cp_print_key_section_create( &
    2086              :          sub_print_key, __LOCATION__, name="TOTAL_CHARGE_DENSITY", &
    2087              :          description="Controls the printing of the cube files with the "// &
    2088              :          "total charge density $\rho^\text{tot}$ used by the SCCS model.", &
    2089              :          print_level=debug_print_level, &
    2090              :          filename="", &
    2091              :          each_iter_names=s2a("QS_SCF"), &
    2092              :          each_iter_values=[0], &
    2093        37472 :          citations=[Fattebert2002, Andreussi2012, Yin2017])
    2094              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    2095              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2096              :                           "(larger values result in smaller cube files). You can provide 3 "// &
    2097              :                           "numbers (for X,Y,Z) or 1 number valid for all components.", &
    2098              :                           n_var=-1, &
    2099              :                           default_i_vals=[2, 2, 2], &
    2100              :                           type_of_var=integer_t, &
    2101         9368 :                           repeats=.FALSE.)
    2102         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2103         9368 :       CALL keyword_release(keyword)
    2104              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2105              :                           description="Append the cube files when they already exist", &
    2106              :                           default_l_val=.FALSE., &
    2107              :                           lone_keyword_l_val=.TRUE., &
    2108         9368 :                           repeats=.FALSE.)
    2109         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2110         9368 :       CALL keyword_release(keyword)
    2111         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    2112         9368 :       CALL section_release(sub_print_key)
    2113              : 
    2114              :       CALL cp_print_key_section_create( &
    2115              :          sub_print_key, __LOCATION__, name="POLARISATION_CHARGE_DENSITY", &
    2116              :          description="Controls the printing of the cube files with the "// &
    2117              :          "polarisation charge density $\rho^\text{pol}$ used by the SCCS model with the "// &
    2118              :          "total charge density $\rho^\text{tot} = \rho^\text{sol} + \rho^\text{pol}", &
    2119              :          print_level=debug_print_level, &
    2120              :          filename="", &
    2121              :          each_iter_names=s2a("QS_SCF"), &
    2122              :          each_iter_values=[0], &
    2123        37472 :          citations=[Fattebert2002, Andreussi2012, Yin2017])
    2124              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    2125              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2126              :                           "(larger values result in smaller cube files). You can provide 3 "// &
    2127              :                           "numbers (for X,Y,Z) or 1 number valid for all components.", &
    2128              :                           n_var=-1, &
    2129              :                           default_i_vals=[2, 2, 2], &
    2130              :                           type_of_var=integer_t, &
    2131         9368 :                           repeats=.FALSE.)
    2132         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2133         9368 :       CALL keyword_release(keyword)
    2134              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2135              :                           description="Append the cube files when they already exist", &
    2136              :                           default_l_val=.FALSE., &
    2137              :                           lone_keyword_l_val=.TRUE., &
    2138         9368 :                           repeats=.FALSE.)
    2139         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2140         9368 :       CALL keyword_release(keyword)
    2141         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    2142         9368 :       CALL section_release(sub_print_key)
    2143              : 
    2144              :       CALL cp_print_key_section_create( &
    2145              :          sub_print_key, __LOCATION__, name="POLARISATION_POTENTIAL", &
    2146              :          description="Controls the printing of the cube files with the "// &
    2147              :          "polarisation potential $\phi^\text{pol}$ used by the SCCS model with the "// &
    2148              :          "total potential $\phi^\text{tot} = \phi^\text{sol} + \phi^\text{pol}$", &
    2149              :          print_level=debug_print_level, &
    2150              :          filename="", &
    2151              :          each_iter_names=s2a("QS_SCF"), &
    2152              :          each_iter_values=[0], &
    2153        37472 :          citations=[Fattebert2002, Andreussi2012, Yin2017])
    2154              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
    2155              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2156              :                           "(larger values result in smaller cube files). You can provide 3 "// &
    2157              :                           "numbers (for X,Y,Z) or 1 number valid for all components.", &
    2158              :                           n_var=-1, &
    2159              :                           default_i_vals=[2, 2, 2], &
    2160              :                           type_of_var=integer_t, &
    2161         9368 :                           repeats=.FALSE.)
    2162         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2163         9368 :       CALL keyword_release(keyword)
    2164              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2165              :                           description="Append the cube files when they already exist", &
    2166              :                           default_l_val=.FALSE., &
    2167              :                           lone_keyword_l_val=.TRUE., &
    2168         9368 :                           repeats=.FALSE.)
    2169         9368 :       CALL section_add_keyword(sub_print_key, keyword)
    2170         9368 :       CALL keyword_release(keyword)
    2171         9368 :       CALL section_add_subsection(print_key, sub_print_key)
    2172         9368 :       CALL section_release(sub_print_key)
    2173              : 
    2174         9368 :       CALL section_add_subsection(section, print_key)
    2175         9368 :       CALL section_release(print_key)
    2176              : 
    2177         9368 :    END SUBROUTINE create_print_dft_section
    2178              : 
    2179              : ! **************************************************************************************************
    2180              : !> \brief ...
    2181              : !> \param section ...
    2182              : !> \author JGH
    2183              : ! **************************************************************************************************
    2184         9368 :    SUBROUTINE create_bandstructure_section(section)
    2185              :       TYPE(section_type), POINTER                        :: section
    2186              : 
    2187              :       TYPE(keyword_type), POINTER                        :: keyword
    2188              :       TYPE(section_type), POINTER                        :: subsection
    2189              : 
    2190         9368 :       CPASSERT(.NOT. ASSOCIATED(section))
    2191              :       CALL section_create(section, __LOCATION__, name="BAND_STRUCTURE", &
    2192              :                           description="Specifies the k-points used in band structure calculation.", &
    2193         9368 :                           n_keywords=0, n_subsections=0, repeats=.FALSE.)
    2194              : 
    2195         9368 :       NULLIFY (keyword)
    2196              :       CALL keyword_create(keyword, __LOCATION__, name="FILE_NAME", &
    2197              :                           description="File name used for band structure", &
    2198              :                           usage="FILE_NAME <filename>", default_c_val="", &
    2199         9368 :                           type_of_var=char_t, n_var=1)
    2200         9368 :       CALL section_add_keyword(section, keyword)
    2201         9368 :       CALL keyword_release(keyword)
    2202              : 
    2203              :       CALL keyword_create(keyword, __LOCATION__, name="ADDED_MOS", &
    2204              :                           variants=["ADDED_BANDS"], &
    2205              :                           description="Number of MOs/Bands added to the Band Structure calculation.", &
    2206        18736 :                           default_i_val=0)
    2207         9368 :       CALL section_add_keyword(section, keyword)
    2208         9368 :       CALL keyword_release(keyword)
    2209              : 
    2210         9368 :       NULLIFY (subsection)
    2211         9368 :       CALL create_kpoint_set_section(subsection)
    2212         9368 :       CALL section_add_subsection(section, subsection)
    2213         9368 :       CALL section_release(subsection)
    2214              : 
    2215         9368 :    END SUBROUTINE create_bandstructure_section
    2216              : 
    2217        28104 :    SUBROUTINE add_generic_openpmd_arguments(print_key)
    2218              :       TYPE(section_type), POINTER                        :: print_key
    2219              : 
    2220              :       TYPE(keyword_type), POINTER                        :: keyword
    2221        28104 :       NULLIFY (keyword)
    2222              : 
    2223              :       CALL keyword_create(keyword, __LOCATION__, name="OPENPMD_EXTENSION", &
    2224              :                           description="Filename extension for openPMD files, including the dot and "// &
    2225              :                           "(for optionally activating file encoding) a file expansion pattern.", &
    2226              :                           default_c_val="_%06T."//cp_openpmd_get_default_extension(), &
    2227        28104 :                           type_of_var=char_t)
    2228        28104 :       CALL section_add_keyword(print_key, keyword)
    2229        28104 :       CALL keyword_release(keyword)
    2230              : 
    2231              :       CALL keyword_create(keyword, __LOCATION__, name="OPENPMD_CFG", &
    2232              :                           description="Inline runtime config for openPMD output. Note that inline "// &
    2233              :                           "specifications are subject to restrictions imposed by the input "// &
    2234              :                           "file format, making this option useful only for very simple use cases. "// &
    2235              :                           "Refer to OPENPMD_CFG_FILE for anything else.", &
    2236        28104 :                           default_c_val="{}", type_of_var=char_t)
    2237        28104 :       CALL section_add_keyword(print_key, keyword)
    2238        28104 :       CALL keyword_release(keyword)
    2239              : 
    2240              :       CALL keyword_create(keyword, __LOCATION__, name="OPENPMD_CFG_FILE", &
    2241              :         description="Runtime config file for openPMD output. This parameter takes precedence over OPENPMD_CFG.", default_c_val="", &
    2242        28104 :                           type_of_var=char_t)
    2243        28104 :       CALL section_add_keyword(print_key, keyword)
    2244        28104 :       CALL keyword_release(keyword)
    2245              : 
    2246        28104 :    END SUBROUTINE add_generic_openpmd_arguments
    2247              : 
    2248              : ! **************************************************************************************************
    2249              : !> \brief creates the input section for dealing with homo lumos, including dumping cubes
    2250              : !> \param print_key ...
    2251              : ! **************************************************************************************************
    2252        18736 :    SUBROUTINE create_mo_section( &
    2253              :       print_key, section_name, description, stride_default, stride_usage, &
    2254              :       print_level, do_write_keyname)
    2255              : 
    2256              :       TYPE(section_type), POINTER :: print_key
    2257              :       CHARACTER(len=*), INTENT(IN) :: section_name, description, stride_usage, do_write_keyname
    2258              :       INTEGER, DIMENSION(3), INTENT(IN) :: stride_default
    2259              :       INTEGER, INTENT(IN) :: print_level
    2260              : 
    2261              :       TYPE(keyword_type), POINTER                        :: keyword
    2262              : 
    2263        18736 :       NULLIFY (keyword)
    2264              : 
    2265              :       CALL cp_print_key_section_create(print_key, __LOCATION__, section_name, &
    2266              :                                        description="Controls the printing of the molecular orbitals (MOs) as " &
    2267              :                                        //TRIM(ADJUSTL(description))// &
    2268              :                                        " files."// &
    2269              :                                        " It can be used during a Real Time calculation to print the MOs."// &
    2270              :                                        " In this case, the density corresponding to the time dependent MO is printed"// &
    2271              :                                        " instead of the wave-function.", &
    2272        18736 :                                        print_level=print_level, filename="")
    2273              : 
    2274              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2275              :                           description="The stride (X,Y,Z) used to write the "//TRIM(ADJUSTL(description))//" file "// &
    2276              :                           "(larger values result in smaller "// &
    2277              :                           TRIM(ADJUSTL(description))// &
    2278              :                           " files). You can provide 3 numbers (for X,Y,Z) or"// &
    2279              :                           " 1 number valid for all components.", &
    2280        18736 :                           usage=stride_usage, n_var=-1, default_i_vals=stride_default, type_of_var=integer_t)
    2281        18736 :       CALL section_add_keyword(print_key, keyword)
    2282        18736 :       CALL keyword_release(keyword)
    2283              : 
    2284              :       CALL keyword_create(keyword, __LOCATION__, name=do_write_keyname, &
    2285              :                           description="If the MO " &
    2286              :                           //TRIM(ADJUSTL(description)) &
    2287              :                           //" file should be written. If false, the eigenvalues are still computed."// &
    2288              :                           " Can also be useful in combination with STM calculations", &
    2289        18736 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
    2290        18736 :       CALL section_add_keyword(print_key, keyword)
    2291        18736 :       CALL keyword_release(keyword)
    2292              : 
    2293              :       CALL keyword_create(keyword, __LOCATION__, name="nlumo", &
    2294              :                           description="If the printkey is activated controls the number of lumos"// &
    2295              :                           " that are printed and dumped as "//TRIM(ADJUSTL(description))//" (-1=all)", &
    2296        18736 :                           default_i_val=0)
    2297        18736 :       CALL section_add_keyword(print_key, keyword)
    2298        18736 :       CALL keyword_release(keyword)
    2299              : 
    2300              :       CALL keyword_create( &
    2301              :          keyword, __LOCATION__, name="nhomo", &
    2302              :          description="If the printkey is activated controls the number of homos that dumped as "// &
    2303              :          TRIM(ADJUSTL(description))// &
    2304              :          " (-1=all),"// &
    2305              :          " eigenvalues are always all dumped", &
    2306        18736 :          default_i_val=1)
    2307        18736 :       CALL section_add_keyword(print_key, keyword)
    2308        18736 :       CALL keyword_release(keyword)
    2309              : 
    2310              :       CALL keyword_create( &
    2311              :          keyword, __LOCATION__, name="homo_list", &
    2312              :          description="If the printkey is activated controls the index of homos dumped as openPMD,"// &
    2313              :          " eigenvalues are always all dumped. It overrides nhomo.", &
    2314              :          usage="HOMO_LIST {integer}  {integer} ..  {integer} ", type_of_var=integer_t, &
    2315        18736 :          n_var=-1, repeats=.TRUE.)
    2316        18736 :       CALL section_add_keyword(print_key, keyword)
    2317        18736 :       CALL keyword_release(keyword)
    2318              : 
    2319        18736 :    END SUBROUTINE create_mo_section
    2320              : 
    2321        18736 :    SUBROUTINE create_e_density_section( &
    2322              :       print_key, section_name, description, stride_default, &
    2323              :       stride_usage, print_level)
    2324              : 
    2325              :       TYPE(section_type), POINTER :: print_key
    2326              :       CHARACTER(len=*), INTENT(IN) :: section_name, description, stride_usage
    2327              :       INTEGER, DIMENSION(3), INTENT(IN) :: stride_default
    2328              :       INTEGER, INTENT(IN) :: print_level
    2329              : 
    2330              :       TYPE(keyword_type), POINTER                        :: keyword
    2331              : 
    2332        18736 :       NULLIFY (keyword)
    2333              : 
    2334              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name=section_name, &
    2335              :                                        description="Controls the printing of "//TRIM(ADJUSTL(description))//" files with "// &
    2336              :                                        "the electronic density and, for LSD calculations, the spin density.", &
    2337        18736 :                                        print_level=print_level, filename="")
    2338              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2339              :                           description="The stride (X,Y,Z) used to write the "//TRIM(ADJUSTL(description))//" file "// &
    2340              :                           "(larger values result in smaller "// &
    2341              :                           TRIM(ADJUSTL(description))// &
    2342              :                           " files). You can provide 3 numbers (for X,Y,Z) or"// &
    2343              :                           " 1 number valid for all components.", &
    2344        18736 :                           usage=stride_usage, n_var=-1, default_i_vals=stride_default, type_of_var=integer_t)
    2345        18736 :       CALL section_add_keyword(print_key, keyword)
    2346        18736 :       CALL keyword_release(keyword)
    2347              : 
    2348              :       CALL keyword_create(keyword, __LOCATION__, name="DENSITY_INCLUDE", &
    2349              :                           description="Which parts of the density to include. In GAPW the electronic density "// &
    2350              :                           "is divided into a hard and a soft component, and the default (TOTAL_HARD_APPROX) "// &
    2351              :                           "is to approximate the hard density as a spherical gaussian and to print the smooth "// &
    2352              :                           "density accurately. This avoids potential artefacts originating from the hard density. "// &
    2353              :                           "If the TOTAL_DENSITY keyword is used the hard density will be computed more accurately "// &
    2354              :                           "but may introduce non-physical features. The SOFT_DENSITY keyword will lead to only the "// &
    2355              :                           "soft density being printed. In GPW these options have no effect and the cube file will "// &
    2356              :                           "only contain the valence electron density.", &
    2357              :                           usage="DENSITY_INCLUDE TOTAL_HARD_APPROX", &
    2358              :                           enum_c_vals=s2a("TOTAL_HARD_APPROX", "TOTAL_DENSITY", "SOFT_DENSITY"), &
    2359              :                           enum_desc=s2a("Print (hard+soft) density where the hard components shape is approximated", &
    2360              :                                         "Print (hard+soft) density. Only has an effect "// &
    2361              :                                         "if PAW atoms are present. NOTE: The total "// &
    2362              :                                         "in real space might exhibit unphysical features "// &
    2363              :                                         "like spikes due to the finite and thus "// &
    2364              :                                         "truncated g vector", &
    2365              :                                         "Print only the soft density"), &
    2366              :                           enum_i_vals=[e_dens_total_hard_approx, &
    2367              :                                        e_dens_total_density, &
    2368              :                                        e_dens_soft_density], &
    2369        18736 :                           default_i_val=e_dens_total_hard_approx)
    2370        18736 :       CALL section_add_keyword(print_key, keyword)
    2371        18736 :       CALL keyword_release(keyword)
    2372              : 
    2373        18736 :    END SUBROUTINE create_e_density_section
    2374              : 
    2375              :    ! **************************************************************************************************
    2376              : !> \brief Helper to create ELF print sections (cube or openPMD)
    2377              : !> \param print_key section handle (output)
    2378              : !> \param section_name name of the section (e.g. "ELF_CUBE" or "ELF_OPENPMD")
    2379              : !> \param description Either "cube" or "openPMD", for the descriptions.
    2380              : !> \param stride_default default stride values
    2381              : !> \param stride_usage usage string for stride
    2382              : !> \param print_level print level
    2383              : !> \param filename output filename (empty string for default)
    2384        18736 :    SUBROUTINE create_elf_print_section( &
    2385              :       print_key, section_name, description, stride_default, stride_usage, print_level, filename)
    2386              : 
    2387              :       TYPE(section_type), POINTER :: print_key
    2388              :       CHARACTER(len=*), INTENT(IN) :: section_name, description, stride_usage, filename
    2389              :       INTEGER, DIMENSION(3), INTENT(IN) :: stride_default
    2390              :       INTEGER, INTENT(IN) :: print_level
    2391              :       TYPE(keyword_type), POINTER :: keyword
    2392              : 
    2393        18736 :       NULLIFY (keyword)
    2394              : 
    2395              :       CALL cp_print_key_section_create(print_key, __LOCATION__, section_name, &
    2396              :                                        description="Controls printing of "//TRIM(ADJUSTL(description))// &
    2397              :                                        " files with the electron localization function (ELF). "// &
    2398              :                                        "Note that the value of ELF is defined between 0 and 1: "// &
    2399              :                                        "Pauli kinetic energy density normalized by the kinetic energy density "// &
    2400        18736 :                                        "of a uniform el. gas of same density.", print_level=print_level, filename=filename)
    2401              : 
    2402              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2403              :                           description="The stride (X,Y,Z) used to write the file (larger values result in smaller files). "// &
    2404              :                           "You can provide 3 numbers (for X,Y,Z) or 1 number valid for all components.", &
    2405        18736 :                           usage=stride_usage, n_var=-1, default_i_vals=stride_default, type_of_var=integer_t)
    2406        18736 :       CALL section_add_keyword(print_key, keyword)
    2407        18736 :       CALL keyword_release(keyword)
    2408              : 
    2409              :       CALL keyword_create(keyword, __LOCATION__, name="density_cutoff", &
    2410              :                           description=" ", usage="density_cutoff 0.0001", repeats=.FALSE., n_var=1, &
    2411        18736 :                           type_of_var=real_t, default_r_val=1.0e-10_dp)
    2412        18736 :       CALL section_add_keyword(print_key, keyword)
    2413        18736 :       CALL keyword_release(keyword)
    2414        18736 :    END SUBROUTINE create_elf_print_section
    2415              : 
    2416              : ! **************************************************************************************************
    2417              : !> \brief ...
    2418              : !> \param print_key ...
    2419              : ! **************************************************************************************************
    2420         9368 :    SUBROUTINE create_dos_section(print_key)
    2421              : 
    2422              :       TYPE(section_type), POINTER                        :: print_key
    2423              : 
    2424              :       TYPE(keyword_type), POINTER                        :: keyword
    2425              : 
    2426         9368 :       NULLIFY (keyword)
    2427              : 
    2428              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "DOS", &
    2429              :                                        description="Print Density of States (DOS) (only available states from SCF)", &
    2430         9368 :                                        print_level=debug_print_level, common_iter_levels=1, filename="")
    2431              : 
    2432              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2433              :                           description="Append the DOS obtained at different iterations to the output file. "// &
    2434              :                           "By default the file is overwritten", &
    2435              :                           usage="APPEND", default_l_val=.FALSE., &
    2436         9368 :                           lone_keyword_l_val=.TRUE.)
    2437         9368 :       CALL section_add_keyword(print_key, keyword)
    2438         9368 :       CALL keyword_release(keyword)
    2439              : 
    2440              :       CALL keyword_create(keyword, __LOCATION__, name="DELTA_E", &
    2441              :                           description="Histogramm energy spacing.", &
    2442         9368 :                           usage="DELTA_E 0.0005", type_of_var=real_t, default_r_val=0.001_dp)
    2443         9368 :       CALL section_add_keyword(print_key, keyword)
    2444         9368 :       CALL keyword_release(keyword)
    2445              : 
    2446              :       CALL keyword_create(keyword, __LOCATION__, name="NDIGITS", &
    2447              :                           description="Specify the number of digits used to print density and occupation", &
    2448         9368 :                           default_i_val=4)
    2449         9368 :       CALL section_add_keyword(print_key, keyword)
    2450         9368 :       CALL keyword_release(keyword)
    2451              : 
    2452              :       CALL keyword_create(keyword, __LOCATION__, name="MP_GRID", &
    2453              :                           description="Specify a Monkhorst-Pack grid with which to compute the density of states. "// &
    2454              :                           "Works only for a k-point calculation", &
    2455              :                           usage="MP_GRID {integer} {integer} {integer}", default_i_vals=[-1], &
    2456         9368 :                           n_var=3, type_of_var=integer_t)
    2457         9368 :       CALL section_add_keyword(print_key, keyword)
    2458         9368 :       CALL keyword_release(keyword)
    2459              : 
    2460         9368 :    END SUBROUTINE create_dos_section
    2461              : 
    2462              : ! **************************************************************************************************
    2463              : !> \brief ...
    2464              : !> \param print_key ...
    2465              : ! **************************************************************************************************
    2466        37456 :    SUBROUTINE create_pdos_section(print_key)
    2467              : 
    2468              :       TYPE(section_type), POINTER                        :: print_key
    2469              : 
    2470              :       TYPE(keyword_type), POINTER                        :: keyword
    2471              :       TYPE(section_type), POINTER                        :: subsection
    2472              : 
    2473        37456 :       NULLIFY (subsection)
    2474        37456 :       NULLIFY (keyword)
    2475              : 
    2476              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "PDOS", &
    2477              :                                        description="Print out the DOS projected per kind and angular momentum  ", &
    2478        37456 :                                        print_level=debug_print_level, common_iter_levels=1, filename="")
    2479              :       CALL keyword_create(keyword, __LOCATION__, name="COMPONENTS", &
    2480              :                           description="Print out PDOS distinguishing all angular momentum components.", &
    2481              :                           usage="COMPONENTS", default_l_val=.FALSE., &
    2482        37456 :                           lone_keyword_l_val=.TRUE.)
    2483        37456 :       CALL section_add_keyword(print_key, keyword)
    2484        37456 :       CALL keyword_release(keyword)
    2485              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2486              :                           description="Append the PDOS obtained at different iterations to the PDOS output file. "// &
    2487              :                           "By default the file is overwritten", &
    2488              :                           usage="APPEND", default_l_val=.FALSE., &
    2489        37456 :                           lone_keyword_l_val=.TRUE.)
    2490        37456 :       CALL section_add_keyword(print_key, keyword)
    2491        37456 :       CALL keyword_release(keyword)
    2492              :       CALL keyword_create( &
    2493              :          keyword, __LOCATION__, name="NLUMO", &
    2494              :          description="Number of virtual orbitals to be added to the MO set (-1=all)."//newline// &
    2495              :          "CAUTION: Setting this value to be higher than the "// &
    2496              :          "number of states present may cause a Cholesky error."//newline// &
    2497              :          "This keyword only applies to MO sets, not to XAS_TDP states.", &
    2498        37456 :          usage="NLUMO integer", default_i_val=0)
    2499        37456 :       CALL section_add_keyword(print_key, keyword)
    2500        37456 :       CALL keyword_release(keyword)
    2501              :       CALL keyword_create(keyword, __LOCATION__, name="OUT_EACH_STATE", &
    2502              :                           variants=["OUT_EACH_MO"], &
    2503              :                           description="Output on the status of the calculation every OUT_EACH_MO states. If -1 no output", &
    2504        74912 :                           usage="OUT_EACH_STATE integer", default_i_val=-1)
    2505        37456 :       CALL section_add_keyword(print_key, keyword)
    2506        37456 :       CALL keyword_release(keyword)
    2507              : 
    2508              :       CALL section_create(subsection, __LOCATION__, name="LDOS", &
    2509              :                           description="Controls the printing of local PDOS, projected on subsets"// &
    2510              :                           " of atoms given through lists", &
    2511        37456 :                           n_keywords=4, n_subsections=0, repeats=.TRUE.)
    2512              :       CALL keyword_create(keyword, __LOCATION__, name="COMPONENTS", &
    2513              :                           description="Print out PDOS distinguishing all angular momentum components.", &
    2514              :                           usage="COMPONENTS", default_l_val=.FALSE., &
    2515        37456 :                           lone_keyword_l_val=.TRUE.)
    2516        37456 :       CALL section_add_keyword(subsection, keyword)
    2517        37456 :       CALL keyword_release(keyword)
    2518              : 
    2519              :       CALL keyword_create(keyword, __LOCATION__, name="LIST", &
    2520              :                           description="Specifies a list of indexes of atoms where to project the DOS  ", &
    2521              :                           usage="LIST {integer}  {integer} ..  {integer} ", type_of_var=integer_t, &
    2522        37456 :                           n_var=-1, repeats=.TRUE.)
    2523        37456 :       CALL section_add_keyword(subsection, keyword)
    2524        37456 :       CALL keyword_release(keyword)
    2525              : 
    2526        37456 :       CALL section_add_subsection(print_key, subsection)
    2527        37456 :       CALL section_release(subsection)
    2528              : 
    2529              :       CALL section_create(subsection, __LOCATION__, name="R_LDOS", &
    2530              :                           description="Controls the printing of local PDOS, projected on 3D volume in real space,"// &
    2531              :                           " the volume is defined in terms of position with respect to atoms in the lists", &
    2532        37456 :                           n_keywords=4, n_subsections=0, repeats=.TRUE.)
    2533              : 
    2534              :       CALL keyword_create(keyword, __LOCATION__, name="LIST", &
    2535              :                           description="Specifies a list of indexes of atoms used to define the real space volume  ", &
    2536              :                           usage="LIST {integer}  {integer} ..  {integer} ", type_of_var=integer_t, &
    2537        37456 :                           n_var=-1, repeats=.TRUE.)
    2538        37456 :       CALL section_add_keyword(subsection, keyword)
    2539        37456 :       CALL keyword_release(keyword)
    2540              : 
    2541              :       CALL keyword_create(keyword, __LOCATION__, name="XRANGE", &
    2542              :                           description="range of positions in Cartesian direction x: all grid points within "// &
    2543              :                           "this range from at least one atom of the list are considered", &
    2544        37456 :                           usage="XRANGE -10.0 10.0", unit_str="angstrom", n_var=2, type_of_var=real_t)
    2545        37456 :       CALL section_add_keyword(subsection, keyword)
    2546        37456 :       CALL keyword_release(keyword)
    2547              :       CALL keyword_create(keyword, __LOCATION__, name="YRANGE", &
    2548              :                           description="range of positions in Cartesian direction y: all grid points within "// &
    2549              :                           "this range from at least one atom of the list are considered", &
    2550        37456 :                           usage="YRANGE -10.0 10.0", unit_str="angstrom", n_var=2, type_of_var=real_t)
    2551        37456 :       CALL section_add_keyword(subsection, keyword)
    2552        37456 :       CALL keyword_release(keyword)
    2553              :       CALL keyword_create(keyword, __LOCATION__, name="ZRANGE", &
    2554              :                           description="range of positions in Cartesian direction z: all grid points within "// &
    2555              :                           "this range from at least one atom of the list are considered", &
    2556        37456 :                           usage="ZRANGE -10.0 10.0", unit_str="angstrom", n_var=2, type_of_var=real_t)
    2557        37456 :       CALL section_add_keyword(subsection, keyword)
    2558        37456 :       CALL keyword_release(keyword)
    2559              : 
    2560              :       CALL keyword_create(keyword, __LOCATION__, name="ERANGE", &
    2561              :                           description="Only project states with the energy values in the given interval. "// &
    2562              :                           "Default is all states.", &
    2563        37456 :                           usage="ERANGE -1.0 1.0", unit_str="hartree", n_var=2, type_of_var=real_t)
    2564        37456 :       CALL section_add_keyword(subsection, keyword)
    2565        37456 :       CALL keyword_release(keyword)
    2566              : 
    2567        37456 :       CALL section_add_subsection(print_key, subsection)
    2568        37456 :       CALL section_release(subsection)
    2569              : 
    2570        37456 :    END SUBROUTINE create_pdos_section
    2571              : 
    2572              : ! **************************************************************************************************
    2573              : !> \brief ...
    2574              : !> \param print_key ...
    2575              : ! **************************************************************************************************
    2576         9368 :    SUBROUTINE create_wannier_section(print_key)
    2577              : 
    2578              :       TYPE(section_type), POINTER                        :: print_key
    2579              : 
    2580              :       TYPE(keyword_type), POINTER                        :: keyword
    2581              : 
    2582         9368 :       NULLIFY (keyword)
    2583              : 
    2584              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "WANNIER90", &
    2585              :                                        description="Interface to Wannier90 code. (EXPERIMENTAL)", &
    2586         9368 :                                        print_level=debug_print_level, common_iter_levels=1, filename="")
    2587              : 
    2588              :       CALL keyword_create(keyword, __LOCATION__, name="SEED_NAME", &
    2589              :                           description="The seedname for the Wannier90 calculation (body of filenames).", &
    2590              :                           usage="SEED_NAME  filename", default_c_val="wannier90", &
    2591         9368 :                           n_var=1, type_of_var=char_t)
    2592         9368 :       CALL section_add_keyword(print_key, keyword)
    2593         9368 :       CALL keyword_release(keyword)
    2594              : 
    2595              :       CALL keyword_create(keyword, __LOCATION__, name="MP_GRID", &
    2596              :                           description="The dimensions of the Monkhorst-Pack k-point grid. ", &
    2597         9368 :                           usage="MP_GRID 6 6 6", n_var=-1, default_i_vals=[10, 10, 10], type_of_var=integer_t)
    2598         9368 :       CALL section_add_keyword(print_key, keyword)
    2599         9368 :       CALL keyword_release(keyword)
    2600              : 
    2601              :       CALL keyword_create(keyword, __LOCATION__, name="ADDED_MOS", &
    2602              :                           variants=["ADDED_BANDS"], &
    2603              :                           description="Number of MOs/Bands added to the Band Structure calculation.", &
    2604        18736 :                           default_i_val=0)
    2605         9368 :       CALL section_add_keyword(print_key, keyword)
    2606         9368 :       CALL keyword_release(keyword)
    2607              : 
    2608              :       CALL keyword_create(keyword, __LOCATION__, name="EXCLUDE_BANDS", &
    2609              :                           description="List of Bands excluded in the Wannier calculation.", &
    2610              :                           usage="EXCLUDE_BANDS b1 b2 ...", n_var=-1, repeats=.TRUE., &
    2611         9368 :                           type_of_var=integer_t)
    2612         9368 :       CALL section_add_keyword(print_key, keyword)
    2613         9368 :       CALL keyword_release(keyword)
    2614              : 
    2615              :       CALL keyword_create(keyword, __LOCATION__, name="WANNIER_FUNCTIONS", &
    2616              :                           description="Number of Wannier functions to be calculated. ", &
    2617              :                           usage="WANNIER_FUNCTIONS 6", n_var=1, default_i_val=0, &
    2618         9368 :                           repeats=.TRUE., type_of_var=integer_t)
    2619         9368 :       CALL section_add_keyword(print_key, keyword)
    2620         9368 :       CALL keyword_release(keyword)
    2621              : 
    2622         9368 :    END SUBROUTINE create_wannier_section
    2623              : 
    2624              : ! **************************************************************************************************
    2625              : !> \brief ...
    2626              : !> \param print_key ...
    2627              : ! **************************************************************************************************
    2628         9368 :    SUBROUTINE create_stm_section(print_key)
    2629              :       TYPE(section_type), POINTER                        :: print_key
    2630              : 
    2631              :       TYPE(keyword_type), POINTER                        :: keyword
    2632              : 
    2633         9368 :       NULLIFY (keyword)
    2634              : 
    2635              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "STM", &
    2636              :                                        description="Controls the printing of cubes for the generation of STM images.", &
    2637         9368 :                                        print_level=debug_print_level, filename="")
    2638              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2639              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2640              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    2641              :                           " 1 number valid for all components.", &
    2642         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    2643         9368 :       CALL section_add_keyword(print_key, keyword)
    2644         9368 :       CALL keyword_release(keyword)
    2645              : 
    2646              :       CALL keyword_create(keyword, __LOCATION__, name="nlumo", &
    2647              :                           description="If the printkey is activated controls the number of additional lumos"// &
    2648              :                           " that are computed to be able to reproduce STM images obtained"// &
    2649              :                           "  from positive bias (imaging unoccupied states)", &
    2650         9368 :                           default_i_val=0)
    2651         9368 :       CALL section_add_keyword(print_key, keyword)
    2652         9368 :       CALL keyword_release(keyword)
    2653              : 
    2654              :       CALL keyword_create(keyword, __LOCATION__, name="BIAS", &
    2655              :                           description="Bias energy for scanning tunneling microscopy (STM) image generation. "// &
    2656              :                           "Orbital densities are summed according to the bias energy. "// &
    2657              :                           "For negative values, states in the range ]EF+bias,EF] are summed, "// &
    2658              :                           "While positive values sum states in the range [EF,EF+bias[. "// &
    2659              :                           "If positive biases are used, sufficiently many unoccupied stated "// &
    2660              :                           "(see ADDED_MOS and NLUMO ) should be computed.", &
    2661         9368 :                           n_var=-1, type_of_var=real_t, default_r_vals=[0.0_dp], unit_str='eV')
    2662         9368 :       CALL section_add_keyword(print_key, keyword)
    2663         9368 :       CALL keyword_release(keyword)
    2664              : 
    2665              :       CALL keyword_create(keyword, __LOCATION__, name="TH_TORB", &
    2666              :                           description="Tip orbital symmetry in Tersoff-Hamann approximation to compute STM images", &
    2667              :                           repeats=.TRUE., &
    2668              :                           default_i_val=orb_s, &
    2669              :                           usage="TH_TORB s dz2", &
    2670              :                           enum_c_vals=s2a("S", "PX", "PY", "PZ", "DXY", "DYZ", "DZX", "DX2", "DY2", "DZ2"), &
    2671              :                           enum_i_vals=[orb_s, orb_px, orb_py, orb_pz, orb_dxy, orb_dyz, orb_dzx, orb_dx2, orb_dy2, orb_dz2], &
    2672              :                           enum_desc=s2a("s orbital", "px orbital", "py orbital", "pz orbital", &
    2673         9368 :                                         "dxy orbital", "dyz orbital", "dzx orbital", "x^2 orbital", "y^2 orbital", "z^2 orbital"))
    2674         9368 :       CALL section_add_keyword(print_key, keyword)
    2675         9368 :       CALL keyword_release(keyword)
    2676              : 
    2677              :       CALL keyword_create(keyword, __LOCATION__, name="REF_ENERGY", &
    2678              :                           description="By default the reference energy is the Fermi energy. In order to compare"// &
    2679              :                           " with STS experiments, where specific energy ranges are addressed, here"// &
    2680              :                           "  one can set a different reference energy."// &
    2681              :                           " The energy range is anyway controlled by the BIAS", &
    2682         9368 :                           type_of_var=real_t, default_r_val=0.0_dp, unit_str='eV')
    2683         9368 :       CALL section_add_keyword(print_key, keyword)
    2684         9368 :       CALL keyword_release(keyword)
    2685              : 
    2686              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2687              :                           description="append the cube files when they already exist", &
    2688         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2689         9368 :       CALL section_add_keyword(print_key, keyword)
    2690         9368 :       CALL keyword_release(keyword)
    2691              : 
    2692         9368 :    END SUBROUTINE create_stm_section
    2693              : 
    2694              : ! **************************************************************************************************
    2695              : !> \brief ...
    2696              : !> \param section ...
    2697              : ! **************************************************************************************************
    2698         9368 :    SUBROUTINE create_wfn_mix_section(section)
    2699              : 
    2700              :       TYPE(section_type), POINTER                        :: section
    2701              : 
    2702              :       TYPE(keyword_type), POINTER                        :: keyword
    2703              :       TYPE(section_type), POINTER                        :: subsection
    2704              : 
    2705         9368 :       NULLIFY (subsection)
    2706         9368 :       NULLIFY (keyword)
    2707              : 
    2708         9368 :       CPASSERT(.NOT. ASSOCIATED(section))
    2709              : 
    2710              :       CALL section_create(section, __LOCATION__, name="WFN_MIX", &
    2711              :                           description="A section that allows manipulation of the MO coeffs, "// &
    2712              :                           "e.g. for changing a ground state into an excited state. "// &
    2713              :                           "Starting from a copy of the original MOs, changes can be made "// &
    2714              :                           "by adding linear combinations of HOMO/LUMO of the original MOs to the result MOs. "// &
    2715              :                           "This method is called after an SCF optimization or before an RTP run if "// &
    2716              :                           "INITIAL_WFN=RESTART_WFN. Note that if called after an SCF optimization, a restart file "// &
    2717              :                           "with the mixed MOs is saved. This is not the case for an RTP with "// &
    2718              :                           "INITIAL_WFN=RESTART_WFN.", &
    2719         9368 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    2720              : 
    2721              :       CALL keyword_create(keyword, __LOCATION__, name="OVERWRITE_MOS", &
    2722              :                         description="If set to True, the active molecular orbitals in memory will be replaced by the mixed wfn "// &
    2723              :                         "at the end of the wfn mixing procedure. For instance, you can then use this new set of MOs to perform "// &
    2724              :                      "RTP or EMD directly. Note that in the case of an RTP run with INITIAL_WFN=RESTART_WFN, the OVERWRITE_MOS "// &
    2725              :                           "keyword is not used.", &
    2726         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2727         9368 :       CALL section_add_keyword(section, keyword)
    2728         9368 :       CALL keyword_release(keyword)
    2729              : 
    2730              :       CALL section_create(subsection, __LOCATION__, name="UPDATE", &
    2731              :                           description="Update a result MO with with a linear combination of original MOs."// &
    2732              :                           " This section can be repeated to build arbitrary linear combinations using repeatedly y=a*y+b*x. "// &
    2733              :                           "RESULT is (y), RESULT_SCALE is (a), ORIG is (x), ORIG_SCALE is (b)", &
    2734         9368 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2735              : 
    2736              :       CALL keyword_create(keyword, __LOCATION__, name="RESULT_MO_INDEX", &
    2737              :                           description="Index of the MO (y) to be modified. Counting down in energy: "// &
    2738              :                           "set to 1 for the highest MO, to 3 for the highest MO-2.", &
    2739         9368 :                           usage="RESULT_MO_INDEX 1", type_of_var=integer_t, default_i_val=0)
    2740         9368 :       CALL section_add_keyword(subsection, keyword)
    2741         9368 :       CALL keyword_release(keyword)
    2742              : 
    2743              :       CALL keyword_create(keyword, __LOCATION__, name="RESULT_MARKED_STATE", &
    2744              :                           description="Specifies the MO according to "// &
    2745              :                           "the marks set in MOLECULAR_STATES. The value corresponds to the repetition "// &
    2746              :                           "of MARK_STATES in MOLECULAR_STATES", &
    2747         9368 :                           usage="RESULT_MARKED_STATE 1", type_of_var=integer_t, default_i_val=0)
    2748         9368 :       CALL section_add_keyword(subsection, keyword)
    2749         9368 :       CALL keyword_release(keyword)
    2750              : 
    2751              :       CALL keyword_create(keyword, __LOCATION__, name="REVERSE_MO_INDEX", &
    2752              :                           description="Reverses the index order of the OCCUPIED and EXTERNAL MOs. With this keyword "// &
    2753              :                           "ORIG_MO_INDEX/RESULT_MO_INDEX 1 point to the lowest energy MO (instead of the highest) "// &
    2754              :                           "and counts up in energy. The VIRTUAL MOs indexing is unchanged.", &
    2755         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2756         9368 :       CALL section_add_keyword(subsection, keyword)
    2757         9368 :       CALL keyword_release(keyword)
    2758              : 
    2759              :       CALL keyword_create(keyword, __LOCATION__, name="RESULT_SPIN_INDEX", &
    2760              :                           description="Spin of the MO (y) to be modified.", &
    2761              :                           enum_c_vals=s2a("Alpha", "Beta"), &
    2762              :                           enum_i_vals=[1, 2], & ! direct index in array
    2763              :                           default_i_val=1, &
    2764         9368 :                           enum_desc=s2a("Majority spin", "Minority spin"))
    2765         9368 :       CALL section_add_keyword(subsection, keyword)
    2766         9368 :       CALL keyword_release(keyword)
    2767              : 
    2768              :       CALL keyword_create(keyword, __LOCATION__, name="RESULT_SCALE", &
    2769              :                           description="Scaling factor of the result variable (a).", &
    2770         9368 :                           usage="RESULT_SCALE 0.0", type_of_var=real_t)
    2771         9368 :       CALL section_add_keyword(subsection, keyword)
    2772         9368 :       CALL keyword_release(keyword)
    2773              : 
    2774              :       CALL keyword_create(keyword, __LOCATION__, name="ORIG_MO_INDEX", &
    2775              :                           description="Index of the original MO (x). "// &
    2776              :                           "If ORIG_TYPE is OCCUPIED, it counts down in energy: set to 1 to point to "// &
    2777              :                           "the highest MO and to 3 for the highest MO-2. "// &
    2778              :                           "If ORIG_TYPE is VIRTUAL, it counts up in energy: set to 1 to point to "// &
    2779              :                           "the lowest virtual MO and to 3 for the lowest MO+2. "// &
    2780              :                           "If ORIG_TYPE is EXTERNAL, it counts down in energy for the external "// &
    2781              :                           "set of MOs: set to 1 to point to the highest MO and to 3 for the highest MO-2. "// &
    2782              :                           "Do not set to zero or negative values.", &
    2783         9368 :                           usage="ORIG_MO_INDEX 1", type_of_var=integer_t, default_i_val=0)
    2784         9368 :       CALL section_add_keyword(subsection, keyword)
    2785         9368 :       CALL keyword_release(keyword)
    2786              : 
    2787              :       CALL keyword_create(keyword, __LOCATION__, name="ORIG_MARKED_STATE", &
    2788              :                           description="Specifies the MO according to "// &
    2789              :                           "the marks set in MOLECULAR_STATES. The value corresponds to the repetition "// &
    2790              :                           "of MARK_STATES in MOLECULAR_STATES", &
    2791         9368 :                           usage="ORIG_MARKED_STATE 1", type_of_var=integer_t, default_i_val=0)
    2792         9368 :       CALL section_add_keyword(subsection, keyword)
    2793         9368 :       CALL keyword_release(keyword)
    2794              : 
    2795              :       CALL keyword_create(keyword, __LOCATION__, name="ORIG_SPIN_INDEX", &
    2796              :                           description="Spin of the MO (x) to be modified.", &
    2797              :                           enum_c_vals=s2a("Alpha", "Beta"), &
    2798              :                           enum_i_vals=[1, 2], & ! direct index in array
    2799              :                           default_i_val=1, &
    2800         9368 :                           enum_desc=s2a("Majority spin", "Minority spin"))
    2801         9368 :       CALL section_add_keyword(subsection, keyword)
    2802         9368 :       CALL keyword_release(keyword)
    2803              : 
    2804              :       CALL keyword_create(keyword, __LOCATION__, name="ORIG_SCALE", &
    2805              :                           description="Scaling factor of the original variable (b).", &
    2806         9368 :                           usage="ORIG_SCALE 0.0", type_of_var=real_t)
    2807         9368 :       CALL section_add_keyword(subsection, keyword)
    2808         9368 :       CALL keyword_release(keyword)
    2809              : 
    2810              :       CALL keyword_create(keyword, __LOCATION__, name="ORIG_TYPE", &
    2811              :                           description="Type of the original MO. Note that if ADDED_MOS was used in the "// &
    2812              :                           "SCF construction of the MO matrix, these extra MOs are also treated as OCCUPIED. ", &
    2813              :                           enum_c_vals=s2a("OCCUPIED", "VIRTUAL", 'EXTERNAL'), &
    2814              :                           usage="ORIG_TYPE OCCUPIED", &
    2815              :                           default_i_val=wfn_mix_orig_occ, &
    2816              :                           enum_desc=s2a("The original MO is the result of the SCF procedure. This can also contain "// &
    2817              :                                         "unoccupied MOs if the SCF%ADDED_MOS keyword was used.", &
    2818              :                                         "The original MO is taken from the result of additional MOs calculated a "// &
    2819              :                                         "posteriori of the SCF by request of the user. E.g. by specifying print%mo_cubes%nlumo. ", &
    2820              :                                         "The orginal MO is from an external .wfn file. Use the keyword "// &
    2821              :                                         "ORIG_EXT_FILE_NAME to define its name."), &
    2822         9368 :                           enum_i_vals=[wfn_mix_orig_occ, wfn_mix_orig_virtual, wfn_mix_orig_external])
    2823         9368 :       CALL section_add_keyword(subsection, keyword)
    2824         9368 :       CALL keyword_release(keyword)
    2825              : 
    2826              :       CALL keyword_create(keyword, __LOCATION__, name="ORIG_EXT_FILE_NAME", &
    2827              :                           description="Name of the wavefunction file to read the original MO from. "// &
    2828              :                           "For instance, a restart wfn file from SCF calculation or an excited state from XAS_TDP calculation. "// &
    2829              :                           "If no file is specified, the run will crash. "// &
    2830              :                           "Currently, a RTP restart file (.rtpwfn) cannot be used as reference. "// &
    2831              :                           "Currently, this file SHALL have the basis set, number of MO and the same number of spin as the one "// &
    2832              :                           "from the SCF cycle.", &
    2833              :                           usage="ORIG_EXT_FILE_NAME <FILENAME>", &
    2834         9368 :                           default_lc_val="EMPTY")
    2835         9368 :       CALL section_add_keyword(subsection, keyword)
    2836         9368 :       CALL keyword_release(keyword)
    2837              : 
    2838         9368 :       CALL section_add_subsection(section, subsection)
    2839         9368 :       CALL section_release(subsection)
    2840              : 
    2841         9368 :    END SUBROUTINE create_wfn_mix_section
    2842              : 
    2843              : ! **************************************************************************************************
    2844              : !> \brief Creates the section for cube files related to the implicit Poisson solver.
    2845              : !> \param section the section to be created
    2846              : !> \par History
    2847              : !>      03.2016 refactored from create_print_dft_section [Hossein Bani-Hashemian]
    2848              : !> \author Mohammad Hossein Bani-Hashemian
    2849              : ! **************************************************************************************************
    2850         9368 :    SUBROUTINE create_implicit_psolver_section(section)
    2851              :       TYPE(section_type), POINTER                        :: section
    2852              : 
    2853              :       TYPE(keyword_type), POINTER                        :: keyword
    2854              :       TYPE(section_type), POINTER                        :: print_key
    2855              : 
    2856         9368 :       CPASSERT(.NOT. ASSOCIATED(section))
    2857              :       CALL section_create(section, __LOCATION__, name="IMPLICIT_PSOLVER", &
    2858              :                           description="Controls printing of cube files for data from the implicit "// &
    2859              :                           "(generalized) Poisson solver.", &
    2860              :                           citations=[BaniHashemian2016], &
    2861        18736 :                           n_keywords=0, n_subsections=3, repeats=.FALSE.)
    2862              : 
    2863         9368 :       NULLIFY (keyword, print_key)
    2864              : 
    2865              :       ! dielectric constant function
    2866              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "DIELECTRIC_CUBE", &
    2867              :                                        description="Controls the printing of a cube file with dielectric constant from "// &
    2868              :                                        "the implicit (generalized) Poisson solver.", &
    2869         9368 :                                        print_level=high_print_level, filename="")
    2870              : 
    2871              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2872              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2873              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    2874              :                           " 1 number valid for all components.", &
    2875         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    2876         9368 :       CALL section_add_keyword(print_key, keyword)
    2877         9368 :       CALL keyword_release(keyword)
    2878              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2879              :                           description="append the cube files when they already exist", &
    2880         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2881         9368 :       CALL section_add_keyword(print_key, keyword)
    2882         9368 :       CALL keyword_release(keyword)
    2883              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
    2884              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
    2885         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
    2886         9368 :       CALL section_add_keyword(print_key, keyword)
    2887         9368 :       CALL keyword_release(keyword)
    2888              : 
    2889         9368 :       CALL section_add_subsection(section, print_key)
    2890         9368 :       CALL section_release(print_key)
    2891              : 
    2892              :       ! dirichlet type constraints
    2893              :       CALL cp_print_key_section_create( &
    2894              :          print_key, __LOCATION__, "DIRICHLET_BC_CUBE", &
    2895              :          description="Controls the printing of cube files with unit step functions (constraints)"// &
    2896              :          " representing Dirichlet-type (boundary) regions defined in the implicit (generalized) Poisson"// &
    2897              :          " solver section. The regions remain unchanged throughout the calculations. If the Dirichlet"// &
    2898              :          " regions are relatively large and/or the number of partitions is quite high, in order to save memory,"// &
    2899              :          " generate the cube files in early steps and perform the rest of the calculations with this keyword"// &
    2900              :          " switched off.", &
    2901         9368 :          print_level=high_print_level, filename="")
    2902              : 
    2903              :       CALL keyword_create(keyword, __LOCATION__, name="TILE_CUBES", &
    2904              :                           description="Print tiles that tessellate the Dirichlet regions into cube files. If TRUE, "// &
    2905              :                           "generates cube files as many as the total number of tiles.", &
    2906              :                           usage="TILE_CUBES <logical>", &
    2907         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2908         9368 :       CALL section_add_keyword(print_key, keyword)
    2909         9368 :       CALL keyword_release(keyword)
    2910              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2911              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2912              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    2913              :                           " 1 number valid for all components.", &
    2914         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    2915         9368 :       CALL section_add_keyword(print_key, keyword)
    2916         9368 :       CALL keyword_release(keyword)
    2917              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2918              :                           description="append the cube files when they already exist", &
    2919         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2920         9368 :       CALL section_add_keyword(print_key, keyword)
    2921         9368 :       CALL keyword_release(keyword)
    2922              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
    2923              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
    2924         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
    2925         9368 :       CALL section_add_keyword(print_key, keyword)
    2926         9368 :       CALL keyword_release(keyword)
    2927              : 
    2928         9368 :       CALL section_add_subsection(section, print_key)
    2929         9368 :       CALL section_release(print_key)
    2930              : 
    2931              :       ! charge introduced by Lagrange multipliers
    2932              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "DIRICHLET_CSTR_CHARGE_CUBE", &
    2933              :                                        description="Controls the printing of cube files with penalty charges induced to "// &
    2934              :                                        "Dirichlet regions by Lagrange multipliers (implicit Poisson solver).", &
    2935         9368 :                                        print_level=high_print_level, filename="")
    2936              : 
    2937              :       CALL keyword_create(keyword, __LOCATION__, name="stride", &
    2938              :                           description="The stride (X,Y,Z) used to write the cube file "// &
    2939              :                           "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
    2940              :                           " 1 number valid for all components.", &
    2941         9368 :                           usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
    2942         9368 :       CALL section_add_keyword(print_key, keyword)
    2943         9368 :       CALL keyword_release(keyword)
    2944              :       CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
    2945              :                           description="append the cube files when they already exist", &
    2946         9368 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2947         9368 :       CALL section_add_keyword(print_key, keyword)
    2948         9368 :       CALL keyword_release(keyword)
    2949              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_FILE_SIZE_MB", &
    2950              :                           description="Limits the size of the cube file by choosing a suitable stride. Zero means no limit.", &
    2951         9368 :                           usage="MAX_FILE_SIZE_MB 1.5", default_r_val=0.0_dp)
    2952         9368 :       CALL section_add_keyword(print_key, keyword)
    2953         9368 :       CALL keyword_release(keyword)
    2954              : 
    2955         9368 :       CALL section_add_subsection(section, print_key)
    2956         9368 :       CALL section_release(print_key)
    2957              : 
    2958         9368 :    END SUBROUTINE create_implicit_psolver_section
    2959              : 
    2960              : ! **************************************************************************************************
    2961              : !> \brief creates the interpolation section for the periodic QM/MM
    2962              : !> \param section ...
    2963              : !> \author tlaino
    2964              : ! **************************************************************************************************
    2965         9368 :    SUBROUTINE create_gspace_interp_section(section)
    2966              :       TYPE(section_type), POINTER                        :: section
    2967              : 
    2968              :       TYPE(keyword_type), POINTER                        :: keyword
    2969              :       TYPE(section_type), POINTER                        :: print_key
    2970              : 
    2971         9368 :       CPASSERT(.NOT. ASSOCIATED(section))
    2972              :       CALL section_create(section, __LOCATION__, name="interpolator", &
    2973              :                           description="controls the interpolation for the G-space term", &
    2974         9368 :                           n_keywords=5, n_subsections=0, repeats=.FALSE.)
    2975              : 
    2976         9368 :       NULLIFY (keyword, print_key)
    2977              : 
    2978              :       CALL keyword_create(keyword, __LOCATION__, name="aint_precond", &
    2979              :                           description="the approximate inverse to use to get the starting point"// &
    2980              :                           " for the linear solver of the spline3 methods", &
    2981              :                           usage="aint_precond copy", &
    2982              :                           default_i_val=precond_spl3_aint, &
    2983              :                           enum_c_vals=s2a("copy", "spl3_nopbc_aint1", "spl3_nopbc_precond1", &
    2984              :                                           "spl3_nopbc_aint2", "spl3_nopbc_precond2", "spl3_nopbc_precond3"), &
    2985              :                           enum_i_vals=[no_precond, precond_spl3_aint, precond_spl3_1, &
    2986         9368 :                                        precond_spl3_aint2, precond_spl3_2, precond_spl3_3])
    2987         9368 :       CALL section_add_keyword(section, keyword)
    2988         9368 :       CALL keyword_release(keyword)
    2989              : 
    2990              :       CALL keyword_create(keyword, __LOCATION__, name="precond", &
    2991              :                           description="The preconditioner used"// &
    2992              :                           " for the linear solver of the spline3 methods", &
    2993              :                           usage="precond copy", &
    2994              :                           default_i_val=precond_spl3_3, &
    2995              :                           enum_c_vals=s2a("copy", "spl3_nopbc_aint1", "spl3_nopbc_precond1", &
    2996              :                                           "spl3_nopbc_aint2", "spl3_nopbc_precond2", "spl3_nopbc_precond3"), &
    2997              :                           enum_i_vals=[no_precond, precond_spl3_aint, precond_spl3_1, &
    2998         9368 :                                        precond_spl3_aint2, precond_spl3_2, precond_spl3_3])
    2999         9368 :       CALL section_add_keyword(section, keyword)
    3000         9368 :       CALL keyword_release(keyword)
    3001              : 
    3002              :       CALL keyword_create(keyword, __LOCATION__, name="eps_x", &
    3003              :                           description="accuracy on the solution for spline3 the interpolators", &
    3004         9368 :                           usage="eps_x 1.e-15", default_r_val=1.e-10_dp)
    3005         9368 :       CALL section_add_keyword(section, keyword)
    3006         9368 :       CALL keyword_release(keyword)
    3007              : 
    3008              :       CALL keyword_create(keyword, __LOCATION__, name="eps_r", &
    3009              :                           description="accuracy on the residual for spline3 the interpolators", &
    3010         9368 :                           usage="eps_r 1.e-15", default_r_val=1.e-10_dp)
    3011         9368 :       CALL section_add_keyword(section, keyword)
    3012         9368 :       CALL keyword_release(keyword)
    3013              : 
    3014              :       CALL keyword_create(keyword, __LOCATION__, name="max_iter", &
    3015              :                           variants=['maxiter'], &
    3016              :                           description="the maximum number of iterations", &
    3017        18736 :                           usage="max_iter 200", default_i_val=100)
    3018         9368 :       CALL section_add_keyword(section, keyword)
    3019         9368 :       CALL keyword_release(keyword)
    3020              : 
    3021         9368 :       NULLIFY (print_key)
    3022              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "conv_info", &
    3023              :                                        description="if convergence information about the linear solver"// &
    3024              :                                        " of the spline methods should be printed", &
    3025              :                                        print_level=medium_print_level, each_iter_names=s2a("SPLINE_FIND_COEFFS"), &
    3026              :                                        each_iter_values=[10], filename="__STD_OUT__", &
    3027         9368 :                                        add_last=add_last_numeric)
    3028         9368 :       CALL section_add_subsection(section, print_key)
    3029         9368 :       CALL section_release(print_key)
    3030              : 
    3031         9368 :    END SUBROUTINE create_gspace_interp_section
    3032              : 
    3033              : END MODULE input_cp2k_print_dft
        

Generated by: LCOV version 2.0-1