84#include "./base/base_uses.f90"
90 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_tddfpt2_subgroups'
91 LOGICAL,
PARAMETER,
PRIVATE :: debug_this_module = .true.
106 LOGICAL :: is_split = .false.
108 INTEGER :: ngroups = -1
111 INTEGER,
DIMENSION(:),
ALLOCATABLE :: group_distribution
124 LOGICAL :: is_mgrid = .false.
133 DIMENSION(:),
POINTER :: sab_aux_fit => null(), sab_orb => null()
135 TYPE(
task_list_type),
POINTER :: task_list_aux_fit => null(), task_list_orb => null()
137 TYPE(
task_list_type),
POINTER :: task_list_aux_fit_soft => null(), task_list_orb_soft => null()
150 TYPE mgrid_saved_parameters
152 LOGICAL :: commensurate_mgrids = .false.
154 LOGICAL :: realspace_mgrids = .false.
156 LOGICAL :: skip_load_balance = .false.
158 REAL(kind=
dp) :: cutoff = 0.0_dp
160 REAL(kind=
dp) :: progression_factor = 0.0_dp
162 REAL(kind=
dp) :: relative_cutoff = 0.0_dp
164 REAL(kind=
dp),
DIMENSION(:),
POINTER :: e_cutoff => null()
165 END TYPE mgrid_saved_parameters
182 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(in) :: mos_occ
183 INTEGER,
INTENT(in) :: kernel
185 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_sub_env_init'
187 INTEGER :: handle, ispin, nao, nao_aux, natom, &
194 TYPE(mgrid_saved_parameters) :: mgrid_saved
198 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
201 CALL timeset(routinen, handle)
203 nspins =
SIZE(mos_occ)
205 CALL get_qs_env(qs_env, blacs_env=blacs_env_global, dft_control=dft_control, &
206 para_env=para_env_global, pw_env=pw_env_global)
208 tddfpt_control => dft_control%tddfpt2_control
209 qs_control => dft_control%qs_control
215 sub_env%is_split = tddfpt_control%nprocs > 0 .AND. tddfpt_control%nprocs*2 <= para_env_global%num_pe
217 ALLOCATE (sub_env%mos_occ(nspins))
218 NULLIFY (sub_env%admm_A)
220 IF (sub_env%is_split)
THEN
221 ALLOCATE (sub_env%group_distribution(0:para_env_global%num_pe - 1))
223 ALLOCATE (sub_env%para_env)
224 CALL sub_env%para_env%from_split(comm=para_env_global, ngroups=sub_env%ngroups, &
225 group_distribution=sub_env%group_distribution, subgroup_min_size=tddfpt_control%nprocs)
228 NULLIFY (sub_env%blacs_env)
240 CALL cp_fm_get_info(mos_occ(ispin), nrow_global=nao, ncol_global=nmo_occ)
241 CALL cp_fm_struct_create(fm_struct, nrow_global=nao, ncol_global=nmo_occ, context=sub_env%blacs_env)
245 fm_dest_sub=sub_env%mos_occ(ispin), sub_env=sub_env)
248 IF (dft_control%do_admm)
THEN
250 CALL cp_fm_get_info(admm_env%A, nrow_global=nao_aux, ncol_global=nao)
251 CALL cp_fm_struct_create(fm_struct, nrow_global=nao_aux, ncol_global=nao, context=sub_env%blacs_env)
252 ALLOCATE (sub_env%admm_A)
258 CALL para_env_global%retain()
259 sub_env%para_env => para_env_global
261 CALL blacs_env_global%retain()
262 sub_env%blacs_env => blacs_env_global
264 sub_env%mos_occ(:) = mos_occ(:)
266 IF (dft_control%do_admm)
THEN
268 sub_env%admm_A => admm_env%A
274 sub_env%is_mgrid = sub_env%is_split .OR. tddfpt_control%mgrid_is_explicit
276 NULLIFY (sub_env%dbcsr_dist, sub_env%dist_2d)
277 NULLIFY (sub_env%sab_orb, sub_env%sab_aux_fit)
278 NULLIFY (sub_env%task_list_orb, sub_env%task_list_aux_fit)
279 NULLIFY (sub_env%task_list_orb_soft, sub_env%task_list_aux_fit_soft)
281 IF (sub_env%is_mgrid)
THEN
282 IF (tddfpt_control%mgrid_is_explicit) &
283 CALL init_tddfpt_mgrid(qs_control, tddfpt_control, mgrid_saved)
285 NULLIFY (sub_env%pw_env)
290 CALL tddfpt_build_distribution_2d(distribution_2d=sub_env%dist_2d, dbcsr_dist=sub_env%dbcsr_dist, &
291 blacs_env=sub_env%blacs_env, qs_env=qs_env)
293 CALL tddfpt_build_tasklist(task_list=sub_env%task_list_orb, sab=sub_env%sab_orb, basis_type=
"ORB", &
294 distribution_2d=sub_env%dist_2d, pw_env=sub_env%pw_env, qs_env=qs_env, &
295 skip_load_balance=qs_control%skip_load_balance_distributed, &
296 reorder_grid_ranks=.true.)
298 IF (qs_control%gapw .OR. qs_control%gapw_xc)
THEN
299 CALL tddfpt_build_tasklist(task_list=sub_env%task_list_orb_soft, sab=sub_env%sab_orb, basis_type=
"ORB_SOFT", &
300 distribution_2d=sub_env%dist_2d, pw_env=sub_env%pw_env, qs_env=qs_env, &
301 skip_load_balance=qs_control%skip_load_balance_distributed, &
302 reorder_grid_ranks=.true.)
305 IF (dft_control%do_admm)
THEN
306 CALL tddfpt_build_tasklist(task_list=sub_env%task_list_aux_fit, sab=sub_env%sab_aux_fit, &
307 basis_type=
"AUX_FIT", distribution_2d=sub_env%dist_2d, &
308 pw_env=sub_env%pw_env, qs_env=qs_env, &
309 skip_load_balance=qs_control%skip_load_balance_distributed, &
310 reorder_grid_ranks=.false.)
311 IF (qs_control%gapw .OR. qs_control%gapw_xc)
THEN
312 CALL tddfpt_build_tasklist(task_list=sub_env%task_list_aux_fit_soft, sab=sub_env%sab_aux_fit, &
313 basis_type=
"AUX_FIT_SOFT", distribution_2d=sub_env%dist_2d, &
314 pw_env=sub_env%pw_env, qs_env=qs_env, &
315 skip_load_balance=qs_control%skip_load_balance_distributed, &
316 reorder_grid_ranks=.false.)
320 IF (tddfpt_control%mgrid_is_explicit) &
321 CALL restore_qs_mgrid(qs_control, mgrid_saved)
324 sub_env%pw_env => pw_env_global
326 CALL get_qs_env(qs_env, dbcsr_dist=sub_env%dbcsr_dist, &
327 sab_orb=sub_env%sab_orb, task_list=sub_env%task_list_orb)
328 IF (dft_control%do_admm)
THEN
329 CALL get_admm_env(admm_env, sab_aux_fit=sub_env%sab_aux_fit, &
330 task_list_aux_fit=sub_env%task_list_aux_fit)
331 IF (qs_control%gapw .OR. qs_control%gapw_xc)
THEN
332 sub_env%task_list_aux_fit_soft => admm_env%admm_gapw_env%task_list
335 IF (qs_control%gapw .OR. qs_control%gapw_xc)
THEN
336 CALL get_qs_env(qs_env, task_list_soft=sub_env%task_list_orb_soft)
341 IF (dft_control%qs_control%gapw)
THEN
343 atomic_kind_set=atomic_kind_set, &
345 qs_kind_set=qs_kind_set)
349 qs_kind_set, dft_control, sub_env%para_env)
351 CALL init_rho0(sub_env%local_rho_set, qs_env, dft_control%qs_control%gapw_control, &
356 ELSEIF (dft_control%qs_control%gapw_xc)
THEN
358 atomic_kind_set=atomic_kind_set, &
359 qs_kind_set=qs_kind_set)
362 qs_kind_set, dft_control, sub_env%para_env)
366 IF (dft_control%do_admm)
THEN
367 IF (dft_control%qs_control%gapw .OR. dft_control%qs_control%gapw_xc)
THEN
368 CALL get_qs_env(qs_env, atomic_kind_set=atomic_kind_set)
371 admm_env%admm_gapw_env%admm_kind_set, &
372 dft_control, sub_env%para_env)
377 sub_env%is_mgrid = .false.
378 NULLIFY (sub_env%dbcsr_dist, sub_env%dist_2d)
379 NULLIFY (sub_env%sab_orb, sub_env%sab_aux_fit)
380 NULLIFY (sub_env%task_list_orb, sub_env%task_list_orb_soft)
381 NULLIFY (sub_env%task_list_aux_fit, sub_env%task_list_aux_fit_soft)
382 NULLIFY (sub_env%pw_env)
383 IF (sub_env%is_split)
THEN
384 cpabort(
'Subsys option not available')
386 CALL get_qs_env(qs_env, dbcsr_dist=sub_env%dbcsr_dist, sab_orb=sub_env%sab_orb)
389 sub_env%is_mgrid = .false.
390 NULLIFY (sub_env%dbcsr_dist, sub_env%dist_2d)
391 NULLIFY (sub_env%sab_orb, sub_env%sab_aux_fit)
392 NULLIFY (sub_env%task_list_orb, sub_env%task_list_orb_soft)
393 NULLIFY (sub_env%task_list_aux_fit, sub_env%task_list_aux_fit_soft)
394 NULLIFY (sub_env%pw_env)
395 IF (sub_env%is_split)
THEN
396 cpabort(
'Subsys option not available')
398 CALL get_qs_env(qs_env, dbcsr_dist=sub_env%dbcsr_dist, sab_orb=sub_env%sab_orb)
401 cpabort(
"Unknown kernel type")
404 CALL timestop(handle)
417 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_sub_env_release'
421 CALL timeset(routinen, handle)
423 IF (sub_env%is_mgrid)
THEN
424 IF (
ASSOCIATED(sub_env%task_list_aux_fit)) &
427 IF (
ASSOCIATED(sub_env%task_list_aux_fit_soft)) &
430 IF (
ASSOCIATED(sub_env%task_list_orb)) &
433 IF (
ASSOCIATED(sub_env%task_list_orb_soft)) &
439 IF (
ASSOCIATED(sub_env%dbcsr_dist))
THEN
441 DEALLOCATE (sub_env%dbcsr_dist)
444 IF (
ASSOCIATED(sub_env%dist_2d)) &
449 IF (
ASSOCIATED(sub_env%local_rho_set))
THEN
452 IF (
ASSOCIATED(sub_env%hartree_local))
THEN
455 IF (
ASSOCIATED(sub_env%local_rho_set_admm))
THEN
466 sub_env%is_mgrid = .false.
468 IF (sub_env%is_split .AND.
ASSOCIATED(sub_env%admm_A))
THEN
470 DEALLOCATE (sub_env%admm_A)
471 NULLIFY (sub_env%admm_A)
474 IF (sub_env%is_split)
THEN
475 DO i =
SIZE(sub_env%mos_occ), 1, -1
479 DEALLOCATE (sub_env%mos_occ)
484 IF (
ALLOCATED(sub_env%group_distribution)) &
485 DEALLOCATE (sub_env%group_distribution)
487 sub_env%is_split = .false.
489 CALL timestop(handle)
505 SUBROUTINE init_tddfpt_mgrid(qs_control, tddfpt_control, mgrid_saved)
508 TYPE(mgrid_saved_parameters),
INTENT(out) :: mgrid_saved
510 CHARACTER(LEN=*),
PARAMETER :: routinen =
'init_tddfpt_mgrid'
512 INTEGER :: handle, igrid, ngrids
514 CALL timeset(routinen, handle)
517 mgrid_saved%commensurate_mgrids = qs_control%commensurate_mgrids
518 mgrid_saved%realspace_mgrids = qs_control%realspace_mgrids
519 mgrid_saved%skip_load_balance = qs_control%skip_load_balance_distributed
520 mgrid_saved%cutoff = qs_control%cutoff
521 mgrid_saved%progression_factor = qs_control%progression_factor
522 mgrid_saved%relative_cutoff = qs_control%relative_cutoff
523 mgrid_saved%e_cutoff => qs_control%e_cutoff
526 qs_control%commensurate_mgrids = tddfpt_control%mgrid_commensurate_mgrids
527 qs_control%realspace_mgrids = tddfpt_control%mgrid_realspace_mgrids
528 qs_control%skip_load_balance_distributed = tddfpt_control%mgrid_skip_load_balance
529 qs_control%cutoff = tddfpt_control%mgrid_cutoff
530 qs_control%progression_factor = tddfpt_control%mgrid_progression_factor
531 qs_control%relative_cutoff = tddfpt_control%mgrid_relative_cutoff
533 ALLOCATE (qs_control%e_cutoff(tddfpt_control%mgrid_ngrids))
534 ngrids = tddfpt_control%mgrid_ngrids
535 IF (
ASSOCIATED(tddfpt_control%mgrid_e_cutoff))
THEN
538 qs_control%e_cutoff(igrid) = tddfpt_control%mgrid_e_cutoff(igrid)*0.5_dp
542 DO igrid = ngrids, 1, -1
543 IF (qs_control%cutoff <= qs_control%e_cutoff(igrid))
THEN
544 qs_control%cutoff = qs_control%e_cutoff(igrid)
551 qs_control%cutoff = qs_control%e_cutoff(1)
553 qs_control%e_cutoff(1) = qs_control%cutoff
555 qs_control%e_cutoff(igrid) = qs_control%e_cutoff(igrid - 1)/qs_control%progression_factor
559 CALL timestop(handle)
560 END SUBROUTINE init_tddfpt_mgrid
569 SUBROUTINE restore_qs_mgrid(qs_control, mgrid_saved)
571 TYPE(mgrid_saved_parameters),
INTENT(in) :: mgrid_saved
573 CHARACTER(LEN=*),
PARAMETER :: routinen =
'restore_qs_mgrid'
577 CALL timeset(routinen, handle)
579 IF (
ASSOCIATED(qs_control%e_cutoff)) &
580 DEALLOCATE (qs_control%e_cutoff)
582 qs_control%commensurate_mgrids = mgrid_saved%commensurate_mgrids
583 qs_control%realspace_mgrids = mgrid_saved%realspace_mgrids
584 qs_control%skip_load_balance_distributed = mgrid_saved%skip_load_balance
585 qs_control%cutoff = mgrid_saved%cutoff
586 qs_control%progression_factor = mgrid_saved%progression_factor
587 qs_control%relative_cutoff = mgrid_saved%relative_cutoff
588 qs_control%e_cutoff => mgrid_saved%e_cutoff
590 CALL timestop(handle)
591 END SUBROUTINE restore_qs_mgrid
604 SUBROUTINE tddfpt_build_distribution_2d(distribution_2d, dbcsr_dist, blacs_env, qs_env)
610 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_build_distribution_2d'
618 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
621 CALL timeset(routinen, handle)
623 CALL get_qs_env(qs_env, atomic_kind_set=atomic_kind_set, cell=cell, input=input, &
624 molecule_kind_set=molecule_kind_set, molecule_set=molecule_set, &
625 particle_set=particle_set, qs_kind_set=qs_kind_set)
627 NULLIFY (distribution_2d)
629 atomic_kind_set=atomic_kind_set, &
630 particle_set=particle_set, &
631 qs_kind_set=qs_kind_set, &
632 molecule_kind_set=molecule_kind_set, &
633 molecule_set=molecule_set, &
634 distribution_2d=distribution_2d, &
635 blacs_env=blacs_env, &
636 force_env_section=input)
638 ALLOCATE (dbcsr_dist)
641 CALL timestop(handle)
642 END SUBROUTINE tddfpt_build_distribution_2d
659 SUBROUTINE tddfpt_build_tasklist(task_list, sab, basis_type, distribution_2d, pw_env, qs_env, &
660 skip_load_balance, reorder_grid_ranks)
664 CHARACTER(len=*),
INTENT(in) :: basis_type
668 LOGICAL,
INTENT(in) :: skip_load_balance, reorder_grid_ranks
670 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_build_tasklist'
672 INTEGER :: handle, ikind, nkinds
673 LOGICAL,
ALLOCATABLE,
DIMENSION(:) :: orb_present
674 REAL(kind=
dp) :: subcells
675 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: orb_radius
676 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: pair_radius
684 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
688 CALL timeset(routinen, handle)
690 CALL get_qs_env(qs_env, atomic_kind_set=atomic_kind_set, cell=cell, input=input, &
691 ks_env=ks_env, local_particles=local_particles, molecule_set=molecule_set, &
692 particle_set=particle_set, qs_kind_set=qs_kind_set)
694 nkinds =
SIZE(atomic_kind_set)
696 IF (.NOT. (
ASSOCIATED(sab)))
THEN
697 ALLOCATE (atom2d(nkinds))
698 CALL atom2d_build(atom2d, local_particles, distribution_2d, atomic_kind_set, &
699 molecule_set, molecule_only=.false., particle_set=particle_set)
701 ALLOCATE (orb_present(nkinds))
702 ALLOCATE (orb_radius(nkinds))
703 ALLOCATE (pair_radius(nkinds, nkinds))
706 CALL get_qs_kind(qs_kind_set(ikind), basis_set=orb_basis_set, basis_type=basis_type)
707 IF (
ASSOCIATED(orb_basis_set))
THEN
708 orb_present(ikind) = .true.
709 CALL get_gto_basis_set(gto_basis_set=orb_basis_set, kind_radius=orb_radius(ikind))
711 orb_present(ikind) = .false.
712 orb_radius(ikind) = 0.0_dp
716 CALL pair_radius_setup(orb_present, orb_present, orb_radius, orb_radius, pair_radius)
721 mic=.false., subcells=subcells, molecular=.false., nlname=
"sab_orb")
724 DEALLOCATE (atom2d, orb_present, orb_radius, pair_radius)
729 reorder_rs_grid_ranks=reorder_grid_ranks, basis_type=basis_type, &
730 skip_load_balance_distributed=skip_load_balance, &
731 pw_env_external=pw_env, sab_orb_external=sab)
733 CALL timestop(handle)
734 END SUBROUTINE tddfpt_build_tasklist
753 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_dbcsr_create_by_dist'
755 CHARACTER :: matrix_type
756 CHARACTER(len=default_string_length) :: matrix_name
758 INTEGER,
DIMENSION(:),
POINTER :: col_blk_sizes, row_blk_sizes
760 CALL timeset(routinen, handle)
762 cpassert(
ASSOCIATED(template))
763 CALL dbcsr_get_info(template, row_blk_size=row_blk_sizes, col_blk_size=col_blk_sizes, &
764 name=matrix_name, matrix_type=matrix_type)
766 IF (
ASSOCIATED(matrix))
THEN
772 CALL dbcsr_create(matrix, matrix_name, dbcsr_dist, matrix_type, row_blk_sizes, col_blk_sizes)
775 CALL timestop(handle)
801 TYPE(
cp_fm_type),
INTENT(IN) :: fm_src, fm_dest_sub
804 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_fm_replicate_across_subgroups'
806 INTEGER :: handle, igroup, igroup_local, ncols_global_dest, ncols_global_src, ngroups, &
807 nrows_global_dest, nrows_global_src
812 IF (sub_env%is_split)
THEN
813 CALL timeset(routinen, handle)
815 CALL cp_fm_get_info(fm_src, nrow_global=nrows_global_src, ncol_global=ncols_global_src, &
816 context=blacs_env_global, para_env=para_env_global)
817 CALL cp_fm_get_info(fm_dest_sub, nrow_global=nrows_global_dest, ncol_global=ncols_global_dest)
819 IF (debug_this_module)
THEN
820 cpassert(nrows_global_src == nrows_global_dest)
821 cpassert(ncols_global_src == ncols_global_dest)
824 igroup_local = sub_env%group_distribution(para_env_global%mepos)
825 ngroups = sub_env%ngroups
827 DO igroup = 0, ngroups - 1
828 IF (igroup == igroup_local)
THEN
835 CALL timestop(handle)
Types and set/get functions for auxiliary density matrix methods.
subroutine, public get_admm_env(admm_env, mo_derivs_aux_fit, mos_aux_fit, sab_aux_fit, sab_aux_fit_asymm, sab_aux_fit_vs_orb, matrix_s_aux_fit, matrix_s_aux_fit_kp, matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp, task_list_aux_fit, matrix_ks_aux_fit, matrix_ks_aux_fit_kp, matrix_ks_aux_fit_im, matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_dft_kp, matrix_ks_aux_fit_hfx_kp, rho_aux_fit, rho_aux_fit_buffer, admm_dm)
Get routine for the ADMM env.
Define the atomic kind types and their sub types.
subroutine, public get_gto_basis_set(gto_basis_set, name, aliases, norm_type, kind_radius, ncgf, nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum)
...
Handles all functions related to the CELL.
methods related to the blacs parallel environment
subroutine, public cp_blacs_env_release(blacs_env)
releases the given blacs_env
subroutine, public cp_blacs_env_create(blacs_env, para_env, blacs_grid_layout, blacs_repeatable, row_major, grid_2d)
allocates and initializes a type that represent a blacs context
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_distribution_release(dist)
...
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_release(matrix)
...
Routines that link DBCSR and CP2K concepts together.
subroutine, public cp_dbcsr_alloc_block_from_nbl(matrix, sab_orb, desymmetrize)
allocate the blocks of a dbcsr based on the neighbor list
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_dist2d_to_dist(dist2d, dist)
Creates a DBCSR distribution from a distribution_2d.
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_copy_general(source, destination, para_env)
General copy of a fm matrix to another fm matrix. Uses non-blocking MPI rather than ScaLAPACK.
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
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
stores a mapping of 2D info (e.g. matrix) on a 2D processor distribution (i.e. blacs grid) where cpus...
subroutine, public distribution_2d_release(distribution_2d)
...
Distribution methods for atoms, particles, or molecules.
subroutine, public distribute_molecules_2d(cell, atomic_kind_set, particle_set, qs_kind_set, molecule_kind_set, molecule_set, distribution_2d, blacs_env, force_env_section)
Distributes the particle pairs creating a 2d distribution optimally suited for quickstep.
subroutine, public init_coulomb_local(hartree_local, natom)
...
subroutine, public hartree_local_release(hartree_local)
...
subroutine, public hartree_local_create(hartree_local)
...
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Interface to the message passing library MPI.
subroutine, public mp_para_env_release(para_env)
releases the para object (to be called when you don't want anymore the shared copy of this object)
Define the molecule kind structure types and the corresponding functionality.
Define the data structure for the molecule information.
Define the data structure for the particle information.
methods of pw_env that have dependence on qs_env
subroutine, public pw_env_rebuild(pw_env, qs_env, external_para_env)
rebuilds the pw_env data (necessary if cell or cutoffs change)
subroutine, public pw_env_create(pw_env)
creates a pw_env, if qs_env is given calls pw_env_rebuild
container for various plainwaves related things
subroutine, public pw_env_retain(pw_env)
retains the pw_env (see doc/ReferenceCounting.html)
subroutine, public pw_env_release(pw_env, para_env)
releases the given pw_env (see doc/ReferenceCounting.html)
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, ecoul_1c, rho0_s_rs, rho0_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs)
Get the QUICKSTEP environment.
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, init_u_ramping_each_scf, reltmat, ghost, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
subroutine, public local_rho_set_create(local_rho_set)
...
subroutine, public local_rho_set_release(local_rho_set)
...
Define the neighbor list data types and the corresponding functionality.
subroutine, public release_neighbor_list_sets(nlists)
releases an array of neighbor_list_sets
Generate the atomic neighbor lists.
subroutine, public atom2d_cleanup(atom2d)
free the internals of atom2d
subroutine, public pair_radius_setup(present_a, present_b, radius_a, radius_b, pair_radius, prmin)
...
subroutine, public build_neighbor_lists(ab_list, particle_set, atom, cell, pair_radius, subcells, mic, symmetric, molecular, subset_of_mol, current_subset, operator_type, nlname, atomb_to_keep)
Build simple pair neighbor lists.
subroutine, public atom2d_build(atom2d, distribution_1d, distribution_2d, atomic_kind_set, molecule_set, molecule_only, particle_set)
Build some distribution structure of atoms, refactored from build_qs_neighbor_lists.
subroutine, public rho0_s_grid_create(pw_env, rho0_mpole)
...
subroutine, public init_rho0(local_rho_set, qs_env, gapw_control, zcore)
...
subroutine, public allocate_rho_atom_internals(rho_atom_set, atomic_kind_set, qs_kind_set, dft_control, para_env)
...
subroutine, public tddfpt_sub_env_init(sub_env, qs_env, mos_occ, kernel)
Split MPI communicator to create a set of parallel (sub)groups.
subroutine, public tddfpt_sub_env_release(sub_env)
Release parallel group environment.
subroutine, public tddfpt_fm_replicate_across_subgroups(fm_src, fm_dest_sub, sub_env)
Replicate a globally distributed matrix across all sub-groups. At the end every sub-group will hold a...
subroutine, public tddfpt_dbcsr_create_by_dist(matrix, template, dbcsr_dist, sab)
Create a DBCSR matrix based on a template matrix, distribution object, and the list of neighbours.
generate the tasks lists used by collocate and integrate routines
subroutine, public generate_qs_task_list(ks_env, task_list, reorder_rs_grid_ranks, skip_load_balance_distributed, soft_valid, basis_type, pw_env_external, sab_orb_external)
...
subroutine, public deallocate_task_list(task_list)
deallocates the components and the object itself
subroutine, public allocate_task_list(task_list)
allocates and initialised the components of the task_list_type
stores some data used in wavefunction fitting
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
structure to store local (to a processor) ordered lists of integers.
distributes pairs on a 2d grid of processors
stores all the informations relevant to an mpi environment
contained for different pw related things
Provides all information about a quickstep kind.
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
Parallel (sub)group environment.