25 #include "../base/base_uses.f90"
33 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'aux_basis_set'
55 TYPE(gto_basis_set_type),
POINTER :: aux_basis
56 CHARACTER(LEN=default_string_length) :: bsname
57 INTEGER,
INTENT(IN) :: nsets
58 INTEGER,
DIMENSION(:),
INTENT(IN) :: lmin, lmax
59 INTEGER,
DIMENSION(0:, :),
INTENT(IN) :: nl
60 INTEGER,
DIMENSION(:),
INTENT(IN) :: npgf
61 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN) :: zet
63 INTEGER :: i, ico, info, iset, ishell, j, l, &
64 lshell, m, maxco, maxpgf, maxshell, &
66 REAL(kind=
dp) :: za, zb, zetab
67 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: so
69 cpassert(.NOT.
ASSOCIATED(aux_basis))
72 aux_basis%name = bsname
73 aux_basis%aliases = bsname
74 aux_basis%nset = nsets
76 ALLOCATE (aux_basis%npgf(nsets), aux_basis%nshell(nsets), &
77 aux_basis%lmax(nsets), aux_basis%lmin(nsets))
78 aux_basis%lmax(1:nsets) = lmax(1:nsets)
79 aux_basis%lmin(1:nsets) = lmin(1:nsets)
80 aux_basis%npgf(1:nsets) = npgf(1:nsets)
82 aux_basis%nshell(iset) = 0
83 DO l = lmin(iset), lmax(iset)
84 aux_basis%nshell(iset) = aux_basis%nshell(iset) + nl(l, iset)
87 maxpgf = maxval(npgf(1:nsets))
88 maxshell = maxval(aux_basis%nshell(1:nsets))
89 ALLOCATE (aux_basis%zet(maxpgf, nsets))
90 aux_basis%zet(1:maxpgf, 1:nsets) = zet(1:maxpgf, 1:nsets)
92 ALLOCATE (aux_basis%n(maxshell, nsets))
93 ALLOCATE (aux_basis%l(maxshell, nsets))
94 ALLOCATE (aux_basis%gcc(maxpgf, maxshell, nsets))
98 DO l = lmin(iset), lmax(iset)
101 aux_basis%l(ns, iset) = l
102 aux_basis%n(ns, iset) = l + i
108 aux_basis%gcc = 0.0_dp
111 DO l = lmin(iset), lmax(iset)
112 nx = aux_basis%npgf(iset)
113 ALLOCATE (so(nx, nx))
114 cpassert(nx >= nl(l, iset))
116 za = (2.0_dp*zet(i, iset))**(0.25_dp*(2*l + 3))
118 zb = (2.0_dp*zet(j, iset))**(0.25_dp*(2*l + 3))
119 zetab = zet(i, iset) + zet(j, iset)
120 so(i, j) = za*zb/zetab**(l + 1.5_dp)
127 CALL dtrtri(
"U",
"N", nx, so, nx, info)
129 DO i = ns + 1, ns + nl(l, iset)
131 aux_basis%gcc(j, i, iset) = so(j, i - ns)
134 IF (nl(l, iset) < nx)
THEN
136 DO j = nl(l, iset) + 1, nx
137 aux_basis%gcc(j, i, iset) = 1.0_dp
140 ns = ns + nl(l, iset)
146 ALLOCATE (aux_basis%first_cgf(maxshell, nsets))
147 ALLOCATE (aux_basis%first_sgf(maxshell, nsets))
148 ALLOCATE (aux_basis%last_cgf(maxshell, nsets))
149 ALLOCATE (aux_basis%last_sgf(maxshell, nsets))
150 ALLOCATE (aux_basis%ncgf_set(nsets))
151 ALLOCATE (aux_basis%nsgf_set(nsets))
157 aux_basis%ncgf_set(iset) = 0
158 aux_basis%nsgf_set(iset) = 0
159 DO ishell = 1, aux_basis%nshell(iset)
160 lshell = aux_basis%l(ishell, iset)
161 aux_basis%first_cgf(ishell, iset) = ncgf + 1
162 ncgf = ncgf +
nco(lshell)
163 aux_basis%last_cgf(ishell, iset) = ncgf
164 aux_basis%ncgf_set(iset) = &
165 aux_basis%ncgf_set(iset) +
nco(lshell)
166 aux_basis%first_sgf(ishell, iset) = nsgf + 1
167 nsgf = nsgf +
nso(lshell)
168 aux_basis%last_sgf(ishell, iset) = nsgf
169 aux_basis%nsgf_set(iset) = &
170 aux_basis%nsgf_set(iset) +
nso(lshell)
172 maxco = max(maxco, npgf(iset)*
ncoset(lmax(iset)))
174 aux_basis%ncgf = ncgf
175 aux_basis%nsgf = nsgf
177 ALLOCATE (aux_basis%lx(ncgf))
178 ALLOCATE (aux_basis%ly(ncgf))
179 ALLOCATE (aux_basis%lz(ncgf))
180 ALLOCATE (aux_basis%m(nsgf))
181 ALLOCATE (aux_basis%cgf_symbol(ncgf))
182 ALLOCATE (aux_basis%sgf_symbol(nsgf))
188 DO ishell = 1, aux_basis%nshell(iset)
189 lshell = aux_basis%l(ishell, iset)
192 aux_basis%lx(ncgf) =
indco(1, ico)
193 aux_basis%ly(ncgf) =
indco(2, ico)
194 aux_basis%lz(ncgf) =
indco(3, ico)
195 aux_basis%cgf_symbol(ncgf) = &
196 cgf_symbol(aux_basis%n(ishell, iset), (/aux_basis%lx(ncgf), &
197 aux_basis%ly(ncgf), &
198 aux_basis%lz(ncgf)/))
200 DO m = -lshell, lshell
202 aux_basis%m(nsgf) = m
203 aux_basis%sgf_symbol(nsgf) = &
204 sgf_symbol(aux_basis%n(ishell, iset), lshell, m)
210 aux_basis%kind_radius = 0.0_dp
211 aux_basis%short_kind_radius = 0.0_dp
212 ALLOCATE (aux_basis%set_radius(nsets))
213 ALLOCATE (aux_basis%pgf_radius(maxpgf, nsets))
214 aux_basis%set_radius = 0.0_dp
215 aux_basis%pgf_radius = 0.0_dp
218 ALLOCATE (aux_basis%cphi(maxco, ncgf))
219 ALLOCATE (aux_basis%sphi(maxco, nsgf))
220 ALLOCATE (aux_basis%scon(maxco, nsgf))
221 ALLOCATE (aux_basis%norm_cgf(ncgf))
222 aux_basis%norm_type = 2
subroutine, public create_aux_basis(aux_basis, bsname, nsets, lmin, lmax, nl, npgf, zet)
create a basis in GTO form
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Interface to the LAPACK F77 library.
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public nco
integer, dimension(:), allocatable, public ncoset
integer, dimension(:, :), allocatable, public indco
integer, dimension(:), allocatable, public nso
character(len=12) function, public cgf_symbol(n, lxyz)
Build a Cartesian orbital symbol (orbital labels for printing).
character(len=6) function, public sgf_symbol(n, l, m)
Build a spherical orbital symbol (orbital labels for printing).