44 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: scon_shg
46 INTEGER :: ipgf, iset, ishell, l, maxpgf, maxshell, &
48 INTEGER,
DIMENSION(:),
POINTER :: npgf, nshell
49 REAL(kind=
dp) :: aif, gcc
50 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: norm
51 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: zet
55 nshell => basis%nshell
58 maxpgf =
SIZE(basis%gcc, 1)
59 maxshell =
SIZE(basis%gcc, 2)
60 ALLOCATE (norm(basis%nset, maxshell))
61 ALLOCATE (scon_shg(maxpgf, maxshell, nset))
64 CALL basis_norm_shg(basis, norm)
67 DO ishell = 1, nshell(iset)
68 l = basis%l(ishell, iset)
69 DO ipgf = 1, npgf(iset)
70 aif = 1.0_dp/((2._dp*zet(ipgf, iset))**l)
71 gcc = basis%gcc(ipgf, ishell, iset)
72 scon_shg(ipgf, ishell, iset) = norm(iset, ishell)*gcc*aif
130 INTEGER,
DIMENSION(:, :, :),
POINTER :: orb_index, ri_index
131 REAL(kind=
dp),
DIMENSION(:, :, :, :),
POINTER :: scon_mix
133 INTEGER :: forb, fri, iil, il, ipgf, iset, ishell, jpgf, jset, jshell, l, l1, l2, lmax_orb, &
134 lmax_ri, maxpgf_orb, maxpgf_ri, maxshell_orb, maxshell_ri, nf_orb, nf_ri, nl, nl_max, &
136 INTEGER,
DIMENSION(:),
POINTER :: npgf_orb, npgf_ri, nshell_orb, nshell_ri
137 REAL(kind=
dp) :: cjf, const, const1, const2, gcc_orb, &
138 gcc_ri, prefac, scon1, scon2, zet
139 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: shg_fac
140 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: norm_orb, norm_ri, zet_orb, zet_ri
142 nset_orb = orb_basis%nset
143 npgf_orb => orb_basis%npgf
144 nshell_orb => orb_basis%nshell
145 zet_orb => orb_basis%zet
146 nset_ri = ri_basis%nset
147 npgf_ri => ri_basis%npgf
148 nshell_ri => ri_basis%nshell
149 zet_ri => ri_basis%zet
151 maxpgf_orb =
SIZE(orb_basis%gcc, 1)
152 maxshell_orb =
SIZE(orb_basis%gcc, 2)
153 ALLOCATE (norm_orb(nset_orb, maxshell_orb))
154 maxpgf_ri =
SIZE(ri_basis%gcc, 1)
155 maxshell_ri =
SIZE(ri_basis%gcc, 2)
156 ALLOCATE (norm_ri(nset_ri, maxshell_ri))
158 CALL basis_norm_shg(orb_basis, norm_orb)
159 CALL basis_norm_shg(ri_basis, norm_ri)
161 ALLOCATE (orb_index(maxpgf_orb, maxshell_orb, nset_orb))
162 ALLOCATE (ri_index(maxpgf_ri, maxshell_ri, nset_ri))
166 DO iset = 1, nset_orb
167 DO ishell = 1, nshell_orb(iset)
168 DO ipgf = 1, npgf_orb(iset)
170 orb_index(ipgf, ishell, iset) = nf_orb
178 DO ishell = 1, nshell_ri(iset)
179 DO ipgf = 1, npgf_ri(iset)
181 ri_index(ipgf, ishell, iset) = nf_ri
186 lmax_orb = maxval(orb_basis%lmax)
187 lmax_ri = maxval(ri_basis%lmax)
188 nl_max = int((lmax_orb + lmax_ri)/2) + 1
189 ALLOCATE (scon_mix(nl_max, nf_ri, nf_orb, nl_max))
192 ALLOCATE (shg_fac(0:nl_max - 1))
195 DO iset = 1, nset_orb
196 DO ishell = 1, nshell_orb(iset)
197 l1 = orb_basis%l(ishell, iset)
198 const1 = sqrt(1.0_dp/real(2*l1 + 1,
dp))
200 DO jshell = 1, nshell_ri(jset)
201 l2 = ri_basis%l(jshell, jset)
202 const2 = sqrt(1.0_dp/real(2*l2 + 1,
dp))
203 nl = int((l1 + l2)/2)
204 IF (l1 == 0 .OR. l2 == 0) nl = 0
207 const = const1*const2*2.0_dp*sqrt(
pi*real(2*l + 1,
dp))
209 shg_fac(iil) =
fac(l + iil - 1)*
ifac(l)*real(l,
dp) &
212 DO ipgf = 1, npgf_orb(iset)
213 forb = orb_index(ipgf, ishell, iset)
214 gcc_orb = orb_basis%gcc(ipgf, ishell, iset)
215 scon1 = norm_orb(iset, ishell)*gcc_orb
216 DO jpgf = 1, npgf_ri(jset)
217 fri = ri_index(jpgf, jshell, jset)
218 gcc_ri = ri_basis%gcc(jpgf, jshell, jset)
219 scon2 = norm_ri(jset, jshell)*gcc_ri
220 zet = zet_orb(ipgf, iset) + zet_ri(jpgf, jset)
221 cjf = 1.0_dp/((2._dp*zet)**l)
222 prefac = const*cjf*scon1*scon2
224 scon_mix(iil + 1, fri, forb, il + 1) = prefac*shg_fac(iil)/zet**iil
234 DEALLOCATE (norm_orb, norm_ri, shg_fac)
248 INTEGER,
INTENT(IN) :: m
249 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(IN) :: scon_shg
250 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: scon_rx2m
252 INTEGER :: ipgf, iset, ishell, j, l, maxpgf, &
254 INTEGER,
DIMENSION(:),
POINTER :: npgf, nshell
255 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: shg_fac
256 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: zet
259 nshell => basis%nshell
263 maxpgf =
SIZE(basis%gcc, 1)
264 maxshell =
SIZE(basis%gcc, 2)
265 ALLOCATE (scon_rx2m(maxpgf, m + 1, maxshell, nset))
267 ALLOCATE (shg_fac(0:m))
271 DO ishell = 1, nshell(iset)
272 l = basis%l(ishell, iset)
274 shg_fac(j) =
fac(l + j - 1)*
ifac(l)*real(l,
dp) &
277 DO ipgf = 1, npgf(iset)
279 scon_rx2m(ipgf, j + 1, ishell, iset) = scon_shg(ipgf, ishell, iset) &
280 *shg_fac(j)/zet(ipgf, iset)**j