LCOV - code coverage report
Current view: top level - src - input_cp2k_eip.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:2fce0f8) Lines: 34 34 100.0 %
Date: 2024-12-21 06:28:57 Functions: 2 2 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2024 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief Creates the EIP section of the input
      10             : !> \par History
      11             : !>      03.2006 created
      12             : !> \author Thomas D. Kuehne (tkuehne@phys.chem.ethz.ch)
      13             : ! **************************************************************************************************
      14             : MODULE input_cp2k_eip
      15             :    USE cp_output_handling,              ONLY: cp_print_key_section_create,&
      16             :                                               high_print_level,&
      17             :                                               medium_print_level
      18             :    USE input_constants,                 ONLY: use_bazant_eip,&
      19             :                                               use_lenosky_eip
      20             :    USE input_keyword_types,             ONLY: keyword_create,&
      21             :                                               keyword_release,&
      22             :                                               keyword_type
      23             :    USE input_section_types,             ONLY: section_add_keyword,&
      24             :                                               section_add_subsection,&
      25             :                                               section_create,&
      26             :                                               section_release,&
      27             :                                               section_type
      28             :    USE input_val_types,                 ONLY: enum_t
      29             :    USE string_utilities,                ONLY: s2a
      30             : #include "./base/base_uses.f90"
      31             : 
      32             :    IMPLICIT NONE
      33             :    PRIVATE
      34             : 
      35             :    LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
      36             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_eip'
      37             : 
      38             :    PUBLIC :: create_eip_section
      39             : 
      40             : CONTAINS
      41             : 
      42             : ! **************************************************************************************************
      43             : !> \brief Create the input section for EIP
      44             : !> \param section the section to create
      45             : !> \par History
      46             : !>      03.2006 created
      47             : !> \author Thomas D. Kuehne (tkuehne@phys.chem.ethz.ch)
      48             : ! **************************************************************************************************
      49        9174 :    SUBROUTINE create_eip_section(section)
      50             :       TYPE(section_type), POINTER                        :: section
      51             : 
      52             :       TYPE(keyword_type), POINTER                        :: keyword
      53             :       TYPE(section_type), POINTER                        :: subsection
      54             : 
      55             : !   ------------------------------------------------------------------------
      56             : 
      57        9174 :       CPASSERT(.NOT. ASSOCIATED(section))
      58             :       CALL section_create(section, __LOCATION__, name="EIP", &
      59             :                           description="This section contains all information to run an "// &
      60             :                           "Empirical Interatomic Potential (EIP) calculation.", &
      61        9174 :                           n_keywords=1, n_subsections=1, repeats=.FALSE.)
      62             : 
      63        9174 :       NULLIFY (subsection, keyword)
      64             : 
      65             :       CALL keyword_create(keyword, __LOCATION__, name="EIP_MODEL", &
      66             :                           description="Selects the empirical interaction potential model", &
      67             :                           usage="EIP_MODEL BAZANT", type_of_var=enum_t, &
      68             :                           n_var=1, repeats=.FALSE., variants=(/"EIP-MODEL"/), &
      69             :                           enum_c_vals=s2a("BAZANT", "EDIP", "LENOSKY"), &
      70             :                           enum_i_vals=(/use_bazant_eip, use_bazant_eip, use_lenosky_eip/), &
      71             :                           enum_desc=s2a("Bazant potentials", &
      72             :                                         "Environment-Dependent Interatomic Potential", &
      73             :                                         "Lenosky potentials"), &
      74       18348 :                           default_i_val=use_lenosky_eip)
      75        9174 :       CALL section_add_keyword(section, keyword)
      76        9174 :       CALL keyword_release(keyword)
      77             : 
      78        9174 :       CALL create_eip_print_section(subsection)
      79        9174 :       CALL section_add_subsection(section, subsection)
      80        9174 :       CALL section_release(subsection)
      81             : 
      82        9174 :    END SUBROUTINE create_eip_section
      83             : 
      84             : ! **************************************************************************************************
      85             : !> \brief Creates the print section for the eip subsection
      86             : !> \param section the section to create
      87             : !> \par History
      88             : !>      03.2006 created
      89             : !> \author Thomas D. Kuehne (tkuehne@phys.chem.ethz.ch)
      90             : ! **************************************************************************************************
      91        9174 :    SUBROUTINE create_eip_print_section(section)
      92             :       TYPE(section_type), POINTER                        :: section
      93             : 
      94             :       TYPE(section_type), POINTER                        :: print_key
      95             : 
      96             : !   ------------------------------------------------------------------------
      97             : 
      98        9174 :       CPASSERT(.NOT. ASSOCIATED(section))
      99             :       CALL section_create(section, __LOCATION__, name="PRINT", &
     100             :                           description="Section of possible print options in EIP code.", &
     101        9174 :                           n_keywords=0, n_subsections=6, repeats=.FALSE.)
     102             : 
     103        9174 :       NULLIFY (print_key)
     104             : 
     105             :       CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGIES", &
     106             :                                        description="Controls the printing of the EIP energies.", &
     107        9174 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     108        9174 :       CALL section_add_subsection(section, print_key)
     109        9174 :       CALL section_release(print_key)
     110             : 
     111             :       CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGIES_VAR", &
     112             :                                        description="Controls the printing of the variance of the EIP energies.", &
     113        9174 :                                        print_level=high_print_level, filename="__STD_OUT__")
     114        9174 :       CALL section_add_subsection(section, print_key)
     115        9174 :       CALL section_release(print_key)
     116             : 
     117             :       CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES", &
     118             :                                        description="Controls the printing of the EIP forces.", &
     119        9174 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     120        9174 :       CALL section_add_subsection(section, print_key)
     121        9174 :       CALL section_release(print_key)
     122             : 
     123             :       CALL cp_print_key_section_create(print_key, __LOCATION__, "COORD_AVG", &
     124             :                                        description="Controls the printing of the average coordination number.", &
     125        9174 :                                        print_level=high_print_level, filename="__STD_OUT__")
     126        9174 :       CALL section_add_subsection(section, print_key)
     127        9174 :       CALL section_release(print_key)
     128             : 
     129             :       CALL cp_print_key_section_create(print_key, __LOCATION__, "COORD_VAR", &
     130             :                                        description="Controls the printing of the variance of the coordination number.", &
     131        9174 :                                        print_level=high_print_level, filename="__STD_OUT__")
     132        9174 :       CALL section_add_subsection(section, print_key)
     133        9174 :       CALL section_release(print_key)
     134             : 
     135             :       CALL cp_print_key_section_create(print_key, __LOCATION__, "COUNT", &
     136             :                                        description="Controls the printing of the number of function calls.", &
     137        9174 :                                        print_level=high_print_level, filename="__STD_OUT__")
     138        9174 :       CALL section_add_subsection(section, print_key)
     139        9174 :       CALL section_release(print_key)
     140             : 
     141        9174 :    END SUBROUTINE create_eip_print_section
     142             : 
     143             : END MODULE input_cp2k_eip

Generated by: LCOV version 1.15