(git:98357aa)
Loading...
Searching...
No Matches
cell_opt_utils.F
Go to the documentation of this file.
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 contains a functional that calculates the energy and its derivatives
10!> for the geometry optimizer
11!> \par History
12!> 03.2008 - Teodoro Laino [tlaino] - University of Zurich - Cell Optimization
13! **************************************************************************************************
15 USE cell_types, ONLY: &
20 USE cp_files, ONLY: close_file,&
29 USE input_constants, ONLY: fix_none,&
30 fix_x,&
31 fix_xy,&
32 fix_xz,&
33 fix_y,&
34 fix_yz,&
35 fix_z
47 USE kinds, ONLY: default_path_length,&
49 dp
50 USE mathconstants, ONLY: sqrt3
51 USE mathlib, ONLY: angle,&
54#include "../base/base_uses.f90"
55
56 IMPLICIT NONE
57 PRIVATE
58
59 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
60 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cell_opt_utils'
61
65
66CONTAINS
67
68! **************************************************************************************************
69!> \brief creates a new logger used for cell optimization algorithm
70!> \param new_logger ...
71!> \param root_section ...
72!> \param para_env ...
73!> \param project_name ...
74!> \param id_run ...
75!> \author Teodoro Laino [tlaino] - University of Zurich - 03.2008
76! **************************************************************************************************
77 SUBROUTINE gopt_new_logger_create(new_logger, root_section, para_env, project_name, &
78 id_run)
79 TYPE(cp_logger_type), POINTER :: new_logger
80 TYPE(section_vals_type), POINTER :: root_section
81 TYPE(mp_para_env_type), POINTER :: para_env
82 CHARACTER(len=default_string_length), INTENT(OUT) :: project_name
83 INTEGER, INTENT(IN) :: id_run
84
85 CHARACTER(len=default_path_length) :: c_val, input_file_path, output_file_path
86 CHARACTER(len=default_string_length) :: label
87 INTEGER :: i, lp, unit_nr
88 TYPE(cp_logger_type), POINTER :: logger
89 TYPE(enumeration_type), POINTER :: enum
90 TYPE(keyword_type), POINTER :: keyword
91 TYPE(section_type), POINTER :: section
92
93 NULLIFY (new_logger, logger, enum, keyword, section)
94 logger => cp_get_default_logger()
95
96 CALL create_global_section(section)
97 keyword => section_get_keyword(section, "RUN_TYPE")
98 CALL keyword_get(keyword, enum=enum)
99 label = trim(enum_i2c(enum, id_run))
100 CALL section_release(section)
101
102 ! Redirecting output of the sub_calculation to a different file
103 CALL section_vals_val_get(root_section, "GLOBAL%PROJECT_NAME", c_val=project_name)
104 input_file_path = trim(project_name)
105 lp = len_trim(input_file_path)
106 i = logger%iter_info%iteration(logger%iter_info%n_rlevel)
107 input_file_path(lp + 1:len(input_file_path)) = "-"//trim(label)//"-"//adjustl(cp_to_string(i))
108 lp = len_trim(input_file_path)
109 CALL section_vals_val_set(root_section, "GLOBAL%PROJECT_NAME", c_val=input_file_path(1:lp))
110 CALL section_vals_val_set(root_section, "GLOBAL%RUN_TYPE", i_val=id_run)
111
112 ! Redirecting output into a new file
113 output_file_path = input_file_path(1:lp)//".out"
114 IF (para_env%is_source()) THEN
115 CALL open_file(file_name=output_file_path, file_status="UNKNOWN", &
116 file_action="WRITE", file_position="APPEND", unit_number=unit_nr)
117 ELSE
118 unit_nr = -1
119 END IF
120 CALL cp_logger_create(new_logger, para_env=para_env, default_global_unit_nr=unit_nr, &
121 close_global_unit_on_dealloc=.false.)
122 CALL section_vals_val_get(root_section, "GLOBAL%PROJECT", c_val=c_val)
123 IF (c_val /= "") THEN
124 CALL cp_logger_set(new_logger, local_filename=trim(c_val)//"_localLog")
125 END IF
126 new_logger%iter_info%project_name = trim(c_val)
127 CALL section_vals_val_get(root_section, "GLOBAL%PRINT_LEVEL", &
128 i_val=new_logger%iter_info%print_level)
129
130 END SUBROUTINE gopt_new_logger_create
131
132! **************************************************************************************************
133!> \brief releases a new logger used for cell optimization algorithm
134!> \param new_logger ...
135!> \param root_section ...
136!> \param para_env ...
137!> \param project_name ...
138!> \param id_run ...
139!> \author Teodoro Laino [tlaino] - University of Zurich - 03.2008
140! **************************************************************************************************
141 SUBROUTINE gopt_new_logger_release(new_logger, root_section, para_env, project_name, id_run)
142 TYPE(cp_logger_type), POINTER :: new_logger
143 TYPE(section_vals_type), POINTER :: root_section
144 TYPE(mp_para_env_type), POINTER :: para_env
145 CHARACTER(len=default_string_length), INTENT(IN) :: project_name
146 INTEGER, INTENT(IN) :: id_run
147
148 INTEGER :: unit_nr
149
150 IF (para_env%is_source()) THEN
151 unit_nr = cp_logger_get_default_unit_nr(new_logger)
152 CALL close_file(unit_number=unit_nr)
153 END IF
154 CALL cp_logger_release(new_logger)
155 CALL section_vals_val_set(root_section, "GLOBAL%RUN_TYPE", i_val=id_run)
156 CALL section_vals_val_set(root_section, "GLOBAL%PROJECT_NAME", c_val=project_name)
157
158 END SUBROUTINE gopt_new_logger_release
159
160! **************************************************************************************************
161!> \brief Reads the external pressure tensor
162!> \param geo_section ...
163!> \param cell ...
164!> \param pres_ext ...
165!> \param mtrx ...
166!> \param input_to_opt rotation from the input Cartesian frame to the optimization frame
167!> \author Teodoro Laino [tlaino] - University of Zurich - 03.2008
168! **************************************************************************************************
169 SUBROUTINE read_external_press_tensor(geo_section, cell, pres_ext, mtrx, input_to_opt)
170 TYPE(section_vals_type), POINTER :: geo_section
171 TYPE(cell_type), POINTER :: cell
172 REAL(kind=dp), INTENT(OUT) :: pres_ext
173 REAL(kind=dp), DIMENSION(3, 3), INTENT(OUT) :: mtrx
174 REAL(kind=dp), DIMENSION(3, 3), INTENT(IN) :: input_to_opt
175
176 INTEGER :: i, ind, j
177 LOGICAL :: check
178 REAL(kind=dp), DIMENSION(3, 3) :: pres_ext_tens
179 REAL(kind=dp), DIMENSION(:), POINTER :: pvals
180
181 NULLIFY (pvals)
182 mtrx = 0.0_dp
183 pres_ext_tens = 0.0_dp
184 pres_ext = 0.0_dp
185 CALL section_vals_val_get(geo_section, "EXTERNAL_PRESSURE", r_vals=pvals)
186 check = (SIZE(pvals) == 1) .OR. (SIZE(pvals) == 9)
187 IF (.NOT. check) THEN
188 cpabort("EXTERNAL_PRESSURE can have 1 or 9 components only!")
189 END IF
190
191 IF (SIZE(pvals) == 9) THEN
192 ind = 0
193 DO i = 1, 3
194 DO j = 1, 3
195 ind = ind + 1
196 pres_ext_tens(j, i) = pvals(ind)
197 END DO
198 END DO
199 ! Express the pressure tensor in the canonical optimization frame.
200 pres_ext_tens = matmul(input_to_opt, &
201 matmul(pres_ext_tens, transpose(input_to_opt)))
202 DO i = 1, 3
203 pres_ext = pres_ext + pres_ext_tens(i, i)
204 END DO
205 pres_ext = pres_ext/3.0_dp
206 DO i = 1, 3
207 pres_ext_tens(i, i) = pres_ext_tens(i, i) - pres_ext
208 END DO
209 ELSE
210 pres_ext = pvals(1)
211 END IF
212
213 IF (any(abs(pres_ext_tens) > 1.0e-5_dp)) THEN
214 mtrx = cell%deth*matmul(cell%h_inv, matmul(pres_ext_tens, transpose(cell%h_inv)))
215 END IF
216
217 END SUBROUTINE read_external_press_tensor
218
219! **************************************************************************************************
220!> \brief Computes the derivatives for the cell
221!> \param gradient ...
222!> \param av_ptens ...
223!> \param pres_ext ...
224!> \param cell ...
225!> \param mtrx ...
226!> \param keep_angles ...
227!> \param keep_symmetry ...
228!> \param pres_int ...
229!> \param pres_constr ...
230!> \param constraint_id ...
231!> \author Teodoro Laino [tlaino] - University of Zurich - 03.2008
232! **************************************************************************************************
233 SUBROUTINE get_dg_dh(gradient, av_ptens, pres_ext, cell, mtrx, keep_angles, &
234 keep_symmetry, pres_int, pres_constr, constraint_id)
235
236 REAL(kind=dp), DIMENSION(:), POINTER :: gradient
237 REAL(kind=dp), DIMENSION(3, 3), INTENT(IN) :: av_ptens
238 REAL(kind=dp), INTENT(IN) :: pres_ext
239 TYPE(cell_type), POINTER :: cell
240 REAL(kind=dp), DIMENSION(3, 3), INTENT(IN) :: mtrx
241 LOGICAL, INTENT(IN), OPTIONAL :: keep_angles, keep_symmetry
242 REAL(kind=dp), INTENT(OUT) :: pres_int, pres_constr
243 INTEGER, INTENT(IN), OPTIONAL :: constraint_id
244
245 INTEGER :: i, my_constraint_id
246 LOGICAL :: my_keep_angles, my_keep_symmetry
247 REAL(kind=dp), DIMENSION(3, 3) :: correction, pten_hinv_old, ptens
248
249 my_keep_angles = .false.
250 IF (PRESENT(keep_angles)) my_keep_angles = keep_angles
251 my_keep_symmetry = .false.
252 IF (PRESENT(keep_symmetry)) my_keep_symmetry = keep_symmetry
253 gradient = 0.0_dp
254 IF (PRESENT(constraint_id)) THEN
255 my_constraint_id = constraint_id
256 ELSE
257 my_constraint_id = fix_none
258 END IF
259
260 gradient = 0.0_dp
261
262 ptens = av_ptens
263
264 ! Evaluating the internal pressure
265 pres_int = 0.0_dp
266 DO i = 1, 3
267 pres_int = pres_int + ptens(i, i)
268 END DO
269 pres_int = pres_int/3.0_dp
270
271 SELECT CASE (my_constraint_id)
272 CASE (fix_x)
273 pres_constr = 0.5_dp*(ptens(2, 2) + ptens(3, 3))
274 CASE (fix_y)
275 pres_constr = 0.5_dp*(ptens(1, 1) + ptens(3, 3))
276 CASE (fix_z)
277 pres_constr = 0.5_dp*(ptens(1, 1) + ptens(2, 2))
278 CASE (fix_xy)
279 pres_constr = ptens(3, 3)
280 CASE (fix_xz)
281 pres_constr = ptens(2, 2)
282 CASE (fix_yz)
283 pres_constr = ptens(1, 1)
284 CASE (fix_none)
285 pres_constr = (ptens(1, 1) + ptens(2, 2) + ptens(3, 3))/3.0_dp
286 END SELECT
287
288 ptens(1, 1) = av_ptens(1, 1) - pres_ext
289 ptens(2, 2) = av_ptens(2, 2) - pres_ext
290 ptens(3, 3) = av_ptens(3, 3) - pres_ext
291
292 pten_hinv_old = cell%deth*matmul(cell%h_inv, ptens)
293 correction = matmul(mtrx, cell%hmat)
294
295 gradient(1) = pten_hinv_old(1, 1) - correction(1, 1)
296 gradient(2) = pten_hinv_old(2, 1) - correction(2, 1)
297 gradient(3) = pten_hinv_old(2, 2) - correction(2, 2)
298 gradient(4) = pten_hinv_old(3, 1) - correction(3, 1)
299 gradient(5) = pten_hinv_old(3, 2) - correction(3, 2)
300 gradient(6) = pten_hinv_old(3, 3) - correction(3, 3)
301
302 CALL apply_cell_constraints(gradient, cell, my_keep_angles, my_keep_symmetry, my_constraint_id)
303
304 gradient = -gradient
305
306 END SUBROUTINE get_dg_dh
307
308! **************************************************************************************************
309!> \brief Apply cell constraints
310!> \param gradient ...
311!> \param cell ...
312!> \param keep_angles ...
313!> \param keep_symmetry ...
314!> \param constraint_id ...
315!> \author Matthias Krack (October 26, 2017, MK)
316! **************************************************************************************************
317 SUBROUTINE apply_cell_constraints(gradient, cell, keep_angles, keep_symmetry, constraint_id)
318
319 REAL(kind=dp), DIMENSION(:), POINTER :: gradient
320 TYPE(cell_type), POINTER :: cell
321 LOGICAL, INTENT(IN) :: keep_angles, keep_symmetry
322 INTEGER, INTENT(IN) :: constraint_id
323
324 REAL(kind=dp) :: a, a_length, ab_length, b_length, cosa, &
325 cosah, cosg, deriv_gamma, g, gamma, &
326 norm, norm_b, norm_c, sina, sinah, sing
327
328 IF (keep_angles) THEN
329 ! If we want to keep the angles constant we have to project out the
330 ! components of the cell angles
331 norm_b = dot_product(cell%hmat(:, 2), cell%hmat(:, 2))
332 norm = dot_product(cell%hmat(1:2, 2), gradient(2:3))
333 gradient(2:3) = cell%hmat(1:2, 2)/norm_b*norm
334 norm_c = dot_product(cell%hmat(:, 3), cell%hmat(:, 3))
335 norm = dot_product(cell%hmat(1:3, 3), gradient(4:6))
336 gradient(4:6) = cell%hmat(1:3, 3)/norm_c*norm
337 ! Retain an exact orthorhombic cell
338 ! (off-diagonal elements must remain zero identically to keep QS fast)
339 IF (cell%orthorhombic) THEN
340 gradient(2) = 0.0_dp
341 gradient(4) = 0.0_dp
342 gradient(5) = 0.0_dp
343 END IF
344 END IF
345
346 IF (keep_symmetry) THEN
347 SELECT CASE (cell%symmetry_id)
348 CASE (cell_sym_cubic, &
353 SELECT CASE (cell%symmetry_id)
354 CASE (cell_sym_cubic)
355 g = (gradient(1) + gradient(3) + gradient(6))/3.0_dp
356 gradient(1) = g
357 gradient(3) = g
358 gradient(6) = g
362 SELECT CASE (cell%symmetry_id)
364 g = 0.5_dp*(gradient(1) + gradient(3))
365 gradient(1) = g
366 gradient(3) = g
368 g = 0.5_dp*(gradient(1) + gradient(6))
369 gradient(1) = g
370 gradient(6) = g
372 g = 0.5_dp*(gradient(3) + gradient(6))
373 gradient(3) = g
374 gradient(6) = g
375 END SELECT
377 ! Nothing else to do
378 END SELECT
379 gradient(2) = 0.0_dp
380 gradient(4) = 0.0_dp
381 gradient(5) = 0.0_dp
383 g = 0.5_dp*(gradient(1) + 0.5_dp*(gradient(2) + sqrt3*gradient(3)))
384 gradient(1) = g
385 gradient(2) = 0.5_dp*g
386 gradient(3) = sqrt3*gradient(2)
387 gradient(4) = 0.0_dp
388 gradient(5) = 0.0_dp
390 g = 0.5_dp*(gradient(1) - 0.5_dp*(gradient(2) - sqrt3*gradient(3)))
391 gradient(1) = g
392 gradient(2) = -0.5_dp*g
393 gradient(3) = -sqrt3*gradient(2)
394 gradient(4) = 0.0_dp
395 gradient(5) = 0.0_dp
397 a = (angle(cell%hmat(:, 3), cell%hmat(:, 2)) + &
398 angle(cell%hmat(:, 1), cell%hmat(:, 3)) + &
399 angle(cell%hmat(:, 1), cell%hmat(:, 2)))/3.0_dp
400 cosa = cos(a)
401 sina = sin(a)
402 cosah = cos(0.5_dp*a)
403 sinah = sin(0.5_dp*a)
404 norm = cosa/cosah
405 norm_c = sqrt(1.0_dp - norm*norm)
406 g = (gradient(1) + gradient(2)*cosa + gradient(3)*sina + &
407 gradient(4)*cosah*norm + gradient(5)*sinah*norm + gradient(6)*norm_c)/3.0_dp
408 gradient(1) = g
409 gradient(2) = g*cosa
410 gradient(3) = g*sina
411 gradient(4) = g*cosah*norm
412 gradient(5) = g*sinah*norm
413 gradient(6) = g*norm_c
415 gradient(2) = 0.0_dp
416 gradient(5) = 0.0_dp
418 ! Cell symmetry with a = b, alpha = beta = 90 degree and gammma not equal 90 degree
419 a_length = sqrt(cell%hmat(1, 1)*cell%hmat(1, 1) + &
420 cell%hmat(2, 1)*cell%hmat(2, 1) + &
421 cell%hmat(3, 1)*cell%hmat(3, 1))
422 b_length = sqrt(cell%hmat(1, 2)*cell%hmat(1, 2) + &
423 cell%hmat(2, 2)*cell%hmat(2, 2) + &
424 cell%hmat(3, 2)*cell%hmat(3, 2))
425 ab_length = 0.5_dp*(a_length + b_length)
426 gamma = angle(cell%hmat(:, 1), cell%hmat(:, 2))
427 cosg = cos(gamma)
428 sing = sin(gamma)
429 ! Here, g is the average derivative of the cell vector length ab_length,
430 ! and deriv_gamma is the derivative of the angle gamma
431 g = 0.5_dp*(gradient(1) + cosg*gradient(2) + sing*gradient(3))
432 deriv_gamma = (gradient(3)*cosg - gradient(2)*sing)/b_length
433 gradient(1) = g
434 gradient(2) = g*cosg - ab_length*sing*deriv_gamma
435 gradient(3) = g*sing + ab_length*cosg*deriv_gamma
436 gradient(4) = 0.0_dp
437 gradient(5) = 0.0_dp
438 CASE (cell_sym_triclinic)
439 ! Nothing to do
440 END SELECT
441 END IF
442
443 SELECT CASE (constraint_id)
444 CASE (fix_x)
445 gradient(1:2) = 0.0_dp
446 gradient(4) = 0.0_dp
447 CASE (fix_y)
448 gradient(2:3) = 0.0_dp
449 gradient(5) = 0.0_dp
450 CASE (fix_z)
451 gradient(4:6) = 0.0_dp
452 CASE (fix_xy)
453 gradient(1:5) = 0.0_dp
454 CASE (fix_xz)
455 gradient(1:2) = 0.0_dp
456 gradient(4:6) = 0.0_dp
457 CASE (fix_yz)
458 gradient(2:6) = 0.0_dp
459 CASE (fix_none)
460 ! Nothing to do
461 END SELECT
462
463 END SUBROUTINE apply_cell_constraints
464
465! **************************************************************************************************
466!> \brief Rescale x(idg+1:idg+6) according to vol
467!> \param vol ...
468!> \param x ...
469!> \param idg ...
470! **************************************************************************************************
471 SUBROUTINE rescale_new_cell_volume(vol, x, idg)
472
473 REAL(kind=dp), INTENT(IN) :: vol
474 REAL(kind=dp), DIMENSION(:), POINTER :: x
475 INTEGER, INTENT(IN) :: idg
476
477 INTEGER :: i, j, my_idg
478 REAL(kind=dp) :: ratio
479 REAL(kind=dp), DIMENSION(3, 3) :: hmat_tmp
480
481 cpassert((SIZE(x) == idg + 6))
482 my_idg = idg
483
484 hmat_tmp(:, :) = 0.0_dp
485 DO i = 1, 3
486 DO j = 1, i
487 my_idg = my_idg + 1
488 hmat_tmp(j, i) = x(my_idg)
489 END DO
490 END DO
491
492 ratio = vol/abs(det_3x3(hmat_tmp))
493 ratio = ratio**(1.0_dp/3.0_dp) ! no need to use EXP(LOG(ratio)/3) for cube root
494
495 my_idg = idg
496 DO i = 1, 3
497 DO j = 1, i
498 my_idg = my_idg + 1
499 x(my_idg) = x(my_idg)*ratio
500 END DO
501 END DO
502
503 END SUBROUTINE rescale_new_cell_volume
504
505END MODULE cell_opt_utils
contains a functional that calculates the energy and its derivatives for the geometry optimizer
subroutine, public apply_cell_constraints(gradient, cell, keep_angles, keep_symmetry, constraint_id)
Apply cell constraints.
subroutine, public rescale_new_cell_volume(vol, x, idg)
Rescale x(idg+1:idg+6) according to vol.
subroutine, public read_external_press_tensor(geo_section, cell, pres_ext, mtrx, input_to_opt)
Reads the external pressure tensor.
subroutine, public get_dg_dh(gradient, av_ptens, pres_ext, cell, mtrx, keep_angles, keep_symmetry, pres_int, pres_constr, constraint_id)
Computes the derivatives for the cell.
subroutine, public gopt_new_logger_release(new_logger, root_section, para_env, project_name, id_run)
releases a new logger used for cell optimization algorithm
subroutine, public gopt_new_logger_create(new_logger, root_section, para_env, project_name, id_run)
creates a new logger used for cell optimization algorithm
Handles all functions related to the CELL.
Definition cell_types.F:15
integer, parameter, public cell_sym_monoclinic
Definition cell_types.F:29
integer, parameter, public cell_sym_triclinic
Definition cell_types.F:29
integer, parameter, public cell_sym_tetragonal_ab
Definition cell_types.F:29
integer, parameter, public cell_sym_rhombohedral
Definition cell_types.F:29
integer, parameter, public cell_sym_tetragonal_ac
Definition cell_types.F:29
integer, parameter, public cell_sym_hexagonal_gamma_60
Definition cell_types.F:29
integer, parameter, public cell_sym_orthorhombic
Definition cell_types.F:29
integer, parameter, public cell_sym_hexagonal_gamma_120
Definition cell_types.F:29
integer, parameter, public cell_sym_monoclinic_gamma_ab
Definition cell_types.F:29
integer, parameter, public cell_sym_cubic
Definition cell_types.F:29
integer, parameter, public cell_sym_tetragonal_bc
Definition cell_types.F:29
Utility routines to open and close files. Tracking of preconnections.
Definition cp_files.F:16
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
Definition cp_files.F:311
subroutine, public close_file(unit_number, file_status, keep_preconnection)
Close an open file given by its logical unit number. Optionally, keep the file and unit preconnected.
Definition cp_files.F:122
various routines to log and control the output. The idea is that decisions about where to log should ...
recursive integer function, public cp_logger_get_default_unit_nr(logger, local, skip_not_ionode)
asks the default unit number of the given logger. try to use cp_logger_get_unit_nr
subroutine, public cp_logger_set(logger, local_filename, global_filename)
sets various attributes of the given logger
subroutine, public cp_logger_release(logger)
releases this logger
subroutine, public cp_logger_create(logger, para_env, print_level, default_global_unit_nr, default_local_unit_nr, global_filename, local_filename, close_global_unit_on_dealloc, iter_info, close_local_unit_on_dealloc, suffix, template_logger)
initializes a logger
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
Calculation of the incomplete Gamma function F_n(t) for multi-center integrals over Cartesian Gaussia...
Definition gamma.F:15
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public fix_xz
integer, parameter, public fix_y
integer, parameter, public fix_none
integer, parameter, public fix_z
integer, parameter, public fix_xy
integer, parameter, public fix_yz
integer, parameter, public fix_x
builds the global input section for cp2k
subroutine, public create_global_section(section)
section to hold global settings for the whole program
represents an enumeration, i.e. a mapping between integers and strings
character(len=default_string_length) function, public enum_i2c(enum, i)
maps an integer to a string
represents keywords in an input
subroutine, public keyword_get(keyword, names, usage, description, type_of_var, n_var, default_value, lone_keyword_value, repeats, enum, citations)
...
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_vals_val_set(section_vals, keyword_name, i_rep_section, i_rep_val, val, l_val, i_val, r_val, c_val, l_vals_ptr, i_vals_ptr, r_vals_ptr, c_vals_ptr)
sets the requested value
recursive subroutine, public section_release(section)
releases the given keyword list (see doc/ReferenceCounting.html)
recursive type(keyword_type) function, pointer, public section_get_keyword(section, keyword_name)
returns the requested keyword
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
integer, parameter, public default_string_length
Definition kinds.F:57
integer, parameter, public default_path_length
Definition kinds.F:58
Definition of mathematical constants and functions.
real(kind=dp), parameter, public sqrt3
Collection of simple mathematical functions and subroutines.
Definition mathlib.F:15
pure real(kind=dp) function, public angle(a, b)
Calculation of the angle between the vectors a and b. The angle is returned in radians.
Definition mathlib.F:184
Interface to the message passing library MPI.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
type of a logger, at the moment it contains just a print level starting at which level it should be l...
represent a keyword in the input
represent a section of the input file
stores all the informations relevant to an mpi environment