68#include "./base/base_uses.f90"
74 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_tddfpt2_operators'
76 LOGICAL,
PARAMETER,
PRIVATE :: debug_this_module = .false.
78 INTEGER,
PARAMETER,
PRIVATE :: nderivs = 3
79 INTEGER,
PARAMETER,
PRIVATE :: maxspins = 2
105 TYPE(
cp_fm_type),
DIMENSION(:, :),
INTENT(INOUT) :: aop_evects
106 TYPE(
cp_fm_type),
DIMENSION(:, :),
INTENT(IN) :: evects, s_evects
109 TYPE(
dbcsr_p_type),
DIMENSION(:),
INTENT(in) :: matrix_ks
111 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_apply_energy_diff'
113 INTEGER :: handle, ispin, ivect, nactive, nao, &
118 CALL timeset(routinen, handle)
120 nspins =
SIZE(evects, 1)
121 nvects =
SIZE(evects, 2)
124 CALL cp_fm_get_info(matrix=evects(ispin, 1), matrix_struct=matrix_struct, &
125 nrow_global=nao, ncol_global=nactive)
130 aop_evects(ispin, ivect), ncol=nactive, &
131 alpha=1.0_dp, beta=1.0_dp)
133 IF (
ASSOCIATED(gs_mos(ispin)%evals_occ_matrix))
THEN
135 CALL parallel_gemm(
'N',
'N', nao, nactive, nactive, 1.0_dp, &
136 s_evects(ispin, ivect), gs_mos(ispin)%evals_occ_matrix, &
149 CALL timestop(handle)
176 qs_env, sub_env, gapw, work_v_gspace, work_v_rspace, tddfpt_mgrid)
183 LOGICAL,
INTENT(IN) :: gapw
186 LOGICAL,
INTENT(IN) :: tddfpt_mgrid
188 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_apply_coulomb'
190 INTEGER :: handle, ispin, nspins
191 REAL(kind=
dp) :: alpha, pair_energy
196 POINTER :: my_rs_descs
199 CALL timeset(routinen, handle)
201 nspins =
SIZE(a_ia_rspace)
202 pw_env => sub_env%pw_env
203 IF (tddfpt_mgrid)
THEN
204 CALL pw_env_get(pw_env, poisson_env=poisson_env, rs_grids=my_rs_grids, &
205 rs_descs=my_rs_descs, pw_pools=my_pools)
207 CALL pw_env_get(pw_env, poisson_env=poisson_env)
219 cpassert(
ASSOCIATED(local_rho_set))
220 CALL pw_axpy(local_rho_set%rho0_mpole%rho0_s_gs, rho_ia_g)
221 IF (
ASSOCIATED(local_rho_set%rho0_mpole%rhoz_cneo_s_gs))
THEN
222 CALL pw_axpy(local_rho_set%rho0_mpole%rhoz_cneo_s_gs, rho_ia_g)
233 CALL pw_axpy(work_v_rspace, a_ia_rspace(ispin), alpha)
238 hartree_local%ecoul_1c, &
240 sub_env%para_env, tddft=.true., core_2nd=.true.)
241 CALL pw_scale(work_v_rspace, work_v_rspace%pw_grid%dvol)
242 IF (tddfpt_mgrid)
THEN
244 calculate_forces=.false., &
245 local_rho_set=local_rho_set, my_pools=my_pools, &
246 my_rs_descs=my_rs_descs)
249 calculate_forces=.false., &
250 local_rho_set=local_rho_set)
254 CALL timestop(handle)
272 pw_env, work_v_xc, work_v_xc_tau)
277 LOGICAL,
INTENT(in) :: is_rks_triplets
279 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: work_v_xc, work_v_xc_tau
281 INTEGER :: ispin, nspins
283 nspins =
SIZE(a_ia_rspace)
285 IF (kernel_env%deriv2_analytic)
THEN
286 CALL tddfpt_apply_xc_analytic(kernel_env, rho_ia_struct, is_rks_triplets, nspins, &
287 pw_env, work_v_xc, work_v_xc_tau)
289 CALL tddfpt_apply_xc_fd(kernel_env, rho_ia_struct, is_rks_triplets, nspins, &
290 pw_env, work_v_xc, work_v_xc_tau)
295 CALL pw_axpy(work_v_xc(ispin), a_ia_rspace(ispin), kernel_env%alpha)
313 LOGICAL,
INTENT(in) :: is_rks_triplets
316 REAL(kind=
dp) :: alpha
319 nspins =
SIZE(a_ia_rspace)
325 IF (nspins == 2)
THEN
326 CALL pw_multiply(a_ia_rspace(1), fxc_rspace(1), rho1_r(1), alpha)
327 CALL pw_multiply(a_ia_rspace(1), fxc_rspace(2), rho1_r(2), alpha)
328 CALL pw_multiply(a_ia_rspace(2), fxc_rspace(3), rho1_r(2), alpha)
329 CALL pw_multiply(a_ia_rspace(2), fxc_rspace(2), rho1_r(1), alpha)
330 ELSE IF (is_rks_triplets)
THEN
331 CALL pw_multiply(a_ia_rspace(1), fxc_rspace(1), rho1_r(1), alpha)
332 CALL pw_multiply(a_ia_rspace(1), fxc_rspace(2), rho1_r(1), -alpha)
334 CALL pw_multiply(a_ia_rspace(1), fxc_rspace(1), rho1_r(1), alpha)
335 CALL pw_multiply(a_ia_rspace(1), fxc_rspace(2), rho1_r(1), alpha)
360 SUBROUTINE tddfpt_apply_xc_analytic(kernel_env, rho_ia_struct, is_rks_triplets, nspins, &
361 pw_env, work_v_xc, work_v_xc_tau)
364 LOGICAL,
INTENT(in) :: is_rks_triplets
365 INTEGER,
INTENT(in) :: nspins
367 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: work_v_xc, work_v_xc_tau
369 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_apply_xc_analytic'
371 INTEGER :: handle, ispin
372 TYPE(
pw_c1d_gs_type),
DIMENSION(:),
POINTER :: rho_ia_g, rho_ia_g2
374 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: rho_ia_r, rho_ia_r2, tau_ia_r, tau_ia_r2
376 CALL timeset(routinen, handle)
378 CALL qs_rho_get(rho_ia_struct, rho_g=rho_ia_g, rho_r=rho_ia_r, tau_r=tau_ia_r)
379 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool)
381 IF (debug_this_module)
THEN
382 cpassert(
SIZE(rho_ia_g) == nspins)
383 cpassert(
SIZE(rho_ia_r) == nspins)
384 cpassert((.NOT.
ASSOCIATED(tau_ia_r)) .OR.
SIZE(tau_ia_r) == nspins)
385 cpassert((.NOT. is_rks_triplets) .OR. nspins == 1)
389 IF (is_rks_triplets)
THEN
390 ALLOCATE (rho_ia_r2(2))
391 ALLOCATE (rho_ia_g2(2))
392 rho_ia_r2(1) = rho_ia_r(1)
393 rho_ia_r2(2) = rho_ia_r(1)
394 rho_ia_g2(1) = rho_ia_g(1)
395 rho_ia_g2(2) = rho_ia_g(1)
397 IF (
ASSOCIATED(tau_ia_r))
THEN
398 ALLOCATE (tau_ia_r2(2))
399 tau_ia_r2(1) = tau_ia_r(1)
400 tau_ia_r2(2) = tau_ia_r(1)
403 rho_ia_r2 => rho_ia_r
404 rho_ia_g2 => rho_ia_g
406 tau_ia_r2 => tau_ia_r
411 IF (
ASSOCIATED(work_v_xc_tau))
CALL pw_zero(work_v_xc_tau(ispin))
414 CALL xc_rho_set_update(rho_set=kernel_env%xc_rho1_set, rho_r=rho_ia_r2, rho_g=rho_ia_g2, tau=tau_ia_r2, &
415 needs=kernel_env%xc_rho1_cflags, xc_deriv_method_id=kernel_env%deriv_method_id, &
416 xc_rho_smooth_id=kernel_env%rho_smooth_id, pw_pool=auxbas_pw_pool)
419 rho_set=kernel_env%xc_rho_set, &
420 rho1_set=kernel_env%xc_rho1_set, pw_pool=auxbas_pw_pool, &
421 xc_section=kernel_env%xc_section, gapw=.false., tddfpt_fac=kernel_env%beta)
423 IF (is_rks_triplets)
THEN
424 DEALLOCATE (rho_ia_r2)
425 DEALLOCATE (rho_ia_g2)
426 IF (
ASSOCIATED(tau_ia_r2))
DEALLOCATE (tau_ia_r2)
429 CALL timestop(handle)
431 END SUBROUTINE tddfpt_apply_xc_analytic
445 SUBROUTINE tddfpt_apply_xc_fd(kernel_env, rho_ia_struct, is_rks_triplets, nspins, &
446 pw_env, work_v_xc, work_v_xc_tau)
449 LOGICAL,
INTENT(in) :: is_rks_triplets
450 INTEGER,
INTENT(in) :: nspins
452 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: work_v_xc, work_v_xc_tau
454 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_apply_xc_fd'
456 INTEGER :: handle, ispin
457 LOGICAL :: lsd, singlet, triplet
463 CALL timeset(routinen, handle)
465 CALL qs_rho_get(rho_ia_struct, rho_r=rho1_r, rho_g=rho1_g, tau_r=tau1_r)
466 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool)
470 rho_set => kernel_env%xc_rho_set
475 IF (nspins == 1 .AND. .NOT. is_rks_triplets)
THEN
477 ELSE IF (nspins == 1 .AND. is_rks_triplets)
THEN
479 ELSE IF (nspins == 2)
THEN
482 cpabort(
"illegal options")
485 IF (
ASSOCIATED(tau1_r))
THEN
487 CALL pw_zero(work_v_xc_tau(ispin))
492 auxbas_pw_pool, kernel_env%xc_section, &
495 CALL timestop(handle)
497 END SUBROUTINE tddfpt_apply_xc_fd
520 work_rho_ia_ao_symm, work_hmat_symm, work_rho_ia_ao_asymm, &
521 work_hmat_asymm, wfm_rho_orb)
522 TYPE(
cp_fm_type),
DIMENSION(:, :),
INTENT(INOUT) :: aop_evects
523 TYPE(
cp_fm_type),
DIMENSION(:, :),
INTENT(IN) :: evects
526 LOGICAL,
INTENT(in) :: do_admm
528 TYPE(
dbcsr_p_type),
DIMENSION(:),
INTENT(INOUT) :: work_rho_ia_ao_symm
530 TARGET :: work_hmat_symm
531 TYPE(
dbcsr_p_type),
DIMENSION(:),
INTENT(INOUT) :: work_rho_ia_ao_asymm
533 TARGET :: work_hmat_asymm
536 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_apply_hfx'
538 INTEGER :: handle, ispin, ivect, nao, nao_aux, &
540 INTEGER,
DIMENSION(maxspins) :: nactive
542 REAL(kind=
dp) :: alpha
546 CALL timeset(routinen, handle)
554 nspins =
SIZE(evects, 1)
555 nvects =
SIZE(evects, 2)
584 CALL parallel_gemm(
'N',
'T', nao, nao, nactive(ispin), 0.5_dp, evects(ispin, ivect), &
585 gs_mos(ispin)%mos_occ, 0.0_dp, wfm_rho_orb)
586 CALL parallel_gemm(
'N',
'T', nao, nao, nactive(ispin), 0.5_dp, gs_mos(ispin)%mos_occ, &
587 evects(ispin, ivect), 1.0_dp, wfm_rho_orb)
589 CALL dbcsr_set(work_hmat_symm(ispin)%matrix, 0.0_dp)
591 CALL parallel_gemm(
'N',
'N', nao_aux, nao, nao, 1.0_dp, admm_env%A, &
592 wfm_rho_orb, 0.0_dp, admm_env%work_aux_orb)
593 CALL parallel_gemm(
'N',
'T', nao_aux, nao_aux, nao, 1.0_dp, admm_env%work_aux_orb, admm_env%A, &
594 0.0_dp, admm_env%work_aux_aux)
595 CALL copy_fm_to_dbcsr(admm_env%work_aux_aux, work_rho_ia_ao_symm(ispin)%matrix, keep_sparsity=.true.)
597 CALL copy_fm_to_dbcsr(wfm_rho_orb, work_rho_ia_ao_symm(ispin)%matrix, keep_sparsity=.true.)
606 ncol=nao, alpha=1.0_dp, beta=0.0_dp)
608 CALL parallel_gemm(
'T',
'N', nao, nao, nao_aux, 1.0_dp, admm_env%A, &
609 admm_env%work_aux_orb, 0.0_dp, wfm_rho_orb)
611 CALL parallel_gemm(
'N',
'N', nao, nactive(ispin), nao, alpha, wfm_rho_orb, &
612 gs_mos(ispin)%mos_occ, 1.0_dp, aop_evects(ispin, ivect))
617 aop_evects(ispin, ivect), ncol=nactive(ispin), &
618 alpha=alpha, beta=1.0_dp)
626 CALL parallel_gemm(
'N',
'T', nao, nao, nactive(ispin), 0.5_dp, evects(ispin, ivect), &
627 gs_mos(ispin)%mos_occ, 0.0_dp, wfm_rho_orb)
628 CALL parallel_gemm(
'N',
'T', nao, nao, nactive(ispin), -0.5_dp, gs_mos(ispin)%mos_occ, &
629 evects(ispin, ivect), 1.0_dp, wfm_rho_orb)
631 CALL dbcsr_set(work_hmat_asymm(ispin)%matrix, 0.0_dp)
633 CALL parallel_gemm(
'N',
'N', nao_aux, nao, nao, 1.0_dp, admm_env%A, &
634 wfm_rho_orb, 0.0_dp, admm_env%work_aux_orb)
635 CALL parallel_gemm(
'N',
'T', nao_aux, nao_aux, nao, 1.0_dp, admm_env%work_aux_orb, admm_env%A, &
636 0.0_dp, admm_env%work_aux_aux)
637 CALL copy_fm_to_dbcsr(admm_env%work_aux_aux, work_rho_ia_ao_asymm(ispin)%matrix, keep_sparsity=.true.)
639 CALL copy_fm_to_dbcsr(wfm_rho_orb, work_rho_ia_ao_asymm(ispin)%matrix, keep_sparsity=.true.)
648 ncol=nao, alpha=1.0_dp, beta=0.0_dp)
650 CALL parallel_gemm(
'T',
'N', nao, nao, nao_aux, 1.0_dp, admm_env%A, &
651 admm_env%work_aux_orb, 0.0_dp, wfm_rho_orb)
653 CALL parallel_gemm(
'N',
'N', nao, nactive(ispin), nao, alpha, wfm_rho_orb, &
654 gs_mos(ispin)%mos_occ, 1.0_dp, aop_evects(ispin, ivect))
659 aop_evects(ispin, ivect), ncol=nactive(ispin), &
660 alpha=alpha, beta=1.0_dp)
666 CALL timestop(handle)
687 hfx_section, x_data, symmetry, recalc_integrals, &
688 work_rho_ia_ao, work_hmat, wfm_rho_orb)
689 TYPE(
cp_fm_type),
DIMENSION(:, :),
INTENT(in) :: aop_evects, evects
695 TYPE(
hfx_type),
DIMENSION(:, :),
POINTER :: x_data
696 INTEGER,
INTENT(IN) :: symmetry
697 LOGICAL,
INTENT(IN) :: recalc_integrals
698 TYPE(
dbcsr_p_type),
DIMENSION(:),
INTENT(INOUT) :: work_rho_ia_ao
703 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_apply_hfxsr_kernel'
705 INTEGER :: handle, ispin, ivect, nao, nao_aux, &
707 INTEGER,
DIMENSION(maxspins) :: nactive
709 REAL(kind=
dp) :: alpha
711 CALL timeset(routinen, handle)
713 nspins =
SIZE(evects, 1)
714 nvects =
SIZE(evects, 2)
717 IF (nspins > 1) alpha = 1.0_dp
725 reint = recalc_integrals
729 CALL parallel_gemm(
'N',
'T', nao, nao, nactive(ispin), 0.5_dp, evects(ispin, ivect), &
730 gs_mos(ispin)%mos_occ, 0.0_dp, wfm_rho_orb)
731 CALL parallel_gemm(
'N',
'T', nao, nao, nactive(ispin), 0.5_dp*symmetry, gs_mos(ispin)%mos_occ, &
732 evects(ispin, ivect), 1.0_dp, wfm_rho_orb)
733 CALL dbcsr_set(work_hmat(ispin)%matrix, 0.0_dp)
734 CALL parallel_gemm(
'N',
'N', nao_aux, nao, nao, 1.0_dp, admm_env%A, &
735 wfm_rho_orb, 0.0_dp, admm_env%work_aux_orb)
736 CALL parallel_gemm(
'N',
'T', nao_aux, nao_aux, nao, 1.0_dp, admm_env%work_aux_orb, admm_env%A, &
737 0.0_dp, admm_env%work_aux_aux)
738 CALL copy_fm_to_dbcsr(admm_env%work_aux_aux, work_rho_ia_ao(ispin)%matrix, keep_sparsity=.true.)
741 CALL tddft_hfx_matrix(work_hmat, work_rho_ia_ao, qs_env, .false., reint, hfx_section, x_data)
746 ncol=nao, alpha=1.0_dp, beta=0.0_dp)
747 CALL parallel_gemm(
'T',
'N', nao, nao, nao_aux, 1.0_dp, admm_env%A, &
748 admm_env%work_aux_orb, 0.0_dp, wfm_rho_orb)
749 CALL parallel_gemm(
'N',
'N', nao, nactive(ispin), nao, alpha, wfm_rho_orb, &
750 gs_mos(ispin)%mos_occ, 1.0_dp, aop_evects(ispin, ivect))
754 CALL timestop(handle)
774 REAL(kind=
dp),
INTENT(IN) :: rcut, hfx_scale
776 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(IN) :: x
777 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(INOUT) :: res
779 CHARACTER(len=*),
PARAMETER :: routinen =
'tddfpt_apply_hfxlr_kernel'
781 INTEGER :: handle, iatom, ispin, jatom, natom, &
783 INTEGER,
DIMENSION(2) :: nactive
784 REAL(kind=
dp) :: dr, eps_filter, fcut, gabr
785 REAL(kind=
dp),
DIMENSION(3) :: rij
786 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: pblock
790 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: xtransformed
798 CALL timeset(routinen, handle)
801 eps_filter = 1.e-08_dp
808 para_env => sub_env%para_env
810 CALL get_qs_env(qs_env, natom=natom, cell=cell, particle_set=particle_set)
814 ALLOCATE (xtransformed(nspins))
817 ct => work%ctransformed(ispin)
819 CALL cp_fm_create(matrix=xtransformed(ispin), matrix_struct=fmstruct, name=
"XTRANSFORMED")
824 ct => work%ctransformed(ispin)
828 tempmat => work%shalf
829 CALL dbcsr_create(pdens, template=tempmat, matrix_type=dbcsr_type_no_symmetry)
831 ct => work%ctransformed(ispin)
834 1.0_dp, keep_sparsity=.false.)
841 rij = particle_set(iatom)%r - particle_set(jatom)%r
843 dr = sqrt(sum(rij(:)**2))
846 gabr = 2._dp*gabr/sqrt(3.1415926_dp)
848 gabr = erf(gabr*dr)/dr
849 fcut = exp(dr - 4._dp*rcut)
850 fcut = fcut/(fcut + 1._dp)
852 pblock = hfx_scale*gabr*pblock
868 CALL timestop(handle)
Types and set/get functions for auxiliary density matrix methods.
Handles all functions related to the CELL.
subroutine, public dbcsr_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset)
...
logical function, public dbcsr_iterator_blocks_left(iterator)
...
subroutine, public dbcsr_iterator_stop(iterator)
...
subroutine, public dbcsr_filter(matrix, eps)
...
subroutine, public dbcsr_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_sm_fm_multiply(matrix, fm_in, fm_out, ncol, alpha, beta)
multiply a dbcsr with a fm matrix
subroutine, public cp_dbcsr_plus_fm_fm_t(sparse_matrix, matrix_v, matrix_g, ncol, alpha, keep_sparsity, symmetry_mode)
performs the multiplication sparse_matrix+dense_mat*dens_mat^T if matrix_g is not explicitly given,...
subroutine, public copy_fm_to_dbcsr(fm, matrix, keep_sparsity)
Copy a BLACS matrix to a dbcsr matrix.
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_column_scale(matrixa, scaling)
scales column i of matrix a with scaling(i)
subroutine, public cp_fm_scale_and_add(alpha, matrix_a, beta, matrix_b)
calc A <- alpha*A + beta*B optimized for alpha == 1.0 (just add beta*B) and beta == 0....
represent the structure of a full matrix
represent a full matrix distributed on many processors
subroutine, public cp_fm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, nrow_locals, ncol_locals, matrix_struct, para_env)
returns all kind of information about the full matrix
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
subroutine, public vh_1c_gg_integrals(qs_env, energy_hartree_1c, ecoul_1c, local_rho_set, para_env, tddft, local_rho_set_2nd, core_2nd)
Calculates one center GAPW Hartree energies and matrix elements Hartree potentials are input Takes po...
Utilities for hfx and admm methods.
subroutine, public tddft_hfx_matrix(matrix_ks, rho_ao, qs_env, update_energy, recalc_integrals, external_hfx_sections, external_x_data, external_para_env)
Add the hfx contributions to the Hamiltonian.
Types and set/get functions for HFX.
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
basic linear algebra operations for full matrixes
Define the data structure for the particle information.
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
functions related to the poisson solver on regular grids
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
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, sab_cneo, 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, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_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, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
subroutine, public integrate_vhg0_rspace(qs_env, v_rspace, para_env, calculate_forces, local_rho_set, local_rho_set_2nd, atener, kforce, my_pools, my_rs_descs)
...
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...
subroutine, public tddfpt_apply_hfx(aop_evects, evects, gs_mos, do_admm, qs_env, work_rho_ia_ao_symm, work_hmat_symm, work_rho_ia_ao_asymm, work_hmat_asymm, wfm_rho_orb)
Update action of TDDFPT operator on trial vectors by adding exact-exchange term.
subroutine, public tddfpt_apply_coulomb(a_ia_rspace, rho_ia_g, local_rho_set, hartree_local, qs_env, sub_env, gapw, work_v_gspace, work_v_rspace, tddfpt_mgrid)
Update v_rspace by adding coulomb term.
subroutine, public tddfpt_apply_hfxlr_kernel(qs_env, sub_env, rcut, hfx_scale, work, x, res)
...Calculate the HFXLR kernel contribution by contracting the Lowdin MO coefficients – transition cha...
subroutine, public tddfpt_apply_energy_diff(aop_evects, evects, s_evects, gs_mos, matrix_ks)
Apply orbital energy difference term: Aop_evects(spin,state) += KS(spin) * evects(spin,...
subroutine, public tddfpt_apply_xc(a_ia_rspace, kernel_env, rho_ia_struct, is_rks_triplets, pw_env, work_v_xc, work_v_xc_tau)
Driver routine for applying fxc (analyic vs. finite difference for testing.
subroutine, public tddfpt_apply_hfxsr_kernel(aop_evects, evects, gs_mos, qs_env, admm_env, hfx_section, x_data, symmetry, recalc_integrals, work_rho_ia_ao, work_hmat, wfm_rho_orb)
Update action of TDDFPT operator on trial vectors by adding exact-exchange term.
subroutine, public tddfpt_apply_xc_potential(a_ia_rspace, fxc_rspace, rho_ia_struct, is_rks_triplets)
Routine for applying fxc potential.
Simplified Tamm Dancoff approach (sTDA).
subroutine, public get_lowdin_x(shalf, xvec, xt)
Calculate Lowdin transformed Davidson trial vector X shalf (dbcsr), xvec, xt (fm) are defined in the ...
subroutine, public xc_rho_set_update(rho_set, rho_r, rho_g, tau, needs, xc_deriv_method_id, xc_rho_smooth_id, pw_pool)
updates the given rho set with the density given by rho_r (and rho_g). The rho set will contain the c...
Exchange and Correlation functional calculations.
subroutine, public xc_calc_2nd_deriv_analytical(v_xc, v_xc_tau, deriv_set, rho_set, rho1_set, pw_pool, xc_section, gapw, vxg, tddfpt_fac, compute_virial, virial_xc)
Calculates the second derivative of E_xc at rho in the direction rho1 (if you see the second derivati...
subroutine, public xc_calc_2nd_deriv_numerical(v_xc, v_tau, rho_set, rho1_r, rho1_g, tau1_r, pw_pool, xc_section, do_triplet, calc_virial, virial_xc, deriv_set)
calculates 2nd derivative numerically
stores some data used in wavefunction fitting
Type defining parameters related to the simulation cell.
keeps the information about the structure of a full matrix
stores some data used in construction of Kohn-Sham matrix
stores all the informations relevant to an mpi environment
contained for different pw related things
environment for the poisson solver
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 ...
Collection of variables required to evaluate adiabatic TDDFPT kernel.
keeps the density in various representations, keeping track of which ones are valid.
Parallel (sub)group environment.
Ground state molecular orbitals.
Set of temporary ("work") matrices.
represent a density, with all the representation and data needed to perform a functional evaluation