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