LCOV - code coverage report
Current view: top level - src - input_cp2k_mm.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:70636b1) Lines: 100.0 % 1058 1058
Test Date: 2026-02-11 07:00:35 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              :         Batzner2022, Bochkarev2024, Clabaut2020, Clabaut2021, Devynck2012, Dick1958, Drautz2019, &
      19              :         Foiles1986, Lysogorskiy2021, Mitchell1993, Musaelian2023, Siepmann1995, Tersoff1988, &
      20              :         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 fparser,                         ONLY: docf
      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         9514 :    SUBROUTINE create_mm_section(section)
      77              :       TYPE(section_type), POINTER                        :: section
      78              : 
      79              :       TYPE(section_type), POINTER                        :: subsection
      80              : 
      81         9514 :       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         9514 :                           n_keywords=5, n_subsections=0, repeats=.FALSE.)
      85              : 
      86         9514 :       NULLIFY (subsection)
      87              : 
      88         9514 :       CALL create_forcefield_section(subsection)
      89         9514 :       CALL section_add_subsection(section, subsection)
      90         9514 :       CALL section_release(subsection)
      91              : 
      92         9514 :       CALL create_neighbor_lists_section(subsection)
      93         9514 :       CALL section_add_subsection(section, subsection)
      94         9514 :       CALL section_release(subsection)
      95              : 
      96         9514 :       CALL create_poisson_section(subsection)
      97         9514 :       CALL section_add_subsection(section, subsection)
      98         9514 :       CALL section_release(subsection)
      99              : 
     100         9514 :       CALL create_per_efield_section(subsection)
     101         9514 :       CALL section_add_subsection(section, subsection)
     102         9514 :       CALL section_release(subsection)
     103              : 
     104         9514 :       CALL create_print_mm_section(subsection)
     105         9514 :       CALL section_add_subsection(section, subsection)
     106         9514 :       CALL section_release(subsection)
     107              : 
     108         9514 :    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         9514 :    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         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
     122              :       CALL section_create(section, __LOCATION__, name="print", &
     123              :                           description="Section of possible print options in MM code.", &
     124         9514 :                           n_keywords=0, n_subsections=1, repeats=.FALSE.)
     125              : 
     126         9514 :       NULLIFY (print_key, keyword)
     127              : 
     128              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "DERIVATIVES", &
     129              :                                        description="Controls the printing of derivatives.", &
     130         9514 :                                        print_level=high_print_level, filename="__STD_OUT__")
     131         9514 :       CALL section_add_subsection(section, print_key)
     132         9514 :       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         9514 :                                        print_level=high_print_level, filename="__STD_OUT__")
     138         9514 :       CALL section_add_subsection(section, print_key)
     139         9514 :       CALL section_release(print_key)
     140              : 
     141         9514 :       CALL create_dipoles_section(print_key, "DIPOLE", medium_print_level)
     142         9514 :       CALL section_add_subsection(section, print_key)
     143         9514 :       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         9514 :                                        print_level=high_print_level, filename="", unit_str="angstrom")
     148         9514 :       CALL section_add_subsection(section, print_key)
     149         9514 :       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         9514 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     155         9514 :       CALL section_add_subsection(section, print_key)
     156         9514 :       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         9514 :                                        print_level=high_print_level, filename="__STD_OUT__")
     162         9514 :       CALL section_add_subsection(section, print_key)
     163         9514 :       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         9514 :                                        print_level=silent_print_level, filename="__STD_OUT__")
     168         9514 :       CALL section_add_subsection(section, print_key)
     169         9514 :       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         9514 :                                        print_level=low_print_level, filename="__STD_OUT__")
     174         9514 :       CALL section_add_subsection(section, print_key)
     175         9514 :       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         9514 :                                        print_level=debug_print_level + 1, filename="", common_iter_levels=2)
     180         9514 :       CALL section_add_subsection(section, print_key)
     181         9514 :       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         9514 :                                        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         9514 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     191         9514 :       CALL section_add_keyword(print_key, keyword)
     192         9514 :       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         9514 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     198         9514 :       CALL section_add_keyword(print_key, keyword)
     199         9514 :       CALL keyword_release(keyword)
     200              : 
     201         9514 :       CALL section_add_subsection(section, print_key)
     202         9514 :       CALL section_release(print_key)
     203              : 
     204         9514 :    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         9514 :    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         9514 :       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         9514 :                           n_keywords=2, n_subsections=2, repeats=.FALSE.)
     223              : 
     224         9514 :       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         9514 :          default_i_val=do_ff_undef)
     242         9514 :       CALL section_add_keyword(section, keyword)
     243         9514 :       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         9514 :                           usage="PARM_FILE_NAME {FILENAME}", type_of_var=lchar_t)
     248         9514 :       CALL section_add_keyword(section, keyword)
     249         9514 :       CALL keyword_release(keyword)
     250              : 
     251              :       CALL keyword_create(keyword, __LOCATION__, name="VDW_SCALE14", &
     252              :                           description="Scaling factor for the VDW 1-4 ", &
     253         9514 :                           usage="VDW_SCALE14 1.0", default_r_val=1.0_dp)
     254         9514 :       CALL section_add_keyword(section, keyword)
     255         9514 :       CALL keyword_release(keyword)
     256              : 
     257              :       CALL keyword_create(keyword, __LOCATION__, name="EI_SCALE14", &
     258              :                           description="Scaling factor for the electrostatics 1-4 ", &
     259         9514 :                           usage="EI_SCALE14 1.0", default_r_val=0.0_dp)
     260         9514 :       CALL section_add_keyword(section, keyword)
     261         9514 :       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         9514 :                           usage="SHIFT_CUTOFF <LOGICAL>", default_l_val=.TRUE.)
     270         9514 :       CALL section_add_keyword(section, keyword)
     271         9514 :       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         9514 :                           usage="DO_NONBONDED T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     281         9514 :       CALL section_add_keyword(section, keyword)
     282         9514 :       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         9514 :                           usage="DO_ELECTROSTATICS T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     289         9514 :       CALL section_add_keyword(section, keyword)
     290         9514 :       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         9514 :                           lone_keyword_l_val=.TRUE.)
     298         9514 :       CALL section_add_keyword(section, keyword)
     299         9514 :       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         9514 :                           usage="MULTIPLE_POTENTIAL T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     305         9514 :       CALL section_add_keyword(section, keyword)
     306         9514 :       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         9514 :                           usage="ZBL_SCATTERING T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     312         9514 :       CALL section_add_keyword(section, keyword)
     313         9514 :       CALL keyword_release(keyword)
     314              : 
     315              :       !
     316              :       ! subsections
     317              :       !
     318         9514 :       CALL create_SPLINE_section(subsection)
     319         9514 :       CALL section_add_subsection(section, subsection)
     320         9514 :       CALL section_release(subsection)
     321              : 
     322         9514 :       CALL create_NONBONDED_section(subsection)
     323         9514 :       CALL section_add_subsection(section, subsection)
     324         9514 :       CALL section_release(subsection)
     325              : 
     326         9514 :       CALL create_NONBONDED14_section(subsection)
     327         9514 :       CALL section_add_subsection(section, subsection)
     328         9514 :       CALL section_release(subsection)
     329              : 
     330         9514 :       CALL create_CHARGE_section(subsection)
     331         9514 :       CALL section_add_subsection(section, subsection)
     332         9514 :       CALL section_release(subsection)
     333              : 
     334         9514 :       CALL create_CHARGES_section(subsection)
     335         9514 :       CALL section_add_subsection(section, subsection)
     336         9514 :       CALL section_release(subsection)
     337              : 
     338         9514 :       CALL create_SHELL_section(subsection)
     339         9514 :       CALL section_add_subsection(section, subsection)
     340         9514 :       CALL section_release(subsection)
     341              : 
     342         9514 :       CALL create_BOND_section(subsection, "BOND")
     343         9514 :       CALL section_add_subsection(section, subsection)
     344         9514 :       CALL section_release(subsection)
     345              : 
     346         9514 :       CALL create_BEND_section(subsection)
     347         9514 :       CALL section_add_subsection(section, subsection)
     348         9514 :       CALL section_release(subsection)
     349              : 
     350         9514 :       CALL create_TORSION_section(subsection)
     351         9514 :       CALL section_add_subsection(section, subsection)
     352         9514 :       CALL section_release(subsection)
     353              : 
     354         9514 :       CALL create_IMPROPER_section(subsection)
     355         9514 :       CALL section_add_subsection(section, subsection)
     356         9514 :       CALL section_release(subsection)
     357              : 
     358         9514 :       CALL create_OPBEND_section(subsection)
     359         9514 :       CALL section_add_subsection(section, subsection)
     360         9514 :       CALL section_release(subsection)
     361              : 
     362         9514 :       CALL create_DIPOLE_section(subsection)
     363         9514 :       CALL section_add_subsection(section, subsection)
     364         9514 :       CALL section_release(subsection)
     365              : 
     366         9514 :       CALL create_QUADRUPOLE_section(subsection)
     367         9514 :       CALL section_add_subsection(section, subsection)
     368         9514 :       CALL section_release(subsection)
     369              : 
     370         9514 :    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         9514 :    SUBROUTINE create_SPLINE_section(section)
     378              :       TYPE(section_type), POINTER                        :: section
     379              : 
     380              :       TYPE(keyword_type), POINTER                        :: keyword
     381              : 
     382         9514 :       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         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     387              : 
     388         9514 :       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         9514 :                           unit_str="angstrom")
     396         9514 :       CALL section_add_keyword(section, keyword)
     397         9514 :       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         9514 :                           unit_str="angstrom")
     405         9514 :       CALL section_add_keyword(section, keyword)
     406         9514 :       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         9514 :                           default_r_val=0.5_dp, unit_str="hartree")
     413         9514 :       CALL section_add_keyword(section, keyword)
     414         9514 :       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         9514 :                           usage="EMAX_ACCURACY <REAL>", default_r_val=0.02_dp, unit_str="hartree")
     421         9514 :       CALL section_add_keyword(section, keyword)
     422         9514 :       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         9514 :                           usage="EPS_SPLINE <REAL>", default_r_val=1.0E-7_dp, unit_str="hartree")
     429         9514 :       CALL section_add_keyword(section, keyword)
     430         9514 :       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         9514 :          usage="NPOINTS 1024", default_i_val=-1)
     436         9514 :       CALL section_add_keyword(section, keyword)
     437         9514 :       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         9514 :                           usage="UNIQUE_SPLINE <LOGICAL>", lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
     443         9514 :       CALL section_add_keyword(section, keyword)
     444         9514 :       CALL keyword_release(keyword)
     445              : 
     446         9514 :    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         9514 :    SUBROUTINE create_TORSION_section(section)
     454              :       TYPE(section_type), POINTER                        :: section
     455              : 
     456              :       TYPE(keyword_type), POINTER                        :: keyword
     457              : 
     458         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
     459              :       CALL section_create(section, __LOCATION__, name="TORSION", &
     460              :                           description="Specifies the torsion potential of the MM system.", &
     461         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     462              : 
     463         9514 :       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         9514 :                           n_var=4)
     468         9514 :       CALL section_add_keyword(section, keyword)
     469         9514 :       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         9514 :                           default_i_val=do_ff_charmm)
     486         9514 :       CALL section_add_keyword(section, keyword)
     487         9514 :       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         9514 :                           n_var=1, unit_str="hartree")
     493         9514 :       CALL section_add_keyword(section, keyword)
     494         9514 :       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         9514 :                           n_var=1, unit_str="rad", default_r_val=0.0_dp)
     500         9514 :       CALL section_add_keyword(section, keyword)
     501         9514 :       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         9514 :                           n_var=1)
     507         9514 :       CALL section_add_keyword(section, keyword)
     508         9514 :       CALL keyword_release(keyword)
     509              : 
     510         9514 :    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         9514 :    SUBROUTINE create_IMPROPER_section(section)
     518              :       TYPE(section_type), POINTER                        :: section
     519              : 
     520              :       TYPE(keyword_type), POINTER                        :: keyword
     521              : 
     522         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
     523              :       CALL section_create(section, __LOCATION__, name="IMPROPER", &
     524              :                           description="Specifies the improper torsion potential of the MM system.", &
     525         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     526              : 
     527         9514 :       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         9514 :                           n_var=4)
     532         9514 :       CALL section_add_keyword(section, keyword)
     533         9514 :       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         9514 :                           default_i_val=do_ff_charmm)
     548         9514 :       CALL section_add_keyword(section, keyword)
     549         9514 :       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         9514 :                           n_var=1, unit_str="hartree*rad^-2")
     555         9514 :       CALL section_add_keyword(section, keyword)
     556         9514 :       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         9514 :                           n_var=1, unit_str="rad")
     562         9514 :       CALL section_add_keyword(section, keyword)
     563         9514 :       CALL keyword_release(keyword)
     564              : 
     565         9514 :    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         9514 :    SUBROUTINE create_OPBEND_section(section)
     573              :       TYPE(section_type), POINTER                        :: section
     574              : 
     575              :       TYPE(keyword_type), POINTER                        :: keyword
     576              : 
     577         9514 :       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         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     583              : 
     584         9514 :       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         9514 :                           n_var=4)
     589         9514 :       CALL section_add_keyword(section, keyword)
     590         9514 :       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         9514 :                           default_i_val=do_ff_harmonic)
     605         9514 :       CALL section_add_keyword(section, keyword)
     606         9514 :       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         9514 :                           n_var=1, unit_str="hartree*rad^-2")
     612         9514 :       CALL section_add_keyword(section, keyword)
     613         9514 :       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         9514 :                           n_var=1, unit_str="rad")
     619         9514 :       CALL section_add_keyword(section, keyword)
     620         9514 :       CALL keyword_release(keyword)
     621              : 
     622         9514 :    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         9514 :    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         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
     636              :       CALL section_create(section, __LOCATION__, name="BEND", &
     637              :                           description="Specifies the bend potential of the MM system.", &
     638         9514 :                           n_keywords=11, n_subsections=1, repeats=.TRUE.)
     639              : 
     640         9514 :       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         9514 :                           n_var=3)
     646         9514 :       CALL section_add_keyword(section, keyword)
     647         9514 :       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         9514 :          default_i_val=do_ff_charmm)
     677         9514 :       CALL section_add_keyword(section, keyword)
     678         9514 :       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         9514 :                           n_var=1, unit_str="hartree*rad^-2")
     684         9514 :       CALL section_add_keyword(section, keyword)
     685         9514 :       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         9514 :                           n_var=1, unit_str="rad^-1")
     691         9514 :       CALL section_add_keyword(section, keyword)
     692         9514 :       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         9514 :                           n_var=1, unit_str="bohr")
     698         9514 :       CALL section_add_keyword(section, keyword)
     699         9514 :       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         9514 :                           n_var=1, unit_str="bohr")
     704         9514 :       CALL section_add_keyword(section, keyword)
     705         9514 :       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         9514 :                           n_var=1, unit_str="hartree*bohr^-1*rad^-1")
     710         9514 :       CALL section_add_keyword(section, keyword)
     711         9514 :       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         9514 :                           n_var=1, unit_str="hartree*bohr^-1*rad^-1")
     716         9514 :       CALL section_add_keyword(section, keyword)
     717         9514 :       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         9514 :                           n_var=1, unit_str="hartree*bohr^-2")
     722         9514 :       CALL section_add_keyword(section, keyword)
     723         9514 :       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         9514 :                           n_var=1, unit_str='rad')
     729         9514 :       CALL section_add_keyword(section, keyword)
     730         9514 :       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         9514 :                           n_var=-1, unit_str="hartree")
     739         9514 :       CALL section_add_keyword(section, keyword)
     740         9514 :       CALL keyword_release(keyword)
     741              : 
     742              :       ! Create the Urey-Bradley section
     743         9514 :       CALL create_BOND_section(subsection, "UB")
     744         9514 :       CALL section_add_subsection(section, subsection)
     745         9514 :       CALL section_release(subsection)
     746              : 
     747         9514 :    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        19028 :    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        19028 :       CPASSERT(.NOT. ASSOCIATED(section))
     763        19028 :       NULLIFY (keyword)
     764              : 
     765        19028 :       IF (TRIM(label) == "UB") THEN
     766         9514 :          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         9514 :                              n_keywords=1, n_subsections=0, repeats=.FALSE.)
     771              : 
     772              :       ELSE
     773         9514 :          tag = " Bond "
     774              :          CALL section_create(section, __LOCATION__, name=TRIM(label), &
     775              :                              description="Specifies the bond potential", &
     776         9514 :                              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         9514 :                              n_var=2)
     782         9514 :          CALL section_add_keyword(section, keyword)
     783         9514 :          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        19028 :                           default_i_val=do_ff_charmm)
     810        19028 :       CALL section_add_keyword(section, keyword)
     811        19028 :       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        19028 :                           n_var=-1, unit_str="internal_cp2k")
     819        19028 :       CALL section_add_keyword(section, keyword)
     820        19028 :       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        19028 :                           n_var=1, unit_str="bohr^-1")
     826        19028 :       CALL section_add_keyword(section, keyword)
     827        19028 :       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        19028 :                           n_var=1, unit_str="bohr")
     833        19028 :       CALL section_add_keyword(section, keyword)
     834        19028 :       CALL keyword_release(keyword)
     835              : 
     836        19028 :    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         9514 :    SUBROUTINE create_charges_section(section)
     844              :       TYPE(section_type), POINTER                        :: section
     845              : 
     846              :       TYPE(keyword_type), POINTER                        :: keyword
     847              : 
     848         9514 :       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         9514 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
     853              : 
     854         9514 :       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         9514 :                           type_of_var=real_t)
     859         9514 :       CALL section_add_keyword(section, keyword)
     860         9514 :       CALL keyword_release(keyword)
     861              : 
     862         9514 :    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        28542 :    SUBROUTINE create_charge_section(section)
     870              :       TYPE(section_type), POINTER                        :: section
     871              : 
     872              :       TYPE(keyword_type), POINTER                        :: keyword
     873              : 
     874        28542 :       CPASSERT(.NOT. ASSOCIATED(section))
     875              :       CALL section_create(section, __LOCATION__, name="charge", &
     876              :                           description="This section specifies the charge of the MM atoms", &
     877        28542 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
     878              : 
     879        28542 :       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        28542 :                           n_var=1)
     885        28542 :       CALL section_add_keyword(section, keyword)
     886        28542 :       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        28542 :                           n_var=1)
     892        28542 :       CALL section_add_keyword(section, keyword)
     893        28542 :       CALL keyword_release(keyword)
     894              : 
     895        28542 :    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         9514 :    SUBROUTINE create_quadrupole_section(section)
     903              :       TYPE(section_type), POINTER                        :: section
     904              : 
     905              :       TYPE(keyword_type), POINTER                        :: keyword
     906              : 
     907         9514 :       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         9514 :          n_keywords=1, n_subsections=0, repeats=.TRUE.)
     913              : 
     914         9514 :       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         9514 :                           n_var=1)
     920         9514 :       CALL section_add_keyword(section, keyword)
     921         9514 :       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         9514 :                           n_var=1, unit_str='internal_cp2k')
     927         9514 :       CALL section_add_keyword(section, keyword)
     928         9514 :       CALL keyword_release(keyword)
     929              : 
     930         9514 :    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         9514 :    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         9514 :       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         9514 :                           n_keywords=1, n_subsections=1, repeats=.TRUE.)
     948              : 
     949         9514 :       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         9514 :                           n_var=1)
     955         9514 :       CALL section_add_keyword(section, keyword)
     956         9514 :       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         9514 :                           n_var=1, unit_str='angstrom^3')
     962         9514 :       CALL section_add_keyword(section, keyword)
     963         9514 :       CALL keyword_release(keyword)
     964              : 
     965         9514 :       CALL create_DAMPING_section(subsection)
     966         9514 :       CALL section_add_subsection(section, subsection)
     967         9514 :       CALL section_release(subsection)
     968         9514 :    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         9514 :    SUBROUTINE create_damping_section(section)
     976              :       TYPE(section_type), POINTER                        :: section
     977              : 
     978              :       TYPE(keyword_type), POINTER                        :: keyword
     979              : 
     980         9514 :       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         9514 :                           n_keywords=4, n_subsections=0, repeats=.TRUE.)
     984              : 
     985         9514 :       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         9514 :                           n_var=1)
     991         9514 :       CALL section_add_keyword(section, keyword)
     992         9514 :       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         9514 :                           n_var=1, default_c_val="TANG-TOENNIES")
     998         9514 :       CALL section_add_keyword(section, keyword)
     999         9514 :       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         9514 :                           n_var=1, default_i_val=3)
    1005         9514 :       CALL section_add_keyword(section, keyword)
    1006         9514 :       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         9514 :                           n_var=1, unit_str='angstrom^-1')
    1012         9514 :       CALL section_add_keyword(section, keyword)
    1013         9514 :       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         9514 :                           n_var=1, unit_str='')
    1019         9514 :       CALL section_add_keyword(section, keyword)
    1020         9514 :       CALL keyword_release(keyword)
    1021              : 
    1022         9514 :    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         9514 :    SUBROUTINE create_shell_section(section)
    1030              :       TYPE(section_type), POINTER                        :: section
    1031              : 
    1032              :       TYPE(keyword_type), POINTER                        :: keyword
    1033              : 
    1034         9514 :       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        38056 :                           citations=[Dick1958, Mitchell1993, Devynck2012])
    1039              : 
    1040         9514 :       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         9514 :                           usage="H", default_c_val="DEFAULT")
    1045         9514 :       CALL section_add_keyword(section, keyword)
    1046         9514 :       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        19028 :                           default_r_val=0.0_dp)
    1053         9514 :       CALL section_add_keyword(section, keyword)
    1054         9514 :       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        19028 :                           default_r_val=0.0_dp)
    1061         9514 :       CALL section_add_keyword(section, keyword)
    1062         9514 :       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        19028 :                           default_r_val=0.1_dp)
    1069         9514 :       CALL section_add_keyword(section, keyword)
    1070         9514 :       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         9514 :                           unit_str="hartree*bohr^-2")
    1080         9514 :       CALL section_add_keyword(section, keyword)
    1081         9514 :       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         9514 :                           unit_str="hartree*bohr^-4")
    1092         9514 :       CALL section_add_keyword(section, keyword)
    1093         9514 :       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         9514 :                           unit_str="angstrom")
    1101         9514 :       CALL section_add_keyword(section, keyword)
    1102         9514 :       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         9514 :                           unit_str="angstrom")
    1111         9514 :       CALL section_add_keyword(section, keyword)
    1112         9514 :       CALL keyword_release(keyword)
    1113              : 
    1114         9514 :    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        19028 :    SUBROUTINE create_NONBONDED14_section(section)
    1123              :       TYPE(section_type), POINTER                        :: section
    1124              : 
    1125              :       TYPE(section_type), POINTER                        :: subsection
    1126              : 
    1127        19028 :       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        19028 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1131              : 
    1132        19028 :       NULLIFY (subsection)
    1133        19028 :       CALL create_LJ_section(subsection)
    1134        19028 :       CALL section_add_subsection(section, subsection)
    1135        19028 :       CALL section_release(subsection)
    1136              : 
    1137        19028 :       CALL create_Williams_section(subsection)
    1138        19028 :       CALL section_add_subsection(section, subsection)
    1139        19028 :       CALL section_release(subsection)
    1140              : 
    1141        19028 :       CALL create_Goodwin_section(subsection)
    1142        19028 :       CALL section_add_subsection(section, subsection)
    1143        19028 :       CALL section_release(subsection)
    1144              : 
    1145        19028 :       CALL create_GENPOT_section(subsection)
    1146        19028 :       CALL section_add_subsection(section, subsection)
    1147        19028 :       CALL section_release(subsection)
    1148              : 
    1149        19028 :    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         9514 :    SUBROUTINE create_NONBONDED_section(section)
    1158              :       TYPE(section_type), POINTER                        :: section
    1159              : 
    1160              :       TYPE(section_type), POINTER                        :: subsection
    1161              : 
    1162         9514 :       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         9514 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1166              : 
    1167         9514 :       NULLIFY (subsection)
    1168         9514 :       CALL create_LJ_section(subsection)
    1169         9514 :       CALL section_add_subsection(section, subsection)
    1170         9514 :       CALL section_release(subsection)
    1171              : 
    1172         9514 :       CALL create_Williams_section(subsection)
    1173         9514 :       CALL section_add_subsection(section, subsection)
    1174         9514 :       CALL section_release(subsection)
    1175              : 
    1176         9514 :       CALL create_EAM_section(subsection)
    1177         9514 :       CALL section_add_subsection(section, subsection)
    1178         9514 :       CALL section_release(subsection)
    1179              : 
    1180         9514 :       CALL create_NEQUIP_section(subsection)
    1181         9514 :       CALL section_add_subsection(section, subsection)
    1182         9514 :       CALL section_release(subsection)
    1183              : 
    1184         9514 :       CALL create_ALLEGRO_section(subsection)
    1185         9514 :       CALL section_add_subsection(section, subsection)
    1186         9514 :       CALL section_release(subsection)
    1187              : 
    1188         9514 :       CALL create_ACE_section(subsection)
    1189         9514 :       CALL section_add_subsection(section, subsection)
    1190         9514 :       CALL section_release(subsection)
    1191              : 
    1192         9514 :       CALL create_DEEPMD_section(subsection)
    1193         9514 :       CALL section_add_subsection(section, subsection)
    1194         9514 :       CALL section_release(subsection)
    1195              : 
    1196         9514 :       CALL create_Goodwin_section(subsection)
    1197         9514 :       CALL section_add_subsection(section, subsection)
    1198         9514 :       CALL section_release(subsection)
    1199              : 
    1200         9514 :       CALL create_IPBV_section(subsection)
    1201         9514 :       CALL section_add_subsection(section, subsection)
    1202         9514 :       CALL section_release(subsection)
    1203              : 
    1204         9514 :       CALL create_BMHFT_section(subsection)
    1205         9514 :       CALL section_add_subsection(section, subsection)
    1206         9514 :       CALL section_release(subsection)
    1207              : 
    1208         9514 :       CALL create_BMHFTD_section(subsection)
    1209         9514 :       CALL section_add_subsection(section, subsection)
    1210         9514 :       CALL section_release(subsection)
    1211              : 
    1212         9514 :       CALL create_Buck4r_section(subsection)
    1213         9514 :       CALL section_add_subsection(section, subsection)
    1214         9514 :       CALL section_release(subsection)
    1215              : 
    1216         9514 :       CALL create_Buckmorse_section(subsection)
    1217         9514 :       CALL section_add_subsection(section, subsection)
    1218         9514 :       CALL section_release(subsection)
    1219              : 
    1220         9514 :       CALL create_GENPOT_section(subsection)
    1221         9514 :       CALL section_add_subsection(section, subsection)
    1222         9514 :       CALL section_release(subsection)
    1223              : 
    1224         9514 :       CALL create_Tersoff_section(subsection)
    1225         9514 :       CALL section_add_subsection(section, subsection)
    1226         9514 :       CALL section_release(subsection)
    1227              : 
    1228         9514 :       CALL create_Siepmann_section(subsection)
    1229         9514 :       CALL section_add_subsection(section, subsection)
    1230         9514 :       CALL section_release(subsection)
    1231              : 
    1232         9514 :       CALL create_Gal_section(subsection)
    1233         9514 :       CALL section_add_subsection(section, subsection)
    1234         9514 :       CALL section_release(subsection)
    1235              : 
    1236         9514 :       CALL create_Gal21_section(subsection)
    1237         9514 :       CALL section_add_subsection(section, subsection)
    1238         9514 :       CALL section_release(subsection)
    1239              : 
    1240         9514 :       CALL create_TABPOT_section(subsection)
    1241         9514 :       CALL section_add_subsection(section, subsection)
    1242         9514 :       CALL section_release(subsection)
    1243              : 
    1244         9514 :    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        28558 :    SUBROUTINE create_neighbor_lists_section(section)
    1253              :       TYPE(section_type), POINTER                        :: section
    1254              : 
    1255              :       TYPE(keyword_type), POINTER                        :: keyword
    1256              : 
    1257        28558 :       NULLIFY (keyword)
    1258        28558 :       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        28558 :                           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        28558 :                           unit_str="angstrom")
    1269        28558 :       CALL section_add_keyword(section, keyword)
    1270        28558 :       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        28558 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    1276        28558 :       CALL section_add_keyword(section, keyword)
    1277        28558 :       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        28558 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
    1286        28558 :       CALL section_add_keyword(section, keyword)
    1287        28558 :       CALL keyword_release(keyword)
    1288              : 
    1289        28558 :    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        47586 :    SUBROUTINE create_GENPOT_section(section)
    1297              :       TYPE(section_type), POINTER                        :: section
    1298              : 
    1299              :       TYPE(keyword_type), POINTER                        :: keyword
    1300              : 
    1301        47586 :       CPASSERT(.NOT. ASSOCIATED(section))
    1302              :       CALL section_create(section, __LOCATION__, name="GENPOT", &
    1303              :                           description="This section specifies the input parameters for a generic potential type. "// &
    1304              :                           docf(), &
    1305        47586 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1306              : 
    1307        47586 :       NULLIFY (keyword)
    1308              : 
    1309              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1310              :                           description="Defines the atomic kind involved in the generic potential", &
    1311              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1312        47586 :                           n_var=2)
    1313        47586 :       CALL section_add_keyword(section, keyword)
    1314        47586 :       CALL keyword_release(keyword)
    1315              : 
    1316              :       CALL keyword_create(keyword, __LOCATION__, name="FUNCTION", &
    1317              :                           description="Specifies the functional form in mathematical notation.", &
    1318              :                           usage="FUNCTION a\*EXP(-b\*x^2)/x+D\*log10(x)", type_of_var=lchar_t, &
    1319        47586 :                           n_var=1)
    1320        47586 :       CALL section_add_keyword(section, keyword)
    1321        47586 :       CALL keyword_release(keyword)
    1322              : 
    1323              :       CALL keyword_create(keyword, __LOCATION__, name="VARIABLES", &
    1324              :                           description="Defines the variable of the functional form.", &
    1325              :                           usage="VARIABLES x", type_of_var=char_t, &
    1326        47586 :                           n_var=-1)
    1327        47586 :       CALL section_add_keyword(section, keyword)
    1328        47586 :       CALL keyword_release(keyword)
    1329              : 
    1330              :       CALL keyword_create(keyword, __LOCATION__, name="PARAMETERS", &
    1331              :                           description="Defines the parameters of the functional form", &
    1332              :                           usage="PARAMETERS a b D", type_of_var=char_t, &
    1333        47586 :                           n_var=-1, repeats=.TRUE.)
    1334        47586 :       CALL section_add_keyword(section, keyword)
    1335        47586 :       CALL keyword_release(keyword)
    1336              : 
    1337              :       CALL keyword_create(keyword, __LOCATION__, name="VALUES", &
    1338              :                           description="Defines the values of parameter of the functional form", &
    1339              :                           usage="VALUES ", type_of_var=real_t, &
    1340        47586 :                           n_var=-1, repeats=.TRUE., unit_str="internal_cp2k")
    1341        47586 :       CALL section_add_keyword(section, keyword)
    1342        47586 :       CALL keyword_release(keyword)
    1343              : 
    1344              :       CALL keyword_create(keyword, __LOCATION__, name="UNITS", &
    1345              :                           description="Optionally, allows to define valid CP2K unit strings for each parameter value. "// &
    1346              :                           "It is assumed that the corresponding parameter value is specified in this unit.", &
    1347              :                           usage="UNITS angstrom eV*angstrom^-1 angstrom^1 K", type_of_var=char_t, &
    1348        47586 :                           n_var=-1, repeats=.TRUE.)
    1349        47586 :       CALL section_add_keyword(section, keyword)
    1350        47586 :       CALL keyword_release(keyword)
    1351              : 
    1352              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1353              :                           description="Defines the cutoff parameter of the generic potential", &
    1354              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1355              :                                                                              unit_str="angstrom"), &
    1356        47586 :                           unit_str="angstrom")
    1357        47586 :       CALL section_add_keyword(section, keyword)
    1358        47586 :       CALL keyword_release(keyword)
    1359              : 
    1360              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1361              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1362              :                           " full range generate by the spline", usage="RMIN {real}", &
    1363        47586 :                           type_of_var=real_t, unit_str="angstrom")
    1364        47586 :       CALL section_add_keyword(section, keyword)
    1365        47586 :       CALL keyword_release(keyword)
    1366              : 
    1367              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1368              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1369              :                           " full range generate by the spline", usage="RMAX {real}", &
    1370        47586 :                           type_of_var=real_t, unit_str="angstrom")
    1371        47586 :       CALL section_add_keyword(section, keyword)
    1372        47586 :       CALL keyword_release(keyword)
    1373              : 
    1374        47586 :    END SUBROUTINE create_GENPOT_section
    1375              : 
    1376              : ! **************************************************************************************************
    1377              : !> \brief This section specifies the input parameters for EAM  potential type
    1378              : !> \param section the section to create
    1379              : !> \author teo
    1380              : ! **************************************************************************************************
    1381         9514 :    SUBROUTINE create_EAM_section(section)
    1382              :       TYPE(section_type), POINTER                        :: section
    1383              : 
    1384              :       TYPE(keyword_type), POINTER                        :: keyword
    1385              : 
    1386         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    1387              :       CALL section_create(section, __LOCATION__, name="EAM", &
    1388              :                           description="This section specifies the input parameters for EAM potential type.", &
    1389        19028 :                           citations=[Foiles1986], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1390              : 
    1391         9514 :       NULLIFY (keyword)
    1392              : 
    1393              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1394              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1395              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1396         9514 :                           n_var=2)
    1397         9514 :       CALL section_add_keyword(section, keyword)
    1398         9514 :       CALL keyword_release(keyword)
    1399              : 
    1400              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
    1401              :                           variants=["PARMFILE"], &
    1402              :                           description="Specifies the filename that contains the tabulated EAM potential. "// &
    1403              :                           "File structure: the first line of the potential file contains a title. "// &
    1404              :                           "The second line contains: atomic number, mass and lattice constant. "// &
    1405              :                           "These information are parsed but not used in CP2K. The third line contains: "// &
    1406              :                           "dr: increment of r for the tabulated values of density and phi (assuming r starts in 0) [angstrom]; "// &
    1407              :                           "drho: increment of density for the tabulated values of the embedding function (assuming rho starts "// &
    1408              :                           "in 0) [au_c]; cutoff: cutoff of the EAM potential; npoints: number of points in tabulated. Follow "// &
    1409              :                           "in order npoints lines for rho [au_c] and its derivative [au_c*angstrom^-1]; npoints lines for "// &
    1410              :                           "PHI [ev] and its derivative [ev*angstrom^-1] and npoint lines for the embedded function [ev] "// &
    1411              :                           "and its derivative [ev*au_c^-1].", &
    1412        19028 :                           usage="PARM_FILE_NAME {FILENAME}", default_lc_val=" ")
    1413         9514 :       CALL section_add_keyword(section, keyword)
    1414         9514 :       CALL keyword_release(keyword)
    1415              : 
    1416         9514 :    END SUBROUTINE create_EAM_section
    1417              : 
    1418              : ! **************************************************************************************************
    1419              : !> \brief This section specifies the input parameters for NEQUIP  potential type
    1420              : !> \param section the section to create
    1421              : !> \author teo
    1422              : ! **************************************************************************************************
    1423         9514 :    SUBROUTINE create_NEQUIP_section(section)
    1424              :       TYPE(section_type), POINTER                        :: section
    1425              : 
    1426              :       TYPE(keyword_type), POINTER                        :: keyword
    1427              : 
    1428         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    1429              :       CALL section_create(section, __LOCATION__, name="NEQUIP", &
    1430              :                           description="This section specifies the input parameters for NEQUIP potential type "// &
    1431              :                           "based on equivariant neural networks with message passing. Starting from the NequIP 0.6.0, "// &
    1432              :                           "one can predict stress if the config.yaml file has the StressForceOutput keyword, "// &
    1433              :                           "regardless of whether the model has been trained on the stress. "// &
    1434              :                           "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
    1435        19028 :                           citations=[Batzner2022], n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1436              : 
    1437         9514 :       NULLIFY (keyword)
    1438              : 
    1439              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1440              :                           description="Defines the atomic kinds involved in the NEQUIP potential. "// &
    1441              :                           "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
    1442              :                           "to NequIP atom types is correct. This mapping should also be consistent for the "// &
    1443              :                           "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
    1444              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1445         9514 :                           n_var=-1)
    1446         9514 :       CALL section_add_keyword(section, keyword)
    1447         9514 :       CALL keyword_release(keyword)
    1448              : 
    1449              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
    1450              :                           variants=["PARMFILE"], &
    1451              :                           description="Specifies the filename that contains the NEQUIP model.", &
    1452        19028 :                           usage="PARM_FILE_NAME {FILENAME}", default_lc_val="model.pth")
    1453         9514 :       CALL section_add_keyword(section, keyword)
    1454         9514 :       CALL keyword_release(keyword)
    1455              : 
    1456              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_COORDS", &
    1457              :                           description="Units of coordinates in the NEQUIP model.pth file. "// &
    1458              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1459              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1460         9514 :                           usage="UNIT_COORDS angstrom", default_c_val="angstrom")
    1461         9514 :       CALL section_add_keyword(section, keyword)
    1462         9514 :       CALL keyword_release(keyword)
    1463              : 
    1464              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_ENERGY", &
    1465              :                           description="Units of energy in the NEQUIP model.pth file. "// &
    1466              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1467              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1468         9514 :                           usage="UNIT_ENERGY hartree", default_c_val="eV")
    1469         9514 :       CALL section_add_keyword(section, keyword)
    1470         9514 :       CALL keyword_release(keyword)
    1471              : 
    1472              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_FORCES", &
    1473              :                           description="Units of the forces in the NEQUIP model.pth file. "// &
    1474              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1475              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1476         9514 :                           usage="UNIT_FORCES hartree/bohr", default_c_val="eV/Angstrom")
    1477         9514 :       CALL section_add_keyword(section, keyword)
    1478         9514 :       CALL keyword_release(keyword)
    1479              : 
    1480              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_CELL", &
    1481              :                           description="Units of the cell vectors in the NEQUIP model.pth file. "// &
    1482              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1483              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1484         9514 :                           usage="UNIT_CELL angstrom", default_c_val="angstrom")
    1485         9514 :       CALL section_add_keyword(section, keyword)
    1486         9514 :       CALL keyword_release(keyword)
    1487              : 
    1488         9514 :    END SUBROUTINE create_NEQUIP_section
    1489              : 
    1490              : ! **************************************************************************************************
    1491              : !> \brief This section specifies the input parameters for ALLEGRO  potential type
    1492              : !> \param section the section to create
    1493              : !> \author teo
    1494              : ! **************************************************************************************************
    1495         9514 :    SUBROUTINE create_ALLEGRO_section(section)
    1496              :       TYPE(section_type), POINTER                        :: section
    1497              : 
    1498              :       TYPE(keyword_type), POINTER                        :: keyword
    1499              : 
    1500         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    1501              :       CALL section_create(section, __LOCATION__, name="ALLEGRO", &
    1502              :                           description="This section specifies the input parameters for ALLEGRO potential type "// &
    1503              :                           "based on equivariant neural network potentials. Starting from the NequIP 0.6.0, "// &
    1504              :                           "one can predict stress if the config.yaml file has the StressForceOutput keyword, "// &
    1505              :                           "regardless of whether the model has been trained on the stress. "// &
    1506              :                           "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
    1507        19028 :                           citations=[Musaelian2023], n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1508              : 
    1509         9514 :       NULLIFY (keyword)
    1510              : 
    1511              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1512              :                           description="Defines the atomic kinds involved in the ALLEGRO potential. "// &
    1513              :                           "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
    1514              :                           "to NequIP atom types is correct. This mapping should also be consistent for the "// &
    1515              :                           "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
    1516              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1517         9514 :                           n_var=-1)
    1518         9514 :       CALL section_add_keyword(section, keyword)
    1519         9514 :       CALL keyword_release(keyword)
    1520              : 
    1521              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
    1522              :                           variants=["PARMFILE"], &
    1523              :                           description="Specifies the filename that contains the ALLEGRO model.", &
    1524        19028 :                           usage="PARM_FILE_NAME {FILENAME}", default_lc_val="model.pth")
    1525         9514 :       CALL section_add_keyword(section, keyword)
    1526         9514 :       CALL keyword_release(keyword)
    1527              : 
    1528              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_COORDS", &
    1529              :                           description="Units of coordinates in the ALLEGRO model.pth file. "// &
    1530              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1531              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1532         9514 :                           usage="UNIT_COORDS angstrom", default_c_val="angstrom")
    1533         9514 :       CALL section_add_keyword(section, keyword)
    1534         9514 :       CALL keyword_release(keyword)
    1535              : 
    1536              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_ENERGY", &
    1537              :                           description="Units of energy in the ALLEGRO model.pth file. "// &
    1538              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1539              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1540         9514 :                           usage="UNIT_ENERGY hartree", default_c_val="eV")
    1541         9514 :       CALL section_add_keyword(section, keyword)
    1542         9514 :       CALL keyword_release(keyword)
    1543              : 
    1544              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_FORCES", &
    1545              :                           description="Units of the forces in the ALLEGRO model.pth file. "// &
    1546              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1547              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1548         9514 :                           usage="UNIT_FORCES hartree/bohr", default_c_val="eV/Angstrom")
    1549         9514 :       CALL section_add_keyword(section, keyword)
    1550         9514 :       CALL keyword_release(keyword)
    1551              : 
    1552              :       CALL keyword_create(keyword, __LOCATION__, name="UNIT_CELL", &
    1553              :                           description="Units of the cell vectors in the ALLEGRO model.pth file. "// &
    1554              :                           "The units of positions, energies and forces must be self-consistent: "// &
    1555              :                           "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
    1556         9514 :                           usage="UNIT_CELL angstrom", default_c_val="angstrom")
    1557         9514 :       CALL section_add_keyword(section, keyword)
    1558         9514 :       CALL keyword_release(keyword)
    1559              : 
    1560         9514 :    END SUBROUTINE create_ALLEGRO_section
    1561              : 
    1562              : ! **************************************************************************************************
    1563              : !> \brief This section specifies the input parameters for ACE potential type
    1564              : !> \param section the section to create
    1565              : !> \author
    1566              : ! **************************************************************************************************
    1567         9514 :    SUBROUTINE create_ACE_section(section)
    1568              :       TYPE(section_type), POINTER                        :: section
    1569              : 
    1570              :       TYPE(keyword_type), POINTER                        :: keyword
    1571              : 
    1572              :       CALL section_create(section, __LOCATION__, name="ACE", &
    1573              :                           description="This section specifies the input parameters for Atomic Cluster Expansion type. "// &
    1574              :                           "Mainly intended for accurate representation of "// &
    1575              :                           "potential energy surfaces. "// &
    1576              :                           "Requires linking with ACE library from "// &
    1577              :                           "<a href=""https://github.com/ICAMS/lammps-user-pace"" "// &
    1578              :                           "target=""_blank"">https://github.com/ICAMS/lammps-user-pace</a> .", &
    1579              :                           citations=[Drautz2019, Lysogorskiy2021, Bochkarev2024], &
    1580        38056 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1581         9514 :       NULLIFY (keyword)
    1582              : 
    1583              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1584              :                           description="Defines the atomic species. "// &
    1585              :                           "Provide a list of each element, "// &
    1586              :                           "making sure that the mapping from the ATOMS list to ACE atom types is correct.", &
    1587              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1588         9514 :                           n_var=-1)
    1589         9514 :       CALL section_add_keyword(section, keyword)
    1590         9514 :       CALL keyword_release(keyword)
    1591              :       CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
    1592              :                           variants=["PARMFILE"], &
    1593              :                           description="Specifies the filename that contains the ACE potential parameters.", &
    1594        19028 :                           usage="POT_FILE_NAME {FILENAME}", default_lc_val="test.yaml")
    1595         9514 :       CALL section_add_keyword(section, keyword)
    1596         9514 :       CALL keyword_release(keyword)
    1597         9514 :    END SUBROUTINE create_ACE_section
    1598              : 
    1599              : ! **************************************************************************************************
    1600              : !> \brief This section specifies the input parameters for DEEPMD potential type
    1601              : !> \param section the section to create
    1602              : !> \author ybzhuang
    1603              : ! **************************************************************************************************
    1604         9514 :    SUBROUTINE create_DEEPMD_section(section)
    1605              :       TYPE(section_type), POINTER                        :: section
    1606              : 
    1607              :       TYPE(keyword_type), POINTER                        :: keyword
    1608              : 
    1609              :       CALL section_create(section, __LOCATION__, name="DEEPMD", &
    1610              :                           description="This section specifies the input parameters for Deep Potential type. "// &
    1611              :                           "Mainly intended for things like neural network to DFT "// &
    1612              :                           "to achieve correlated-wavefunction-like accuracy. "// &
    1613              :                           "Requires linking with DeePMD-kit library from "// &
    1614              :                           "<a href=""https://docs.deepmodeling.com/projects/deepmd/en/master"" "// &
    1615              :                           "target=""_blank"">https://docs.deepmodeling.com/projects/deepmd/en/master</a> .", &
    1616        28542 :                           citations=[Wang2018, Zeng2023], n_keywords=1, n_subsections=0, repeats=.FALSE.)
    1617         9514 :       NULLIFY (keyword)
    1618              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1619              :                           description="Defines the atomic kinds involved in the Deep Potential. "// &
    1620              :                           "Provide a list of each element, "// &
    1621              :                           "making sure that the mapping from the ATOMS list to DeePMD atom types is correct.", &
    1622              :                           usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
    1623         9514 :                           n_var=-1)
    1624         9514 :       CALL section_add_keyword(section, keyword)
    1625         9514 :       CALL keyword_release(keyword)
    1626              :       CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
    1627              :                           variants=["PARMFILE"], &
    1628              :                           description="Specifies the filename that contains the DeePMD-kit potential.", &
    1629        19028 :                           usage="POT_FILE_NAME {FILENAME}", default_lc_val="graph.pb")
    1630         9514 :       CALL section_add_keyword(section, keyword)
    1631         9514 :       CALL keyword_release(keyword)
    1632              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS_DEEPMD_TYPE", &
    1633              :                           description="Specifies the atomic TYPE for the DeePMD-kit potential. "// &
    1634              :                           "Provide a list of index, making sure that the mapping "// &
    1635              :                           "from the ATOMS list to DeePMD atom types is correct. ", &
    1636              :                           usage="ATOMS_DEEPMD_TYPE {TYPE INTEGER 1} {TYPE INTEGER 2} .. "// &
    1637              :                           "{TYPE INTEGER N}", type_of_var=integer_t, &
    1638         9514 :                           n_var=-1)
    1639         9514 :       CALL section_add_keyword(section, keyword)
    1640         9514 :       CALL keyword_release(keyword)
    1641         9514 :    END SUBROUTINE create_DEEPMD_section
    1642              : 
    1643              : ! **************************************************************************************************
    1644              : !> \brief This section specifies the input parameters for Lennard-Jones potential type
    1645              : !> \param section the section to create
    1646              : !> \author teo
    1647              : ! **************************************************************************************************
    1648        38056 :    SUBROUTINE create_LJ_section(section)
    1649              :       TYPE(section_type), POINTER                        :: section
    1650              : 
    1651              :       TYPE(keyword_type), POINTER                        :: keyword
    1652              : 
    1653        38056 :       CPASSERT(.NOT. ASSOCIATED(section))
    1654              :       CALL section_create(section, __LOCATION__, name="lennard-jones", &
    1655              :                           description="This section specifies the input parameters for LENNARD-JONES potential type. "// &
    1656              :                           "Functional form: V(r) = 4.0 * EPSILON * [(SIGMA/r)^12-(SIGMA/r)^6].", &
    1657        38056 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1658              : 
    1659        38056 :       NULLIFY (keyword)
    1660              : 
    1661              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1662              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1663              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1664        38056 :                           n_var=2)
    1665        38056 :       CALL section_add_keyword(section, keyword)
    1666        38056 :       CALL keyword_release(keyword)
    1667              : 
    1668              :       CALL keyword_create(keyword, __LOCATION__, name="EPSILON", &
    1669              :                           description="Defines the EPSILON parameter of the LJ potential", &
    1670              :                           usage="EPSILON {real}", type_of_var=real_t, &
    1671        38056 :                           n_var=1, unit_str="K_e")
    1672        38056 :       CALL section_add_keyword(section, keyword)
    1673        38056 :       CALL keyword_release(keyword)
    1674              : 
    1675              :       CALL keyword_create(keyword, __LOCATION__, name="SIGMA", &
    1676              :                           description="Defines the SIGMA parameter of the LJ potential", &
    1677              :                           usage="SIGMA {real}", type_of_var=real_t, &
    1678        38056 :                           n_var=1, unit_str="angstrom")
    1679        38056 :       CALL section_add_keyword(section, keyword)
    1680        38056 :       CALL keyword_release(keyword)
    1681              : 
    1682              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1683              :                           description="Defines the cutoff parameter of the LJ potential", &
    1684              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1685              :                                                                              unit_str="angstrom"), &
    1686        38056 :                           unit_str="angstrom")
    1687        38056 :       CALL section_add_keyword(section, keyword)
    1688        38056 :       CALL keyword_release(keyword)
    1689              : 
    1690              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1691              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1692              :                           " full range generate by the spline", usage="RMIN {real}", &
    1693        38056 :                           type_of_var=real_t, unit_str="angstrom")
    1694        38056 :       CALL section_add_keyword(section, keyword)
    1695        38056 :       CALL keyword_release(keyword)
    1696              : 
    1697              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1698              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1699              :                           " full range generate by the spline", usage="RMAX {real}", &
    1700        38056 :                           type_of_var=real_t, unit_str="angstrom")
    1701        38056 :       CALL section_add_keyword(section, keyword)
    1702        38056 :       CALL keyword_release(keyword)
    1703              : 
    1704        38056 :    END SUBROUTINE create_LJ_section
    1705              : 
    1706              : ! **************************************************************************************************
    1707              : !> \brief This section specifies the input parameters for Williams potential type
    1708              : !> \param section the section to create
    1709              : !> \author teo
    1710              : ! **************************************************************************************************
    1711        38056 :    SUBROUTINE create_Williams_section(section)
    1712              :       TYPE(section_type), POINTER                        :: section
    1713              : 
    1714              :       TYPE(keyword_type), POINTER                        :: keyword
    1715              : 
    1716        38056 :       CPASSERT(.NOT. ASSOCIATED(section))
    1717              :       CALL section_create(section, __LOCATION__, name="williams", &
    1718              :                           description="This section specifies the input parameters for WILLIAMS potential type. "// &
    1719              :                           "Functional form: V(r) = A*EXP(-B*r) - C / r^6 .", &
    1720        38056 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1721              : 
    1722        38056 :       NULLIFY (keyword)
    1723              : 
    1724              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1725              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1726              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1727        38056 :                           n_var=2)
    1728        38056 :       CALL section_add_keyword(section, keyword)
    1729        38056 :       CALL keyword_release(keyword)
    1730              : 
    1731              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    1732              :                           description="Defines the A parameter of the Williams potential", &
    1733              :                           usage="A {real}", type_of_var=real_t, &
    1734        38056 :                           n_var=1, unit_str="K_e")
    1735        38056 :       CALL section_add_keyword(section, keyword)
    1736        38056 :       CALL keyword_release(keyword)
    1737              : 
    1738              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    1739              :                           description="Defines the B parameter of the Williams potential", &
    1740              :                           usage="B {real}", type_of_var=real_t, &
    1741        38056 :                           n_var=1, unit_str="angstrom^-1")
    1742        38056 :       CALL section_add_keyword(section, keyword)
    1743        38056 :       CALL keyword_release(keyword)
    1744              : 
    1745              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    1746              :                           description="Defines the C parameter of the Williams potential", &
    1747              :                           usage="C {real}", type_of_var=real_t, &
    1748        38056 :                           n_var=1, unit_str="K_e*angstrom^6")
    1749        38056 :       CALL section_add_keyword(section, keyword)
    1750        38056 :       CALL keyword_release(keyword)
    1751              : 
    1752              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1753              :                           description="Defines the cutoff parameter of the Williams potential", &
    1754              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1755              :                                                                              unit_str="angstrom"), &
    1756        38056 :                           unit_str="angstrom")
    1757        38056 :       CALL section_add_keyword(section, keyword)
    1758        38056 :       CALL keyword_release(keyword)
    1759              : 
    1760              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1761              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1762              :                           " full range generate by the spline", usage="RMIN {real}", &
    1763        38056 :                           type_of_var=real_t, unit_str="angstrom")
    1764        38056 :       CALL section_add_keyword(section, keyword)
    1765        38056 :       CALL keyword_release(keyword)
    1766              : 
    1767              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1768              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1769              :                           " full range generate by the spline", usage="RMAX {real}", &
    1770        38056 :                           type_of_var=real_t, unit_str="angstrom")
    1771        38056 :       CALL section_add_keyword(section, keyword)
    1772        38056 :       CALL keyword_release(keyword)
    1773              : 
    1774        38056 :    END SUBROUTINE create_Williams_section
    1775              : 
    1776              : ! **************************************************************************************************
    1777              : !> \brief This section specifies the input parameters for Goodwin potential type
    1778              : !> \param section the section to create
    1779              : !> \author teo
    1780              : ! **************************************************************************************************
    1781        38056 :    SUBROUTINE create_Goodwin_section(section)
    1782              :       TYPE(section_type), POINTER                        :: section
    1783              : 
    1784              :       TYPE(keyword_type), POINTER                        :: keyword
    1785              : 
    1786        38056 :       CPASSERT(.NOT. ASSOCIATED(section))
    1787              :       CALL section_create(section, __LOCATION__, name="goodwin", &
    1788              :                           description="This section specifies the input parameters for GOODWIN potential type. "// &
    1789              :                           "Functional form: V(r) = EXP(M*(-(r/DC)**MC+(D/DC)**MC))*VR0*(D/r)**M.", &
    1790        38056 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1791              : 
    1792        38056 :       NULLIFY (keyword)
    1793              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1794              :                           description="Defines the atomic kind involved in the nonbond potential", &
    1795              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1796        38056 :                           n_var=2)
    1797        38056 :       CALL section_add_keyword(section, keyword)
    1798        38056 :       CALL keyword_release(keyword)
    1799              : 
    1800              :       CALL keyword_create(keyword, __LOCATION__, name="VR0", &
    1801              :                           description="Defines the VR0 parameter of the Goodwin potential", &
    1802              :                           usage="VR0 {real}", type_of_var=real_t, &
    1803        38056 :                           n_var=1, unit_str="K_e")
    1804        38056 :       CALL section_add_keyword(section, keyword)
    1805        38056 :       CALL keyword_release(keyword)
    1806              : 
    1807              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    1808              :                           description="Defines the D parameter of the Goodwin potential", &
    1809              :                           usage="D {real}", type_of_var=real_t, &
    1810        38056 :                           n_var=1, unit_str="angstrom")
    1811        38056 :       CALL section_add_keyword(section, keyword)
    1812        38056 :       CALL keyword_release(keyword)
    1813              : 
    1814              :       CALL keyword_create(keyword, __LOCATION__, name="DC", &
    1815              :                           description="Defines the DC parameter of the Goodwin potential", &
    1816              :                           usage="DC {real}", type_of_var=real_t, &
    1817        38056 :                           n_var=1, unit_str="angstrom")
    1818        38056 :       CALL section_add_keyword(section, keyword)
    1819        38056 :       CALL keyword_release(keyword)
    1820              : 
    1821              :       CALL keyword_create(keyword, __LOCATION__, name="M", &
    1822              :                           description="Defines the M parameter of the Goodwin potential", &
    1823              :                           usage="M {real}", type_of_var=integer_t, &
    1824        38056 :                           n_var=1)
    1825        38056 :       CALL section_add_keyword(section, keyword)
    1826        38056 :       CALL keyword_release(keyword)
    1827              : 
    1828              :       CALL keyword_create(keyword, __LOCATION__, name="MC", &
    1829              :                           description="Defines the MC parameter of the Goodwin potential", &
    1830              :                           usage="MC {real}", type_of_var=integer_t, &
    1831        38056 :                           n_var=1)
    1832        38056 :       CALL section_add_keyword(section, keyword)
    1833        38056 :       CALL keyword_release(keyword)
    1834              : 
    1835              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1836              :                           description="Defines the cutoff parameter of the Goodwin potential", &
    1837              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1838              :                                                                              unit_str="angstrom"), &
    1839        38056 :                           unit_str="angstrom")
    1840        38056 :       CALL section_add_keyword(section, keyword)
    1841        38056 :       CALL keyword_release(keyword)
    1842              : 
    1843              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1844              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1845              :                           " full range generate by the spline", usage="RMIN {real}", &
    1846        38056 :                           type_of_var=real_t, unit_str="angstrom")
    1847        38056 :       CALL section_add_keyword(section, keyword)
    1848        38056 :       CALL keyword_release(keyword)
    1849              : 
    1850              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1851              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1852              :                           " full range generate by the spline", usage="RMAX {real}", &
    1853        38056 :                           type_of_var=real_t, unit_str="angstrom")
    1854        38056 :       CALL section_add_keyword(section, keyword)
    1855        38056 :       CALL keyword_release(keyword)
    1856              : 
    1857        38056 :    END SUBROUTINE create_Goodwin_section
    1858              : 
    1859              : ! **************************************************************************************************
    1860              : !> \brief This section specifies the input parameters for IPBV potential type
    1861              : !> \param section the section to create
    1862              : !> \author teo
    1863              : ! **************************************************************************************************
    1864         9514 :    SUBROUTINE create_ipbv_section(section)
    1865              :       TYPE(section_type), POINTER                        :: section
    1866              : 
    1867              :       TYPE(keyword_type), POINTER                        :: keyword
    1868              : 
    1869         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    1870              :       CALL section_create(section, __LOCATION__, name="ipbv", &
    1871              :                           description="This section specifies the input parameters for IPBV potential type. "// &
    1872              :                           "Functional form: Implicit table function.", &
    1873         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1874              : 
    1875         9514 :       NULLIFY (keyword)
    1876              : 
    1877              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1878              :                           description="Defines the atomic kind involved in the IPBV nonbond potential", &
    1879              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1880         9514 :                           n_var=2)
    1881         9514 :       CALL section_add_keyword(section, keyword)
    1882         9514 :       CALL keyword_release(keyword)
    1883              : 
    1884              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1885              :                           description="Defines the cutoff parameter of the IPBV potential", &
    1886              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    1887              :                                                                              unit_str="angstrom"), &
    1888         9514 :                           unit_str="angstrom")
    1889         9514 :       CALL section_add_keyword(section, keyword)
    1890         9514 :       CALL keyword_release(keyword)
    1891              : 
    1892              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1893              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1894              :                           " full range generate by the spline", usage="RMIN {real}", &
    1895         9514 :                           type_of_var=real_t, unit_str="angstrom")
    1896         9514 :       CALL section_add_keyword(section, keyword)
    1897         9514 :       CALL keyword_release(keyword)
    1898              : 
    1899              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1900              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1901              :                           " full range generate by the spline", usage="RMAX {real}", &
    1902         9514 :                           type_of_var=real_t, unit_str="angstrom")
    1903         9514 :       CALL section_add_keyword(section, keyword)
    1904         9514 :       CALL keyword_release(keyword)
    1905              : 
    1906         9514 :    END SUBROUTINE create_ipbv_section
    1907              : 
    1908              : ! **************************************************************************************************
    1909              : !> \brief This section specifies the input parameters for BMHFT potential type
    1910              : !> \param section the section to create
    1911              : !> \author teo
    1912              : ! **************************************************************************************************
    1913         9514 :    SUBROUTINE create_BMHFT_section(section)
    1914              :       TYPE(section_type), POINTER                        :: section
    1915              : 
    1916              :       TYPE(keyword_type), POINTER                        :: keyword
    1917              : 
    1918         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    1919              :       CALL section_create(section, __LOCATION__, name="BMHFT", &
    1920              :                           description="This section specifies the input parameters for BMHFT potential type. "// &
    1921              :                           "Functional form: V(r) = A * EXP(-B*r) - C/r^6 - D/r^8. "// &
    1922              :                           "Values available inside cp2k only for the Na/Cl pair.", &
    1923        28542 :                           citations=[Tosi1964a, Tosi1964b], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    1924              : 
    1925         9514 :       NULLIFY (keyword)
    1926              : 
    1927              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    1928              :                           description="Defines the atomic kind involved in the BMHFT nonbond potential", &
    1929              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1930         9514 :                           n_var=2)
    1931         9514 :       CALL section_add_keyword(section, keyword)
    1932         9514 :       CALL keyword_release(keyword)
    1933              : 
    1934              :       CALL keyword_create(keyword, __LOCATION__, name="MAP_ATOMS", &
    1935              :                           description="Defines the kinds for which internally is defined the BMHFT nonbond potential"// &
    1936              :                           " at the moment only Na and Cl.", &
    1937              :                           usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    1938         9514 :                           n_var=2)
    1939         9514 :       CALL section_add_keyword(section, keyword)
    1940         9514 :       CALL keyword_release(keyword)
    1941              : 
    1942              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    1943              :                           description="Defines the cutoff parameter of the BMHFT potential", &
    1944              :                           usage="RCUT {real}", default_r_val=7.8_dp, &
    1945         9514 :                           unit_str="angstrom")
    1946         9514 :       CALL section_add_keyword(section, keyword)
    1947         9514 :       CALL keyword_release(keyword)
    1948              : 
    1949              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    1950              :                           description="Defines the A parameter of the Fumi-Tosi Potential", &
    1951              :                           usage="A {real}", type_of_var=real_t, &
    1952         9514 :                           n_var=1, unit_str="hartree")
    1953         9514 :       CALL section_add_keyword(section, keyword)
    1954         9514 :       CALL keyword_release(keyword)
    1955              : 
    1956              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    1957              :                           description="Defines the B parameter of the Fumi-Tosi Potential", &
    1958              :                           usage="B {real}", type_of_var=real_t, &
    1959         9514 :                           n_var=1, unit_str="angstrom^-1")
    1960         9514 :       CALL section_add_keyword(section, keyword)
    1961         9514 :       CALL keyword_release(keyword)
    1962              : 
    1963              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    1964              :                           description="Defines the C parameter of the Fumi-Tosi Potential", &
    1965              :                           usage="C {real}", type_of_var=real_t, &
    1966         9514 :                           n_var=1, unit_str="hartree*angstrom^6")
    1967         9514 :       CALL section_add_keyword(section, keyword)
    1968         9514 :       CALL keyword_release(keyword)
    1969              : 
    1970              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    1971              :                           description="Defines the D parameter of the Fumi-Tosi Potential", &
    1972              :                           usage="D {real}", type_of_var=real_t, &
    1973         9514 :                           n_var=1, unit_str="hartree*angstrom^8")
    1974         9514 :       CALL section_add_keyword(section, keyword)
    1975         9514 :       CALL keyword_release(keyword)
    1976              : 
    1977              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    1978              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    1979              :                           " full range generate by the spline", usage="RMIN {real}", &
    1980         9514 :                           type_of_var=real_t, unit_str="angstrom")
    1981         9514 :       CALL section_add_keyword(section, keyword)
    1982         9514 :       CALL keyword_release(keyword)
    1983              : 
    1984              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    1985              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    1986              :                           " full range generate by the spline", usage="RMAX {real}", &
    1987         9514 :                           type_of_var=real_t, unit_str="angstrom")
    1988         9514 :       CALL section_add_keyword(section, keyword)
    1989         9514 :       CALL keyword_release(keyword)
    1990              : 
    1991         9514 :    END SUBROUTINE create_BMHFT_section
    1992              : 
    1993              : ! **************************************************************************************************
    1994              : !> \brief This section specifies the input parameters for BMHFTD potential type
    1995              : !> \param section the section to create
    1996              : !> \par History
    1997              : !>      - Unused input keyword ORDER removed (18.10.2021, MK)
    1998              : !> \author Mathieu Salanne 05.2010
    1999              : ! **************************************************************************************************
    2000         9514 :    SUBROUTINE create_BMHFTD_section(section)
    2001              :       TYPE(section_type), POINTER                        :: section
    2002              : 
    2003              :       TYPE(keyword_type), POINTER                        :: keyword
    2004              : 
    2005         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2006              :       CALL section_create(section, __LOCATION__, name="BMHFTD", &
    2007              :                           description="This section specifies the input parameters for the BMHFTD potential type. "// &
    2008              :                           "Functional form: V(r) = A*exp(-B*r) - f_6*(r)C/r^6 - f_8(r)*D/r^8 "// &
    2009              :                           "where f_order(r) = 1 - exp(-BD*r)*\sum_{k=0}^order (BD*r)^k/k! "// &
    2010              :                           "(Tang-Toennies damping function). No pre-defined parameter values are available.", &
    2011        28542 :                           citations=[Tosi1964a, Tosi1964b], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2012              : 
    2013         9514 :       NULLIFY (keyword)
    2014              : 
    2015              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2016              :                           description="Defines the atomic kind involved in the BMHFTD nonbond potential", &
    2017              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2018         9514 :                           n_var=2)
    2019         9514 :       CALL section_add_keyword(section, keyword)
    2020         9514 :       CALL keyword_release(keyword)
    2021              : 
    2022              :       CALL keyword_create(keyword, __LOCATION__, name="MAP_ATOMS", &
    2023              :                           description="Defines the kinds for which internally is defined the BMHFTD nonbond potential"// &
    2024              :                           " at the moment no species included.", &
    2025              :                           usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2026         9514 :                           n_var=2)
    2027         9514 :       CALL section_add_keyword(section, keyword)
    2028         9514 :       CALL keyword_release(keyword)
    2029              : 
    2030              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2031              :                           description="Defines the cutoff parameter of the BMHFTD potential", &
    2032              :                           usage="RCUT {real}", default_r_val=7.8_dp, &
    2033         9514 :                           unit_str="angstrom")
    2034         9514 :       CALL section_add_keyword(section, keyword)
    2035         9514 :       CALL keyword_release(keyword)
    2036              : 
    2037              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2038              :                           description="Defines the A parameter of the dispersion-damped Fumi-Tosi potential", &
    2039              :                           usage="A {real}", type_of_var=real_t, &
    2040         9514 :                           n_var=1, unit_str="hartree")
    2041         9514 :       CALL section_add_keyword(section, keyword)
    2042         9514 :       CALL keyword_release(keyword)
    2043              : 
    2044              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2045              :                           description="Defines the B parameter of the dispersion-damped Fumi-Tosi potential", &
    2046              :                           usage="B {real}", type_of_var=real_t, &
    2047         9514 :                           n_var=1, unit_str="angstrom^-1")
    2048         9514 :       CALL section_add_keyword(section, keyword)
    2049         9514 :       CALL keyword_release(keyword)
    2050              : 
    2051              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2052              :                           description="Defines the C parameter of the dispersion-damped Fumi-Tosi potential", &
    2053              :                           usage="C {real}", type_of_var=real_t, &
    2054         9514 :                           n_var=1, unit_str="hartree*angstrom^6")
    2055         9514 :       CALL section_add_keyword(section, keyword)
    2056         9514 :       CALL keyword_release(keyword)
    2057              : 
    2058              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    2059              :                           description="Defines the D parameter of the dispersion-damped Fumi-Tosi potential", &
    2060              :                           usage="D {real}", type_of_var=real_t, &
    2061         9514 :                           n_var=1, unit_str="hartree*angstrom^8")
    2062         9514 :       CALL section_add_keyword(section, keyword)
    2063         9514 :       CALL keyword_release(keyword)
    2064              : 
    2065              :       CALL keyword_create(keyword, __LOCATION__, name="BD", &
    2066              :                           description="Defines the BD parameters of the dispersion-damped Fumi-Tosi potential. "// &
    2067              :                           "One or two parameter values are expected. If only one value is provided, then this "// &
    2068              :                           "value will be used both for the 6th and the 8th order term.", &
    2069              :                           usage="BD {real} {real}", type_of_var=real_t, &
    2070         9514 :                           n_var=-1, unit_str="angstrom^-1")
    2071         9514 :       CALL section_add_keyword(section, keyword)
    2072         9514 :       CALL keyword_release(keyword)
    2073              : 
    2074              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    2075              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    2076              :                           " full range generate by the spline", usage="RMIN {real}", &
    2077         9514 :                           type_of_var=real_t, unit_str="angstrom")
    2078         9514 :       CALL section_add_keyword(section, keyword)
    2079         9514 :       CALL keyword_release(keyword)
    2080              : 
    2081              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    2082              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    2083              :                           " full range generate by the spline", usage="RMAX {real}", &
    2084         9514 :                           type_of_var=real_t, unit_str="angstrom")
    2085         9514 :       CALL section_add_keyword(section, keyword)
    2086         9514 :       CALL keyword_release(keyword)
    2087              : 
    2088         9514 :    END SUBROUTINE create_BMHFTD_section
    2089              : 
    2090              : ! **************************************************************************************************
    2091              : !> \brief This section specifies the input parameters for Buckingham 4 ranges potential type
    2092              : !> \param section the section to create
    2093              : !> \author MI
    2094              : ! **************************************************************************************************
    2095         9514 :    SUBROUTINE create_Buck4r_section(section)
    2096              :       TYPE(section_type), POINTER                        :: section
    2097              : 
    2098              :       TYPE(keyword_type), POINTER                        :: keyword
    2099              : 
    2100         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2101              :       CALL section_create(section, __LOCATION__, name="BUCK4RANGES", &
    2102              :                           description="This section specifies the input parameters for the Buckingham 4-ranges"// &
    2103              :                           " potential type."//newline// &
    2104              :                           "| Range | Functional Form |"//newline// &
    2105              :                           "| ----- | --------------- |"//newline// &
    2106              :                           "| $ r < r_1 $ | $ V(r) = A\exp(-Br) $ |"//newline// &
    2107              :                           "| $ r_1 \leq r < r_2 $ | $ V(r) = \sum_n \operatorname{POLY1}(n)r_n $ |"//newline// &
    2108              :                           "| $ r_2 \leq r < r_3 $ | $ V(r) = \sum_n \operatorname{POLY2}(n)r_n $ |"//newline// &
    2109              :                           "| $ r \geq r_3 $ | $ V(r) = -C/r_6 $ |"//newline, &
    2110         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2111              : 
    2112         9514 :       NULLIFY (keyword)
    2113              : 
    2114              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2115              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2116              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2117         9514 :                           n_var=2)
    2118         9514 :       CALL section_add_keyword(section, keyword)
    2119         9514 :       CALL keyword_release(keyword)
    2120              : 
    2121              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2122              :                           description="Defines the A parameter of the Buckingham potential", &
    2123              :                           usage="A {real}", type_of_var=real_t, &
    2124         9514 :                           n_var=1, unit_str="K_e")
    2125         9514 :       CALL section_add_keyword(section, keyword)
    2126         9514 :       CALL keyword_release(keyword)
    2127              : 
    2128              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2129              :                           description="Defines the B parameter of the Buckingham potential", &
    2130              :                           usage="B {real}", type_of_var=real_t, &
    2131         9514 :                           n_var=1, unit_str="angstrom^-1")
    2132         9514 :       CALL section_add_keyword(section, keyword)
    2133         9514 :       CALL keyword_release(keyword)
    2134              : 
    2135              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2136              :                           description="Defines the C parameter of the Buckingham  potential", &
    2137              :                           usage="C {real}", type_of_var=real_t, &
    2138         9514 :                           n_var=1, unit_str="K_e*angstrom^6")
    2139         9514 :       CALL section_add_keyword(section, keyword)
    2140         9514 :       CALL keyword_release(keyword)
    2141              : 
    2142              :       CALL keyword_create(keyword, __LOCATION__, name="R1", &
    2143              :                           description="Defines the upper bound of the first range ", &
    2144              :                           usage="R1 {real}", type_of_var=real_t, &
    2145         9514 :                           n_var=1, unit_str="angstrom")
    2146         9514 :       CALL section_add_keyword(section, keyword)
    2147         9514 :       CALL keyword_release(keyword)
    2148              : 
    2149              :       CALL keyword_create(keyword, __LOCATION__, name="R2", &
    2150              :                           description="Defines the upper bound of the second range ", &
    2151              :                           usage="R2 {real}", type_of_var=real_t, &
    2152         9514 :                           n_var=1, unit_str="angstrom")
    2153         9514 :       CALL section_add_keyword(section, keyword)
    2154         9514 :       CALL keyword_release(keyword)
    2155              : 
    2156              :       CALL keyword_create(keyword, __LOCATION__, name="R3", &
    2157              :                           description="Defines the upper bound of the third range ", &
    2158              :                           usage="R3 {real}", type_of_var=real_t, &
    2159         9514 :                           n_var=1, unit_str="angstrom")
    2160         9514 :       CALL section_add_keyword(section, keyword)
    2161         9514 :       CALL keyword_release(keyword)
    2162              : 
    2163              :       CALL keyword_create(keyword, __LOCATION__, name="POLY1", &
    2164              :                           description="Coefficients of the polynomial used in the second range "// &
    2165              :                           "This keyword can be repeated several times.", &
    2166              :                           usage="POLY1 C1 C2 C3 ..", &
    2167         9514 :                           n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.TRUE.)
    2168         9514 :       CALL section_add_keyword(section, keyword)
    2169         9514 :       CALL keyword_release(keyword)
    2170              : 
    2171              :       CALL keyword_create(keyword, __LOCATION__, name="POLY2", &
    2172              :                           description="Coefficients of the polynomial used in the third range "// &
    2173              :                           "This keyword can be repeated several times.", &
    2174              :                           usage="POLY2 C1 C2 C3 ..", &
    2175         9514 :                           n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.TRUE.)
    2176         9514 :       CALL section_add_keyword(section, keyword)
    2177         9514 :       CALL keyword_release(keyword)
    2178              : 
    2179              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2180              :                           description="Defines the cutoff parameter of the Buckingham potential", &
    2181              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    2182              :                                                                              unit_str="angstrom"), &
    2183         9514 :                           unit_str="angstrom")
    2184         9514 :       CALL section_add_keyword(section, keyword)
    2185         9514 :       CALL keyword_release(keyword)
    2186              : 
    2187              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    2188              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    2189              :                           " full range generate by the spline", usage="RMIN {real}", &
    2190         9514 :                           type_of_var=real_t, unit_str="angstrom")
    2191         9514 :       CALL section_add_keyword(section, keyword)
    2192         9514 :       CALL keyword_release(keyword)
    2193              : 
    2194              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    2195              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    2196              :                           " full range generate by the spline", usage="RMAX {real}", &
    2197         9514 :                           type_of_var=real_t, unit_str="angstrom")
    2198         9514 :       CALL section_add_keyword(section, keyword)
    2199         9514 :       CALL keyword_release(keyword)
    2200              : 
    2201         9514 :    END SUBROUTINE create_Buck4r_section
    2202              : 
    2203              : ! **************************************************************************************************
    2204              : !> \brief This section specifies the input parameters for Buckingham + Morse potential type
    2205              : !> \param section the section to create
    2206              : !> \author MI
    2207              : ! **************************************************************************************************
    2208         9514 :    SUBROUTINE create_Buckmorse_section(section)
    2209              :       TYPE(section_type), POINTER                        :: section
    2210              : 
    2211              :       TYPE(keyword_type), POINTER                        :: keyword
    2212              : 
    2213         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2214              :       CALL section_create( &
    2215              :          section, __LOCATION__, name="BUCKMORSE", &
    2216              :          description="This section specifies the input parameters for"// &
    2217              :          " Buckingham plus Morse potential type"// &
    2218              :          " 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)]}.", &
    2219        19028 :          citations=[Yamada2000], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2220              : 
    2221         9514 :       NULLIFY (keyword)
    2222              : 
    2223              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2224              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2225              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2226         9514 :                           n_var=2)
    2227         9514 :       CALL section_add_keyword(section, keyword)
    2228         9514 :       CALL keyword_release(keyword)
    2229              : 
    2230              :       CALL keyword_create(keyword, __LOCATION__, name="F0", &
    2231              :                           description="Defines the f0 parameter of Buckingham+Morse potential", &
    2232              :                           usage="F0 {real}", type_of_var=real_t, &
    2233         9514 :                           n_var=1, unit_str="K_e*angstrom^-1")
    2234         9514 :       CALL section_add_keyword(section, keyword)
    2235         9514 :       CALL keyword_release(keyword)
    2236              : 
    2237              :       CALL keyword_create(keyword, __LOCATION__, name="A1", &
    2238              :                           description="Defines the A1 parameter of Buckingham+Morse potential", &
    2239              :                           usage="A1 {real}", type_of_var=real_t, &
    2240         9514 :                           n_var=1, unit_str="angstrom")
    2241         9514 :       CALL section_add_keyword(section, keyword)
    2242         9514 :       CALL keyword_release(keyword)
    2243              : 
    2244              :       CALL keyword_create(keyword, __LOCATION__, name="A2", &
    2245              :                           description="Defines the A2 parameter of Buckingham+Morse potential", &
    2246              :                           usage="A2 {real}", type_of_var=real_t, &
    2247         9514 :                           n_var=1, unit_str="angstrom")
    2248         9514 :       CALL section_add_keyword(section, keyword)
    2249         9514 :       CALL keyword_release(keyword)
    2250              : 
    2251              :       CALL keyword_create(keyword, __LOCATION__, name="B1", &
    2252              :                           description="Defines the B1 parameter of Buckingham+Morse potential", &
    2253              :                           usage="B1 {real}", type_of_var=real_t, &
    2254         9514 :                           n_var=1, unit_str="angstrom")
    2255         9514 :       CALL section_add_keyword(section, keyword)
    2256         9514 :       CALL keyword_release(keyword)
    2257              : 
    2258              :       CALL keyword_create(keyword, __LOCATION__, name="B2", &
    2259              :                           description="Defines the B2 parameter of Buckingham+Morse potential", &
    2260              :                           usage="B2 {real}", type_of_var=real_t, &
    2261         9514 :                           n_var=1, unit_str="angstrom")
    2262         9514 :       CALL section_add_keyword(section, keyword)
    2263         9514 :       CALL keyword_release(keyword)
    2264              : 
    2265              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2266              :                           description="Defines the C parameter of Buckingham+Morse  potential", &
    2267              :                           usage="C {real}", type_of_var=real_t, &
    2268         9514 :                           n_var=1, unit_str="K_e*angstrom^6")
    2269         9514 :       CALL section_add_keyword(section, keyword)
    2270         9514 :       CALL keyword_release(keyword)
    2271              : 
    2272              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    2273              :                           description="Defines the amplitude for the Morse part ", &
    2274              :                           usage="D {real}", type_of_var=real_t, &
    2275         9514 :                           n_var=1, unit_str="K_e")
    2276         9514 :       CALL section_add_keyword(section, keyword)
    2277         9514 :       CALL keyword_release(keyword)
    2278              : 
    2279              :       CALL keyword_create(keyword, __LOCATION__, name="R0", &
    2280              :                           description="Defines the equilibrium distance for the Morse part ", &
    2281              :                           usage="R0 {real}", type_of_var=real_t, &
    2282         9514 :                           n_var=1, unit_str="angstrom")
    2283         9514 :       CALL section_add_keyword(section, keyword)
    2284         9514 :       CALL keyword_release(keyword)
    2285              : 
    2286              :       CALL keyword_create(keyword, __LOCATION__, name="Beta", &
    2287              :                           description="Defines the width for the Morse part ", &
    2288              :                           usage="Beta {real}", type_of_var=real_t, &
    2289         9514 :                           n_var=1, unit_str="angstrom^-1")
    2290         9514 :       CALL section_add_keyword(section, keyword)
    2291         9514 :       CALL keyword_release(keyword)
    2292              : 
    2293              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2294              :                           description="Defines the cutoff parameter of the Buckingham potential", &
    2295              :                           usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
    2296              :                                                                              unit_str="angstrom"), &
    2297         9514 :                           unit_str="angstrom")
    2298         9514 :       CALL section_add_keyword(section, keyword)
    2299         9514 :       CALL keyword_release(keyword)
    2300              : 
    2301              :       CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
    2302              :                           description="Defines the lower bound of the potential. If not set the range is the"// &
    2303              :                           " full range generate by the spline", usage="RMIN {real}", &
    2304         9514 :                           type_of_var=real_t, unit_str="angstrom")
    2305         9514 :       CALL section_add_keyword(section, keyword)
    2306         9514 :       CALL keyword_release(keyword)
    2307              : 
    2308              :       CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
    2309              :                           description="Defines the upper bound of the potential. If not set the range is the"// &
    2310              :                           " full range generate by the spline", usage="RMAX {real}", &
    2311         9514 :                           type_of_var=real_t, unit_str="angstrom")
    2312         9514 :       CALL section_add_keyword(section, keyword)
    2313         9514 :       CALL keyword_release(keyword)
    2314              : 
    2315         9514 :    END SUBROUTINE create_Buckmorse_section
    2316              : 
    2317              : ! **************************************************************************************************
    2318              : !> \brief This section specifies the input parameters for Tersoff potential type
    2319              : !>      (Tersoff, J. PRB 39(8), 5566, 1989)
    2320              : !> \param section ...
    2321              : ! **************************************************************************************************
    2322         9514 :    SUBROUTINE create_Tersoff_section(section)
    2323              :       TYPE(section_type), POINTER                        :: section
    2324              : 
    2325              :       TYPE(keyword_type), POINTER                        :: keyword
    2326              : 
    2327         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2328              :       CALL section_create(section, __LOCATION__, name="TERSOFF", &
    2329              :                           description="This section specifies the input parameters for Tersoff potential type.", &
    2330        19028 :                           citations=[Tersoff1988], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2331              : 
    2332         9514 :       NULLIFY (keyword)
    2333              : 
    2334              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2335              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2336              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2337         9514 :                           n_var=2)
    2338         9514 :       CALL section_add_keyword(section, keyword)
    2339         9514 :       CALL keyword_release(keyword)
    2340              : 
    2341              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2342              :                           description="Defines the A parameter of Tersoff potential", &
    2343              :                           usage="A {real}", type_of_var=real_t, &
    2344              :                           default_r_val=cp_unit_to_cp2k(value=1.8308E3_dp, &
    2345              :                                                         unit_str="eV"), &
    2346         9514 :                           n_var=1, unit_str="eV")
    2347         9514 :       CALL section_add_keyword(section, keyword)
    2348         9514 :       CALL keyword_release(keyword)
    2349              : 
    2350              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2351              :                           description="Defines the B parameter of Tersoff potential", &
    2352              :                           usage="B {real}", type_of_var=real_t, &
    2353              :                           default_r_val=cp_unit_to_cp2k(value=4.7118E2_dp, &
    2354              :                                                         unit_str="eV"), &
    2355         9514 :                           n_var=1, unit_str="eV")
    2356         9514 :       CALL section_add_keyword(section, keyword)
    2357         9514 :       CALL keyword_release(keyword)
    2358              : 
    2359              :       CALL keyword_create(keyword, __LOCATION__, name="lambda1", &
    2360              :                           description="Defines the lambda1 parameter of Tersoff potential", &
    2361              :                           usage="lambda1 {real}", type_of_var=real_t, &
    2362              :                           default_r_val=cp_unit_to_cp2k(value=2.4799_dp, &
    2363              :                                                         unit_str="angstrom^-1"), &
    2364         9514 :                           n_var=1, unit_str="angstrom^-1")
    2365         9514 :       CALL section_add_keyword(section, keyword)
    2366         9514 :       CALL keyword_release(keyword)
    2367              : 
    2368              :       CALL keyword_create(keyword, __LOCATION__, name="lambda2", &
    2369              :                           description="Defines the lambda2 parameter of Tersoff potential", &
    2370              :                           usage="lambda2 {real}", type_of_var=real_t, &
    2371              :                           default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
    2372              :                                                         unit_str="angstrom^-1"), &
    2373         9514 :                           n_var=1, unit_str="angstrom^-1")
    2374         9514 :       CALL section_add_keyword(section, keyword)
    2375         9514 :       CALL keyword_release(keyword)
    2376              : 
    2377              :       CALL keyword_create(keyword, __LOCATION__, name="alpha", &
    2378              :                           description="Defines the alpha parameter of Tersoff potential", &
    2379              :                           usage="alpha {real}", type_of_var=real_t, &
    2380              :                           default_r_val=0.0_dp, &
    2381         9514 :                           n_var=1)
    2382         9514 :       CALL section_add_keyword(section, keyword)
    2383         9514 :       CALL keyword_release(keyword)
    2384              : 
    2385              :       CALL keyword_create(keyword, __LOCATION__, name="beta", &
    2386              :                           description="Defines the beta parameter of Tersoff potential", &
    2387              :                           usage="beta {real}", type_of_var=real_t, &
    2388              :                           default_r_val=1.0999E-6_dp, &
    2389         9514 :                           n_var=1, unit_str="")
    2390         9514 :       CALL section_add_keyword(section, keyword)
    2391         9514 :       CALL keyword_release(keyword)
    2392              : 
    2393              :       CALL keyword_create(keyword, __LOCATION__, name="n", &
    2394              :                           description="Defines the n parameter of Tersoff potential", &
    2395              :                           usage="n {real}", type_of_var=real_t, &
    2396              :                           default_r_val=7.8734E-1_dp, &
    2397         9514 :                           n_var=1, unit_str="")
    2398         9514 :       CALL section_add_keyword(section, keyword)
    2399         9514 :       CALL keyword_release(keyword)
    2400              : 
    2401              :       CALL keyword_create(keyword, __LOCATION__, name="c", &
    2402              :                           description="Defines the c parameter of Tersoff potential", &
    2403              :                           usage="c {real}", type_of_var=real_t, &
    2404              :                           default_r_val=1.0039E5_dp, &
    2405         9514 :                           n_var=1, unit_str="")
    2406         9514 :       CALL section_add_keyword(section, keyword)
    2407         9514 :       CALL keyword_release(keyword)
    2408              : 
    2409              :       CALL keyword_create(keyword, __LOCATION__, name="d", &
    2410              :                           description="Defines the d parameter of Tersoff potential", &
    2411              :                           usage="d {real}", type_of_var=real_t, &
    2412              :                           default_r_val=1.6218E1_dp, &
    2413         9514 :                           n_var=1, unit_str="")
    2414         9514 :       CALL section_add_keyword(section, keyword)
    2415         9514 :       CALL keyword_release(keyword)
    2416              : 
    2417              :       CALL keyword_create(keyword, __LOCATION__, name="h", &
    2418              :                           description="Defines the h parameter of Tersoff potential", &
    2419              :                           usage="h {real}", type_of_var=real_t, &
    2420              :                           default_r_val=-5.9826E-1_dp, &
    2421         9514 :                           n_var=1, unit_str="")
    2422         9514 :       CALL section_add_keyword(section, keyword)
    2423         9514 :       CALL keyword_release(keyword)
    2424              : 
    2425              :       CALL keyword_create(keyword, __LOCATION__, name="lambda3", &
    2426              :                           description="Defines the lambda3 parameter of Tersoff potential", &
    2427              :                           usage="lambda3 {real}", type_of_var=real_t, &
    2428              :                           default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
    2429              :                                                         unit_str="angstrom^-1"), &
    2430         9514 :                           n_var=1, unit_str="angstrom^-1")
    2431         9514 :       CALL section_add_keyword(section, keyword)
    2432         9514 :       CALL keyword_release(keyword)
    2433              : 
    2434              :       CALL keyword_create(keyword, __LOCATION__, name="bigR", &
    2435              :                           description="Defines the bigR parameter of Tersoff potential", &
    2436              :                           usage="bigR {real}", type_of_var=real_t, &
    2437              :                           default_r_val=cp_unit_to_cp2k(value=2.85_dp, &
    2438              :                                                         unit_str="angstrom"), &
    2439         9514 :                           n_var=1, unit_str="angstrom")
    2440         9514 :       CALL section_add_keyword(section, keyword)
    2441         9514 :       CALL keyword_release(keyword)
    2442              : 
    2443              :       CALL keyword_create(keyword, __LOCATION__, name="bigD", &
    2444              :                           description="Defines the D parameter of Tersoff potential", &
    2445              :                           usage="bigD {real}", type_of_var=real_t, &
    2446              :                           default_r_val=cp_unit_to_cp2k(value=0.15_dp, &
    2447              :                                                         unit_str="angstrom"), &
    2448         9514 :                           n_var=1, unit_str="angstrom")
    2449         9514 :       CALL section_add_keyword(section, keyword)
    2450         9514 :       CALL keyword_release(keyword)
    2451              : 
    2452              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2453              :                           description="Defines the cutoff parameter of the tersoff potential."// &
    2454              :                           " This parameter is in principle already defined by the values of"// &
    2455              :                           " bigD and bigR. But it is necessary to define it when using the tersoff"// &
    2456              :                           " in conjunction with other potentials (for the same atomic pair) in order to have"// &
    2457              :                           " the same consistent definition of RCUT for all potentials.", &
    2458              :                           usage="RCUT {real}", type_of_var=real_t, &
    2459         9514 :                           n_var=1, unit_str="angstrom")
    2460         9514 :       CALL section_add_keyword(section, keyword)
    2461         9514 :       CALL keyword_release(keyword)
    2462              : 
    2463         9514 :    END SUBROUTINE create_Tersoff_section
    2464              : 
    2465              : ! **************************************************************************************************
    2466              : !> \brief This section specifies the input parameters for Siepmann-Sprik
    2467              : !>        potential type
    2468              : !>      (Siepmann and Sprik, J. Chem. Phys. 102(1) 511, 1995)
    2469              : !> \param section ...
    2470              : ! **************************************************************************************************
    2471         9514 :    SUBROUTINE create_Siepmann_section(section)
    2472              :       TYPE(section_type), POINTER                        :: section
    2473              : 
    2474              :       TYPE(keyword_type), POINTER                        :: keyword
    2475              : 
    2476         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2477              :       CALL section_create(section, __LOCATION__, name="SIEPMANN", &
    2478              :                           description="This section specifies the input parameters for the"// &
    2479              :                           " Siepmann-Sprik potential type. Consists of 4 terms:"// &
    2480              :                           " T1+T2+T3+T4. The terms T1=A/rij^alpha and T2=-C/rij^6"// &
    2481              :                           " have to be given via the GENPOT section. The terms T3+T4"// &
    2482              :                           " are obtained from the SIEPMANN section. The Siepmann-Sprik"// &
    2483              :                           " potential is designed for water-metal chemisorption.", &
    2484        19028 :                           citations=[Siepmann1995], n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2485              : 
    2486         9514 :       NULLIFY (keyword)
    2487              : 
    2488              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2489              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2490              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2491         9514 :                           n_var=2)
    2492         9514 :       CALL section_add_keyword(section, keyword)
    2493         9514 :       CALL keyword_release(keyword)
    2494              : 
    2495              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2496              :                           description="Defines the B parameter of Siepmann potential", &
    2497              :                           usage="B {real}", type_of_var=real_t, &
    2498              :                           default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
    2499              :                                                         unit_str="angstrom"), &
    2500         9514 :                           n_var=1, unit_str="angstrom")
    2501         9514 :       CALL section_add_keyword(section, keyword)
    2502         9514 :       CALL keyword_release(keyword)
    2503              : 
    2504              :       CALL keyword_create(keyword, __LOCATION__, name="D", &
    2505              :                           description="Defines the D parameter of Siepmann potential", &
    2506              :                           usage="D {real}", type_of_var=real_t, &
    2507              :                           default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
    2508              :                                                         unit_str="internal_cp2k"), &
    2509         9514 :                           n_var=1, unit_str="internal_cp2k")
    2510         9514 :       CALL section_add_keyword(section, keyword)
    2511         9514 :       CALL keyword_release(keyword)
    2512              : 
    2513              :       CALL keyword_create(keyword, __LOCATION__, name="E", &
    2514              :                           description="Defines the E parameter of Siepmann potential", &
    2515              :                           usage="E {real}", type_of_var=real_t, &
    2516              :                           default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
    2517              :                                                         unit_str="internal_cp2k"), &
    2518         9514 :                           n_var=1, unit_str="internal_cp2k")
    2519         9514 :       CALL section_add_keyword(section, keyword)
    2520         9514 :       CALL keyword_release(keyword)
    2521              : 
    2522              :       CALL keyword_create(keyword, __LOCATION__, name="F", &
    2523              :                           description="Defines the F parameter of Siepmann potential", &
    2524              :                           usage="F {real}", type_of_var=real_t, &
    2525         9514 :                           default_r_val=13.3_dp, n_var=1)
    2526         9514 :       CALL section_add_keyword(section, keyword)
    2527         9514 :       CALL keyword_release(keyword)
    2528              : !
    2529              :       CALL keyword_create(keyword, __LOCATION__, name="beta", &
    2530              :                           description="Defines the beta parameter of Siepmann potential", &
    2531              :                           usage="beta {real}", type_of_var=real_t, &
    2532         9514 :                           default_r_val=10.0_dp, n_var=1)
    2533         9514 :       CALL section_add_keyword(section, keyword)
    2534         9514 :       CALL keyword_release(keyword)
    2535              : !
    2536              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2537              :                           description="Defines the cutoff parameter of Siepmann potential", &
    2538              :                           usage="RCUT {real}", type_of_var=real_t, &
    2539              :                           default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
    2540              :                                                         unit_str="angstrom"), &
    2541         9514 :                           n_var=1, unit_str="angstrom")
    2542         9514 :       CALL section_add_keyword(section, keyword)
    2543         9514 :       CALL keyword_release(keyword)
    2544              : !
    2545              :       CALL keyword_create(keyword, __LOCATION__, name="ALLOW_OH_FORMATION", &
    2546              :                           description=" The Siepmann-Sprik potential is actually designed for intact"// &
    2547              :                           " water molecules only. If water is treated at the QM level,"// &
    2548              :                           " water molecules can potentially dissociate, i.e."// &
    2549              :                           " some O-H bonds might be stretched leading temporarily"// &
    2550              :                           " to the formation of OH- ions. This keyword allows the"// &
    2551              :                           " the formation of such ions. The T3 term (dipole term)"// &
    2552              :                           " is then switched off for evaluating the interaction"// &
    2553              :                           " between the OH- ion and the metal.", &
    2554              :                           usage="ALLOW_OH_FORMATION TRUE", &
    2555         9514 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2556         9514 :       CALL section_add_keyword(section, keyword)
    2557         9514 :       CALL keyword_release(keyword)
    2558              : 
    2559              :       CALL keyword_create(keyword, __LOCATION__, name="ALLOW_H3O_FORMATION", &
    2560              :                           description=" The Siepmann-Sprik potential is designed for intact water"// &
    2561              :                           " molecules only. If water is treated at the QM level"// &
    2562              :                           " and an acid is present, hydronium ions might occur."// &
    2563              :                           " This keyword allows the formation of hydronium ions."// &
    2564              :                           " The T3 term (dipole term) is switched off for evaluating"// &
    2565              :                           " the interaction between hydronium and the metal.", &
    2566              :                           usage="ALLOW_H3O_FORMATION TRUE", &
    2567         9514 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2568         9514 :       CALL section_add_keyword(section, keyword)
    2569         9514 :       CALL keyword_release(keyword)
    2570              : 
    2571              :       CALL keyword_create(keyword, __LOCATION__, name="ALLOW_O_FORMATION", &
    2572              :                           description=" The Siepmann-Sprik potential is actually designed for intact"// &
    2573              :                           " water molecules only. If water is treated at the QM level,"// &
    2574              :                           " water molecules can potentially dissociate, i.e."// &
    2575              :                           " some O-H bonds might be stretched leading temporarily"// &
    2576              :                           " to the formation of O^2- ions. This keyword allows the"// &
    2577              :                           " the formation of such ions. The T3 term (dipole term)"// &
    2578              :                           " is then switched off for evaluating the interaction"// &
    2579              :                           " between the O^2- ion and the metal.", &
    2580              :                           usage="ALLOW_O_FORMATION .TRUE.", &
    2581         9514 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2582         9514 :       CALL section_add_keyword(section, keyword)
    2583         9514 :       CALL keyword_release(keyword)
    2584              : 
    2585         9514 :    END SUBROUTINE create_Siepmann_section
    2586              : 
    2587              : ! **************************************************************************************************
    2588              : !> \brief This section specifies the input parameters for GAL19
    2589              : !>        potential type
    2590              : !>      (??)
    2591              : !> \param section ...
    2592              : ! **************************************************************************************************
    2593         9514 :    SUBROUTINE create_Gal_section(section)
    2594              :       TYPE(section_type), POINTER                        :: section
    2595              : 
    2596              :       TYPE(keyword_type), POINTER                        :: keyword
    2597              :       TYPE(section_type), POINTER                        :: subsection
    2598              : 
    2599         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2600              :       CALL section_create(section, __LOCATION__, name="GAL19", &
    2601              :                           description="Implementation of the GAL19 forcefield, see associated paper", &
    2602        19028 :                           citations=[Clabaut2020], n_keywords=1, n_subsections=1, repeats=.TRUE.)
    2603              : 
    2604         9514 :       NULLIFY (keyword, subsection)
    2605              : 
    2606              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2607              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2608              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2609         9514 :                           n_var=2)
    2610         9514 :       CALL section_add_keyword(section, keyword)
    2611         9514 :       CALL keyword_release(keyword)
    2612              : 
    2613              :       CALL keyword_create(keyword, __LOCATION__, name="METALS", &
    2614              :                           description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
    2615              :                           usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
    2616         9514 :                           n_var=2)
    2617         9514 :       CALL section_add_keyword(section, keyword)
    2618         9514 :       CALL keyword_release(keyword)
    2619              : 
    2620              :       CALL keyword_create(keyword, __LOCATION__, name="epsilon", &
    2621              :                           description="Defines the epsilon_a parameter of GAL19 potential", &
    2622              :                           usage="epsilon {real}", type_of_var=real_t, &
    2623              :                           default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
    2624              :                                                         unit_str="kcalmol"), &
    2625         9514 :                           n_var=1, unit_str="kcalmol")
    2626         9514 :       CALL section_add_keyword(section, keyword)
    2627         9514 :       CALL keyword_release(keyword)
    2628              : 
    2629              :       CALL keyword_create(keyword, __LOCATION__, name="bxy", &
    2630              :                           description="Defines the b perpendicular parameter of GAL19 potential", &
    2631              :                           usage="bxy {real}", type_of_var=real_t, &
    2632              :                           default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
    2633              :                                                         unit_str="internal_cp2k"), &
    2634         9514 :                           n_var=1, unit_str="angstrom^-2")
    2635         9514 :       CALL section_add_keyword(section, keyword)
    2636         9514 :       CALL keyword_release(keyword)
    2637              : 
    2638              :       CALL keyword_create(keyword, __LOCATION__, name="bz", &
    2639              :                           description="Defines the b parallel parameter of GAL19 potential", &
    2640              :                           usage="bz {real}", type_of_var=real_t, &
    2641              :                           default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
    2642              :                                                         unit_str="internal_cp2k"), &
    2643         9514 :                           n_var=1, unit_str="angstrom^-2")
    2644         9514 :       CALL section_add_keyword(section, keyword)
    2645         9514 :       CALL keyword_release(keyword)
    2646              : 
    2647              :       CALL keyword_create(keyword, __LOCATION__, name="r", &
    2648              :                           description="Defines the R_0 parameters of GAL19 potential for the two METALS. "// &
    2649              :                           "This is the only parameter that is shared between the two section of the "// &
    2650              :                           "forcefield in the case of two metals (alloy). "// &
    2651              :                           "If one metal only is present, a second number should be given but won't be read", &
    2652         9514 :                           usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
    2653         9514 :       CALL section_add_keyword(section, keyword)
    2654         9514 :       CALL keyword_release(keyword)
    2655              : 
    2656              :       CALL keyword_create(keyword, __LOCATION__, name="a1", &
    2657              :                           description="Defines the a1 parameter of GAL19 potential", &
    2658              :                           usage="a1 {real}", type_of_var=real_t, &
    2659         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2660         9514 :       CALL section_add_keyword(section, keyword)
    2661         9514 :       CALL keyword_release(keyword)
    2662              : 
    2663              :       CALL keyword_create(keyword, __LOCATION__, name="a2", &
    2664              :                           description="Defines the a2 parameter of GAL19 potential", &
    2665              :                           usage="a2 {real}", type_of_var=real_t, &
    2666         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2667         9514 :       CALL section_add_keyword(section, keyword)
    2668         9514 :       CALL keyword_release(keyword)
    2669              : 
    2670              :       CALL keyword_create(keyword, __LOCATION__, name="a3", &
    2671              :                           description="Defines the a3 parameter of GAL19 potential", &
    2672              :                           usage="a3 {real}", type_of_var=real_t, &
    2673         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2674         9514 :       CALL section_add_keyword(section, keyword)
    2675         9514 :       CALL keyword_release(keyword)
    2676              : 
    2677              :       CALL keyword_create(keyword, __LOCATION__, name="a4", &
    2678              :                           description="Defines the a4 parameter of GAL19 potential", &
    2679              :                           usage="a4 {real}", type_of_var=real_t, &
    2680         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2681         9514 :       CALL section_add_keyword(section, keyword)
    2682         9514 :       CALL keyword_release(keyword)
    2683              : 
    2684              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2685              :                           description="Defines the A parameter of GAL19 potential", &
    2686              :                           usage="A {real}", type_of_var=real_t, &
    2687         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
    2688         9514 :       CALL section_add_keyword(section, keyword)
    2689         9514 :       CALL keyword_release(keyword)
    2690              : 
    2691              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2692              :                           description="Defines the B parameter of GAL19 potential", &
    2693              :                           usage="B {real}", type_of_var=real_t, &
    2694         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="angstrom^-1")
    2695         9514 :       CALL section_add_keyword(section, keyword)
    2696         9514 :       CALL keyword_release(keyword)
    2697              : 
    2698              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2699              :                           description="Defines the C parameter of GAL19 potential", &
    2700              :                           usage="C {real}", type_of_var=real_t, &
    2701         9514 :                           default_r_val=10.0_dp, n_var=1, unit_str="angstrom^6*kcalmol")
    2702         9514 :       CALL section_add_keyword(section, keyword)
    2703         9514 :       CALL keyword_release(keyword)
    2704              : 
    2705              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2706              :                           description="Defines the cutoff parameter of GAL19 potential", &
    2707              :                           usage="RCUT {real}", type_of_var=real_t, &
    2708              :                           default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
    2709              :                                                         unit_str="angstrom"), &
    2710         9514 :                           n_var=1, unit_str="angstrom")
    2711         9514 :       CALL section_add_keyword(section, keyword)
    2712         9514 :       CALL keyword_release(keyword)
    2713              :       CALL keyword_create(keyword, __LOCATION__, name="Fit_express", &
    2714              :                           description="Demands the particular output needed to a least square fit", &
    2715              :                           usage="Fit_express TRUE", &
    2716         9514 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2717         9514 :       CALL section_add_keyword(section, keyword)
    2718         9514 :       CALL keyword_release(keyword)
    2719         9514 :       CALL create_GCN_section(subsection)
    2720         9514 :       CALL section_add_subsection(section, subsection)
    2721         9514 :       CALL section_release(subsection)
    2722              : 
    2723         9514 :    END SUBROUTINE create_Gal_section
    2724              : 
    2725              : ! **************************************************************************************************
    2726              : !> \brief This section specifies the input parameters for GAL21
    2727              : !>        potential type
    2728              : !>      (??)
    2729              : !> \param section ...
    2730              : ! **************************************************************************************************
    2731         9514 :    SUBROUTINE create_Gal21_section(section)
    2732              :       TYPE(section_type), POINTER                        :: section
    2733              : 
    2734              :       TYPE(keyword_type), POINTER                        :: keyword
    2735              :       TYPE(section_type), POINTER                        :: subsection
    2736              : 
    2737         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2738              :       CALL section_create(section, __LOCATION__, name="GAL21", &
    2739              :                           description="Implementation of the GAL21 forcefield, see associated paper", &
    2740        19028 :                           citations=[Clabaut2021], n_keywords=1, n_subsections=1, repeats=.TRUE.)
    2741              : 
    2742         9514 :       NULLIFY (keyword, subsection)
    2743              : 
    2744              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2745              :                           description="Defines the atomic kind involved in the nonbond potential", &
    2746              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2747         9514 :                           n_var=2)
    2748         9514 :       CALL section_add_keyword(section, keyword)
    2749         9514 :       CALL keyword_release(keyword)
    2750              : 
    2751              :       CALL keyword_create(keyword, __LOCATION__, name="METALS", &
    2752              :                           description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
    2753              :                           usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
    2754         9514 :                           n_var=2)
    2755         9514 :       CALL section_add_keyword(section, keyword)
    2756         9514 :       CALL keyword_release(keyword)
    2757              : 
    2758              :       CALL keyword_create(keyword, __LOCATION__, name="epsilon", &
    2759              :                           description="Defines the epsilon parameter of GAL21 potential", &
    2760              :                           usage="epsilon {real} {real} {real}", type_of_var=real_t, &
    2761         9514 :                           n_var=3, unit_str="kcalmol")
    2762         9514 :       CALL section_add_keyword(section, keyword)
    2763         9514 :       CALL keyword_release(keyword)
    2764              : 
    2765              :       CALL keyword_create(keyword, __LOCATION__, name="bxy", &
    2766              :                           description="Defines the b perpendicular parameter of GAL21 potential", &
    2767              :                           usage="bxy {real} {real}", type_of_var=real_t, &
    2768         9514 :                           n_var=2, unit_str="angstrom^-2")
    2769         9514 :       CALL section_add_keyword(section, keyword)
    2770         9514 :       CALL keyword_release(keyword)
    2771              : 
    2772              :       CALL keyword_create(keyword, __LOCATION__, name="bz", &
    2773              :                           description="Defines the b parallel parameter of GAL21 potential", &
    2774              :                           usage="bz {real} {real}", type_of_var=real_t, &
    2775         9514 :                           n_var=2, unit_str="angstrom^-2")
    2776         9514 :       CALL section_add_keyword(section, keyword)
    2777         9514 :       CALL keyword_release(keyword)
    2778              : 
    2779              :       CALL keyword_create(keyword, __LOCATION__, name="r", &
    2780              :                           description="Defines the R_0 parameters of GAL21 potential for the two METALS. "// &
    2781              :                           "This is the only parameter that is shared between the two section of "// &
    2782              :                           "the forcefield in the case of two metals (alloy). "// &
    2783              :                           "If one metal only is present, a second number should be given but won't be read", &
    2784         9514 :                           usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
    2785         9514 :       CALL section_add_keyword(section, keyword)
    2786         9514 :       CALL keyword_release(keyword)
    2787              : 
    2788              :       CALL keyword_create(keyword, __LOCATION__, name="a1", &
    2789              :                           description="Defines the a1 parameter of GAL21 potential", &
    2790              :                           usage="a1 {real} {real} {real}", type_of_var=real_t, &
    2791         9514 :                           n_var=3, unit_str="kcalmol")
    2792         9514 :       CALL section_add_keyword(section, keyword)
    2793         9514 :       CALL keyword_release(keyword)
    2794              : 
    2795              :       CALL keyword_create(keyword, __LOCATION__, name="a2", &
    2796              :                           description="Defines the a2 parameter of GAL21 potential", &
    2797              :                           usage="a2 {real} {real} {real}", type_of_var=real_t, &
    2798         9514 :                           n_var=3, unit_str="kcalmol")
    2799         9514 :       CALL section_add_keyword(section, keyword)
    2800         9514 :       CALL keyword_release(keyword)
    2801              : 
    2802              :       CALL keyword_create(keyword, __LOCATION__, name="a3", &
    2803              :                           description="Defines the a3 parameter of GAL21 potential", &
    2804              :                           usage="a3 {real} {real} {real}", type_of_var=real_t, &
    2805         9514 :                           n_var=3, unit_str="kcalmol")
    2806         9514 :       CALL section_add_keyword(section, keyword)
    2807         9514 :       CALL keyword_release(keyword)
    2808              : 
    2809              :       CALL keyword_create(keyword, __LOCATION__, name="a4", &
    2810              :                           description="Defines the a4 parameter of GAL21 potential", &
    2811              :                           usage="a4 {real} {real} {real}", type_of_var=real_t, &
    2812         9514 :                           n_var=3, unit_str="kcalmol")
    2813         9514 :       CALL section_add_keyword(section, keyword)
    2814         9514 :       CALL keyword_release(keyword)
    2815              : 
    2816              :       CALL keyword_create(keyword, __LOCATION__, name="A", &
    2817              :                           description="Defines the A parameter of GAL21 potential", &
    2818              :                           usage="A {real} {real}", type_of_var=real_t, &
    2819         9514 :                           n_var=2, unit_str="kcalmol")
    2820         9514 :       CALL section_add_keyword(section, keyword)
    2821         9514 :       CALL keyword_release(keyword)
    2822              : 
    2823              :       CALL keyword_create(keyword, __LOCATION__, name="B", &
    2824              :                           description="Defines the B parameter of GAL21 potential", &
    2825              :                           usage="B {real} {real}", type_of_var=real_t, &
    2826         9514 :                           n_var=2, unit_str="angstrom^-1")
    2827         9514 :       CALL section_add_keyword(section, keyword)
    2828         9514 :       CALL keyword_release(keyword)
    2829              : 
    2830              :       CALL keyword_create(keyword, __LOCATION__, name="C", &
    2831              :                           description="Defines the C parameter of GAL21 potential", &
    2832              :                           usage="C {real}", type_of_var=real_t, &
    2833         9514 :                           n_var=1, unit_str="angstrom^6*kcalmol")
    2834         9514 :       CALL section_add_keyword(section, keyword)
    2835         9514 :       CALL keyword_release(keyword)
    2836              : 
    2837              :       CALL keyword_create(keyword, __LOCATION__, name="AH", &
    2838              :                           description="Defines the AH parameter of GAL21 potential", &
    2839              :                           usage="AH {real} {real}", type_of_var=real_t, &
    2840         9514 :                           n_var=2, unit_str="kcalmol")
    2841         9514 :       CALL section_add_keyword(section, keyword)
    2842         9514 :       CALL keyword_release(keyword)
    2843              : 
    2844              :       CALL keyword_create(keyword, __LOCATION__, name="BH", &
    2845              :                           description="Defines the BH parameter of GAL21 potential", &
    2846              :                           usage="BH {real} {real}", type_of_var=real_t, &
    2847         9514 :                           n_var=2, unit_str="angstrom^-1")
    2848         9514 :       CALL section_add_keyword(section, keyword)
    2849         9514 :       CALL keyword_release(keyword)
    2850              : 
    2851              :       CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
    2852              :                           description="Defines the cutoff parameter of GAL21 potential", &
    2853              :                           usage="RCUT {real}", type_of_var=real_t, &
    2854              :                           default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
    2855              :                                                         unit_str="angstrom"), &
    2856         9514 :                           n_var=1, unit_str="angstrom")
    2857         9514 :       CALL section_add_keyword(section, keyword)
    2858         9514 :       CALL keyword_release(keyword)
    2859              : 
    2860              :       CALL keyword_create(keyword, __LOCATION__, name="Fit_express", &
    2861              :                           description="Demands the particular output needed to a least square fit", &
    2862              :                           usage="Fit_express TRUE", &
    2863         9514 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
    2864         9514 :       CALL section_add_keyword(section, keyword)
    2865         9514 :       CALL keyword_release(keyword)
    2866              : 
    2867         9514 :       CALL create_GCN_section(subsection)
    2868         9514 :       CALL section_add_subsection(section, subsection)
    2869         9514 :       CALL section_release(subsection)
    2870              : 
    2871         9514 :    END SUBROUTINE create_Gal21_section
    2872              : 
    2873              : ! **************************************************************************************************
    2874              : !> \brief This section specifies the input parameters for TABPOT  potential type
    2875              : !> \param section the section to create
    2876              : !> \author teo, Alex Mironenko, Da Teng
    2877              : ! **************************************************************************************************
    2878         9514 :    SUBROUTINE create_TABPOT_section(section)
    2879              : 
    2880              :       TYPE(section_type), POINTER                        :: section
    2881              : 
    2882              :       TYPE(keyword_type), POINTER                        :: keyword
    2883              : 
    2884         9514 :       CPASSERT(.NOT. ASSOCIATED(section))
    2885              : 
    2886              :       CALL section_create(section, __LOCATION__, name="TABPOT", &
    2887              :                           description="This section specifies the input parameters for TABPOT potential type.", &
    2888         9514 :                           n_keywords=1, n_subsections=0, repeats=.TRUE.)
    2889              : 
    2890         9514 :       NULLIFY (keyword)
    2891              :       CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
    2892              :                           description="Defines the atomic kind involved", &
    2893              :                           usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
    2894         9514 :                           n_var=2)
    2895         9514 :       CALL section_add_keyword(section, keyword)
    2896         9514 :       CALL keyword_release(keyword)
    2897              : 
    2898              :       CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
    2899              :                           variants=["PARMFILE"], &
    2900              :                           description="Specifies the filename that contains the tabulated NONBONDED potential. "// &
    2901              :                           "File structure: the third line of the potential file contains a title. "// &
    2902              :                           "The 4th line contains: 'N', number of data points, 'R', lower bound of distance, distance cutoff. "// &
    2903              :                           "Follow "// &
    2904              :                           "in order npoints lines for index, distance [A], energy [kcal/mol], and force [kcal/mol/A]", &
    2905        19028 :                           usage="PARM_FILE_NAME {FILENAME}", default_lc_val="")
    2906         9514 :       CALL section_add_keyword(section, keyword)
    2907         9514 :       CALL keyword_release(keyword)
    2908              : 
    2909         9514 :    END SUBROUTINE create_TABPOT_section
    2910              : 
    2911              : ! **************************************************************************************************
    2912              : !> \brief This section specifies the input parameters for the subsection GCN of GAL19 and GAL21
    2913              : !>        potential type
    2914              : !>      (??)
    2915              : !> \param section ...
    2916              : ! **************************************************************************************************
    2917        19028 :    SUBROUTINE create_GCN_section(section)
    2918              :       TYPE(section_type), POINTER                        :: section
    2919              : 
    2920              :       TYPE(keyword_type), POINTER                        :: keyword
    2921              : 
    2922        19028 :       CPASSERT(.NOT. ASSOCIATED(section))
    2923              :       CALL section_create(section, __LOCATION__, name="GCN", &
    2924              :                           description="Allow to specify the generalized coordination number of the atoms. "// &
    2925              :                           "Those numbers msust be generated by another program ", &
    2926        19028 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
    2927              : 
    2928        19028 :       NULLIFY (keyword)
    2929              :       CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
    2930              :                           description="Value of the GCN for the individual atom. Order MUST reflect"// &
    2931              :                           " the one specified for the geometry.", repeats=.TRUE., usage="{Real}", &
    2932        19028 :                           default_r_val=0.0_dp, type_of_var=real_t)
    2933        19028 :       CALL section_add_keyword(section, keyword)
    2934        19028 :       CALL keyword_release(keyword)
    2935              : 
    2936        19028 :    END SUBROUTINE create_GCN_section
    2937              : 
    2938              : ! **************************************************************************************************
    2939              : !> \brief creates the input section for the qs part
    2940              : !> \param print_key ...
    2941              : !> \param label ...
    2942              : !> \param print_level ...
    2943              : !> \author teo
    2944              : ! **************************************************************************************************
    2945       104906 :    SUBROUTINE create_dipoles_section(print_key, label, print_level)
    2946              :       TYPE(section_type), POINTER                        :: print_key
    2947              :       CHARACTER(LEN=*), INTENT(IN)                       :: label
    2948              :       INTEGER, INTENT(IN)                                :: print_level
    2949              : 
    2950              :       TYPE(keyword_type), POINTER                        :: keyword
    2951              : 
    2952       104906 :       CPASSERT(.NOT. ASSOCIATED(print_key))
    2953              :       CALL cp_print_key_section_create(print_key, __LOCATION__, name=TRIM(label), &
    2954              :                                        description="Section controlling the calculation of "//TRIM(label)//"."// &
    2955              :                                        " Note that the result in the periodic case might be defined modulo a certain period,"// &
    2956              :                                        " determined by the lattice vectors. During MD, this can lead to jumps.", &
    2957       104906 :                                        print_level=print_level, filename="__STD_OUT__")
    2958              : 
    2959       104906 :       NULLIFY (keyword)
    2960              :       CALL keyword_create(keyword, __LOCATION__, &
    2961              :                           name="PERIODIC", &
    2962              :                           description="Use Berry phase formula (PERIODIC=T) or simple operator (PERIODIC=F). "// &
    2963              :                           "The latter normally requires that the CELL is periodic NONE.", &
    2964              :                           usage="PERIODIC {logical}", &
    2965              :                           repeats=.FALSE., &
    2966              :                           n_var=1, &
    2967       104906 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
    2968       104906 :       CALL section_add_keyword(print_key, keyword)
    2969       104906 :       CALL keyword_release(keyword)
    2970              : 
    2971              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE", &
    2972              :                           variants=s2a("REF"), &
    2973              :                           description="Define the reference point for the calculation of the electrostatic moment.", &
    2974              :                           usage="REFERENCE COM", &
    2975              :                           enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
    2976              :                           enum_desc=s2a("Use Center of Mass", &
    2977              :                                         "Use Center of Atomic Charges", &
    2978              :                                         "Use User Defined Point (Keyword:REF_POINT)", &
    2979              :                                         "Use Origin of Coordinate System"), &
    2980              :                           enum_i_vals=[use_mom_ref_com, &
    2981              :                                        use_mom_ref_coac, &
    2982              :                                        use_mom_ref_user, &
    2983              :                                        use_mom_ref_zero], &
    2984       104906 :                           default_i_val=use_mom_ref_zero)
    2985       104906 :       CALL section_add_keyword(print_key, keyword)
    2986       104906 :       CALL keyword_release(keyword)
    2987              : 
    2988              :       CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT", &
    2989              :                           variants=s2a("REF_POINT"), &
    2990              :                           description="Fixed reference point for the calculations of the electrostatic moment.", &
    2991              :                           usage="REFERENCE_POINT x y z", &
    2992              :                           repeats=.FALSE., &
    2993              :                           n_var=3, default_r_vals=[0._dp, 0._dp, 0._dp], &
    2994              :                           type_of_var=real_t, &
    2995       104906 :                           unit_str='bohr')
    2996       104906 :       CALL section_add_keyword(print_key, keyword)
    2997       104906 :       CALL keyword_release(keyword)
    2998       104906 :    END SUBROUTINE create_dipoles_section
    2999              : 
    3000              : END MODULE input_cp2k_mm
        

Generated by: LCOV version 2.0-1