LCOV - code coverage report
Current view: top level - src - input_cp2k_eip.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:9843133) Lines: 34 34 100.0 %
Date: 2024-05-10 06:53:45 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        8388 :    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        8388 :       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        8388 :                           n_keywords=1, n_subsections=1, repeats=.FALSE.)
      62             : 
      63        8388 :       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       16776 :                           default_i_val=use_lenosky_eip)
      75        8388 :       CALL section_add_keyword(section, keyword)
      76        8388 :       CALL keyword_release(keyword)
      77             : 
      78        8388 :       CALL create_eip_print_section(subsection)
      79        8388 :       CALL section_add_subsection(section, subsection)
      80        8388 :       CALL section_release(subsection)
      81             : 
      82        8388 :    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        8388 :    SUBROUTINE create_eip_print_section(section)
      92             :       TYPE(section_type), POINTER                        :: section
      93             : 
      94             :       TYPE(section_type), POINTER                        :: print_key
      95             : 
      96             : !   ------------------------------------------------------------------------
      97             : 
      98        8388 :       CPASSERT(.NOT. ASSOCIATED(section))
      99             :       CALL section_create(section, __LOCATION__, name="PRINT", &
     100             :                           description="Section of possible print options in EIP code.", &
     101        8388 :                           n_keywords=0, n_subsections=6, repeats=.FALSE.)
     102             : 
     103        8388 :       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        8388 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     108        8388 :       CALL section_add_subsection(section, print_key)
     109        8388 :       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        8388 :                                        print_level=high_print_level, filename="__STD_OUT__")
     114        8388 :       CALL section_add_subsection(section, print_key)
     115        8388 :       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        8388 :                                        print_level=medium_print_level, filename="__STD_OUT__")
     120        8388 :       CALL section_add_subsection(section, print_key)
     121        8388 :       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        8388 :                                        print_level=high_print_level, filename="__STD_OUT__")
     126        8388 :       CALL section_add_subsection(section, print_key)
     127        8388 :       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        8388 :                                        print_level=high_print_level, filename="__STD_OUT__")
     132        8388 :       CALL section_add_subsection(section, print_key)
     133        8388 :       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        8388 :                                        print_level=high_print_level, filename="__STD_OUT__")
     138        8388 :       CALL section_add_subsection(section, print_key)
     139        8388 :       CALL section_release(print_key)
     140             : 
     141        8388 :    END SUBROUTINE create_eip_print_section
     142             : 
     143             : END MODULE input_cp2k_eip

Generated by: LCOV version 1.15