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

Generated by: LCOV version 2.0-1