19 #include "../base/base_uses.f90"
34 REAL(kind=
dp),
DIMENSION(3, 3),
INTENT(IN) :: hmat
38 INTEGER,
DIMENSION(3) :: sxyz
40 REAL(kind=
dp),
DIMENSION(3) :: r
47 IF (.NOT. (sx == 0 .AND. sy == 0 .AND. sz == 0))
THEN
49 r = matmul(hmat, sxyz)
50 r_sq = r(1)**2 + r(2)**2 + r(3)**2
51 IF (r_sq < r_m .OR. r_m < epsilon(r_m)) r_m = r_sq
67 REAL(kind=
dp),
DIMENSION(3, 3),
INTENT(IN) :: h_inv
71 INTEGER,
DIMENSION(3) :: gxyz
73 REAL(kind=
dp),
DIMENSION(3) :: g
74 REAL(kind=
dp),
DIMENSION(3, 3) :: h
76 h =
twopi*transpose(h_inv)
82 IF (.NOT. (gx == 0 .AND. gy == 0 .AND. gz == 0))
THEN
85 g_sq = g(1)**2 + g(2)**2 + g(3)**2
86 IF (g_sq < g_m .OR. g_m < epsilon(g_m)) g_m = g_sq
Some utility methods used in different contexts.
real(kind=dp) function, public g_abs_min(h_inv)
Find minimum length of G vectors, for a general (not necessarily orthorhombic) cell.
real(kind=dp) function, public r_abs_min(hmat)
Find minimum length of R vectors, for a general (not necessarily orthorhombic) cell.
Defines the basic variable types.
integer, parameter, public dp
Definition of mathematical constants and functions.
real(kind=dp), parameter, public twopi