27 dbcsr_type_antisymmetric,&
28 dbcsr_type_no_symmetry
50#include "./base/base_uses.f90"
55 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_operators_ao'
78 CHARACTER(len=*),
PARAMETER :: routinen =
'build_lin_mom_matrix'
80 INTEGER :: handle, i, iatom, icol, ikind, inode, irow, iset, jatom, jkind, jset, last_jatom, &
81 ldai, maxco, maxlgto, maxsgf, natom, ncoa, ncob, neighbor_list_id, nkind, nseta, nsetb, &
83 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
85 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
86 LOGICAL :: do_symmetric, found, new_atom_b
87 REAL(kind=
dp) :: dab, rab2
88 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: work
89 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: intab, rr_work
90 REAL(kind=
dp),
DIMENSION(3) :: rab
91 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
92 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb
93 TYPE(
block_p_type),
ALLOCATABLE,
DIMENSION(:) :: integral
100 DIMENSION(:),
POINTER :: nl_iterator
104 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
107 CALL timeset(routinen, handle)
109 NULLIFY (cell, sab_nl, qs_kind_set, particle_set, para_env)
115 qs_kind_set=qs_kind_set, &
116 particle_set=particle_set, &
117 neighbor_list_id=neighbor_list_id, &
121 nkind =
SIZE(qs_kind_set)
122 natom =
SIZE(particle_set)
126 IF (do_symmetric)
THEN
127 CALL get_qs_env(qs_env=qs_env, sab_orb=sab_nl)
129 CALL get_qs_env(qs_env=qs_env, sab_all=sab_nl)
138 ldai =
ncoset(maxlgto + 1)
141 ALLOCATE (rr_work(ldai, ldai, 3), intab(maxco, maxco, 3), work(maxco, maxsgf), integral(3))
142 rr_work(:, :, :) = 0.0_dp
143 intab(:, :, :) = 0.0_dp
146 ALLOCATE (basis_set_list(nkind))
148 qs_kind => qs_kind_set(ikind)
149 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set_a)
150 IF (
ASSOCIATED(basis_set_a))
THEN
151 basis_set_list(ikind)%gto_basis_set => basis_set_a
153 NULLIFY (basis_set_list(ikind)%gto_basis_set)
159 iatom=iatom, jatom=jatom, r=rab)
160 basis_set_a => basis_set_list(ikind)%gto_basis_set
161 IF (.NOT.
ASSOCIATED(basis_set_a)) cycle
162 basis_set_b => basis_set_list(jkind)%gto_basis_set
163 IF (.NOT.
ASSOCIATED(basis_set_b)) cycle
165 first_sgfa => basis_set_a%first_sgf
166 la_max => basis_set_a%lmax
167 la_min => basis_set_a%lmin
168 npgfa => basis_set_a%npgf
169 nseta = basis_set_a%nset
170 nsgfa => basis_set_a%nsgf_set
171 rpgfa => basis_set_a%pgf_radius
172 set_radius_a => basis_set_a%set_radius
173 sphi_a => basis_set_a%sphi
174 zeta => basis_set_a%zet
176 first_sgfb => basis_set_b%first_sgf
177 lb_max => basis_set_b%lmax
178 lb_min => basis_set_b%lmin
179 npgfb => basis_set_b%npgf
180 nsetb = basis_set_b%nset
181 nsgfb => basis_set_b%nsgf_set
182 rpgfb => basis_set_b%pgf_radius
183 set_radius_b => basis_set_b%set_radius
184 sphi_b => basis_set_b%sphi
185 zetb => basis_set_b%zet
187 IF (inode == 1) last_jatom = 0
188 IF (jatom /= last_jatom)
THEN
196 IF (do_symmetric)
THEN
197 IF (iatom <= jatom)
THEN
210 NULLIFY (integral(i)%block)
212 row=irow, col=icol, block=integral(i)%block, found=found)
213 cpassert(
ASSOCIATED(integral(i)%block))
217 rab2 = rab(1)*rab(1) + rab(2)*rab(2) + rab(3)*rab(3)
222 ncoa = npgfa(iset)*
ncoset(la_max(iset))
223 sgfa = first_sgfa(1, iset)
227 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
229 ncob = npgfb(jset)*
ncoset(lb_max(jset))
230 sgfb = first_sgfb(1, jset)
234 CALL lin_mom(la_max(iset), la_min(iset), npgfa(iset), &
235 rpgfa(:, iset), zeta(:, iset), &
236 lb_max(jset), lb_min(jset), npgfb(jset), &
237 rpgfb(:, jset), zetb(:, jset), &
238 rab, intab,
SIZE(rr_work, 1), rr_work)
244 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
245 1.0_dp, intab(1, 1, i),
SIZE(intab, 1), &
246 sphi_b(1, sgfb),
SIZE(sphi_b, 1), &
247 0.0_dp, work(1, 1),
SIZE(work, 1))
249 IF (do_symmetric)
THEN
250 IF (iatom <= jatom)
THEN
252 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
253 1.0_dp, sphi_a(1, sgfa),
SIZE(sphi_a, 1), &
254 work(1, 1),
SIZE(work, 1), &
255 1.0_dp, integral(i)%block(sgfa, sgfb), &
256 SIZE(integral(i)%block, 1))
260 CALL dgemm(
"T",
"N", nsgfb(jset), nsgfa(iset), ncoa, &
261 -1.0_dp, work(1, 1),
SIZE(work, 1), &
262 sphi_a(1, sgfa),
SIZE(sphi_a, 1), &
263 1.0_dp, integral(i)%block(sgfb, sgfa), &
264 SIZE(integral(i)%block, 1))
268 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
269 1.0_dp, sphi_a(1, sgfa),
SIZE(sphi_a, 1), &
270 work(1, 1),
SIZE(work, 1), &
271 1.0_dp, integral(i)%block(sgfa, sgfb), &
272 SIZE(integral(i)%block, 1))
286 DEALLOCATE (intab, work, integral, basis_set_list)
301 CALL timestop(handle)
326 SUBROUTINE lin_mom(la_max, la_min, npgfa, rpgfa, zeta, lb_max, lb_min, npgfb, rpgfb, zetb, &
327 rab, intab, ldrr, rr)
328 INTEGER,
INTENT(IN) :: la_max, la_min, npgfa
329 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: rpgfa, zeta
330 INTEGER,
INTENT(IN) :: lb_max, lb_min, npgfb
331 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: rpgfb, zetb
332 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
333 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: intab
334 INTEGER,
INTENT(IN) :: ldrr
335 REAL(
dp),
DIMENSION(0:ldrr-1, 0:ldrr-1, 3), &
338 INTEGER :: ax, ay, az, bx, by, bz, coa, cob, i, &
339 ipgf, j, jpgf, la, lb, ma, mb, na, nb
340 REAL(
dp) :: dab, dumx, dumy, dumz, f0, rab2, xhi, zet
341 REAL(
dp),
DIMENSION(3) :: rap, rbp
345 rab2 = rab(1)**2 + rab(2)**2 + rab(3)**2
360 IF (rpgfa(ipgf) + rpgfb(jpgf) < dab)
THEN
361 DO j = nb + 1, nb +
ncoset(lb_max)
362 DO i = na + 1, na +
ncoset(la_max)
363 intab(i, j, 1) = 0.0_dp
364 intab(i, j, 2) = 0.0_dp
365 intab(i, j, 3) = 0.0_dp
373 zet = zeta(ipgf) + zetb(jpgf)
374 xhi = zeta(ipgf)*zetb(jpgf)/zet
375 rap = zetb(jpgf)*rab/zet
376 rbp = -zeta(ipgf)*rab/zet
378 f0 = (
pi/zet)**(1.5_dp)*exp(-xhi*rab2)
382 CALL os_rr_ovlp(rap, la_max + 1, rbp, lb_max, zet, ldrr, rr)
385 DO lb = lb_min, lb_max
389 cob =
coset(bx, by, bz)
391 DO la = la_min, la_max
395 coa =
coset(ax, ay, az)
400 dumx = 2.0_dp*zeta(ipgf)*rr(ax + 1, bx, 1)
401 IF (ax .GT. 0) dumx = dumx - real(ax,
dp)*rr(ax - 1, bx, 1)
402 intab(ma, mb, 1) = f0*dumx*rr(ay, by, 2)*rr(az, bz, 3)
405 dumy = 2.0_dp*zeta(ipgf)*rr(ay + 1, by, 2)
406 IF (ay .GT. 0) dumy = dumy - real(ay,
dp)*rr(ay - 1, by, 2)
407 intab(ma, mb, 2) = f0*rr(ax, bx, 1)*dumy*rr(az, bz, 3)
410 dumz = 2.0_dp*zeta(ipgf)*rr(az + 1, bz, 3)
411 IF (az .GT. 0) dumz = dumz - real(az,
dp)*rr(az - 1, bz, 3)
412 intab(ma, mb, 3) = f0*rr(ax, bx, 1)*rr(ay, by, 2)*dumz
430 END SUBROUTINE lin_mom
447 REAL(
dp),
DIMENSION(:),
INTENT(IN) :: rc
449 CHARACTER(len=*),
PARAMETER :: routinen =
'build_ang_mom_matrix'
451 INTEGER :: handle, i, iatom, icol, ikind, inode, irow, iset, jatom, jkind, jset, last_jatom, &
452 ldai, maxco, maxlgto, maxsgf, natom, ncoa, ncob, neighbor_list_id, nkind, nseta, nsetb, &
454 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
456 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
457 LOGICAL :: found, new_atom_b
458 REAL(kind=
dp) :: dab, rab2
459 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: work
460 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: intab, rr_work
461 REAL(kind=
dp),
DIMENSION(3) :: ra, rab, rac, rbc
462 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
463 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb
464 TYPE(
block_p_type),
ALLOCATABLE,
DIMENSION(:) :: integral
471 DIMENSION(:),
POINTER :: nl_iterator
475 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
478 CALL timeset(routinen, handle)
480 NULLIFY (cell, sab_all, qs_kind_set, particle_set, para_env)
486 qs_kind_set=qs_kind_set, &
487 particle_set=particle_set, &
488 neighbor_list_id=neighbor_list_id, &
493 nkind =
SIZE(qs_kind_set)
494 natom =
SIZE(particle_set)
503 ldai =
ncoset(maxlgto + 1)
506 ALLOCATE (rr_work(ldai, ldai, 3), intab(maxco, maxco, 3), work(maxco, maxsgf), integral(3))
507 rr_work(:, :, :) = 0.0_dp
508 intab(:, :, :) = 0.0_dp
511 ALLOCATE (basis_set_list(nkind))
513 qs_kind => qs_kind_set(ikind)
514 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set_a)
515 IF (
ASSOCIATED(basis_set_a))
THEN
516 basis_set_list(ikind)%gto_basis_set => basis_set_a
518 NULLIFY (basis_set_list(ikind)%gto_basis_set)
524 iatom=iatom, jatom=jatom, r=rab)
525 basis_set_a => basis_set_list(ikind)%gto_basis_set
526 IF (.NOT.
ASSOCIATED(basis_set_a)) cycle
527 basis_set_b => basis_set_list(jkind)%gto_basis_set
528 IF (.NOT.
ASSOCIATED(basis_set_b)) cycle
529 ra =
pbc(particle_set(iatom)%r, cell)
531 first_sgfa => basis_set_a%first_sgf
532 la_max => basis_set_a%lmax
533 la_min => basis_set_a%lmin
534 npgfa => basis_set_a%npgf
535 nseta = basis_set_a%nset
536 nsgfa => basis_set_a%nsgf_set
537 rpgfa => basis_set_a%pgf_radius
538 set_radius_a => basis_set_a%set_radius
539 sphi_a => basis_set_a%sphi
540 zeta => basis_set_a%zet
542 first_sgfb => basis_set_b%first_sgf
543 lb_max => basis_set_b%lmax
544 lb_min => basis_set_b%lmin
545 npgfb => basis_set_b%npgf
546 nsetb = basis_set_b%nset
547 nsgfb => basis_set_b%nsgf_set
548 rpgfb => basis_set_b%pgf_radius
549 set_radius_b => basis_set_b%set_radius
550 sphi_b => basis_set_b%sphi
551 zetb => basis_set_b%zet
553 IF (inode == 1) last_jatom = 0
555 IF (jatom /= last_jatom)
THEN
572 NULLIFY (integral(i)%block)
574 row=irow, col=icol, block=integral(i)%block, found=found)
575 cpassert(
ASSOCIATED(integral(i)%block))
579 rab2 = rab(1)*rab(1) + rab(2)*rab(2) + rab(3)*rab(3)
584 ncoa = npgfa(iset)*
ncoset(la_max(iset))
585 sgfa = first_sgfa(1, iset)
589 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
593 rac =
pbc(rc, ra, cell)
601 ncob = npgfb(jset)*
ncoset(lb_max(jset))
602 sgfb = first_sgfb(1, jset)
606 CALL ang_mom(la_max(iset), la_min(iset), npgfa(iset), &
607 rpgfa(:, iset), zeta(:, iset), &
608 lb_max(jset), lb_min(jset), npgfb(jset), &
609 rpgfb(:, jset), zetb(:, jset), &
610 rab, rac, intab,
SIZE(rr_work, 1), rr_work)
616 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
617 1.0_dp, intab(1, 1, i),
SIZE(intab, 1), &
618 sphi_b(1, sgfb),
SIZE(sphi_b, 1), &
619 0.0_dp, work(1, 1),
SIZE(work, 1))
623 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
624 1.0_dp, sphi_a(1, sgfa),
SIZE(sphi_a, 1), &
625 work(1, 1),
SIZE(work, 1), &
626 1.0_dp, integral(i)%block(sgfa, sgfb), &
627 SIZE(integral(i)%block, 1))
650 DEALLOCATE (intab, work, integral, basis_set_list)
665 CALL timestop(handle)
691 SUBROUTINE ang_mom(la_max, la_min, npgfa, rpgfa, zeta, lb_max, lb_min, npgfb, rpgfb, zetb, &
692 rab, rac, intab, ldrr, rr)
693 INTEGER,
INTENT(IN) :: la_max, la_min, npgfa
694 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: rpgfa, zeta
695 INTEGER,
INTENT(IN) :: lb_max, lb_min, npgfb
696 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: rpgfb, zetb
697 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab, rac
698 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: intab
699 INTEGER,
INTENT(IN) :: ldrr
700 REAL(
dp),
DIMENSION(0:ldrr-1, 0:ldrr-1, 3), &
703 INTEGER :: ax, ay, az, bx, by, bz, coa, cob, i, &
704 ipgf, j, jpgf, la, lb, ma, mb, na, nb
705 REAL(
dp) :: dab, dumx, dumy, dumz, f0, rab2, xhi, zet
706 REAL(
dp),
DIMENSION(3) :: rap, rbp
710 rab2 = rab(1)**2 + rab(2)**2 + rab(3)**2
725 IF (rpgfa(ipgf) + rpgfb(jpgf) < dab)
THEN
726 DO j = nb + 1, nb +
ncoset(lb_max)
727 DO i = na + 1, na +
ncoset(la_max)
728 intab(i, j, 1) = 0.0_dp
729 intab(i, j, 2) = 0.0_dp
730 intab(i, j, 3) = 0.0_dp
738 zet = zeta(ipgf) + zetb(jpgf)
739 xhi = zeta(ipgf)*zetb(jpgf)/zet
740 rap = zetb(jpgf)*rab/zet
741 rbp = -zeta(ipgf)*rab/zet
743 f0 = (
pi/zet)**(1.5_dp)*exp(-xhi*rab2)
747 CALL os_rr_ovlp(rap, la_max + 1, rbp, lb_max, zet, ldrr, rr)
751 DO lb = lb_min, lb_max
755 cob =
coset(bx, by, bz)
757 DO la = la_min, la_max
761 coa =
coset(ax, ay, az)
764 dumx = -2.0_dp*zeta(ipgf)*rr(ax + 1, bx, 1)
765 dumy = -2.0_dp*zeta(ipgf)*rr(ay + 1, by, 2)
766 dumz = -2.0_dp*zeta(ipgf)*rr(az + 1, bz, 3)
767 IF (ax .GT. 0) dumx = dumx + real(ax,
dp)*rr(ax - 1, bx, 1)
768 IF (ay .GT. 0) dumy = dumy + real(ay,
dp)*rr(ay - 1, by, 2)
769 IF (az .GT. 0) dumz = dumz + real(az,
dp)*rr(az - 1, bz, 3)
772 intab(ma, mb, 1) = -f0*rr(ax, bx, 1)*( &
773 & (rr(ay + 1, by, 2) + rac(2)*rr(ay, by, 2))*dumz &
774 & - (rr(az + 1, bz, 3) + rac(3)*rr(az, bz, 3))*dumy)
777 intab(ma, mb, 2) = -f0*rr(ay, by, 2)*( &
778 & (rr(az + 1, bz, 3) + rac(3)*rr(az, bz, 3))*dumx &
779 & - (rr(ax + 1, bx, 1) + rac(1)*rr(ax, bx, 1))*dumz)
782 intab(ma, mb, 3) = -f0*rr(az, bz, 3)*( &
783 & (rr(ax + 1, bx, 1) + rac(1)*rr(ax, bx, 1))*dumy &
784 & - (rr(ay + 1, by, 2) + rac(2)*rr(ay, by, 2))*dumx)
802 END SUBROUTINE ang_mom
821 LOGICAL,
INTENT(IN),
OPTIONAL :: minimum_image
823 CHARACTER(len=*),
PARAMETER :: routinen =
'p_xyz_ao'
825 INTEGER :: handle, i, iatom, icol, ikind, inode, irow, iset, jatom, jkind, jset, last_jatom, &
826 ldab, ldsa, ldsb, ldwork, maxl, ncoa, ncob, nkind, nseta, nsetb, sgfa, sgfb
827 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
829 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
830 LOGICAL :: found, my_minimum_image, new_atom_b
831 REAL(kind=
dp) :: alpha, dab, lxo2, lyo2, lzo2, rab2
832 REAL(kind=
dp),
DIMENSION(3) :: ra, rab
833 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
834 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, work, &
836 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: difab
842 DIMENSION(:),
POINTER :: nl_iterator
846 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
849 CALL timeset(routinen, handle)
851 NULLIFY (qs_kind, qs_kind_set)
852 NULLIFY (cell, particle_set)
854 NULLIFY (difab, op_dip, work)
855 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb)
856 NULLIFY (set_radius_a, set_radius_b, rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb)
858 CALL get_qs_env(qs_env=qs_env, qs_kind_set=qs_kind_set, &
859 cell=cell, particle_set=particle_set, &
862 nkind =
SIZE(qs_kind_set)
865 maxco=ldwork, maxlgto=maxl)
867 my_minimum_image = .false.
868 IF (
PRESENT(minimum_image))
THEN
869 my_minimum_image = minimum_image
870 lxo2 = sqrt(sum(cell%hmat(:, 1)**2))/2.0_dp
871 lyo2 = sqrt(sum(cell%hmat(:, 2)**2))/2.0_dp
872 lzo2 = sqrt(sum(cell%hmat(:, 3)**2))/2.0_dp
877 ALLOCATE (difab(ldab, ldab, 3))
878 difab(1:ldab, 1:ldab, 1:3) = 0.0_dp
879 ALLOCATE (work(ldwork, ldwork))
880 work(1:ldwork, 1:ldwork) = 0.0_dp
884 NULLIFY (op_dip(i)%block)
887 ALLOCATE (basis_set_list(nkind))
889 qs_kind => qs_kind_set(ikind)
890 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set_a)
891 IF (
ASSOCIATED(basis_set_a))
THEN
892 basis_set_list(ikind)%gto_basis_set => basis_set_a
894 NULLIFY (basis_set_list(ikind)%gto_basis_set)
900 iatom=iatom, jatom=jatom, r=rab)
901 basis_set_a => basis_set_list(ikind)%gto_basis_set
902 IF (.NOT.
ASSOCIATED(basis_set_a)) cycle
903 basis_set_b => basis_set_list(jkind)%gto_basis_set
904 IF (.NOT.
ASSOCIATED(basis_set_b)) cycle
905 ra =
pbc(particle_set(iatom)%r, cell)
907 first_sgfa => basis_set_a%first_sgf
908 la_max => basis_set_a%lmax
909 la_min => basis_set_a%lmin
910 npgfa => basis_set_a%npgf
911 nseta = basis_set_a%nset
912 nsgfa => basis_set_a%nsgf_set
913 rpgfa => basis_set_a%pgf_radius
914 set_radius_a => basis_set_a%set_radius
915 sphi_a => basis_set_a%sphi
916 zeta => basis_set_a%zet
918 first_sgfb => basis_set_b%first_sgf
919 lb_max => basis_set_b%lmax
920 lb_min => basis_set_b%lmin
921 npgfb => basis_set_b%npgf
922 nsetb = basis_set_b%nset
923 nsgfb => basis_set_b%nsgf_set
924 rpgfb => basis_set_b%pgf_radius
925 set_radius_b => basis_set_b%set_radius
926 sphi_b => basis_set_b%sphi
927 zetb => basis_set_b%zet
933 ldsa =
SIZE(sphi_a, 1)
934 ldsb =
SIZE(sphi_b, 1)
936 IF (my_minimum_image)
THEN
937 IF (abs(rab(1)) > lxo2 .OR. abs(rab(2)) > lyo2 .OR. abs(rab(3)) > lzo2) cycle
940 IF (jatom /= last_jatom)
THEN
948 IF (iatom <= jatom)
THEN
962 NULLIFY (op_dip(i)%block)
964 row=irow, col=icol, block=op_dip(i)%block, found=found)
965 cpassert(
ASSOCIATED(op_dip(i)%block))
968 rab2 = rab(1)*rab(1) + rab(2)*rab(2) + rab(3)*rab(3)
973 ncoa = npgfa(iset)*
ncoset(la_max(iset))
974 sgfa = first_sgfa(1, iset)
978 ncob = npgfb(jset)*
ncoset(lb_max(jset))
979 sgfb = first_sgfb(1, jset)
981 IF (set_radius_a(iset) + set_radius_b(jset) >= dab)
THEN
984 CALL diffop(la_max(iset), npgfa(iset), zeta(:, iset), &
985 rpgfa(:, iset), la_min(iset), lb_max(jset), npgfb(jset), &
986 zetb(:, jset), rpgfb(:, jset), lb_min(jset), rab, difab)
989 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
990 alpha, difab(1, 1, 1), ldab, sphi_b(1, sgfb), ldsb, &
991 0.0_dp, work(1, 1), ldwork)
992 IF (iatom <= jatom)
THEN
993 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
994 1.0_dp, sphi_a(1, sgfa), ldsa, &
995 work(1, 1), ldwork, &
996 1.0_dp, op_dip(1)%block(sgfa, sgfb), &
997 SIZE(op_dip(1)%block, 1))
1000 CALL dgemm(
"T",
"N", nsgfb(jset), nsgfa(iset), ncoa, &
1001 1.0_dp, work(1, 1), ldwork, &
1002 sphi_a(1, sgfa), ldsa, &
1003 1.0_dp, op_dip(1)%block(sgfb, sgfa), &
1004 SIZE(op_dip(1)%block, 1))
1009 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
1010 alpha, difab(1, 1, 2), ldab, sphi_b(1, sgfb), ldsb, &
1011 0.0_dp, work(1, 1), ldwork)
1012 IF (iatom <= jatom)
THEN
1013 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
1014 1.0_dp, sphi_a(1, sgfa), ldsa, &
1015 work(1, 1), ldwork, &
1016 1.0_dp, op_dip(2)%block(sgfa, sgfb), &
1017 SIZE(op_dip(2)%block, 1))
1019 CALL dgemm(
"T",
"N", nsgfb(jset), nsgfa(iset), ncoa, &
1020 1.0_dp, work(1, 1), ldwork, &
1021 sphi_a(1, sgfa), ldsa, &
1022 1.0_dp, op_dip(2)%block(sgfb, sgfa), &
1023 SIZE(op_dip(2)%block, 1))
1027 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
1028 alpha, difab(1, 1, 3), ldab, sphi_b(1, sgfb), ldsb, &
1029 0.0_dp, work(1, 1), ldwork)
1030 IF (iatom <= jatom)
THEN
1031 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
1032 1.0_dp, sphi_a(1, sgfa), ldsa, &
1033 work(1, 1), ldwork, &
1034 1.0_dp, op_dip(3)%block(sgfa, sgfb), &
1035 SIZE(op_dip(3)%block, 1))
1037 CALL dgemm(
"T",
"N", nsgfb(jset), nsgfa(iset), ncoa, &
1038 1.0_dp, work(1, 1), ldwork, &
1039 sphi_a(1, sgfa), ldsa, &
1040 1.0_dp, op_dip(3)%block(sgfb, sgfa), &
1041 SIZE(op_dip(3)%block, 1))
1053 NULLIFY (op_dip(i)%block)
1057 DEALLOCATE (difab, work, basis_set_list)
1059 CALL timestop(handle)
1083 SUBROUTINE rrc_xyz_ao(op, qs_env, rc, order, minimum_image, soft)
1088 INTEGER,
INTENT(IN) :: order
1089 LOGICAL,
INTENT(IN),
OPTIONAL :: minimum_image, soft
1091 CHARACTER(len=*),
PARAMETER :: routinen =
'rRc_xyz_ao'
1093 CHARACTER(LEN=default_string_length) :: basis_type
1094 INTEGER :: handle, iatom, icol, ikind, imom, inode, irow, iset, jatom, jkind, jset, &
1095 last_jatom, ldab, ldsa, ldsb, ldwork, m_dim, maxl, ncoa, ncob, nkind, nseta, nsetb, sgfa, &
1097 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, npgfa, npgfb, &
1099 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
1100 LOGICAL :: found, my_minimum_image, my_soft, &
1102 REAL(kind=
dp) :: dab, lxo2, lyo2, lzo2, rab2
1103 REAL(kind=
dp),
DIMENSION(3) :: ra, rab, rac, rb, rbc
1104 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
1105 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, work, &
1107 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: mab
1113 DIMENSION(:),
POINTER :: nl_iterator
1117 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1120 CALL timeset(routinen, handle)
1122 NULLIFY (qs_kind, qs_kind_set)
1123 NULLIFY (cell, particle_set)
1125 NULLIFY (mab, op_dip, work)
1126 NULLIFY (la_max, la_min, lb_max, npgfa, npgfb, nsgfa, nsgfb)
1127 NULLIFY (set_radius_a, set_radius_b, rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb)
1130 IF (
PRESENT(soft)) my_soft = soft
1132 basis_type =
"ORB_SOFT"
1137 CALL get_qs_env(qs_env=qs_env, qs_kind_set=qs_kind_set, &
1138 cell=cell, particle_set=particle_set, sab_orb=sab_orb)
1140 nkind =
SIZE(qs_kind_set)
1143 maxco=ldwork, maxlgto=maxl)
1145 my_minimum_image = .false.
1146 IF (
PRESENT(minimum_image))
THEN
1147 my_minimum_image = minimum_image
1148 lxo2 = sqrt(sum(cell%hmat(:, 1)**2))/2.0_dp
1149 lyo2 = sqrt(sum(cell%hmat(:, 2)**2))/2.0_dp
1150 lzo2 = sqrt(sum(cell%hmat(:, 3)**2))/2.0_dp
1156 IF (order == -2) smom = 4
1157 m_dim =
ncoset(abs(order)) - 1
1158 cpassert(m_dim <=
SIZE(op, 1))
1160 ALLOCATE (mab(ldab, ldab, 1:m_dim))
1161 mab(1:ldab, 1:ldab, 1:m_dim) = 0.0_dp
1162 ALLOCATE (work(ldwork, ldwork))
1163 work(1:ldwork, 1:ldwork) = 0.0_dp
1164 ALLOCATE (op_dip(smom:m_dim))
1166 DO imom = smom, m_dim
1167 NULLIFY (op_dip(imom)%block)
1170 ALLOCATE (basis_set_list(nkind))
1172 qs_kind => qs_kind_set(ikind)
1173 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set_a, basis_type=basis_type)
1174 IF (
ASSOCIATED(basis_set_a))
THEN
1175 basis_set_list(ikind)%gto_basis_set => basis_set_a
1177 NULLIFY (basis_set_list(ikind)%gto_basis_set)
1183 iatom=iatom, jatom=jatom, r=rab)
1184 basis_set_a => basis_set_list(ikind)%gto_basis_set
1185 IF (.NOT.
ASSOCIATED(basis_set_a)) cycle
1186 basis_set_b => basis_set_list(jkind)%gto_basis_set
1187 IF (.NOT.
ASSOCIATED(basis_set_b)) cycle
1188 ra =
pbc(particle_set(iatom)%r, cell)
1190 first_sgfa => basis_set_a%first_sgf
1191 la_max => basis_set_a%lmax
1192 la_min => basis_set_a%lmin
1193 npgfa => basis_set_a%npgf
1194 nseta = basis_set_a%nset
1195 nsgfa => basis_set_a%nsgf_set
1196 rpgfa => basis_set_a%pgf_radius
1197 set_radius_a => basis_set_a%set_radius
1198 sphi_a => basis_set_a%sphi
1199 zeta => basis_set_a%zet
1201 first_sgfb => basis_set_b%first_sgf
1202 lb_max => basis_set_b%lmax
1203 npgfb => basis_set_b%npgf
1204 nsetb = basis_set_b%nset
1205 nsgfb => basis_set_b%nsgf_set
1206 rpgfb => basis_set_b%pgf_radius
1207 set_radius_b => basis_set_b%set_radius
1208 sphi_b => basis_set_b%sphi
1209 zetb => basis_set_b%zet
1211 ldsa =
SIZE(sphi_a, 1)
1212 ldsb =
SIZE(sphi_b, 1)
1213 IF (inode == 1) last_jatom = 0
1215 IF (my_minimum_image)
THEN
1216 IF (abs(rab(1)) > lxo2 .OR. abs(rab(2)) > lyo2 .OR. abs(rab(3)) > lzo2) cycle
1221 IF (jatom /= last_jatom)
THEN
1225 new_atom_b = .false.
1228 IF (new_atom_b)
THEN
1229 IF (iatom <= jatom)
THEN
1237 DO imom = smom, m_dim
1238 NULLIFY (op_dip(imom)%block)
1240 row=irow, col=icol, block=op_dip(imom)%block, found=found)
1241 cpassert(
ASSOCIATED(op_dip(imom)%block))
1245 rab2 = rab(1)*rab(1) + rab(2)*rab(2) + rab(3)*rab(3)
1250 ncoa = npgfa(iset)*
ncoset(la_max(iset))
1251 sgfa = first_sgfa(1, iset)
1255 ncob = npgfb(jset)*
ncoset(lb_max(jset))
1256 sgfb = first_sgfb(1, jset)
1258 IF (set_radius_a(iset) + set_radius_b(jset) >= dab)
THEN
1260 rac =
pbc(rc, ra, cell)
1261 rbc =
pbc(rc, rb, cell)
1264 CALL moment(la_max(iset), npgfa(iset), zeta(:, iset), &
1265 rpgfa(:, iset), la_min(iset), &
1266 lb_max(jset), npgfb(jset), zetb(:, jset), rpgfb(:, jset), &
1267 abs(order), rac, rbc, mab)
1269 DO imom = smom, m_dim
1271 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
1272 1.0_dp, mab(1, 1, imom), ldab, sphi_b(1, sgfb), ldsb, &
1273 0.0_dp, work(1, 1), ldwork)
1274 IF (iatom <= jatom)
THEN
1275 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
1276 1.0_dp, sphi_a(1, sgfa), ldsa, &
1277 work(1, 1), ldwork, &
1278 1.0_dp, op_dip(imom)%block(sgfa, sgfb), &
1279 SIZE(op_dip(imom)%block, 1))
1281 CALL dgemm(
"T",
"N", nsgfb(jset), nsgfa(iset), ncoa, &
1282 1.0_dp, work(1, 1), ldwork, &
1283 sphi_a(1, sgfa), ldsa, &
1284 1.0_dp, op_dip(imom)%block(sgfb, sgfa), &
1285 SIZE(op_dip(imom)%block, 1))
1298 DO imom = smom, m_dim
1299 NULLIFY (op_dip(imom)%block)
1303 DEALLOCATE (mab, work, basis_set_list)
1305 CALL timestop(handle)
1355 INTEGER,
INTENT(IN) :: order
1356 LOGICAL,
INTENT(IN),
OPTIONAL :: minimum_image, soft
1358 CHARACTER(len=*),
PARAMETER :: routinen =
'rRc_xyz_der_ao'
1360 CHARACTER(LEN=default_string_length) :: basis_type
1361 INTEGER :: handle, i, iatom, icol, idir, ikind, imom, inode, ipgf, irow, iset, j, jatom, &
1362 jkind, jpgf, jset, last_jatom, lda_min, ldab, ldb_min, ldsa, ldsb, ldwork, m_dim, maxl, &
1363 na, nb, ncoa, ncob, nda, ndb, nkind, nseta, nsetb, sgfa, sgfb
1364 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
1366 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
1367 LOGICAL :: my_minimum_image, my_soft, new_atom_b, &
1368 op_der_found, op_found
1369 REAL(kind=
dp) :: alpha, alpha_der, dab, lxo2, lyo2, lzo2, &
1371 REAL(kind=
dp),
DIMENSION(3) :: ra, rab, rac, rb, rbc
1372 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
1373 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, work, &
1375 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: mab, mab_tmp
1376 REAL(kind=
dp),
DIMENSION(:, :, :, :),
POINTER :: difmab
1378 TYPE(
block_p_type),
DIMENSION(:, :),
POINTER :: op_dip_der
1383 DIMENSION(:),
POINTER :: nl_iterator
1387 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1390 CALL timeset(routinen, handle)
1392 cpassert(
ASSOCIATED(op))
1393 cpassert(
ASSOCIATED(op_der))
1399 NULLIFY (qs_kind, qs_kind_set)
1400 NULLIFY (cell, particle_set)
1402 NULLIFY (difmab, mab, mab_tmp)
1403 NULLIFY (op_dip, op_dip_der, work)
1404 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb)
1405 NULLIFY (set_radius_a, set_radius_b, rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb)
1408 IF (
PRESENT(soft)) my_soft = soft
1410 basis_type =
"ORB_SOFT"
1415 CALL get_qs_env(qs_env=qs_env, qs_kind_set=qs_kind_set, &
1416 cell=cell, particle_set=particle_set, &
1419 nkind =
SIZE(qs_kind_set)
1422 maxco=ldwork, maxlgto=maxl)
1424 my_minimum_image = .false.
1425 IF (
PRESENT(minimum_image))
THEN
1426 my_minimum_image = minimum_image
1427 lxo2 = sqrt(sum(cell%hmat(:, 1)**2))/2.0_dp
1428 lyo2 = sqrt(sum(cell%hmat(:, 2)**2))/2.0_dp
1429 lzo2 = sqrt(sum(cell%hmat(:, 3)**2))/2.0_dp
1434 m_dim =
ncoset(order) - 1
1435 cpassert(m_dim <=
SIZE(op, 1))
1437 ALLOCATE (mab(ldab, ldab, m_dim))
1438 mab(1:ldab, 1:ldab, 1:m_dim) = 0.0_dp
1439 ALLOCATE (difmab(ldab, ldab, m_dim, 3))
1440 difmab(1:ldab, 1:ldab, 1:m_dim, 1:3) = 0.0_dp
1442 ALLOCATE (work(ldwork, ldwork))
1443 work(1:ldwork, 1:ldwork) = 0.0_dp
1444 ALLOCATE (op_dip(m_dim))
1445 ALLOCATE (op_dip_der(m_dim, 3))
1448 NULLIFY (op_dip(imom)%block)
1450 NULLIFY (op_dip_der(imom, i)%block)
1454 ALLOCATE (basis_set_list(nkind))
1456 qs_kind => qs_kind_set(ikind)
1457 CALL get_qs_kind(qs_kind=qs_kind, basis_set=basis_set_a, basis_type=basis_type)
1458 IF (
ASSOCIATED(basis_set_a))
THEN
1459 basis_set_list(ikind)%gto_basis_set => basis_set_a
1461 NULLIFY (basis_set_list(ikind)%gto_basis_set)
1467 iatom=iatom, jatom=jatom, r=rab)
1468 basis_set_a => basis_set_list(ikind)%gto_basis_set
1469 IF (.NOT.
ASSOCIATED(basis_set_a)) cycle
1470 basis_set_b => basis_set_list(jkind)%gto_basis_set
1471 IF (.NOT.
ASSOCIATED(basis_set_b)) cycle
1472 ra =
pbc(particle_set(iatom)%r, cell)
1474 first_sgfa => basis_set_a%first_sgf
1475 la_max => basis_set_a%lmax
1476 la_min => basis_set_a%lmin
1477 npgfa => basis_set_a%npgf
1478 nseta = basis_set_a%nset
1479 nsgfa => basis_set_a%nsgf_set
1480 rpgfa => basis_set_a%pgf_radius
1481 set_radius_a => basis_set_a%set_radius
1482 sphi_a => basis_set_a%sphi
1483 zeta => basis_set_a%zet
1485 first_sgfb => basis_set_b%first_sgf
1486 lb_max => basis_set_b%lmax
1487 lb_min => basis_set_b%lmin
1488 npgfb => basis_set_b%npgf
1489 nsetb = basis_set_b%nset
1490 nsgfb => basis_set_b%nsgf_set
1491 rpgfb => basis_set_b%pgf_radius
1492 set_radius_b => basis_set_b%set_radius
1493 sphi_b => basis_set_b%sphi
1494 zetb => basis_set_b%zet
1496 ldsa =
SIZE(sphi_a, 1)
1497 IF (ldsa .EQ. 0) cycle
1498 ldsb =
SIZE(sphi_b, 1)
1499 IF (ldsb .EQ. 0) cycle
1500 IF (inode == 1) last_jatom = 0
1502 IF (my_minimum_image)
THEN
1503 IF (abs(rab(1)) > lxo2 .OR. abs(rab(2)) > lyo2 .OR. abs(rab(3)) > lzo2) cycle
1508 IF (jatom /= last_jatom)
THEN
1512 new_atom_b = .false.
1515 IF (new_atom_b)
THEN
1521 NULLIFY (op_dip(imom)%block)
1523 row=irow, col=icol, &
1524 block=op_dip(imom)%block, &
1526 cpassert(op_found .AND.
ASSOCIATED(op_dip(imom)%block))
1528 NULLIFY (op_dip_der(imom, idir)%block)
1530 row=irow, col=icol, &
1531 block=op_dip_der(imom, idir)%block, &
1533 cpassert(op_der_found .AND.
ASSOCIATED(op_dip_der(imom, idir)%block))
1538 rab2 = rab(1)*rab(1) + rab(2)*rab(2) + rab(3)*rab(3)
1543 ncoa = npgfa(iset)*
ncoset(la_max(iset))
1544 sgfa = first_sgfa(1, iset)
1548 ncob = npgfb(jset)*
ncoset(lb_max(jset))
1549 sgfb = first_sgfb(1, jset)
1551 IF (set_radius_a(iset) + set_radius_b(jset) >= dab)
THEN
1553 rac =
pbc(rc, ra, cell)
1558 ALLOCATE (mab_tmp(npgfa(iset)*
ncoset(la_max(iset) + 1), &
1559 npgfb(jset)*
ncoset(lb_max(jset) + 1),
ncoset(order) - 1))
1561 lda_min = max(0, la_min(iset) - 1)
1562 ldb_min = max(0, lb_min(jset) - 1)
1564 CALL moment(la_max(iset) + 1, npgfa(iset), zeta(:, iset), &
1565 rpgfa(:, iset), lda_min, &
1566 lb_max(jset) + 1, npgfb(jset), zetb(:, jset), rpgfb(:, jset), &
1567 order, rac, rbc, mab_tmp)
1570 CALL diff_momop(la_max(iset), npgfa(iset), zeta(:, iset), &
1571 rpgfa(:, iset), la_min(iset), lb_max(jset), npgfb(jset), &
1572 zetb(:, jset), rpgfb(:, jset), lb_min(jset), order, rac, rbc, &
1573 difmab, mab_ext=mab_tmp)
1580 DO ipgf = 1, npgfa(iset)
1583 DO jpgf = 1, npgfb(jset)
1584 DO j = 1,
ncoset(lb_max(jset))
1585 DO i = 1,
ncoset(la_max(iset))
1586 mab(i + na, j + nb, imom) = mab_tmp(i + nda, j + ndb, imom)
1589 nb = nb +
ncoset(lb_max(jset))
1590 ndb = ndb +
ncoset(lb_max(jset) + 1)
1592 na = na +
ncoset(la_max(iset))
1593 nda = nda +
ncoset(la_max(iset) + 1)
1597 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
1598 1.0_dp, mab(1, 1, imom), ldab, sphi_b(1, sgfb), ldsb, &
1599 0.0_dp, work(1, 1), ldwork)
1600 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
1601 1.0_dp, sphi_a(1, sgfa), ldsa, &
1602 work(1, 1), ldwork, &
1603 1.0_dp, op_dip(imom)%block(sgfa, sgfb), &
1604 SIZE(op_dip(imom)%block, 1))
1608 CALL dgemm(
"N",
"N", ncoa, nsgfb(jset), ncob, &
1609 alpha, difmab(1, 1, imom, idir), ldab, sphi_b(1, sgfb), ldsb, &
1610 0.0_dp, work(1, 1), ldwork)
1611 CALL dgemm(
"T",
"N", nsgfa(iset), nsgfb(jset), ncoa, &
1612 1.0_dp, sphi_a(1, sgfa), ldsa, &
1613 work(1, 1), ldwork, &
1614 1.0_dp, op_dip_der(imom, idir)%block(sgfa, sgfb), &
1615 SIZE(op_dip_der(imom, idir)%block, 1))
1621 DEALLOCATE (mab_tmp)
1632 NULLIFY (op_dip(i)%block)
1634 DEALLOCATE (op_dip, op_dip_der)
1636 DEALLOCATE (mab, difmab, work, basis_set_list)
1638 CALL timestop(handle)
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 the moment integrals over Cartesian Gaussian-type functions.
subroutine, public diff_momop(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpgfb, lb_min, order, rac, rbc, difmab, mab_ext)
This returns the derivative of the moment integrals [a|\mu|b], with respect to the position of the pr...
subroutine, public diffop(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpgfb, lb_min, rab, difab)
This returns the derivative of the overlap integrals [a|b], with respect to the position of the primi...
subroutine, public moment(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpgfb, lc_max, rac, rbc, mab)
...
subroutine, public os_rr_ovlp(rap, la_max, rbp, lb_max, zet, ldrr, rr)
Calculation of the basic Obara-Saika recurrence relation.
collect pointers to a block of reals
Handles all functions related to the CELL.
logical function, public dbcsr_has_symmetry(matrix)
...
character function, public dbcsr_get_matrix_type(matrix)
...
subroutine, public dbcsr_get_block_p(matrix, row, col, block, found, row_size, col_size)
...
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
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 ncoset
integer, dimension(:, :, :), allocatable, public coset
Define the data structure for the particle information.
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, ecoul_1c, rho0_s_rs, rho0_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs)
Get the QUICKSTEP environment.
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, init_u_ramping_each_scf, reltmat, ghost, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
subroutine, public get_qs_kind_set(qs_kind_set, all_potential_present, tnadd_potential_present, gth_potential_present, sgp_potential_present, paw_atom_present, dft_plus_u_atom_present, maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, maxlprj, maxnset, maxsgf_set, ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, maxppnl, nelectron, maxder, max_ngrid_rad, max_sph_harm, maxg_iso_not0, lmax_rho0, basis_rcut, basis_type, total_zeff_corr, npgf_seg)
Get attributes of an atomic kind set.
Define the neighbor list data types and the corresponding functionality.
subroutine, public neighbor_list_iterator_create(iterator_set, nl, search, nthread)
Neighbor list iterator functions.
subroutine, public neighbor_list_iterator_release(iterator_set)
...
integer function, public neighbor_list_iterate(iterator_set, mepos)
...
subroutine, public get_iterator_info(iterator_set, mepos, ikind, jkind, nkind, ilist, nlist, inode, nnode, iatom, jatom, r, cell)
...
subroutine, public build_ang_mom_matrix(qs_env, matrix, rc)
Calculation of the angular momentum matrix over Cartesian Gaussian functions.
subroutine, public rrc_xyz_der_ao(op, op_der, qs_env, rc, order, minimum_image, soft)
Calculation of the multipole operators integrals and of its derivatives of the type [\mu | op | d(\nu...
subroutine, public p_xyz_ao(op, qs_env, minimum_image)
Calculation of the components of the dipole operator in the velocity form The elements of the sparse ...
subroutine, public build_lin_mom_matrix(qs_env, matrix)
Calculation of the linear momentum matrix <mu|∂|nu> over Cartesian Gaussian functions.
subroutine, public rrc_xyz_ao(op, qs_env, rc, order, minimum_image, soft)
Calculation of the components of the dipole operator in the length form by taking the relative positi...
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.