77#include "./base/base_uses.f90"
84 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_linres_epr_ownutils'
101 CHARACTER(LEN=default_string_length) :: title
102 INTEGER :: idir1, idir2, output_unit, unit_nr
103 REAL(kind=
dp) :: eigenv_g(3), g_sym(3, 3), gsum
107 NULLIFY (logger, lr_section)
113 extension=
".linresLog")
119 gsum = gsum + epr_env%g_total(idir1, idir2)
123 IF (output_unit > 0)
THEN
124 WRITE (unit=output_unit, fmt=
"(T2,A,T56,E14.6)") &
125 "epr|TOT:checksum", gsum
129 "PRINT%PROGRAM_RUN_INFO")
135 extension=
".data", middle_name=
"GTENSOR", &
136 log_filename=.false.)
138 IF (unit_nr > 0)
THEN
140 WRITE (title,
"(A)")
"G tensor "
141 WRITE (unit_nr,
"(T2,A)") title
143 WRITE (unit_nr,
"(T2,A)")
"gmatrix_zke"
144 WRITE (unit_nr,
"(3(A,f15.10))")
" XX=", epr_env%g_zke, &
145 " XY=", 0.0_dp,
" XZ=", 0.0_dp
146 WRITE (unit_nr,
"(3(A,f15.10))")
" YX=", 0.0_dp, &
147 " YY=", epr_env%g_zke,
" YZ=", 0.0_dp
148 WRITE (unit_nr,
"(3(A,f15.10))")
" ZX=", 0.0_dp, &
149 " ZY=", 0.0_dp,
" ZZ=", epr_env%g_zke
151 WRITE (unit_nr,
"(T2,A)")
"gmatrix_so"
152 WRITE (unit_nr,
"(3(A,f15.10))")
" XX=", epr_env%g_so(1, 1), &
153 " XY=", epr_env%g_so(1, 2),
" XZ=", epr_env%g_so(1, 3)
154 WRITE (unit_nr,
"(3(A,f15.10))")
" YX=", epr_env%g_so(2, 1), &
155 " YY=", epr_env%g_so(2, 2),
" YZ=", epr_env%g_so(2, 3)
156 WRITE (unit_nr,
"(3(A,f15.10))")
" ZX=", epr_env%g_so(3, 1), &
157 " ZY=", epr_env%g_so(3, 2),
" ZZ=", epr_env%g_so(3, 3)
159 WRITE (unit_nr,
"(T2,A)")
"gmatrix_soo"
160 WRITE (unit_nr,
"(3(A,f15.10))")
" XX=", epr_env%g_soo(1, 1), &
161 " XY=", epr_env%g_soo(1, 2),
" XZ=", epr_env%g_soo(1, 3)
162 WRITE (unit_nr,
"(3(A,f15.10))")
" YX=", epr_env%g_soo(2, 1), &
163 " YY=", epr_env%g_soo(2, 2),
" YZ=", epr_env%g_soo(2, 3)
164 WRITE (unit_nr,
"(3(A,f15.10))")
" ZX=", epr_env%g_soo(3, 1), &
165 " ZY=", epr_env%g_soo(3, 2),
" ZZ=", epr_env%g_soo(3, 3)
167 WRITE (unit_nr,
"(T2,A)")
"gmatrix_total"
168 WRITE (unit_nr,
"(3(A,f15.10))")
" XX=", epr_env%g_total(1, 1) + epr_env%g_free_factor, &
169 " XY=", epr_env%g_total(1, 2),
" XZ=", epr_env%g_total(1, 3)
170 WRITE (unit_nr,
"(3(A,f15.10))")
" YX=", epr_env%g_total(2, 1), &
171 " YY=", epr_env%g_total(2, 2) + epr_env%g_free_factor,
" YZ=", epr_env%g_total(2, 3)
172 WRITE (unit_nr,
"(3(A,f15.10))")
" ZX=", epr_env%g_total(3, 1), &
173 " ZY=", epr_env%g_total(3, 2),
" ZZ=", epr_env%g_total(3, 3) + epr_env%g_free_factor
177 g_sym(idir1, idir2) = (epr_env%g_total(idir1, idir2) + &
178 epr_env%g_total(idir2, idir1))/2.0_dp
182 WRITE (unit_nr,
"(T2,A)")
"gtensor_total"
183 WRITE (unit_nr,
"(3(A,f15.10))")
" XX=", g_sym(1, 1) + epr_env%g_free_factor, &
184 " XY=", g_sym(1, 2),
" XZ=", g_sym(1, 3)
185 WRITE (unit_nr,
"(3(A,f15.10))")
" YX=", g_sym(2, 1), &
186 " YY=", g_sym(2, 2) + epr_env%g_free_factor,
" YZ=", g_sym(2, 3)
187 WRITE (unit_nr,
"(3(A,f15.10))")
" ZX=", g_sym(3, 1), &
188 " ZY=", g_sym(3, 2),
" ZZ=", g_sym(3, 3) + epr_env%g_free_factor
191 eigenv_g(:) = eigenv_g(:)*1.0e6_dp
193 WRITE (unit_nr,
"(T2,A)")
"delta_g principal values in ppm"
194 WRITE (unit_nr,
"(f15.3,3(A,f15.10))") eigenv_g(1),
" X=", g_sym(1, 1), &
195 " Y=", g_sym(2, 1),
" Z=", g_sym(3, 1)
196 WRITE (unit_nr,
"(f15.3,3(A,f15.10))") eigenv_g(2),
" X=", g_sym(1, 2), &
197 " Y=", g_sym(2, 2),
" Z=", g_sym(3, 2)
198 WRITE (unit_nr,
"(f15.3,3(A,f15.10))") eigenv_g(3),
" X=", g_sym(1, 3), &
199 " Y=", g_sym(2, 3),
" Z=", g_sym(3, 3)
204 &
"EPR%PRINT%G_TENSOR")
223 INTEGER :: i1, ispin, output_unit
224 REAL(kind=
dp) :: epr_g_zke_temp(2)
226 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: kinetic, rho_ao
232 NULLIFY (dft_control, logger, lr_section, rho, kinetic, para_env, rho_ao)
238 extension=
".linresLog")
240 CALL get_qs_env(qs_env=qs_env, dft_control=dft_control, &
241 kinetic=kinetic, rho=rho, para_env=para_env)
245 DO ispin = 1, dft_control%nspins
247 ecore=epr_g_zke_temp(ispin))
250 epr_env%g_zke = epr_env%g_zke_factor*(epr_g_zke_temp(1) - epr_g_zke_temp(2))
252 epr_env%g_total(i1, i1) = epr_env%g_total(i1, i1) + epr_env%g_zke
255 IF (output_unit > 0)
THEN
256 WRITE (unit=output_unit, fmt=
"(T2,A,T56,E24.16)") &
257 "epr|ZKE:g_zke", epr_env%g_zke
261 "PRINT%PROGRAM_RUN_INFO")
275 SUBROUTINE epr_g_so(epr_env, current_env, qs_env, iB)
280 INTEGER,
INTENT(IN) :: ib
282 INTEGER :: aint_precond, ia, iat, iatom, idir1, &
283 idir2, idir3, ikind, ir, ispin, &
284 max_iter, natom, nkind, nspins, &
285 output_unit, precond_kind
286 INTEGER,
DIMENSION(2) :: bo
287 INTEGER,
DIMENSION(:),
POINTER :: atom_list
288 LOGICAL :: gapw, paw_atom, success
289 REAL(
dp) :: eps_r, eps_x, hard_radius, temp_so_soft, &
290 vks_ra_idir2, vks_ra_idir3
291 REAL(
dp),
DIMENSION(3, 3) :: temp_so_gapw
292 REAL(
dp),
DIMENSION(:, :),
POINTER :: g_so, g_total
293 REAL(kind=
dp),
DIMENSION(3) :: ra
307 TYPE(
pw_r3d_rs_type),
ALLOCATABLE,
DIMENSION(:, :) :: vks_pw_spline
308 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: jrho2_r, jrho3_r, nrho1_r, nrho2_r, &
311 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
313 TYPE(
qs_rho_p_type),
DIMENSION(:, :),
POINTER :: nablavks_set
316 NULLIFY (atomic_kind_set, qs_kind_set, atom_list, dft_control, &
317 grid_atom, g_so, g_total, harmonics, interp_section, jrho1_atom_set, &
318 jrho1_set, logger, lr_section, nablavks_atom, nablavks_atom_set, &
319 nablavks_set, para_env, particle_set, jrho2_r, jrho3_r, nrho1_r, nrho2_r, nrho3_r)
325 extension=
".linresLog")
327 CALL get_qs_env(qs_env=qs_env, dft_control=dft_control, &
328 atomic_kind_set=atomic_kind_set, &
329 qs_kind_set=qs_kind_set, &
330 para_env=para_env, pw_env=pw_env, &
331 particle_set=particle_set)
334 nablavks_set=nablavks_set, &
335 nablavks_atom_set=nablavks_atom_set, &
336 g_total=g_total, g_so=g_so)
339 jrho1_set=jrho1_set, jrho1_atom_set=jrho1_atom_set)
341 gapw = dft_control%qs_control%gapw
342 nkind =
SIZE(qs_kind_set, 1)
343 nspins = dft_control%nspins
348 temp_so_soft = 0.0_dp
350 CALL qs_rho_get(jrho1_set(idir2)%rho, rho_r=jrho2_r)
351 CALL qs_rho_get(jrho1_set(idir3)%rho, rho_r=jrho3_r)
352 CALL qs_rho_get(nablavks_set(idir2, ispin)%rho, rho_r=nrho2_r)
353 CALL qs_rho_get(nablavks_set(idir3, ispin)%rho, rho_r=nrho3_r)
354 temp_so_soft = temp_so_soft + (-1.0_dp)**(1 + ispin)*( &
358 temp_so_soft = -1.0_dp*epr_env%g_so_factor*temp_so_soft
359 IF (output_unit > 0)
THEN
360 WRITE (unit=output_unit, fmt=
"(T2,A,T18,I1,I1,T56,E24.16)") &
361 "epr|SOX:soft", ib, idir1, temp_so_soft
363 g_so(ib, idir1) = temp_so_soft
368 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool)
369 ALLOCATE (vks_pw_spline(3, nspins))
382 CALL auxbas_pw_pool%create_pw(vks_pw_spline(idir1, ispin))
385 pool=auxbas_pw_pool,
pbc=.true., transpose=.false.)
386 CALL qs_rho_get(nablavks_set(idir1, ispin)%rho, rho_r=nrho1_r)
388 vks_pw_spline(idir1, ispin))
391 coeffs=vks_pw_spline(idir1, ispin), linop=
spl3_pbc, &
393 eps_r=eps_r, eps_x=eps_x, max_iter=max_iter)
399 temp_so_gapw = 0.0_dp
402 NULLIFY (atom_list, grid_atom, harmonics)
403 CALL get_atomic_kind(atomic_kind_set(ikind), atom_list=atom_list, natom=natom)
405 hard_radius=hard_radius, &
406 grid_atom=grid_atom, &
407 harmonics=harmonics, &
410 IF (.NOT. paw_atom) cycle
414 bo =
get_limit(natom, para_env%num_pe, para_env%mepos)
418 iatom = atom_list(iat)
419 NULLIFY (jrho1_atom, nablavks_atom)
420 jrho1_atom => jrho1_atom_set(iatom)
421 nablavks_atom => nablavks_atom_set(iatom)
425 DO ir = 1, grid_atom%nr
427 IF (grid_atom%rad(ir) >= hard_radius) cycle
429 DO ia = 1, grid_atom%ng_sphere
431 ra = particle_set(iatom)%r
432 ra(:) = ra(:) + grid_atom%rad(ir)*harmonics%a(:, ia)
434 vks_pw_spline(idir2, ispin))
436 vks_pw_spline(idir3, ispin))
438 IF (iat .LT. bo(1) .OR. iat .GT. bo(2)) cycle
442 temp_so_gapw(ib, idir1) = temp_so_gapw(ib, idir1) + &
443 (-1.0_dp)**(1 + ispin)*( &
444 jrho1_atom%jrho_vec_rad_h(idir2, ispin)%r_coef(ir, ia)* &
446 jrho1_atom%jrho_vec_rad_h(idir3, ispin)%r_coef(ir, ia)* &
448 )*grid_atom%wr(ir)*grid_atom%wa(ia)
451 temp_so_gapw(ib, idir1) = temp_so_gapw(ib, idir1) - &
452 (-1.0_dp)**(1 + ispin)*( &
453 jrho1_atom%jrho_vec_rad_s(idir2, ispin)%r_coef(ir, ia)* &
455 jrho1_atom%jrho_vec_rad_s(idir3, ispin)%r_coef(ir, ia)* &
457 )*grid_atom%wr(ir)*grid_atom%wa(ia)
460 temp_so_gapw(ib, idir1) = temp_so_gapw(ib, idir1) + &
461 (-1.0_dp)**(1 + ispin)*( &
462 jrho1_atom%jrho_vec_rad_h(idir2, ispin)%r_coef(ir, ia)* &
463 nablavks_atom%nablavks_vec_rad_h(idir3, ispin)%r_coef(ir, ia) - &
464 jrho1_atom%jrho_vec_rad_h(idir3, ispin)%r_coef(ir, ia)* &
465 nablavks_atom%nablavks_vec_rad_h(idir2, ispin)%r_coef(ir, ia) &
466 )*grid_atom%wr(ir)*grid_atom%wa(ia)
469 temp_so_gapw(ib, idir1) = temp_so_gapw(ib, idir1) - &
470 (-1.0_dp)**(1 + ispin)*( &
471 jrho1_atom%jrho_vec_rad_h(idir2, ispin)%r_coef(ir, ia)* &
472 nablavks_atom%nablavks_vec_rad_s(idir3, ispin)%r_coef(ir, ia) - &
473 jrho1_atom%jrho_vec_rad_h(idir3, ispin)%r_coef(ir, ia)* &
474 nablavks_atom%nablavks_vec_rad_s(idir2, ispin)%r_coef(ir, ia) &
475 )*grid_atom%wr(ir)*grid_atom%wa(ia)
501 CALL para_env%sum(temp_so_gapw)
502 temp_so_gapw(:, :) = -1.0_dp*epr_env%g_so_factor_gapw*temp_so_gapw(:, :)
504 IF (output_unit > 0)
THEN
506 WRITE (unit=output_unit, fmt=
"(T2,A,T18,I1,I1,T56,E24.16)") &
507 "epr|SOX:gapw", ib, idir1, temp_so_gapw(ib, idir1)
511 g_so(ib, :) = g_so(ib, :) + temp_so_gapw(ib, :)
515 CALL auxbas_pw_pool%give_back_pw(vks_pw_spline(idir1, ispin))
518 DEALLOCATE (vks_pw_spline)
522 g_total(ib, :) = g_total(ib, :) + g_so(ib, :)
525 "PRINT%PROGRAM_RUN_INFO")
544 INTEGER,
INTENT(IN) :: ib
546 INTEGER :: aint_precond, ia, iat, iatom, idir1, &
547 ikind, ir, iso, ispin, max_iter, &
548 natom, nkind, nspins, output_unit, &
550 INTEGER,
DIMENSION(2) :: bo
551 INTEGER,
DIMENSION(:),
POINTER :: atom_list
552 LOGICAL :: gapw, paw_atom, soo_rho_hard, success
553 REAL(
dp) :: bind_ra_idir1, chi_tensor(3, 3, 2), &
554 eps_r, eps_x, hard_radius, rho_spin, &
556 REAL(
dp),
DIMENSION(3, 3) :: temp_soo_gapw
557 REAL(
dp),
DIMENSION(:, :),
POINTER :: g_soo, g_total
558 REAL(kind=
dp),
DIMENSION(3) :: ra
568 TYPE(
pw_r3d_rs_type),
ALLOCATABLE,
DIMENSION(:, :) :: bind_pw_spline
571 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
574 TYPE(
rho_atom_coeff),
DIMENSION(:),
POINTER :: rho_rad_h, rho_rad_s
579 NULLIFY (atomic_kind_set, qs_kind_set, atom_list, bind_set, dft_control, &
580 grid_atom, g_section, g_soo, g_total, harmonics, interp_section, &
581 logger, lr_section, para_env, particle_set, rho, rho_atom, &
582 rho_atom_set, rho_r, brho1_r)
588 extension=
".linresLog")
591 "EPR%PRINT%G_TENSOR")
595 CALL get_qs_env(qs_env=qs_env, atomic_kind_set=atomic_kind_set, qs_kind_set=qs_kind_set, &
596 dft_control=dft_control, para_env=para_env, particle_set=particle_set, &
597 pw_env=pw_env, rho=rho, rho_atom_set=rho_atom_set)
599 CALL get_epr_env(epr_env=epr_env, bind_set=bind_set, &
600 g_soo=g_soo, g_total=g_total)
603 chi_tensor=chi_tensor)
606 gapw = dft_control%qs_control%gapw
607 nkind =
SIZE(qs_kind_set, 1)
608 nspins = dft_control%nspins
611 temp_soo_soft = 0.0_dp
613 CALL qs_rho_get(bind_set(idir1, ib)%rho, rho_r=brho1_r)
614 temp_soo_soft = temp_soo_soft + (-1.0_dp)**(1 + ispin)* &
617 temp_soo_soft = 1.0_dp*epr_env%g_soo_factor*temp_soo_soft
618 IF (output_unit > 0)
THEN
619 WRITE (unit=output_unit, fmt=
"(T2,A,T18,i1,i1,T56,E24.16)") &
620 "epr|SOO:soft", ib, idir1, temp_soo_soft
622 g_soo(ib, idir1) = temp_soo_soft
626 temp_soo_soft = 1.0_dp*epr_env%g_soo_chicorr_factor*chi_tensor(idir1, ib, 2)* &
627 (real(dft_control%multiplicity, kind=
dp) - 1.0_dp)
628 IF (output_unit > 0)
THEN
629 WRITE (unit=output_unit, fmt=
"(T2,A,T18,i1,i1,T56,E24.16)") &
630 "epr|SOO:soft_g0", ib, idir1, temp_soo_soft
632 g_soo(ib, idir1) = g_soo(ib, idir1) + temp_soo_soft
635 IF (gapw .AND. soo_rho_hard)
THEN
637 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool)
638 ALLOCATE (bind_pw_spline(3, 3))
650 CALL auxbas_pw_pool%create_pw(bind_pw_spline(idir1, ib))
653 pool=auxbas_pw_pool,
pbc=.true., transpose=.false.)
654 CALL qs_rho_get(bind_set(idir1, ib)%rho, rho_r=brho1_r)
656 bind_pw_spline(idir1, ib))
659 coeffs=bind_pw_spline(idir1, ib), linop=
spl3_pbc, &
661 eps_r=eps_r, eps_x=eps_x, max_iter=max_iter)
666 temp_soo_gapw = 0.0_dp
669 NULLIFY (atom_list, grid_atom, harmonics)
670 CALL get_atomic_kind(atomic_kind_set(ikind), atom_list=atom_list, natom=natom)
672 hard_radius=hard_radius, &
673 grid_atom=grid_atom, &
674 harmonics=harmonics, &
677 IF (.NOT. paw_atom) cycle
681 bo =
get_limit(natom, para_env%num_pe, para_env%mepos)
685 iatom = atom_list(iat)
686 rho_atom => rho_atom_set(iatom)
687 NULLIFY (rho_rad_h, rho_rad_s)
688 CALL get_rho_atom(rho_atom=rho_atom, rho_rad_h=rho_rad_h, &
692 DO ir = 1, grid_atom%nr
694 IF (grid_atom%rad(ir) >= hard_radius) cycle
696 DO ia = 1, grid_atom%ng_sphere
698 ra = particle_set(iatom)%r
699 ra(:) = ra(:) + grid_atom%rad(ir)*harmonics%a(:, ia)
701 bind_pw_spline(idir1, ib))
703 IF (iat .LT. bo(1) .OR. iat .GT. bo(2)) cycle
708 DO iso = 1, harmonics%max_iso_not0
709 rho_spin = rho_spin + &
710 (rho_rad_h(ispin)%r_coef(ir, iso) - &
711 rho_rad_s(ispin)%r_coef(ir, iso))* &
712 harmonics%slm(ia, iso)
715 temp_soo_gapw(ib, idir1) = temp_soo_gapw(ib, idir1) + &
716 (-1.0_dp)**(1 + ispin)*( &
717 bind_ra_idir1*rho_spin &
718 )*grid_atom%wr(ir)*grid_atom%wa(ia)
727 CALL para_env%sum(temp_soo_gapw)
728 temp_soo_gapw(:, :) = 1.0_dp*epr_env%g_soo_factor*temp_soo_gapw(:, :)
730 IF (output_unit > 0)
THEN
732 WRITE (unit=output_unit, fmt=
"(T2,A,T18,I1,I1,T56,E24.16)") &
733 "epr|SOO:gapw", ib, idir1, temp_soo_gapw(ib, idir1)
737 g_soo(ib, :) = g_soo(ib, :) + temp_soo_gapw(ib, :)
740 CALL auxbas_pw_pool%give_back_pw(bind_pw_spline(idir1, ib))
742 DEALLOCATE (bind_pw_spline)
746 g_total(ib, :) = g_total(ib, :) + g_soo(ib, :)
749 "PRINT%PROGRAM_RUN_INFO")
765 INTEGER,
INTENT(IN) :: ib
767 CHARACTER(LEN=*),
PARAMETER :: routinen =
'epr_ind_magnetic_field'
769 INTEGER :: handle, idir, idir2, idir3, iib, iiib, &
772 REAL(
dp) :: scale_fac
777 TYPE(
pw_c1d_gs_type),
ALLOCATABLE,
DIMENSION(:, :) :: shift_pw_gspace
786 CALL timeset(routinen, handle)
788 NULLIFY (cell, dft_control, pw_env, auxbas_rs_desc, auxbas_pw_pool, &
789 pw_pools, particle_set, jrho1_g, epr_rho_r)
791 CALL get_qs_env(qs_env=qs_env, cell=cell, dft_control=dft_control, &
792 particle_set=particle_set)
794 gapw = dft_control%qs_control%gapw
795 natom =
SIZE(particle_set, 1)
796 nspins = dft_control%nspins
803 CALL pw_env_get(pw_env, auxbas_rs_desc=auxbas_rs_desc, &
804 auxbas_pw_pool=auxbas_pw_pool, pw_pools=pw_pools)
808 ALLOCATE (shift_pw_gspace(3, nspins))
811 CALL auxbas_pw_pool%create_pw(shift_pw_gspace(idir, ispin))
812 CALL pw_zero(shift_pw_gspace(idir, ispin))
815 CALL auxbas_pw_pool%create_pw(shift_pw_rspace)
817 CALL auxbas_pw_pool%create_pw(pw_gspace_work)
826 CALL pw_zero(shift_pw_gspace(idir3, ispin))
829 CALL qs_rho_get(current_env%jrho1_set(idir)%rho, rho_g=jrho1_g)
833 IF (idir /= idir2)
THEN
836 pw_gspace_work, idir2, 0.0_dp)
840 scale_fac =
fac_vecp(idir3, idir2, idir)
841 CALL pw_scale(pw_gspace_work, scale_fac)
842 CALL pw_axpy(pw_gspace_work, shift_pw_gspace(idir3, ispin))
850 IF (dft_control%nspins == 2)
THEN
852 CALL qs_rho_get(epr_env%bind_set(idir, ib)%rho, rho_r=epr_rho_r)
853 CALL pw_transfer(shift_pw_gspace(idir, 2), epr_rho_r(1))
858 CALL auxbas_pw_pool%give_back_pw(pw_gspace_work)
859 DO ispin = 1, dft_control%nspins
861 CALL auxbas_pw_pool%give_back_pw(shift_pw_gspace(idir, ispin))
864 DEALLOCATE (shift_pw_gspace)
865 CALL auxbas_pw_pool%give_back_pw(shift_pw_rspace)
868 CALL timestop(handle)
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
Handles all functions related to the CELL.
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
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
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
integer, parameter, public cp_p_file
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Collection of simple mathematical functions and subroutines.
subroutine, public diamat_all(a, eigval, dac)
Diagonalize the symmetric n by n matrix a using the LAPACK library. Only the upper triangle of matrix...
Interface to the message passing library MPI.
Define the data structure for the particle information.
computes preconditioners, and implements methods to apply them currently used in qs_ot
container for various plainwaves related things
subroutine, public pw_env_get(pw_env, pw_pools, cube_info, gridlevel_info, auxbas_pw_pool, auxbas_grid, auxbas_rs_desc, auxbas_rs_grid, rs_descs, rs_grids, xc_pw_pool, vdw_pw_pool, poisson_env, interp_section)
returns the various attributes of the pw env
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
different utils that are useful to manipulate splines on the regular grid of a pw
subroutine, public pw_spline_precond_release(preconditioner)
releases the preconditioner
subroutine, public pw_spline_precond_create(preconditioner, precond_kind, pool, pbc, transpose)
...
subroutine, public pw_spline_do_precond(preconditioner, in_v, out_v)
applies the preconditioner to the system of equations to find the coefficients of the spline
subroutine, public pw_spline_precond_set_kind(preconditioner, precond_kind, pbc, transpose)
switches the types of precoditioner to use
real(kind=dp) function, public eval_interp_spl3_pbc(vec, pw)
Evaluates the PBC interpolated Spline (pw) function on the generic input vector (vec)
logical function, public find_coeffs(values, coeffs, linop, preconditioner, pool, eps_r, eps_x, max_iter, sumtype)
solves iteratively (CG) a systmes of linear equations linOp(coeffs)=values (for example those needed ...
subroutine, public spl3_pbc(pw_in, pw_out)
...
Calculation of the energies concerning the core charge distribution.
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 epr_g_soo(epr_env, current_env, qs_env, ib)
Calculates g_soo (soft part only for now)
subroutine, public epr_g_so(epr_env, current_env, qs_env, ib)
Calculates g_so.
subroutine, public epr_g_zke(epr_env, qs_env)
Calculate zke part of the g tensor.
subroutine, public epr_ind_magnetic_field(epr_env, current_env, qs_env, ib)
...
subroutine, public epr_g_print(epr_env, qs_env)
Prints the g tensor.
given the response wavefunctions obtained by the application of the (rxp), p, and ((dk-dl)xp) operato...
subroutine, public mult_g_ov_g2_grid(pw_pool, rho_gspace, funcg_times_rho, idir, my_chi)
Given the current density on the PW grid in reciprcal space (obtained by FFT), calculate the integral...
Calculate the operators p rxp and D needed in the optimization of the different contribution of the f...
subroutine, public set_vecp(i1, i2, i3)
...
real(dp) function, public fac_vecp(a, b, c)
...
subroutine, public set_vecp_rev(i1, i2, i3)
...
Type definitiona for linear response calculations.
subroutine, public get_current_env(current_env, simple_done, simple_converged, full_done, nao, nstates, gauge, list_cubes, statetrueindex, gauge_name, basisfun_center, nbr_center, center_list, centers_set, psi1_p, psi1_rxp, psi1_d, p_psi0, rxp_psi0, jrho1_atom_set, jrho1_set, chi_tensor, chi_tensor_loc, gauge_atom_radius, rs_gauge, use_old_gauge_atom, chi_pbc, psi0_order)
...
subroutine, public get_epr_env(epr_env, g_total, g_so, g_soo, nablavks_set, nablavks_atom_set, bind_set, bind_atom_set)
...
subroutine, public get_rho_atom(rho_atom, cpc_h, cpc_s, rho_rad_h, rho_rad_s, drho_rad_h, drho_rad_s, vrho_rad_h, vrho_rad_s, rho_rad_h_d, rho_rad_s_d, ga_vlocal_gb_h, ga_vlocal_gb_s, int_scr_h, int_scr_s)
...
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_get(rho_struct, rho_ao, rho_ao_im, rho_ao_kp, rho_ao_im_kp, rho_r, drho_r, rho_g, drho_g, tau_r, tau_g, rho_r_valid, drho_r_valid, rho_g_valid, drho_g_valid, tau_r_valid, tau_g_valid, tot_rho_r, tot_rho_g, rho_r_sccs, soft_valid, complex_rho_ao)
returns info about the density described by this object. If some representation is not available an e...
All kind of helpful little routines.
pure integer function, dimension(2), public get_limit(m, n, me)
divide m entries into n parts, return size of part me
Provides all information about an atomic kind.
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
contained for different pw related things
to create arrays of pools
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
stores information for the preconditioner used to calculate the coeffs of splines
Provides all information about a quickstep kind.
keeps the density in various representations, keeping track of which ones are valid.