(git:b77b4be)
Loading...
Searching...
No Matches
input_cp2k_harris.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Harris input section
10! **************************************************************************************************
12 USE input_constants, ONLY: hden_atomic,&
21 USE string_utilities, ONLY: s2a
22#include "./base/base_uses.f90"
23
24 IMPLICIT NONE
25 PRIVATE
26
27 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_harris'
28
29 PUBLIC :: create_harris_section
30
31CONTAINS
32
33! **************************************************************************************************
34!> \brief creates the HARRIS_METHOD section
35!> \param section ...
36!> \author JGH
37! **************************************************************************************************
38 SUBROUTINE create_harris_section(section)
39 TYPE(section_type), POINTER :: section
40
41 TYPE(keyword_type), POINTER :: keyword
42
43 cpassert(.NOT. ASSOCIATED(section))
44
45 NULLIFY (keyword)
46 CALL section_create(section, __location__, name="HARRIS_METHOD", &
47 description="Sets the various options for the Harris method", &
48 n_keywords=5, n_subsections=0, repeats=.false.)
49
50 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
51 description="Controls the activation of the Harris method", &
52 usage="&HARRIS_METHOD T", &
53 default_l_val=.false., &
54 lone_keyword_l_val=.true.)
55 CALL section_add_keyword(section, keyword)
56 CALL keyword_release(keyword)
57
58 CALL keyword_create(keyword, __location__, name="ENERGY_FUNCTIONAL", &
59 description="Functional used in energy correction", &
60 usage="ENERGY_FUNCTIONAL HARRIS", &
61 default_i_val=hfun_harris, &
62 enum_c_vals=s2a("HARRIS"), &
63 enum_desc=s2a("Harris functional"), &
64 enum_i_vals=(/hfun_harris/))
65 CALL section_add_keyword(section, keyword)
66 CALL keyword_release(keyword)
67
68 CALL keyword_create(keyword, __location__, name="DENSITY_SOURCE", &
69 description="Method to create the input density", &
70 usage="DENSITY_SOURCE ATOMIC", &
71 default_i_val=hden_atomic, &
72 enum_c_vals=s2a("ATOMIC"), &
73 enum_desc=s2a("Atomic densities"), &
74 enum_i_vals=(/hden_atomic/))
75 CALL section_add_keyword(section, keyword)
76 CALL keyword_release(keyword)
77
78 CALL keyword_create(keyword, __location__, name="ORBITAL_BASIS", &
79 description="Specifies the type of basis to be used for the energy functional. ", &
80 default_i_val=horb_default, &
81 enum_c_vals=s2a("ATOMIC_KIND_BASIS"), &
82 enum_desc=s2a("Atomic kind orbital basis"), &
83 enum_i_vals=(/horb_default/))
84 CALL section_add_keyword(section, keyword)
85 CALL keyword_release(keyword)
86
87 CALL keyword_create(keyword, __location__, name="DEBUG_FORCES", &
88 description="Additional output to debug Harris method forces.", &
89 usage="DEBUG_FORCES T", default_l_val=.false., lone_keyword_l_val=.true.)
90 CALL section_add_keyword(section, keyword)
91 CALL keyword_release(keyword)
92 CALL keyword_create(keyword, __location__, name="DEBUG_STRESS", &
93 description="Additional output to debug Harris method stress.", &
94 usage="DEBUG_STRESS T", default_l_val=.false., lone_keyword_l_val=.true.)
95 CALL section_add_keyword(section, keyword)
96 CALL keyword_release(keyword)
97
98 END SUBROUTINE create_harris_section
99
100END MODULE input_cp2k_harris
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public hfun_harris
integer, parameter, public horb_default
integer, parameter, public hden_atomic
Harris input section.
subroutine, public create_harris_section(section)
creates the HARRIS_METHOD section
represents keywords in an input
subroutine, public keyword_release(keyword)
releases the given keyword (see doc/ReferenceCounting.html)
subroutine, public keyword_create(keyword, location, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations, deprecation_notice, removed)
creates a keyword object
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_create(section, location, name, description, n_keywords, n_subsections, repeats, citations, deprecation_notice)
creates a list of keywords
subroutine, public section_add_keyword(section, keyword)
adds a keyword to the given section
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file