19 REAL(
dp),
PARAMETER :: ice_ix(3, 36) = reshape([ &
20 -0.006830_dp, 0.340009_dp, 0.190161_dp, &
21 0.113981_dp, 0.164412_dp, 0.283330_dp, &
22 0.309270_dp, 0.370346_dp, 0.106284_dp, &
23 0.159991_dp, 0.493170_dp, 0.440161_dp, &
24 0.335588_dp, 0.613981_dp, 0.533330_dp, &
25 0.129654_dp, 0.809270_dp, 0.356284_dp, &
26 0.840009_dp, 0.506830_dp, -0.059839_dp, &
27 0.664412_dp, 0.386019_dp, 0.033330_dp, &
28 0.870346_dp, 0.190730_dp, 0.856284_dp, &
29 0.506830_dp, 0.840009_dp, 1.059839_dp, &
30 0.386019_dp, 0.664412_dp, 0.966670_dp, &
31 0.190730_dp, 0.870346_dp, 0.143716_dp, &
32 0.493170_dp, 0.159991_dp, 0.559839_dp, &
33 0.613981_dp, 0.335588_dp, 0.466670_dp, &
34 0.809270_dp, 0.129654_dp, 0.643716_dp, &
35 0.370346_dp, 0.309270_dp, -0.106284_dp, &
36 0.659991_dp, 1.006830_dp, 0.309839_dp, &
37 0.835588_dp, 0.886019_dp, 0.216670_dp, &
38 0.629654_dp, 0.690730_dp, 0.393716_dp, &
39 1.006830_dp, 0.659991_dp, 0.690161_dp, &
40 0.886019_dp, 0.835588_dp, 0.783330_dp, &
41 0.690730_dp, 0.629654_dp, 0.606284_dp, &
42 0.340009_dp, -0.006830_dp, 0.809839_dp, &
43 0.164412_dp, 0.113981_dp, 0.716670_dp, &
44 0.114088_dp, 0.310030_dp, 0.267366_dp, &
45 0.189970_dp, 0.614088_dp, 0.517366_dp, &
46 0.810030_dp, 0.385912_dp, 0.017365_dp, &
47 0.385912_dp, 0.810030_dp, 0.982634_dp, &
48 0.614088_dp, 0.189970_dp, 0.482634_dp, &
49 0.689970_dp, 0.885912_dp, 0.232634_dp, &
50 0.885912_dp, 0.689970_dp, 0.767366_dp, &
51 0.310030_dp, 0.114088_dp, 0.732634_dp, &
52 0.404256_dp, 0.404256_dp, 0.000000_dp, &
53 0.095744_dp, 0.904256_dp, 0.250000_dp, &
54 0.904256_dp, 0.095744_dp, 0.750000_dp, &
55 0.595744_dp, 0.595744_dp, 0.500000_dp], [3, 36])
56 REAL(
dp) :: cell(3, 3), coords(3, 36), shifted(3, 36)
63 cell(1, 1) = 6.784903_dp*
bohr
64 cell(2, 2) = 6.784903_dp*
bohr
65 cell(3, 3) = 6.807916_dp*
bohr
71 CALL check_mesh(coords, cell, 1.0e-6_dp, 6, .false., .true.)
72 CALL check_mesh(coords, cell, 1.0e-7_dp, 14, .false., .true.)
73 shifted = coords + spread([0.137_dp, -0.231_dp, 0.319_dp], 2, 36)
74 CALL check_mesh(shifted, cell, 1.0e-6_dp, 6, .false., .true.)
75 CALL check_mesh(coords, 1.3_dp*cell, 1.0e-6_dp, 6, .false., .true.)
77 shifted(:, i) = coords(:, 25 - i)
80 shifted(:, i) = coords(:, 61 - i)
82 CALL check_mesh(shifted, cell, 1.0e-6_dp, 6, .false., .true.)
86 coords(3, 27) = coords(3, 27) + 1.0e-6_dp
87 coords(3, 33) = coords(3, 33) + 0.75e-6_dp
88 coords(3, 36) = coords(3, 36) - 0.75e-6_dp
89 CALL check_mesh(coords, cell, 1.0e-6_dp, 14, .true., .false.)
90 IF (io_unit > 0)
WRITE (io_unit, *)
"K290 tolerance-boundary and orbit-guard tests passed"
104 SUBROUTINE check_mesh(x, h, delta, expected, fallback, closed)
105 REAL(dp),
INTENT(IN) :: x(:, :), h(3, 3), delta
106 INTEGER,
INTENT(IN) :: expected
107 LOGICAL,
INTENT(IN) :: fallback, closed
109 INTEGER :: a, i, j, k
111 REAL(dp) :: product(3, 3)
114 CALL crys_sym_gen(csym, x, types, h, delta=delta, use_spglib=.false.)
115 CALL kpoint_gen(csym, [3, 3, 3], symm=.true., shift=[0.0_dp, 0.0_dp, 0.0_dp])
116 IF (csym%nkpoint /= expected) error stop
"Incorrect irreducible mesh size"
117 IF (csym%inversion_only .NEQV. fallback) error stop
"Incorrect orbit-guard decision"
118 IF (abs(sum(csym%wkpoint) - 27.0_dp) > 1.0e-12_dp) error stop
"Incorrect weight sum"
119 IF (any(csym%kplink <= 0)) error stop
"Incomplete mesh mapping"
120 DO k = 1,
SIZE(csym%rt, 3)
121 DO a = 1,
SIZE(types)
122 IF (count(csym%f0(:, k) == a) /= 1) error stop
"Nonbijective atom mapping"
124 IF (any(types(csym%f0(:, k)) /= types)) error stop
"Atom types not preserved"
129 product = matmul(csym%rt(:, :, i), csym%rt(:, :, j))
132 IF (maxval(abs(product - csym%rt(:, :, k))) > 1.0e-12_dp) cycle
133 IF (any(csym%f0(csym%f0(:, j), i) /= csym%f0(:, k))) cycle
136 IF (.NOT. found) error stop
"Operation group not closed"
subroutine check_mesh(x, h, delta, expected, fallback, closed)
Check mesh reduction and atomic operation consistency without an SCF calculation.
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
K-points and crystal symmetry routines.
subroutine, public kpoint_gen(csym, nk, symm, shift, full_grid, gamma_centered, inversion_symmetry_only, use_spglib_reduction, use_spglib_backend)
...
subroutine, public release_csym_type(csym)
Release the CSYM type.
subroutine, public crys_sym_gen(csym, scoor, types, hmat, delta, iounit, use_spglib)
...
Defines the basic variable types.
integer, parameter, public dp
subroutine, public cp2k_finalize()
...
subroutine, public cp2k_init()
...
Definition of physical constants:
real(kind=dp), parameter, public bohr