LCOV - code coverage report
Current view: top level - src - input_cp2k_mm.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:123285f) Lines: 100.0 % 1031 1031
Test Date: 2026-11-04 00:58:17 Functions: 100.0 % 39 39

            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 creates the mm section of the input
      10              : !> \note
      11              : !>      moved out of input_cp2k
      12              : !> \par History
      13              : !>      04.2004 created
      14              : !> \author fawzi
      15              : ! **************************************************************************************************
      16              : MODULE input_cp2k_mm
      17              :    USE bibliography,                    ONLY: &
      18              :         Batatia2022, Batzner2022, Bochkarev2024, Clabaut2020, Clabaut2021, Devynck2012, Dick1958, &
      19              :         Drautz2019, Foiles1986, Lysogorskiy2021, Mitchell1993, Musaelian2023, Siepmann1995, &
      20              :         Tan2025, Tersoff1988, Tosi1964a, Tosi1964b, Wang2018, Yamada2000, Zeng2023
      21              :    USE cp_output_handling,              ONLY: cp_print_key_section_create,&
      22              :                                               debug_print_level,&
      23              :                                               high_print_level,&
      24              :                                               low_print_level,&
      25              :                                               medium_print_level,&
      26              :                                               silent_print_level
      27              :    USE cp_units,                        ONLY: cp_unit_to_cp2k
      28              :    USE force_field_kind_types,          ONLY: &
      29              :         do_ff_amber, do_ff_charmm, do_ff_cubic, do_ff_fues, do_ff_g87, do_ff_g96, do_ff_harmonic, &
      30              :         do_ff_legendre, do_ff_mixed_bend_stretch, do_ff_mm2, do_ff_mm3, do_ff_mm4, do_ff_morse, &
      31              :         do_ff_opls, do_ff_quartic, do_ff_undef
      32              :    USE generic_function_input,          ONLY: create_function_section
      33              :    USE input_constants,                 ONLY: use_mom_ref_coac,&
      34              :                                               use_mom_ref_com,&
      35              :                                               use_mom_ref_user,&
      36              :                                               use_mom_ref_zero
      37              :    USE input_cp2k_field,                ONLY: create_per_efield_section
      38              :    USE input_cp2k_poisson,              ONLY: create_poisson_section
      39              :    USE input_keyword_types,             ONLY: keyword_create,&
      40              :                                               keyword_release,&
      41              :                                               keyword_type
      42              :    USE input_section_types,             ONLY: section_add_keyword,&
      43              :                                               section_add_subsection,&
      44              :                                               section_create,&
      45              :                                               section_release,&
      46              :                                               section_type
      47              :    USE input_val_types,                 ONLY: char_t,&
      48              :                                               integer_t,&
      49              :                                               lchar_t,&
      50              :                                               real_t
      51              :    USE kinds,                           ONLY: default_string_length,&
      52              :                                               dp
      53              :    USE string_utilities,                ONLY: newline,&
      54              :                                               s2a
      55              : #include "./base/base_uses.f90"
      56              : 
      57              :    IMPLICIT NONE
      58              :    PRIVATE
      59              : 
      60              :    LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
      61              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_mm'
      62              : 
      63              :    PUBLIC :: create_mm_section, create_dipoles_section
      64              :    PUBLIC :: create_NONBONDED14_section, create_LJ_section, create_Williams_section, &
      65              :              create_Goodwin_section, &
      66              :              create_GENPOT_section, create_TABPOT_section, create_neighbor_lists_section
      67              :    PUBLIC :: create_CHARGE_section
      68              : !***
      69              : CONTAINS
      70              : 
      71              : ! **************************************************************************************************
      72              : !> \brief Create the input section for FIST.. Come on.. Let's get woohooo
      73              : !> \param section the section to create
      74              : !> \author teo
      75              : ! **************************************************************************************************
      76         1462 :    SUBROUTINE create_mm_section(section)
      77              :       TYPE(section_type), POINTER                        :: section
      78              : 
      79              :       TYPE(section_type), POINTER                        :: subsection
      80              : 
      81         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
      82              :       CALL section_create(section, __LOCATION__, name="mm", &
      83              :                           description="This section contains all information to run a MM calculation.", &
      84         1462 :                           n_keywords=5, n_subsections=0, repeats=.FALSE.)
      85              : 
      86         1462 :       NULLIFY (subsection)
      87              : 
      88         1462 :       CALL create_forcefield_section(subsection)
      89         1462 :       CALL section_add_subsection(section, subsection)
      90         1462 :       CALL section_release(subsection)
      91              : 
      92         1462 :       CALL create_neighbor_lists_section(subsection)
      93         1462 :       CALL section_add_subsection(section, subsection)
      94         1462 :       CALL section_release(subsection)
      95              : 
      96         1462 :       CALL create_poisson_section(subsection)
      97         1462 :       CALL section_add_subsection(section, subsection)
      98         1462 :       CALL section_release(subsection)
      99              : 
     100         1462 :       CALL create_per_efield_section(subsection)
     101         1462 :       CALL section_add_subsection(section, subsection)
     102         1462 :       CALL section_release(subsection)
     103              : 
     104         1462 :       CALL create_print_mm_section(subsection)
     105         1462 :       CALL section_add_subsection(section, subsection)
     106         1462 :       CALL section_release(subsection)
     107              : 
     108         1462 :    END SUBROUTINE create_mm_section
     109              : 
     110              : ! **************************************************************************************************
     111              : !> \brief Create the print mm section
     112              : !> \param section the section to create
     113              : !> \author teo
     114              : ! **************************************************************************************************
     115         1462 :    SUBROUTINE create_print_mm_section(section)
     116              :       TYPE(section_type), POINTER                        :: section
     117              : 
     118              :       TYPE(keyword_type), POINTER                        :: keyword
     119              :       TYPE(section_type), POINTER                        :: print_key
     120              : 
     121         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     122              :       CALL section_create(section, __LOCATION__, name="print", &
     123              :                           description="Section of possible print options in MM code.", &
     124         1462 :                           n_keywords=0, n_subsections=1, repeats=.FALSE.)
     125              : 
     126         1462 :       NULLIFY (print_key, keyword)
     127              : 
     128              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "DERIVATIVES", &
     129              :                                        description="Controls the printing of derivatives.", &
     130         1462 :                                        print_level=high_print_level, filename="__STD_OUT__")
     131         1462 :       CALL section_add_subsection(section, print_key)
     132         1462 :       CALL section_release(print_key)
     133              : 
     134              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "EWALD_INFO", &
     135              :                                        description="Controls the printing of Ewald energy components during the "// &
     136              :                                        "evaluation of the electrostatics.", &
     137         1462 :                                        print_level=high_print_level, filename="__STD_OUT__")
     138         1462 :       CALL section_add_subsection(section, print_key)
     139         1462 :       CALL section_release(print_key)
     140              : 
     141         1462 :       CALL create_dipoles_section(print_key, "DIPOLE", medium_print_level)
     142         1462 :       CALL section_add_subsection(section, print_key)
     143         1462 :       CALL section_release(print_key)
     144              : 
     145              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "NEIGHBOR_LISTS", &
     146              :                                        description="Activates the printing of the neighbor lists.", &
     147         1462 :                                        print_level=high_print_level, filename="", unit_str="angstrom")
     148         1462 :       CALL section_add_subsection(section, print_key)
     149         1462 :       CALL section_release(print_key)
     150              : 
     151              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "ITER_INFO", &
     152              :                                        description="Activates the printing of iteration info during the self-consistent "// &
     153              :                                        "calculation of a polarizable forcefield.", &
     154         1462 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     155         1462 :       CALL section_add_subsection(section, print_key)
     156         1462 :       CALL section_release(print_key)
     157              : 
     158              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "SUBCELL", &
     159              :                                        description="Activates the printing of the subcells used for the "// &
     160              :                                        "generation of neighbor lists.", &
     161         1462 :                                        print_level=high_print_level, filename="__STD_OUT__")
     162         1462 :       CALL section_add_subsection(section, print_key)
     163         1462 :       CALL section_release(print_key)
     164              : 
     165              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_BANNER", &
     166              :                                        description="Controls the printing of the banner of the MM program", &
     167         1462 :                                        print_level=silent_print_level, filename="__STD_OUT__")
     168         1462 :       CALL section_add_subsection(section, print_key)
     169         1462 :       CALL section_release(print_key)
     170              : 
     171              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
     172              :                                        description="Controls the printing of information regarding the run.", &
     173         1462 :                                        print_level=low_print_level, filename="__STD_OUT__")
     174         1462 :       CALL section_add_subsection(section, print_key)
     175         1462 :       CALL section_release(print_key)
     176              : 
     177              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "FF_PARAMETER_FILE", description= &
     178              :                                        "Controls the printing of Force Field parameter file", &
     179         1462 :                                        print_level=debug_print_level + 1, filename="", common_iter_levels=2)
     180         1462 :       CALL section_add_subsection(section, print_key)
     181         1462 :       CALL section_release(print_key)
     182              : 
     183              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "FF_INFO", description= &
     184              :                                        "Controls the printing of information in the forcefield settings", &
     185         1462 :                                        print_level=high_print_level, filename="__STD_OUT__")
     186              : 
     187              :       CALL keyword_create(keyword, __LOCATION__, name="spline_info", &
     188              :                           description="if the printkey is active prints information regarding the splines"// &
     189              :                           " used in the nonbonded interactions", &
     190         1462 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     191         1462 :       CALL section_add_keyword(print_key, keyword)
     192         1462 :       CALL keyword_release(keyword)
     193              : 
     194              :       CALL keyword_create(keyword, __LOCATION__, name="spline_data", &
     195              :                           description="if the printkey is active prints on separated files the splined function"// &
     196              :                           " together with the reference one. Useful to check the spline behavior.", &
     197         1462 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     198         1462 :       CALL section_add_keyword(print_key, keyword)
     199         1462 :       CALL keyword_release(keyword)
     200              : 
     201         1462 :       CALL section_add_subsection(section, print_key)
     202         1462 :       CALL section_release(print_key)
     203              : 
     204         1462 :    END SUBROUTINE create_print_mm_section
     205              : 
     206              : ! **************************************************************************************************
     207              : !> \brief Create the forcefield section. This section is useful to set up the
     208              : !>      proper force_field for FIST calculations
     209              : !> \param section the section to create
     210              : !> \author teo
     211              : ! **************************************************************************************************
     212         1462 :    SUBROUTINE create_forcefield_section(section)
     213              :       TYPE(section_type), POINTER                        :: section
     214              : 
     215              :       TYPE(keyword_type), POINTER                        :: keyword
     216              :       TYPE(section_type), POINTER                        :: subsection
     217              : 
     218         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     219              :       CALL section_create(section, __LOCATION__, name="FORCEFIELD", &
     220              :                           description="Section specifying information regarding how to set up properly"// &
     221              :                           " a force_field for the classical calculations.", &
     222         1462 :                           n_keywords=2, n_subsections=2, repeats=.FALSE.)
     223              : 
     224         1462 :       NULLIFY (subsection, keyword)
     225              : 
     226              :       CALL keyword_create( &
     227              :          keyword, __LOCATION__, name="PARMTYPE", &
     228              :          description="Define the kind of torsion potential", &
     229              :          usage="PARMTYPE {OFF,CHM,G87,G96}", &
     230              :          enum_c_vals=s2a("OFF", "CHM", "G87", "G96", "AMBER"), &
     231              :          enum_desc=s2a("Provides force field parameters through the input file", &
     232              :                        "Provides force field parameters through an external file with CHARMM format", &
     233              :                        "Provides force field parameters through an external file with GROMOS 87 format", &
     234              :                        "Provides force field parameters through an external file with GROMOS 96 format", &
     235              :                        "Provides force field parameters through an external file with AMBER format (from v.8 on)"), &
     236              :          enum_i_vals=[do_ff_undef, &
     237              :                       do_ff_charmm, &
     238              :                       do_ff_g87, &
     239              :                       do_ff_g96, &
     240              :                       do_ff_amber], &
     241         1462 :          default_i_val=do_ff_undef)
     242         1462 :       CALL section_add_keyword(section, keyword)
     243         1462 :       CALL keyword_release(keyword)
     244              : 
     245              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
     246              :                           description="Specifies the filename that contains the parameters of the FF.", &
     247         1462 :                           usage="PARM_FILE_NAME {FILENAME}", type_of_var=lchar_t)
     248         1462 :       CALL section_add_keyword(section, keyword)
     249         1462 :       CALL keyword_release(keyword)
     250              : 
     251              :       CALL keyword_create(keyword, __LOCATION__, name="VDW_SCALE14", &
     252              :                           description="Scaling factor for the VDW 1-4 ", &
     253         1462 :                           usage="VDW_SCALE14 1.0", default_r_val=1.0_dp)
     254         1462 :       CALL section_add_keyword(section, keyword)
     255         1462 :       CALL keyword_release(keyword)
     256              : 
     257              :       CALL keyword_create(keyword, __LOCATION__, name="EI_SCALE14", &
     258              :                           description="Scaling factor for the electrostatics 1-4 ", &
     259         1462 :                           usage="EI_SCALE14 1.0", default_r_val=0.0_dp)
     260         1462 :       CALL section_add_keyword(section, keyword)
     261         1462 :       CALL keyword_release(keyword)
     262              : 
     263              :       CALL keyword_create(keyword, __LOCATION__, name="SHIFT_CUTOFF", &
     264              :                           description="Add a constant energy shift to the real-space "// &
     265              :                           "non-bonding interactions (both Van der Waals and "// &
     266              :                           "electrostatic) such that the energy at the cutoff radius is "// &
     267              :                           "zero. This makes the non-bonding interactions continuous at "// &
     268              :                           "the cutoff.", &
     269         1462 :                           usage="SHIFT_CUTOFF <LOGICAL>", default_l_val=.TRUE.)
     270         1462 :       CALL section_add_keyword(section, keyword)
     271         1462 :       CALL keyword_release(keyword)
     272              : 
     273              :       CALL keyword_create(keyword, __LOCATION__, name="DO_NONBONDED", &
     274              :                           description="Controls the computation of all the real-space "// &
     275              :                           "(short-range) nonbonded interactions. This also "// &
     276              :                           "includes the real-space corrections for excluded "// &
     277              :                           "or scaled 1-2, 1-3 and 1-4 interactions. When set "// &
     278              :                           "to F, the neighborlists are not created and all "// &
     279              :                           "interactions that depend on them are not computed.", &
     280         1462 :                           usage="DO_NONBONDED T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     281         1462 :       CALL section_add_keyword(section, keyword)
     282         1462 :       CALL keyword_release(keyword)
     283              : 
     284              :       CALL keyword_create(keyword, __LOCATION__, name="DO_ELECTROSTATICS", &
     285              :                           description="Controls the computation of all the real-space "// &
     286              :                           "(short-range) electrostatics interactions. This does not "// &
     287              :                           "affect the QM/MM electrostatic coupling when turned off.", &
     288         1462 :                           usage="DO_ELECTROSTATICS T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     289         1462 :       CALL section_add_keyword(section, keyword)
     290         1462 :       CALL keyword_release(keyword)
     291              : 
     292              :       CALL keyword_create(keyword, __LOCATION__, name="IGNORE_MISSING_CRITICAL_PARAMS", &
     293              :                           description="Do not abort when critical force-field parameters "// &
     294              :                           "are missing. CP2K will run as if the terms containing the "// &
     295              :                           "missing parameters are zero.", &
     296              :                           usage="IGNORE_MISSING_CRITICAL_PARAMS .TRUE.", default_l_val=.FALSE., &
     297         1462 :                           lone_keyword_l_val=.TRUE.)
     298         1462 :       CALL section_add_keyword(section, keyword)
     299         1462 :       CALL keyword_release(keyword)
     300              : 
     301              :       CALL keyword_create(keyword, __LOCATION__, name="MULTIPLE_POTENTIAL", &
     302              :                           description="Enables the possibility to define NONBONDED and NONBONDED14 as a"// &
     303              :                           " sum of different kinds of potential. Useful for piecewise defined potentials.", &
     304         1462 :                           usage="MULTIPLE_POTENTIAL T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     305         1462 :       CALL section_add_keyword(section, keyword)
     306         1462 :       CALL keyword_release(keyword)
     307              :       !Universal scattering potential at very short distances
     308              :       CALL keyword_create(keyword, __LOCATION__, name="ZBL_SCATTERING", &
     309              :                           description="A short range repulsive potential is added, to simulate "// &
     310              :                           "collisions and scattering.", &
     311         1462 :                           usage="ZBL_SCATTERING T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     312         1462 :       CALL section_add_keyword(section, keyword)
     313         1462 :       CALL keyword_release(keyword)
     314              : 
     315              :       !
     316              :       ! subsections
     317              :       !
     318         1462 :       CALL create_SPLINE_section(subsection)
     319         1462 :       CALL section_add_subsection(section, subsection)
     320         1462 :       CALL section_release(subsection)
     321              : 
     322         1462 :       CALL create_NONBONDED_section(subsection)
     323         1462 :       CALL section_add_subsection(section, subsection)
     324         1462 :       CALL section_release(subsection)
     325              : 
     326         1462 :       CALL create_NONBONDED14_section(subsection)
     327         1462 :       CALL section_add_subsection(section, subsection)
     328         1462 :       CALL section_release(subsection)
     329              : 
     330         1462 :       CALL create_CHARGE_section(subsection)
     331         1462 :       CALL section_add_subsection(section, subsection)
     332         1462 :       CALL section_release(subsection)
     333              : 
     334         1462 :       CALL create_CHARGES_section(subsection)
     335         1462 :       CALL section_add_subsection(section, subsection)
     336         1462 :       CALL section_release(subsection)
     337              : 
     338         1462 :       CALL create_SHELL_section(subsection)
     339         1462 :       CALL section_add_subsection(section, subsection)
     340         1462 :       CALL section_release(subsection)
     341              : 
     342         1462 :       CALL create_BOND_section(subsection, "BOND")
     343         1462 :       CALL section_add_subsection(section, subsection)
     344         1462 :       CALL section_release(subsection)
     345              : 
     346         1462 :       CALL create_BEND_section(subsection)
     347         1462 :       CALL section_add_subsection(section, subsection)
     348         1462 :       CALL section_release(subsection)
     349              : 
     350         1462 :       CALL create_TORSION_section(subsection)
     351         1462 :       CALL section_add_subsection(section, subsection)
     352         1462 :       CALL section_release(subsection)
     353              : 
     354         1462 :       CALL create_IMPROPER_section(subsection)
     355         1462 :       CALL section_add_subsection(section, subsection)
     356         1462 :       CALL section_release(subsection)
     357              : 
     358         1462 :       CALL create_OPBEND_section(subsection)
     359         1462 :       CALL section_add_subsection(section, subsection)
     360         1462 :       CALL section_release(subsection)
     361              : 
     362         1462 :       CALL create_DIPOLE_section(subsection)
     363         1462 :       CALL section_add_subsection(section, subsection)
     364         1462 :       CALL section_release(subsection)
     365              : 
     366         1462 :       CALL create_QUADRUPOLE_section(subsection)
     367         1462 :       CALL section_add_subsection(section, subsection)
     368         1462 :       CALL section_release(subsection)
     369              : 
     370         1462 :    END SUBROUTINE create_forcefield_section
     371              : 
     372              : ! **************************************************************************************************
     373              : !> \brief This section specifies the parameters for the splines
     374              : !> \param section the section to create
     375              : !> \author teo
     376              : ! **************************************************************************************************
     377         1462 :    SUBROUTINE create_SPLINE_section(section)
     378              :       TYPE(section_type), POINTER                        :: section
     379              : 
     380              :       TYPE(keyword_type), POINTER                        :: keyword
     381              : 
     382         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     383              :       CALL section_create(section, __LOCATION__, name="SPLINE", &
     384              :                           description="specifies parameters to set up the splines used in the"// &
     385              :                           " nonboned interactions (both pair body potential and many body potential)", &
     386         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     387              : 
     388         1462 :       NULLIFY (keyword)
     389              : 
     390              :       CALL keyword_create(keyword, __LOCATION__, name="R0_NB", &
     391              :                           description="Specify the minimum value of the distance interval "// &
     392              :                           "that brackets the value of emax_spline.", &
     393              :                           usage="R0_NB <REAL>", default_r_val=cp_unit_to_cp2k(value=0.9_dp, &
     394              :                                                                               unit_str="bohr"), &
     395         1462 :                           unit_str="angstrom")
     396         1462 :       CALL section_add_keyword(section, keyword)
     397         1462 :       CALL keyword_release(keyword)
     398              : 
     399              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT_NB", &
     400              :                           description="Cutoff radius for nonbonded interactions. This value overrides"// &
     401              :                           " the value specified in the potential definition and is global for all potentials.", &
     402              :                           usage="RCUT_NB {real}", default_r_val=cp_unit_to_cp2k(value=-1.0_dp, &
     403              :                                                                                 unit_str="angstrom"), &
     404         1462 :                           unit_str="angstrom")
     405         1462 :       CALL section_add_keyword(section, keyword)
     406         1462 :       CALL keyword_release(keyword)
     407              : 
     408              :       CALL keyword_create(keyword, __LOCATION__, name="EMAX_SPLINE", &
     409              :                           description="Specify the maximum value of the potential up to which"// &
     410              :                           " splines will be constructed", &
     411              :                           usage="EMAX_SPLINE <REAL>", &
     412         1462 :                           default_r_val=0.5_dp, unit_str="hartree")
     413         1462 :       CALL section_add_keyword(section, keyword)
     414         1462 :       CALL keyword_release(keyword)
     415              : 
     416              :       CALL keyword_create(keyword, __LOCATION__, name="EMAX_ACCURACY", &
     417              :                           description="Specify the maximum value of energy used to check the accuracy"// &
     418              :                           " requested through EPS_SPLINE. Energy values larger than EMAX_ACCURACY"// &
     419              :                           " generally do not  satisfy the requested accuracy", &
     420         1462 :                           usage="EMAX_ACCURACY <REAL>", default_r_val=0.02_dp, unit_str="hartree")
     421         1462 :       CALL section_add_keyword(section, keyword)
     422         1462 :       CALL keyword_release(keyword)
     423              : 
     424              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_SPLINE", &
     425              :                           description="Specify the threshold for the choice of the number of"// &
     426              :                           " points used in the splines (comparing the splined value with the"// &
     427              :                           " analytically evaluated one)", &
     428         1462 :                           usage="EPS_SPLINE <REAL>", default_r_val=1.0E-7_dp, unit_str="hartree")
     429         1462 :       CALL section_add_keyword(section, keyword)
     430         1462 :       CALL keyword_release(keyword)
     431              : 
     432              :       CALL keyword_create( &
     433              :          keyword, __LOCATION__, name="NPOINTS", &
     434              :          description="Override the default search for an accurate spline by specifying a fixed number of spline points.", &
     435         1462 :          usage="NPOINTS 1024", default_i_val=-1)
     436         1462 :       CALL section_add_keyword(section, keyword)
     437         1462 :       CALL keyword_release(keyword)
     438              : 
     439              :       CALL keyword_create(keyword, __LOCATION__, name="UNIQUE_SPLINE", &
     440              :                           description="For few potentials (Lennard-Jones) one global optimal spline is generated instead"// &
     441              :                           " of different optimal splines for each kind of potential", &
     442         1462 :                           usage="UNIQUE_SPLINE <LOGICAL>", lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
     443         1462 :       CALL section_add_keyword(section, keyword)
     444         1462 :       CALL keyword_release(keyword)
     445              : 
     446         1462 :    END SUBROUTINE create_SPLINE_section
     447              : 
     448              : ! **************************************************************************************************
     449              : !> \brief This section specifies the torsion of the MM atoms
     450              : !> \param section the section to create
     451              : !> \author teo
     452              : ! **************************************************************************************************
     453         1462 :    SUBROUTINE create_TORSION_section(section)
     454              :       TYPE(section_type), POINTER                        :: section
     455              : 
     456              :       TYPE(keyword_type), POINTER                        :: keyword
     457              : 
     458         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     459              :       CALL section_create(section, __LOCATION__, name="TORSION", &
     460              :                           description="Specifies the torsion potential of the MM system.", &
     461         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     462              : 
     463         1462 :       NULLIFY (keyword)
     464              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
     465              :                           description="Defines the atomic kinds involved in the tors.", &
     466              :                           usage="ATOMS {KIND1} {KIND2} {KIND3} {KIND4}", type_of_var=char_t, &
     467         1462 :                           n_var=4)
     468         1462 :       CALL section_add_keyword(section, keyword)
     469         1462 :       CALL keyword_release(keyword)
     470              : 
     471              :       CALL keyword_create(keyword, __LOCATION__, name="KIND", &
     472              :                           description="Define the kind of torsion potential", &
     473              :                           usage="KIND CHARMM", &
     474              :                           enum_c_vals=s2a("CHARMM", "G87", "G96", "AMBER", "OPLS"), &
     475              :                           enum_desc=s2a("Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 +  cos[M*PHI - PHI0]]", &
     476              :                                         "Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 +  cos[M*PHI - PHI0]]", &
     477              :                                         "Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 +  cos[M*PHI - PHI0]]", &
     478              :                                         "Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 +  cos[M*PHI - PHI0]]", &
     479              :                                         "Functional Form: K / 2 * [ 1 + (-1)^(M-1) * cos[M*PHI]]"), &
     480              :                           enum_i_vals=[do_ff_charmm, &
     481              :                                        do_ff_g87, &
     482              :                                        do_ff_g96, &
     483              :                                        do_ff_amber, &
     484              :                                        do_ff_opls], &
     485         1462 :                           default_i_val=do_ff_charmm)
     486         1462 :       CALL section_add_keyword(section, keyword)
     487         1462 :       CALL keyword_release(keyword)
     488              : 
     489              :       CALL keyword_create(keyword, __LOCATION__, name="K", &
     490              :                           description="Defines the force constant of the potential", &
     491              :                           usage="K {real}", type_of_var=real_t, &
     492         1462 :                           n_var=1, unit_str="hartree")
     493         1462 :       CALL section_add_keyword(section, keyword)
     494         1462 :       CALL keyword_release(keyword)
     495              : 
     496              :       CALL keyword_create(keyword, __LOCATION__, name="PHI0", &
     497              :                           description="Defines the phase of the potential.", &
     498              :                           usage="PHI0 {real}", type_of_var=real_t, &
     499         1462 :                           n_var=1, unit_str="rad", default_r_val=0.0_dp)
     500         1462 :       CALL section_add_keyword(section, keyword)
     501         1462 :       CALL keyword_release(keyword)
     502              : 
     503              :       CALL keyword_create(keyword, __LOCATION__, name="M", &
     504              :                           description="Defines the multiplicity of the potential.", &
     505              :                           usage="M {integer}", type_of_var=integer_t, &
     506         1462 :                           n_var=1)
     507         1462 :       CALL section_add_keyword(section, keyword)
     508         1462 :       CALL keyword_release(keyword)
     509              : 
     510         1462 :    END SUBROUTINE create_TORSION_section
     511              : 
     512              : ! **************************************************************************************************
     513              : !> \brief This section specifies the improper torsion of the MM atoms
     514              : !> \param section the section to create
     515              : !> \author louis vanduyfhuys
     516              : ! **************************************************************************************************
     517         1462 :    SUBROUTINE create_IMPROPER_section(section)
     518              :       TYPE(section_type), POINTER                        :: section
     519              : 
     520              :       TYPE(keyword_type), POINTER                        :: keyword
     521              : 
     522         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     523              :       CALL section_create(section, __LOCATION__, name="IMPROPER", &
     524              :                           description="Specifies the improper torsion potential of the MM system.", &
     525         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     526              : 
     527         1462 :       NULLIFY (keyword)
     528              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
     529              :                           description="Defines the atomic kinds involved in the improper tors.", &
     530              :                           usage="ATOMS {KIND1} {KIND2} {KIND3} {KIND4}", type_of_var=char_t, &
     531         1462 :                           n_var=4)
     532         1462 :       CALL section_add_keyword(section, keyword)
     533         1462 :       CALL keyword_release(keyword)
     534              : 
     535              :       CALL keyword_create(keyword, __LOCATION__, name="KIND", &
     536              :                           description="Define the kind of improper torsion potential", &
     537              :                           usage="KIND CHARMM", &
     538              :                           enum_c_vals=s2a("CHARMM", "G87", "G96", "HARMONIC"), &
     539              :                           enum_desc=s2a("Functional Form (CHARMM): K * [ PHI - PHI0 ]**2", &
     540              :                                         "Functional Form (G87|G96|HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2", &
     541              :                                         "Functional Form (G87|G96|HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2", &
     542              :                                         "Functional Form (G87|G96|HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2"), &
     543              :                           enum_i_vals=[do_ff_charmm, &
     544              :                                        do_ff_g87, &
     545              :                                        do_ff_g96, &
     546              :                                        do_ff_harmonic], &
     547         1462 :                           default_i_val=do_ff_charmm)
     548         1462 :       CALL section_add_keyword(section, keyword)
     549         1462 :       CALL keyword_release(keyword)
     550              : 
     551              :       CALL keyword_create(keyword, __LOCATION__, name="K", &
     552              :                           description="Defines the force constant of the potential", &
     553              :                           usage="K {real}", type_of_var=real_t, &
     554         1462 :                           n_var=1, unit_str="hartree*rad^-2")
     555         1462 :       CALL section_add_keyword(section, keyword)
     556         1462 :       CALL keyword_release(keyword)
     557              : 
     558              :       CALL keyword_create(keyword, __LOCATION__, name="PHI0", &
     559              :                           description="Defines the phase of the potential.", &
     560              :                           usage="PHI0 {real}", type_of_var=real_t, &
     561         1462 :                           n_var=1, unit_str="rad")
     562         1462 :       CALL section_add_keyword(section, keyword)
     563         1462 :       CALL keyword_release(keyword)
     564              : 
     565         1462 :    END SUBROUTINE create_IMPROPER_section
     566              : 
     567              : ! **************************************************************************************************
     568              : !> \brief This section specifies the out of plane bend of the MM atoms
     569              : !> \param section the section to create
     570              : !> \author louis vanduyfhuys
     571              : ! **************************************************************************************************
     572         1462 :    SUBROUTINE create_OPBEND_section(section)
     573              :       TYPE(section_type), POINTER                        :: section
     574              : 
     575              :       TYPE(keyword_type), POINTER                        :: keyword
     576              : 
     577         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     578              :       CALL section_create(section, __LOCATION__, name="OPBEND", &
     579              :                           description="Specifies the out of plane bend potential of the MM system."// &
     580              :                           " (Only defined for atom quadruples which are also defined as an improper"// &
     581              :                           " pattern in the topology.)", &
     582         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     583              : 
     584         1462 :       NULLIFY (keyword)
     585              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
     586              :                           description="Defines the atomic kinds involved in the opbend.", &
     587              :                           usage="ATOMS {KIND1} {KIND2} {KIND3} {KIND4}", type_of_var=char_t, &
     588         1462 :                           n_var=4)
     589         1462 :       CALL section_add_keyword(section, keyword)
     590         1462 :       CALL keyword_release(keyword)
     591              : 
     592              :       CALL keyword_create(keyword, __LOCATION__, name="KIND", &
     593              :                           description="Define the kind of out of plane bend potential", &
     594              :                           usage="KIND HARMONIC", &
     595              :                           enum_c_vals=s2a("HARMONIC", "MM2", "MM3", "MM4"), &
     596              :                           enum_desc=s2a("Functional Form (HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2", &
     597              :                                         "Functional Form (MM2|MM3|MM4): K * [ PHI - PHI0 ]**2", &
     598              :                                         "Functional Form (MM2|MM3|MM4): K * [ PHI - PHI0 ]**2", &
     599              :                                         "Functional Form (MM2|MM3|MM4): K * [ PHI - PHI0 ]**2"), &
     600              :                           enum_i_vals=[do_ff_harmonic, &
     601              :                                        do_ff_mm2, &
     602              :                                        do_ff_mm3, &
     603              :                                        do_ff_mm4], &
     604         1462 :                           default_i_val=do_ff_harmonic)
     605         1462 :       CALL section_add_keyword(section, keyword)
     606         1462 :       CALL keyword_release(keyword)
     607              : 
     608              :       CALL keyword_create(keyword, __LOCATION__, name="K", &
     609              :                           description="Defines the force constant of the potential", &
     610              :                           usage="K {real}", type_of_var=real_t, &
     611         1462 :                           n_var=1, unit_str="hartree*rad^-2")
     612         1462 :       CALL section_add_keyword(section, keyword)
     613         1462 :       CALL keyword_release(keyword)
     614              : 
     615              :       CALL keyword_create(keyword, __LOCATION__, name="PHI0", &
     616              :                           description="Defines the phase of the potential.", &
     617              :                           usage="PHI0 {real}", type_of_var=real_t, &
     618         1462 :                           n_var=1, unit_str="rad")
     619         1462 :       CALL section_add_keyword(section, keyword)
     620         1462 :       CALL keyword_release(keyword)
     621              : 
     622         1462 :    END SUBROUTINE create_OPBEND_section
     623              : 
     624              : ! **************************************************************************************************
     625              : !> \brief This section specifies the bend of the MM atoms
     626              : !> \param section the section to create
     627              : !> \author teo
     628              : ! **************************************************************************************************
     629         1462 :    SUBROUTINE create_BEND_section(section)
     630              :       TYPE(section_type), POINTER                        :: section
     631              : 
     632              :       TYPE(keyword_type), POINTER                        :: keyword
     633              :       TYPE(section_type), POINTER                        :: subsection
     634              : 
     635         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     636              :       CALL section_create(section, __LOCATION__, name="BEND", &
     637              :                           description="Specifies the bend potential of the MM system.", &
     638         1462 :                           n_keywords=11, n_subsections=1, repeats=.TRUE.)
     639              : 
     640         1462 :       NULLIFY (keyword, subsection)
     641              : 
     642              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
     643              :                           description="Defines the atomic kinds involved in the bend.", &
     644              :                           usage="ATOMS {KIND1} {KIND2} {KIND3}", type_of_var=char_t, &
     645         1462 :                           n_var=3)
     646         1462 :       CALL section_add_keyword(section, keyword)
     647         1462 :       CALL keyword_release(keyword)
     648              : 
     649              :       CALL keyword_create( &
     650              :          keyword, __LOCATION__, name="KIND", &
     651              :          description="Define the kind of bend potential", &
     652              :          usage="KIND HARMONIC", &
     653              :          enum_c_vals=s2a("HARMONIC", "CHARMM", "AMBER", "G87", "G96", "CUBIC", "MIXED_BEND_STRETCH", "MM3", &
     654              :                          "LEGENDRE"), &
     655              :          enum_desc=s2a("Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", &
     656              :                        "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", &
     657              :                        "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", &
     658              :                        "Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", &
     659              :                        "Functional Form (G96): 1/2*K*(COS(THETA)-THETA0)^2", &
     660              :                        "Functional Form (CUBIC): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))", &
     661              :                        "Functional Form (MIXED_BEND_STRETCH): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))+"// &
     662              :                        " KSS*(R12-R012)*(R32-R032)+KBS12*(R12-R012)*(THETA-THETA0)+KBS32*(R32-R032)*(THETA-THETA0)", &
     663              :                        "Functional Form (MM3): 1/2*K*(THETA-THETA0)**2*(1-0.014*(THETA-THETA0)+5.6E-5*(THETA-THETA0)**2"// &
     664              :                        " -7.0E-7*(THETA-THETA0)**3+9.0E-10*(THETA-THETA0)**4)+KBS12*(R12-R012)*(THETA-THETA0)+"// &
     665              :                        " KBS32*(R32-R032)*(THETA-THETA0)", &
     666              :                        "Functional Form (LEGENDRE): sum_{i=0}^N c_i*P_i(COS(THETA)) "), &
     667              :          enum_i_vals=[do_ff_harmonic, &
     668              :                       do_ff_charmm, &
     669              :                       do_ff_amber, &
     670              :                       do_ff_g87, &
     671              :                       do_ff_g96, &
     672              :                       do_ff_cubic, &
     673              :                       do_ff_mixed_bend_stretch, &
     674              :                       do_ff_mm3, &
     675              :                       do_ff_legendre], &
     676         1462 :          default_i_val=do_ff_charmm)
     677         1462 :       CALL section_add_keyword(section, keyword)
     678         1462 :       CALL keyword_release(keyword)
     679              : 
     680              :       CALL keyword_create(keyword, __LOCATION__, name="K", &
     681              :                           description="Defines the force constant of the potential", &
     682              :                           usage="K {real}", type_of_var=real_t, &
     683         1462 :                           n_var=1, unit_str="hartree*rad^-2")
     684         1462 :       CALL section_add_keyword(section, keyword)
     685         1462 :       CALL keyword_release(keyword)
     686              : 
     687              :       CALL keyword_create(keyword, __LOCATION__, name="CB", &
     688              :                           description="Defines the the cubic force constant of the bend", &
     689              :                           usage="CB {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     690         1462 :                           n_var=1, unit_str="rad^-1")
     691         1462 :       CALL section_add_keyword(section, keyword)
     692         1462 :       CALL keyword_release(keyword)
     693              : 
     694              :       CALL keyword_create(keyword, __LOCATION__, name="R012", &
     695              :                           description="Mixed bend stretch parameter", &
     696              :                           usage="R012 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     697         1462 :                           n_var=1, unit_str="bohr")
     698         1462 :       CALL section_add_keyword(section, keyword)
     699         1462 :       CALL keyword_release(keyword)
     700              :       CALL keyword_create(keyword, __LOCATION__, name="R032", &
     701              :                           description="Mixed bend stretch parameter", &
     702              :                           usage="R032 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     703         1462 :                           n_var=1, unit_str="bohr")
     704         1462 :       CALL section_add_keyword(section, keyword)
     705         1462 :       CALL keyword_release(keyword)
     706              :       CALL keyword_create(keyword, __LOCATION__, name="KBS12", &
     707              :                           description="Mixed bend stretch parameter", &
     708              :                           usage="KBS12 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     709         1462 :                           n_var=1, unit_str="hartree*bohr^-1*rad^-1")
     710         1462 :       CALL section_add_keyword(section, keyword)
     711         1462 :       CALL keyword_release(keyword)
     712              :       CALL keyword_create(keyword, __LOCATION__, name="KBS32", &
     713              :                           description="Mixed bend stretch parameter", &
     714              :                           usage="KBS32 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     715         1462 :                           n_var=1, unit_str="hartree*bohr^-1*rad^-1")
     716         1462 :       CALL section_add_keyword(section, keyword)
     717         1462 :       CALL keyword_release(keyword)
     718              :       CALL keyword_create(keyword, __LOCATION__, name="KSS", &
     719              :                           description="Mixed bend stretch parameter", &
     720              :                           usage="KSS {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     721         1462 :                           n_var=1, unit_str="hartree*bohr^-2")
     722         1462 :       CALL section_add_keyword(section, keyword)
     723         1462 :       CALL keyword_release(keyword)
     724              : 
     725              :       CALL keyword_create(keyword, __LOCATION__, name="THETA0", &
     726              :                           description="Defines the equilibrium angle.", &
     727              :                           usage="THETA0 {real}", type_of_var=real_t, &
     728         1462 :                           n_var=1, unit_str='rad')
     729         1462 :       CALL section_add_keyword(section, keyword)
     730         1462 :       CALL keyword_release(keyword)
     731              : 
     732              :       CALL keyword_create(keyword, __LOCATION__, name="LEGENDRE", &
     733              :                           description="Specifies the coefficients for the legendre"// &
     734              :                           "  expansion of the bending potential."// &
     735              :                           " 'THETA0' and 'K' are not used, but need to be specified."// &
     736              :                           " Use an arbitrary value.", usage="LEGENDRE {REAL} {REAL} ...", &
     737              :                           default_r_val=0.0d0, type_of_var=real_t, &
     738         1462 :                           n_var=-1, unit_str="hartree")
     739         1462 :       CALL section_add_keyword(section, keyword)
     740         1462 :       CALL keyword_release(keyword)
     741              : 
     742              :       ! Create the Urey-Bradley section
     743         1462 :       CALL create_BOND_section(subsection, "UB")
     744         1462 :       CALL section_add_subsection(section, subsection)
     745         1462 :       CALL section_release(subsection)
     746              : 
     747         1462 :    END SUBROUTINE create_BEND_section
     748              : 
     749              : ! **************************************************************************************************
     750              : !> \brief This section specifies the bond of the MM atoms
     751              : !> \param section the section to create
     752              : !> \param label ...
     753              : !> \author teo
     754              : ! **************************************************************************************************
     755         2924 :    SUBROUTINE create_BOND_section(section, label)
     756              :       TYPE(section_type), POINTER                        :: section
     757              :       CHARACTER(LEN=*), INTENT(IN)                       :: label
     758              : 
     759              :       CHARACTER(LEN=default_string_length)               :: tag
     760              :       TYPE(keyword_type), POINTER                        :: keyword
     761              : 
     762         2924 :       CPASSERT(.NOT. ASSOCIATED(section))
     763         2924 :       NULLIFY (keyword)
     764              : 
     765         2924 :       IF (TRIM(label) == "UB") THEN
     766         1462 :          tag = " Urey-Bradley "
     767              :          CALL section_create(section, __LOCATION__, name=TRIM(label), &
     768              :                              description="Specifies the Urey-Bradley potential between the external atoms"// &
     769              :                              " defining the angle", &
     770         1462 :                              n_keywords=1, n_subsections=0, repeats=.FALSE.)
     771              : 
     772              :       ELSE
     773         1462 :          tag = " Bond "
     774              :          CALL section_create(section, __LOCATION__, name=TRIM(label), &
     775              :                              description="Specifies the bond potential", &
     776         1462 :                              n_keywords=1, n_subsections=0, repeats=.TRUE.)
     777              : 
     778              :          CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
     779              :                              description="Defines the atomic kinds involved in the bond.", &
     780              :                              usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
     781         1462 :                              n_var=2)
     782         1462 :          CALL section_add_keyword(section, keyword)
     783         1462 :          CALL keyword_release(keyword)
     784              :       END IF
     785              : 
     786              :       CALL keyword_create(keyword, __LOCATION__, name="KIND", &
     787              :                           description="Define the kind of"//TRIM(tag)//"potential.", &
     788              :                           usage="KIND HARMONIC", &
     789              :                           enum_c_vals=s2a("HARMONIC", "CHARMM", "AMBER", "G87", "G96", "QUARTIC", &
     790              :                                           "MORSE", "CUBIC", "FUES"), &
     791              :                           enum_desc=s2a("Functional Form (HARMONIC|G87): 1/2*K*(R-R0)^2", &
     792              :                                         "Functional Form (CHARMM|AMBER): K*(R-R0)^2", &
     793              :                                         "Functional Form (CHARMM|AMBER): K*(R-R0)^2", &
     794              :                                         "Functional Form (HARMONIC|G87): 1/2*K*(R-R0)^2", &
     795              :                                         "Functional Form (G96): 1/4*K*(R^2-R0^2)^2", &
     796              :                                         "Functional Form (QUARTIC): (1/2*K1+[1/3*K2+1/4*K3*|R-R0|]*|R-R0|)(R-R0)^2", &
     797              :                                         "Functional Form (MORSE): K1*[(1-exp(-K2*(R-R0)))^2-1])", &
     798              :                                         "Functional Form (CUBIC): K*(R-R0)^2*(1+cs*(R-R0)+7/12*(cs^2*(R-R0)^2))", &
     799              :                                         "Functional Form (FUES): 1/2*K*R0^2*(1+R0/R*(R0/R-2))"), &
     800              :                           enum_i_vals=[do_ff_harmonic, &
     801              :                                        do_ff_charmm, &
     802              :                                        do_ff_amber, &
     803              :                                        do_ff_g87, &
     804              :                                        do_ff_g96, &
     805              :                                        do_ff_quartic, &
     806              :                                        do_ff_morse, &
     807              :                                        do_ff_cubic, &
     808              :                                        do_ff_fues], &
     809         2924 :                           default_i_val=do_ff_charmm)
     810         2924 :       CALL section_add_keyword(section, keyword)
     811         2924 :       CALL keyword_release(keyword)
     812              : 
     813              :       CALL keyword_create(keyword, __LOCATION__, name="K", &
     814              :                           description="Defines the force constant of the potential. "// &
     815              :                           "For MORSE potentials 2 numbers are expected. "// &
     816              :                           "For QUARTIC potentials 3 numbers are expected.", &
     817              :                           usage="K {real}", type_of_var=real_t, &
     818         2924 :                           n_var=-1, unit_str="internal_cp2k")
     819         2924 :       CALL section_add_keyword(section, keyword)
     820         2924 :       CALL keyword_release(keyword)
     821              : 
     822              :       CALL keyword_create(keyword, __LOCATION__, name="CS", &
     823              :                           description="Defines the cubic stretch term.", &
     824              :                           usage="CS {real}", default_r_val=0.0_dp, type_of_var=real_t, &
     825         2924 :                           n_var=1, unit_str="bohr^-1")
     826         2924 :       CALL section_add_keyword(section, keyword)
     827         2924 :       CALL keyword_release(keyword)
     828              : 
     829              :       CALL keyword_create(keyword, __LOCATION__, name="R0", &
     830              :                           description="Defines the equilibrium distance.", &
     831              :                           usage="R0 {real}", type_of_var=real_t, &
     832         2924 :                           n_var=1, unit_str="bohr")
     833         2924 :       CALL section_add_keyword(section, keyword)
     834         2924 :       CALL keyword_release(keyword)
     835              : 
     836         2924 :    END SUBROUTINE create_BOND_section
     837              : 
     838              : ! **************************************************************************************************
     839              : !> \brief This section specifies the charge of the MM atoms
     840              : !> \param section the section to create
     841              : !> \author teo
     842              : ! **************************************************************************************************
     843         1462 :    SUBROUTINE create_charges_section(section)
     844              :       TYPE(section_type), POINTER                        :: section
     845              : 
     846              :       TYPE(keyword_type), POINTER                        :: keyword
     847              : 
     848         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     849              :       CALL section_create(section, __LOCATION__, name="charges", &
     850              :                           description="Allow to specify an array of classical charges, thus avoiding the"// &
     851              :                           " packing and permitting the usage of different charges for same atomic types.", &
     852         1462 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
     853              : 
     854         1462 :       NULLIFY (keyword)
     855              :       CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
     856              :                           description="Value of the charge for the individual atom. Order MUST reflect"// &
     857              :                           " the one specified for the geometry.", repeats=.TRUE., usage="{Real}", &
     858         1462 :                           type_of_var=real_t)
     859         1462 :       CALL section_add_keyword(section, keyword)
     860         1462 :       CALL keyword_release(keyword)
     861              : 
     862         1462 :    END SUBROUTINE create_charges_section
     863              : 
     864              : ! **************************************************************************************************
     865              : !> \brief This section specifies the charge of the MM atoms
     866              : !> \param section the section to create
     867              : !> \author teo
     868              : ! **************************************************************************************************
     869         4386 :    SUBROUTINE create_charge_section(section)
     870              :       TYPE(section_type), POINTER                        :: section
     871              : 
     872              :       TYPE(keyword_type), POINTER                        :: keyword
     873              : 
     874         4386 :       CPASSERT(.NOT. ASSOCIATED(section))
     875              :       CALL section_create(section, __LOCATION__, name="charge", &
     876              :                           description="This section specifies the charge of the MM atoms", &
     877         4386 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     878              : 
     879         4386 :       NULLIFY (keyword)
     880              : 
     881              :       CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
     882              :                           description="Defines the atomic kind of the charge.", &
     883              :                           usage="ATOM {KIND1}", type_of_var=char_t, &
     884         4386 :                           n_var=1)
     885         4386 :       CALL section_add_keyword(section, keyword)
     886         4386 :       CALL keyword_release(keyword)
     887              : 
     888              :       CALL keyword_create(keyword, __LOCATION__, name="CHARGE", &
     889              :                           description="Defines the charge of the MM atom in electron charge unit.", &
     890              :                           usage="CHARGE {real}", type_of_var=real_t, &
     891         4386 :                           n_var=1)
     892         4386 :       CALL section_add_keyword(section, keyword)
     893         4386 :       CALL keyword_release(keyword)
     894              : 
     895         4386 :    END SUBROUTINE create_charge_section
     896              : 
     897              : ! **************************************************************************************************
     898              : !> \brief This section specifies the isotropic polarizability of the MM atoms
     899              : !> \param section the section to create
     900              : !> \author Marcel Baer
     901              : ! **************************************************************************************************
     902         1462 :    SUBROUTINE create_quadrupole_section(section)
     903              :       TYPE(section_type), POINTER                        :: section
     904              : 
     905              :       TYPE(keyword_type), POINTER                        :: keyword
     906              : 
     907         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     908              :       CALL section_create( &
     909              :          section, __LOCATION__, name="QUADRUPOLE", &
     910              :          description="This section specifies that we will perform an SCF quadrupole calculation of the MM atoms. "// &
     911              :          "Needs KEYWORD POL_SCF in POISSON secton", &
     912         1462 :          n_keywords=1, n_subsections=0, repeats=.TRUE.)
     913              : 
     914         1462 :       NULLIFY (keyword)
     915              : 
     916              :       CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
     917              :                           description="Defines the atomic kind of the SCF quadrupole.", &
     918              :                           usage="ATOM {KIND1}", type_of_var=char_t, &
     919         1462 :                           n_var=1)
     920         1462 :       CALL section_add_keyword(section, keyword)
     921         1462 :       CALL keyword_release(keyword)
     922              : 
     923              :       CALL keyword_create(keyword, __LOCATION__, name="CPOL", &
     924              :                           description="Defines the isotropic polarizability of the MM atom.", &
     925              :                           usage="CPOL {real}", type_of_var=real_t, &
     926         1462 :                           n_var=1, unit_str='internal_cp2k')
     927         1462 :       CALL section_add_keyword(section, keyword)
     928         1462 :       CALL keyword_release(keyword)
     929              : 
     930         1462 :    END SUBROUTINE create_quadrupole_section
     931              : 
     932              : ! **************************************************************************************************
     933              : !> \brief This section specifies the isotropic polarizability of the MM atoms
     934              : !> \param section the section to create
     935              : !> \author Marcel Baer
     936              : ! **************************************************************************************************
     937         1462 :    SUBROUTINE create_dipole_section(section)
     938              :       TYPE(section_type), POINTER                        :: section
     939              : 
     940              :       TYPE(keyword_type), POINTER                        :: keyword
     941              :       TYPE(section_type), POINTER                        :: subsection
     942              : 
     943         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     944              :       CALL section_create(section, __LOCATION__, name="DIPOLE", &
     945              :                           description="This section specifies that we will perform an SCF dipole calculation of the MM atoms. "// &
     946              :                           "Needs KEYWORD POL_SCF in POISSON secton", &
     947         1462 :                           n_keywords=1, n_subsections=1, repeats=.TRUE.)
     948              : 
     949         1462 :       NULLIFY (subsection, keyword)
     950              : 
     951              :       CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
     952              :                           description="Defines the atomic kind of the SCF dipole.", &
     953              :                           usage="ATOM {KIND1}", type_of_var=char_t, &
     954         1462 :                           n_var=1)
     955         1462 :       CALL section_add_keyword(section, keyword)
     956         1462 :       CALL keyword_release(keyword)
     957              : 
     958              :       CALL keyword_create(keyword, __LOCATION__, name="APOL", &
     959              :                           description="Defines the isotropic polarizability of the MM atom.", &
     960              :                           usage="APOL {real}", type_of_var=real_t, &
     961         1462 :                           n_var=1, unit_str='angstrom^3')
     962         1462 :       CALL section_add_keyword(section, keyword)
     963         1462 :       CALL keyword_release(keyword)
     964              : 
     965         1462 :       CALL create_DAMPING_section(subsection)
     966         1462 :       CALL section_add_subsection(section, subsection)
     967         1462 :       CALL section_release(subsection)
     968         1462 :    END SUBROUTINE create_dipole_section
     969              : 
     970              : ! **************************************************************************************************
     971              : !> \brief This section specifies the idamping parameters for polarizable atoms
     972              : !> \param section the section to create
     973              : !> \author Rodolphe Vuilleumier
     974              : ! **************************************************************************************************
     975         1462 :    SUBROUTINE create_damping_section(section)
     976              :       TYPE(section_type), POINTER                        :: section
     977              : 
     978              :       TYPE(keyword_type), POINTER                        :: keyword
     979              : 
     980         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
     981              :       CALL section_create(section, __LOCATION__, name="DAMPING", &
     982              :                           description="This section specifies optional electric field damping for the polarizable atoms. ", &
     983         1462 :                           n_keywords=4, n_subsections=0, repeats=.TRUE.)
     984              : 
     985         1462 :       NULLIFY (keyword)
     986              : 
     987              :       CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
     988              :                           description="Defines the atomic kind for this damping function.", &
     989              :                           usage="ATOM {KIND1}", type_of_var=char_t, &
     990         1462 :                           n_var=1)
     991         1462 :       CALL section_add_keyword(section, keyword)
     992         1462 :       CALL keyword_release(keyword)
     993              : 
     994              :       CALL keyword_create(keyword, __LOCATION__, name="TYPE", &
     995              :                           description="Defines the damping type.", &
     996              :                           usage="TYPE {string}", type_of_var=char_t, &
     997         1462 :                           n_var=1, default_c_val="TANG-TOENNIES")
     998         1462 :       CALL section_add_keyword(section, keyword)
     999         1462 :       CALL keyword_release(keyword)
    1000              : 
    1001              :       CALL keyword_create(keyword, __LOCATION__, name="ORDER", &
    1002              :                           description="Defines the order for this damping.", &
    1003              :                           usage="ORDER {integer}", type_of_var=integer_t, &
    1004         1462 :                           n_var=1, default_i_val=3)
    1005         1462 :       CALL section_add_keyword(section, keyword)
    1006         1462 :       CALL keyword_release(keyword)
    1007              : 
    1008              :       CALL keyword_create(keyword, __LOCATION__, name="BIJ", &
    1009              :                           description="Defines the BIJ parameter for this damping.", &
    1010              :                           usage="BIJ {real}", type_of_var=real_t, &
    1011         1462 :                           n_var=1, unit_str='angstrom^-1')
    1012         1462 :       CALL section_add_keyword(section, keyword)
    1013         1462 :       CALL keyword_release(keyword)
    1014              : 
    1015              :       CALL keyword_create(keyword, __LOCATION__, name="CIJ", &
    1016              :                           description="Defines the CIJ parameter for this damping.", &
    1017              :                           usage="CIJ {real}", type_of_var=real_t, &
    1018         1462 :                           n_var=1, unit_str='')
    1019         1462 :       CALL section_add_keyword(section, keyword)
    1020         1462 :       CALL keyword_release(keyword)
    1021              : 
    1022         1462 :    END SUBROUTINE create_damping_section
    1023              : 
    1024              : ! **************************************************************************************************
    1025              : !> \brief This section specifies the charge of the MM atoms
    1026              : !> \param section the section to create
    1027              : !> \author teo
    1028              : ! **************************************************************************************************
    1029         1462 :    SUBROUTINE create_shell_section(section)
    1030              :       TYPE(section_type), POINTER                        :: section
    1031              : 
    1032              :       TYPE(keyword_type), POINTER                        :: keyword
    1033              : 
    1034         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1035              :       CALL section_create(section, __LOCATION__, name="SHELL", &
    1036              :                           description="This section specifies the parameters for shell-model potentials", &
    1037              :                           n_keywords=6, n_subsections=0, repeats=.TRUE., &
    1038         5848 :                           citations=[Dick1958, Mitchell1993, Devynck2012])
    1039              : 
    1040         1462 :       NULLIFY (keyword)
    1041              : 
    1042              :       CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
    1043              :                           description="The kind for which the shell potential parameters are given ", &
    1044         1462 :                           usage="H", default_c_val="DEFAULT")
    1045         1462 :       CALL section_add_keyword(section, keyword)
    1046         1462 :       CALL keyword_release(keyword)
    1047              : 
    1048              :       CALL keyword_create(keyword, __LOCATION__, name="CORE_CHARGE", &
    1049              :                           variants=["CORE"], &
    1050              :                           description="Partial charge assigned to the core (electron charge units)", &
    1051              :                           usage="CORE_CHARGE {real}", &
    1052         2924 :                           default_r_val=0.0_dp)
    1053         1462 :       CALL section_add_keyword(section, keyword)
    1054         1462 :       CALL keyword_release(keyword)
    1055              : 
    1056              :       CALL keyword_create(keyword, __LOCATION__, name="SHELL_CHARGE", &
    1057              :                           variants=["SHELL"], &
    1058              :                           description="Partial charge assigned to the shell (electron charge units)", &
    1059              :                           usage="SHELL_CHARGE {real}", &
    1060         2924 :                           default_r_val=0.0_dp)
    1061         1462 :       CALL section_add_keyword(section, keyword)
    1062         1462 :       CALL keyword_release(keyword)
    1063              : 
    1064              :       CALL keyword_create(keyword, __LOCATION__, name="MASS_FRACTION", &
    1065              :                           variants=["MASS"], &
    1066              :                           description="Fraction of the mass of the atom to be assigned to the shell", &
    1067              :                           usage="MASS_FRACTION {real}", &
    1068         2924 :                           default_r_val=0.1_dp)
    1069         1462 :       CALL section_add_keyword(section, keyword)
    1070         1462 :       CALL keyword_release(keyword)
    1071              : 
    1072              :       CALL keyword_create(keyword, __LOCATION__, name="K2_SPRING", &
    1073              :                           variants=s2a("K2", "SPRING"), &
    1074              :                           description="Force constant k2 of the spring potential 1/2*k2*r^2 + 1/24*k4*r^4 "// &
    1075              :                           "binding a core-shell pair when a core-shell potential is employed.", &
    1076              :                           repeats=.FALSE., &
    1077              :                           usage="K2_SPRING {real}", &
    1078              :                           default_r_val=-1.0_dp, &
    1079         1462 :                           unit_str="hartree*bohr^-2")
    1080         1462 :       CALL section_add_keyword(section, keyword)
    1081         1462 :       CALL keyword_release(keyword)
    1082              : 
    1083              :       CALL keyword_create(keyword, __LOCATION__, name="K4_SPRING", &
    1084              :                           variants=s2a("K4"), &
    1085              :                           description="Force constant k4 of the spring potential 1/2*k2*r^2 + 1/24*k4*r^4 "// &
    1086              :                           "binding a core-shell pair when a core-shell potential is employed. "// &
    1087              :                           "By default a harmonic spring potential is used, i.e. k4 is zero.", &
    1088              :                           repeats=.FALSE., &
    1089              :                           usage="K4_SPRING {real}", &
    1090              :                           default_r_val=0.0_dp, &
    1091         1462 :                           unit_str="hartree*bohr^-4")
    1092         1462 :       CALL section_add_keyword(section, keyword)
    1093         1462 :       CALL keyword_release(keyword)
    1094              : 
    1095              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_DISTANCE", &
    1096              :                           description="Assign a maximum elongation of the spring, "// &
    1097              :                           "if negative no limit is imposed", &
    1098              :                           usage="MAX_DISTANCE 0.0", &
    1099              :                           default_r_val=-1.0_dp, &
    1100         1462 :                           unit_str="angstrom")
    1101         1462 :       CALL section_add_keyword(section, keyword)
    1102         1462 :       CALL keyword_release(keyword)
    1103              : 
    1104              :       CALL keyword_create(keyword, __LOCATION__, name="SHELL_CUTOFF", &
    1105              :                           description="Define a screening function to exclude some neighbors "// &
    1106              :                           "of the shell when electrostatic interaction are considered, "// &
    1107              :                           "if negative no screening is operated", &
    1108              :                           usage="SHELL_CUTOFF -1.0", &
    1109              :                           default_r_val=-1.0_dp, &
    1110         1462 :                           unit_str="angstrom")
    1111         1462 :       CALL section_add_keyword(section, keyword)
    1112         1462 :       CALL keyword_release(keyword)
    1113              : 
    1114         1462 :    END SUBROUTINE create_shell_section
    1115              : 
    1116              : ! **************************************************************************************************
    1117              : !> \brief This section specifies the input parameters for 1-4 NON-BONDED
    1118              : !>      Interactions
    1119              : !> \param section the section to create
    1120              : !> \author teo
    1121              : ! **************************************************************************************************
    1122         2924 :    SUBROUTINE create_NONBONDED14_section(section)
    1123              :       TYPE(section_type), POINTER                        :: section
    1124              : 
    1125              :       TYPE(section_type), POINTER                        :: subsection
    1126              : 
    1127         2924 :       CPASSERT(.NOT. ASSOCIATED(section))
    1128              :       CALL section_create(section, __LOCATION__, name="nonbonded14", &
    1129              :                           description="This section specifies the input parameters for 1-4 NON-BONDED interactions.", &
    1130         2924 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1131              : 
    1132         2924 :       NULLIFY (subsection)
    1133         2924 :       CALL create_LJ_section(subsection)
    1134         2924 :       CALL section_add_subsection(section, subsection)
    1135         2924 :       CALL section_release(subsection)
    1136              : 
    1137         2924 :       CALL create_Williams_section(subsection)
    1138         2924 :       CALL section_add_subsection(section, subsection)
    1139         2924 :       CALL section_release(subsection)
    1140              : 
    1141         2924 :       CALL create_Goodwin_section(subsection)
    1142         2924 :       CALL section_add_subsection(section, subsection)
    1143         2924 :       CALL section_release(subsection)
    1144              : 
    1145         2924 :       CALL create_GENPOT_section(subsection)
    1146         2924 :       CALL section_add_subsection(section, subsection)
    1147         2924 :       CALL section_release(subsection)
    1148              : 
    1149         2924 :    END SUBROUTINE create_NONBONDED14_section
    1150              : 
    1151              : ! **************************************************************************************************
    1152              : !> \brief This section specifies the input parameters for 1-4 NON-BONDED
    1153              : !>      Interactions
    1154              : !> \param section the section to create
    1155              : !> \author teo
    1156              : ! **************************************************************************************************
    1157         1462 :    SUBROUTINE create_NONBONDED_section(section)
    1158              :       TYPE(section_type), POINTER                        :: section
    1159              : 
    1160              :       TYPE(section_type), POINTER                        :: subsection
    1161              : 
    1162         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1163              :       CALL section_create(section, __LOCATION__, name="nonbonded", &
    1164              :                           description="This section specifies the input parameters for NON-BONDED interactions.", &
    1165         1462 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1166              : 
    1167         1462 :       NULLIFY (subsection)
    1168         1462 :       CALL create_LJ_section(subsection)
    1169         1462 :       CALL section_add_subsection(section, subsection)
    1170         1462 :       CALL section_release(subsection)
    1171              : 
    1172         1462 :       CALL create_Williams_section(subsection)
    1173         1462 :       CALL section_add_subsection(section, subsection)
    1174         1462 :       CALL section_release(subsection)
    1175              : 
    1176         1462 :       CALL create_EAM_section(subsection)
    1177         1462 :       CALL section_add_subsection(section, subsection)
    1178         1462 :       CALL section_release(subsection)
    1179              : 
    1180         1462 :       CALL create_NEQUIP_section(subsection)
    1181         1462 :       CALL section_add_subsection(section, subsection)
    1182         1462 :       CALL section_release(subsection)
    1183              : 
    1184         1462 :       CALL create_ACE_section(subsection)
    1185         1462 :       CALL section_add_subsection(section, subsection)
    1186         1462 :       CALL section_release(subsection)
    1187              : 
    1188         1462 :       CALL create_MACE_section(subsection)
    1189         1462 :       CALL section_add_subsection(section, subsection)
    1190         1462 :       CALL section_release(subsection)
    1191              : 
    1192         1462 :       CALL create_DEEPMD_section(subsection)
    1193         1462 :       CALL section_add_subsection(section, subsection)
    1194         1462 :       CALL section_release(subsection)
    1195              : 
    1196         1462 :       CALL create_Goodwin_section(subsection)
    1197         1462 :       CALL section_add_subsection(section, subsection)
    1198         1462 :       CALL section_release(subsection)
    1199              : 
    1200         1462 :       CALL create_IPBV_section(subsection)
    1201         1462 :       CALL section_add_subsection(section, subsection)
    1202         1462 :       CALL section_release(subsection)
    1203              : 
    1204         1462 :       CALL create_BMHFT_section(subsection)
    1205         1462 :       CALL section_add_subsection(section, subsection)
    1206         1462 :       CALL section_release(subsection)
    1207              : 
    1208         1462 :       CALL create_BMHFTD_section(subsection)
    1209         1462 :       CALL section_add_subsection(section, subsection)
    1210         1462 :       CALL section_release(subsection)
    1211              : 
    1212         1462 :       CALL create_Buck4r_section(subsection)
    1213         1462 :       CALL section_add_subsection(section, subsection)
    1214         1462 :       CALL section_release(subsection)
    1215              : 
    1216         1462 :       CALL create_Buckmorse_section(subsection)
    1217         1462 :       CALL section_add_subsection(section, subsection)
    1218         1462 :       CALL section_release(subsection)
    1219              : 
    1220         1462 :       CALL create_GENPOT_section(subsection)
    1221         1462 :       CALL section_add_subsection(section, subsection)
    1222         1462 :       CALL section_release(subsection)
    1223              : 
    1224         1462 :       CALL create_Tersoff_section(subsection)
    1225         1462 :       CALL section_add_subsection(section, subsection)
    1226         1462 :       CALL section_release(subsection)
    1227              : 
    1228         1462 :       CALL create_Siepmann_section(subsection)
    1229         1462 :       CALL section_add_subsection(section, subsection)
    1230         1462 :       CALL section_release(subsection)
    1231              : 
    1232         1462 :       CALL create_Gal_section(subsection)
    1233         1462 :       CALL section_add_subsection(section, subsection)
    1234         1462 :       CALL section_release(subsection)
    1235              : 
    1236         1462 :       CALL create_Gal21_section(subsection)
    1237         1462 :       CALL section_add_subsection(section, subsection)
    1238         1462 :       CALL section_release(subsection)
    1239              : 
    1240         1462 :       CALL create_TABPOT_section(subsection)
    1241         1462 :       CALL section_add_subsection(section, subsection)
    1242         1462 :       CALL section_release(subsection)
    1243              : 
    1244         1462 :    END SUBROUTINE create_NONBONDED_section
    1245              : 
    1246              : ! **************************************************************************************************
    1247              : !> \brief This section specifies the input parameters for generation of
    1248              : !>      neighbor lists
    1249              : !> \param section the section to create
    1250              : !> \author teo [07.2007] - Zurich University
    1251              : ! **************************************************************************************************
    1252         4405 :    SUBROUTINE create_neighbor_lists_section(section)
    1253              :       TYPE(section_type), POINTER                        :: section
    1254              : 
    1255              :       TYPE(keyword_type), POINTER                        :: keyword
    1256              : 
    1257         4405 :       NULLIFY (keyword)
    1258         4405 :       CPASSERT(.NOT. ASSOCIATED(section))
    1259              :       CALL section_create(section, __LOCATION__, name="neighbor_lists", &
    1260              :                           description="This section specifies the input parameters for the construction of"// &
    1261              :                           " neighbor lists.", &
    1262         4405 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1263              : 
    1264              :       CALL keyword_create(keyword, __LOCATION__, name="VERLET_SKIN", &
    1265              :                           description="Defines the Verlet Skin for the generation of the neighbor lists", &
    1266              :                           usage="VERLET_SKIN {real}", default_r_val=cp_unit_to_cp2k(value=1.0_dp, &
    1267              :                                                                                     unit_str="angstrom"), &
    1268         4405 :                           unit_str="angstrom")
    1269         4405 :       CALL section_add_keyword(section, keyword)
    1270         4405 :       CALL keyword_release(keyword)
    1271              : 
    1272              :       CALL keyword_create(keyword, __LOCATION__, name="neighbor_lists_from_scratch", &
    1273              :                           description="This keyword enables the building of the neighbouring list from scratch.", &
    1274              :                           usage="neighbor_lists_from_scratch logical", &
    1275         4405 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1276         4405 :       CALL section_add_keyword(section, keyword)
    1277         4405 :       CALL keyword_release(keyword)
    1278              : 
    1279              :       CALL keyword_create(keyword, __LOCATION__, name="GEO_CHECK", &
    1280              :                           description="This keyword enables the check that two atoms are never below the minimum"// &
    1281              :                           " value used to construct the splines during the construction of the neighbouring list."// &
    1282              :                           " Disabling this keyword avoids CP2K to abort in case two atoms are below the minimum"// &
    1283              :                           " value of the radius used to generate the splines.", &
    1284              :                           usage="GEO_CHECK", &
    1285         4405 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
    1286         4405 :       CALL section_add_keyword(section, keyword)
    1287         4405 :       CALL keyword_release(keyword)
    1288              : 
    1289         4405 :    END SUBROUTINE create_neighbor_lists_section
    1290              : 
    1291              : ! **************************************************************************************************
    1292              : !> \brief This section specifies the input parameters for a generic potential form
    1293              : !> \param section the section to create
    1294              : !> \author teo
    1295              : ! **************************************************************************************************
    1296         7329 :    SUBROUTINE create_GENPOT_section(section)
    1297              :       TYPE(section_type), POINTER                        :: section
    1298              : 
    1299              :       TYPE(keyword_type), POINTER                        :: keyword
    1300              : 
    1301         7329 :       CPASSERT(.NOT. ASSOCIATED(section))
    1302              : 
    1303              :       CALL create_function_section(section, "GENPOT", "FUNCTION", &
    1304              :                                    description="This section specifies a generic potential function "// &
    1305              :                                    "between two kinds of atoms (identical or distinct). The VARIABLES "// &
    1306              :                                    "keyword should define exactly one symbol as the variable in the "// &
    1307              :                                    "generic function.", &
    1308         7329 :                                    repeats=.TRUE.)
    1309              : 
    1310         7329 :       NULLIFY (keyword)
    1311              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1312              :                           description="Defines the two atomic kinds involved in the generic "// &
    1313              :                           "potential function. The kind names are not case sensitive.", &
    1314         7329 :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, n_var=2)
    1315         7329 :       CALL section_add_keyword(section, keyword)
    1316         7329 :       CALL keyword_release(keyword)
    1317              : 
    1318              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1319              :                           description="Defines the cutoff parameter of the generic potential.", &
    1320              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1321              :                                                                              unit_str="angstrom"), &
    1322         7329 :                           unit_str="angstrom")
    1323         7329 :       CALL section_add_keyword(section, keyword)
    1324         7329 :       CALL keyword_release(keyword)
    1325              : 
    1326              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1327              :                           description="Defines the lower bound of the potential. If not set the "// &
    1328              :                           "range is the full range generated by the spline.", usage="RMIN {real}", &
    1329         7329 :                           type_of_var=real_t, unit_str="angstrom")
    1330         7329 :       CALL section_add_keyword(section, keyword)
    1331         7329 :       CALL keyword_release(keyword)
    1332              : 
    1333              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1334              :                           description="Defines the upper bound of the potential. If not set the "// &
    1335              :                           "range is the full range generated by the spline.", usage="RMAX {real}", &
    1336         7329 :                           type_of_var=real_t, unit_str="angstrom")
    1337         7329 :       CALL section_add_keyword(section, keyword)
    1338         7329 :       CALL keyword_release(keyword)
    1339              : 
    1340         7329 :    END SUBROUTINE create_GENPOT_section
    1341              : 
    1342              : ! **************************************************************************************************
    1343              : !> \brief This section specifies the input parameters for EAM  potential type
    1344              : !> \param section the section to create
    1345              : !> \author teo
    1346              : ! **************************************************************************************************
    1347         1462 :    SUBROUTINE create_EAM_section(section)
    1348              :       TYPE(section_type), POINTER                        :: section
    1349              : 
    1350              :       TYPE(keyword_type), POINTER                        :: keyword
    1351              : 
    1352         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1353              :       CALL section_create(section, __LOCATION__, name="EAM", &
    1354              :                           description="This section specifies the input parameters for EAM potential type.", &
    1355         2924 :                           citations=[Foiles1986], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1356              : 
    1357         1462 :       NULLIFY (keyword)
    1358              : 
    1359              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1360              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1361              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1362         1462 :                           n_var=2)
    1363         1462 :       CALL section_add_keyword(section, keyword)
    1364         1462 :       CALL keyword_release(keyword)
    1365              : 
    1366              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
    1367              :                           variants=["PARMFILE"], &
    1368              :                           description="Specifies the filename that contains the tabulated EAM potential. "// &
    1369              :                           "File structure: the first line of the potential file contains a title. "// &
    1370              :                           "The second line contains: atomic number, mass and lattice constant. "// &
    1371              :                           "These information are parsed but not used in CP2K. The third line contains: "// &
    1372              :                           "dr: increment of r for the tabulated values of density and phi (assuming r starts in 0) [angstrom]; "// &
    1373              :                           "drho: increment of density for the tabulated values of the embedding function (assuming rho starts "// &
    1374              :                           "in 0) [au_c]; cutoff: cutoff of the EAM potential; npoints: number of points in tabulated. Follow "// &
    1375              :                           "in order npoints lines for rho [au_c] and its derivative [au_c*angstrom^-1]; npoints lines for "// &
    1376              :                           "PHI [ev] and its derivative [ev*angstrom^-1] and npoint lines for the embedded function [ev] "// &
    1377              :                           "and its derivative [ev*au_c^-1].", &
    1378         2924 :                           usage="PARM_FILE_NAME {FILENAME}", default_lc_val=" ")
    1379         1462 :       CALL section_add_keyword(section, keyword)
    1380         1462 :       CALL keyword_release(keyword)
    1381              : 
    1382         1462 :    END SUBROUTINE create_EAM_section
    1383              : 
    1384              : ! **************************************************************************************************
    1385              : !> \brief This section specifies the input parameters for NEQUIP  potential type
    1386              : !> \param section the section to create
    1387              : !> \author teo
    1388              : ! **************************************************************************************************
    1389         1462 :    SUBROUTINE create_NEQUIP_section(section)
    1390              :       TYPE(section_type), POINTER                        :: section
    1391              : 
    1392              :       TYPE(keyword_type), POINTER                        :: keyword
    1393              : 
    1394         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1395              :       CALL section_create(section, __LOCATION__, name="NEQUIP", &
    1396              :                           description="This section specifies the input parameters for NEQUIP potential type "// &
    1397              :                           "based on equivariant neural networks, and for ALLEGRO, a local large-scale variant. "// &
    1398              :                           "Note: To enable the prediction of stress, along with energies and forces, the keyword "// &
    1399              :                           "StressForceOutput must be included in the nequip config *.yaml file used to train the "// &
    1400              :                           "model, regardless of whether the model has been trained on the stress. "// &
    1401              :                           "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
    1402         5848 :                           citations=[Batzner2022, Musaelian2023, Tan2025], n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1403              : 
    1404         1462 :       NULLIFY (keyword)
    1405              : 
    1406              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1407              :                           description="Defines the atomic kinds involved in the NEQUIP potential. "// &
    1408              :                           "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
    1409              :                           "to NequIP atom types is correct. This mapping should also be consistent for the "// &
    1410              :                           "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
    1411              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1412         1462 :                           n_var=-1)
    1413         1462 :       CALL section_add_keyword(section, keyword)
    1414         1462 :       CALL keyword_release(keyword)
    1415              : 
    1416              :       CALL keyword_create(keyword, __LOCATION__, name="MODEL_TYPE", &
    1417              :                           variants=["MODEL"], &
    1418              :                           description="Specifies the type of model used. Allowed values are NEQUIP or ALLEGRO.", &
    1419         2924 :                           usage="MODEL_TYPE {NEQUIP}", default_lc_val=" ")
    1420         1462 :       CALL section_add_keyword(section, keyword)
    1421         1462 :       CALL keyword_release(keyword)
    1422              : 
    1423              :       CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
    1424              :                           variants=["MODEL_FILE_NAME"], &
    1425              :                           description="Specifies the filename that contains the NEQUIP model.", &
    1426         2924 :                           usage="POT_FILE_NAME {FILENAME}", default_lc_val=" ")
    1427         1462 :       CALL section_add_keyword(section, keyword)
    1428         1462 :       CALL keyword_release(keyword)
    1429              : 
    1430              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_LENGTH", &
    1431              :                           description="Units of length in the NEQUIP model.pth file. "// &
    1432              :                           "The units of positions, cell, energies and forces must be self-consistent: "// &
    1433              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1434         1462 :                           usage="UNIT_LENGTH angstrom", default_c_val="angstrom")
    1435         1462 :       CALL section_add_keyword(section, keyword)
    1436         1462 :       CALL keyword_release(keyword)
    1437              : 
    1438              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_ENERGY", &
    1439              :                           description="Units of energy in the NEQUIP model.pth file. "// &
    1440              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1441              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1442         1462 :                           usage="UNIT_ENERGY hartree", default_c_val="eV")
    1443         1462 :       CALL section_add_keyword(section, keyword)
    1444         1462 :       CALL keyword_release(keyword)
    1445              : 
    1446              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_FORCES", &
    1447              :                           description="Units of the forces in the NEQUIP model.pth file. "// &
    1448              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1449              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1450         1462 :                           usage="UNIT_FORCES hartree/bohr", default_c_val="eV/Angstrom")
    1451         1462 :       CALL section_add_keyword(section, keyword)
    1452         1462 :       CALL keyword_release(keyword)
    1453              : 
    1454         1462 :    END SUBROUTINE create_NEQUIP_section
    1455              : 
    1456              : ! **************************************************************************************************
    1457              : !> \brief This section specifies the input parameters for MACE potential type
    1458              : !> \param section the section to create
    1459              : !> \author Xinyue Sun
    1460              : ! **************************************************************************************************
    1461         1462 :    SUBROUTINE create_MACE_section(section)
    1462              :       TYPE(section_type), POINTER                        :: section
    1463              : 
    1464              :       TYPE(keyword_type), POINTER                        :: keyword
    1465              : 
    1466         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1467              :       CALL section_create(section, __LOCATION__, name="MACE", &
    1468              :                           description="This section specifies the input parameters for MACE potential type, "// &
    1469              :                           "a higher-order equivariant message-passing neural network. "// &
    1470              :                           "The MACE model must be exported to a TorchScript file that takes a single "// &
    1471              :                           "dictionary argument (see the create_cp2k_model.py helper). "// &
    1472              :                           "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
    1473         2924 :                           citations=[Batatia2022], n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1474              : 
    1475         1462 :       NULLIFY (keyword)
    1476              : 
    1477              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1478              :                           description="Defines the atomic kinds involved in the MACE potential. "// &
    1479              :                           "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
    1480              :                           "to MACE atom types is correct. This mapping should also be consistent for the "// &
    1481              :                           "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
    1482              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1483         1462 :                           n_var=-1)
    1484         1462 :       CALL section_add_keyword(section, keyword)
    1485         1462 :       CALL keyword_release(keyword)
    1486              : 
    1487              :       CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
    1488              :                           variants=["MODEL_FILE_NAME"], &
    1489              :                           description="Specifies the filename that contains the exported MACE model. "// &
    1490              :                           "MACE models use standardized units (Angstrom for length, eV for energy, "// &
    1491              :                           "eV/Angstrom for forces), so no unit keywords are required.", &
    1492         2924 :                           usage="POT_FILE_NAME {FILENAME}", default_lc_val=" ")
    1493         1462 :       CALL section_add_keyword(section, keyword)
    1494         1462 :       CALL keyword_release(keyword)
    1495              : 
    1496         1462 :    END SUBROUTINE create_MACE_section
    1497              : 
    1498              : ! **************************************************************************************************
    1499              : !> \brief This section specifies the input parameters for ACE potential type
    1500              : !> \param section the section to create
    1501              : !> \author
    1502              : ! **************************************************************************************************
    1503         1462 :    SUBROUTINE create_ACE_section(section)
    1504              :       TYPE(section_type), POINTER                        :: section
    1505              : 
    1506              :       TYPE(keyword_type), POINTER                        :: keyword
    1507              : 
    1508              :       CALL section_create(section, __LOCATION__, name="ACE", &
    1509              :                           description="This section specifies the input parameters for Atomic Cluster Expansion type. "// &
    1510              :                           "Mainly intended for accurate representation of "// &
    1511              :                           "potential energy surfaces. "// &
    1512              :                           "Requires linking with ACE library from "// &
    1513              :                           "<a href=""https://github.com/ICAMS/lammps-user-pace"" "// &
    1514              :                           "target=""_blank"">https://github.com/ICAMS/lammps-user-pace</a> .", &
    1515              :                           citations=[Drautz2019, Lysogorskiy2021, Bochkarev2024], &
    1516         5848 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1517         1462 :       NULLIFY (keyword)
    1518              : 
    1519              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1520              :                           description="Defines the atomic species. "// &
    1521              :                           "Provide a list of each element, "// &
    1522              :                           "making sure that the mapping from the ATOMS list to ACE atom types is correct.", &
    1523              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1524         1462 :                           n_var=-1)
    1525         1462 :       CALL section_add_keyword(section, keyword)
    1526         1462 :       CALL keyword_release(keyword)
    1527              :       CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
    1528              :                           variants=["PARMFILE"], &
    1529              :                           description="Specifies the filename that contains the ACE potential parameters.", &
    1530         2924 :                           usage="POT_FILE_NAME {FILENAME}", default_lc_val="test.yaml")
    1531         1462 :       CALL section_add_keyword(section, keyword)
    1532         1462 :       CALL keyword_release(keyword)
    1533         1462 :    END SUBROUTINE create_ACE_section
    1534              : 
    1535              : ! **************************************************************************************************
    1536              : !> \brief This section specifies the input parameters for DEEPMD potential type
    1537              : !> \param section the section to create
    1538              : !> \author ybzhuang
    1539              : ! **************************************************************************************************
    1540         1462 :    SUBROUTINE create_DEEPMD_section(section)
    1541              :       TYPE(section_type), POINTER                        :: section
    1542              : 
    1543              :       TYPE(keyword_type), POINTER                        :: keyword
    1544              : 
    1545              :       CALL section_create(section, __LOCATION__, name="DEEPMD", &
    1546              :                           description="This section specifies the input parameters for Deep Potential type. "// &
    1547              :                           "Mainly intended for things like neural network to DFT "// &
    1548              :                           "to achieve correlated-wavefunction-like accuracy. "// &
    1549              :                           "Requires linking with DeePMD-kit library from "// &
    1550              :                           "<a href=""https://docs.deepmodeling.com/projects/deepmd/en/master"" "// &
    1551              :                           "target=""_blank"">https://docs.deepmodeling.com/projects/deepmd/en/master</a> .", &
    1552         4386 :                           citations=[Wang2018, Zeng2023], n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1553         1462 :       NULLIFY (keyword)
    1554              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1555              :                           description="Defines the atomic kinds involved in the Deep Potential. "// &
    1556              :                           "Provide a list of each element, "// &
    1557              :                           "making sure that the mapping from the ATOMS list to DeePMD atom types is correct.", &
    1558              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1559         1462 :                           n_var=-1)
    1560         1462 :       CALL section_add_keyword(section, keyword)
    1561         1462 :       CALL keyword_release(keyword)
    1562              :       CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
    1563              :                           variants=["PARMFILE"], &
    1564              :                           description="Specifies the filename that contains the DeePMD-kit potential.", &
    1565         2924 :                           usage="POT_FILE_NAME {FILENAME}", default_lc_val="graph.pb")
    1566         1462 :       CALL section_add_keyword(section, keyword)
    1567         1462 :       CALL keyword_release(keyword)
    1568              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS_DEEPMD_TYPE", &
    1569              :                           description="Specifies the atomic TYPE for the DeePMD-kit potential. "// &
    1570              :                           "Provide a list of index, making sure that the mapping "// &
    1571              :                           "from the ATOMS list to DeePMD atom types is correct. ", &
    1572              :                           usage="ATOMS_DEEPMD_TYPE {TYPE INTEGER 1} {TYPE INTEGER 2} .. "// &
    1573              :                           "{TYPE INTEGER N}", type_of_var=integer_t, &
    1574         1462 :                           n_var=-1)
    1575         1462 :       CALL section_add_keyword(section, keyword)
    1576         1462 :       CALL keyword_release(keyword)
    1577         1462 :    END SUBROUTINE create_DEEPMD_section
    1578              : 
    1579              : ! **************************************************************************************************
    1580              : !> \brief This section specifies the input parameters for Lennard-Jones potential type
    1581              : !> \param section the section to create
    1582              : !> \author teo
    1583              : ! **************************************************************************************************
    1584         5848 :    SUBROUTINE create_LJ_section(section)
    1585              :       TYPE(section_type), POINTER                        :: section
    1586              : 
    1587              :       TYPE(keyword_type), POINTER                        :: keyword
    1588              : 
    1589         5848 :       CPASSERT(.NOT. ASSOCIATED(section))
    1590              :       CALL section_create(section, __LOCATION__, name="lennard-jones", &
    1591              :                           description="This section specifies the input parameters for LENNARD-JONES potential type. "// &
    1592              :                           "Functional form: V(r) = 4.0 * EPSILON * [(SIGMA/r)^12-(SIGMA/r)^6].", &
    1593         5848 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1594              : 
    1595         5848 :       NULLIFY (keyword)
    1596              : 
    1597              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1598              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1599              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1600         5848 :                           n_var=2)
    1601         5848 :       CALL section_add_keyword(section, keyword)
    1602         5848 :       CALL keyword_release(keyword)
    1603              : 
    1604              :       CALL keyword_create(keyword, __LOCATION__, name="EPSILON", &
    1605              :                           description="Defines the EPSILON parameter of the LJ potential", &
    1606              :                           usage="EPSILON {real}", type_of_var=real_t, &
    1607         5848 :                           n_var=1, unit_str="K_e")
    1608         5848 :       CALL section_add_keyword(section, keyword)
    1609         5848 :       CALL keyword_release(keyword)
    1610              : 
    1611              :       CALL keyword_create(keyword, __LOCATION__, name="SIGMA", &
    1612              :                           description="Defines the SIGMA parameter of the LJ potential", &
    1613              :                           usage="SIGMA {real}", type_of_var=real_t, &
    1614         5848 :                           n_var=1, unit_str="angstrom")
    1615         5848 :       CALL section_add_keyword(section, keyword)
    1616         5848 :       CALL keyword_release(keyword)
    1617              : 
    1618              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1619              :                           description="Defines the cutoff parameter of the LJ potential", &
    1620              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1621              :                                                                              unit_str="angstrom"), &
    1622         5848 :                           unit_str="angstrom")
    1623         5848 :       CALL section_add_keyword(section, keyword)
    1624         5848 :       CALL keyword_release(keyword)
    1625              : 
    1626              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1627              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1628              :                           " full range generate by the spline", usage="RMIN {real}", &
    1629         5848 :                           type_of_var=real_t, unit_str="angstrom")
    1630         5848 :       CALL section_add_keyword(section, keyword)
    1631         5848 :       CALL keyword_release(keyword)
    1632              : 
    1633              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1634              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1635              :                           " full range generate by the spline", usage="RMAX {real}", &
    1636         5848 :                           type_of_var=real_t, unit_str="angstrom")
    1637         5848 :       CALL section_add_keyword(section, keyword)
    1638         5848 :       CALL keyword_release(keyword)
    1639              : 
    1640         5848 :    END SUBROUTINE create_LJ_section
    1641              : 
    1642              : ! **************************************************************************************************
    1643              : !> \brief This section specifies the input parameters for Williams potential type
    1644              : !> \param section the section to create
    1645              : !> \author teo
    1646              : ! **************************************************************************************************
    1647         5848 :    SUBROUTINE create_Williams_section(section)
    1648              :       TYPE(section_type), POINTER                        :: section
    1649              : 
    1650              :       TYPE(keyword_type), POINTER                        :: keyword
    1651              : 
    1652         5848 :       CPASSERT(.NOT. ASSOCIATED(section))
    1653              :       CALL section_create(section, __LOCATION__, name="williams", &
    1654              :                           description="This section specifies the input parameters for WILLIAMS potential type. "// &
    1655              :                           "Functional form: V(r) = A*EXP(-B*r) - C / r^6 .", &
    1656         5848 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1657              : 
    1658         5848 :       NULLIFY (keyword)
    1659              : 
    1660              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1661              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1662              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1663         5848 :                           n_var=2)
    1664         5848 :       CALL section_add_keyword(section, keyword)
    1665         5848 :       CALL keyword_release(keyword)
    1666              : 
    1667              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    1668              :                           description="Defines the A parameter of the Williams potential", &
    1669              :                           usage="A {real}", type_of_var=real_t, &
    1670         5848 :                           n_var=1, unit_str="K_e")
    1671         5848 :       CALL section_add_keyword(section, keyword)
    1672         5848 :       CALL keyword_release(keyword)
    1673              : 
    1674              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    1675              :                           description="Defines the B parameter of the Williams potential", &
    1676              :                           usage="B {real}", type_of_var=real_t, &
    1677         5848 :                           n_var=1, unit_str="angstrom^-1")
    1678         5848 :       CALL section_add_keyword(section, keyword)
    1679         5848 :       CALL keyword_release(keyword)
    1680              : 
    1681              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    1682              :                           description="Defines the C parameter of the Williams potential", &
    1683              :                           usage="C {real}", type_of_var=real_t, &
    1684         5848 :                           n_var=1, unit_str="K_e*angstrom^6")
    1685         5848 :       CALL section_add_keyword(section, keyword)
    1686         5848 :       CALL keyword_release(keyword)
    1687              : 
    1688              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1689              :                           description="Defines the cutoff parameter of the Williams potential", &
    1690              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1691              :                                                                              unit_str="angstrom"), &
    1692         5848 :                           unit_str="angstrom")
    1693         5848 :       CALL section_add_keyword(section, keyword)
    1694         5848 :       CALL keyword_release(keyword)
    1695              : 
    1696              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1697              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1698              :                           " full range generate by the spline", usage="RMIN {real}", &
    1699         5848 :                           type_of_var=real_t, unit_str="angstrom")
    1700         5848 :       CALL section_add_keyword(section, keyword)
    1701         5848 :       CALL keyword_release(keyword)
    1702              : 
    1703              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1704              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1705              :                           " full range generate by the spline", usage="RMAX {real}", &
    1706         5848 :                           type_of_var=real_t, unit_str="angstrom")
    1707         5848 :       CALL section_add_keyword(section, keyword)
    1708         5848 :       CALL keyword_release(keyword)
    1709              : 
    1710         5848 :    END SUBROUTINE create_Williams_section
    1711              : 
    1712              : ! **************************************************************************************************
    1713              : !> \brief This section specifies the input parameters for Goodwin potential type
    1714              : !> \param section the section to create
    1715              : !> \author teo
    1716              : ! **************************************************************************************************
    1717         5848 :    SUBROUTINE create_Goodwin_section(section)
    1718              :       TYPE(section_type), POINTER                        :: section
    1719              : 
    1720              :       TYPE(keyword_type), POINTER                        :: keyword
    1721              : 
    1722         5848 :       CPASSERT(.NOT. ASSOCIATED(section))
    1723              :       CALL section_create(section, __LOCATION__, name="goodwin", &
    1724              :                           description="This section specifies the input parameters for GOODWIN potential type. "// &
    1725              :                           "Functional form: V(r) = EXP(M*(-(r/DC)**MC+(D/DC)**MC))*VR0*(D/r)**M.", &
    1726         5848 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1727              : 
    1728         5848 :       NULLIFY (keyword)
    1729              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1730              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1731              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1732         5848 :                           n_var=2)
    1733         5848 :       CALL section_add_keyword(section, keyword)
    1734         5848 :       CALL keyword_release(keyword)
    1735              : 
    1736              :       CALL keyword_create(keyword, __LOCATION__, name="VR0", &
    1737              :                           description="Defines the VR0 parameter of the Goodwin potential", &
    1738              :                           usage="VR0 {real}", type_of_var=real_t, &
    1739         5848 :                           n_var=1, unit_str="K_e")
    1740         5848 :       CALL section_add_keyword(section, keyword)
    1741         5848 :       CALL keyword_release(keyword)
    1742              : 
    1743              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    1744              :                           description="Defines the D parameter of the Goodwin potential", &
    1745              :                           usage="D {real}", type_of_var=real_t, &
    1746         5848 :                           n_var=1, unit_str="angstrom")
    1747         5848 :       CALL section_add_keyword(section, keyword)
    1748         5848 :       CALL keyword_release(keyword)
    1749              : 
    1750              :       CALL keyword_create(keyword, __LOCATION__, name="DC", &
    1751              :                           description="Defines the DC parameter of the Goodwin potential", &
    1752              :                           usage="DC {real}", type_of_var=real_t, &
    1753         5848 :                           n_var=1, unit_str="angstrom")
    1754         5848 :       CALL section_add_keyword(section, keyword)
    1755         5848 :       CALL keyword_release(keyword)
    1756              : 
    1757              :       CALL keyword_create(keyword, __LOCATION__, name="M", &
    1758              :                           description="Defines the M parameter of the Goodwin potential", &
    1759              :                           usage="M {real}", type_of_var=integer_t, &
    1760         5848 :                           n_var=1)
    1761         5848 :       CALL section_add_keyword(section, keyword)
    1762         5848 :       CALL keyword_release(keyword)
    1763              : 
    1764              :       CALL keyword_create(keyword, __LOCATION__, name="MC", &
    1765              :                           description="Defines the MC parameter of the Goodwin potential", &
    1766              :                           usage="MC {real}", type_of_var=integer_t, &
    1767         5848 :                           n_var=1)
    1768         5848 :       CALL section_add_keyword(section, keyword)
    1769         5848 :       CALL keyword_release(keyword)
    1770              : 
    1771              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1772              :                           description="Defines the cutoff parameter of the Goodwin potential", &
    1773              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1774              :                                                                              unit_str="angstrom"), &
    1775         5848 :                           unit_str="angstrom")
    1776         5848 :       CALL section_add_keyword(section, keyword)
    1777         5848 :       CALL keyword_release(keyword)
    1778              : 
    1779              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1780              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1781              :                           " full range generate by the spline", usage="RMIN {real}", &
    1782         5848 :                           type_of_var=real_t, unit_str="angstrom")
    1783         5848 :       CALL section_add_keyword(section, keyword)
    1784         5848 :       CALL keyword_release(keyword)
    1785              : 
    1786              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1787              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1788              :                           " full range generate by the spline", usage="RMAX {real}", &
    1789         5848 :                           type_of_var=real_t, unit_str="angstrom")
    1790         5848 :       CALL section_add_keyword(section, keyword)
    1791         5848 :       CALL keyword_release(keyword)
    1792              : 
    1793         5848 :    END SUBROUTINE create_Goodwin_section
    1794              : 
    1795              : ! **************************************************************************************************
    1796              : !> \brief This section specifies the input parameters for IPBV potential type
    1797              : !> \param section the section to create
    1798              : !> \author teo
    1799              : ! **************************************************************************************************
    1800         1462 :    SUBROUTINE create_ipbv_section(section)
    1801              :       TYPE(section_type), POINTER                        :: section
    1802              : 
    1803              :       TYPE(keyword_type), POINTER                        :: keyword
    1804              : 
    1805         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1806              :       CALL section_create(section, __LOCATION__, name="ipbv", &
    1807              :                           description="This section specifies the input parameters for IPBV potential type. "// &
    1808              :                           "Functional form: Implicit table function.", &
    1809         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1810              : 
    1811         1462 :       NULLIFY (keyword)
    1812              : 
    1813              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1814              :                           description="Defines the atomic kind involved in the IPBV nonbond potential", &
    1815              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1816         1462 :                           n_var=2)
    1817         1462 :       CALL section_add_keyword(section, keyword)
    1818         1462 :       CALL keyword_release(keyword)
    1819              : 
    1820              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1821              :                           description="Defines the cutoff parameter of the IPBV potential", &
    1822              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1823              :                                                                              unit_str="angstrom"), &
    1824         1462 :                           unit_str="angstrom")
    1825         1462 :       CALL section_add_keyword(section, keyword)
    1826         1462 :       CALL keyword_release(keyword)
    1827              : 
    1828              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1829              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1830              :                           " full range generate by the spline", usage="RMIN {real}", &
    1831         1462 :                           type_of_var=real_t, unit_str="angstrom")
    1832         1462 :       CALL section_add_keyword(section, keyword)
    1833         1462 :       CALL keyword_release(keyword)
    1834              : 
    1835              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1836              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1837              :                           " full range generate by the spline", usage="RMAX {real}", &
    1838         1462 :                           type_of_var=real_t, unit_str="angstrom")
    1839         1462 :       CALL section_add_keyword(section, keyword)
    1840         1462 :       CALL keyword_release(keyword)
    1841              : 
    1842         1462 :    END SUBROUTINE create_ipbv_section
    1843              : 
    1844              : ! **************************************************************************************************
    1845              : !> \brief This section specifies the input parameters for BMHFT potential type
    1846              : !> \param section the section to create
    1847              : !> \author teo
    1848              : ! **************************************************************************************************
    1849         1462 :    SUBROUTINE create_BMHFT_section(section)
    1850              :       TYPE(section_type), POINTER                        :: section
    1851              : 
    1852              :       TYPE(keyword_type), POINTER                        :: keyword
    1853              : 
    1854         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1855              :       CALL section_create(section, __LOCATION__, name="BMHFT", &
    1856              :                           description="This section specifies the input parameters for BMHFT potential type. "// &
    1857              :                           "Functional form: V(r) = A * EXP(-B*r) - C/r^6 - D/r^8. "// &
    1858              :                           "Values available inside cp2k only for the Na/Cl pair.", &
    1859         4386 :                           citations=[Tosi1964a, Tosi1964b], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1860              : 
    1861         1462 :       NULLIFY (keyword)
    1862              : 
    1863              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1864              :                           description="Defines the atomic kind involved in the BMHFT nonbond potential", &
    1865              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1866         1462 :                           n_var=2)
    1867         1462 :       CALL section_add_keyword(section, keyword)
    1868         1462 :       CALL keyword_release(keyword)
    1869              : 
    1870              :       CALL keyword_create(keyword, __LOCATION__, name="MAP_ATOMS", &
    1871              :                           description="Defines the kinds for which internally is defined the BMHFT nonbond potential"// &
    1872              :                           " at the moment only Na and Cl.", &
    1873              :                           usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1874         1462 :                           n_var=2)
    1875         1462 :       CALL section_add_keyword(section, keyword)
    1876         1462 :       CALL keyword_release(keyword)
    1877              : 
    1878              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1879              :                           description="Defines the cutoff parameter of the BMHFT potential", &
    1880              :                           usage="RCUT {real}", default_r_val=7.8_dp, &
    1881         1462 :                           unit_str="angstrom")
    1882         1462 :       CALL section_add_keyword(section, keyword)
    1883         1462 :       CALL keyword_release(keyword)
    1884              : 
    1885              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    1886              :                           description="Defines the A parameter of the Fumi-Tosi Potential", &
    1887              :                           usage="A {real}", type_of_var=real_t, &
    1888         1462 :                           n_var=1, unit_str="hartree")
    1889         1462 :       CALL section_add_keyword(section, keyword)
    1890         1462 :       CALL keyword_release(keyword)
    1891              : 
    1892              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    1893              :                           description="Defines the B parameter of the Fumi-Tosi Potential", &
    1894              :                           usage="B {real}", type_of_var=real_t, &
    1895         1462 :                           n_var=1, unit_str="angstrom^-1")
    1896         1462 :       CALL section_add_keyword(section, keyword)
    1897         1462 :       CALL keyword_release(keyword)
    1898              : 
    1899              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    1900              :                           description="Defines the C parameter of the Fumi-Tosi Potential", &
    1901              :                           usage="C {real}", type_of_var=real_t, &
    1902         1462 :                           n_var=1, unit_str="hartree*angstrom^6")
    1903         1462 :       CALL section_add_keyword(section, keyword)
    1904         1462 :       CALL keyword_release(keyword)
    1905              : 
    1906              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    1907              :                           description="Defines the D parameter of the Fumi-Tosi Potential", &
    1908              :                           usage="D {real}", type_of_var=real_t, &
    1909         1462 :                           n_var=1, unit_str="hartree*angstrom^8")
    1910         1462 :       CALL section_add_keyword(section, keyword)
    1911         1462 :       CALL keyword_release(keyword)
    1912              : 
    1913              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1914              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1915              :                           " full range generate by the spline", usage="RMIN {real}", &
    1916         1462 :                           type_of_var=real_t, unit_str="angstrom")
    1917         1462 :       CALL section_add_keyword(section, keyword)
    1918         1462 :       CALL keyword_release(keyword)
    1919              : 
    1920              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1921              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1922              :                           " full range generate by the spline", usage="RMAX {real}", &
    1923         1462 :                           type_of_var=real_t, unit_str="angstrom")
    1924         1462 :       CALL section_add_keyword(section, keyword)
    1925         1462 :       CALL keyword_release(keyword)
    1926              : 
    1927         1462 :    END SUBROUTINE create_BMHFT_section
    1928              : 
    1929              : ! **************************************************************************************************
    1930              : !> \brief This section specifies the input parameters for BMHFTD potential type
    1931              : !> \param section the section to create
    1932              : !> \par History
    1933              : !>      - Unused input keyword ORDER removed (18.10.2021, MK)
    1934              : !> \author Mathieu Salanne 05.2010
    1935              : ! **************************************************************************************************
    1936         1462 :    SUBROUTINE create_BMHFTD_section(section)
    1937              :       TYPE(section_type), POINTER                        :: section
    1938              : 
    1939              :       TYPE(keyword_type), POINTER                        :: keyword
    1940              : 
    1941         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    1942              :       CALL section_create(section, __LOCATION__, name="BMHFTD", &
    1943              :                           description="This section specifies the input parameters for the BMHFTD potential type. "// &
    1944              :                           "Functional form: V(r) = A*exp(-B*r) - f_6*(r)C/r^6 - f_8(r)*D/r^8 "// &
    1945              :                           "where f_order(r) = 1 - exp(-BD*r)*\sum_{k=0}^order (BD*r)^k/k! "// &
    1946              :                           "(Tang-Toennies damping function). No pre-defined parameter values are available.", &
    1947         4386 :                           citations=[Tosi1964a, Tosi1964b], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1948              : 
    1949         1462 :       NULLIFY (keyword)
    1950              : 
    1951              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1952              :                           description="Defines the atomic kind involved in the BMHFTD nonbond potential", &
    1953              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1954         1462 :                           n_var=2)
    1955         1462 :       CALL section_add_keyword(section, keyword)
    1956         1462 :       CALL keyword_release(keyword)
    1957              : 
    1958              :       CALL keyword_create(keyword, __LOCATION__, name="MAP_ATOMS", &
    1959              :                           description="Defines the kinds for which internally is defined the BMHFTD nonbond potential"// &
    1960              :                           " at the moment no species included.", &
    1961              :                           usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1962         1462 :                           n_var=2)
    1963         1462 :       CALL section_add_keyword(section, keyword)
    1964         1462 :       CALL keyword_release(keyword)
    1965              : 
    1966              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1967              :                           description="Defines the cutoff parameter of the BMHFTD potential", &
    1968              :                           usage="RCUT {real}", default_r_val=7.8_dp, &
    1969         1462 :                           unit_str="angstrom")
    1970         1462 :       CALL section_add_keyword(section, keyword)
    1971         1462 :       CALL keyword_release(keyword)
    1972              : 
    1973              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    1974              :                           description="Defines the A parameter of the dispersion-damped Fumi-Tosi potential", &
    1975              :                           usage="A {real}", type_of_var=real_t, &
    1976         1462 :                           n_var=1, unit_str="hartree")
    1977         1462 :       CALL section_add_keyword(section, keyword)
    1978         1462 :       CALL keyword_release(keyword)
    1979              : 
    1980              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    1981              :                           description="Defines the B parameter of the dispersion-damped Fumi-Tosi potential", &
    1982              :                           usage="B {real}", type_of_var=real_t, &
    1983         1462 :                           n_var=1, unit_str="angstrom^-1")
    1984         1462 :       CALL section_add_keyword(section, keyword)
    1985         1462 :       CALL keyword_release(keyword)
    1986              : 
    1987              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    1988              :                           description="Defines the C parameter of the dispersion-damped Fumi-Tosi potential", &
    1989              :                           usage="C {real}", type_of_var=real_t, &
    1990         1462 :                           n_var=1, unit_str="hartree*angstrom^6")
    1991         1462 :       CALL section_add_keyword(section, keyword)
    1992         1462 :       CALL keyword_release(keyword)
    1993              : 
    1994              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    1995              :                           description="Defines the D parameter of the dispersion-damped Fumi-Tosi potential", &
    1996              :                           usage="D {real}", type_of_var=real_t, &
    1997         1462 :                           n_var=1, unit_str="hartree*angstrom^8")
    1998         1462 :       CALL section_add_keyword(section, keyword)
    1999         1462 :       CALL keyword_release(keyword)
    2000              : 
    2001              :       CALL keyword_create(keyword, __LOCATION__, name="BD", &
    2002              :                           description="Defines the BD parameters of the dispersion-damped Fumi-Tosi potential. "// &
    2003              :                           "One or two parameter values are expected. If only one value is provided, then this "// &
    2004              :                           "value will be used both for the 6th and the 8th order term.", &
    2005              :                           usage="BD {real} {real}", type_of_var=real_t, &
    2006         1462 :                           n_var=-1, unit_str="angstrom^-1")
    2007         1462 :       CALL section_add_keyword(section, keyword)
    2008         1462 :       CALL keyword_release(keyword)
    2009              : 
    2010              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    2011              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    2012              :                           " full range generate by the spline", usage="RMIN {real}", &
    2013         1462 :                           type_of_var=real_t, unit_str="angstrom")
    2014         1462 :       CALL section_add_keyword(section, keyword)
    2015         1462 :       CALL keyword_release(keyword)
    2016              : 
    2017              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    2018              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    2019              :                           " full range generate by the spline", usage="RMAX {real}", &
    2020         1462 :                           type_of_var=real_t, unit_str="angstrom")
    2021         1462 :       CALL section_add_keyword(section, keyword)
    2022         1462 :       CALL keyword_release(keyword)
    2023              : 
    2024         1462 :    END SUBROUTINE create_BMHFTD_section
    2025              : 
    2026              : ! **************************************************************************************************
    2027              : !> \brief This section specifies the input parameters for Buckingham 4 ranges potential type
    2028              : !> \param section the section to create
    2029              : !> \author MI
    2030              : ! **************************************************************************************************
    2031         1462 :    SUBROUTINE create_Buck4r_section(section)
    2032              :       TYPE(section_type), POINTER                        :: section
    2033              : 
    2034              :       TYPE(keyword_type), POINTER                        :: keyword
    2035              : 
    2036         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2037              :       CALL section_create(section, __LOCATION__, name="BUCK4RANGES", &
    2038              :                           description="This section specifies the input parameters for the Buckingham 4-ranges"// &
    2039              :                           " potential type."//newline// &
    2040              :                           "| Range | Functional Form |"//newline// &
    2041              :                           "| ----- | --------------- |"//newline// &
    2042              :                           "| $ r < r_1 $ | $ V(r) = A\exp(-Br) $ |"//newline// &
    2043              :                           "| $ r_1 \leq r < r_2 $ | $ V(r) = \sum_n \operatorname{POLY1}(n)r_n $ |"//newline// &
    2044              :                           "| $ r_2 \leq r < r_3 $ | $ V(r) = \sum_n \operatorname{POLY2}(n)r_n $ |"//newline// &
    2045              :                           "| $ r \geq r_3 $ | $ V(r) = -C/r_6 $ |"//newline, &
    2046         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2047              : 
    2048         1462 :       NULLIFY (keyword)
    2049              : 
    2050              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2051              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2052              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2053         1462 :                           n_var=2)
    2054         1462 :       CALL section_add_keyword(section, keyword)
    2055         1462 :       CALL keyword_release(keyword)
    2056              : 
    2057              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2058              :                           description="Defines the A parameter of the Buckingham potential", &
    2059              :                           usage="A {real}", type_of_var=real_t, &
    2060         1462 :                           n_var=1, unit_str="K_e")
    2061         1462 :       CALL section_add_keyword(section, keyword)
    2062         1462 :       CALL keyword_release(keyword)
    2063              : 
    2064              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2065              :                           description="Defines the B parameter of the Buckingham potential", &
    2066              :                           usage="B {real}", type_of_var=real_t, &
    2067         1462 :                           n_var=1, unit_str="angstrom^-1")
    2068         1462 :       CALL section_add_keyword(section, keyword)
    2069         1462 :       CALL keyword_release(keyword)
    2070              : 
    2071              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2072              :                           description="Defines the C parameter of the Buckingham  potential", &
    2073              :                           usage="C {real}", type_of_var=real_t, &
    2074         1462 :                           n_var=1, unit_str="K_e*angstrom^6")
    2075         1462 :       CALL section_add_keyword(section, keyword)
    2076         1462 :       CALL keyword_release(keyword)
    2077              : 
    2078              :       CALL keyword_create(keyword, __LOCATION__, name="R1", &
    2079              :                           description="Defines the upper bound of the first range ", &
    2080              :                           usage="R1 {real}", type_of_var=real_t, &
    2081         1462 :                           n_var=1, unit_str="angstrom")
    2082         1462 :       CALL section_add_keyword(section, keyword)
    2083         1462 :       CALL keyword_release(keyword)
    2084              : 
    2085              :       CALL keyword_create(keyword, __LOCATION__, name="R2", &
    2086              :                           description="Defines the upper bound of the second range ", &
    2087              :                           usage="R2 {real}", type_of_var=real_t, &
    2088         1462 :                           n_var=1, unit_str="angstrom")
    2089         1462 :       CALL section_add_keyword(section, keyword)
    2090         1462 :       CALL keyword_release(keyword)
    2091              : 
    2092              :       CALL keyword_create(keyword, __LOCATION__, name="R3", &
    2093              :                           description="Defines the upper bound of the third range ", &
    2094              :                           usage="R3 {real}", type_of_var=real_t, &
    2095         1462 :                           n_var=1, unit_str="angstrom")
    2096         1462 :       CALL section_add_keyword(section, keyword)
    2097         1462 :       CALL keyword_release(keyword)
    2098              : 
    2099              :       CALL keyword_create(keyword, __LOCATION__, name="POLY1", &
    2100              :                           description="Coefficients of the polynomial used in the second range "// &
    2101              :                           "This keyword can be repeated several times.", &
    2102              :                           usage="POLY1 C1 C2 C3 ..", &
    2103         1462 :                           n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.TRUE.)
    2104         1462 :       CALL section_add_keyword(section, keyword)
    2105         1462 :       CALL keyword_release(keyword)
    2106              : 
    2107              :       CALL keyword_create(keyword, __LOCATION__, name="POLY2", &
    2108              :                           description="Coefficients of the polynomial used in the third range "// &
    2109              :                           "This keyword can be repeated several times.", &
    2110              :                           usage="POLY2 C1 C2 C3 ..", &
    2111         1462 :                           n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.TRUE.)
    2112         1462 :       CALL section_add_keyword(section, keyword)
    2113         1462 :       CALL keyword_release(keyword)
    2114              : 
    2115              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2116              :                           description="Defines the cutoff parameter of the Buckingham potential", &
    2117              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    2118              :                                                                              unit_str="angstrom"), &
    2119         1462 :                           unit_str="angstrom")
    2120         1462 :       CALL section_add_keyword(section, keyword)
    2121         1462 :       CALL keyword_release(keyword)
    2122              : 
    2123              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    2124              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    2125              :                           " full range generate by the spline", usage="RMIN {real}", &
    2126         1462 :                           type_of_var=real_t, unit_str="angstrom")
    2127         1462 :       CALL section_add_keyword(section, keyword)
    2128         1462 :       CALL keyword_release(keyword)
    2129              : 
    2130              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    2131              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    2132              :                           " full range generate by the spline", usage="RMAX {real}", &
    2133         1462 :                           type_of_var=real_t, unit_str="angstrom")
    2134         1462 :       CALL section_add_keyword(section, keyword)
    2135         1462 :       CALL keyword_release(keyword)
    2136              : 
    2137         1462 :    END SUBROUTINE create_Buck4r_section
    2138              : 
    2139              : ! **************************************************************************************************
    2140              : !> \brief This section specifies the input parameters for Buckingham + Morse potential type
    2141              : !> \param section the section to create
    2142              : !> \author MI
    2143              : ! **************************************************************************************************
    2144         1462 :    SUBROUTINE create_Buckmorse_section(section)
    2145              :       TYPE(section_type), POINTER                        :: section
    2146              : 
    2147              :       TYPE(keyword_type), POINTER                        :: keyword
    2148              : 
    2149         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2150              :       CALL section_create( &
    2151              :          section, __LOCATION__, name="BUCKMORSE", &
    2152              :          description="This section specifies the input parameters for"// &
    2153              :          " Buckingham plus Morse potential type"// &
    2154              :          " Functional Form: V(r) = F0*(B1+B2)*EXP([A1+A2-r]/[B1+B2])-C/r^6+D*{EXP[-2*beta*(r-R0)]-2*EXP[-beta*(r-R0)]}.", &
    2155         2924 :          citations=[Yamada2000], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2156              : 
    2157         1462 :       NULLIFY (keyword)
    2158              : 
    2159              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2160              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2161              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2162         1462 :                           n_var=2)
    2163         1462 :       CALL section_add_keyword(section, keyword)
    2164         1462 :       CALL keyword_release(keyword)
    2165              : 
    2166              :       CALL keyword_create(keyword, __LOCATION__, name="F0", &
    2167              :                           description="Defines the f0 parameter of Buckingham+Morse potential", &
    2168              :                           usage="F0 {real}", type_of_var=real_t, &
    2169         1462 :                           n_var=1, unit_str="K_e*angstrom^-1")
    2170         1462 :       CALL section_add_keyword(section, keyword)
    2171         1462 :       CALL keyword_release(keyword)
    2172              : 
    2173              :       CALL keyword_create(keyword, __LOCATION__, name="A1", &
    2174              :                           description="Defines the A1 parameter of Buckingham+Morse potential", &
    2175              :                           usage="A1 {real}", type_of_var=real_t, &
    2176         1462 :                           n_var=1, unit_str="angstrom")
    2177         1462 :       CALL section_add_keyword(section, keyword)
    2178         1462 :       CALL keyword_release(keyword)
    2179              : 
    2180              :       CALL keyword_create(keyword, __LOCATION__, name="A2", &
    2181              :                           description="Defines the A2 parameter of Buckingham+Morse potential", &
    2182              :                           usage="A2 {real}", type_of_var=real_t, &
    2183         1462 :                           n_var=1, unit_str="angstrom")
    2184         1462 :       CALL section_add_keyword(section, keyword)
    2185         1462 :       CALL keyword_release(keyword)
    2186              : 
    2187              :       CALL keyword_create(keyword, __LOCATION__, name="B1", &
    2188              :                           description="Defines the B1 parameter of Buckingham+Morse potential", &
    2189              :                           usage="B1 {real}", type_of_var=real_t, &
    2190         1462 :                           n_var=1, unit_str="angstrom")
    2191         1462 :       CALL section_add_keyword(section, keyword)
    2192         1462 :       CALL keyword_release(keyword)
    2193              : 
    2194              :       CALL keyword_create(keyword, __LOCATION__, name="B2", &
    2195              :                           description="Defines the B2 parameter of Buckingham+Morse potential", &
    2196              :                           usage="B2 {real}", type_of_var=real_t, &
    2197         1462 :                           n_var=1, unit_str="angstrom")
    2198         1462 :       CALL section_add_keyword(section, keyword)
    2199         1462 :       CALL keyword_release(keyword)
    2200              : 
    2201              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2202              :                           description="Defines the C parameter of Buckingham+Morse  potential", &
    2203              :                           usage="C {real}", type_of_var=real_t, &
    2204         1462 :                           n_var=1, unit_str="K_e*angstrom^6")
    2205         1462 :       CALL section_add_keyword(section, keyword)
    2206         1462 :       CALL keyword_release(keyword)
    2207              : 
    2208              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    2209              :                           description="Defines the amplitude for the Morse part ", &
    2210              :                           usage="D {real}", type_of_var=real_t, &
    2211         1462 :                           n_var=1, unit_str="K_e")
    2212         1462 :       CALL section_add_keyword(section, keyword)
    2213         1462 :       CALL keyword_release(keyword)
    2214              : 
    2215              :       CALL keyword_create(keyword, __LOCATION__, name="R0", &
    2216              :                           description="Defines the equilibrium distance for the Morse part ", &
    2217              :                           usage="R0 {real}", type_of_var=real_t, &
    2218         1462 :                           n_var=1, unit_str="angstrom")
    2219         1462 :       CALL section_add_keyword(section, keyword)
    2220         1462 :       CALL keyword_release(keyword)
    2221              : 
    2222              :       CALL keyword_create(keyword, __LOCATION__, name="Beta", &
    2223              :                           description="Defines the width for the Morse part ", &
    2224              :                           usage="Beta {real}", type_of_var=real_t, &
    2225         1462 :                           n_var=1, unit_str="angstrom^-1")
    2226         1462 :       CALL section_add_keyword(section, keyword)
    2227         1462 :       CALL keyword_release(keyword)
    2228              : 
    2229              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2230              :                           description="Defines the cutoff parameter of the Buckingham potential", &
    2231              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    2232              :                                                                              unit_str="angstrom"), &
    2233         1462 :                           unit_str="angstrom")
    2234         1462 :       CALL section_add_keyword(section, keyword)
    2235         1462 :       CALL keyword_release(keyword)
    2236              : 
    2237              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    2238              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    2239              :                           " full range generate by the spline", usage="RMIN {real}", &
    2240         1462 :                           type_of_var=real_t, unit_str="angstrom")
    2241         1462 :       CALL section_add_keyword(section, keyword)
    2242         1462 :       CALL keyword_release(keyword)
    2243              : 
    2244              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    2245              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    2246              :                           " full range generate by the spline", usage="RMAX {real}", &
    2247         1462 :                           type_of_var=real_t, unit_str="angstrom")
    2248         1462 :       CALL section_add_keyword(section, keyword)
    2249         1462 :       CALL keyword_release(keyword)
    2250              : 
    2251         1462 :    END SUBROUTINE create_Buckmorse_section
    2252              : 
    2253              : ! **************************************************************************************************
    2254              : !> \brief This section specifies the input parameters for Tersoff potential type
    2255              : !>      (Tersoff, J. PRB 39(8), 5566, 1989)
    2256              : !> \param section ...
    2257              : ! **************************************************************************************************
    2258         1462 :    SUBROUTINE create_Tersoff_section(section)
    2259              :       TYPE(section_type), POINTER                        :: section
    2260              : 
    2261              :       TYPE(keyword_type), POINTER                        :: keyword
    2262              : 
    2263         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2264              :       CALL section_create(section, __LOCATION__, name="TERSOFF", &
    2265              :                           description="This section specifies the input parameters for Tersoff potential type.", &
    2266         2924 :                           citations=[Tersoff1988], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2267              : 
    2268         1462 :       NULLIFY (keyword)
    2269              : 
    2270              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2271              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2272              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2273         1462 :                           n_var=2)
    2274         1462 :       CALL section_add_keyword(section, keyword)
    2275         1462 :       CALL keyword_release(keyword)
    2276              : 
    2277              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2278              :                           description="Defines the A parameter of Tersoff potential", &
    2279              :                           usage="A {real}", type_of_var=real_t, &
    2280              :                           default_r_val=cp_unit_to_cp2k(value=1.8308E3_dp, &
    2281              :                                                         unit_str="eV"), &
    2282         1462 :                           n_var=1, unit_str="eV")
    2283         1462 :       CALL section_add_keyword(section, keyword)
    2284         1462 :       CALL keyword_release(keyword)
    2285              : 
    2286              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2287              :                           description="Defines the B parameter of Tersoff potential", &
    2288              :                           usage="B {real}", type_of_var=real_t, &
    2289              :                           default_r_val=cp_unit_to_cp2k(value=4.7118E2_dp, &
    2290              :                                                         unit_str="eV"), &
    2291         1462 :                           n_var=1, unit_str="eV")
    2292         1462 :       CALL section_add_keyword(section, keyword)
    2293         1462 :       CALL keyword_release(keyword)
    2294              : 
    2295              :       CALL keyword_create(keyword, __LOCATION__, name="lambda1", &
    2296              :                           description="Defines the lambda1 parameter of Tersoff potential", &
    2297              :                           usage="lambda1 {real}", type_of_var=real_t, &
    2298              :                           default_r_val=cp_unit_to_cp2k(value=2.4799_dp, &
    2299              :                                                         unit_str="angstrom^-1"), &
    2300         1462 :                           n_var=1, unit_str="angstrom^-1")
    2301         1462 :       CALL section_add_keyword(section, keyword)
    2302         1462 :       CALL keyword_release(keyword)
    2303              : 
    2304              :       CALL keyword_create(keyword, __LOCATION__, name="lambda2", &
    2305              :                           description="Defines the lambda2 parameter of Tersoff potential", &
    2306              :                           usage="lambda2 {real}", type_of_var=real_t, &
    2307              :                           default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
    2308              :                                                         unit_str="angstrom^-1"), &
    2309         1462 :                           n_var=1, unit_str="angstrom^-1")
    2310         1462 :       CALL section_add_keyword(section, keyword)
    2311         1462 :       CALL keyword_release(keyword)
    2312              : 
    2313              :       CALL keyword_create(keyword, __LOCATION__, name="alpha", &
    2314              :                           description="Defines the alpha parameter of Tersoff potential", &
    2315              :                           usage="alpha {real}", type_of_var=real_t, &
    2316              :                           default_r_val=0.0_dp, &
    2317         1462 :                           n_var=1)
    2318         1462 :       CALL section_add_keyword(section, keyword)
    2319         1462 :       CALL keyword_release(keyword)
    2320              : 
    2321              :       CALL keyword_create(keyword, __LOCATION__, name="beta", &
    2322              :                           description="Defines the beta parameter of Tersoff potential", &
    2323              :                           usage="beta {real}", type_of_var=real_t, &
    2324              :                           default_r_val=1.0999E-6_dp, &
    2325         1462 :                           n_var=1, unit_str="")
    2326         1462 :       CALL section_add_keyword(section, keyword)
    2327         1462 :       CALL keyword_release(keyword)
    2328              : 
    2329              :       CALL keyword_create(keyword, __LOCATION__, name="n", &
    2330              :                           description="Defines the n parameter of Tersoff potential", &
    2331              :                           usage="n {real}", type_of_var=real_t, &
    2332              :                           default_r_val=7.8734E-1_dp, &
    2333         1462 :                           n_var=1, unit_str="")
    2334         1462 :       CALL section_add_keyword(section, keyword)
    2335         1462 :       CALL keyword_release(keyword)
    2336              : 
    2337              :       CALL keyword_create(keyword, __LOCATION__, name="c", &
    2338              :                           description="Defines the c parameter of Tersoff potential", &
    2339              :                           usage="c {real}", type_of_var=real_t, &
    2340              :                           default_r_val=1.0039E5_dp, &
    2341         1462 :                           n_var=1, unit_str="")
    2342         1462 :       CALL section_add_keyword(section, keyword)
    2343         1462 :       CALL keyword_release(keyword)
    2344              : 
    2345              :       CALL keyword_create(keyword, __LOCATION__, name="d", &
    2346              :                           description="Defines the d parameter of Tersoff potential", &
    2347              :                           usage="d {real}", type_of_var=real_t, &
    2348              :                           default_r_val=1.6218E1_dp, &
    2349         1462 :                           n_var=1, unit_str="")
    2350         1462 :       CALL section_add_keyword(section, keyword)
    2351         1462 :       CALL keyword_release(keyword)
    2352              : 
    2353              :       CALL keyword_create(keyword, __LOCATION__, name="h", &
    2354              :                           description="Defines the h parameter of Tersoff potential", &
    2355              :                           usage="h {real}", type_of_var=real_t, &
    2356              :                           default_r_val=-5.9826E-1_dp, &
    2357         1462 :                           n_var=1, unit_str="")
    2358         1462 :       CALL section_add_keyword(section, keyword)
    2359         1462 :       CALL keyword_release(keyword)
    2360              : 
    2361              :       CALL keyword_create(keyword, __LOCATION__, name="lambda3", &
    2362              :                           description="Defines the lambda3 parameter of Tersoff potential", &
    2363              :                           usage="lambda3 {real}", type_of_var=real_t, &
    2364              :                           default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
    2365              :                                                         unit_str="angstrom^-1"), &
    2366         1462 :                           n_var=1, unit_str="angstrom^-1")
    2367         1462 :       CALL section_add_keyword(section, keyword)
    2368         1462 :       CALL keyword_release(keyword)
    2369              : 
    2370              :       CALL keyword_create(keyword, __LOCATION__, name="bigR", &
    2371              :                           description="Defines the bigR parameter of Tersoff potential", &
    2372              :                           usage="bigR {real}", type_of_var=real_t, &
    2373              :                           default_r_val=cp_unit_to_cp2k(value=2.85_dp, &
    2374              :                                                         unit_str="angstrom"), &
    2375         1462 :                           n_var=1, unit_str="angstrom")
    2376         1462 :       CALL section_add_keyword(section, keyword)
    2377         1462 :       CALL keyword_release(keyword)
    2378              : 
    2379              :       CALL keyword_create(keyword, __LOCATION__, name="bigD", &
    2380              :                           description="Defines the D parameter of Tersoff potential", &
    2381              :                           usage="bigD {real}", type_of_var=real_t, &
    2382              :                           default_r_val=cp_unit_to_cp2k(value=0.15_dp, &
    2383              :                                                         unit_str="angstrom"), &
    2384         1462 :                           n_var=1, unit_str="angstrom")
    2385         1462 :       CALL section_add_keyword(section, keyword)
    2386         1462 :       CALL keyword_release(keyword)
    2387              : 
    2388              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2389              :                           description="Defines the cutoff parameter of the tersoff potential."// &
    2390              :                           " This parameter is in principle already defined by the values of"// &
    2391              :                           " bigD and bigR. But it is necessary to define it when using the tersoff"// &
    2392              :                           " in conjunction with other potentials (for the same atomic pair) in order to have"// &
    2393              :                           " the same consistent definition of RCUT for all potentials.", &
    2394              :                           usage="RCUT {real}", type_of_var=real_t, &
    2395         1462 :                           n_var=1, unit_str="angstrom")
    2396         1462 :       CALL section_add_keyword(section, keyword)
    2397         1462 :       CALL keyword_release(keyword)
    2398              : 
    2399         1462 :    END SUBROUTINE create_Tersoff_section
    2400              : 
    2401              : ! **************************************************************************************************
    2402              : !> \brief This section specifies the input parameters for Siepmann-Sprik
    2403              : !>        potential type
    2404              : !>      (Siepmann and Sprik, J. Chem. Phys. 102(1) 511, 1995)
    2405              : !> \param section ...
    2406              : ! **************************************************************************************************
    2407         1462 :    SUBROUTINE create_Siepmann_section(section)
    2408              :       TYPE(section_type), POINTER                        :: section
    2409              : 
    2410              :       TYPE(keyword_type), POINTER                        :: keyword
    2411              : 
    2412         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2413              :       CALL section_create(section, __LOCATION__, name="SIEPMANN", &
    2414              :                           description="This section specifies the input parameters for the"// &
    2415              :                           " Siepmann-Sprik potential type. Consists of 4 terms:"// &
    2416              :                           " T1+T2+T3+T4. The terms T1=A/rij^alpha and T2=-C/rij^6"// &
    2417              :                           " have to be given via the GENPOT section. The terms T3+T4"// &
    2418              :                           " are obtained from the SIEPMANN section. The Siepmann-Sprik"// &
    2419              :                           " potential is designed for water-metal chemisorption.", &
    2420         2924 :                           citations=[Siepmann1995], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2421              : 
    2422         1462 :       NULLIFY (keyword)
    2423              : 
    2424              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2425              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2426              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2427         1462 :                           n_var=2)
    2428         1462 :       CALL section_add_keyword(section, keyword)
    2429         1462 :       CALL keyword_release(keyword)
    2430              : 
    2431              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2432              :                           description="Defines the B parameter of Siepmann potential", &
    2433              :                           usage="B {real}", type_of_var=real_t, &
    2434              :                           default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
    2435              :                                                         unit_str="angstrom"), &
    2436         1462 :                           n_var=1, unit_str="angstrom")
    2437         1462 :       CALL section_add_keyword(section, keyword)
    2438         1462 :       CALL keyword_release(keyword)
    2439              : 
    2440              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    2441              :                           description="Defines the D parameter of Siepmann potential", &
    2442              :                           usage="D {real}", type_of_var=real_t, &
    2443              :                           default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
    2444              :                                                         unit_str="internal_cp2k"), &
    2445         1462 :                           n_var=1, unit_str="internal_cp2k")
    2446         1462 :       CALL section_add_keyword(section, keyword)
    2447         1462 :       CALL keyword_release(keyword)
    2448              : 
    2449              :       CALL keyword_create(keyword, __LOCATION__, name="E", &
    2450              :                           description="Defines the E parameter of Siepmann potential", &
    2451              :                           usage="E {real}", type_of_var=real_t, &
    2452              :                           default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
    2453              :                                                         unit_str="internal_cp2k"), &
    2454         1462 :                           n_var=1, unit_str="internal_cp2k")
    2455         1462 :       CALL section_add_keyword(section, keyword)
    2456         1462 :       CALL keyword_release(keyword)
    2457              : 
    2458              :       CALL keyword_create(keyword, __LOCATION__, name="F", &
    2459              :                           description="Defines the F parameter of Siepmann potential", &
    2460              :                           usage="F {real}", type_of_var=real_t, &
    2461         1462 :                           default_r_val=13.3_dp, n_var=1)
    2462         1462 :       CALL section_add_keyword(section, keyword)
    2463         1462 :       CALL keyword_release(keyword)
    2464              : !
    2465              :       CALL keyword_create(keyword, __LOCATION__, name="beta", &
    2466              :                           description="Defines the beta parameter of Siepmann potential", &
    2467              :                           usage="beta {real}", type_of_var=real_t, &
    2468         1462 :                           default_r_val=10.0_dp, n_var=1)
    2469         1462 :       CALL section_add_keyword(section, keyword)
    2470         1462 :       CALL keyword_release(keyword)
    2471              : !
    2472              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2473              :                           description="Defines the cutoff parameter of Siepmann potential", &
    2474              :                           usage="RCUT {real}", type_of_var=real_t, &
    2475              :                           default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
    2476              :                                                         unit_str="angstrom"), &
    2477         1462 :                           n_var=1, unit_str="angstrom")
    2478         1462 :       CALL section_add_keyword(section, keyword)
    2479         1462 :       CALL keyword_release(keyword)
    2480              : !
    2481              :       CALL keyword_create(keyword, __LOCATION__, name="ALLOW_OH_FORMATION", &
    2482              :                           description=" The Siepmann-Sprik potential is actually designed for intact"// &
    2483              :                           " water molecules only. If water is treated at the QM level,"// &
    2484              :                           " water molecules can potentially dissociate, i.e."// &
    2485              :                           " some O-H bonds might be stretched leading temporarily"// &
    2486              :                           " to the formation of OH- ions. This keyword allows the"// &
    2487              :                           " the formation of such ions. The T3 term (dipole term)"// &
    2488              :                           " is then switched off for evaluating the interaction"// &
    2489              :                           " between the OH- ion and the metal.", &
    2490              :                           usage="ALLOW_OH_FORMATION TRUE", &
    2491         1462 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2492         1462 :       CALL section_add_keyword(section, keyword)
    2493         1462 :       CALL keyword_release(keyword)
    2494              : 
    2495              :       CALL keyword_create(keyword, __LOCATION__, name="ALLOW_H3O_FORMATION", &
    2496              :                           description=" The Siepmann-Sprik potential is designed for intact water"// &
    2497              :                           " molecules only. If water is treated at the QM level"// &
    2498              :                           " and an acid is present, hydronium ions might occur."// &
    2499              :                           " This keyword allows the formation of hydronium ions."// &
    2500              :                           " The T3 term (dipole term) is switched off for evaluating"// &
    2501              :                           " the interaction between hydronium and the metal.", &
    2502              :                           usage="ALLOW_H3O_FORMATION TRUE", &
    2503         1462 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2504         1462 :       CALL section_add_keyword(section, keyword)
    2505         1462 :       CALL keyword_release(keyword)
    2506              : 
    2507              :       CALL keyword_create(keyword, __LOCATION__, name="ALLOW_O_FORMATION", &
    2508              :                           description=" The Siepmann-Sprik potential is actually designed for intact"// &
    2509              :                           " water molecules only. If water is treated at the QM level,"// &
    2510              :                           " water molecules can potentially dissociate, i.e."// &
    2511              :                           " some O-H bonds might be stretched leading temporarily"// &
    2512              :                           " to the formation of O^2- ions. This keyword allows the"// &
    2513              :                           " the formation of such ions. The T3 term (dipole term)"// &
    2514              :                           " is then switched off for evaluating the interaction"// &
    2515              :                           " between the O^2- ion and the metal.", &
    2516              :                           usage="ALLOW_O_FORMATION .TRUE.", &
    2517         1462 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2518         1462 :       CALL section_add_keyword(section, keyword)
    2519         1462 :       CALL keyword_release(keyword)
    2520              : 
    2521         1462 :    END SUBROUTINE create_Siepmann_section
    2522              : 
    2523              : ! **************************************************************************************************
    2524              : !> \brief This section specifies the input parameters for GAL19
    2525              : !>        potential type
    2526              : !>      (??)
    2527              : !> \param section ...
    2528              : ! **************************************************************************************************
    2529         1462 :    SUBROUTINE create_Gal_section(section)
    2530              :       TYPE(section_type), POINTER                        :: section
    2531              : 
    2532              :       TYPE(keyword_type), POINTER                        :: keyword
    2533              :       TYPE(section_type), POINTER                        :: subsection
    2534              : 
    2535         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2536              :       CALL section_create(section, __LOCATION__, name="GAL19", &
    2537              :                           description="Implementation of the GAL19 forcefield, see associated paper", &
    2538         2924 :                           citations=[Clabaut2020], n_keywords=1, n_subsections=1, repeats=.TRUE.)
    2539              : 
    2540         1462 :       NULLIFY (keyword, subsection)
    2541              : 
    2542              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2543              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2544              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2545         1462 :                           n_var=2)
    2546         1462 :       CALL section_add_keyword(section, keyword)
    2547         1462 :       CALL keyword_release(keyword)
    2548              : 
    2549              :       CALL keyword_create(keyword, __LOCATION__, name="METALS", &
    2550              :                           description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
    2551              :                           usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
    2552         1462 :                           n_var=2)
    2553         1462 :       CALL section_add_keyword(section, keyword)
    2554         1462 :       CALL keyword_release(keyword)
    2555              : 
    2556              :       CALL keyword_create(keyword, __LOCATION__, name="epsilon", &
    2557              :                           description="Defines the epsilon_a parameter of GAL19 potential", &
    2558              :                           usage="epsilon {real}", type_of_var=real_t, &
    2559              :                           default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
    2560              :                                                         unit_str="kcalmol"), &
    2561         1462 :                           n_var=1, unit_str="kcalmol")
    2562         1462 :       CALL section_add_keyword(section, keyword)
    2563         1462 :       CALL keyword_release(keyword)
    2564              : 
    2565              :       CALL keyword_create(keyword, __LOCATION__, name="bxy", &
    2566              :                           description="Defines the b perpendicular parameter of GAL19 potential", &
    2567              :                           usage="bxy {real}", type_of_var=real_t, &
    2568              :                           default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
    2569              :                                                         unit_str="internal_cp2k"), &
    2570         1462 :                           n_var=1, unit_str="angstrom^-2")
    2571         1462 :       CALL section_add_keyword(section, keyword)
    2572         1462 :       CALL keyword_release(keyword)
    2573              : 
    2574              :       CALL keyword_create(keyword, __LOCATION__, name="bz", &
    2575              :                           description="Defines the b parallel parameter of GAL19 potential", &
    2576              :                           usage="bz {real}", type_of_var=real_t, &
    2577              :                           default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
    2578              :                                                         unit_str="internal_cp2k"), &
    2579         1462 :                           n_var=1, unit_str="angstrom^-2")
    2580         1462 :       CALL section_add_keyword(section, keyword)
    2581         1462 :       CALL keyword_release(keyword)
    2582              : 
    2583              :       CALL keyword_create(keyword, __LOCATION__, name="r", &
    2584              :                           description="Defines the R_0 parameters of GAL19 potential for the two METALS. "// &
    2585              :                           "This is the only parameter that is shared between the two section of the "// &
    2586              :                           "forcefield in the case of two metals (alloy). "// &
    2587              :                           "If one metal only is present, a second number should be given but won't be read", &
    2588         1462 :                           usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
    2589         1462 :       CALL section_add_keyword(section, keyword)
    2590         1462 :       CALL keyword_release(keyword)
    2591              : 
    2592              :       CALL keyword_create(keyword, __LOCATION__, name="a1", &
    2593              :                           description="Defines the a1 parameter of GAL19 potential", &
    2594              :                           usage="a1 {real}", type_of_var=real_t, &
    2595         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2596         1462 :       CALL section_add_keyword(section, keyword)
    2597         1462 :       CALL keyword_release(keyword)
    2598              : 
    2599              :       CALL keyword_create(keyword, __LOCATION__, name="a2", &
    2600              :                           description="Defines the a2 parameter of GAL19 potential", &
    2601              :                           usage="a2 {real}", type_of_var=real_t, &
    2602         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2603         1462 :       CALL section_add_keyword(section, keyword)
    2604         1462 :       CALL keyword_release(keyword)
    2605              : 
    2606              :       CALL keyword_create(keyword, __LOCATION__, name="a3", &
    2607              :                           description="Defines the a3 parameter of GAL19 potential", &
    2608              :                           usage="a3 {real}", type_of_var=real_t, &
    2609         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2610         1462 :       CALL section_add_keyword(section, keyword)
    2611         1462 :       CALL keyword_release(keyword)
    2612              : 
    2613              :       CALL keyword_create(keyword, __LOCATION__, name="a4", &
    2614              :                           description="Defines the a4 parameter of GAL19 potential", &
    2615              :                           usage="a4 {real}", type_of_var=real_t, &
    2616         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2617         1462 :       CALL section_add_keyword(section, keyword)
    2618         1462 :       CALL keyword_release(keyword)
    2619              : 
    2620              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2621              :                           description="Defines the A parameter of GAL19 potential", &
    2622              :                           usage="A {real}", type_of_var=real_t, &
    2623         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2624         1462 :       CALL section_add_keyword(section, keyword)
    2625         1462 :       CALL keyword_release(keyword)
    2626              : 
    2627              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2628              :                           description="Defines the B parameter of GAL19 potential", &
    2629              :                           usage="B {real}", type_of_var=real_t, &
    2630         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="angstrom^-1")
    2631         1462 :       CALL section_add_keyword(section, keyword)
    2632         1462 :       CALL keyword_release(keyword)
    2633              : 
    2634              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2635              :                           description="Defines the C parameter of GAL19 potential", &
    2636              :                           usage="C {real}", type_of_var=real_t, &
    2637         1462 :                           default_r_val=10.0_dp, n_var=1, unit_str="angstrom^6*kcalmol")
    2638         1462 :       CALL section_add_keyword(section, keyword)
    2639         1462 :       CALL keyword_release(keyword)
    2640              : 
    2641              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2642              :                           description="Defines the cutoff parameter of GAL19 potential", &
    2643              :                           usage="RCUT {real}", type_of_var=real_t, &
    2644              :                           default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
    2645              :                                                         unit_str="angstrom"), &
    2646         1462 :                           n_var=1, unit_str="angstrom")
    2647         1462 :       CALL section_add_keyword(section, keyword)
    2648         1462 :       CALL keyword_release(keyword)
    2649              :       CALL keyword_create(keyword, __LOCATION__, name="Fit_express", &
    2650              :                           description="Demands the particular output needed to a least square fit", &
    2651              :                           usage="Fit_express TRUE", &
    2652         1462 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2653         1462 :       CALL section_add_keyword(section, keyword)
    2654         1462 :       CALL keyword_release(keyword)
    2655         1462 :       CALL create_GCN_section(subsection)
    2656         1462 :       CALL section_add_subsection(section, subsection)
    2657         1462 :       CALL section_release(subsection)
    2658              : 
    2659         1462 :    END SUBROUTINE create_Gal_section
    2660              : 
    2661              : ! **************************************************************************************************
    2662              : !> \brief This section specifies the input parameters for GAL21
    2663              : !>        potential type
    2664              : !>      (??)
    2665              : !> \param section ...
    2666              : ! **************************************************************************************************
    2667         1462 :    SUBROUTINE create_Gal21_section(section)
    2668              :       TYPE(section_type), POINTER                        :: section
    2669              : 
    2670              :       TYPE(keyword_type), POINTER                        :: keyword
    2671              :       TYPE(section_type), POINTER                        :: subsection
    2672              : 
    2673         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2674              :       CALL section_create(section, __LOCATION__, name="GAL21", &
    2675              :                           description="Implementation of the GAL21 forcefield, see associated paper", &
    2676         2924 :                           citations=[Clabaut2021], n_keywords=1, n_subsections=1, repeats=.TRUE.)
    2677              : 
    2678         1462 :       NULLIFY (keyword, subsection)
    2679              : 
    2680              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2681              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2682              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2683         1462 :                           n_var=2)
    2684         1462 :       CALL section_add_keyword(section, keyword)
    2685         1462 :       CALL keyword_release(keyword)
    2686              : 
    2687              :       CALL keyword_create(keyword, __LOCATION__, name="METALS", &
    2688              :                           description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
    2689              :                           usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
    2690         1462 :                           n_var=2)
    2691         1462 :       CALL section_add_keyword(section, keyword)
    2692         1462 :       CALL keyword_release(keyword)
    2693              : 
    2694              :       CALL keyword_create(keyword, __LOCATION__, name="epsilon", &
    2695              :                           description="Defines the epsilon parameter of GAL21 potential", &
    2696              :                           usage="epsilon {real} {real} {real}", type_of_var=real_t, &
    2697         1462 :                           n_var=3, unit_str="kcalmol")
    2698         1462 :       CALL section_add_keyword(section, keyword)
    2699         1462 :       CALL keyword_release(keyword)
    2700              : 
    2701              :       CALL keyword_create(keyword, __LOCATION__, name="bxy", &
    2702              :                           description="Defines the b perpendicular parameter of GAL21 potential", &
    2703              :                           usage="bxy {real} {real}", type_of_var=real_t, &
    2704         1462 :                           n_var=2, unit_str="angstrom^-2")
    2705         1462 :       CALL section_add_keyword(section, keyword)
    2706         1462 :       CALL keyword_release(keyword)
    2707              : 
    2708              :       CALL keyword_create(keyword, __LOCATION__, name="bz", &
    2709              :                           description="Defines the b parallel parameter of GAL21 potential", &
    2710              :                           usage="bz {real} {real}", type_of_var=real_t, &
    2711         1462 :                           n_var=2, unit_str="angstrom^-2")
    2712         1462 :       CALL section_add_keyword(section, keyword)
    2713         1462 :       CALL keyword_release(keyword)
    2714              : 
    2715              :       CALL keyword_create(keyword, __LOCATION__, name="r", &
    2716              :                           description="Defines the R_0 parameters of GAL21 potential for the two METALS. "// &
    2717              :                           "This is the only parameter that is shared between the two section of "// &
    2718              :                           "the forcefield in the case of two metals (alloy). "// &
    2719              :                           "If one metal only is present, a second number should be given but won't be read", &
    2720         1462 :                           usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
    2721         1462 :       CALL section_add_keyword(section, keyword)
    2722         1462 :       CALL keyword_release(keyword)
    2723              : 
    2724              :       CALL keyword_create(keyword, __LOCATION__, name="a1", &
    2725              :                           description="Defines the a1 parameter of GAL21 potential", &
    2726              :                           usage="a1 {real} {real} {real}", type_of_var=real_t, &
    2727         1462 :                           n_var=3, unit_str="kcalmol")
    2728         1462 :       CALL section_add_keyword(section, keyword)
    2729         1462 :       CALL keyword_release(keyword)
    2730              : 
    2731              :       CALL keyword_create(keyword, __LOCATION__, name="a2", &
    2732              :                           description="Defines the a2 parameter of GAL21 potential", &
    2733              :                           usage="a2 {real} {real} {real}", type_of_var=real_t, &
    2734         1462 :                           n_var=3, unit_str="kcalmol")
    2735         1462 :       CALL section_add_keyword(section, keyword)
    2736         1462 :       CALL keyword_release(keyword)
    2737              : 
    2738              :       CALL keyword_create(keyword, __LOCATION__, name="a3", &
    2739              :                           description="Defines the a3 parameter of GAL21 potential", &
    2740              :                           usage="a3 {real} {real} {real}", type_of_var=real_t, &
    2741         1462 :                           n_var=3, unit_str="kcalmol")
    2742         1462 :       CALL section_add_keyword(section, keyword)
    2743         1462 :       CALL keyword_release(keyword)
    2744              : 
    2745              :       CALL keyword_create(keyword, __LOCATION__, name="a4", &
    2746              :                           description="Defines the a4 parameter of GAL21 potential", &
    2747              :                           usage="a4 {real} {real} {real}", type_of_var=real_t, &
    2748         1462 :                           n_var=3, unit_str="kcalmol")
    2749         1462 :       CALL section_add_keyword(section, keyword)
    2750         1462 :       CALL keyword_release(keyword)
    2751              : 
    2752              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2753              :                           description="Defines the A parameter of GAL21 potential", &
    2754              :                           usage="A {real} {real}", type_of_var=real_t, &
    2755         1462 :                           n_var=2, unit_str="kcalmol")
    2756         1462 :       CALL section_add_keyword(section, keyword)
    2757         1462 :       CALL keyword_release(keyword)
    2758              : 
    2759              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2760              :                           description="Defines the B parameter of GAL21 potential", &
    2761              :                           usage="B {real} {real}", type_of_var=real_t, &
    2762         1462 :                           n_var=2, unit_str="angstrom^-1")
    2763         1462 :       CALL section_add_keyword(section, keyword)
    2764         1462 :       CALL keyword_release(keyword)
    2765              : 
    2766              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2767              :                           description="Defines the C parameter of GAL21 potential", &
    2768              :                           usage="C {real}", type_of_var=real_t, &
    2769         1462 :                           n_var=1, unit_str="angstrom^6*kcalmol")
    2770         1462 :       CALL section_add_keyword(section, keyword)
    2771         1462 :       CALL keyword_release(keyword)
    2772              : 
    2773              :       CALL keyword_create(keyword, __LOCATION__, name="AH", &
    2774              :                           description="Defines the AH parameter of GAL21 potential", &
    2775              :                           usage="AH {real} {real}", type_of_var=real_t, &
    2776         1462 :                           n_var=2, unit_str="kcalmol")
    2777         1462 :       CALL section_add_keyword(section, keyword)
    2778         1462 :       CALL keyword_release(keyword)
    2779              : 
    2780              :       CALL keyword_create(keyword, __LOCATION__, name="BH", &
    2781              :                           description="Defines the BH parameter of GAL21 potential", &
    2782              :                           usage="BH {real} {real}", type_of_var=real_t, &
    2783         1462 :                           n_var=2, unit_str="angstrom^-1")
    2784         1462 :       CALL section_add_keyword(section, keyword)
    2785         1462 :       CALL keyword_release(keyword)
    2786              : 
    2787              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2788              :                           description="Defines the cutoff parameter of GAL21 potential", &
    2789              :                           usage="RCUT {real}", type_of_var=real_t, &
    2790              :                           default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
    2791              :                                                         unit_str="angstrom"), &
    2792         1462 :                           n_var=1, unit_str="angstrom")
    2793         1462 :       CALL section_add_keyword(section, keyword)
    2794         1462 :       CALL keyword_release(keyword)
    2795              : 
    2796              :       CALL keyword_create(keyword, __LOCATION__, name="Fit_express", &
    2797              :                           description="Demands the particular output needed to a least square fit", &
    2798              :                           usage="Fit_express TRUE", &
    2799         1462 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2800         1462 :       CALL section_add_keyword(section, keyword)
    2801         1462 :       CALL keyword_release(keyword)
    2802              : 
    2803         1462 :       CALL create_GCN_section(subsection)
    2804         1462 :       CALL section_add_subsection(section, subsection)
    2805         1462 :       CALL section_release(subsection)
    2806              : 
    2807         1462 :    END SUBROUTINE create_Gal21_section
    2808              : 
    2809              : ! **************************************************************************************************
    2810              : !> \brief This section specifies the input parameters for TABPOT  potential type
    2811              : !> \param section the section to create
    2812              : !> \author teo, Alex Mironenko, Da Teng
    2813              : ! **************************************************************************************************
    2814         1462 :    SUBROUTINE create_TABPOT_section(section)
    2815              : 
    2816              :       TYPE(section_type), POINTER                        :: section
    2817              : 
    2818              :       TYPE(keyword_type), POINTER                        :: keyword
    2819              : 
    2820         1462 :       CPASSERT(.NOT. ASSOCIATED(section))
    2821              : 
    2822              :       CALL section_create(section, __LOCATION__, name="TABPOT", &
    2823              :                           description="This section specifies the input parameters for TABPOT potential type.", &
    2824         1462 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2825              : 
    2826         1462 :       NULLIFY (keyword)
    2827              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2828              :                           description="Defines the atomic kind involved", &
    2829              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2830         1462 :                           n_var=2)
    2831         1462 :       CALL section_add_keyword(section, keyword)
    2832         1462 :       CALL keyword_release(keyword)
    2833              : 
    2834              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
    2835              :                           variants=["PARMFILE"], &
    2836              :                           description="Specifies the filename that contains the tabulated NONBONDED potential. "// &
    2837              :                           "File structure: the third line of the potential file contains a title. "// &
    2838              :                           "The 4th line contains: 'N', number of data points, 'R', lower bound of distance, distance cutoff. "// &
    2839              :                           "Follow "// &
    2840              :                           "in order npoints lines for index, distance [A], energy [kcal/mol], and force [kcal/mol/A]", &
    2841         2924 :                           usage="PARM_FILE_NAME {FILENAME}", default_lc_val="")
    2842         1462 :       CALL section_add_keyword(section, keyword)
    2843         1462 :       CALL keyword_release(keyword)
    2844              : 
    2845         1462 :    END SUBROUTINE create_TABPOT_section
    2846              : 
    2847              : ! **************************************************************************************************
    2848              : !> \brief This section specifies the input parameters for the subsection GCN of GAL19 and GAL21
    2849              : !>        potential type
    2850              : !>      (??)
    2851              : !> \param section ...
    2852              : ! **************************************************************************************************
    2853         2924 :    SUBROUTINE create_GCN_section(section)
    2854              :       TYPE(section_type), POINTER                        :: section
    2855              : 
    2856              :       TYPE(keyword_type), POINTER                        :: keyword
    2857              : 
    2858         2924 :       CPASSERT(.NOT. ASSOCIATED(section))
    2859              :       CALL section_create(section, __LOCATION__, name="GCN", &
    2860              :                           description="Allow to specify the generalized coordination number of the atoms. "// &
    2861              :                           "Those numbers msust be generated by another program ", &
    2862         2924 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    2863              : 
    2864         2924 :       NULLIFY (keyword)
    2865              :       CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
    2866              :                           description="Value of the GCN for the individual atom. Order MUST reflect"// &
    2867              :                           " the one specified for the geometry.", repeats=.TRUE., usage="{Real}", &
    2868         2924 :                           default_r_val=0.0_dp, type_of_var=real_t)
    2869         2924 :       CALL section_add_keyword(section, keyword)
    2870         2924 :       CALL keyword_release(keyword)
    2871              : 
    2872         2924 :    END SUBROUTINE create_GCN_section
    2873              : 
    2874              : ! **************************************************************************************************
    2875              : !> \brief creates the input section for the qs part
    2876              : !> \param print_key ...
    2877              : !> \param label ...
    2878              : !> \param print_level ...
    2879              : !> \author teo
    2880              : ! **************************************************************************************************
    2881        16366 :    SUBROUTINE create_dipoles_section(print_key, label, print_level)
    2882              :       TYPE(section_type), POINTER                        :: print_key
    2883              :       CHARACTER(LEN=*), INTENT(IN)                       :: label
    2884              :       INTEGER, INTENT(IN)                                :: print_level
    2885              : 
    2886              :       TYPE(keyword_type), POINTER                        :: keyword
    2887              : 
    2888        16366 :       CPASSERT(.NOT. ASSOCIATED(print_key))
    2889              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name=TRIM(label), &
    2890              :                                        description="Section controlling the calculation of "//TRIM(label)//"."// &
    2891              :                                        " Note that the result in the periodic case might be defined modulo a certain period,"// &
    2892              :                                        " determined by the lattice vectors. During MD, this can lead to jumps.", &
    2893        16366 :                                        print_level=print_level, filename="__STD_OUT__")
    2894              : 
    2895        16366 :       NULLIFY (keyword)
    2896              :       CALL keyword_create(keyword, __LOCATION__, &
    2897              :                           name="PERIODIC", &
    2898              :                           description="Use Berry phase formula (PERIODIC=T) or simple operator (PERIODIC=F). "// &
    2899              :                           "For the simple dipole operator, only components perpendicular to the periodic "// &
    2900              :                           "lattice vectors are well-defined. All components are well-defined for CELL PERIODIC NONE.", &
    2901              :                           usage="PERIODIC {logical}", &
    2902              :                           repeats=.FALSE., &
    2903              :                           n_var=1, &
    2904        16366 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
    2905        16366 :       CALL section_add_keyword(print_key, keyword)
    2906        16366 :       CALL keyword_release(keyword)
    2907              : 
    2908              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE", &
    2909              :                           variants=s2a("REF"), &
    2910              :                           description="Define the reference point for the calculation of the electrostatic moment.", &
    2911              :                           usage="REFERENCE COM", &
    2912              :                           enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
    2913              :                           enum_desc=s2a("Use Center of Mass", &
    2914              :                                         "Use Center of Atomic Charges", &
    2915              :                                         "Use User Defined Point (Keyword:REF_POINT)", &
    2916              :                                         "Use Origin of Coordinate System"), &
    2917              :                           enum_i_vals=[use_mom_ref_com, &
    2918              :                                        use_mom_ref_coac, &
    2919              :                                        use_mom_ref_user, &
    2920              :                                        use_mom_ref_zero], &
    2921        16366 :                           default_i_val=use_mom_ref_zero)
    2922        16366 :       CALL section_add_keyword(print_key, keyword)
    2923        16366 :       CALL keyword_release(keyword)
    2924              : 
    2925              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT", &
    2926              :                           variants=s2a("REF_POINT"), &
    2927              :                           description="Fixed reference point for the calculations of the electrostatic moment.", &
    2928              :                           usage="REFERENCE_POINT x y z", &
    2929              :                           repeats=.FALSE., &
    2930              :                           n_var=3, default_r_vals=[0._dp, 0._dp, 0._dp], &
    2931              :                           type_of_var=real_t, &
    2932        16366 :                           unit_str='bohr')
    2933        16366 :       CALL section_add_keyword(print_key, keyword)
    2934        16366 :       CALL keyword_release(keyword)
    2935        16366 :    END SUBROUTINE create_dipoles_section
    2936              : 
    2937              : END MODULE input_cp2k_mm
        

Generated by: LCOV version 2.0-1