15 USE omp_lib,
ONLY: omp_get_num_threads,&
43 dbt_clear, dbt_contract, dbt_copy, dbt_create, dbt_destroy, dbt_distribution_destroy, &
44 dbt_distribution_new, dbt_distribution_type, dbt_filter, dbt_get_block, dbt_get_info, &
45 dbt_get_stored_coordinates, dbt_mp_environ_pgrid, dbt_pgrid_create, dbt_pgrid_destroy, &
46 dbt_pgrid_type, dbt_put_block, dbt_reserve_blocks, dbt_scale, dbt_split_blocks, dbt_type
104#include "./base/base_uses.f90"
110 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'mp2_integrals'
114 TYPE intermediate_matrix_type
115 TYPE(dbcsr_type) :: matrix_ia_jnu, matrix_ia_jb
116 INTEGER :: max_row_col_local = 0
117 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: local_col_row_info
119 CHARACTER(LEN=default_string_length) :: descr =
""
120 END TYPE intermediate_matrix_type
186 dimen_RI, dimen_RI_red, qs_env, para_env, para_env_sub, color_sub, &
187 cell, particle_set, atomic_kind_set, qs_kind_set, &
188 fm_matrix_PQ, fm_matrix_L_kpoints, fm_matrix_Minv_L_kpoints, &
189 fm_matrix_Minv, fm_matrix_Minv_Vtrunc_Minv, &
190 nmo, homo, mat_munu, &
191 sab_orb_sub, mo_coeff_o, mo_coeff_v, mo_coeff_all, &
192 mo_coeff_gw, mo_coeff_o_bse, mo_coeff_v_bse, eps_filter, unit_nr, &
193 mp2_memory, calc_PQ_cond_num, calc_forces, blacs_env_sub, my_do_gw, do_bse, &
194 gd_B_all, starts_array_mc, ends_array_mc, &
195 starts_array_mc_block, ends_array_mc_block, &
196 gw_corr_lev_occ, gw_corr_lev_virt, &
198 do_im_time, do_kpoints_cubic_RPA, kpoints, &
199 t_3c_M, t_3c_O, t_3c_O_compressed, t_3c_O_ind, &
200 ri_metric, gd_B_occ_bse, gd_B_virt_bse)
203 DIMENSION(:),
INTENT(OUT) :: bib_c, bib_c_gw, bib_c_bse_ij, &
207 DIMENSION(:),
INTENT(OUT) :: gd_b_virtual
208 INTEGER,
INTENT(OUT) :: dimen_ri, dimen_ri_red
211 INTEGER,
INTENT(IN) :: color_sub
215 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
217 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: fm_matrix_l_kpoints, &
218 fm_matrix_minv_l_kpoints, &
220 fm_matrix_minv_vtrunc_minv
221 INTEGER,
INTENT(IN) :: nmo
222 INTEGER,
DIMENSION(:),
INTENT(IN) :: homo
225 INTENT(IN),
POINTER :: sab_orb_sub
226 TYPE(
dbcsr_p_type),
DIMENSION(:),
INTENT(IN) :: mo_coeff_o, mo_coeff_v, mo_coeff_all, &
227 mo_coeff_gw, mo_coeff_o_bse, &
229 REAL(kind=
dp),
INTENT(IN) :: eps_filter
230 INTEGER,
INTENT(IN) :: unit_nr
231 REAL(kind=
dp),
INTENT(IN) :: mp2_memory
232 LOGICAL,
INTENT(IN) :: calc_pq_cond_num, calc_forces
234 LOGICAL,
INTENT(IN) :: my_do_gw, do_bse
236 INTEGER,
ALLOCATABLE,
DIMENSION(:),
INTENT(OUT) :: starts_array_mc, ends_array_mc, &
237 starts_array_mc_block, &
239 INTEGER,
INTENT(IN) :: gw_corr_lev_occ, gw_corr_lev_virt
240 INTEGER,
DIMENSION(:),
INTENT(IN) :: bse_lev_virt
241 LOGICAL,
INTENT(IN) :: do_im_time, do_kpoints_cubic_rpa
243 TYPE(dbt_type),
INTENT(OUT) :: t_3c_m
244 TYPE(dbt_type),
ALLOCATABLE,
DIMENSION(:, :), &
245 INTENT(OUT) :: t_3c_o
247 DIMENSION(:, :, :),
INTENT(INOUT) :: t_3c_o_compressed
249 DIMENSION(:, :, :) :: t_3c_o_ind
250 TYPE(libint_potential_type),
INTENT(IN) :: ri_metric
252 DIMENSION(:),
INTENT(OUT) :: gd_b_occ_bse, gd_b_virt_bse
254 CHARACTER(LEN=*),
PARAMETER :: routinen =
'mp2_ri_gpw_compute_in'
256 INTEGER :: cm, cut_memory, cut_memory_int, eri_method, gw_corr_lev_total, handle, handle2, &
257 handle4, i, i_counter, i_mem, ibasis, ispin, itmp(2), j, jcell, kcell, lll, min_bsize, &
258 my_b_all_end, my_b_all_size, my_b_all_start, my_group_l_end, my_group_l_size, &
259 my_group_l_start, n_rep, natom, ngroup, nimg, nkind, nspins, potential_type, &
261 INTEGER(int_8) :: nze
262 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: dist_ao_1, dist_ao_2, dist_ri, &
263 ends_array_mc_block_int, ends_array_mc_int, my_b_occ_bse_end, my_b_occ_bse_size, &
264 my_b_occ_bse_start, my_b_size, my_b_virt_bse_end, my_b_virt_bse_size, &
265 my_b_virt_bse_start, my_b_virtual_end, my_b_virtual_start, sizes_ao, sizes_ao_split, &
266 sizes_ri, sizes_ri_split, starts_array_mc_block_int, starts_array_mc_int, virtual
267 INTEGER,
DIMENSION(2, 3) :: bounds
268 INTEGER,
DIMENSION(3) :: bounds_3c, pcoord, pdims, pdims_t3c, &
270 LOGICAL :: do_gpw, do_kpoints_from_gamma, do_svd, &
272 REAL(kind=
dp) :: compression_factor, cutoff_old, eps_pgf_orb, eps_pgf_orb_old, eps_svd, &
273 mem_for_abk, mem_for_iak, mem_for_ijk, memory_3c, occ, omega_pot, rc_ang, &
275 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: e_cutoff_old
276 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: my_lrows, my_vrows
278 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: mat_munu_local_l
279 TYPE(dbt_pgrid_type) :: pgrid_t3c_m, pgrid_t3c_overl
280 TYPE(dbt_type) :: t_3c_overl_int_template, t_3c_tmp
281 TYPE(dbt_type),
ALLOCATABLE,
DIMENSION(:, :) :: t_3c_overl_int
286 TYPE(intermediate_matrix_type),
ALLOCATABLE, &
287 DIMENSION(:) :: intermed_mat, intermed_mat_bse_ab, &
288 intermed_mat_bse_ij, intermed_mat_gw
299 CALL timeset(routinen, handle)
305 ALLOCATE (virtual(nspins))
306 virtual(:) = nmo - homo(:)
307 gw_corr_lev_total = gw_corr_lev_virt + gw_corr_lev_occ
309 eri_method = qs_env%mp2_env%eri_method
310 eri_param => qs_env%mp2_env%eri_mme_param
311 do_svd = qs_env%mp2_env%do_svd
312 eps_svd = qs_env%mp2_env%eps_svd
313 potential_type = qs_env%mp2_env%potential_parameter%potential_type
314 ri_metric_type = ri_metric%potential_type
315 omega_pot = qs_env%mp2_env%potential_parameter%omega
320 .AND. qs_env%mp2_env%eri_method ==
do_eri_os) &
323 IF (do_svd .AND. calc_forces)
THEN
324 cpabort(
"SVD not implemented for forces.!")
327 do_kpoints_from_gamma = qs_env%mp2_env%ri_rpa_im_time%do_kpoints_from_Gamma
328 IF (do_kpoints_cubic_rpa .OR. do_kpoints_from_gamma)
THEN
332 IF (do_kpoints_from_gamma)
THEN
337 IF (.NOT. my_do_gw)
THEN
338 CALL cp_abort(__location__,
"BSE calculations require prior GW calculations.")
341 CALL cp_abort(__location__,
"BSE calculations are not implemented for low-scaling GW.")
345 CALL cp_abort(__location__, &
346 "BSE calculations are not implemented for GPW integrals. "// &
347 "This is probably caused by invoking a periodic calculation. "// &
348 "Use PERIODIC NONE for BSE calculations.")
352 ngroup = para_env%num_pe/para_env_sub%num_pe
355 IF (qs_env%mp2_env%eri_method ==
do_eri_mme)
THEN
357 CALL cp_eri_mme_set_params(eri_param, cell, qs_kind_set, basis_type_1=
"ORB", basis_type_2=
"RI_AUX", para_env=para_env)
360 CALL get_cell(cell=cell, periodic=periodic)
363 cpassert(periodic(1) == 1 .AND. periodic(2) == 1 .AND. periodic(3) == 1)
366 IF (do_svd .AND. (do_kpoints_from_gamma .OR. do_kpoints_cubic_rpa))
THEN
367 cpabort(
"SVD with kpoints not implemented yet!")
370 CALL get_2c_integrals(qs_env, eri_method, eri_param, para_env, para_env_sub, mp2_memory, &
371 my_lrows, my_vrows, fm_matrix_pq, ngroup, color_sub, dimen_ri, dimen_ri_red, &
372 kpoints, my_group_l_size, my_group_l_start, my_group_l_end, &
373 gd_array, calc_pq_cond_num .AND. .NOT. do_svd, do_svd, eps_svd, &
374 qs_env%mp2_env%potential_parameter, ri_metric, &
375 fm_matrix_l_kpoints, fm_matrix_minv_l_kpoints, fm_matrix_minv, fm_matrix_minv_vtrunc_minv, &
376 do_im_time, do_kpoints_from_gamma .OR. do_kpoints_cubic_rpa, qs_env%mp2_env%mp2_gpw%eps_pgf_orb_S, &
377 qs_kind_set, sab_orb_sub, calc_forces, unit_nr)
379 IF (unit_nr > 0)
THEN
380 associate(ri_metric => qs_env%mp2_env%ri_metric)
381 SELECT CASE (ri_metric%potential_type)
383 WRITE (unit_nr, fmt=
"(/T3,A,T74,A)") &
384 "RI_INFO| RI metric: ",
"COULOMB"
386 WRITE (unit_nr, fmt=
"(T3,A,T71,A)") &
387 "RI_INFO| RI metric: ",
"SHORTRANGE"
388 WRITE (unit_nr,
'(T3,A,T61,F20.10)') &
389 "RI_INFO| Omega: ", ri_metric%omega
391 WRITE (unit_nr,
'(T3,A,T61,F20.10)') &
392 "RI_INFO| Cutoff Radius [angstrom]: ", rc_ang
394 WRITE (unit_nr, fmt=
"(T3,A,T72,A)") &
395 "RI_INFO| RI metric: ",
"LONGRANGE"
396 WRITE (unit_nr,
'(T3,A,T61,F20.10)') &
397 "RI_INFO| Omega: ", ri_metric%omega
399 WRITE (unit_nr, fmt=
"(T3,A,T74,A)") &
400 "RI_INFO| RI metric: ",
"OVERLAP"
402 WRITE (unit_nr, fmt=
"(T3,A,T64,A)") &
403 "RI_INFO| RI metric: ",
"TRUNCATED COULOMB"
405 WRITE (unit_nr,
'(T3,A,T61,F20.2)') &
406 "RI_INFO| Cutoff Radius [angstrom]: ", rc_ang
411 IF (calc_forces .AND. .NOT. do_im_time)
THEN
414 itmp =
get_limit(dimen_ri, para_env_sub%num_pe, para_env_sub%mepos)
415 lll = itmp(2) - itmp(1) + 1
416 ALLOCATE (qs_env%mp2_env%ri_grad%PQ_half(lll, my_group_l_size))
417 qs_env%mp2_env%ri_grad%PQ_half(:, :) = my_lrows(itmp(1):itmp(2), 1:my_group_l_size)
419 ALLOCATE (qs_env%mp2_env%ri_grad%operator_half(lll, my_group_l_size))
420 qs_env%mp2_env%ri_grad%operator_half(:, :) = my_vrows(itmp(1):itmp(2), 1:my_group_l_size)
421 DEALLOCATE (my_vrows)
425 IF (unit_nr > 0)
THEN
426 WRITE (unit=unit_nr, fmt=
"(T3,A,T75,i6)") &
427 "RI_INFO| Number of auxiliary basis functions:", dimen_ri, &
428 "GENERAL_INFO| Number of basis functions:", nmo, &
429 "GENERAL_INFO| Number of occupied orbitals:", homo(1), &
430 "GENERAL_INFO| Number of virtual orbitals:", virtual(1)
432 WRITE (unit=unit_nr, fmt=
"(T3,A,T75,i6)") &
433 "RI_INFO| Reduced auxiliary basis set size:", dimen_ri_red
436 mem_for_iak = dimen_ri*real(sum(homo*virtual), kind=
dp)*8.0_dp/(1024_dp**2)
437 mem_for_ijk = dimen_ri*real(sum(homo(1:nspins)**2), kind=
dp)*8.0_dp/(1024_dp**2)
438 mem_for_abk = dimen_ri*real(sum(bse_lev_virt(1:nspins)**2), kind=
dp)*8.0_dp/(1024_dp**2)
440 IF (.NOT. do_im_time)
THEN
441 WRITE (unit_nr,
'(T3,A,T66,F11.2,A4)')
'RI_INFO| Total memory for (ia|K) integrals:', &
443 IF (my_do_gw .AND. .NOT. do_im_time)
THEN
444 mem_for_iak = dimen_ri*real(nmo, kind=
dp)*gw_corr_lev_total*8.0_dp/(1024_dp**2)
446 WRITE (unit_nr,
'(T3,A,T66,F11.2,A4)')
'RI_INFO| Total memory for G0W0-(nm|K) integrals:', &
451 WRITE (unit_nr,
'(T3,A,T66,F11.2,A4)')
'RI_INFO| Total memory for (ij|K) integrals:', &
453 WRITE (unit_nr,
'(T3,A,T66,F11.2,A4)')
'RI_INFO| Total memory for (ab|K) integrals:', &
462 IF (.NOT. do_im_time)
THEN
464 ALLOCATE (gd_b_virtual(nspins), intermed_mat(nspins))
465 ALLOCATE (my_b_virtual_start(nspins), my_b_virtual_end(nspins), my_b_size(nspins))
468 CALL create_intermediate_matrices(intermed_mat(ispin), mo_coeff_o(ispin)%matrix, virtual(ispin), homo(ispin), &
469 trim(adjustl(
cp_to_string(ispin))), blacs_env_sub, para_env_sub)
472 CALL get_group_dist(gd_b_virtual(ispin), para_env_sub%mepos, my_b_virtual_start(ispin), my_b_virtual_end(ispin), &
480 ALLOCATE (intermed_mat_gw(nspins))
482 CALL create_intermediate_matrices(intermed_mat_gw(ispin), mo_coeff_gw(ispin)%matrix, &
483 nmo, gw_corr_lev_total, &
485 blacs_env_sub, para_env_sub)
490 CALL get_group_dist(gd_b_all, para_env_sub%mepos, my_b_all_start, my_b_all_end, my_b_all_size)
495 ALLOCATE (intermed_mat_bse_ab(nspins), intermed_mat_bse_ij(nspins), gd_b_occ_bse(nspins), gd_b_virt_bse(nspins))
496 ALLOCATE (my_b_occ_bse_start(nspins), my_b_occ_bse_end(nspins), my_b_occ_bse_size(nspins))
497 ALLOCATE (my_b_virt_bse_start(nspins), my_b_virt_bse_end(nspins), my_b_virt_bse_size(nspins))
499 CALL create_group_dist(gd_b_virt_bse(ispin), para_env_sub%num_pe, bse_lev_virt(ispin))
500 CALL get_group_dist(gd_b_virt_bse(ispin), para_env_sub%mepos, my_b_virt_bse_start(ispin), &
501 my_b_virt_bse_end(ispin), my_b_virt_bse_size(ispin))
503 CALL create_intermediate_matrices(intermed_mat_bse_ab(ispin), mo_coeff_v_bse(ispin)%matrix, &
504 bse_lev_virt(ispin), bse_lev_virt(ispin), &
505 "bse_ab_"//trim(adjustl(
cp_to_string(ispin))), blacs_env_sub, para_env_sub)
510 CALL create_intermediate_matrices(intermed_mat_bse_ij(ispin), mo_coeff_o_bse(ispin)%matrix, &
511 homo(ispin), homo(ispin), &
512 "bse_ij_"//trim(adjustl(
cp_to_string(ispin))), blacs_env_sub, para_env_sub)
515 CALL get_group_dist(gd_b_occ_bse(ispin), para_env_sub%mepos, my_b_occ_bse_start(ispin), &
516 my_b_occ_bse_end(ispin), my_b_occ_bse_size(ispin))
523 ALLOCATE (bib_c(nspins))
525 ALLOCATE (bib_c(ispin)%array(my_group_l_size, my_b_size(ispin), homo(ispin)))
526 bib_c(ispin)%array = 0.0_dp
532 ALLOCATE (bib_c_gw(nspins))
534 ALLOCATE (bib_c_gw(ispin)%array(my_group_l_size, my_b_all_size, gw_corr_lev_total))
535 bib_c_gw(ispin)%array = 0.0_dp
542 ALLOCATE (bib_c_bse_ij(nspins), bib_c_bse_ab(nspins))
544 ALLOCATE (bib_c_bse_ij(ispin)%array(my_group_l_size, my_b_occ_bse_size(ispin), homo(ispin)))
545 bib_c_bse_ij(ispin)%array = 0.0_dp
547 ALLOCATE (bib_c_bse_ab(ispin)%array(my_group_l_size, my_b_virt_bse_size(ispin), bse_lev_virt(ispin)))
548 bib_c_bse_ab(ispin)%array = 0.0_dp
553 CALL timeset(routinen//
"_loop", handle2)
561 IF (qs_env%mp2_env%ri_aux_auto_generated)
THEN
562 CALL cp_warn(__location__, &
563 "At least one RI_AUX basis set was not explicitly invoked in &KIND-section. "// &
564 "Automatically RI-basis sets and ERI_METHOD OS tend to be not converged. "// &
565 "Consider specifying BASIS_SET RI_AUX explicitly with a sufficiently large basis.")
568 NULLIFY (mat_munu_local_l)
569 ALLOCATE (mat_munu_local_l(my_group_l_size))
570 DO lll = 1, my_group_l_size
571 NULLIFY (mat_munu_local_l(lll)%matrix)
572 ALLOCATE (mat_munu_local_l(lll)%matrix)
573 CALL dbcsr_copy(mat_munu_local_l(lll)%matrix, mat_munu%matrix)
574 CALL dbcsr_set(mat_munu_local_l(lll)%matrix, 0.0_dp)
577 first_c=my_group_l_start, last_c=my_group_l_end, &
578 mat_ab=mat_munu_local_l, &
579 basis_type_a=
"ORB", basis_type_b=
"ORB", &
580 basis_type_c=
"RI_AUX", &
581 sab_nl=sab_orb_sub, eri_method=eri_method)
584 DO lll = 1, my_group_l_size
585 CALL ao_to_mo_and_store_b(para_env_sub, mat_munu_local_l(lll), intermed_mat(ispin), &
586 bib_c(ispin)%array(lll, :, :), &
587 mo_coeff_o(ispin)%matrix, mo_coeff_v(ispin)%matrix, &
589 my_b_virtual_end(ispin), my_b_virtual_start(ispin))
591 CALL contract_b_l(bib_c(ispin)%array, my_lrows, gd_b_virtual(ispin)%sizes, &
592 gd_array%sizes, qs_env%mp2_env%eri_blksize, &
593 ngroup, color_sub, para_env, para_env_sub)
599 DO lll = 1, my_group_l_size
600 CALL ao_to_mo_and_store_b(para_env_sub, mat_munu_local_l(lll), intermed_mat_gw(ispin), &
601 bib_c_gw(ispin)%array(lll, :, :), &
602 mo_coeff_gw(ispin)%matrix, mo_coeff_all(ispin)%matrix, eps_filter, &
603 my_b_all_end, my_b_all_start)
605 CALL contract_b_l(bib_c_gw(ispin)%array, my_lrows, gd_b_all%sizes, gd_array%sizes, qs_env%mp2_env%eri_blksize, &
606 ngroup, color_sub, para_env, para_env_sub)
614 DO lll = 1, my_group_l_size
615 CALL ao_to_mo_and_store_b(para_env_sub, mat_munu_local_l(lll), intermed_mat_bse_ab(ispin), &
616 bib_c_bse_ab(ispin)%array(lll, :, :), &
617 mo_coeff_v_bse(ispin)%matrix, mo_coeff_v_bse(ispin)%matrix, eps_filter, &
618 my_b_all_end, my_b_all_start)
620 CALL contract_b_l(bib_c_bse_ab(ispin)%array, my_lrows, gd_b_virt_bse(ispin)%sizes, gd_array%sizes, &
621 qs_env%mp2_env%eri_blksize, ngroup, color_sub, para_env, para_env_sub)
624 DO lll = 1, my_group_l_size
625 CALL ao_to_mo_and_store_b(para_env_sub, mat_munu_local_l(lll), intermed_mat_bse_ij(ispin), &
626 bib_c_bse_ij(ispin)%array(lll, :, :), &
627 mo_coeff_o(ispin)%matrix, mo_coeff_o(ispin)%matrix, eps_filter, &
628 my_b_occ_bse_end(ispin), my_b_occ_bse_start(ispin))
630 CALL contract_b_l(bib_c_bse_ij(ispin)%array, my_lrows, gd_b_occ_bse(ispin)%sizes, gd_array%sizes, &
631 qs_env%mp2_env%eri_blksize, ngroup, color_sub, para_env, para_env_sub)
636 DO lll = 1, my_group_l_size
639 DEALLOCATE (mat_munu_local_l)
641 ELSE IF (do_gpw)
THEN
643 CALL prepare_gpw(qs_env, dft_control, e_cutoff_old, cutoff_old, relative_cutoff_old, para_env_sub, pw_env_sub, &
644 auxbas_pw_pool, poisson_env, task_list_sub, rho_r, rho_g, pot_g, psi_l, sab_orb_sub)
646 DO i_counter = 1, my_group_l_size
649 particle_set, pw_env_sub, my_lrows(:, i_counter), poisson_env, rho_r, pot_g, &
650 ri_metric, mat_munu, qs_env, task_list_sub)
653 CALL ao_to_mo_and_store_b(para_env_sub, mat_munu, intermed_mat(ispin), &
654 bib_c(ispin)%array(i_counter, :, :), &
655 mo_coeff_o(ispin)%matrix, mo_coeff_v(ispin)%matrix, eps_filter, &
656 my_b_virtual_end(ispin), my_b_virtual_start(ispin))
663 CALL ao_to_mo_and_store_b(para_env_sub, mat_munu, intermed_mat_gw(ispin), &
664 bib_c_gw(ispin)%array(i_counter, :, :), &
665 mo_coeff_gw(ispin)%matrix, mo_coeff_all(ispin)%matrix, eps_filter, &
666 my_b_all_end, my_b_all_start)
673 CALL cleanup_gpw(qs_env, e_cutoff_old, cutoff_old, relative_cutoff_old, para_env_sub, pw_env_sub, &
674 task_list_sub, auxbas_pw_pool, rho_r, rho_g, pot_g, psi_l)
676 cpabort(
"Integration method not implemented!")
679 CALL timestop(handle2)
681 DEALLOCATE (my_lrows)
684 CALL release_intermediate_matrices(intermed_mat(ispin))
686 DEALLOCATE (intermed_mat)
690 CALL release_intermediate_matrices(intermed_mat_gw(ispin))
692 DEALLOCATE (intermed_mat_gw)
697 CALL release_intermediate_matrices(intermed_mat_bse_ab(ispin))
698 CALL release_intermediate_matrices(intermed_mat_bse_ij(ispin))
700 DEALLOCATE (intermed_mat_bse_ab, intermed_mat_bse_ij)
706 memory_info = qs_env%mp2_env%ri_rpa_im_time%memory_info
714 CALL get_qs_env(qs_env, natom=natom, nkind=nkind, dft_control=dft_control)
717 CALL dbt_pgrid_create(para_env, pdims_t3c, pgrid_t3c_overl)
720 ALLOCATE (sizes_ri(natom), sizes_ao(natom))
721 ALLOCATE (basis_set_ri_aux(nkind), basis_set_ao(nkind))
723 CALL get_particle_set(particle_set, qs_kind_set, nsgf=sizes_ri, basis=basis_set_ri_aux)
725 CALL get_particle_set(particle_set, qs_kind_set, nsgf=sizes_ao, basis=basis_set_ao)
734 eps_pgf_orb = sqrt(eps_pgf_orb)
736 eps_pgf_orb_old = dft_control%qs_control%eps_pgf_orb
738 DO ibasis = 1,
SIZE(basis_set_ao)
739 orb_basis => basis_set_ao(ibasis)%gto_basis_set
741 ri_basis => basis_set_ri_aux(ibasis)%gto_basis_set
745 cut_memory_int = qs_env%mp2_env%ri_rpa_im_time%cut_memory
747 starts_array_mc_block_int, ends_array_mc_block_int)
749 DEALLOCATE (starts_array_mc_int, ends_array_mc_int)
751 CALL create_3c_tensor(t_3c_overl_int_template, dist_ri, dist_ao_1, dist_ao_2, pgrid_t3c_overl, &
752 sizes_ri, sizes_ao, sizes_ao, map1=[1, 2], map2=[3], &
753 name=
"O (RI AO | AO)")
755 CALL get_qs_env(qs_env, nkind=nkind, particle_set=particle_set)
756 CALL dbt_mp_environ_pgrid(pgrid_t3c_overl, pdims, pcoord)
757 CALL mp_comm_t3c_2%create(pgrid_t3c_overl%mp_comm_2d, 3, pdims)
759 nkind, particle_set, mp_comm_t3c_2, own_comm=.true.)
760 DEALLOCATE (dist_ri, dist_ao_1, dist_ao_2)
763 dist_3d, ri_metric,
"RPA_3c_nl", qs_env, &
764 sym_jk=.NOT. do_kpoints_cubic_rpa, own_dist=.true.)
767 IF (do_kpoints_cubic_rpa)
THEN
771 IF (unit_nr > 0)
WRITE (unit=unit_nr, fmt=
"(T3,A,T75,i6)") &
772 "3C_OVERLAP_INTEGRALS_INFO| Number of periodic images considered:", dft_control%nimages
774 nimg = dft_control%nimages
779 ALLOCATE (t_3c_overl_int(nimg, nimg))
781 DO i = 1,
SIZE(t_3c_overl_int, 1)
782 DO j = 1,
SIZE(t_3c_overl_int, 2)
783 CALL dbt_create(t_3c_overl_int_template, t_3c_overl_int(i, j))
787 CALL dbt_destroy(t_3c_overl_int_template)
790 min_bsize = qs_env%mp2_env%ri_rpa_im_time%min_bsize
792 CALL pgf_block_sizes(atomic_kind_set, basis_set_ao, min_bsize, sizes_ao_split)
793 CALL pgf_block_sizes(atomic_kind_set, basis_set_ri_aux, min_bsize, sizes_ri_split)
796 CALL dbt_pgrid_create(para_env, pdims_t3c, pgrid_t3c_m)
798 associate(cut_memory => qs_env%mp2_env%ri_rpa_im_time%cut_memory)
800 starts_array_mc_block, ends_array_mc_block)
802 qs_env%mp2_env%ri_rpa_im_time%starts_array_mc_RI, &
803 qs_env%mp2_env%ri_rpa_im_time%ends_array_mc_RI, &
804 qs_env%mp2_env%ri_rpa_im_time%starts_array_mc_block_RI, &
805 qs_env%mp2_env%ri_rpa_im_time%ends_array_mc_block_RI)
808 cut_memory = qs_env%mp2_env%ri_rpa_im_time%cut_memory
810 CALL create_3c_tensor(t_3c_m, dist_ri, dist_ao_1, dist_ao_2, pgrid_t3c_m, &
811 sizes_ri_split, sizes_ao_split, sizes_ao_split, &
812 map1=[1], map2=[2, 3], &
813 name=
"M (RI | AO AO)")
814 DEALLOCATE (dist_ri, dist_ao_1, dist_ao_2)
815 CALL dbt_pgrid_destroy(pgrid_t3c_m)
817 ALLOCATE (t_3c_o(
SIZE(t_3c_overl_int, 1),
SIZE(t_3c_overl_int, 2)))
818 ALLOCATE (t_3c_o_compressed(
SIZE(t_3c_overl_int, 1),
SIZE(t_3c_overl_int, 2), cut_memory))
819 ALLOCATE (t_3c_o_ind(
SIZE(t_3c_overl_int, 1),
SIZE(t_3c_overl_int, 2), cut_memory))
820 CALL create_3c_tensor(t_3c_o(1, 1), dist_ri, dist_ao_1, dist_ao_2, pgrid_t3c_overl, &
821 sizes_ri_split, sizes_ao_split, sizes_ao_split, &
822 map1=[1, 2], map2=[3], &
823 name=
"O (RI AO | AO)")
824 DEALLOCATE (dist_ri, dist_ao_1, dist_ao_2)
825 CALL dbt_pgrid_destroy(pgrid_t3c_overl)
827 DO i = 1,
SIZE(t_3c_o, 1)
828 DO j = 1,
SIZE(t_3c_o, 2)
829 IF (i > 1 .OR. j > 1)
CALL dbt_create(t_3c_o(1, 1), t_3c_o(i, j))
837 DO cm = 1, cut_memory_int
838 CALL build_3c_integrals(t_3c_overl_int, &
839 qs_env%mp2_env%ri_rpa_im_time%eps_filter/2, &
842 int_eps=qs_env%mp2_env%ri_rpa_im_time%eps_filter/2, &
843 basis_i=basis_set_ri_aux, &
844 basis_j=basis_set_ao, basis_k=basis_set_ao, &
845 potential_parameter=ri_metric, &
846 do_kpoints=do_kpoints_cubic_rpa, &
847 bounds_i=[starts_array_mc_block_int(cm), ends_array_mc_block_int(cm)], desymmetrize=.false.)
848 CALL timeset(routinen//
"_copy_3c", handle4)
850 DO i = 1,
SIZE(t_3c_overl_int, 1)
851 DO j = 1,
SIZE(t_3c_overl_int, 2)
853 CALL dbt_copy(t_3c_overl_int(i, j), t_3c_o(i, j), order=[1, 3, 2], &
854 summation=.true., move_data=.true.)
855 CALL dbt_clear(t_3c_overl_int(i, j))
856 CALL dbt_filter(t_3c_o(i, j), qs_env%mp2_env%ri_rpa_im_time%eps_filter/2)
858 IF (do_kpoints_cubic_rpa .AND. cm == cut_memory_int)
THEN
859 CALL dbt_scale(t_3c_o(i, j), 0.5_dp)
863 CALL timestop(handle4)
866 DO i = 1,
SIZE(t_3c_overl_int, 1)
867 DO j = 1,
SIZE(t_3c_overl_int, 2)
868 CALL dbt_destroy(t_3c_overl_int(i, j))
871 DEALLOCATE (t_3c_overl_int)
873 CALL timeset(routinen//
"_copy_3c", handle4)
875 CALL dbt_create(t_3c_o(1, 1), t_3c_tmp)
878 CALL dbt_copy(t_3c_o(jcell, kcell), t_3c_tmp)
879 CALL dbt_copy(t_3c_tmp, t_3c_o(kcell, jcell), order=[1, 3, 2], summation=.true., move_data=.true.)
880 CALL dbt_filter(t_3c_o(kcell, jcell), qs_env%mp2_env%ri_rpa_im_time%eps_filter)
884 DO kcell = jcell + 1, nimg
885 CALL dbt_copy(t_3c_o(jcell, kcell), t_3c_tmp)
886 CALL dbt_copy(t_3c_tmp, t_3c_o(kcell, jcell), order=[1, 3, 2], summation=.false., move_data=.true.)
887 CALL dbt_filter(t_3c_o(kcell, jcell), qs_env%mp2_env%ri_rpa_im_time%eps_filter)
891 CALL dbt_get_info(t_3c_o(1, 1), nfull_total=bounds_3c)
892 CALL get_tensor_occupancy(t_3c_o(1, 1), nze, occ)
895 bounds(:, 1) = [1, bounds_3c(1)]
896 bounds(:, 3) = [1, bounds_3c(3)]
897 DO i = 1,
SIZE(t_3c_o, 1)
898 DO j = 1,
SIZE(t_3c_o, 2)
899 DO i_mem = 1, cut_memory
900 bounds(:, 2) = [starts_array_mc(i_mem), ends_array_mc(i_mem)]
901 CALL dbt_copy(t_3c_o(i, j), t_3c_tmp, bounds=bounds)
903 CALL alloc_containers(t_3c_o_compressed(i, j, i_mem), 1)
904 CALL compress_tensor(t_3c_tmp, t_3c_o_ind(i, j, i_mem)%ind, &
905 t_3c_o_compressed(i, j, i_mem), &
906 qs_env%mp2_env%ri_rpa_im_time%eps_compress, memory_3c)
908 CALL dbt_clear(t_3c_o(i, j))
912 CALL para_env%sum(memory_3c)
914 compression_factor = real(nze, dp)*1.0e-06*8.0_dp/memory_3c
916 IF (unit_nr > 0)
THEN
917 WRITE (unit=unit_nr, fmt=
"((T3,A,T66,F11.2,A4))") &
918 "MEMORY_INFO| Memory for 3-center integrals (compressed):", memory_3c,
' MiB'
920 WRITE (unit=unit_nr, fmt=
"((T3,A,T60,F21.2))") &
921 "MEMORY_INFO| Compression factor: ", compression_factor
924 CALL dbt_destroy(t_3c_tmp)
926 CALL timestop(handle4)
928 DO ibasis = 1,
SIZE(basis_set_ao)
929 orb_basis => basis_set_ao(ibasis)%gto_basis_set
930 CALL init_interaction_radii_orb_basis(orb_basis, eps_pgf_orb_old)
931 ri_basis => basis_set_ri_aux(ibasis)%gto_basis_set
932 CALL init_interaction_radii_orb_basis(ri_basis, eps_pgf_orb_old)
935 DEALLOCATE (basis_set_ri_aux, basis_set_ao)
937 CALL neighbor_list_3c_destroy(nl_3c)
941 CALL timestop(handle)
957 SUBROUTINE contract_b_l(BIb_C, my_Lrows, sizes_B, sizes_L, blk_size, ngroup, igroup, mp_comm, para_env_sub)
958 REAL(kind=dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: bib_c
959 REAL(kind=dp),
DIMENSION(:, :),
INTENT(IN) :: my_lrows
960 INTEGER,
DIMENSION(:),
INTENT(IN) :: sizes_b, sizes_l
961 INTEGER,
DIMENSION(2),
INTENT(IN) :: blk_size
962 INTEGER,
INTENT(IN) :: ngroup, igroup
964 CLASS(mp_comm_type),
INTENT(IN) :: mp_comm
965 TYPE(mp_para_env_type),
INTENT(IN) :: para_env_sub
967 CHARACTER(LEN=*),
PARAMETER :: routinen =
'contract_B_L'
968 LOGICAL,
PARAMETER :: debug = .false.
970 INTEGER :: check_proc, handle, i, iend, ii, ioff, &
971 istart, loc_a, loc_p, nblk_per_thread
972 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: block_ind_l_p, block_ind_l_r
973 INTEGER,
DIMENSION(1) :: dist_b_i, map_b_1, map_l_1, map_l_2, &
975 INTEGER,
DIMENSION(2) :: map_b_2, pdims_l
976 INTEGER,
DIMENSION(3) :: pdims_b
978 INTEGER,
DIMENSION(ngroup) :: dist_l_p, dist_l_r
979 INTEGER,
DIMENSION(para_env_sub%num_pe) :: dist_b_a
980 TYPE(dbt_distribution_type) :: dist_b, dist_l
981 TYPE(dbt_pgrid_type) :: mp_comm_b, mp_comm_l
982 TYPE(dbt_type) :: tb_in, tb_in_split, tb_out, &
983 tb_out_split, tl, tl_split
985 CALL timeset(routinen, handle)
987 sizes_i(1) =
SIZE(bib_c, 3)
989 associate(nproc => para_env_sub%num_pe, iproc => para_env_sub%mepos, iproc_glob => mp_comm%mepos)
992 loc_p = igroup + 1; loc_a = iproc + 1
994 cpassert(
SIZE(sizes_l) == ngroup)
995 cpassert(
SIZE(sizes_b) == nproc)
996 cpassert(sizes_l(loc_p) ==
SIZE(bib_c, 1))
997 cpassert(sizes_l(loc_p) ==
SIZE(my_lrows, 2))
998 cpassert(sizes_b(loc_a) ==
SIZE(bib_c, 2))
1018 pdims_b = [ngroup, nproc, 1]
1019 pdims_l = [nproc, ngroup]
1021 CALL dbt_pgrid_create(mp_comm, pdims_b, mp_comm_b)
1022 CALL dbt_pgrid_create(mp_comm, pdims_l, mp_comm_l)
1026 dist_b_a = [(i, i=0, nproc - 1)]
1027 dist_l_r = [(
modulo(i, nproc), i=0, ngroup - 1)]
1028 dist_l_p = [(i, i=0, ngroup - 1)]
1031 CALL dbt_distribution_new(dist_b, mp_comm_b, dist_l_p, dist_b_a, dist_b_i)
1032 CALL dbt_distribution_new(dist_l, mp_comm_l, dist_l_r, dist_l_p)
1034 CALL dbt_create(tb_in,
"(R|ai)", dist_b, map_b_1, map_b_2, sizes_l, sizes_b, sizes_i)
1035 CALL dbt_create(tb_out,
"(P|ai)", dist_b, map_b_1, map_b_2, sizes_l, sizes_b, sizes_i)
1036 CALL dbt_create(tl,
"(R|P)", dist_l, map_l_1, map_l_2, sizes_l, sizes_l)
1040 CALL dbt_get_stored_coordinates(tb_in, [loc_p, loc_a, 1], check_proc)
1041 cpassert(check_proc == iproc_glob)
1046 CALL dbt_reserve_blocks(tb_in, [loc_p], [loc_a], [1])
1053 ALLOCATE (block_ind_l_r(ngroup/nproc + 1))
1054 ALLOCATE (block_ind_l_p(ngroup/nproc + 1))
1055 block_ind_l_r(:) = 0; block_ind_l_p(:) = 0
1058 CALL dbt_get_stored_coordinates(tl, [i, loc_p], check_proc)
1059 IF (check_proc == iproc_glob)
THEN
1061 block_ind_l_r(ii) = i
1062 block_ind_l_p(ii) = loc_p
1069 nblk_per_thread = ii/omp_get_num_threads() + 1
1070 istart = omp_get_thread_num()*nblk_per_thread + 1
1071 iend = min(istart + nblk_per_thread, ii)
1072 CALL dbt_reserve_blocks(tl, block_ind_l_r(istart:iend), block_ind_l_p(istart:iend))
1076 CALL dbt_put_block(tb_in, [loc_p, loc_a, 1], shape(bib_c), bib_c)
1081 istart = ioff + 1; iend = ioff + sizes_l(i)
1082 ioff = ioff + sizes_l(i)
1083 CALL dbt_get_stored_coordinates(tl, [i, loc_p], check_proc)
1084 IF (check_proc == iproc_glob)
THEN
1085 CALL dbt_put_block(tl, [i, loc_p], [sizes_l(i), sizes_l(loc_p)], my_lrows(istart:iend, :))
1090 CALL dbt_split_blocks(tb_in, tb_in_split, [blk_size(2), blk_size(1), blk_size(1)])
1091 CALL dbt_split_blocks(tl, tl_split, [blk_size(2), blk_size(2)])
1092 CALL dbt_split_blocks(tb_out, tb_out_split, [blk_size(2), blk_size(1), blk_size(1)])
1095 CALL dbt_contract(alpha=1.0_dp, tensor_1=tb_in_split, tensor_2=tl_split, &
1096 beta=0.0_dp, tensor_3=tb_out_split, &
1097 contract_1=[1], notcontract_1=[2, 3], &
1098 contract_2=[1], notcontract_2=[2], &
1099 map_1=[2, 3], map_2=[1], optimize_dist=.true.)
1102 CALL dbt_copy(tb_out_split, tb_out)
1104 CALL dbt_get_block(tb_out, [loc_p, loc_a, 1], shape(bib_c), bib_c, found)
1108 CALL dbt_destroy(tb_in)
1109 CALL dbt_destroy(tb_in_split)
1110 CALL dbt_destroy(tb_out)
1111 CALL dbt_destroy(tb_out_split)
1112 CALL dbt_destroy(tl)
1113 CALL dbt_destroy(tl_split)
1115 CALL dbt_distribution_destroy(dist_b)
1116 CALL dbt_distribution_destroy(dist_l)
1118 CALL dbt_pgrid_destroy(mp_comm_b)
1119 CALL dbt_pgrid_destroy(mp_comm_l)
1121 CALL timestop(handle)
1123 END SUBROUTINE contract_b_l
1138 SUBROUTINE create_intermediate_matrices(intermed_mat, mo_coeff_templ, size_1, size_2, &
1139 matrix_name_2, blacs_env_sub, para_env_sub)
1141 TYPE(intermediate_matrix_type),
INTENT(OUT) :: intermed_mat
1142 TYPE(dbcsr_type),
INTENT(INOUT) :: mo_coeff_templ
1143 INTEGER,
INTENT(IN) :: size_1, size_2
1144 CHARACTER(LEN=*),
INTENT(IN) :: matrix_name_2
1145 TYPE(cp_blacs_env_type),
POINTER :: blacs_env_sub
1146 TYPE(mp_para_env_type),
POINTER :: para_env_sub
1148 CHARACTER(LEN=*),
PARAMETER :: routinen =
'create_intermediate_matrices'
1150 INTEGER :: handle, ncol_local, nfullcols_total, &
1151 nfullrows_total, nrow_local
1152 INTEGER,
DIMENSION(:),
POINTER :: col_indices, row_indices
1153 TYPE(cp_fm_struct_type),
POINTER :: fm_struct
1155 CALL timeset(routinen, handle)
1158 CALL dbcsr_create(intermed_mat%matrix_ia_jnu, template=mo_coeff_templ)
1161 CALL cp_dbcsr_m_by_n_from_template(intermed_mat%matrix_ia_jb, template=mo_coeff_templ, m=size_2, n=size_1, &
1162 sym=dbcsr_type_no_symmetry)
1165 CALL dbcsr_set(intermed_mat%matrix_ia_jnu, 0.0_dp)
1166 CALL dbcsr_set(intermed_mat%matrix_ia_jb, 0.0_dp)
1170 CALL dbcsr_get_info(intermed_mat%matrix_ia_jb, nfullrows_total=nfullrows_total, nfullcols_total=nfullcols_total)
1171 CALL cp_fm_struct_create(fm_struct, context=blacs_env_sub, nrow_global=nfullrows_total, &
1172 ncol_global=nfullcols_total, para_env=para_env_sub)
1173 CALL cp_fm_create(intermed_mat%fm_BIb_jb, fm_struct, name=
"fm_BIb_jb_"//matrix_name_2)
1175 CALL copy_dbcsr_to_fm(intermed_mat%matrix_ia_jb, intermed_mat%fm_BIb_jb)
1176 CALL cp_fm_struct_release(fm_struct)
1178 CALL cp_fm_get_info(matrix=intermed_mat%fm_BIb_jb, &
1179 nrow_local=nrow_local, &
1180 ncol_local=ncol_local, &
1181 row_indices=row_indices, &
1182 col_indices=col_indices)
1184 intermed_mat%max_row_col_local = max(nrow_local, ncol_local)
1185 CALL para_env_sub%max(intermed_mat%max_row_col_local)
1187 ALLOCATE (intermed_mat%local_col_row_info(0:intermed_mat%max_row_col_local, 2))
1188 intermed_mat%local_col_row_info = 0
1190 intermed_mat%local_col_row_info(0, 1) = nrow_local
1191 intermed_mat%local_col_row_info(1:nrow_local, 1) = row_indices(1:nrow_local)
1193 intermed_mat%local_col_row_info(0, 2) = ncol_local
1194 intermed_mat%local_col_row_info(1:ncol_local, 2) = col_indices(1:ncol_local)
1196 intermed_mat%descr = matrix_name_2
1198 CALL timestop(handle)
1200 END SUBROUTINE create_intermediate_matrices
1214 SUBROUTINE ao_to_mo_and_store_b(para_env, mat_munu, intermed_mat, BIb_jb, &
1215 mo_coeff_o, mo_coeff_v, eps_filter, &
1216 my_B_end, my_B_start)
1217 TYPE(mp_para_env_type),
INTENT(IN) :: para_env
1218 TYPE(dbcsr_p_type),
INTENT(IN) :: mat_munu
1219 TYPE(intermediate_matrix_type),
INTENT(INOUT) :: intermed_mat
1220 REAL(kind=dp),
DIMENSION(:, :),
INTENT(OUT) :: bib_jb
1221 TYPE(dbcsr_type),
POINTER :: mo_coeff_o, mo_coeff_v
1222 REAL(kind=dp),
INTENT(IN) :: eps_filter
1223 INTEGER,
INTENT(IN) :: my_b_end, my_b_start
1225 CHARACTER(LEN=*),
PARAMETER :: routinen =
'ao_to_mo_and_store_B'
1229 CALL timeset(routinen//
"_mult_"//trim(intermed_mat%descr), handle)
1231 CALL dbcsr_multiply(
"N",
"N", 1.0_dp, mat_munu%matrix, mo_coeff_o, &
1232 0.0_dp, intermed_mat%matrix_ia_jnu, filter_eps=eps_filter)
1233 CALL dbcsr_multiply(
"T",
"N", 1.0_dp, intermed_mat%matrix_ia_jnu, mo_coeff_v, &
1234 0.0_dp, intermed_mat%matrix_ia_jb, filter_eps=eps_filter)
1235 CALL timestop(handle)
1237 CALL timeset(routinen//
"_E_Ex_"//trim(intermed_mat%descr), handle)
1238 CALL copy_dbcsr_to_fm(intermed_mat%matrix_ia_jb, intermed_mat%fm_BIb_jb)
1240 CALL grep_my_integrals(para_env, intermed_mat%fm_BIb_jb, bib_jb, intermed_mat%max_row_col_local, &
1241 intermed_mat%local_col_row_info, &
1242 my_b_end, my_b_start)
1244 CALL timestop(handle)
1245 END SUBROUTINE ao_to_mo_and_store_b
1251 SUBROUTINE release_intermediate_matrices(intermed_mat)
1252 TYPE(intermediate_matrix_type),
INTENT(INOUT) :: intermed_mat
1254 CALL dbcsr_release(intermed_mat%matrix_ia_jnu)
1255 CALL dbcsr_release(intermed_mat%matrix_ia_jb)
1256 CALL cp_fm_release(intermed_mat%fm_BIb_jb)
1257 DEALLOCATE (intermed_mat%local_col_row_info)
1259 END SUBROUTINE release_intermediate_matrices
1269 TYPE(qs_environment_type),
POINTER :: qs_env
1270 TYPE(kpoint_type),
POINTER :: kpoints
1273 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_kpoints'
1275 INTEGER :: handle, i, i_dim, ix, iy, iz, nkp, &
1277 INTEGER,
DIMENSION(3) :: nkp_grid, nkp_grid_extra, periodic
1278 LOGICAL :: do_extrapolate_kpoints
1279 TYPE(cell_type),
POINTER :: cell
1280 TYPE(dft_control_type),
POINTER :: dft_control
1281 TYPE(mp_para_env_type),
POINTER :: para_env
1282 TYPE(neighbor_list_set_p_type),
DIMENSION(:), &
1285 CALL timeset(routinen, handle)
1287 NULLIFY (cell, dft_control, para_env)
1288 CALL get_qs_env(qs_env=qs_env, cell=cell, para_env=para_env, dft_control=dft_control, sab_orb=sab_orb)
1289 CALL get_cell(cell=cell, periodic=periodic)
1292 kpoints%kp_scheme =
"GENERAL"
1293 kpoints%symmetry = .false.
1294 kpoints%verbose = .false.
1295 kpoints%full_grid = .true.
1296 kpoints%use_real_wfn = .false.
1297 kpoints%eps_geo = 1.e-6_dp
1298 nkp_grid(1:3) = qs_env%mp2_env%ri_rpa_im_time%kp_grid(1:3)
1299 do_extrapolate_kpoints = qs_env%mp2_env%ri_rpa_im_time%do_extrapolate_kpoints
1302 IF (periodic(i_dim) == 1)
THEN
1303 cpassert(
modulo(nkp_grid(i_dim), 2) == 0)
1305 IF (periodic(i_dim) == 0)
THEN
1306 cpassert(nkp_grid(i_dim) == 1)
1310 nkp_orig = nkp_grid(1)*nkp_grid(2)*nkp_grid(3)/2
1312 IF (do_extrapolate_kpoints)
THEN
1314 cpassert(qs_env%mp2_env%ri_rpa_im_time%kpoint_weights_W_method == kp_weights_w_uniform)
1317 IF (periodic(i_dim) == 1) nkp_grid_extra(i_dim) = nkp_grid(i_dim) + 2
1318 IF (periodic(i_dim) == 0) nkp_grid_extra(i_dim) = 1
1321 qs_env%mp2_env%ri_rpa_im_time%kp_grid_extra(1:3) = nkp_grid_extra(1:3)
1323 nkp_extra = nkp_grid_extra(1)*nkp_grid_extra(2)*nkp_grid_extra(3)/2
1327 nkp_grid_extra(1:3) = 0
1332 nkp = nkp_orig + nkp_extra
1334 qs_env%mp2_env%ri_rpa_im_time%nkp_orig = nkp_orig
1335 qs_env%mp2_env%ri_rpa_im_time%nkp_extra = nkp_extra
1337 ALLOCATE (kpoints%xkp(3, nkp), kpoints%wkp(nkp))
1339 kpoints%nkp_grid(1:3) = nkp_grid(1:3)
1342 ALLOCATE (qs_env%mp2_env%ri_rpa_im_time%wkp_V(nkp))
1343 IF (do_extrapolate_kpoints)
THEN
1344 kpoints%wkp(1:nkp_orig) = 1.0_dp/real(nkp_orig, kind=dp) &
1345 /(1.0_dp - sqrt(real(nkp_extra, kind=dp)/real(nkp_orig, kind=dp)))
1346 kpoints%wkp(nkp_orig + 1:nkp) = 1.0_dp/real(nkp_extra, kind=dp) &
1347 /(1.0_dp - sqrt(real(nkp_orig, kind=dp)/real(nkp_extra, kind=dp)))
1348 qs_env%mp2_env%ri_rpa_im_time%wkp_V(1:nkp_orig) = 0.0_dp
1349 qs_env%mp2_env%ri_rpa_im_time%wkp_V(nkp_orig + 1:nkp) = 1.0_dp/real(nkp_extra, kind=dp)
1351 kpoints%wkp(:) = 1.0_dp/real(nkp, kind=dp)
1352 qs_env%mp2_env%ri_rpa_im_time%wkp_V(:) = kpoints%wkp(:)
1356 DO ix = 1, nkp_grid(1)
1357 DO iy = 1, nkp_grid(2)
1358 DO iz = 1, nkp_grid(3)
1360 IF (i == nkp_orig) cycle
1363 kpoints%xkp(1, i) = real(2*ix - nkp_grid(1) - 1, kind=dp)/(2._dp*real(nkp_grid(1), kind=dp))
1364 kpoints%xkp(2, i) = real(2*iy - nkp_grid(2) - 1, kind=dp)/(2._dp*real(nkp_grid(2), kind=dp))
1365 kpoints%xkp(3, i) = real(2*iz - nkp_grid(3) - 1, kind=dp)/(2._dp*real(nkp_grid(3), kind=dp))
1371 DO ix = 1, nkp_grid_extra(1)
1372 DO iy = 1, nkp_grid_extra(2)
1373 DO iz = 1, nkp_grid_extra(3)
1378 kpoints%xkp(1, i) = real(2*ix - nkp_grid_extra(1) - 1, kind=dp)/(2._dp*real(nkp_grid_extra(1), kind=dp))
1379 kpoints%xkp(2, i) = real(2*iy - nkp_grid_extra(2) - 1, kind=dp)/(2._dp*real(nkp_grid_extra(2), kind=dp))
1380 kpoints%xkp(3, i) = real(2*iz - nkp_grid_extra(3) - 1, kind=dp)/(2._dp*real(nkp_grid_extra(3), kind=dp))
1386 CALL kpoint_init_cell_index(kpoints, sab_orb, para_env, dft_control%nimages)
1388 CALL set_qs_env(qs_env, kpoints=kpoints)
1390 IF (unit_nr > 0)
THEN
1392 IF (do_extrapolate_kpoints)
THEN
1393 WRITE (unit=unit_nr, fmt=
"(T3,A,T69,3I4)")
"KPOINT_INFO| K-point mesh for V (leading to Sigma^x):", nkp_grid(1:3)
1394 WRITE (unit=unit_nr, fmt=
"(T3,A,T69)")
"KPOINT_INFO| K-point extrapolation for W^c is used (W^c leads to Sigma^c):"
1395 WRITE (unit=unit_nr, fmt=
"(T3,A,T69,3I4)")
"KPOINT_INFO| K-point mesh 1 for W^c:", nkp_grid(1:3)
1396 WRITE (unit=unit_nr, fmt=
"(T3,A,T69,3I4)")
"KPOINT_INFO| K-point mesh 2 for W^c:", nkp_grid_extra(1:3)
1398 WRITE (unit=unit_nr, fmt=
"(T3,A,T69,3I4)")
"KPOINT_INFO| K-point mesh for V and W:", nkp_grid(1:3)
1399 WRITE (unit=unit_nr, fmt=
"(T3,A,T75,I6)")
"KPOINT_INFO| Number of kpoints for V and W:", nkp
1402 SELECT CASE (qs_env%mp2_env%ri_rpa_im_time%kpoint_weights_W_method)
1403 CASE (kp_weights_w_tailored)
1404 WRITE (unit=unit_nr, fmt=
"(T3,A,T81)") &
1405 "KPOINT_INFO| K-point weights for W: TAILORED"
1406 CASE (kp_weights_w_auto)
1407 WRITE (unit=unit_nr, fmt=
"(T3,A,T81)") &
1408 "KPOINT_INFO| K-point weights for W: AUTO"
1409 CASE (kp_weights_w_uniform)
1410 WRITE (unit=unit_nr, fmt=
"(T3,A,T81)") &
1411 "KPOINT_INFO| K-point weights for W: UNIFORM"
1416 CALL timestop(handle)
1430 SUBROUTINE grep_my_integrals(para_env_sub, fm_BIb_jb, BIb_jb, max_row_col_local, &
1431 local_col_row_info, &
1432 my_B_virtual_end, my_B_virtual_start)
1433 TYPE(mp_para_env_type),
INTENT(IN) :: para_env_sub
1434 TYPE(cp_fm_type),
INTENT(IN) :: fm_bib_jb
1435 REAL(kind=dp),
DIMENSION(:, :),
INTENT(OUT) :: bib_jb
1436 INTEGER,
INTENT(IN) :: max_row_col_local
1437 INTEGER,
ALLOCATABLE,
DIMENSION(:, :),
INTENT(IN) :: local_col_row_info
1438 INTEGER,
INTENT(IN) :: my_b_virtual_end, my_b_virtual_start
1440 INTEGER :: i_global, iib, j_global, jjb, ncol_rec, &
1441 nrow_rec, proc_receive, proc_send, &
1443 INTEGER,
ALLOCATABLE,
DIMENSION(:, :) :: rec_col_row_info
1444 INTEGER,
DIMENSION(:),
POINTER :: col_indices_rec, row_indices_rec
1445 REAL(kind=dp),
DIMENSION(:, :),
POINTER :: local_bi, rec_bi
1447 ALLOCATE (rec_col_row_info(0:max_row_col_local, 2))
1449 rec_col_row_info(:, :) = local_col_row_info
1451 nrow_rec = rec_col_row_info(0, 1)
1452 ncol_rec = rec_col_row_info(0, 2)
1454 ALLOCATE (row_indices_rec(nrow_rec))
1455 row_indices_rec = rec_col_row_info(1:nrow_rec, 1)
1457 ALLOCATE (col_indices_rec(ncol_rec))
1458 col_indices_rec = rec_col_row_info(1:ncol_rec, 2)
1461 DO jjb = 1, ncol_rec
1462 j_global = col_indices_rec(jjb)
1463 IF (j_global >= my_b_virtual_start .AND. j_global <= my_b_virtual_end)
THEN
1464 DO iib = 1, nrow_rec
1465 i_global = row_indices_rec(iib)
1466 bib_jb(j_global - my_b_virtual_start + 1, i_global) = fm_bib_jb%local_data(iib, jjb)
1471 DEALLOCATE (row_indices_rec)
1472 DEALLOCATE (col_indices_rec)
1474 IF (para_env_sub%num_pe > 1)
THEN
1475 ALLOCATE (local_bi(nrow_rec, ncol_rec))
1476 local_bi(1:nrow_rec, 1:ncol_rec) = fm_bib_jb%local_data(1:nrow_rec, 1:ncol_rec)
1478 DO proc_shift = 1, para_env_sub%num_pe - 1
1479 proc_send =
modulo(para_env_sub%mepos + proc_shift, para_env_sub%num_pe)
1480 proc_receive =
modulo(para_env_sub%mepos - proc_shift, para_env_sub%num_pe)
1483 rec_col_row_info = 0
1484 CALL para_env_sub%sendrecv(local_col_row_info, proc_send, rec_col_row_info, proc_receive)
1485 nrow_rec = rec_col_row_info(0, 1)
1486 ncol_rec = rec_col_row_info(0, 2)
1488 ALLOCATE (row_indices_rec(nrow_rec))
1489 row_indices_rec = rec_col_row_info(1:nrow_rec, 1)
1491 ALLOCATE (col_indices_rec(ncol_rec))
1492 col_indices_rec = rec_col_row_info(1:ncol_rec, 2)
1494 ALLOCATE (rec_bi(nrow_rec, ncol_rec))
1498 CALL para_env_sub%sendrecv(local_bi, proc_send, rec_bi, proc_receive)
1501 DO jjb = 1, ncol_rec
1502 j_global = col_indices_rec(jjb)
1503 IF (j_global >= my_b_virtual_start .AND. j_global <= my_b_virtual_end)
THEN
1504 DO iib = 1, nrow_rec
1505 i_global = row_indices_rec(iib)
1506 bib_jb(j_global - my_b_virtual_start + 1, i_global) = rec_bi(iib, jjb)
1511 DEALLOCATE (col_indices_rec)
1512 DEALLOCATE (row_indices_rec)
1516 DEALLOCATE (local_bi)
1519 DEALLOCATE (rec_col_row_info)
1521 END SUBROUTINE grep_my_integrals
static GRID_HOST_DEVICE int modulo(int a, int m)
Equivalent of Fortran's MODULO, which always return a positive number. https://gcc....
Define the atomic kind types and their sub types.
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public delben2013
Handles all functions related to the CELL.
subroutine, public get_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
Get informations about a simulation cell.
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_release_p(matrix)
...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_multiply(transa, transb, alpha, matrix_a, matrix_b, beta, matrix_c, first_row, last_row, first_column, last_column, first_k, last_k, retain_sparsity, filter_eps, flop)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
DBCSR operations in CP2K.
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public cp_dbcsr_m_by_n_from_template(matrix, template, m, n, sym)
Utility function to create an arbitrary shaped dbcsr matrix with the same processor grid as the templ...
Interface to Minimax-Ewald method for periodic ERI's to be used in CP2K.
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
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, nrow, ncol, set_zero)
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 ...
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
This is the start of a dbt_api, all publically needed functions are exported here....
Types to describe group distributions.
Types and set/get functions for HFX.
subroutine, public alloc_containers(data, bin_size)
...
Defines the basic variable types.
integer, parameter, public int_8
integer, parameter, public dp
integer, parameter, public default_string_length
Routines needed for kpoint calculation.
subroutine, public kpoint_init_cell_index(kpoint, sab_nl, para_env, nimages)
Generates the mapping of cell indices and linear RS index CELL (0,0,0) is always mapped to index 1.
Types and basic routines needed for a kpoint calculation.
2- and 3-center electron repulsion integral routines based on libint2 Currently available operators: ...
pure logical function, public compare_potential_types(potential1, potential2)
Helper function to compare Coulomb operator types.
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_flush(lunit)
flushes units if the &GLOBAL flag is set accordingly
Interface to the message passing library MPI.
Routines to calculate 2c- and 3c-integrals for RI with GPW.
subroutine, public prepare_gpw(qs_env, dft_control, e_cutoff_old, cutoff_old, relative_cutoff_old, para_env_sub, pw_env_sub, auxbas_pw_pool, poisson_env, task_list_sub, rho_r, rho_g, pot_g, psi_l, sab_orb_sub)
Prepares GPW calculation for RI-MP2/RI-RPA.
subroutine, public mp2_eri_3c_integrate_gpw(psi_l, rho_g, atomic_kind_set, qs_kind_set, cell, dft_control, particle_set, pw_env_sub, external_vector, poisson_env, rho_r, pot_g, potential_parameter, mat_munu, qs_env, task_list_sub)
...
subroutine, public cleanup_gpw(qs_env, e_cutoff_old, cutoff_old, relative_cutoff_old, para_env_sub, pw_env_sub, task_list_sub, auxbas_pw_pool, rho_r, rho_g, pot_g, psi_l)
Cleanup GPW integration for RI-MP2/RI-RPA.
Interface to direct methods for electron repulsion integrals for MP2.
subroutine, public mp2_eri_3c_integrate(param, potential_parameter, para_env, qs_env, first_c, last_c, mat_ab, basis_type_a, basis_type_b, basis_type_c, sab_nl, eri_method, pabc, force_a, force_b, force_c, mat_dabc, mat_adbc, mat_abdc)
high-level integration routine for 3c integrals (ab|c) over CP2K basis sets. For each local function ...
Routines to calculate and distribute 2c- and 3c- integrals for RI.
subroutine, public mp2_ri_gpw_compute_in(bib_c, bib_c_gw, bib_c_bse_ij, bib_c_bse_ab, gd_array, gd_b_virtual, dimen_ri, dimen_ri_red, qs_env, para_env, para_env_sub, color_sub, cell, particle_set, atomic_kind_set, qs_kind_set, fm_matrix_pq, fm_matrix_l_kpoints, fm_matrix_minv_l_kpoints, fm_matrix_minv, fm_matrix_minv_vtrunc_minv, nmo, homo, mat_munu, sab_orb_sub, mo_coeff_o, mo_coeff_v, mo_coeff_all, mo_coeff_gw, mo_coeff_o_bse, mo_coeff_v_bse, eps_filter, unit_nr, mp2_memory, calc_pq_cond_num, calc_forces, blacs_env_sub, my_do_gw, do_bse, gd_b_all, starts_array_mc, ends_array_mc, starts_array_mc_block, ends_array_mc_block, gw_corr_lev_occ, gw_corr_lev_virt, bse_lev_virt, do_im_time, do_kpoints_cubic_rpa, kpoints, t_3c_m, t_3c_o, t_3c_o_compressed, t_3c_o_ind, ri_metric, gd_b_occ_bse, gd_b_virt_bse)
with ri mp2 gpw
subroutine, public compute_kpoints(qs_env, kpoints, unit_nr)
...
Framework for 2c-integrals for RI.
subroutine, public get_2c_integrals(qs_env, eri_method, eri_param, para_env, para_env_sub, mp2_memory, my_lrows, my_vrows, fm_matrix_pq, ngroup, color_sub, dimen_ri, dimen_ri_red, kpoints, my_group_l_size, my_group_l_start, my_group_l_end, gd_array, calc_pq_cond_num, do_svd, eps_svd, potential, ri_metric, fm_matrix_l_kpoints, fm_matrix_minv_l_kpoints, fm_matrix_minv, fm_matrix_minv_vtrunc_minv, do_im_time, do_kpoints, mp2_eps_pgf_orb_s, qs_kind_set, sab_orb_sub, calc_forces, unit_nr)
...
Types needed for MP2 calculations.
Define methods related to particle_type.
subroutine, public get_particle_set(particle_set, qs_kind_set, first_sgf, last_sgf, nsgf, nmao, basis, ncgf)
Get the components of a particle set.
Define the data structure for the particle information.
container for various plainwaves related things
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, mimic, 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, matrix_vhxc, 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, xcint_weights, 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 set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, mimic, ewald_env, ewald_pw, mpools, rho_external, external_vxc, mask, scf_control, rel_control, qs_charges, ks_env, ks_qmmm_env, wf_history, scf_env, active_space, input, oce, rho_atom_set, rho0_atom_set, rho0_mpole, run_rtp, rtp, rhoz_set, rhoz_tot, ecoul_1c, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, efield, rhoz_cneo_set, linres_control, xas_env, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, ls_scf_env, do_transport, transport_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, harris_env, gcp_env, mp2_env, bs_env, kg_env, force, kpoints, wanniercentres, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Set 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.
Calculate the interaction radii for the operator matrix calculation.
subroutine, public init_interaction_radii_orb_basis(orb_basis_set, eps_pgf_orb, eps_pgf_short)
...
Define the quickstep kind type and their sub types.
Define the neighbor list data types and the corresponding functionality.
Utility methods to build 3-center integral tensors of various types.
subroutine, public distribution_3d_create(dist_3d, dist1, dist2, dist3, nkind, particle_set, mp_comm_3d, own_comm)
Create a 3d distribution.
subroutine, public pgf_block_sizes(atomic_kind_set, basis, min_blk_size, pgf_blk_sizes)
...
subroutine, public create_tensor_batches(sizes, nbatches, starts_array, ends_array, starts_array_block, ends_array_block)
...
subroutine, public create_3c_tensor(t3c, dist_1, dist_2, dist_3, pgrid, sizes_1, sizes_2, sizes_3, map1, map2, name)
...
Utility methods to build 3-center integral tensors of various types.
subroutine, public build_3c_integrals(t3c, filter_eps, qs_env, nl_3c, basis_i, basis_j, basis_k, potential_parameter, int_eps, op_pos, do_kpoints, do_hfx_kpoints, desymmetrize, cell_sym, bounds_i, bounds_j, bounds_k, ri_range, img_to_ri_cell, cell_to_index_ext)
Build 3-center integral tensor.
subroutine, public compress_tensor(tensor, blk_indices, compressed, eps, memory)
...
subroutine, public neighbor_list_3c_destroy(ijk_list)
Destroy 3c neighborlist.
subroutine, public get_tensor_occupancy(tensor, nze, occ)
...
subroutine, public build_3c_neighbor_lists(ijk_list, basis_i, basis_j, basis_k, dist_3d, potential_parameter, name, qs_env, sym_ij, sym_jk, sym_ik, molecular, op_pos, own_dist)
Build a 3-center neighbor list.
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.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
Contains information about kpoints.
stores all the informations relevant to an mpi environment
contained for different pw related things
environment for the poisson solver
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.