55#include "../base/base_uses.f90"
63 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'basis_set_types'
74 CHARACTER(LEN=default_string_length) :: name =
""
75 CHARACTER(LEN=default_string_length) :: aliases =
""
76 REAL(kind=
dp) :: kind_radius = 0.0_dp
77 REAL(kind=
dp) :: short_kind_radius = 0.0_dp
78 INTEGER :: norm_type = -1
79 INTEGER :: ncgf = -1, nset = -1, nsgf = -1
80 CHARACTER(LEN=12),
DIMENSION(:),
POINTER ::
cgf_symbol => null()
81 CHARACTER(LEN=6),
DIMENSION(:),
POINTER ::
sgf_symbol => null()
82 REAL(kind=
dp),
DIMENSION(:),
POINTER :: norm_cgf => null(), set_radius => null()
83 INTEGER,
DIMENSION(:),
POINTER :: lmax => null(), lmin => null(), &
84 lx => null(), ly => null(), lz => null(), &
85 m => null(), ncgf_set => null(), &
86 npgf => null(), nsgf_set => null(), nshell => null()
87 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: cphi => null(), pgf_radius => null(), sphi => null(), &
88 scon => null(), zet => null()
89 INTEGER,
DIMENSION(:, :),
POINTER :: first_cgf => null(), first_sgf => null(), l => null(), &
90 last_cgf => null(), last_sgf => null(), n => null()
91 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: gcc => null()
103 CHARACTER(LEN=default_string_length) :: name =
""
104 INTEGER :: nshell = -1
105 CHARACTER(LEN=6),
DIMENSION(:),
POINTER :: symbol => null()
106 INTEGER,
DIMENSION(:),
POINTER :: nq => null(), lq => null()
107 REAL(kind=
dp),
DIMENSION(:),
POINTER :: zet => null()
112 MODULE PROCEDURE read_gto_basis_set1, read_gto_basis_set2
161 ALLOCATE (gto_basis_set)
177 IF (
ASSOCIATED(gto_basis_set))
THEN
178 IF (
ASSOCIATED(gto_basis_set%cgf_symbol))
DEALLOCATE (gto_basis_set%cgf_symbol)
179 IF (
ASSOCIATED(gto_basis_set%sgf_symbol))
DEALLOCATE (gto_basis_set%sgf_symbol)
180 IF (
ASSOCIATED(gto_basis_set%norm_cgf))
DEALLOCATE (gto_basis_set%norm_cgf)
181 IF (
ASSOCIATED(gto_basis_set%set_radius))
DEALLOCATE (gto_basis_set%set_radius)
182 IF (
ASSOCIATED(gto_basis_set%lmax))
DEALLOCATE (gto_basis_set%lmax)
183 IF (
ASSOCIATED(gto_basis_set%lmin))
DEALLOCATE (gto_basis_set%lmin)
184 IF (
ASSOCIATED(gto_basis_set%lx))
DEALLOCATE (gto_basis_set%lx)
185 IF (
ASSOCIATED(gto_basis_set%ly))
DEALLOCATE (gto_basis_set%ly)
186 IF (
ASSOCIATED(gto_basis_set%lz))
DEALLOCATE (gto_basis_set%lz)
187 IF (
ASSOCIATED(gto_basis_set%m))
DEALLOCATE (gto_basis_set%m)
188 IF (
ASSOCIATED(gto_basis_set%ncgf_set))
DEALLOCATE (gto_basis_set%ncgf_set)
189 IF (
ASSOCIATED(gto_basis_set%npgf))
DEALLOCATE (gto_basis_set%npgf)
190 IF (
ASSOCIATED(gto_basis_set%nsgf_set))
DEALLOCATE (gto_basis_set%nsgf_set)
191 IF (
ASSOCIATED(gto_basis_set%nshell))
DEALLOCATE (gto_basis_set%nshell)
192 IF (
ASSOCIATED(gto_basis_set%cphi))
DEALLOCATE (gto_basis_set%cphi)
193 IF (
ASSOCIATED(gto_basis_set%pgf_radius))
DEALLOCATE (gto_basis_set%pgf_radius)
194 IF (
ASSOCIATED(gto_basis_set%sphi))
DEALLOCATE (gto_basis_set%sphi)
195 IF (
ASSOCIATED(gto_basis_set%scon))
DEALLOCATE (gto_basis_set%scon)
196 IF (
ASSOCIATED(gto_basis_set%zet))
DEALLOCATE (gto_basis_set%zet)
197 IF (
ASSOCIATED(gto_basis_set%first_cgf))
DEALLOCATE (gto_basis_set%first_cgf)
198 IF (
ASSOCIATED(gto_basis_set%first_sgf))
DEALLOCATE (gto_basis_set%first_sgf)
199 IF (
ASSOCIATED(gto_basis_set%l))
DEALLOCATE (gto_basis_set%l)
200 IF (
ASSOCIATED(gto_basis_set%last_cgf))
DEALLOCATE (gto_basis_set%last_cgf)
201 IF (
ASSOCIATED(gto_basis_set%last_sgf))
DEALLOCATE (gto_basis_set%last_sgf)
202 IF (
ASSOCIATED(gto_basis_set%n))
DEALLOCATE (gto_basis_set%n)
203 IF (
ASSOCIATED(gto_basis_set%gcc))
DEALLOCATE (gto_basis_set%gcc)
204 DEALLOCATE (gto_basis_set)
220 INTEGER :: maxco, maxpgf, maxshell, ncgf, nset, nsgf
224 basis_set_out%name = basis_set_in%name
225 basis_set_out%aliases = basis_set_in%aliases
226 basis_set_out%kind_radius = basis_set_in%kind_radius
227 basis_set_out%norm_type = basis_set_in%norm_type
228 basis_set_out%nset = basis_set_in%nset
229 basis_set_out%ncgf = basis_set_in%ncgf
230 basis_set_out%nsgf = basis_set_in%nsgf
231 nset = basis_set_in%nset
232 ncgf = basis_set_in%ncgf
233 nsgf = basis_set_in%nsgf
234 ALLOCATE (basis_set_out%cgf_symbol(ncgf))
235 ALLOCATE (basis_set_out%sgf_symbol(nsgf))
236 basis_set_out%cgf_symbol = basis_set_in%cgf_symbol
237 basis_set_out%sgf_symbol = basis_set_in%sgf_symbol
238 ALLOCATE (basis_set_out%norm_cgf(ncgf))
239 basis_set_out%norm_cgf = basis_set_in%norm_cgf
240 ALLOCATE (basis_set_out%set_radius(nset))
241 basis_set_out%set_radius = basis_set_in%set_radius
242 ALLOCATE (basis_set_out%lmax(nset), basis_set_out%lmin(nset), basis_set_out%npgf(nset), basis_set_out%nshell(nset))
243 basis_set_out%lmax = basis_set_in%lmax
244 basis_set_out%lmin = basis_set_in%lmin
245 basis_set_out%npgf = basis_set_in%npgf
246 basis_set_out%nshell = basis_set_in%nshell
247 ALLOCATE (basis_set_out%lx(ncgf), basis_set_out%ly(ncgf), basis_set_out%lz(ncgf), basis_set_out%m(nsgf))
248 basis_set_out%lx = basis_set_in%lx
249 basis_set_out%ly = basis_set_in%ly
250 basis_set_out%lz = basis_set_in%lz
251 basis_set_out%m = basis_set_in%m
252 ALLOCATE (basis_set_out%ncgf_set(nset), basis_set_out%nsgf_set(nset))
253 basis_set_out%ncgf_set = basis_set_in%ncgf_set
254 basis_set_out%nsgf_set = basis_set_in%nsgf_set
255 maxco =
SIZE(basis_set_in%cphi, 1)
256 ALLOCATE (basis_set_out%cphi(maxco, ncgf), basis_set_out%sphi(maxco, nsgf), basis_set_out%scon(maxco, nsgf))
257 basis_set_out%cphi = basis_set_in%cphi
258 basis_set_out%sphi = basis_set_in%sphi
259 basis_set_out%scon = basis_set_in%scon
260 maxpgf = maxval(basis_set_in%npgf)
261 ALLOCATE (basis_set_out%pgf_radius(maxpgf, nset), basis_set_out%zet(maxpgf, nset))
262 basis_set_out%pgf_radius = basis_set_in%pgf_radius
263 basis_set_out%zet = basis_set_in%zet
264 maxshell = maxval(basis_set_in%nshell)
265 ALLOCATE (basis_set_out%first_cgf(maxshell, nset), basis_set_out%first_sgf(maxshell, nset))
266 ALLOCATE (basis_set_out%last_cgf(maxshell, nset), basis_set_out%last_sgf(maxshell, nset))
267 basis_set_out%first_cgf = basis_set_in%first_cgf
268 basis_set_out%first_sgf = basis_set_in%first_sgf
269 basis_set_out%last_cgf = basis_set_in%last_cgf
270 basis_set_out%last_sgf = basis_set_in%last_sgf
271 ALLOCATE (basis_set_out%n(maxshell, nset), basis_set_out%l(maxshell, nset))
272 basis_set_out%n = basis_set_in%n
273 basis_set_out%l = basis_set_in%l
274 ALLOCATE (basis_set_out%gcc(maxpgf, maxshell, nset))
275 basis_set_out%gcc = basis_set_in%gcc
291 INTEGER,
INTENT(IN),
OPTIONAL :: lmax
293 INTEGER :: i, ico, ip, ipgf, iset, ishell, l, lm, &
294 lshell, m, maxco, mpgf, nc, ncgf, ns, &
296 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: nindex, nprim
297 REAL(kind=
dp) :: zet0
298 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: zet, zeta
300 mpgf = sum(basis_set%npgf)
301 lm = maxval(basis_set%lmax)
302 ALLOCATE (zet(mpgf, 0:lm), zeta(mpgf, lm + 1), nindex(mpgf), nprim(0:lm))
307 DO iset = 1, basis_set%nset
308 IF (basis_set%lmin(iset) <= l .AND. basis_set%lmax(iset) >= l)
THEN
309 DO ipgf = 1, basis_set%npgf(iset)
311 zet(ip, l) = basis_set%zet(ipgf, iset)
320 zet(1:nprim(l), l) = -zet(1:nprim(l), l)
321 CALL sort(zet(1:nprim(l), l), nprim(l), nindex)
326 IF (abs(zet0 - zet(i, l)) > 1.e-6_dp)
THEN
328 zeta(ip, l + 1) = zet(i, l)
333 zeta(1:ip, l + 1) = -zeta(1:ip, l + 1)
338 IF (
PRESENT(lmax))
THEN
344 cpwarn(
"The name of the primitive basis set will be truncated.")
346 pbasis%name = trim(basis_set%name)//
"_primitive"
347 pbasis%kind_radius = basis_set%kind_radius
348 pbasis%short_kind_radius = basis_set%short_kind_radius
349 pbasis%norm_type = basis_set%norm_type
352 ALLOCATE (pbasis%lmax(nset), pbasis%lmin(nset), pbasis%npgf(nset), pbasis%nshell(nset))
354 pbasis%lmax(iset) = iset - 1
355 pbasis%lmin(iset) = iset - 1
356 pbasis%npgf(iset) = nprim(iset - 1)
357 pbasis%nshell(iset) = nprim(iset - 1)
362 pbasis%ncgf = pbasis%ncgf + nprim(l)*((l + 1)*(l + 2))/2
363 pbasis%nsgf = pbasis%nsgf + nprim(l)*(2*l + 1)
366 ALLOCATE (pbasis%zet(mpgf, nset))
367 pbasis%zet(1:mpgf, 1:nset) = zeta(1:mpgf, 1:nset)
369 ALLOCATE (pbasis%l(mpgf, nset), pbasis%n(mpgf, nset))
371 DO ip = 1, nprim(iset - 1)
372 pbasis%l(ip, iset) = iset - 1
373 pbasis%n(ip, iset) = iset + ip - 1
377 ALLOCATE (pbasis%cgf_symbol(pbasis%ncgf))
378 ALLOCATE (pbasis%lx(pbasis%ncgf))
379 ALLOCATE (pbasis%ly(pbasis%ncgf))
380 ALLOCATE (pbasis%lz(pbasis%ncgf))
381 ALLOCATE (pbasis%m(pbasis%nsgf))
382 ALLOCATE (pbasis%sgf_symbol(pbasis%nsgf))
383 ALLOCATE (pbasis%ncgf_set(nset), pbasis%nsgf_set(nset))
389 pbasis%ncgf_set(iset) = nprim(l)*((l + 1)*(l + 2))/2
390 pbasis%nsgf_set(iset) = nprim(l)*(2*l + 1)
391 DO ishell = 1, pbasis%nshell(iset)
392 lshell = pbasis%l(ishell, iset)
395 pbasis%lx(ncgf) =
indco(1, ico)
396 pbasis%ly(ncgf) =
indco(2, ico)
397 pbasis%lz(ncgf) =
indco(3, ico)
398 pbasis%cgf_symbol(ncgf) = &
399 cgf_symbol(pbasis%n(ishell, iset), (/pbasis%lx(ncgf), pbasis%ly(ncgf), pbasis%lz(ncgf)/))
401 DO m = -lshell, lshell
404 pbasis%sgf_symbol(nsgf) =
sgf_symbol(pbasis%n(ishell, iset), lshell, m)
408 cpassert(ncgf == pbasis%ncgf)
409 cpassert(nsgf == pbasis%nsgf)
411 ALLOCATE (pbasis%gcc(mpgf, mpgf, nset))
415 pbasis%gcc(i, i, iset) = 1.0_dp
419 ALLOCATE (pbasis%first_cgf(mpgf, nset))
420 ALLOCATE (pbasis%first_sgf(mpgf, nset))
421 ALLOCATE (pbasis%last_cgf(mpgf, nset))
422 ALLOCATE (pbasis%last_sgf(mpgf, nset))
427 DO ishell = 1, pbasis%nshell(iset)
428 lshell = pbasis%l(ishell, iset)
429 pbasis%first_cgf(ishell, iset) = nc + 1
430 nc = nc +
nco(lshell)
431 pbasis%last_cgf(ishell, iset) = nc
432 pbasis%first_sgf(ishell, iset) = ns + 1
433 ns = ns +
nso(lshell)
434 pbasis%last_sgf(ishell, iset) = ns
436 maxco = max(maxco, pbasis%npgf(iset)*
ncoset(pbasis%lmax(iset)))
439 ALLOCATE (pbasis%norm_cgf(ncgf))
440 ALLOCATE (pbasis%cphi(maxco, ncgf))
442 ALLOCATE (pbasis%sphi(maxco, nsgf))
444 ALLOCATE (pbasis%scon(maxco, ncgf))
446 ALLOCATE (pbasis%set_radius(nset))
447 ALLOCATE (pbasis%pgf_radius(mpgf, nset))
448 pbasis%pgf_radius = 0.0_dp
452 DEALLOCATE (zet, zeta, nindex, nprim)
468 CHARACTER(LEN=12),
DIMENSION(:),
POINTER ::
cgf_symbol
469 CHARACTER(LEN=6),
DIMENSION(:),
POINTER ::
sgf_symbol
470 INTEGER :: iset, ishell, lshell, maxco, maxpgf, &
471 maxshell, nc, ncgf, ncgfn, ncgfo, ns, &
472 nset, nsetn, nseto, nsgf, nsgfn, nsgfo
475 cpwarn(
"The name of the combined GTO basis set will be truncated.")
477 basis_set%name = trim(basis_set%name)//trim(basis_set_add%name)
478 basis_set%nset = basis_set%nset + basis_set_add%nset
479 basis_set%ncgf = basis_set%ncgf + basis_set_add%ncgf
480 basis_set%nsgf = basis_set%nsgf + basis_set_add%nsgf
481 nset = basis_set%nset
482 ncgf = basis_set%ncgf
483 nsgf = basis_set%nsgf
485 nsetn = basis_set_add%nset
487 CALL reallocate(basis_set%set_radius, 1, nset)
492 basis_set%lmax(nseto + 1:nset) = basis_set_add%lmax(1:nsetn)
493 basis_set%lmin(nseto + 1:nset) = basis_set_add%lmin(1:nsetn)
494 basis_set%npgf(nseto + 1:nset) = basis_set_add%npgf(1:nsetn)
495 basis_set%nshell(nseto + 1:nset) = basis_set_add%nshell(1:nsetn)
498 basis_set%ncgf_set(nseto + 1:nset) = basis_set_add%ncgf_set(1:nsetn)
499 basis_set%nsgf_set(nseto + 1:nset) = basis_set_add%nsgf_set(1:nsetn)
501 nsgfn = basis_set_add%nsgf
503 ncgfn = basis_set_add%ncgf
507 cgf_symbol(1:ncgfo) = basis_set%cgf_symbol(1:ncgfo)
508 cgf_symbol(ncgfo + 1:ncgf) = basis_set_add%cgf_symbol(1:ncgfn)
509 sgf_symbol(1:nsgfo) = basis_set%sgf_symbol(1:nsgfo)
510 sgf_symbol(nsgfo + 1:nsgf) = basis_set_add%sgf_symbol(1:nsgfn)
511 DEALLOCATE (basis_set%cgf_symbol, basis_set%sgf_symbol)
512 ALLOCATE (basis_set%cgf_symbol(ncgf), basis_set%sgf_symbol(nsgf))
521 basis_set%lx(ncgfo + 1:ncgf) = basis_set_add%lx(1:ncgfn)
522 basis_set%ly(ncgfo + 1:ncgf) = basis_set_add%ly(1:ncgfn)
523 basis_set%lz(ncgfo + 1:ncgf) = basis_set_add%lz(1:ncgfn)
524 basis_set%m(nsgfo + 1:nsgf) = basis_set_add%m(1:nsgfn)
526 maxpgf = maxval(basis_set%npgf)
527 CALL reallocate(basis_set%zet, 1, maxpgf, 1, nset)
528 nc =
SIZE(basis_set_add%zet, 1)
530 basis_set%zet(1:nc, nseto + iset) = basis_set_add%zet(1:nc, iset)
533 maxshell = maxval(basis_set%nshell)
534 CALL reallocate(basis_set%l, 1, maxshell, 1, nset)
535 CALL reallocate(basis_set%n, 1, maxshell, 1, nset)
536 nc =
SIZE(basis_set_add%l, 1)
538 basis_set%l(1:nc, nseto + iset) = basis_set_add%l(1:nc, iset)
539 basis_set%n(1:nc, nseto + iset) = basis_set_add%n(1:nc, iset)
542 CALL reallocate(basis_set%first_cgf, 1, maxshell, 1, nset)
543 CALL reallocate(basis_set%first_sgf, 1, maxshell, 1, nset)
544 CALL reallocate(basis_set%last_cgf, 1, maxshell, 1, nset)
545 CALL reallocate(basis_set%last_sgf, 1, maxshell, 1, nset)
549 DO ishell = 1, basis_set%nshell(iset)
550 lshell = basis_set%l(ishell, iset)
551 basis_set%first_cgf(ishell, iset) = nc + 1
552 nc = nc +
nco(lshell)
553 basis_set%last_cgf(ishell, iset) = nc
554 basis_set%first_sgf(ishell, iset) = ns + 1
555 ns = ns +
nso(lshell)
556 basis_set%last_sgf(ishell, iset) = ns
560 CALL reallocate(basis_set%gcc, 1, maxpgf, 1, maxshell, 1, nset)
561 nc =
SIZE(basis_set_add%gcc, 1)
562 ns =
SIZE(basis_set_add%gcc, 2)
564 basis_set%gcc(1:nc, 1:ns, nseto + iset) = basis_set_add%gcc(1:nc, 1:ns, iset)
569 maxco = max(
SIZE(basis_set%cphi, 1),
SIZE(basis_set_add%cphi, 1))
570 CALL reallocate(basis_set%cphi, 1, maxco, 1, ncgf)
571 CALL reallocate(basis_set%sphi, 1, maxco, 1, nsgf)
572 CALL reallocate(basis_set%scon, 1, maxco, 1, nsgf)
573 CALL reallocate(basis_set%pgf_radius, 1, maxpgf, 1, nset)
627 nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, &
628 m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, &
629 last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, &
630 npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum)
637 CHARACTER(LEN=default_string_length), &
638 INTENT(OUT),
OPTIONAL :: name, aliases
639 INTEGER,
INTENT(OUT),
OPTIONAL :: norm_type
640 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: kind_radius
641 INTEGER,
INTENT(OUT),
OPTIONAL :: ncgf, nset, nsgf
642 CHARACTER(LEN=12),
DIMENSION(:),
OPTIONAL,
POINTER ::
cgf_symbol
643 CHARACTER(LEN=6),
DIMENSION(:),
OPTIONAL,
POINTER ::
sgf_symbol
644 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: norm_cgf, set_radius
645 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: lmax, lmin, lx, ly, lz, m, ncgf_set, &
646 npgf, nsgf_set, nshell
647 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: cphi, pgf_radius, sphi, scon, zet
648 INTEGER,
DIMENSION(:, :),
OPTIONAL,
POINTER :: first_cgf, first_sgf, l, last_cgf, &
650 REAL(kind=
dp),
DIMENSION(:, :, :),
OPTIONAL, &
652 INTEGER,
INTENT(OUT),
OPTIONAL :: maxco, maxl, maxpgf, maxsgf_set, &
653 maxshell, maxso, nco_sum, npgf_sum, &
655 INTEGER,
INTENT(IN),
OPTIONAL :: maxder
656 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: short_kind_radius
657 INTEGER,
INTENT(OUT),
OPTIONAL :: npgf_seg_sum
659 INTEGER :: iset, nder
661 IF (
PRESENT(name)) name = gto_basis_set%name
662 IF (
PRESENT(aliases)) aliases = gto_basis_set%aliases
663 IF (
PRESENT(norm_type)) norm_type = gto_basis_set%norm_type
664 IF (
PRESENT(kind_radius)) kind_radius = gto_basis_set%kind_radius
665 IF (
PRESENT(short_kind_radius)) short_kind_radius = gto_basis_set%short_kind_radius
666 IF (
PRESENT(ncgf)) ncgf = gto_basis_set%ncgf
667 IF (
PRESENT(nset)) nset = gto_basis_set%nset
668 IF (
PRESENT(nsgf)) nsgf = gto_basis_set%nsgf
671 IF (
PRESENT(norm_cgf)) norm_cgf => gto_basis_set%norm_cgf
672 IF (
PRESENT(set_radius)) set_radius => gto_basis_set%set_radius
673 IF (
PRESENT(lmax)) lmax => gto_basis_set%lmax
674 IF (
PRESENT(lmin)) lmin => gto_basis_set%lmin
675 IF (
PRESENT(lx)) lx => gto_basis_set%lx
676 IF (
PRESENT(ly)) ly => gto_basis_set%ly
677 IF (
PRESENT(lz)) lz => gto_basis_set%lz
678 IF (
PRESENT(m)) m => gto_basis_set%m
679 IF (
PRESENT(ncgf_set)) ncgf_set => gto_basis_set%ncgf_set
680 IF (
PRESENT(npgf)) npgf => gto_basis_set%npgf
681 IF (
PRESENT(nsgf_set)) nsgf_set => gto_basis_set%nsgf_set
682 IF (
PRESENT(nshell)) nshell => gto_basis_set%nshell
683 IF (
PRESENT(cphi)) cphi => gto_basis_set%cphi
684 IF (
PRESENT(pgf_radius)) pgf_radius => gto_basis_set%pgf_radius
685 IF (
PRESENT(sphi)) sphi => gto_basis_set%sphi
686 IF (
PRESENT(scon)) scon => gto_basis_set%scon
687 IF (
PRESENT(zet)) zet => gto_basis_set%zet
688 IF (
PRESENT(first_cgf)) first_cgf => gto_basis_set%first_cgf
689 IF (
PRESENT(first_sgf)) first_sgf => gto_basis_set%first_sgf
690 IF (
PRESENT(l)) l => gto_basis_set%l
691 IF (
PRESENT(last_cgf)) last_cgf => gto_basis_set%last_cgf
692 IF (
PRESENT(last_sgf)) last_sgf => gto_basis_set%last_sgf
693 IF (
PRESENT(n)) n => gto_basis_set%n
694 IF (
PRESENT(gcc)) gcc => gto_basis_set%gcc
695 IF (
PRESENT(maxco))
THEN
697 IF (
PRESENT(maxder))
THEN
702 DO iset = 1, gto_basis_set%nset
703 maxco = max(maxco, gto_basis_set%npgf(iset)* &
704 ncoset(gto_basis_set%lmax(iset) + nder))
707 IF (
PRESENT(maxl))
THEN
709 DO iset = 1, gto_basis_set%nset
710 maxl = max(maxl, gto_basis_set%lmax(iset))
713 IF (
PRESENT(maxpgf))
THEN
715 DO iset = 1, gto_basis_set%nset
716 maxpgf = max(maxpgf, gto_basis_set%npgf(iset))
719 IF (
PRESENT(maxsgf_set))
THEN
721 DO iset = 1, gto_basis_set%nset
722 maxsgf_set = max(maxsgf_set, gto_basis_set%nsgf_set(iset))
725 IF (
PRESENT(maxshell))
THEN
727 DO iset = 1, gto_basis_set%nset
728 maxshell = max(maxshell, gto_basis_set%nshell(iset))
731 IF (
PRESENT(maxso))
THEN
733 DO iset = 1, gto_basis_set%nset
734 maxso = max(maxso, gto_basis_set%npgf(iset)* &
735 nsoset(gto_basis_set%lmax(iset)))
739 IF (
PRESENT(nco_sum))
THEN
741 DO iset = 1, gto_basis_set%nset
742 nco_sum = nco_sum + gto_basis_set%npgf(iset)* &
743 ncoset(gto_basis_set%lmax(iset))
746 IF (
PRESENT(npgf_sum)) npgf_sum = sum(gto_basis_set%npgf)
747 IF (
PRESENT(nshell_sum)) nshell_sum = sum(gto_basis_set%nshell)
748 IF (
PRESENT(npgf_seg_sum))
THEN
750 DO iset = 1, gto_basis_set%nset
751 npgf_seg_sum = npgf_seg_sum + gto_basis_set%npgf(iset)*gto_basis_set%nshell(iset)
769 CHARACTER(len=*),
PARAMETER :: routinen =
'init_aux_basis_set'
775 IF (.NOT.
ASSOCIATED(gto_basis_set))
RETURN
777 CALL timeset(routinen, handle)
779 SELECT CASE (gto_basis_set%norm_type)
783 CALL init_norm_cgf_aux_2(gto_basis_set)
786 CALL init_norm_cgf_aux(gto_basis_set)
788 cpabort(
"Normalization method not specified")
794 CALL timestop(handle)
812 CHARACTER(len=*),
PARAMETER :: routinen =
'init_cphi_and_sphi'
814 INTEGER :: first_cgf, first_sgf, handle, icgf, ico, &
815 ipgf, iset, ishell, l, last_sgf, lmax, &
816 lmin, n, n1, n2, ncgf, nn, nn1, nn2, &
822 CALL timeset(routinen, handle)
824 gto_basis_set%cphi = 0.0_dp
825 DO iset = 1, gto_basis_set%nset
826 n =
ncoset(gto_basis_set%lmax(iset))
827 DO ishell = 1, gto_basis_set%nshell(iset)
828 DO icgf = gto_basis_set%first_cgf(ishell, iset), &
829 gto_basis_set%last_cgf(ishell, iset)
830 ico =
coset(gto_basis_set%lx(icgf), &
831 gto_basis_set%ly(icgf), &
832 gto_basis_set%lz(icgf))
833 DO ipgf = 1, gto_basis_set%npgf(iset)
834 gto_basis_set%cphi(ico, icgf) = gto_basis_set%norm_cgf(icgf)* &
835 gto_basis_set%gcc(ipgf, ishell, iset)
844 n =
SIZE(gto_basis_set%cphi, 1)
846 gto_basis_set%sphi = 0.0_dp
850 DO iset = 1, gto_basis_set%nset
851 DO ishell = 1, gto_basis_set%nshell(iset)
852 lmax = max(lmax, gto_basis_set%l(ishell, iset))
857 DO iset = 1, gto_basis_set%nset
858 DO ishell = 1, gto_basis_set%nshell(iset)
859 l = gto_basis_set%l(ishell, iset)
860 first_cgf = gto_basis_set%first_cgf(ishell, iset)
861 first_sgf = gto_basis_set%first_sgf(ishell, iset)
864 CALL dgemm(
"N",
"T", n, nsgf, ncgf, &
865 1.0_dp, gto_basis_set%cphi(1, first_cgf), n, &
867 0.0_dp, gto_basis_set%sphi(1, first_sgf), n)
876 n =
SIZE(gto_basis_set%scon, 1)
878 gto_basis_set%scon = 0.0_dp
880 DO iset = 1, gto_basis_set%nset
881 lmin = gto_basis_set%lmin(iset)
882 lmax = gto_basis_set%lmax(iset)
883 npgf = gto_basis_set%npgf(iset)
885 DO ishell = 1, gto_basis_set%nshell(iset)
886 first_sgf = gto_basis_set%first_sgf(ishell, iset)
887 last_sgf = gto_basis_set%last_sgf(ishell, iset)
891 n1 = (ipgf - 1)*nn + 1
893 gto_basis_set%scon(n1:n2, first_sgf:last_sgf) = gto_basis_set%sphi(nn1:nn2, first_sgf:last_sgf)
899 CALL timestop(handle)
907 SUBROUTINE init_norm_cgf_aux(gto_basis_set)
916 INTEGER :: icgf, ico, ipgf, iset, ishell, jco, &
917 jpgf, ll, lmax, lmin, lx, ly, lz, n, &
919 REAL(kind=
dp) :: fnorm, gcca, gccb
920 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: ff
921 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: gaa
922 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: vv
923 REAL(kind=
dp),
DIMENSION(:),
POINTER :: rpgfa, zeta
929 DO iset = 1, gto_basis_set%nset
930 n = max(n, gto_basis_set%npgf(iset)*
ncoset(gto_basis_set%lmax(iset)))
931 ll = max(ll, gto_basis_set%lmax(iset))
936 ALLOCATE (ff(0:ll + ll))
938 DO iset = 1, gto_basis_set%nset
939 lmax = gto_basis_set%lmax(iset)
940 lmin = gto_basis_set%lmin(iset)
942 npgfa = gto_basis_set%npgf(iset)
943 rpgfa => gto_basis_set%pgf_radius(1:npgfa, iset)
944 zeta => gto_basis_set%zet(1:npgfa, iset)
945 CALL coulomb2(lmax, npgfa, zeta, rpgfa, lmin, &
946 lmax, npgfa, zeta, rpgfa, lmin, &
947 (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, gaa, vv, ff(0:))
948 DO ishell = 1, gto_basis_set%nshell(iset)
949 DO icgf = gto_basis_set%first_cgf(ishell, iset), &
950 gto_basis_set%last_cgf(ishell, iset)
951 lx = gto_basis_set%lx(icgf)
952 ly = gto_basis_set%ly(icgf)
953 lz = gto_basis_set%lz(icgf)
954 ico =
coset(lx, ly, lz)
957 gcca = gto_basis_set%gcc(ipgf, ishell, iset)
958 jco =
coset(lx, ly, lz)
960 gccb = gto_basis_set%gcc(jpgf, ishell, iset)
961 fnorm = fnorm + gcca*gccb*gaa(ico, jco)
966 gto_basis_set%norm_cgf(icgf) = 1.0_dp/sqrt(fnorm)
974 END SUBROUTINE init_norm_cgf_aux
980 ELEMENTAL SUBROUTINE init_norm_cgf_aux_2(gto_basis_set)
989 INTEGER :: icgf, iset, ishell
991 DO iset = 1, gto_basis_set%nset
992 DO ishell = 1, gto_basis_set%nshell(iset)
993 DO icgf = gto_basis_set%first_cgf(ishell, iset), &
994 gto_basis_set%last_cgf(ishell, iset)
995 gto_basis_set%norm_cgf(icgf) = 1.0_dp
1000 END SUBROUTINE init_norm_cgf_aux_2
1007 ELEMENTAL SUBROUTINE init_norm_cgf_orb(gto_basis_set)
1011 INTEGER :: icgf, ipgf, iset, ishell, jpgf, l, lx, &
1013 REAL(kind=
dp) :: expzet, fnorm, gcca, gccb, prefac, zeta, &
1016 DO iset = 1, gto_basis_set%nset
1017 DO ishell = 1, gto_basis_set%nshell(iset)
1019 l = gto_basis_set%l(ishell, iset)
1021 expzet = 0.5_dp*real(2*l + 3,
dp)
1025 DO ipgf = 1, gto_basis_set%npgf(iset)
1026 gcca = gto_basis_set%gcc(ipgf, ishell, iset)
1027 zeta = gto_basis_set%zet(ipgf, iset)
1028 DO jpgf = 1, gto_basis_set%npgf(iset)
1029 gccb = gto_basis_set%gcc(jpgf, ishell, iset)
1030 zetb = gto_basis_set%zet(jpgf, iset)
1031 fnorm = fnorm + gcca*gccb/(zeta + zetb)**expzet
1035 fnorm = 0.5_dp**l*
pi**1.5_dp*fnorm
1037 DO icgf = gto_basis_set%first_cgf(ishell, iset), &
1038 gto_basis_set%last_cgf(ishell, iset)
1039 lx = gto_basis_set%lx(icgf)
1040 ly = gto_basis_set%ly(icgf)
1041 lz = gto_basis_set%lz(icgf)
1043 gto_basis_set%norm_cgf(icgf) = 1.0_dp/sqrt(prefac*fnorm)
1049 END SUBROUTINE init_norm_cgf_orb
1057 ELEMENTAL SUBROUTINE init_norm_cgf_orb_den(gto_basis_set)
1061 INTEGER :: icgf, ipgf, iset, ishell, l
1062 REAL(kind=
dp) :: expzet, gcca, prefac, zeta
1064 DO iset = 1, gto_basis_set%nset
1065 DO ishell = 1, gto_basis_set%nshell(iset)
1066 l = gto_basis_set%l(ishell, iset)
1067 expzet = 0.5_dp*real(2*l + 3,
dp)
1068 prefac = (1.0_dp/
pi)**1.5_dp
1069 DO ipgf = 1, gto_basis_set%npgf(iset)
1070 gcca = gto_basis_set%gcc(ipgf, ishell, iset)
1071 zeta = gto_basis_set%zet(ipgf, iset)
1072 gto_basis_set%gcc(ipgf, ishell, iset) = prefac*zeta**expzet*gcca
1074 DO icgf = gto_basis_set%first_cgf(ishell, iset), &
1075 gto_basis_set%last_cgf(ishell, iset)
1076 gto_basis_set%norm_cgf(icgf) = 1.0_dp
1081 END SUBROUTINE init_norm_cgf_orb_den
1092 CHARACTER(len=*),
PARAMETER :: routinen =
'init_orb_basis_set'
1098 IF (.NOT.
ASSOCIATED(gto_basis_set))
RETURN
1100 CALL timeset(routinen, handle)
1102 SELECT CASE (gto_basis_set%norm_type)
1106 CALL init_norm_cgf_orb_den(gto_basis_set)
1109 CALL normalise_gcc_orb(gto_basis_set)
1112 CALL init_norm_cgf_orb(gto_basis_set)
1114 CALL init_norm_cgf_orb(gto_basis_set)
1116 cpabort(
"Normalization method not specified")
1123 CALL timestop(handle)
1133 SUBROUTINE normalise_gcc_orb(gto_basis_set)
1137 INTEGER :: ipgf, iset, ishell, l
1138 REAL(kind=
dp) :: expzet, gcca, prefac, zeta
1140 DO iset = 1, gto_basis_set%nset
1141 DO ishell = 1, gto_basis_set%nshell(iset)
1142 l = gto_basis_set%l(ishell, iset)
1143 expzet = 0.25_dp*real(2*l + 3,
dp)
1144 prefac = 2.0_dp**l*(2.0_dp/
pi)**0.75_dp
1145 DO ipgf = 1, gto_basis_set%npgf(iset)
1146 gcca = gto_basis_set%gcc(ipgf, ishell, iset)
1147 zeta = gto_basis_set%zet(ipgf, iset)
1148 gto_basis_set%gcc(ipgf, ishell, iset) = prefac*zeta**expzet*gcca
1153 END SUBROUTINE normalise_gcc_orb
1164 SUBROUTINE read_gto_basis_set1(element_symbol, basis_set_name, gto_basis_set, &
1165 para_env, dft_section)
1167 CHARACTER(LEN=*),
INTENT(IN) :: element_symbol, basis_set_name
1172 CHARACTER(LEN=240) :: line
1173 CHARACTER(LEN=242) :: line2
1174 CHARACTER(len=default_path_length) :: basis_set_file_name, tmp
1175 CHARACTER(LEN=default_path_length),
DIMENSION(:), &
1177 CHARACTER(LEN=LEN(basis_set_name)) :: bsname
1178 CHARACTER(LEN=LEN(basis_set_name)+2) :: bsname2
1179 CHARACTER(LEN=LEN(element_symbol)) :: symbol
1180 CHARACTER(LEN=LEN(element_symbol)+2) :: symbol2
1181 INTEGER :: i, ibasis, ico, ipgf, irep, iset, ishell, lshell, m, maxco, maxl, maxpgf, &
1182 maxshell, nbasis, ncgf, nmin, nset, nsgf, sort_method, strlen1, strlen2
1183 INTEGER,
DIMENSION(:),
POINTER :: lmax, lmin, npgf, nshell
1184 INTEGER,
DIMENSION(:, :),
POINTER :: l, n
1185 LOGICAL :: basis_found, found, match
1186 REAL(KIND=
dp),
DIMENSION(:, :),
POINTER :: zet
1187 REAL(KIND=
dp),
DIMENSION(:, :, :),
POINTER :: gcc
1199 gto_basis_set%name = basis_set_name
1200 gto_basis_set%aliases = basis_set_name
1203 ALLOCATE (cbasis(nbasis))
1204 DO ibasis = 1, nbasis
1206 i_rep_val=ibasis, c_val=cbasis(ibasis))
1207 basis_set_file_name = cbasis(ibasis)
1208 tmp = basis_set_file_name
1216 basis_found = .false.
1217 basis_loop:
DO ibasis = 1, nbasis
1218 IF (basis_found)
EXIT basis_loop
1219 basis_set_file_name = cbasis(ibasis)
1220 CALL parser_create(parser, basis_set_file_name, para_env=para_env)
1222 bsname = basis_set_name
1223 symbol = element_symbol
1226 tmp = basis_set_name
1236 gto_basis_set%nset = nset
1237 gto_basis_set%ncgf = ncgf
1238 gto_basis_set%nsgf = nsgf
1242 CALL reallocate(gto_basis_set%nshell, 1, nset)
1243 CALL reallocate(gto_basis_set%n, 1, maxshell, 1, nset)
1244 CALL reallocate(gto_basis_set%l, 1, maxshell, 1, nset)
1245 CALL reallocate(gto_basis_set%zet, 1, maxpgf, 1, nset)
1246 CALL reallocate(gto_basis_set%gcc, 1, maxpgf, 1, maxshell, 1, nset)
1247 CALL reallocate(gto_basis_set%set_radius, 1, nset)
1248 CALL reallocate(gto_basis_set%pgf_radius, 1, maxpgf, 1, nset)
1249 CALL reallocate(gto_basis_set%first_cgf, 1, maxshell, 1, nset)
1250 CALL reallocate(gto_basis_set%first_sgf, 1, maxshell, 1, nset)
1251 CALL reallocate(gto_basis_set%last_cgf, 1, maxshell, 1, nset)
1252 CALL reallocate(gto_basis_set%last_sgf, 1, maxshell, 1, nset)
1253 CALL reallocate(gto_basis_set%ncgf_set, 1, nset)
1254 CALL reallocate(gto_basis_set%nsgf_set, 1, nset)
1255 CALL reallocate(gto_basis_set%cphi, 1, maxco, 1, ncgf)
1256 CALL reallocate(gto_basis_set%sphi, 1, maxco, 1, nsgf)
1257 CALL reallocate(gto_basis_set%scon, 1, maxco, 1, nsgf)
1262 CALL reallocate(gto_basis_set%norm_cgf, 1, ncgf)
1264 IF (tmp .NE.
"NONE")
THEN
1275 line2 =
" "//line//
" "
1276 symbol2 =
" "//trim(symbol)//
" "
1277 bsname2 =
" "//trim(bsname)//
" "
1278 strlen1 = len_trim(symbol2) + 1
1279 strlen2 = len_trim(bsname2) + 1
1281 IF ((index(line2, symbol2(:strlen1)) > 0) .AND. &
1282 (index(line2, bsname2(:strlen2)) > 0)) match = .true.
1285 i = index(line2, symbol2(:strlen1))
1286 i = i + 1 + index(line2(i + 1:),
" ")
1287 gto_basis_set%aliases = line2(i:)
1289 NULLIFY (gcc, l, lmax, lmin, n, npgf, nshell, zet)
1308 maxl = max(maxl, lmax(iset))
1309 IF (npgf(iset) > maxpgf)
THEN
1312 CALL reallocate(gcc, 1, maxpgf, 1, maxshell, 1, nset)
1315 DO lshell = lmin(iset), lmax(iset)
1316 nmin = n(1, iset) + lshell - lmin(iset)
1318 nshell(iset) = nshell(iset) + ishell
1319 IF (nshell(iset) > maxshell)
THEN
1320 maxshell = nshell(iset)
1323 CALL reallocate(gcc, 1, maxpgf, 1, maxshell, 1, nset)
1326 n(nshell(iset) - ishell + i, iset) = nmin + i - 1
1327 l(nshell(iset) - ishell + i, iset) = lshell
1330 DO ipgf = 1, npgf(iset)
1332 DO ishell = 1, nshell(iset)
1344 gto_basis_set%nset = nset
1348 CALL reallocate(gto_basis_set%nshell, 1, nset)
1349 CALL reallocate(gto_basis_set%n, 1, maxshell, 1, nset)
1350 CALL reallocate(gto_basis_set%l, 1, maxshell, 1, nset)
1351 CALL reallocate(gto_basis_set%zet, 1, maxpgf, 1, nset)
1352 CALL reallocate(gto_basis_set%gcc, 1, maxpgf, 1, maxshell, 1, nset)
1357 gto_basis_set%lmax(iset) = lmax(iset)
1358 gto_basis_set%lmin(iset) = lmin(iset)
1359 gto_basis_set%npgf(iset) = npgf(iset)
1360 gto_basis_set%nshell(iset) = nshell(iset)
1361 DO ishell = 1, nshell(iset)
1362 gto_basis_set%n(ishell, iset) = n(ishell, iset)
1363 gto_basis_set%l(ishell, iset) = l(ishell, iset)
1364 DO ipgf = 1, npgf(iset)
1365 gto_basis_set%gcc(ipgf, ishell, iset) = gcc(ipgf, ishell, iset)
1368 DO ipgf = 1, npgf(iset)
1369 gto_basis_set%zet(ipgf, iset) = zet(ipgf, iset)
1375 CALL reallocate(gto_basis_set%set_radius, 1, nset)
1376 CALL reallocate(gto_basis_set%pgf_radius, 1, maxpgf, 1, nset)
1377 CALL reallocate(gto_basis_set%first_cgf, 1, maxshell, 1, nset)
1378 CALL reallocate(gto_basis_set%first_sgf, 1, maxshell, 1, nset)
1379 CALL reallocate(gto_basis_set%last_cgf, 1, maxshell, 1, nset)
1380 CALL reallocate(gto_basis_set%last_sgf, 1, maxshell, 1, nset)
1381 CALL reallocate(gto_basis_set%ncgf_set, 1, nset)
1382 CALL reallocate(gto_basis_set%nsgf_set, 1, nset)
1389 gto_basis_set%ncgf_set(iset) = 0
1390 gto_basis_set%nsgf_set(iset) = 0
1391 DO ishell = 1, nshell(iset)
1392 lshell = gto_basis_set%l(ishell, iset)
1393 gto_basis_set%first_cgf(ishell, iset) = ncgf + 1
1394 ncgf = ncgf +
nco(lshell)
1395 gto_basis_set%last_cgf(ishell, iset) = ncgf
1396 gto_basis_set%ncgf_set(iset) = &
1397 gto_basis_set%ncgf_set(iset) +
nco(lshell)
1398 gto_basis_set%first_sgf(ishell, iset) = nsgf + 1
1399 nsgf = nsgf +
nso(lshell)
1400 gto_basis_set%last_sgf(ishell, iset) = nsgf
1401 gto_basis_set%nsgf_set(iset) = &
1402 gto_basis_set%nsgf_set(iset) +
nso(lshell)
1404 maxco = max(maxco, npgf(iset)*
ncoset(lmax(iset)))
1407 gto_basis_set%ncgf = ncgf
1408 gto_basis_set%nsgf = nsgf
1410 CALL reallocate(gto_basis_set%cphi, 1, maxco, 1, ncgf)
1411 CALL reallocate(gto_basis_set%sphi, 1, maxco, 1, nsgf)
1412 CALL reallocate(gto_basis_set%scon, 1, maxco, 1, nsgf)
1417 CALL reallocate(gto_basis_set%norm_cgf, 1, ncgf)
1418 ALLOCATE (gto_basis_set%cgf_symbol(ncgf))
1420 ALLOCATE (gto_basis_set%sgf_symbol(nsgf))
1426 DO ishell = 1, nshell(iset)
1427 lshell = gto_basis_set%l(ishell, iset)
1430 gto_basis_set%lx(ncgf) =
indco(1, ico)
1431 gto_basis_set%ly(ncgf) =
indco(2, ico)
1432 gto_basis_set%lz(ncgf) =
indco(3, ico)
1433 gto_basis_set%cgf_symbol(ncgf) = &
1434 cgf_symbol(n(ishell, iset), (/gto_basis_set%lx(ncgf), &
1435 gto_basis_set%ly(ncgf), &
1436 gto_basis_set%lz(ncgf)/))
1438 DO m = -lshell, lshell
1440 gto_basis_set%m(nsgf) = m
1441 gto_basis_set%sgf_symbol(nsgf) = &
1447 DEALLOCATE (gcc, l, lmax, lmin, n, npgf, nshell, zet)
1449 basis_found = .true.
1458 ALLOCATE (gto_basis_set%cgf_symbol(ncgf))
1459 ALLOCATE (gto_basis_set%sgf_symbol(nsgf))
1466 IF (tmp .NE.
"NONE")
THEN
1467 IF (.NOT. basis_found)
THEN
1468 basis_set_file_name =
""
1469 DO ibasis = 1, nbasis
1470 basis_set_file_name = trim(basis_set_file_name)//
"<"//trim(cbasis(ibasis))//
"> "
1472 CALL cp_abort(__location__, &
1473 "The requested basis set <"//trim(bsname)// &
1474 "> for element <"//trim(symbol)//
"> was not "// &
1475 "found in the basis set files "// &
1476 trim(basis_set_file_name))
1484 END SUBROUTINE read_gto_basis_set1
1496 SUBROUTINE read_gto_basis_set2(element_symbol, basis_type, gto_basis_set, &
1497 basis_section, irep, dft_section)
1499 CHARACTER(LEN=*),
INTENT(IN) :: element_symbol
1500 CHARACTER(LEN=*),
INTENT(INOUT) :: basis_type
1506 CHARACTER(len=20*default_string_length) :: line_att
1507 CHARACTER(LEN=240) :: line
1508 CHARACTER(LEN=242) :: line2
1509 CHARACTER(LEN=default_path_length) :: bsname, bsname2
1510 CHARACTER(LEN=LEN(element_symbol)) :: symbol
1511 CHARACTER(LEN=LEN(element_symbol)+2) :: symbol2
1512 INTEGER :: i, ico, ipgf, iset, ishell, lshell, m, &
1513 maxco, maxl, maxpgf, maxshell, ncgf, &
1514 nmin, nset, nsgf, sort_method
1515 INTEGER,
DIMENSION(:),
POINTER :: lmax, lmin, npgf, nshell
1516 INTEGER,
DIMENSION(:, :),
POINTER :: l, n
1518 REAL(KIND=
dp),
DIMENSION(:, :),
POINTER :: zet
1519 REAL(KIND=
dp),
DIMENSION(:, :, :),
POINTER :: gcc
1530 gto_basis_set%name =
" "
1531 gto_basis_set%aliases =
" "
1534 symbol = element_symbol
1542 gto_basis_set%nset = nset
1543 gto_basis_set%ncgf = ncgf
1544 gto_basis_set%nsgf = nsgf
1548 CALL reallocate(gto_basis_set%nshell, 1, nset)
1549 CALL reallocate(gto_basis_set%n, 1, maxshell, 1, nset)
1550 CALL reallocate(gto_basis_set%l, 1, maxshell, 1, nset)
1551 CALL reallocate(gto_basis_set%zet, 1, maxpgf, 1, nset)
1552 CALL reallocate(gto_basis_set%gcc, 1, maxpgf, 1, maxshell, 1, nset)
1553 CALL reallocate(gto_basis_set%set_radius, 1, nset)
1554 CALL reallocate(gto_basis_set%pgf_radius, 1, maxpgf, 1, nset)
1555 CALL reallocate(gto_basis_set%first_cgf, 1, maxshell, 1, nset)
1556 CALL reallocate(gto_basis_set%first_sgf, 1, maxshell, 1, nset)
1557 CALL reallocate(gto_basis_set%last_cgf, 1, maxshell, 1, nset)
1558 CALL reallocate(gto_basis_set%last_sgf, 1, maxshell, 1, nset)
1559 CALL reallocate(gto_basis_set%ncgf_set, 1, nset)
1560 CALL reallocate(gto_basis_set%nsgf_set, 1, nset)
1561 CALL reallocate(gto_basis_set%cphi, 1, maxco, 1, ncgf)
1562 CALL reallocate(gto_basis_set%sphi, 1, maxco, 1, nsgf)
1563 CALL reallocate(gto_basis_set%scon, 1, maxco, 1, nsgf)
1568 CALL reallocate(gto_basis_set%norm_cgf, 1, ncgf)
1571 CALL section_vals_val_get(basis_section,
"_SECTION_PARAMETERS_", i_rep_section=irep, c_val=basis_type)
1572 IF (basis_type ==
"Orbital") basis_type =
"ORB"
1579 NULLIFY (gcc, l, lmax, lmin, n, npgf, nshell, zet)
1582 IF (.NOT. is_ok) cpabort(
"Error reading the Basis set from input file!")
1583 CALL val_get(val, c_val=line_att)
1584 READ (line_att, *) nset
1598 IF (.NOT. is_ok) cpabort(
"Error reading the Basis set from input file!")
1599 CALL val_get(val, c_val=line_att)
1600 READ (line_att, *) n(1, iset)
1602 READ (line_att, *) lmin(iset)
1604 READ (line_att, *) lmax(iset)
1606 READ (line_att, *) npgf(iset)
1608 maxl = max(maxl, lmax(iset))
1609 IF (npgf(iset) > maxpgf)
THEN
1612 CALL reallocate(gcc, 1, maxpgf, 1, maxshell, 1, nset)
1615 DO lshell = lmin(iset), lmax(iset)
1616 nmin = n(1, iset) + lshell - lmin(iset)
1617 READ (line_att, *) ishell
1619 nshell(iset) = nshell(iset) + ishell
1620 IF (nshell(iset) > maxshell)
THEN
1621 maxshell = nshell(iset)
1624 CALL reallocate(gcc, 1, maxpgf, 1, maxshell, 1, nset)
1627 n(nshell(iset) - ishell + i, iset) = nmin + i - 1
1628 l(nshell(iset) - ishell + i, iset) = lshell
1631 IF (len_trim(line_att) /= 0) &
1632 cpabort(
"Error reading the Basis from input file!")
1633 DO ipgf = 1, npgf(iset)
1635 IF (.NOT. is_ok) cpabort(
"Error reading the Basis set from input file!")
1636 CALL val_get(val, c_val=line_att)
1637 READ (line_att, *) zet(ipgf, iset), (gcc(ipgf, ishell, iset), ishell=1, nshell(iset))
1647 gto_basis_set%nset = nset
1651 CALL reallocate(gto_basis_set%nshell, 1, nset)
1652 CALL reallocate(gto_basis_set%n, 1, maxshell, 1, nset)
1653 CALL reallocate(gto_basis_set%l, 1, maxshell, 1, nset)
1654 CALL reallocate(gto_basis_set%zet, 1, maxpgf, 1, nset)
1655 CALL reallocate(gto_basis_set%gcc, 1, maxpgf, 1, maxshell, 1, nset)
1660 gto_basis_set%lmax(iset) = lmax(iset)
1661 gto_basis_set%lmin(iset) = lmin(iset)
1662 gto_basis_set%npgf(iset) = npgf(iset)
1663 gto_basis_set%nshell(iset) = nshell(iset)
1664 DO ishell = 1, nshell(iset)
1665 gto_basis_set%n(ishell, iset) = n(ishell, iset)
1666 gto_basis_set%l(ishell, iset) = l(ishell, iset)
1667 DO ipgf = 1, npgf(iset)
1668 gto_basis_set%gcc(ipgf, ishell, iset) = gcc(ipgf, ishell, iset)
1671 DO ipgf = 1, npgf(iset)
1672 gto_basis_set%zet(ipgf, iset) = zet(ipgf, iset)
1678 CALL reallocate(gto_basis_set%set_radius, 1, nset)
1679 CALL reallocate(gto_basis_set%pgf_radius, 1, maxpgf, 1, nset)
1680 CALL reallocate(gto_basis_set%first_cgf, 1, maxshell, 1, nset)
1681 CALL reallocate(gto_basis_set%first_sgf, 1, maxshell, 1, nset)
1682 CALL reallocate(gto_basis_set%last_cgf, 1, maxshell, 1, nset)
1683 CALL reallocate(gto_basis_set%last_sgf, 1, maxshell, 1, nset)
1684 CALL reallocate(gto_basis_set%ncgf_set, 1, nset)
1685 CALL reallocate(gto_basis_set%nsgf_set, 1, nset)
1692 gto_basis_set%ncgf_set(iset) = 0
1693 gto_basis_set%nsgf_set(iset) = 0
1694 DO ishell = 1, nshell(iset)
1695 lshell = gto_basis_set%l(ishell, iset)
1696 gto_basis_set%first_cgf(ishell, iset) = ncgf + 1
1697 ncgf = ncgf +
nco(lshell)
1698 gto_basis_set%last_cgf(ishell, iset) = ncgf
1699 gto_basis_set%ncgf_set(iset) = &
1700 gto_basis_set%ncgf_set(iset) +
nco(lshell)
1701 gto_basis_set%first_sgf(ishell, iset) = nsgf + 1
1702 nsgf = nsgf +
nso(lshell)
1703 gto_basis_set%last_sgf(ishell, iset) = nsgf
1704 gto_basis_set%nsgf_set(iset) = &
1705 gto_basis_set%nsgf_set(iset) +
nso(lshell)
1707 maxco = max(maxco, npgf(iset)*
ncoset(lmax(iset)))
1710 gto_basis_set%ncgf = ncgf
1711 gto_basis_set%nsgf = nsgf
1713 CALL reallocate(gto_basis_set%cphi, 1, maxco, 1, ncgf)
1714 CALL reallocate(gto_basis_set%sphi, 1, maxco, 1, nsgf)
1715 CALL reallocate(gto_basis_set%scon, 1, maxco, 1, nsgf)
1720 CALL reallocate(gto_basis_set%norm_cgf, 1, ncgf)
1721 ALLOCATE (gto_basis_set%cgf_symbol(ncgf))
1723 ALLOCATE (gto_basis_set%sgf_symbol(nsgf))
1729 DO ishell = 1, nshell(iset)
1730 lshell = gto_basis_set%l(ishell, iset)
1733 gto_basis_set%lx(ncgf) =
indco(1, ico)
1734 gto_basis_set%ly(ncgf) =
indco(2, ico)
1735 gto_basis_set%lz(ncgf) =
indco(3, ico)
1736 gto_basis_set%cgf_symbol(ncgf) = &
1737 cgf_symbol(n(ishell, iset), (/gto_basis_set%lx(ncgf), &
1738 gto_basis_set%ly(ncgf), &
1739 gto_basis_set%lz(ncgf)/))
1741 DO m = -lshell, lshell
1743 gto_basis_set%m(nsgf) = m
1744 gto_basis_set%sgf_symbol(nsgf) = &
1750 DEALLOCATE (gcc, l, lmax, lmin, n, npgf, nshell, zet)
1752 IF (
PRESENT(dft_section))
THEN
1757 END SUBROUTINE read_gto_basis_set2
1799 nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, &
1800 lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, &
1801 cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, &
1802 last_cgf, last_sgf, n, gcc, short_kind_radius)
1805 CHARACTER(LEN=default_string_length),
INTENT(IN), &
1806 OPTIONAL :: name, aliases
1807 INTEGER,
INTENT(IN),
OPTIONAL :: norm_type
1808 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: kind_radius
1809 INTEGER,
INTENT(IN),
OPTIONAL :: ncgf, nset, nsgf
1810 CHARACTER(LEN=12),
DIMENSION(:),
OPTIONAL,
POINTER ::
cgf_symbol
1811 CHARACTER(LEN=6),
DIMENSION(:),
OPTIONAL,
POINTER ::
sgf_symbol
1812 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: norm_cgf, set_radius
1813 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: lmax, lmin, lx, ly, lz, m, ncgf_set, &
1814 npgf, nsgf_set, nshell
1815 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: cphi, pgf_radius, sphi, scon, zet
1816 INTEGER,
DIMENSION(:, :),
OPTIONAL,
POINTER :: first_cgf, first_sgf, l, last_cgf, &
1818 REAL(kind=
dp),
DIMENSION(:, :, :),
OPTIONAL, &
1820 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: short_kind_radius
1822 IF (
PRESENT(name)) gto_basis_set%name = name
1823 IF (
PRESENT(aliases)) gto_basis_set%aliases = aliases
1824 IF (
PRESENT(norm_type)) gto_basis_set%norm_type = norm_type
1825 IF (
PRESENT(kind_radius)) gto_basis_set%kind_radius = kind_radius
1826 IF (
PRESENT(short_kind_radius)) gto_basis_set%short_kind_radius = short_kind_radius
1827 IF (
PRESENT(ncgf)) gto_basis_set%ncgf = ncgf
1828 IF (
PRESENT(nset)) gto_basis_set%nset = nset
1829 IF (
PRESENT(nsgf)) gto_basis_set%nsgf = nsgf
1832 IF (
PRESENT(norm_cgf)) gto_basis_set%norm_cgf(:) = norm_cgf(:)
1833 IF (
PRESENT(set_radius)) gto_basis_set%set_radius(:) = set_radius(:)
1834 IF (
PRESENT(lmax)) gto_basis_set%lmax(:) = lmax(:)
1835 IF (
PRESENT(lmin)) gto_basis_set%lmin(:) = lmin(:)
1836 IF (
PRESENT(lx)) gto_basis_set%lx(:) = lx(:)
1837 IF (
PRESENT(ly)) gto_basis_set%ly(:) = ly(:)
1838 IF (
PRESENT(lz)) gto_basis_set%lz(:) = lz(:)
1839 IF (
PRESENT(m)) gto_basis_set%m(:) = m(:)
1840 IF (
PRESENT(ncgf_set)) gto_basis_set%ncgf_set(:) = ncgf_set(:)
1841 IF (
PRESENT(npgf)) gto_basis_set%npgf(:) = npgf(:)
1842 IF (
PRESENT(nsgf_set)) gto_basis_set%nsgf_set(:) = nsgf_set(:)
1843 IF (
PRESENT(nshell)) gto_basis_set%nshell(:) = nshell(:)
1844 IF (
PRESENT(cphi)) gto_basis_set%cphi(:, :) = cphi(:, :)
1845 IF (
PRESENT(pgf_radius)) gto_basis_set%pgf_radius(:, :) = pgf_radius(:, :)
1846 IF (
PRESENT(sphi)) gto_basis_set%sphi(:, :) = sphi(:, :)
1847 IF (
PRESENT(scon)) gto_basis_set%scon(:, :) = scon(:, :)
1848 IF (
PRESENT(zet)) gto_basis_set%zet(:, :) = zet(:, :)
1849 IF (
PRESENT(first_cgf)) gto_basis_set%first_cgf(:, :) = first_cgf(:, :)
1850 IF (
PRESENT(first_sgf)) gto_basis_set%first_sgf(:, :) = first_sgf(:, :)
1851 IF (
PRESENT(l)) l(:, :) = gto_basis_set%l(:, :)
1852 IF (
PRESENT(last_cgf)) gto_basis_set%last_cgf(:, :) = last_cgf(:, :)
1853 IF (
PRESENT(last_sgf)) gto_basis_set%last_sgf(:, :) = last_sgf(:, :)
1854 IF (
PRESENT(n)) gto_basis_set%n(:, :) = n(:, :)
1855 IF (
PRESENT(gcc)) gto_basis_set%gcc(:, :, :) = gcc(:, :, :)
1869 INTEGER,
INTENT(in) :: output_unit
1870 CHARACTER(len=*),
OPTIONAL ::
header
1872 INTEGER :: ipgf, iset, ishell
1874 IF (output_unit > 0)
THEN
1876 IF (
PRESENT(
header))
THEN
1877 WRITE (unit=output_unit, fmt=
"(/,T6,A,T41,A40)") &
1878 trim(
header), trim(gto_basis_set%name)
1881 WRITE (unit=output_unit, fmt=
"(/,(T8,A,T71,I10))") &
1882 "Number of orbital shell sets: ", &
1883 gto_basis_set%nset, &
1884 "Number of orbital shells: ", &
1885 sum(gto_basis_set%nshell(:)), &
1886 "Number of primitive Cartesian functions: ", &
1887 sum(gto_basis_set%npgf(:)), &
1888 "Number of Cartesian basis functions: ", &
1889 gto_basis_set%ncgf, &
1890 "Number of spherical basis functions: ", &
1891 gto_basis_set%nsgf, &
1893 gto_basis_set%norm_type
1895 WRITE (unit=output_unit, fmt=
"(/,T6,A,T41,A40,/,/,T25,A)") &
1896 "GTO basis set information for", trim(gto_basis_set%name), &
1897 "Set Shell n l Exponent Coefficient"
1899 DO iset = 1, gto_basis_set%nset
1900 WRITE (unit=output_unit, fmt=
"(A)")
""
1901 DO ishell = 1, gto_basis_set%nshell(iset)
1902 WRITE (unit=output_unit, &
1903 fmt=
"(T25,I3,4X,I4,4X,I2,2X,I2,(T51,2F15.6))") &
1905 gto_basis_set%n(ishell, iset), &
1906 gto_basis_set%l(ishell, iset), &
1907 (gto_basis_set%zet(ipgf, iset), &
1908 gto_basis_set%gcc(ipgf, ishell, iset), &
1909 ipgf=1, gto_basis_set%npgf(iset))
1929 INTEGER,
INTENT(in) :: output_unit
1930 CHARACTER(len=*),
OPTIONAL ::
header
1932 INTEGER :: icgf, ico, ipgf, iset, ishell
1934 IF (output_unit > 0)
THEN
1935 IF (
PRESENT(
header))
THEN
1936 WRITE (unit=output_unit, fmt=
"(/,T6,A,T41,A40)") &
1937 trim(
header), trim(orb_basis_set%name)
1940 WRITE (unit=output_unit, fmt=
"(/,(T8,A,T71,I10))") &
1941 "Number of orbital shell sets: ", &
1942 orb_basis_set%nset, &
1943 "Number of orbital shells: ", &
1944 sum(orb_basis_set%nshell(:)), &
1945 "Number of primitive Cartesian functions: ", &
1946 sum(orb_basis_set%npgf(:)), &
1947 "Number of Cartesian basis functions: ", &
1948 orb_basis_set%ncgf, &
1949 "Number of spherical basis functions: ", &
1950 orb_basis_set%nsgf, &
1952 orb_basis_set%norm_type
1954 WRITE (unit=output_unit, fmt=
"(/,T8,A,/,/,T25,A)") &
1955 "Normalised Cartesian orbitals:", &
1956 "Set Shell Orbital Exponent Coefficient"
1960 DO iset = 1, orb_basis_set%nset
1961 DO ishell = 1, orb_basis_set%nshell(iset)
1962 WRITE (unit=output_unit, fmt=
"(A)")
""
1963 DO ico = 1,
nco(orb_basis_set%l(ishell, iset))
1965 WRITE (unit=output_unit, &
1966 fmt=
"(T25,I3,4X,I4,3X,A12,(T51,2F15.6))") &
1967 iset, ishell, orb_basis_set%cgf_symbol(icgf), &
1968 (orb_basis_set%zet(ipgf, iset), &
1969 orb_basis_set%norm_cgf(icgf)* &
1970 orb_basis_set%gcc(ipgf, ishell, iset), &
1971 ipgf=1, orb_basis_set%npgf(iset))
1988 INTEGER,
INTENT(in) :: output_unit
1990 INTEGER :: ipgf, iset, ishell
1992 IF (output_unit > 0)
THEN
1994 WRITE (unit=output_unit, fmt=
"(/,T6,A40)") trim(gto_basis_set%name)
1995 WRITE (unit=output_unit, fmt=
"(/,T6,A40)") trim(gto_basis_set%aliases)
1996 WRITE (unit=output_unit, fmt=
"(/,T6,F12.8)") gto_basis_set%kind_radius
1997 WRITE (unit=output_unit, fmt=
"(/,T6,F12.8)") gto_basis_set%short_kind_radius
1998 WRITE (unit=output_unit, fmt=
"(/,T6,I8)") gto_basis_set%norm_type
1999 WRITE (unit=output_unit, fmt=
"(/,T6,3I8)") gto_basis_set%ncgf, gto_basis_set%nset, gto_basis_set%nsgf
2000 WRITE (unit=output_unit, fmt=
"(/,T6,6A12)") gto_basis_set%cgf_symbol
2001 WRITE (unit=output_unit, fmt=
"(/,T6,6A12)") gto_basis_set%sgf_symbol
2002 WRITE (unit=output_unit, fmt=
"(/,T6,6F12.6)") gto_basis_set%norm_cgf
2003 WRITE (unit=output_unit, fmt=
"(/,T6,6F12.6)") gto_basis_set%set_radius
2004 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%lmax
2005 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%lmin
2006 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%lx
2007 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%ly
2008 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%lz
2009 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%m
2010 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%ncgf_set
2011 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%nsgf_set
2012 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%npgf
2013 WRITE (unit=output_unit, fmt=
"(/,T6,12I6)") gto_basis_set%nshell
2015 DO iset = 1, gto_basis_set%nset
2016 WRITE (unit=output_unit, fmt=
"(T8,6F15.6)") &
2017 gto_basis_set%pgf_radius(1:gto_basis_set%npgf(iset), iset)
2020 DO iset = 1, gto_basis_set%nset
2021 WRITE (unit=output_unit, fmt=
"(T8,6F15.6)") &
2022 gto_basis_set%zet(1:gto_basis_set%npgf(iset), iset)
2025 DO iset = 1, gto_basis_set%nset
2026 DO ishell = 1, gto_basis_set%nshell(iset)
2027 WRITE (unit=output_unit, fmt=
"(T8,8I10)") &
2029 gto_basis_set%n(ishell, iset), &
2030 gto_basis_set%l(ishell, iset), &
2031 gto_basis_set%first_cgf(ishell, iset), &
2032 gto_basis_set%last_cgf(ishell, iset), &
2033 gto_basis_set%first_sgf(ishell, iset), &
2034 gto_basis_set%last_sgf(ishell, iset)
2038 DO iset = 1, gto_basis_set%nset
2039 DO ishell = 1, gto_basis_set%nshell(iset)
2040 WRITE (unit=output_unit, fmt=
"(T8,2I5,(T25,4F15.6))") &
2042 (gto_basis_set%gcc(ipgf, ishell, iset), &
2043 ipgf=1, gto_basis_set%npgf(iset))
2047 WRITE (unit=output_unit, fmt=
"(A5)")
"CPHI"
2048 WRITE (unit=output_unit, fmt=
"(12F10.5)") gto_basis_set%cphi
2049 WRITE (unit=output_unit, fmt=
"(A1)")
"SPHI"
2050 WRITE (unit=output_unit, fmt=
"(12F10.5)") gto_basis_set%sphi
2051 WRITE (unit=output_unit, fmt=
"(A1)")
"SCON"
2052 WRITE (unit=output_unit, fmt=
"(12F10.5)") gto_basis_set%scon
2068 ALLOCATE (sto_basis_set)
2082 IF (
ASSOCIATED(sto_basis_set))
THEN
2083 IF (
ASSOCIATED(sto_basis_set%symbol))
THEN
2084 DEALLOCATE (sto_basis_set%symbol)
2086 IF (
ASSOCIATED(sto_basis_set%nq))
THEN
2087 DEALLOCATE (sto_basis_set%nq)
2089 IF (
ASSOCIATED(sto_basis_set%lq))
THEN
2090 DEALLOCATE (sto_basis_set%lq)
2092 IF (
ASSOCIATED(sto_basis_set%zet))
THEN
2093 DEALLOCATE (sto_basis_set%zet)
2096 DEALLOCATE (sto_basis_set)
2112 SUBROUTINE get_sto_basis_set(sto_basis_set, name, nshell, symbol, nq, lq, zet, maxlq, numsto)
2115 CHARACTER(LEN=default_string_length), &
2116 INTENT(OUT),
OPTIONAL :: name
2117 INTEGER,
INTENT(OUT),
OPTIONAL :: nshell
2118 CHARACTER(LEN=6),
DIMENSION(:),
OPTIONAL,
POINTER :: symbol
2119 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: nq, lq
2120 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: zet
2121 INTEGER,
INTENT(OUT),
OPTIONAL :: maxlq, numsto
2125 IF (
PRESENT(name)) name = sto_basis_set%name
2126 IF (
PRESENT(nshell)) nshell = sto_basis_set%nshell
2127 IF (
PRESENT(symbol)) symbol => sto_basis_set%symbol
2128 IF (
PRESENT(nq)) nq => sto_basis_set%nq
2129 IF (
PRESENT(lq)) lq => sto_basis_set%lq
2130 IF (
PRESENT(zet)) zet => sto_basis_set%zet
2131 IF (
PRESENT(maxlq))
THEN
2132 maxlq = maxval(sto_basis_set%lq(1:sto_basis_set%nshell))
2134 IF (
PRESENT(numsto))
THEN
2136 DO iset = 1, sto_basis_set%nshell
2137 numsto = numsto + 2*sto_basis_set%lq(iset) + 1
2141 END SUBROUTINE get_sto_basis_set
2156 CHARACTER(LEN=default_string_length),
INTENT(IN), &
2158 INTEGER,
INTENT(IN),
OPTIONAL :: nshell
2159 CHARACTER(LEN=6),
DIMENSION(:),
OPTIONAL,
POINTER :: symbol
2160 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: nq, lq
2161 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: zet
2165 IF (
PRESENT(name)) sto_basis_set%name = name
2166 IF (
PRESENT(nshell)) sto_basis_set%nshell = nshell
2167 IF (
PRESENT(symbol))
THEN
2169 IF (
ASSOCIATED(sto_basis_set%symbol))
DEALLOCATE (sto_basis_set%symbol)
2170 ALLOCATE (sto_basis_set%symbol(1:ns))
2171 sto_basis_set%symbol(:) = symbol(:)
2173 IF (
PRESENT(nq))
THEN
2176 sto_basis_set%nq = nq(:)
2178 IF (
PRESENT(lq))
THEN
2181 sto_basis_set%lq = lq(:)
2183 IF (
PRESENT(zet))
THEN
2186 sto_basis_set%zet = zet(:)
2203 CHARACTER(LEN=*),
INTENT(IN) :: element_symbol, basis_set_name
2208 CHARACTER(LEN=10) :: nlsym
2209 CHARACTER(LEN=2) :: lsym
2210 CHARACTER(LEN=240) :: line
2211 CHARACTER(LEN=242) :: line2
2212 CHARACTER(len=default_path_length) :: basis_set_file_name, tmp
2213 CHARACTER(LEN=default_path_length),
DIMENSION(:), &
2215 CHARACTER(LEN=LEN(basis_set_name)) :: bsname
2216 CHARACTER(LEN=LEN(basis_set_name)+2) :: bsname2
2217 CHARACTER(LEN=LEN(element_symbol)) :: symbol
2218 CHARACTER(LEN=LEN(element_symbol)+2) :: symbol2
2219 INTEGER :: ibasis, irep, iset, nbasis, nq, nset, &
2221 LOGICAL :: basis_found, found, match
2222 REAL(kind=
dp) :: zet
2234 sto_basis_set%name = basis_set_name
2237 ALLOCATE (cbasis(nbasis))
2238 DO ibasis = 1, nbasis
2240 i_rep_val=ibasis, c_val=cbasis(ibasis))
2241 basis_set_file_name = cbasis(ibasis)
2242 tmp = basis_set_file_name
2249 basis_found = .false.
2250 basis_loop:
DO ibasis = 1, nbasis
2251 IF (basis_found)
EXIT basis_loop
2252 basis_set_file_name = cbasis(ibasis)
2253 CALL parser_create(parser, basis_set_file_name, para_env=para_env)
2255 bsname = basis_set_name
2256 symbol = element_symbol
2259 tmp = basis_set_name
2262 IF (tmp .NE.
"NONE")
THEN
2273 line2 =
" "//line//
" "
2274 symbol2 =
" "//trim(symbol)//
" "
2275 bsname2 =
" "//trim(bsname)//
" "
2276 strlen1 = len_trim(symbol2) + 1
2277 strlen2 = len_trim(bsname2) + 1
2279 IF ((index(line2, symbol2(:strlen1)) > 0) .AND. &
2280 (index(line2, bsname2(:strlen2)) > 0)) match = .true.
2284 sto_basis_set%nshell = nset
2289 ALLOCATE (sto_basis_set%symbol(nset))
2295 sto_basis_set%nq(iset) = nq
2296 sto_basis_set%zet(iset) = zet
2297 WRITE (nlsym,
"(I2,A)") nq, trim(lsym)
2298 sto_basis_set%symbol(iset) = trim(nlsym)
2299 SELECT CASE (trim(lsym))
2301 sto_basis_set%lq(iset) = 0
2303 sto_basis_set%lq(iset) = 1
2305 sto_basis_set%lq(iset) = 2
2307 sto_basis_set%lq(iset) = 3
2309 sto_basis_set%lq(iset) = 4
2311 sto_basis_set%lq(iset) = 5
2312 CASE (
"I",
"i",
"J",
"j")
2313 sto_basis_set%lq(iset) = 6
2315 sto_basis_set%lq(iset) = 7
2317 sto_basis_set%lq(iset) = 8
2319 sto_basis_set%lq(iset) = 9
2321 CALL cp_abort(__location__, &
2322 "The requested basis set <"//trim(bsname)// &
2323 "> for element <"//trim(symbol)//
"> has an invalid component: ")
2327 basis_found = .true.
2342 IF (tmp .NE.
"NONE")
THEN
2343 IF (.NOT. basis_found)
THEN
2344 basis_set_file_name =
""
2345 DO ibasis = 1, nbasis
2346 basis_set_file_name = trim(basis_set_file_name)//
"<"//trim(cbasis(ibasis))//
"> "
2348 CALL cp_abort(__location__, &
2349 "The requested basis set <"//trim(bsname)// &
2350 "> for element <"//trim(symbol)//
"> was not "// &
2351 "found in the basis set files "// &
2352 trim(basis_set_file_name))
2370 INTEGER,
INTENT(IN),
OPTIONAL :: ngauss
2371 LOGICAL,
INTENT(IN),
OPTIONAL :: ortho
2373 INTEGER,
PARAMETER :: maxng = 6
2375 CHARACTER(LEN=default_string_length) :: name, sng
2376 INTEGER :: ipgf, iset, maxl, ng, nset, nshell
2377 INTEGER,
DIMENSION(:),
POINTER :: lq, nq
2379 REAL(kind=
dp),
DIMENSION(:),
POINTER :: zet
2380 REAL(kind=
dp),
DIMENSION(maxng) :: gcc, zetg
2383 IF (
PRESENT(ngauss)) ng = ngauss
2384 IF (ng > maxng) cpabort(
"Too many Gaussian primitives requested")
2386 IF (
PRESENT(ortho)) do_ortho = ortho
2390 CALL get_sto_basis_set(sto_basis_set, name=name, nshell=nshell, nq=nq, &
2397 gto_basis_set%name = trim(name)//
"_STO-"//trim(sng)//
"G"
2400 gto_basis_set%nset = nset
2404 CALL reallocate(gto_basis_set%nshell, 1, nset)
2405 CALL reallocate(gto_basis_set%n, 1, 1, 1, nset)
2406 CALL reallocate(gto_basis_set%l, 1, 1, 1, nset)
2407 CALL reallocate(gto_basis_set%zet, 1, ng, 1, nset)
2408 CALL reallocate(gto_basis_set%gcc, 1, ng, 1, 1, 1, nset)
2411 CALL get_sto_ng(zet(iset), ng, nq(iset), lq(iset), zetg, gcc)
2412 gto_basis_set%lmax(iset) = lq(iset)
2413 gto_basis_set%lmin(iset) = lq(iset)
2414 gto_basis_set%npgf(iset) = ng
2415 gto_basis_set%nshell(iset) = 1
2416 gto_basis_set%n(1, iset) = lq(iset) + 1
2417 gto_basis_set%l(1, iset) = lq(iset)
2419 gto_basis_set%gcc(ipgf, 1, iset) = gcc(ipgf)
2420 gto_basis_set%zet(ipgf, iset) = zetg(ipgf)
2438 LOGICAL,
INTENT(IN),
OPTIONAL :: do_ortho
2439 INTEGER,
INTENT(IN) :: nset, maxl
2441 INTEGER :: i1, i2, ico, iset, jset, l, lshell, m, &
2442 maxco, ncgf, ng, ngs, np, nsgf
2443 INTEGER,
DIMENSION(0:10) :: mxf
2444 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: gal, zal, zll
2446 ng = gto_basis_set%npgf(1)
2448 IF ((ng /= gto_basis_set%npgf(iset)) .AND. do_ortho) &
2449 cpabort(
"different number of primitves")
2455 l = gto_basis_set%l(1, iset)
2460 ALLOCATE (gal(ng, nset), zal(ng, nset), zll(m*ng, 0:maxl))
2462 zal(1:ng, iset) = gto_basis_set%zet(1:ng, iset)
2463 gal(1:ng, iset) = gto_basis_set%gcc(1:ng, 1, iset)
2465 CALL reallocate(gto_basis_set%zet, 1, m*ng, 1, nset)
2466 CALL reallocate(gto_basis_set%gcc, 1, m*ng, 1, 1, 1, nset)
2468 l = gto_basis_set%l(1, iset)
2469 gto_basis_set%npgf(iset) = ng*mxf(l)
2471 gto_basis_set%zet = 0.0_dp
2472 gto_basis_set%gcc = 0.0_dp
2476 l = gto_basis_set%l(1, iset)
2478 i1 = mxf(l)*ng - ng + 1
2480 zll(i1:i2, l) = zal(1:ng, iset)
2481 gto_basis_set%gcc(i1:i2, 1, iset) = gal(1:ng, iset)
2484 l = gto_basis_set%l(1, iset)
2485 gto_basis_set%zet(:, iset) = zll(:, l)
2488 l = gto_basis_set%l(1, iset)
2489 DO jset = 1, iset - 1
2490 IF (gto_basis_set%l(1, iset) == l)
THEN
2492 CALL orthofun(gto_basis_set%zet(1:m, iset), gto_basis_set%gcc(1:m, 1, iset), &
2493 gto_basis_set%gcc(1:m, 1, jset), l)
2497 DEALLOCATE (gal, zal, zll)
2501 ngs = maxval(gto_basis_set%npgf(1:nset))
2502 CALL reallocate(gto_basis_set%set_radius, 1, nset)
2503 CALL reallocate(gto_basis_set%pgf_radius, 1, ngs, 1, nset)
2504 CALL reallocate(gto_basis_set%first_cgf, 1, 1, 1, nset)
2505 CALL reallocate(gto_basis_set%first_sgf, 1, 1, 1, nset)
2506 CALL reallocate(gto_basis_set%last_cgf, 1, 1, 1, nset)
2507 CALL reallocate(gto_basis_set%last_sgf, 1, 1, 1, nset)
2508 CALL reallocate(gto_basis_set%ncgf_set, 1, nset)
2509 CALL reallocate(gto_basis_set%nsgf_set, 1, nset)
2516 gto_basis_set%ncgf_set(iset) = 0
2517 gto_basis_set%nsgf_set(iset) = 0
2518 lshell = gto_basis_set%l(1, iset)
2519 gto_basis_set%first_cgf(1, iset) = ncgf + 1
2520 ncgf = ncgf +
nco(lshell)
2521 gto_basis_set%last_cgf(1, iset) = ncgf
2522 gto_basis_set%ncgf_set(iset) = &
2523 gto_basis_set%ncgf_set(iset) +
nco(lshell)
2524 gto_basis_set%first_sgf(1, iset) = nsgf + 1
2525 nsgf = nsgf +
nso(lshell)
2526 gto_basis_set%last_sgf(1, iset) = nsgf
2527 gto_basis_set%nsgf_set(iset) = &
2528 gto_basis_set%nsgf_set(iset) +
nso(lshell)
2529 ngs = gto_basis_set%npgf(iset)
2530 maxco = max(maxco, ngs*
ncoset(lshell))
2533 gto_basis_set%ncgf = ncgf
2534 gto_basis_set%nsgf = nsgf
2536 CALL reallocate(gto_basis_set%cphi, 1, maxco, 1, ncgf)
2537 CALL reallocate(gto_basis_set%sphi, 1, maxco, 1, nsgf)
2538 CALL reallocate(gto_basis_set%scon, 1, maxco, 1, nsgf)
2543 CALL reallocate(gto_basis_set%norm_cgf, 1, ncgf)
2544 ALLOCATE (gto_basis_set%cgf_symbol(ncgf))
2545 ALLOCATE (gto_basis_set%sgf_symbol(nsgf))
2551 lshell = gto_basis_set%l(1, iset)
2555 gto_basis_set%lx(ncgf) =
indco(1, ico)
2556 gto_basis_set%ly(ncgf) =
indco(2, ico)
2557 gto_basis_set%lz(ncgf) =
indco(3, ico)
2558 gto_basis_set%cgf_symbol(ncgf) = &
2560 gto_basis_set%ly(ncgf), &
2561 gto_basis_set%lz(ncgf)/))
2563 DO m = -lshell, lshell
2565 gto_basis_set%m(nsgf) = m
2566 gto_basis_set%sgf_symbol(nsgf) =
sgf_symbol(np, lshell, m)
2570 gto_basis_set%norm_type = -1
2581 SUBROUTINE orthofun(zet, co, cr, l)
2582 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: zet
2583 REAL(kind=
dp),
DIMENSION(:),
INTENT(INOUT) ::
co, cr
2584 INTEGER,
INTENT(IN) :: l
2588 CALL aovlp(l, zet, cr, cr, ss)
2589 cr(:) = cr(:)/sqrt(ss)
2590 CALL aovlp(l, zet,
co, cr, ss)
2591 co(:) =
co(:) - ss*cr(:)
2592 CALL aovlp(l, zet,
co,
co, ss)
2593 co(:) =
co(:)/sqrt(ss)
2595 END SUBROUTINE orthofun
2605 SUBROUTINE aovlp(l, zet, ca, cb, ss)
2606 INTEGER,
INTENT(IN) :: l
2607 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: zet, ca, cb
2608 REAL(kind=
dp),
INTENT(OUT) :: ss
2611 REAL(kind=
dp) :: ab, ai, aj, s00, sss
2619 ai = (2.0_dp*zet(i)/
pi)**0.75_dp
2621 aj = (2.0_dp*zet(j)/
pi)**0.75_dp
2622 ab = 1._dp/(zet(i) + zet(j))
2623 s00 = ai*aj*(
pi*ab)**1.50_dp
2626 ELSEIF (l == 1)
THEN
2629 cpabort(
"aovlp lvalue")
2631 ss = ss + sss*ca(i)*cb(j)
2635 END SUBROUTINE aovlp
2647 INTEGER,
INTENT(IN) :: z
2648 INTEGER,
DIMENSION(:, :),
INTENT(IN) :: ne
2649 INTEGER,
INTENT(IN) :: n, l
2652 REAL(
dp),
DIMENSION(7),
PARAMETER :: &
2653 xns = (/1.0_dp, 2.0_dp, 3.0_dp, 3.7_dp, 4.0_dp, 4.2_dp, 4.4_dp/)
2655 INTEGER :: i, l1, l2, m, m1, m2, nn
2670 s = s + 0.3_dp*real(m - 1,
dp)
2672 m = ne(l1, nn) + ne(l2, nn)
2673 s = s + 0.35_dp*real(m - 1,
dp)
2677 IF (l1 + l2 == 3)
THEN
2679 m1 = ne(1, nn - 1) + ne(2, nn - 1) + ne(3, nn - 1) + ne(4, nn - 1)
2682 m2 = m2 + ne(1, i) + ne(2, i) + ne(3, i) + ne(4, i)
2684 s = s + 0.85_dp*real(m1,
dp) + 1._dp*real(m2,
dp)
2690 m = m + ne(1, i) + ne(2, i) + ne(3, i) + ne(4, i)
2692 s = s + 1._dp*real(m,
dp)
2705 INTEGER,
INTENT(IN) :: sort_method
2707 CHARACTER(LEN=12),
DIMENSION(:),
POINTER ::
cgf_symbol
2708 CHARACTER(LEN=6),
DIMENSION(:),
POINTER ::
sgf_symbol
2709 INTEGER :: ic, ic_max, icgf, icgf_new, icgf_old, ico, is, is_max, iset, isgf, isgf_new, &
2710 isgf_old, ishell, lshell, maxco, maxpgf, maxshell, mm, nc, ncgf, ns, nset
2711 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: sort_index
2712 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: icgf_set, isgf_set
2713 INTEGER,
DIMENSION(:),
POINTER :: lx, ly, lz, m, npgf
2714 REAL(
dp),
ALLOCATABLE,
DIMENSION(:) :: tmp
2715 REAL(
dp),
DIMENSION(:),
POINTER :: set_radius
2716 REAL(
dp),
DIMENSION(:, :),
POINTER :: zet
2717 REAL(kind=
dp),
DIMENSION(:),
POINTER :: norm_cgf
2718 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: cphi, scon, sphi
2720 NULLIFY (set_radius, zet)
2726 maxshell=maxshell, &
2731 set_radius=set_radius, &
2734 ALLOCATE (sort_index(nset))
2735 ALLOCATE (tmp(nset))
2736 SELECT CASE (sort_method)
2739 tmp(iset) = minval(basis_set%zet(:npgf(iset), iset))
2742 cpabort(
"Request basis sort criterion not implemented.")
2745 CALL sort(tmp(1:nset), nset, sort_index)
2752 DO ishell = 1, basis_set%nshell(iset)
2753 DO ico = 1,
nco(basis_set%l(ishell, iset))
2755 IF (ic > ic_max) ic_max = ic
2757 lshell = basis_set%l(ishell, iset)
2758 DO mm = -lshell, lshell
2760 IF (is > is_max) is_max = is
2767 ALLOCATE (icgf_set(nset, ic_max))
2769 ALLOCATE (isgf_set(nset, is_max))
2775 DO ishell = 1, basis_set%nshell(iset)
2776 DO ico = 1,
nco(basis_set%l(ishell, iset))
2779 icgf_set(iset, ic) = icgf
2781 lshell = basis_set%l(ishell, iset)
2782 DO mm = -lshell, lshell
2785 isgf_set(iset, is) = isgf
2790 ALLOCATE (
cgf_symbol(
SIZE(basis_set%cgf_symbol)))
2791 ALLOCATE (norm_cgf(
SIZE(basis_set%norm_cgf)))
2792 ALLOCATE (lx(
SIZE(basis_set%lx)))
2793 ALLOCATE (ly(
SIZE(basis_set%ly)))
2794 ALLOCATE (lz(
SIZE(basis_set%lz)))
2795 ALLOCATE (cphi(
SIZE(basis_set%cphi, 1),
SIZE(basis_set%cphi, 2)))
2797 ALLOCATE (sphi(
SIZE(basis_set%sphi, 1),
SIZE(basis_set%sphi, 2)))
2799 ALLOCATE (scon(
SIZE(basis_set%scon, 1),
SIZE(basis_set%scon, 2)))
2802 ALLOCATE (
sgf_symbol(
SIZE(basis_set%sgf_symbol)))
2803 ALLOCATE (m(
SIZE(basis_set%m)))
2809 icgf_old = icgf_set(sort_index(iset), ic)
2810 IF (icgf_old == 0) cycle
2811 icgf_new = icgf_new + 1
2812 norm_cgf(icgf_new) = basis_set%norm_cgf(icgf_old)
2813 lx(icgf_new) = basis_set%lx(icgf_old)
2814 ly(icgf_new) = basis_set%ly(icgf_old)
2815 lz(icgf_new) = basis_set%lz(icgf_old)
2816 cphi(:, icgf_new) = basis_set%cphi(:, icgf_old)
2817 cgf_symbol(icgf_new) = basis_set%cgf_symbol(icgf_old)
2820 isgf_old = isgf_set(sort_index(iset), is)
2821 IF (isgf_old == 0) cycle
2822 isgf_new = isgf_new + 1
2823 m(isgf_new) = basis_set%m(isgf_old)
2824 sphi(:, isgf_new) = basis_set%sphi(:, isgf_old)
2825 scon(:, isgf_new) = basis_set%scon(:, isgf_old)
2826 sgf_symbol(isgf_new) = basis_set%sgf_symbol(isgf_old)
2830 DEALLOCATE (basis_set%cgf_symbol)
2832 DEALLOCATE (basis_set%norm_cgf)
2833 basis_set%norm_cgf => norm_cgf
2834 DEALLOCATE (basis_set%lx)
2836 DEALLOCATE (basis_set%ly)
2838 DEALLOCATE (basis_set%lz)
2840 DEALLOCATE (basis_set%cphi)
2841 basis_set%cphi => cphi
2842 DEALLOCATE (basis_set%sphi)
2843 basis_set%sphi => sphi
2844 DEALLOCATE (basis_set%scon)
2845 basis_set%scon => scon
2847 DEALLOCATE (basis_set%m)
2849 DEALLOCATE (basis_set%sgf_symbol)
2852 basis_set%lmax = basis_set%lmax(sort_index)
2853 basis_set%lmin = basis_set%lmin(sort_index)
2854 basis_set%npgf = basis_set%npgf(sort_index)
2855 basis_set%nshell = basis_set%nshell(sort_index)
2856 basis_set%ncgf_set = basis_set%ncgf_set(sort_index)
2857 basis_set%nsgf_set = basis_set%nsgf_set(sort_index)
2859 basis_set%n(:, :) = basis_set%n(:, sort_index)
2860 basis_set%l(:, :) = basis_set%l(:, sort_index)
2861 basis_set%zet(:, :) = basis_set%zet(:, sort_index)
2863 basis_set%gcc(:, :, :) = basis_set%gcc(:, :, sort_index)
2864 basis_set%set_radius(:) = basis_set%set_radius(sort_index)
2865 basis_set%pgf_radius(:, :) = basis_set%pgf_radius(:, sort_index)
2870 DO ishell = 1, basis_set%nshell(iset)
2871 lshell = basis_set%l(ishell, iset)
2872 basis_set%first_cgf(ishell, iset) = nc + 1
2873 nc = nc +
nco(lshell)
2874 basis_set%last_cgf(ishell, iset) = nc
2875 basis_set%first_sgf(ishell, iset) = ns + 1
2876 ns = ns +
nso(lshell)
2877 basis_set%last_sgf(ishell, iset) = ns
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.
Calculation of Coulomb integrals over Cartesian Gaussian-type functions (electron repulsion integrals...
subroutine, public coulomb2(la_max, npgfa, zeta, rpgfa, la_min, lc_max, npgfc, zetc, rpgfc, lc_min, rac, rac2, vac, v, f, maxder, vac_plus)
Calculation of the primitive two-center Coulomb integrals over Cartesian Gaussian-type functions.
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)
...
integer, parameter, public basis_sort_zet
subroutine, public process_gto_basis(gto_basis_set, do_ortho, nset, maxl)
...
subroutine, public set_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, short_kind_radius)
Set the components of Gaussian-type orbital (GTO) basis set data set.
subroutine, public deallocate_gto_basis_set(gto_basis_set)
...
pure real(dp) function, public srules(z, ne, n, l)
...
subroutine, public write_orb_basis_set(orb_basis_set, output_unit, header)
Write a Gaussian-type orbital (GTO) basis set data set to the output unit.
subroutine, public sort_gto_basis_set(basis_set, sort_method)
sort basis sets w.r.t. radius
subroutine, public deallocate_sto_basis_set(sto_basis_set)
...
subroutine, public init_aux_basis_set(gto_basis_set)
...
subroutine, public allocate_gto_basis_set(gto_basis_set)
...
subroutine, public copy_gto_basis_set(basis_set_in, basis_set_out)
...
subroutine, public init_cphi_and_sphi(gto_basis_set)
...
subroutine, public combine_basis_sets(basis_set, basis_set_add)
...
subroutine, public write_gto_basis_set(gto_basis_set, output_unit, header)
Write a Gaussian-type orbital (GTO) basis set data set to the output unit.
subroutine, public allocate_sto_basis_set(sto_basis_set)
...
subroutine, public create_primitive_basis_set(basis_set, pbasis, lmax)
...
subroutine, public dump_gto_basis_set(gto_basis_set, output_unit)
...
subroutine, public create_gto_from_sto_basis(sto_basis_set, gto_basis_set, ngauss, ortho)
...
subroutine, public set_sto_basis_set(sto_basis_set, name, nshell, symbol, nq, lq, zet)
...
subroutine, public read_sto_basis_set(element_symbol, basis_set_name, sto_basis_set, para_env, dft_section)
...
subroutine, public init_orb_basis_set(gto_basis_set)
Initialise a Gaussian-type orbital (GTO) basis set data set.
integer, parameter, public basis_sort_default
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public vandevondele2007
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_search_string(parser, string, ignore_case, found, line, begin_line, search_from_begin_of_file)
Search a string pattern in a file defined by its logical unit number "unit". A case sensitive search ...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
real(kind=dp), dimension(-1:2 *maxfac+1), parameter, public dfac
Utility routines for the memory handling.
Interface to the message passing library MPI.
Provides Cartesian and spherical orbital pointers and indices.
subroutine, public init_orbital_pointers(maxl)
Initialize or update the orbital pointers.
integer, dimension(:, :, :), allocatable, public co
integer, dimension(:), allocatable, public nco
integer, dimension(:), allocatable, public nsoset
integer, dimension(:), allocatable, public ncoset
integer, dimension(:, :, :), allocatable, public coset
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).
subroutine, public get_sto_ng(zeta, n, nq, lq, alpha, coef)
return STO-NG parameters; INPUT: zeta (Slater exponent) n (Expansion length) nq (principle quantum nu...
Utilities for string manipulations.
subroutine, public integer_to_string(inumber, string)
Converts an integer number to a string. The WRITE statement will return an error message,...
character(len=1), parameter, public newline
subroutine, public remove_word(string)
remove a word from a string (words are separated by white spaces)
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.
All kind of helpful little routines.
stores all the informations relevant to an mpi environment