57 #include "./base/base_uses.f90"
63 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cell_methods'
86 TYPE(cell_type),
POINTER :: cell
87 REAL(kind=
dp),
DIMENSION(3, 3),
INTENT(IN), &
89 INTEGER,
DIMENSION(3),
INTENT(IN),
OPTIONAL :: periodic
90 CHARACTER(LEN=*),
INTENT(IN),
OPTIONAL :: tag
92 cpassert(.NOT.
ASSOCIATED(cell))
95 IF (
PRESENT(periodic))
THEN
100 cell%orthorhombic = .false.
102 IF (
PRESENT(hmat))
CALL init_cell(cell, hmat)
103 IF (
PRESENT(tag)) cell%tag = tag
118 TYPE(cell_type),
POINTER :: cell
119 REAL(kind=
dp),
DIMENSION(3, 3),
INTENT(IN), &
121 INTEGER,
DIMENSION(3),
INTENT(IN),
OPTIONAL :: periodic
123 REAL(kind=
dp),
PARAMETER :: eps_hmat = 1.0e-14_dp
126 REAL(kind=
dp) :: a, acosa, acosah, acosg, alpha, asina, &
127 asinah, asing, beta,
gamma, norm, &
129 REAL(kind=
dp),
DIMENSION(3) :: abc
131 cpassert(
ASSOCIATED(cell))
133 IF (
PRESENT(hmat)) cell%hmat(:, :) = hmat(:, :)
134 IF (
PRESENT(periodic)) cell%perd(:) = periodic(:)
136 cell%deth = abs(
det_3x3(cell%hmat))
138 IF (cell%deth < 1.0e-10_dp)
THEN
140 CALL cp_abort(__location__, &
141 "An invalid set of cell vectors was specified. "// &
142 "The cell volume is too small")
145 SELECT CASE (cell%symmetry_id)
154 SELECT CASE (cell%symmetry_id)
156 abc(1:3) = sum(abc(1:3))/3.0_dp
160 SELECT CASE (cell%symmetry_id)
162 a = 0.5_dp*(abc(1) + abc(2))
166 a = 0.5_dp*(abc(1) + abc(3))
170 a = 0.5_dp*(abc(2) + abc(3))
175 cell%hmat(1, 1) = abc(1); cell%hmat(1, 2) = 0.0_dp; cell%hmat(1, 3) = 0.0_dp
176 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = abc(2); cell%hmat(2, 3) = 0.0_dp
177 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)
180 a = 0.5_dp*(abc(1) + abc(2))
184 cell%hmat(1, 1) = a; cell%hmat(1, 2) = acosg; cell%hmat(1, 3) = 0.0_dp
185 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = asing; cell%hmat(2, 3) = 0.0_dp
186 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)
189 a = sum(abc(1:3))/3.0_dp
190 alpha = (
angle(cell%hmat(:, 3), cell%hmat(:, 2)) + &
191 angle(cell%hmat(:, 1), cell%hmat(:, 3)) + &
192 angle(cell%hmat(:, 1), cell%hmat(:, 2)))/3.0_dp
195 acosah = a*cos(0.5_dp*alpha)
196 asinah = a*sin(0.5_dp*alpha)
198 norm_c = sqrt(1.0_dp - norm*norm)
199 cell%hmat(1, 1) = a; cell%hmat(1, 2) = acosa; cell%hmat(1, 3) = acosah*norm
200 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = asina; cell%hmat(2, 3) = asinah*norm
201 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = a*norm_c
204 beta =
angle(cell%hmat(:, 1), cell%hmat(:, 3))
205 cell%hmat(1, 1) = abc(1); cell%hmat(1, 2) = 0.0_dp; cell%hmat(1, 3) = abc(3)*cos(beta)
206 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = abc(2); cell%hmat(2, 3) = 0.0_dp
207 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)*sin(beta)
211 a = 0.5_dp*(abc(1) + abc(2))
212 gamma =
angle(cell%hmat(:, 1), cell%hmat(:, 2))
215 cell%hmat(1, 1) = a; cell%hmat(1, 2) = acosg; cell%hmat(1, 3) = 0.0_dp
216 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = asing; cell%hmat(2, 3) = 0.0_dp
217 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)
223 IF ((abs(cell%hmat(1, 2)) < eps_hmat) .AND. (abs(cell%hmat(1, 3)) < eps_hmat) .AND. &
224 (abs(cell%hmat(2, 1)) < eps_hmat) .AND. (abs(cell%hmat(2, 3)) < eps_hmat) .AND. &
225 (abs(cell%hmat(3, 1)) < eps_hmat) .AND. (abs(cell%hmat(3, 2)) < eps_hmat))
THEN
226 cell%orthorhombic = .true.
228 cell%orthorhombic = .false.
233 IF (cell%orthorhombic)
THEN
234 cell%hmat(1, 2) = 0.0_dp
235 cell%hmat(1, 3) = 0.0_dp
236 cell%hmat(2, 1) = 0.0_dp
237 cell%hmat(2, 3) = 0.0_dp
238 cell%hmat(3, 1) = 0.0_dp
239 cell%hmat(3, 2) = 0.0_dp
242 dim = count(cell%perd == 1)
243 IF ((dim == 1) .AND. (.NOT. cell%orthorhombic))
THEN
244 cpabort(
"Non-orthorhombic and not periodic")
248 cell%deth = abs(
det_3x3(cell%hmat))
249 IF (cell%deth < 1.0e-10_dp)
THEN
250 CALL cp_abort(__location__, &
251 "An invalid set of cell vectors was obtained after applying "// &
252 "the requested cell symmetry. The cell volume is too small")
254 cell%h_inv =
inv_3x3(cell%hmat)
270 RECURSIVE SUBROUTINE read_cell(cell, cell_ref, use_ref_cell, cell_section, &
271 check_for_ref, para_env)
273 TYPE(cell_type),
POINTER :: cell, cell_ref
274 LOGICAL,
INTENT(INOUT),
OPTIONAL :: use_ref_cell
275 TYPE(section_vals_type),
OPTIONAL,
POINTER :: cell_section
276 LOGICAL,
INTENT(IN),
OPTIONAL :: check_for_ref
277 TYPE(mp_para_env_type),
POINTER :: para_env
280 INTEGER,
DIMENSION(:),
POINTER :: multiple_unit_cell
281 LOGICAL :: cell_read_a, cell_read_abc, cell_read_b, &
282 cell_read_c, cell_read_file, check, &
284 REAL(kind=
dp),
DIMENSION(:),
POINTER :: cell_angles, cell_par
285 TYPE(section_vals_type),
POINTER :: cell_ref_section
288 NULLIFY (cell_ref_section, cell_par, multiple_unit_cell)
289 IF (.NOT.
ASSOCIATED(cell))
CALL cell_create(cell, tag=
"CELL")
290 IF (.NOT.
ASSOCIATED(cell_ref))
CALL cell_create(cell_ref, tag=
"CELL_REF")
291 IF (
PRESENT(check_for_ref)) my_check = check_for_ref
294 cell%orthorhombic = .false.
297 cell%hmat(:, :) = 0.0_dp
298 cell%h_inv(:, :) = 0.0_dp
299 cell_read_file = .false.
300 cell_read_a = .false.
301 cell_read_b = .false.
302 cell_read_c = .false.
305 IF (cell_read_file)
CALL read_cell_from_external_file(cell_section, para_env)
311 IF (cell_read_a)
THEN
313 cell%hmat(:, 1) = cell_par(:)
316 IF (cell_read_b)
THEN
318 cell%hmat(:, 2) = cell_par(:)
321 IF (cell_read_c)
THEN
323 cell%hmat(:, 3) = cell_par(:)
325 check = ((cell_read_a .EQV. cell_read_b) .AND. (cell_read_b .EQV. cell_read_c))
327 CALL cp_warn(__location__, &
328 "Cell Information provided through vectors A, B and C. Not all three "// &
329 "vectors were provided! Cell setup may be incomplete!")
333 IF (cell_read_abc)
THEN
334 check = (cell_read_a .OR. cell_read_b .OR. cell_read_c)
336 CALL cp_warn(__location__, &
337 "Cell Information provided through vectors A, B and C in conjunction with ABC."// &
338 " The definition of the ABC keyword will override the one provided by A,B and C.")
342 CALL set_cell_param(cell, cell_par, cell_angles, do_init_cell=.false.)
347 IF (any(multiple_unit_cell /= 1))
CALL set_multiple_unit_cell(cell, multiple_unit_cell)
352 cell%perd = (/1, 0, 0/)
354 cell%perd = (/0, 1, 0/)
356 cell%perd = (/0, 0, 1/)
358 cell%perd = (/1, 1, 0/)
360 cell%perd = (/1, 0, 1/)
362 cell%perd = (/0, 1, 1/)
364 cell%perd = (/1, 1, 1/)
366 cell%perd = (/0, 0, 0/)
380 IF (parsed_cp2k_input(cell_ref_section, check_this_section=.true.))
THEN
381 IF (
PRESENT(use_ref_cell)) use_ref_cell = .true.
382 CALL read_cell(cell_ref, cell_ref, use_ref_cell=use_ref_cell, &
383 cell_section=cell_ref_section, check_for_ref=.false., &
386 CALL cell_clone(cell, cell_ref, tag=
"CELL_REF")
387 IF (
PRESENT(use_ref_cell)) use_ref_cell = .false.
401 FUNCTION parsed_cp2k_input(input_file, check_this_section)
RESULT(res)
403 TYPE(section_vals_type),
POINTER :: input_file
404 LOGICAL,
INTENT(IN),
OPTIONAL :: check_this_section
408 TYPE(section_vals_type),
POINTER :: glob_section
411 IF (
PRESENT(check_this_section)) my_check = check_this_section
412 res =
ASSOCIATED(input_file)
414 cpassert(input_file%ref_count > 0)
415 IF (.NOT. my_check)
THEN
423 END FUNCTION parsed_cp2k_input
440 TYPE(cell_type),
POINTER :: cell
441 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: cell_length, cell_angle
442 INTEGER,
DIMENSION(3),
INTENT(IN),
OPTIONAL :: periodic
443 LOGICAL,
INTENT(IN) :: do_init_cell
445 REAL(kind=
dp),
PARAMETER :: eps = epsilon(0.0_dp)
447 REAL(kind=
dp) :: cos_alpha, cos_beta, cos_gamma, sin_gamma
449 cpassert(
ASSOCIATED(cell))
450 cpassert(all(cell_angle /= 0.0_dp))
452 cos_gamma = cos(cell_angle(3));
IF (abs(cos_gamma) < eps) cos_gamma = 0.0_dp
453 IF (abs(abs(cos_gamma) - 1.0_dp) < eps) cos_gamma = sign(1.0_dp, cos_gamma)
454 sin_gamma = sin(cell_angle(3));
IF (abs(sin_gamma) < eps) sin_gamma = 0.0_dp
455 IF (abs(abs(sin_gamma) - 1.0_dp) < eps) sin_gamma = sign(1.0_dp, sin_gamma)
456 cos_beta = cos(cell_angle(2));
IF (abs(cos_beta) < eps) cos_beta = 0.0_dp
457 IF (abs(abs(cos_beta) - 1.0_dp) < eps) cos_beta = sign(1.0_dp, cos_beta)
458 cos_alpha = cos(cell_angle(1));
IF (abs(cos_alpha) < eps) cos_alpha = 0.0_dp
459 IF (abs(abs(cos_alpha) - 1.0_dp) < eps) cos_alpha = sign(1.0_dp, cos_alpha)
461 cell%hmat(:, 1) = (/1.0_dp, 0.0_dp, 0.0_dp/)
462 cell%hmat(:, 2) = (/cos_gamma, sin_gamma, 0.0_dp/)
463 cell%hmat(:, 3) = (/cos_beta, (cos_alpha - cos_gamma*cos_beta)/sin_gamma, 0.0_dp/)
464 cell%hmat(3, 3) = sqrt(1.0_dp - cell%hmat(1, 3)**2 - cell%hmat(2, 3)**2)
466 cell%hmat(:, 1) = cell%hmat(:, 1)*cell_length(1)
467 cell%hmat(:, 2) = cell%hmat(:, 2)*cell_length(2)
468 cell%hmat(:, 3) = cell%hmat(:, 3)*cell_length(3)
470 IF (do_init_cell)
THEN
471 IF (
PRESENT(periodic))
THEN
472 CALL init_cell(cell=cell, periodic=periodic)
488 SUBROUTINE set_multiple_unit_cell(cell, multiple_unit_cell)
490 TYPE(cell_type),
POINTER :: cell
491 INTEGER,
DIMENSION(:),
POINTER :: multiple_unit_cell
493 cpassert(
ASSOCIATED(cell))
496 IF (any(multiple_unit_cell <= 0)) &
497 CALL cp_abort(__location__, &
498 "CELL%MULTIPLE_UNIT_CELL accepts only integer values larger than 0! "// &
499 "A value of 0 or negative is meaningless!")
502 cell%hmat(:, 1) = cell%hmat(:, 1)*multiple_unit_cell(1)
503 cell%hmat(:, 2) = cell%hmat(:, 2)*multiple_unit_cell(2)
504 cell%hmat(:, 3) = cell%hmat(:, 3)*multiple_unit_cell(3)
506 END SUBROUTINE set_multiple_unit_cell
516 SUBROUTINE read_cell_from_external_file(cell_section, para_env)
518 TYPE(section_vals_type),
POINTER :: cell_section
519 TYPE(mp_para_env_type),
POINTER :: para_env
521 CHARACTER(LEN=default_path_length) :: cell_file_name
522 INTEGER :: i, idum, j, my_format, n_rep
523 LOGICAL :: explicit, my_end
524 REAL(kind=
dp) :: xdum
525 REAL(kind=
dp),
DIMENSION(3, 3) :: hmat
526 REAL(kind=
dp),
DIMENSION(:),
POINTER :: cell_par
527 TYPE(cell_type),
POINTER :: cell
528 TYPE(cp_parser_type) :: parser
532 SELECT CASE (my_format)
534 CALL parser_create(parser, cell_file_name, para_env=para_env)
537 DO WHILE (.NOT. my_end)
538 READ (parser%input_line, *) idum, xdum, hmat(:, 1), hmat(:, 2), hmat(:, 3)
549 CALL parser_create(parser, cell_file_name, para_env=para_env)
551 READ (parser%input_line, *) idum, hmat(:, 1), hmat(:, 2), hmat(:, 3)
571 explicit = explicit .OR. (n_rep == 1)
573 explicit = explicit .OR. (n_rep == 1)
575 explicit = explicit .OR. (n_rep == 1)
577 explicit = explicit .OR. (n_rep == 1)
580 CALL cp_warn(__location__, &
581 "Cell specification (A,B,C or ABC) provided together with the external "// &
582 "cell setup! Ignoring (A,B,C or ABC) and proceeding with info read from the "// &
585 ALLOCATE (cell_par(3))
586 cell_par = hmat(:, 1)
588 ALLOCATE (cell_par(3))
589 cell_par = hmat(:, 2)
591 ALLOCATE (cell_par(3))
592 cell_par = hmat(:, 3)
598 END SUBROUTINE read_cell_from_external_file
619 CHARACTER(len=*) :: cif_file_name
620 TYPE(cell_type),
POINTER :: cell
621 TYPE(mp_para_env_type),
POINTER :: para_env
623 CHARACTER(len=*),
PARAMETER :: routinen =
'read_cell_cif'
626 INTEGER,
DIMENSION(3) :: periodic
628 REAL(kind=
dp),
DIMENSION(3) :: cell_angles, cell_lengths
629 TYPE(cp_parser_type) :: parser
631 CALL timeset(routinen, handle)
634 para_env=para_env, apply_preprocessing=.false.)
640 begin_line=.false., search_from_begin_of_file=.true.)
642 cpabort(
"The field (_cell_length_a) was not found in CIF file! ")
643 CALL cif_get_real(parser, cell_lengths(1))
648 begin_line=.false., search_from_begin_of_file=.true.)
650 cpabort(
"The field (_cell_length_b) was not found in CIF file! ")
651 CALL cif_get_real(parser, cell_lengths(2))
656 begin_line=.false., search_from_begin_of_file=.true.)
658 cpabort(
"The field (_cell_length_c) was not found in CIF file! ")
659 CALL cif_get_real(parser, cell_lengths(3))
664 begin_line=.false., search_from_begin_of_file=.true.)
666 cpabort(
"The field (_cell_angle_alpha) was not found in CIF file! ")
667 CALL cif_get_real(parser, cell_angles(1))
672 begin_line=.false., search_from_begin_of_file=.true.)
674 cpabort(
"The field (_cell_angle_beta) was not found in CIF file! ")
675 CALL cif_get_real(parser, cell_angles(2))
680 begin_line=.false., search_from_begin_of_file=.true.)
682 cpabort(
"The field (_cell_angle_gamma) was not found in CIF file! ")
683 CALL cif_get_real(parser, cell_angles(3))
687 CALL set_cell_param(cell, cell_lengths, cell_angles, periodic=periodic, &
692 CALL timestop(handle)
704 SUBROUTINE cif_get_real(parser, r)
706 TYPE(cp_parser_type),
INTENT(INOUT) :: parser
707 REAL(kind=
dp),
INTENT(OUT) :: r
709 CHARACTER(LEN=default_string_length) :: s_tag
712 CALL parser_get_object(parser, s_tag)
713 iln = len_trim(s_tag)
714 IF (index(s_tag,
"(") /= 0) iln = index(s_tag,
"(") - 1
715 READ (s_tag(1:iln), *) r
717 END SUBROUTINE cif_get_real
732 TYPE(cell_type),
POINTER :: cell
733 TYPE(section_vals_type),
POINTER :: subsys_section
734 CHARACTER(LEN=*),
INTENT(IN),
OPTIONAL :: tag
736 CHARACTER(LEN=default_string_length) :: label, unit_str
737 INTEGER :: output_unit
738 TYPE(cp_logger_type),
POINTER :: logger
742 IF (
PRESENT(tag))
THEN
743 label = trim(tag)//
"|"
745 label = trim(cell%tag)//
"|"
750 CALL write_cell_low(cell, unit_str, output_unit, label)
766 SUBROUTINE write_cell_low(cell, unit_str, output_unit, label)
768 TYPE(cell_type),
POINTER :: cell
769 CHARACTER(LEN=*),
INTENT(IN) :: unit_str
770 INTEGER,
INTENT(IN) :: output_unit
771 CHARACTER(LEN=*),
INTENT(IN),
OPTIONAL :: label
773 CHARACTER(LEN=12) :: tag
774 CHARACTER(LEN=3) :: string
775 CHARACTER(LEN=default_string_length) :: my_label
776 REAL(kind=
dp) :: alpha, beta,
gamma, val
777 REAL(kind=
dp),
DIMENSION(3) :: abc
778 TYPE(enumeration_type),
POINTER :: enum
779 TYPE(keyword_type),
POINTER :: keyword
780 TYPE(section_type),
POINTER :: section
786 IF (output_unit > 0)
THEN
788 IF (
PRESENT(label))
THEN
791 my_label = trim(tag)//
"|"
794 WRITE (unit=output_unit, fmt=
"(/,T2,A,T61,F20.6)") &
795 trim(my_label)//
" Volume ["//trim(unit_str)//
"^3]:", val
797 WRITE (unit=output_unit, fmt=
"(T2,A,T30,3F10.3,3X,A6,F12.6)") &
798 trim(my_label)//
" Vector a ["//trim(unit_str)//
"]:", cell%hmat(:, 1)*val, &
799 "|a| = ", abc(1)*val, &
800 trim(my_label)//
" Vector b ["//trim(unit_str)//
"]:", cell%hmat(:, 2)*val, &
801 "|b| = ", abc(2)*val, &
802 trim(my_label)//
" Vector c ["//trim(unit_str)//
"]:", cell%hmat(:, 3)*val, &
804 WRITE (unit=output_unit, fmt=
"(T2,A,T69,F12.6)") &
805 trim(my_label)//
" Angle (b,c), alpha [degree]: ", alpha, &
806 trim(my_label)//
" Angle (a,c), beta [degree]: ", beta, &
807 trim(my_label)//
" Angle (a,b), gamma [degree]: ",
gamma
812 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
813 trim(my_label)//
" Requested initial symmetry: ", &
814 adjustr(trim(
enum_i2c(enum, cell%symmetry_id)))
817 IF (cell%orthorhombic)
THEN
818 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A3)") &
819 trim(my_label)//
" Numerically orthorhombic: ",
"YES"
821 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A3)") &
822 trim(my_label)//
" Numerically orthorhombic: ",
" NO"
824 IF (sum(cell%perd(1:3)) == 0)
THEN
825 WRITE (unit=output_unit, fmt=
"(T2,A,T77,A4)") &
826 trim(my_label)//
" Periodicity",
"NONE"
829 IF (cell%perd(1) == 1) string = trim(string)//
"X"
830 IF (cell%perd(2) == 1) string = trim(string)//
"Y"
831 IF (cell%perd(3) == 1) string = trim(string)//
"Z"
832 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A3)") &
833 trim(my_label)//
" Periodicity", adjustr(string)
837 END SUBROUTINE write_cell_low
real(kind=dp) function det_3x3(a)
...
Handles all functions related to the CELL.
recursive subroutine, public read_cell(cell, cell_ref, use_ref_cell, cell_section, check_for_ref, para_env)
...
subroutine, public write_cell(cell, subsys_section, tag)
Write the cell parameters to the output unit.
subroutine, public read_cell_cif(cif_file_name, cell, para_env)
Reads cell information from CIF file.
subroutine, public set_cell_param(cell, cell_length, cell_angle, periodic, do_init_cell)
Sets the cell using the internal parameters (a,b,c) (alpha,beta,gamma) using the convention: a parall...
subroutine, public init_cell(cell, hmat, periodic)
Initialise/readjust a simulation cell after hmat has been changed.
subroutine, public cell_create(cell, hmat, periodic, tag)
allocates and initializes a cell
Handles all functions related to the CELL.
integer, parameter, public use_perd_xyz
integer, parameter, public cell_sym_monoclinic
integer, parameter, public use_perd_y
integer, parameter, public cell_sym_triclinic
integer, parameter, public cell_sym_tetragonal_ab
integer, parameter, public use_perd_xz
integer, parameter, public cell_sym_rhombohedral
subroutine, public cell_release(cell)
releases the given cell (see doc/ReferenceCounting.html)
integer, parameter, public use_perd_x
subroutine, public cell_clone(cell_in, cell_out, tag)
Clone cell variable.
integer, parameter, public cell_sym_tetragonal_ac
integer, parameter, public use_perd_z
integer, parameter, public use_perd_yz
subroutine, public get_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
Get informations about a simulation cell.
integer, parameter, public use_perd_none
integer, parameter, public cell_sym_hexagonal_gamma_60
integer, parameter, public cell_sym_orthorhombic
integer, parameter, public cell_sym_none
integer, parameter, public cell_sym_hexagonal_gamma_120
integer, parameter, public cell_sym_monoclinic_gamma_ab
integer, parameter, public cell_sym_cubic
integer, parameter, public use_perd_xy
integer, parameter, public cell_sym_tetragonal_bc
real(kind=dp) function, public plane_distance(h, k, l, cell)
Calculate the distance between two lattice planes as defined by a triple of Miller indices (hkl).
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_get_next_line(parser, nline, at_end)
Read the next input line and broadcast the input information. Skip (nline-1) lines and skip also all ...
subroutine, public parser_search_string(parser, string, ignore_case, found, line, begin_line, search_from_begin_of_file)
Search a string pattern in a file defined by its logical unit number "unit". A case sensitive search ...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Calculation of the incomplete Gamma function F_n(t) for multi-center integrals over Cartesian Gaussia...
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
integer, parameter, public default_output_unit
Definition of mathematical constants and functions.
real(kind=dp), parameter, public degree
real(kind=dp), parameter, public sqrt3
Collection of simple mathematical functions and subroutines.
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.
pure real(kind=dp) function, dimension(3, 3), public inv_3x3(a)
Returns the inverse of the 3 x 3 matrix a.
Interface to the message passing library MPI.