96#include "./base/base_uses.f90"
105 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_dcdr_ao'
121 CHARACTER(len=*),
PARAMETER :: routinen =
'apply_op_constant_term'
123 INTEGER :: handle, ispin
124 REAL(kind=
dp) :: energy_hartree
125 TYPE(
cp_fm_type) :: rho_ao_fm, rho_ao_s1, rho_ao_s1_rho_ao, &
127 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: rho1_ao, rho_ao
134 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: rho1_r, rho_r, tau1_r, v_rspace_new, &
136 TYPE(
qs_rho_type),
POINTER :: perturbed_density, rho
159 CALL timeset(routinen, handle)
161 NULLIFY (auxbas_pw_pool, pw_env, rho1_r, rho1_g_pw, &
162 v_xc, poisson_env, input, rho, rho1_g, v_xc_tau)
166 CALL cp_fm_create(rho_ao_s1_rho_ao, dcdr_env%aoao_fm_struct)
169 IF (
PRESENT(overlap1))
THEN
175 DO ispin = 1, dcdr_env%nspins
176 CALL dbcsr_set(dcdr_env%perturbed_dm_correction(ispin)%matrix, 0._dp)
177 CALL dbcsr_set(dcdr_env%matrix_apply_op_constant(ispin)%matrix, 0.0_dp)
179 CALL parallel_gemm(
'N',
'T', dcdr_env%nao, dcdr_env%nao, dcdr_env%nmo(ispin), &
180 1.0_dp, dcdr_env%mo_coeff(ispin), dcdr_env%mo_coeff(ispin), &
183 CALL parallel_gemm(
'N',
'N', dcdr_env%nao, dcdr_env%nao, dcdr_env%nao, &
184 1.0_dp, rho_ao_fm, s1_ao, &
187 CALL parallel_gemm(
'N',
'N', dcdr_env%nao, dcdr_env%nao, dcdr_env%nao, &
188 -1._dp, rho_ao_s1, rho_ao_fm, &
189 0.0_dp, rho_ao_s1_rho_ao)
191 CALL copy_fm_to_dbcsr(rho_ao_s1_rho_ao, dcdr_env%perturbed_dm_correction(ispin)%matrix)
201 NULLIFY (perturbed_density)
202 ALLOCATE (perturbed_density)
207 CALL qs_rho_get(perturbed_density, rho_ao=rho1_ao)
208 DO ispin = 1, dcdr_env%nspins
209 CALL dbcsr_copy(rho1_ao(ispin)%matrix, dcdr_env%perturbed_dm_correction(ispin)%matrix)
219 CALL qs_rho_get(rho, rho_ao=rho_ao, rho_r=rho_r)
221 energy_hartree = 0.0_dp
228 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool, &
229 poisson_env=poisson_env)
235 rho_r, auxbas_pw_pool, &
236 xc_section=xc_section)
240 ALLOCATE (v_rspace_new(dcdr_env%nspins))
241 CALL auxbas_pw_pool%create_pw(v_hartree_gspace)
242 CALL auxbas_pw_pool%create_pw(v_hartree_rspace)
245 CALL auxbas_pw_pool%create_pw(rho1_tot_gspace)
247 CALL qs_rho_get(perturbed_density, rho_g=rho1_g, rho_r=rho1_r, tau_r=tau1_r)
248 CALL pw_copy(rho1_g(1), rho1_tot_gspace)
249 DO ispin = 2, dcdr_env%nspins
250 CALL pw_axpy(rho1_g(ispin), rho1_tot_gspace)
256 CALL pw_transfer(v_hartree_gspace, v_hartree_rspace)
258 CALL auxbas_pw_pool%give_back_pw(rho1_tot_gspace)
262 rho1_r, rho1_g_pw, tau1_r, auxbas_pw_pool, xc_section, gapw=.false.)
264 DO ispin = 1, dcdr_env%nspins
265 v_rspace_new(ispin) = v_xc(ispin)
274 CALL pw_scale(v_hartree_rspace, v_hartree_rspace%pw_grid%dvol)
275 DO ispin = 1, dcdr_env%nspins
276 CALL pw_scale(v_rspace_new(ispin), v_rspace_new(ispin)%pw_grid%dvol)
279 DO ispin = 1, dcdr_env%nspins
280 CALL dbcsr_set(dcdr_env%matrix_apply_op_constant(ispin)%matrix, 0.0_dp)
281 CALL pw_axpy(v_hartree_rspace, v_rspace_new(ispin))
282 IF (dcdr_env%nspins == 1)
THEN
283 CALL pw_scale(v_rspace_new(1), 2.0_dp)
286 CALL integrate_v_rspace(v_rspace=v_rspace_new(ispin), &
287 hmat=dcdr_env%matrix_apply_op_constant(ispin), &
289 calculate_forces=.false.)
292 CALL auxbas_pw_pool%give_back_pw(v_hartree_gspace)
293 CALL auxbas_pw_pool%give_back_pw(v_hartree_rspace)
294 DO ispin = 1, dcdr_env%nspins
295 CALL auxbas_pw_pool%give_back_pw(v_rspace_new(ispin))
297 DEALLOCATE (v_rspace_new)
299 IF (
ASSOCIATED(v_xc_tau))
THEN
300 CALL pw_scale(v_xc_tau(1), 2._dp*v_xc_tau(1)%pw_grid%dvol)
301 CALL integrate_v_rspace(v_rspace=v_xc_tau(1), &
302 hmat=dcdr_env%matrix_apply_op_constant(1), &
304 compute_tau=.true., &
305 calculate_forces=.false.)
307 CALL auxbas_pw_pool%give_back_pw(v_xc_tau(1))
308 DEALLOCATE (v_xc_tau)
312 DEALLOCATE (perturbed_density)
316 CALL timestop(handle)
333 CHARACTER(len=*),
PARAMETER :: routinen =
'd_core_charge_density_dR'
335 INTEGER :: beta, handle
346 CALL timeset(routinen, handle)
350 NULLIFY (pw_env, auxbas_pw_pool, pw_pools, poisson_env, dft_control, &
353 CALL get_qs_env(qs_env=qs_env, pw_env=pw_env, rho=rho, &
354 dft_control=dft_control)
356 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool, poisson_env=poisson_env, &
360 CALL auxbas_pw_pool%create_pw(v_hartree_gspace)
361 CALL auxbas_pw_pool%create_pw(v_hartree_rspace)
363 CALL auxbas_pw_pool%create_pw(drho_g)
372 beta=beta, lambda=dcdr_env%lambda)
374 vhartree=v_hartree_gspace)
375 CALL pw_transfer(v_hartree_gspace, v_hartree_rspace)
376 CALL pw_scale(v_hartree_rspace, v_hartree_rspace%pw_grid%dvol)
379 CALL integrate_v_rspace(v_rspace=v_hartree_rspace, &
380 hmat=dcdr_env%matrix_core_charge_1(beta), &
382 calculate_forces=.false.)
385 CALL auxbas_pw_pool%give_back_pw(drho_g)
386 CALL auxbas_pw_pool%give_back_pw(v_hartree_rspace)
387 CALL auxbas_pw_pool%give_back_pw(v_hartree_gspace)
389 CALL timestop(handle)
402 CHARACTER(LEN=*),
PARAMETER :: routinen =
'core_dR'
404 CHARACTER(LEN=default_string_length) :: my_basis_type
405 INTEGER :: handle, nder
406 INTEGER,
DIMENSION(:, :, :),
POINTER :: cell_to_index
407 LOGICAL :: calculate_forces, failure, ppl_present, &
408 ppnl_present, use_virial
409 REAL(kind=
dp) :: eps_ppnl
410 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: deltar
413 TYPE(
dbcsr_p_type),
DIMENSION(:, :),
POINTER :: matrix_hc_pass, matrix_p_pass, &
417 POINTER :: sab_orb, sac_ae, sac_ppl, sap_ppnl
420 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
425 CALL timeset(routinen, handle)
429 NULLIFY (atomic_kind_set, qs_kind_set, ks_env, dft_control, particle_set, &
430 sab_orb, sac_ae, sac_ppl, sap_ppnl, virial, rho, rho_ao)
433 atomic_kind_set=atomic_kind_set, &
434 qs_kind_set=qs_kind_set, &
436 dft_control=dft_control, &
437 particle_set=particle_set, &
445 deltar => dcdr_env%delta_basis_function
448 calculate_forces = .false.
450 my_basis_type =
"ORB"
453 IF (
ASSOCIATED(sac_ae))
THEN
454 cpabort(
"ECP/AE functionality in qs_dcdr_ao missing")
456 matrix_hc_pass(1:3, 1:1) => dcdr_env%matrix_hc(1:3)
457 matrix_p_pass(1:1, 1:1) => rho_ao(1:1)
458 CALL build_core_ae(matrix_h=matrix_hc_pass, matrix_p=matrix_p_pass, &
459 force=force, virial=virial, calculate_forces=calculate_forces, &
460 use_virial=use_virial, nder=nder, qs_kind_set=qs_kind_set, &
461 atomic_kind_set=atomic_kind_set, particle_set=particle_set, &
462 sab_orb=sab_orb, sac_ae=sac_ae, nimages=1, &
463 cell_to_index=cell_to_index)
466 ppl_present =
ASSOCIATED(sac_ppl)
467 IF (ppl_present)
THEN
469 matrix_hc_pass(1:3, 1:1) => dcdr_env%matrix_hc(1:3)
470 matrix_p_pass(1:1, 1:1) => rho_ao(1:1)
471 CALL build_core_ppl(matrix_h=matrix_hc_pass, matrix_p=matrix_p_pass, &
472 force=force, virial=virial, calculate_forces=calculate_forces, &
473 use_virial=use_virial, nder=nder, qs_kind_set=qs_kind_set, &
474 atomic_kind_set=atomic_kind_set, particle_set=particle_set, &
475 sab_orb=sab_orb, sac_ppl=sac_ppl, basis_type=my_basis_type, &
476 nimages=1, cell_to_index=cell_to_index, deltar=deltar)
482 eps_ppnl = dft_control%qs_control%eps_ppnl
483 ppnl_present =
ASSOCIATED(sap_ppnl)
484 IF (ppnl_present)
THEN
485 matrix_ppnl_1_pass(1:3, 1:1) => dcdr_env%matrix_ppnl_1(1:3)
486 CALL build_core_ppnl(matrix_h=matrix_ppnl_1_pass, matrix_p=matrix_p_pass, force=force, virial=virial, &
487 calculate_forces=calculate_forces, use_virial=use_virial, nder=nder, &
488 qs_kind_set=qs_kind_set, atomic_kind_set=atomic_kind_set, &
489 particle_set=particle_set, sab_orb=sab_orb, sap_ppnl=sap_ppnl, &
490 eps_ppnl=eps_ppnl, nimages=1, cell_to_index=cell_to_index, &
491 basis_type=my_basis_type, deltar=deltar)
494 CALL timestop(handle)
507 CHARACTER(len=*),
PARAMETER :: routinen =
'd_vhxc_dR'
509 INTEGER :: handle, idir, ispin
518 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: drho_r, dtau_r, rho_r, v_xc, v_xc_tau
524 CALL timeset(routinen, handle)
530 CALL qs_rho_get(rho, rho_ao=rho_ao, rho_r=rho_r)
535 ALLOCATE (drho_r(dcdr_env%nspins))
536 ALLOCATE (drho_g(dcdr_env%nspins))
538 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool, &
539 pw_pools=pw_pools, poisson_env=poisson_env)
540 CALL auxbas_pw_pool%create_pw(v_hartree_gspace)
541 CALL auxbas_pw_pool%create_pw(v_hartree_rspace)
543 DO ispin = 1, dcdr_env%nspins
544 CALL auxbas_pw_pool%create_pw(drho_r(ispin))
545 CALL auxbas_pw_pool%create_pw(drho_g(ispin))
547 CALL auxbas_pw_pool%create_pw(drho_g_total)
548 CALL auxbas_pw_pool%create_pw(drho_r_total)
556 DO ispin = 1, dcdr_env%nspins
562 drho=drho_r(ispin), &
563 drho_gspace=drho_g(ispin), &
565 beta=idir, lambda=dcdr_env%lambda)
567 CALL pw_axpy(drho_g(ispin), drho_g_total)
568 CALL pw_axpy(drho_r(ispin), drho_r_total)
572 vhartree=v_hartree_gspace)
573 CALL pw_transfer(v_hartree_gspace, v_hartree_rspace)
577 rho_r, auxbas_pw_pool, &
578 xc_section=xc_section)
582 drho_r, drho_g, dtau_r, auxbas_pw_pool, xc_section, gapw=.false.)
583 IF (
ASSOCIATED(v_xc_tau)) cpabort(
"Meta functionals are not supported!")
591 DO ispin = 1, dcdr_env%nspins
593 CALL pw_scale(v_xc(ispin), v_xc(ispin)%pw_grid%dvol)
594 CALL pw_axpy(v_hartree_rspace, v_xc(ispin), v_hartree_rspace%pw_grid%dvol)
596 CALL integrate_v_rspace(v_rspace=v_xc(ispin), &
597 hmat=dcdr_env%matrix_d_vhxc_dR(idir, ispin), &
599 calculate_forces=.false.)
602 CALL auxbas_pw_pool%give_back_pw(v_xc(ispin))
607 CALL auxbas_pw_pool%give_back_pw(v_hartree_gspace)
608 CALL auxbas_pw_pool%give_back_pw(v_hartree_rspace)
609 CALL auxbas_pw_pool%give_back_pw(drho_g_total)
610 CALL auxbas_pw_pool%give_back_pw(drho_r_total)
612 DO ispin = 1, dcdr_env%nspins
613 CALL auxbas_pw_pool%give_back_pw(drho_g(ispin))
614 CALL auxbas_pw_pool%give_back_pw(drho_r(ispin))
620 CALL timestop(handle)
635 CHARACTER(LEN=*),
PARAMETER :: routinen =
'vhxc_R_perturbed_basis_functions'
637 INTEGER :: handle, ispin
638 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_vhxc_dbasis
639 TYPE(
dbcsr_p_type),
DIMENSION(:, :),
POINTER :: matrix_p
642 TYPE(
pw_r3d_rs_type),
DIMENSION(:),
POINTER :: v_hxc_r, v_tau_rspace
649 CALL timeset(routinen, handle)
651 NULLIFY (rho_struct, energy, input, ks_env, pw_env, matrix_p)
658 v_hartree_rspace=v_hartree_r)
659 CALL qs_rho_get(rho_struct, rho_ao_kp=matrix_p)
662 NULLIFY (auxbas_pw_pool)
663 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool)
668 NULLIFY (v_hxc_r, v_tau_rspace)
669 CALL qs_vxc_create(ks_env=ks_env, rho_struct=rho_struct, xc_section=xc_section, &
670 vxc_rho=v_hxc_r, vxc_tau=v_tau_rspace, exc=energy%exc)
672 DO ispin = 1, dcdr_env%nspins
673 CALL pw_scale(v_hxc_r(ispin), v_hxc_r(ispin)%pw_grid%dvol)
676 CALL pw_axpy(v_hartree_r, v_hxc_r(ispin), 1._dp)
678 matrix_vhxc_dbasis => dcdr_env%matrix_vhxc_perturbed_basis(ispin, :)
679 CALL integrate_v_dbasis(v_rspace=v_hxc_r(ispin), &
680 matrix_p=matrix_p(ispin, 1)%matrix, &
681 matrix_vhxc_dbasis=matrix_vhxc_dbasis, &
683 lambda=dcdr_env%lambda)
685 CALL auxbas_pw_pool%give_back_pw(v_hxc_r(ispin))
690 CALL timestop(handle)
705 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
706 CHARACTER(LEN=*),
INTENT(IN) :: basis_type
709 INTEGER,
INTENT(IN) :: lambda
710 LOGICAL,
INTENT(IN) :: direction_or
712 CHARACTER(len=*),
PARAMETER :: routinen =
'hr_mult_by_delta_1d'
714 INTEGER :: handle, iatom, icol, ikind, irow, jatom, &
715 jkind, ldsab, mepos, nkind, nseta, &
717 INTEGER,
DIMENSION(3) :: cell
718 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
720 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
721 LOGICAL :: do_symmetric, found
722 REAL(kind=
dp),
DIMENSION(3) :: rab
723 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
724 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: k_block, rpgfa, rpgfb, scon_a, scon_b, &
729 DIMENSION(:),
POINTER :: nl_iterator
731 CALL timeset(routinen, handle)
733 nkind =
SIZE(qs_kind_set)
736 cpassert(
SIZE(sab_nl) > 0)
740 ALLOCATE (basis_set_list(nkind))
766 iatom=iatom, jatom=jatom, r=rab, cell=cell)
767 basis_set_a => basis_set_list(ikind)%gto_basis_set
768 IF (.NOT.
ASSOCIATED(basis_set_a)) cycle
769 basis_set_b => basis_set_list(jkind)%gto_basis_set
770 IF (.NOT.
ASSOCIATED(basis_set_b)) cycle
772 first_sgfa => basis_set_a%first_sgf
773 la_max => basis_set_a%lmax
774 la_min => basis_set_a%lmin
775 npgfa => basis_set_a%npgf
776 nseta = basis_set_a%nset
777 nsgfa => basis_set_a%nsgf_set
778 rpgfa => basis_set_a%pgf_radius
779 set_radius_a => basis_set_a%set_radius
780 scon_a => basis_set_a%scon
781 zeta => basis_set_a%zet
783 first_sgfb => basis_set_b%first_sgf
784 lb_max => basis_set_b%lmax
785 lb_min => basis_set_b%lmin
786 npgfb => basis_set_b%npgf
787 nsetb = basis_set_b%nset
788 nsgfb => basis_set_b%nsgf_set
789 rpgfb => basis_set_b%pgf_radius
790 set_radius_b => basis_set_b%set_radius
791 scon_b => basis_set_b%scon
792 zetb => basis_set_b%zet
794 IF (do_symmetric)
THEN
795 IF (iatom <= jatom)
THEN
811 IF (direction_or)
THEN
812 IF (jatom /= lambda) k_block(:, :) = 0._dp
813 ELSE IF (.NOT. direction_or)
THEN
814 IF (iatom /= lambda) k_block(:, :) = 0._dp
821 DEALLOCATE (basis_set_list)
823 CALL timestop(handle)
Define the atomic kind types and their sub types.
Calculation of the nuclear attraction contribution to the core Hamiltonian <a|erfc|b> :we only calcul...
subroutine, public build_core_ae(matrix_h, matrix_p, force, virial, calculate_forces, use_virial, nder, qs_kind_set, atomic_kind_set, particle_set, sab_orb, sac_ae, nimages, cell_to_index, atcore)
...
Calculation of the local pseudopotential contribution to the core Hamiltonian <a|V(local)|b> = <a|Sum...
subroutine, public build_core_ppl(matrix_h, matrix_p, force, virial, calculate_forces, use_virial, nder, qs_kind_set, atomic_kind_set, particle_set, sab_orb, sac_ppl, nimages, cell_to_index, basis_type, deltar, atcore)
...
Calculation of the non-local pseudopotential contribution to the core Hamiltonian <a|V(non-local)|b> ...
subroutine, public build_core_ppnl(matrix_h, matrix_p, force, virial, calculate_forces, use_virial, nder, qs_kind_set, atomic_kind_set, particle_set, sab_orb, sap_ppnl, eps_ppnl, nimages, cell_to_index, basis_type, deltar, matrix_l, atcore)
...
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_get_block_p(matrix, row, col, block, found, row_size, col_size)
...
subroutine, public dbcsr_set(matrix, alpha)
...
DBCSR operations in CP2K.
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public copy_fm_to_dbcsr(fm, matrix, keep_sparsity)
Copy a BLACS matrix to a dbcsr matrix.
represent a full matrix distributed on many processors
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
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
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset
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 ...
Calculate the plane wave density by collocating the primitive Gaussian functions (pgf).
subroutine, public calculate_drho_elec_dr(matrix_p, matrix_p_kp, drho, drho_gspace, qs_env, soft_valid, basis_type, beta, lambda)
Computes the gradient wrt. nuclear coordinates of a density on the grid The density is given in terms...
subroutine, public calculate_drho_core(drho_core, qs_env, beta, lambda)
Computes the derivative of the density of the core charges with respect to the nuclear coordinates on...
Calculate the derivatives of the MO coefficients wrt nuclear coordinates.
subroutine, public core_dr(qs_env, dcdr_env)
Core Hamiltonian contributions to the operator (the pseudopotentials)
subroutine, public apply_op_constant_term(qs_env, dcdr_env, overlap1)
Build the perturbed density matrix correction depending on the overlap derivative.
subroutine, public hr_mult_by_delta_1d(matrix, qs_kind_set, basis_type, sab_nl, lambda, direction_or)
Enforce that one of the basis functions in < a | O | b > is centered on atom lambda.
subroutine, public vhxc_r_perturbed_basis_functions(qs_env, dcdr_env)
The derivatives of the basis functions over which the HXC potential is integrated,...
subroutine, public d_vhxc_dr(qs_env, dcdr_env)
The derivatives of the basis functions going into the HXC potential wrt nuclear positions.
subroutine, public d_core_charge_density_dr(qs_env, dcdr_env)
Calculate the derivative of the Hartree term due to the core charge density.
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.
Some utility functions for the calculation of integrals.
subroutine, public basis_set_list_setup(basis_set_list, basis_type, qs_kind_set)
Set up an easy accessible list of the basis sets for all kinds.
Integrate single or product functions over a potential on a RS grid.
Define the quickstep kind type and their sub types.
subroutine, public get_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_ks_im_kp, rho, rho_xc, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, task_list, task_list_soft, kpoints, do_kpoints, atomic_kind_set, qs_kind_set, cell, cell_ref, use_ref_cell, particle_set, energy, force, local_particles, local_molecules, molecule_kind_set, molecule_set, subsys, cp_subsys, virial, results, atprop, nkind, natom, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env, nelectron_total, nelectron_spin)
...
Type definitiona for linear response calculations.
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)
...
subroutine, public get_neighbor_list_set_p(neighbor_list_sets, nlist, symmetric)
Return the components of the first neighbor list 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)
...
methods of the rho structure (defined in qs_rho_types)
subroutine, public qs_rho_update_rho(rho_struct, qs_env, rho_xc_external, local_rho_set, task_list_external, task_list_external_soft, pw_env_external, para_env_external)
updates rho_r and rho_g to the rhorho_ao. if use_kinetic_energy_density also computes tau_r and tau_g...
subroutine, public qs_rho_rebuild(rho, qs_env, rebuild_ao, rebuild_grids, admm, pw_env_external)
rebuilds rho (if necessary allocating and initializing it)
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 qs_rho_create(rho)
Allocates a new instance of rho.
subroutine, public qs_rho_release(rho_struct)
releases a rho_struct by decreasing the reference count by one and deallocating if it reaches 0 (to b...
subroutine, public qs_vxc_create(ks_env, rho_struct, xc_section, vxc_rho, vxc_tau, exc, just_energy, edisp, dispersion_env, adiabatic_rescale_factor, pw_env_external)
calculates and allocates the xc potential, already reducing it to the dependence on rho and the one o...
represent a group ofunctional derivatives
subroutine, public xc_dset_release(derivative_set)
releases a derivative set
subroutine, public xc_rho_set_release(rho_set, pw_pool)
releases the given rho_set
Exchange and Correlation functional calculations.
subroutine, public xc_calc_2nd_deriv(v_xc, v_xc_tau, deriv_set, rho_set, rho1_r, rho1_g, tau1_r, pw_pool, xc_section, gapw, vxg, do_excitations, do_triplet, compute_virial, virial_xc)
Caller routine to calculate the second order potential in the direction of rho1_r.
subroutine, public xc_prep_2nd_deriv(deriv_set, rho_set, rho_r, pw_pool, xc_section, tau_r)
Prepare objects for the calculation of the 2nd derivatives of the density functional....
Provides all information about an atomic kind.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
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 ...
Provides all information about a quickstep kind.
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
keeps the density in various representations, keeping track of which ones are valid.
A derivative set contains the different derivatives of a xc-functional in form of a linked list.
represent a density, with all the representation and data needed to perform a functional evaluation