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 Excited state input section
10 : !> \par History
11 : !> 01.2020 created
12 : !> \author jgh
13 : ! **************************************************************************************************
14 : MODULE input_cp2k_exstate
15 : USE input_constants, ONLY: xc_kernel_method_analytic,&
16 : xc_kernel_method_best,&
17 : xc_kernel_method_numeric
18 : USE input_keyword_types, ONLY: keyword_create,&
19 : keyword_release,&
20 : keyword_type
21 : USE input_section_types, ONLY: section_add_keyword,&
22 : section_create,&
23 : section_type
24 : USE kinds, ONLY: dp
25 : USE string_utilities, ONLY: s2a
26 : #include "./base/base_uses.f90"
27 :
28 : IMPLICIT NONE
29 : PRIVATE
30 :
31 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_exstate'
32 :
33 : PUBLIC :: create_exstate_section
34 :
35 : CONTAINS
36 :
37 : ! **************************************************************************************************
38 : !> \brief creates the EXCITED ENERGY section
39 : !> \param section ...
40 : !> \author JGH
41 : ! **************************************************************************************************
42 8546 : SUBROUTINE create_exstate_section(section)
43 : TYPE(section_type), POINTER :: section
44 :
45 : TYPE(keyword_type), POINTER :: keyword
46 :
47 8546 : CPASSERT(.NOT. ASSOCIATED(section))
48 :
49 8546 : NULLIFY (keyword)
50 : CALL section_create(section, __LOCATION__, name="EXCITED_STATES", &
51 : description="Sets the various options for Excited State Potential Energy Calculations", &
52 8546 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
53 :
54 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
55 : description="Controls the activation of the excited states", &
56 : usage="&EXCITED_STATES T", &
57 : default_l_val=.FALSE., &
58 8546 : lone_keyword_l_val=.TRUE.)
59 8546 : CALL section_add_keyword(section, keyword)
60 8546 : CALL keyword_release(keyword)
61 :
62 : CALL keyword_create(keyword, __LOCATION__, name="STATE", &
63 : description="Excited state to be used in calculation. Negative values indicate state following.", &
64 : usage="STATE 2", &
65 8546 : default_i_val=1)
66 8546 : CALL section_add_keyword(section, keyword)
67 8546 : CALL keyword_release(keyword)
68 :
69 : CALL keyword_create(keyword, __LOCATION__, name="XC_KERNEL_METHOD", &
70 : description="Method to evaluate XC Kernel contributions to forces", &
71 : usage="XC_KERNEL_METHOD (BEST_AVAILABLE|ANALYTIC|NUMERIC)", &
72 : enum_c_vals=s2a("BEST_AVAILABLE", "ANALYTIC", "NUMERIC"), &
73 : enum_i_vals=(/xc_kernel_method_best, xc_kernel_method_analytic, xc_kernel_method_numeric/), &
74 8546 : default_i_val=xc_kernel_method_best)
75 8546 : CALL section_add_keyword(section, keyword)
76 8546 : CALL keyword_release(keyword)
77 :
78 : CALL keyword_create(keyword, __LOCATION__, name="EPS_DELTA_RHO", &
79 : description="Step size for finite difference calculation of functional derivatives.", &
80 : usage="EPS_DELTA_RHO 1.E-02", &
81 8546 : default_r_val=1.E-03_dp)
82 8546 : CALL section_add_keyword(section, keyword)
83 8546 : CALL keyword_release(keyword)
84 :
85 : CALL keyword_create(keyword, __LOCATION__, name="DIFF_ORDER", &
86 : description="Order of finite differentiation formula used for functional derivatives.", &
87 : usage="DIFF_ORDER 4", &
88 8546 : default_i_val=6)
89 8546 : CALL section_add_keyword(section, keyword)
90 8546 : CALL keyword_release(keyword)
91 :
92 : CALL keyword_create(keyword, __LOCATION__, name="OVERLAP_DELTAT", &
93 : description="Keyword for the computation of the overlap matrix between two consecutive time steps.", &
94 : usage="OVERLAP_DELTAT", &
95 : default_l_val=.FALSE., &
96 8546 : lone_keyword_l_val=.TRUE.)
97 8546 : CALL section_add_keyword(section, keyword)
98 8546 : CALL keyword_release(keyword)
99 :
100 : CALL keyword_create(keyword, __LOCATION__, name="DEBUG_FORCES", &
101 : description="Activate printing of intermediate forces in excited state force calculations.", &
102 : usage="DEBUG_FORCES T", &
103 : default_l_val=.FALSE., &
104 8546 : lone_keyword_l_val=.TRUE.)
105 8546 : CALL section_add_keyword(section, keyword)
106 8546 : CALL keyword_release(keyword)
107 :
108 8546 : END SUBROUTINE create_exstate_section
109 :
110 : END MODULE input_cp2k_exstate
|