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 EIP section of the input
10 : !> \par History
11 : !> 03.2006 created
12 : !> \author Thomas D. Kuehne (tkuehne@cp2k.org)
13 : ! **************************************************************************************************
14 : MODULE input_cp2k_eip
15 : USE bibliography, ONLY: Bazant1996,&
16 : Bazant1997,&
17 : Goedecker2002,&
18 : Lenosky2000,&
19 : Stillinger1985,&
20 : Tersoff1988
21 : USE cp_output_handling, ONLY: cp_print_key_section_create,&
22 : high_print_level,&
23 : medium_print_level
24 : USE input_constants, ONLY: use_bazant_eip,&
25 : use_lenosky_eip,&
26 : use_stillinger_weber_eip,&
27 : use_tersoff_eip
28 : USE input_keyword_types, ONLY: keyword_create,&
29 : keyword_release,&
30 : keyword_type
31 : USE input_section_types, ONLY: section_add_keyword,&
32 : section_add_subsection,&
33 : section_create,&
34 : section_release,&
35 : section_type
36 : USE input_val_types, ONLY: enum_t
37 : USE string_utilities, ONLY: s2a
38 : #include "./base/base_uses.f90"
39 :
40 : IMPLICIT NONE
41 : PRIVATE
42 :
43 : LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
44 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_eip'
45 :
46 : PUBLIC :: create_eip_section
47 :
48 : CONTAINS
49 :
50 : ! **************************************************************************************************
51 : !> \brief Create the input section for EIP
52 : !> \param section the section to create
53 : !> \par History
54 : !> 03.2006 created
55 : !> \author Thomas D. Kuehne (tkuehne@cp2k.org)
56 : ! **************************************************************************************************
57 9823 : SUBROUTINE create_eip_section(section)
58 : TYPE(section_type), POINTER :: section
59 :
60 : TYPE(keyword_type), POINTER :: keyword
61 : TYPE(section_type), POINTER :: subsection
62 :
63 : ! ------------------------------------------------------------------------
64 :
65 9823 : CPASSERT(.NOT. ASSOCIATED(section))
66 : CALL section_create(section, __LOCATION__, name="EIP", &
67 : description="This section contains all information to run an "// &
68 : "Empirical Interatomic Potential (EIP) calculation.", &
69 : n_keywords=1, n_subsections=1, repeats=.FALSE., &
70 : citations=[Bazant1996, Bazant1997, Goedecker2002, Lenosky2000, &
71 68761 : Stillinger1985, Tersoff1988])
72 :
73 9823 : NULLIFY (subsection, keyword)
74 :
75 : CALL keyword_create(keyword, __LOCATION__, name="EIP_MODEL", &
76 : description="Selects the empirical interaction potential model. "// &
77 : "EDIP is accepted as an alias of BAZANT and uses the identical "// &
78 : "implementation. EIP is currently supported only for a single "// &
79 : "MPI rank. BAZANT and LENOSKY retain OpenMP parallelization, "// &
80 : "while STILLINGER_WEBER and TERSOFF currently run without "// &
81 : "OpenMP parallelization.", &
82 : usage="EIP_MODEL BAZANT", type_of_var=enum_t, &
83 : n_var=1, repeats=.FALSE., variants=["EIP-MODEL"], &
84 : enum_c_vals=s2a("BAZANT", "EDIP", "LENOSKY", &
85 : "STILLINGER_WEBER", "TERSOFF"), &
86 : enum_i_vals=[use_bazant_eip, use_bazant_eip, use_lenosky_eip, &
87 : use_stillinger_weber_eip, use_tersoff_eip], &
88 : enum_desc=s2a("Bazant potentials", &
89 : "Environment-Dependent Interatomic Potential", &
90 : "Lenosky potentials", &
91 : "Stillinger-Weber potentials", &
92 : "Tersoff potentials"), &
93 19646 : default_i_val=use_lenosky_eip)
94 9823 : CALL section_add_keyword(section, keyword)
95 9823 : CALL keyword_release(keyword)
96 :
97 9823 : CALL create_eip_print_section(subsection)
98 9823 : CALL section_add_subsection(section, subsection)
99 9823 : CALL section_release(subsection)
100 :
101 9823 : END SUBROUTINE create_eip_section
102 :
103 : ! **************************************************************************************************
104 : !> \brief Creates the print section for the eip subsection
105 : !> \param section the section to create
106 : !> \par History
107 : !> 03.2006 created
108 : !> \author Thomas D. Kuehne (tkuehne@cp2k.org)
109 : ! **************************************************************************************************
110 9823 : SUBROUTINE create_eip_print_section(section)
111 : TYPE(section_type), POINTER :: section
112 :
113 : TYPE(section_type), POINTER :: print_key
114 :
115 : ! ------------------------------------------------------------------------
116 :
117 9823 : CPASSERT(.NOT. ASSOCIATED(section))
118 : CALL section_create(section, __LOCATION__, name="PRINT", &
119 : description="Section of possible print options in EIP code.", &
120 9823 : n_keywords=0, n_subsections=6, repeats=.FALSE.)
121 :
122 9823 : NULLIFY (print_key)
123 :
124 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGIES", &
125 : description="Controls the printing of the EIP energies.", &
126 9823 : print_level=medium_print_level, filename="__STD_OUT__")
127 9823 : CALL section_add_subsection(section, print_key)
128 9823 : CALL section_release(print_key)
129 :
130 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGIES_VAR", &
131 : description="Controls the printing of the variance of the EIP energies.", &
132 9823 : print_level=high_print_level, filename="__STD_OUT__")
133 9823 : CALL section_add_subsection(section, print_key)
134 9823 : CALL section_release(print_key)
135 :
136 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES", &
137 : description="Controls the printing of the EIP forces.", &
138 9823 : print_level=medium_print_level, filename="__STD_OUT__")
139 9823 : CALL section_add_subsection(section, print_key)
140 9823 : CALL section_release(print_key)
141 :
142 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COORD_AVG", &
143 : description="Controls the printing of the average coordination number.", &
144 9823 : print_level=high_print_level, filename="__STD_OUT__")
145 9823 : CALL section_add_subsection(section, print_key)
146 9823 : CALL section_release(print_key)
147 :
148 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COORD_VAR", &
149 : description="Controls the printing of the variance of the coordination number.", &
150 9823 : print_level=high_print_level, filename="__STD_OUT__")
151 9823 : CALL section_add_subsection(section, print_key)
152 9823 : CALL section_release(print_key)
153 :
154 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COUNT", &
155 : description="Controls the printing of the number of function calls.", &
156 9823 : print_level=high_print_level, filename="__STD_OUT__")
157 9823 : CALL section_add_subsection(section, print_key)
158 9823 : CALL section_release(print_key)
159 :
160 9823 : END SUBROUTINE create_eip_print_section
161 :
162 : END MODULE input_cp2k_eip
|