49 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: my_cg
50 INTEGER,
INTENT(IN) :: llmax, maxs, max_s_harm
54 cpassert(
ASSOCIATED(harmonics))
56 harmonics%max_s_harm = max_s_harm
57 harmonics%llmax = llmax
59 NULLIFY (harmonics%my_CG, harmonics%my_CG_dxyz, harmonics%my_CG_dxyz_asym)
60 CALL reallocate(harmonics%my_CG, 1, maxs, 1, maxs, 1, max_s_harm)
64 harmonics%my_CG(1:maxs, is, i) = my_cg(1:maxs, is, i)
81 INTEGER,
INTENT(IN) :: llmax, max_s_harm
83 INTEGER :: is1, is2, itmp, max_iso_not0, nset
84 INTEGER,
DIMENSION(:),
POINTER :: lmax, lmin
86 cpassert(
ASSOCIATED(harmonics))
95 lmin(is1), lmax(is1), lmin(is2), lmax(is2), &
96 max_s_harm, llmax, max_iso_not0=itmp)
97 max_iso_not0 = max(max_iso_not0, itmp)
100 harmonics%max_iso_not0 = max_iso_not0
119 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN) :: hmat
120 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: f
121 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN) :: umat
122 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: orb
123 REAL(kind=
dp),
DIMENSION(:),
INTENT(INOUT) :: ener
124 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: pmat
125 REAL(kind=
dp),
DIMENSION(3),
INTENT(INOUT) :: r
126 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(IN) :: dist
127 INTEGER,
INTENT(IN) :: nb, nv
129 INTEGER :: info, lwork, m, n
130 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: w, work
131 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: a, b, h_fx
138 IF (n > 0 .AND. m > 0)
THEN
139 lwork = max(n*n, n + 100)
140 ALLOCATE (a(m, m), b(n, m), w(m), work(lwork))
141 IF (dot_product(f, f) /= 0.0_dp)
THEN
142 ALLOCATE (h_fx(n, n))
143 h_fx(1:n, 1:n) = hmat(1:n, 1:n) + f(1)*dist(1:n, 1:n, 1) + &
144 f(2)*dist(1:n, 1:n, 2) + f(3)*dist(1:n, 1:n, 3)
145 CALL dgemm(
"N",
"N", n, m, n, 1.0_dp, h_fx, n, umat, n, 0.0_dp, b, n)
148 CALL dgemm(
"N",
"N", n, m, n, 1.0_dp, hmat, n, umat, n, 0.0_dp, b, n)
150 CALL dgemm(
"T",
"N", m, m, n, 1.0_dp, umat, n, b, n, 0.0_dp, a, m)
151 CALL dsyev(
"V",
"U", m, a, m, w, work, lwork, info)
152 CALL dgemm(
"N",
"N", n, m, m, 1.0_dp, umat, n, a, m, 0.0_dp, b, n)
154 m = min(m,
SIZE(orb, 2))
155 orb(1:n, 1:m) = b(1:n, 1:m)
158 DEALLOCATE (a, b, w, work)
162 CALL dger(n, n, 1.0_dp, orb(:, 1), 1, orb(:, 1), 1, pmat, n)
164 r = [
trace_r_axb(dist(1:n, 1:n, 1), n, pmat, n, n, n), &
165 trace_r_axb(dist(1:n, 1:n, 2), n, pmat, n, n, n), &
static void dgemm(const char transa, const char transb, const int m, const int n, const int k, const double alpha, const double *a, const int lda, const double *b, const int ldb, const double beta, double *c, const int ldc)
Convenient wrapper to hide Fortran nature of dgemm_, swapping a and b.
subroutine, public get_gto_basis_set(gto_basis_set, name, aliases, norm_type, kind_radius, ncgf, nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum, ccon)
...