57#include "./base/base_uses.f90"
63 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cell_methods'
88 REAL(kind=
dp),
DIMENSION(3, 3),
INTENT(IN), &
90 INTEGER,
DIMENSION(3),
INTENT(IN),
OPTIONAL :: periodic
91 CHARACTER(LEN=*),
INTENT(IN),
OPTIONAL :: tag
93 cpassert(.NOT.
ASSOCIATED(cell))
96 IF (
PRESENT(periodic))
THEN
101 cell%orthorhombic = .false.
103 IF (
PRESENT(hmat))
CALL init_cell(cell, hmat)
104 IF (
PRESENT(tag)) cell%tag = tag
120 REAL(kind=
dp),
DIMENSION(3, 3),
INTENT(IN), &
122 INTEGER,
DIMENSION(3),
INTENT(IN),
OPTIONAL :: periodic
124 REAL(kind=
dp),
PARAMETER :: eps_hmat = 1.0e-14_dp
127 REAL(kind=
dp) :: a, acosa, acosah, acosg, alpha, asina, &
128 asinah, asing, beta,
gamma, norm, &
130 REAL(kind=
dp),
DIMENSION(3) :: abc
132 cpassert(
ASSOCIATED(cell))
134 IF (
PRESENT(hmat)) cell%hmat(:, :) = hmat(:, :)
135 IF (
PRESENT(periodic)) cell%perd(:) = periodic(:)
137 cell%deth = abs(
det_3x3(cell%hmat))
139 IF (cell%deth < 1.0e-10_dp)
THEN
141 CALL cp_abort(__location__, &
142 "An invalid set of cell vectors was specified. "// &
143 "The cell volume is too small")
146 SELECT CASE (cell%symmetry_id)
155 SELECT CASE (cell%symmetry_id)
157 abc(1:3) = sum(abc(1:3))/3.0_dp
161 SELECT CASE (cell%symmetry_id)
163 a = 0.5_dp*(abc(1) + abc(2))
167 a = 0.5_dp*(abc(1) + abc(3))
171 a = 0.5_dp*(abc(2) + abc(3))
176 cell%hmat(1, 1) = abc(1); cell%hmat(1, 2) = 0.0_dp; cell%hmat(1, 3) = 0.0_dp
177 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = abc(2); cell%hmat(2, 3) = 0.0_dp
178 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)
181 a = 0.5_dp*(abc(1) + abc(2))
185 cell%hmat(1, 1) = a; cell%hmat(1, 2) = acosg; cell%hmat(1, 3) = 0.0_dp
186 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = asing; cell%hmat(2, 3) = 0.0_dp
187 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)
190 a = sum(abc(1:3))/3.0_dp
191 alpha = (
angle(cell%hmat(:, 3), cell%hmat(:, 2)) + &
192 angle(cell%hmat(:, 1), cell%hmat(:, 3)) + &
193 angle(cell%hmat(:, 1), cell%hmat(:, 2)))/3.0_dp
196 acosah = a*cos(0.5_dp*alpha)
197 asinah = a*sin(0.5_dp*alpha)
199 norm_c = sqrt(1.0_dp - norm*norm)
200 cell%hmat(1, 1) = a; cell%hmat(1, 2) = acosa; cell%hmat(1, 3) = acosah*norm
201 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = asina; cell%hmat(2, 3) = asinah*norm
202 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = a*norm_c
205 beta =
angle(cell%hmat(:, 1), cell%hmat(:, 3))
206 cell%hmat(1, 1) = abc(1); cell%hmat(1, 2) = 0.0_dp; cell%hmat(1, 3) = abc(3)*cos(beta)
207 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = abc(2); cell%hmat(2, 3) = 0.0_dp
208 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)*sin(beta)
212 a = 0.5_dp*(abc(1) + abc(2))
213 gamma =
angle(cell%hmat(:, 1), cell%hmat(:, 2))
216 cell%hmat(1, 1) = a; cell%hmat(1, 2) = acosg; cell%hmat(1, 3) = 0.0_dp
217 cell%hmat(2, 1) = 0.0_dp; cell%hmat(2, 2) = asing; cell%hmat(2, 3) = 0.0_dp
218 cell%hmat(3, 1) = 0.0_dp; cell%hmat(3, 2) = 0.0_dp; cell%hmat(3, 3) = abc(3)
224 IF ((abs(cell%hmat(1, 2)) < eps_hmat) .AND. (abs(cell%hmat(1, 3)) < eps_hmat) .AND. &
225 (abs(cell%hmat(2, 1)) < eps_hmat) .AND. (abs(cell%hmat(2, 3)) < eps_hmat) .AND. &
226 (abs(cell%hmat(3, 1)) < eps_hmat) .AND. (abs(cell%hmat(3, 2)) < eps_hmat))
THEN
227 cell%orthorhombic = .true.
229 cell%orthorhombic = .false.
234 IF (cell%orthorhombic)
THEN
235 cell%hmat(1, 2) = 0.0_dp
236 cell%hmat(1, 3) = 0.0_dp
237 cell%hmat(2, 1) = 0.0_dp
238 cell%hmat(2, 3) = 0.0_dp
239 cell%hmat(3, 1) = 0.0_dp
240 cell%hmat(3, 2) = 0.0_dp
243 dim = count(cell%perd == 1)
244 IF ((dim == 1) .AND. (.NOT. cell%orthorhombic))
THEN
245 cpabort(
"Non-orthorhombic and not periodic")
249 cell%deth = abs(
det_3x3(cell%hmat))
250 IF (cell%deth < 1.0e-10_dp)
THEN
251 CALL cp_abort(__location__, &
252 "An invalid set of cell vectors was obtained after applying "// &
253 "the requested cell symmetry. The cell volume is too small")
255 cell%h_inv =
inv_3x3(cell%hmat)
271 RECURSIVE SUBROUTINE read_cell(cell, cell_ref, use_ref_cell, cell_section, &
272 check_for_ref, para_env)
274 TYPE(
cell_type),
POINTER :: cell, cell_ref
275 LOGICAL,
INTENT(INOUT),
OPTIONAL :: use_ref_cell
277 LOGICAL,
INTENT(IN),
OPTIONAL :: check_for_ref
281 INTEGER,
DIMENSION(:),
POINTER :: multiple_unit_cell
282 LOGICAL :: cell_read_a, cell_read_abc, cell_read_b, &
283 cell_read_c, cell_read_file, check, &
285 REAL(kind=
dp),
DIMENSION(:),
POINTER :: cell_angles, cell_par
289 NULLIFY (cell_ref_section, cell_par, multiple_unit_cell)
290 IF (.NOT.
ASSOCIATED(cell))
CALL cell_create(cell, tag=
"CELL")
291 IF (.NOT.
ASSOCIATED(cell_ref))
CALL cell_create(cell_ref, tag=
"CELL_REF")
292 IF (
PRESENT(check_for_ref)) my_check = check_for_ref
295 cell%orthorhombic = .false.
298 cell%hmat(:, :) = 0.0_dp
299 cell%h_inv(:, :) = 0.0_dp
300 cell_read_file = .false.
301 cell_read_a = .false.
302 cell_read_b = .false.
303 cell_read_c = .false.
306 IF (cell_read_file)
CALL read_cell_from_external_file(cell_section, para_env)
312 IF (cell_read_a)
THEN
314 cell%hmat(:, 1) = cell_par(:)
317 IF (cell_read_b)
THEN
319 cell%hmat(:, 2) = cell_par(:)
322 IF (cell_read_c)
THEN
324 cell%hmat(:, 3) = cell_par(:)
326 check = ((cell_read_a .EQV. cell_read_b) .AND. (cell_read_b .EQV. cell_read_c))
328 CALL cp_warn(__location__, &
329 "Cell Information provided through vectors A, B and C. Not all three "// &
330 "vectors were provided! Cell setup may be incomplete!")
334 IF (cell_read_abc)
THEN
335 check = (cell_read_a .OR. cell_read_b .OR. cell_read_c)
337 CALL cp_warn(__location__, &
338 "Cell Information provided through vectors A, B and C in conjunction with ABC."// &
339 " The definition of the ABC keyword will override the one provided by A,B and C.")
343 CALL set_cell_param(cell, cell_par, cell_angles, do_init_cell=.false.)
348 IF (any(multiple_unit_cell /= 1))
CALL set_multiple_unit_cell(cell, multiple_unit_cell)
353 cell%perd = (/1, 0, 0/)
355 cell%perd = (/0, 1, 0/)
357 cell%perd = (/0, 0, 1/)
359 cell%perd = (/1, 1, 0/)
361 cell%perd = (/1, 0, 1/)
363 cell%perd = (/0, 1, 1/)
365 cell%perd = (/1, 1, 1/)
367 cell%perd = (/0, 0, 0/)
381 IF (parsed_cp2k_input(cell_ref_section, check_this_section=.true.))
THEN
382 IF (
PRESENT(use_ref_cell)) use_ref_cell = .true.
383 CALL read_cell(cell_ref, cell_ref, use_ref_cell=use_ref_cell, &
384 cell_section=cell_ref_section, check_for_ref=.false., &
387 CALL cell_clone(cell, cell_ref, tag=
"CELL_REF")
388 IF (
PRESENT(use_ref_cell)) use_ref_cell = .false.
402 FUNCTION parsed_cp2k_input(input_file, check_this_section)
RESULT(res)
405 LOGICAL,
INTENT(IN),
OPTIONAL :: check_this_section
412 IF (
PRESENT(check_this_section)) my_check = check_this_section
413 res =
ASSOCIATED(input_file)
415 cpassert(input_file%ref_count > 0)
416 IF (.NOT. my_check)
THEN
424 END FUNCTION parsed_cp2k_input
442 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: cell_length, cell_angle
443 INTEGER,
DIMENSION(3),
INTENT(IN),
OPTIONAL :: periodic
444 LOGICAL,
INTENT(IN) :: do_init_cell
446 REAL(kind=
dp),
PARAMETER :: eps = epsilon(0.0_dp)
448 REAL(kind=
dp) :: cos_alpha, cos_beta, cos_gamma, sin_gamma
450 cpassert(
ASSOCIATED(cell))
451 cpassert(all(cell_angle /= 0.0_dp))
453 cos_gamma = cos(cell_angle(3));
IF (abs(cos_gamma) < eps) cos_gamma = 0.0_dp
454 IF (abs(abs(cos_gamma) - 1.0_dp) < eps) cos_gamma = sign(1.0_dp, cos_gamma)
455 sin_gamma = sin(cell_angle(3));
IF (abs(sin_gamma) < eps) sin_gamma = 0.0_dp
456 IF (abs(abs(sin_gamma) - 1.0_dp) < eps) sin_gamma = sign(1.0_dp, sin_gamma)
457 cos_beta = cos(cell_angle(2));
IF (abs(cos_beta) < eps) cos_beta = 0.0_dp
458 IF (abs(abs(cos_beta) - 1.0_dp) < eps) cos_beta = sign(1.0_dp, cos_beta)
459 cos_alpha = cos(cell_angle(1));
IF (abs(cos_alpha) < eps) cos_alpha = 0.0_dp
460 IF (abs(abs(cos_alpha) - 1.0_dp) < eps) cos_alpha = sign(1.0_dp, cos_alpha)
462 cell%hmat(:, 1) = (/1.0_dp, 0.0_dp, 0.0_dp/)
463 cell%hmat(:, 2) = (/cos_gamma, sin_gamma, 0.0_dp/)
464 cell%hmat(:, 3) = (/cos_beta, (cos_alpha - cos_gamma*cos_beta)/sin_gamma, 0.0_dp/)
465 cell%hmat(3, 3) = sqrt(1.0_dp - cell%hmat(1, 3)**2 - cell%hmat(2, 3)**2)
467 cell%hmat(:, 1) = cell%hmat(:, 1)*cell_length(1)
468 cell%hmat(:, 2) = cell%hmat(:, 2)*cell_length(2)
469 cell%hmat(:, 3) = cell%hmat(:, 3)*cell_length(3)
471 IF (do_init_cell)
THEN
472 IF (
PRESENT(periodic))
THEN
473 CALL init_cell(cell=cell, periodic=periodic)
489 SUBROUTINE set_multiple_unit_cell(cell, multiple_unit_cell)
492 INTEGER,
DIMENSION(:),
POINTER :: multiple_unit_cell
494 cpassert(
ASSOCIATED(cell))
497 IF (any(multiple_unit_cell <= 0)) &
498 CALL cp_abort(__location__, &
499 "CELL%MULTIPLE_UNIT_CELL accepts only integer values larger than 0! "// &
500 "A value of 0 or negative is meaningless!")
503 cell%hmat(:, 1) = cell%hmat(:, 1)*multiple_unit_cell(1)
504 cell%hmat(:, 2) = cell%hmat(:, 2)*multiple_unit_cell(2)
505 cell%hmat(:, 3) = cell%hmat(:, 3)*multiple_unit_cell(3)
507 END SUBROUTINE set_multiple_unit_cell
517 SUBROUTINE read_cell_from_external_file(cell_section, para_env)
522 CHARACTER(LEN=default_path_length) :: cell_file_name
523 INTEGER :: i, idum, j, my_format, n_rep
524 LOGICAL :: explicit, my_end
525 REAL(kind=
dp) :: xdum
526 REAL(kind=
dp),
DIMENSION(3, 3) :: hmat
527 REAL(kind=
dp),
DIMENSION(:),
POINTER :: cell_par
533 SELECT CASE (my_format)
535 CALL parser_create(parser, cell_file_name, para_env=para_env)
538 DO WHILE (.NOT. my_end)
539 READ (parser%input_line, *) idum, xdum, hmat(:, 1), hmat(:, 2), hmat(:, 3)
550 CALL parser_create(parser, cell_file_name, para_env=para_env)
552 READ (parser%input_line, *) idum, hmat(:, 1), hmat(:, 2), hmat(:, 3)
572 explicit = explicit .OR. (n_rep == 1)
574 explicit = explicit .OR. (n_rep == 1)
576 explicit = explicit .OR. (n_rep == 1)
578 explicit = explicit .OR. (n_rep == 1)
581 CALL cp_warn(__location__, &
582 "Cell specification (A,B,C or ABC) provided together with the external "// &
583 "cell setup! Ignoring (A,B,C or ABC) and proceeding with info read from the "// &
586 ALLOCATE (cell_par(3))
587 cell_par = hmat(:, 1)
589 ALLOCATE (cell_par(3))
590 cell_par = hmat(:, 2)
592 ALLOCATE (cell_par(3))
593 cell_par = hmat(:, 3)
599 END SUBROUTINE read_cell_from_external_file
620 CHARACTER(len=*) :: cif_file_name
624 CHARACTER(len=*),
PARAMETER :: routinen =
'read_cell_cif'
627 INTEGER,
DIMENSION(3) :: periodic
629 REAL(kind=
dp),
DIMENSION(3) :: cell_angles, cell_lengths
632 CALL timeset(routinen, handle)
635 para_env=para_env, apply_preprocessing=.false.)
641 begin_line=.false., search_from_begin_of_file=.true.)
643 cpabort(
"The field (_cell_length_a) was not found in CIF file! ")
644 CALL cif_get_real(parser, cell_lengths(1))
649 begin_line=.false., search_from_begin_of_file=.true.)
651 cpabort(
"The field (_cell_length_b) was not found in CIF file! ")
652 CALL cif_get_real(parser, cell_lengths(2))
657 begin_line=.false., search_from_begin_of_file=.true.)
659 cpabort(
"The field (_cell_length_c) was not found in CIF file! ")
660 CALL cif_get_real(parser, cell_lengths(3))
665 begin_line=.false., search_from_begin_of_file=.true.)
667 cpabort(
"The field (_cell_angle_alpha) was not found in CIF file! ")
668 CALL cif_get_real(parser, cell_angles(1))
673 begin_line=.false., search_from_begin_of_file=.true.)
675 cpabort(
"The field (_cell_angle_beta) was not found in CIF file! ")
676 CALL cif_get_real(parser, cell_angles(2))
681 begin_line=.false., search_from_begin_of_file=.true.)
683 cpabort(
"The field (_cell_angle_gamma) was not found in CIF file! ")
684 CALL cif_get_real(parser, cell_angles(3))
688 CALL set_cell_param(cell, cell_lengths, cell_angles, periodic=periodic, &
693 CALL timestop(handle)
705 SUBROUTINE cif_get_real(parser, r)
708 REAL(kind=
dp),
INTENT(OUT) :: r
710 CHARACTER(LEN=default_string_length) :: s_tag
714 iln = len_trim(s_tag)
715 IF (index(s_tag,
"(") /= 0) iln = index(s_tag,
"(") - 1
716 READ (s_tag(1:iln), *) r
718 END SUBROUTINE cif_get_real
735 CHARACTER(LEN=*),
INTENT(IN),
OPTIONAL :: tag
737 CHARACTER(LEN=default_string_length) :: label, unit_str
738 INTEGER :: output_unit
743 IF (
PRESENT(tag))
THEN
744 label = trim(tag)//
"|"
746 label = trim(cell%tag)//
"|"
770 CHARACTER(LEN=*),
INTENT(IN) :: unit_str
771 INTEGER,
INTENT(IN) :: output_unit
772 CHARACTER(LEN=*),
INTENT(IN),
OPTIONAL :: label
774 CHARACTER(LEN=12) :: tag
775 CHARACTER(LEN=3) :: string
776 CHARACTER(LEN=default_string_length) :: my_label
777 REAL(kind=
dp) :: alpha, beta,
gamma, val
778 REAL(kind=
dp),
DIMENSION(3) :: abc
787 IF (output_unit > 0)
THEN
789 IF (
PRESENT(label))
THEN
792 my_label = trim(tag)//
"|"
795 WRITE (unit=output_unit, fmt=
"(/,T2,A,T61,F20.6)") &
796 trim(my_label)//
" Volume ["//trim(unit_str)//
"^3]:", val
798 WRITE (unit=output_unit, fmt=
"(T2,A,T30,3F10.3,3X,A6,F12.6)") &
799 trim(my_label)//
" Vector a ["//trim(unit_str)//
"]:", cell%hmat(:, 1)*val, &
800 "|a| = ", abc(1)*val, &
801 trim(my_label)//
" Vector b ["//trim(unit_str)//
"]:", cell%hmat(:, 2)*val, &
802 "|b| = ", abc(2)*val, &
803 trim(my_label)//
" Vector c ["//trim(unit_str)//
"]:", cell%hmat(:, 3)*val, &
805 WRITE (unit=output_unit, fmt=
"(T2,A,T69,F12.6)") &
806 trim(my_label)//
" Angle (b,c), alpha [degree]: ", alpha, &
807 trim(my_label)//
" Angle (a,c), beta [degree]: ", beta, &
808 trim(my_label)//
" Angle (a,b), gamma [degree]: ",
gamma
813 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
814 trim(my_label)//
" Requested initial symmetry: ", &
815 adjustr(trim(
enum_i2c(enum, cell%symmetry_id)))
818 IF (cell%orthorhombic)
THEN
819 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A3)") &
820 trim(my_label)//
" Numerically orthorhombic: ",
"YES"
822 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A3)") &
823 trim(my_label)//
" Numerically orthorhombic: ",
" NO"
825 IF (sum(cell%perd(1:3)) == 0)
THEN
826 WRITE (unit=output_unit, fmt=
"(T2,A,T77,A4)") &
827 trim(my_label)//
" Periodicity",
"NONE"
830 IF (cell%perd(1) == 1) string = trim(string)//
"X"
831 IF (cell%perd(2) == 1) string = trim(string)//
"Y"
832 IF (cell%perd(3) == 1) string = trim(string)//
"Z"
833 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A3)") &
834 trim(my_label)//
" Periodicity", adjustr(string)
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_low(cell, unit_str, output_unit, label)
Write the cell parameters to the output unit.
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.
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment