28 dbcsr_type_antisymmetric, dbcsr_type_no_symmetry, dbcsr_type_symmetric
67#include "./base/base_uses.f90"
75 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'ri_environment_methods'
93 LOGICAL,
INTENT(IN) :: calculate_forces
95 CALL calculate_ri_integrals(lri_env, qs_env, calculate_forces)
106 SUBROUTINE calculate_ri_integrals(lri_env, qs_env, calculate_forces)
110 LOGICAL,
INTENT(IN) :: calculate_forces
112 CHARACTER(LEN=*),
PARAMETER :: routinen =
'calculate_ri_integrals'
113 REAL(kind=
dp),
DIMENSION(2),
PARAMETER :: fx = [0.0_dp, 1.0_dp]
115 INTEGER :: handle, i, i1, i2, iatom, ispin, izero, &
116 j, j1, j2, jatom, m, n, nbas
117 INTEGER,
DIMENSION(:, :),
POINTER :: bas_ptr
118 REAL(kind=
dp) :: fpre
119 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: eval
120 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: avec, fblk, fout
131 CALL timeset(routinen, handle)
133 cpassert(
ASSOCIATED(lri_env))
134 cpassert(
ASSOCIATED(qs_env))
138 CALL get_qs_env(qs_env=qs_env, dft_control=dft_control)
139 NULLIFY (rho, matrix_p)
142 IF (calculate_forces)
THEN
148 DO ispin = 1, dft_control%nspins
149 fpre = lri_env%ri_fit%ftrm1n(ispin)/lri_env%ri_fit%ntrm1n
150 CALL dbcsr_add(fmat, matrix_p(ispin)%matrix, fx(ispin), -fpre)
153 basis_type_a=
"ORB", basis_type_b=
"ORB", sab_nl=lri_env%soo_list, &
154 calculate_forces=.true., matrix_p=fmat)
159 basis_type_a=
"ORB", basis_type_b=
"ORB", sab_nl=lri_env%soo_list)
163 basis_type_a=
"RI_HXC", basis_type_b=
"RI_HXC", sab_nl=lri_env%saa_list)
164 IF (calculate_forces)
THEN
166 bas_ptr => lri_env%ri_fit%bas_ptr
167 avec => lri_env%ri_fit%avec
168 fout => lri_env%ri_fit%fout
170 CALL dbcsr_create(fmat, template=lri_env%ri_smat(1)%matrix)
176 i1 = bas_ptr(1, iatom)
177 i2 = bas_ptr(2, iatom)
178 j1 = bas_ptr(1, jatom)
179 j2 = bas_ptr(2, jatom)
180 IF (iatom <= jatom)
THEN
181 DO ispin = 1, dft_control%nspins
186 fblk(n, m) = fblk(n, m) + fout(i, ispin)*avec(j, ispin) + avec(i, ispin)*fout(j, ispin)
191 DO ispin = 1, dft_control%nspins
196 fblk(m, n) = fblk(m, n) + fout(i, ispin)*avec(j, ispin) + avec(i, ispin)*fout(j, ispin)
201 IF (iatom == jatom)
THEN
202 fblk(:, :) = 0.25_dp*fblk(:, :)
204 fblk(:, :) = 0.5_dp*fblk(:, :)
210 basis_type_a=
"RI_HXC", basis_type_b=
"RI_HXC", sab_nl=lri_env%saa_list, &
211 calculate_forces=.true., matrix_p=fmat)
217 ALLOCATE (lri_env%ri_sinv(1)%matrix)
218 SELECT CASE (lri_env%ri_sinv_app)
222 CALL dbcsr_create(lri_env%ri_sinv(1)%matrix, template=lri_env%ri_smat(1)%matrix)
223 CALL invert_hotelling(lri_env%ri_sinv(1)%matrix, lri_env%ri_smat(1)%matrix, &
224 threshold=1.e-10_dp, use_inv_as_guess=.false., &
225 norm_convergence=1.e-10_dp, filter_eps=1.e-12_dp, silent=.false.)
227 CALL dbcsr_create(emat, matrix_type=dbcsr_type_no_symmetry, template=lri_env%ri_smat(1)%matrix)
228 CALL get_qs_env(qs_env=qs_env, para_env=para_env, blacs_env=blacs_env)
229 CALL dbcsr_get_info(lri_env%ri_smat(1)%matrix, nfullrows_total=nbas)
230 ALLOCATE (eval(nbas))
231 CALL cp_dbcsr_syevd(lri_env%ri_smat(1)%matrix, emat, eval, para_env, blacs_env)
234 IF (eval(i) < 1.0e-10_dp)
THEN
238 eval(i) = sqrt(1.0_dp/eval(i))
242 CALL dbcsr_create(lri_env%ri_sinv(1)%matrix, template=lri_env%ri_smat(1)%matrix)
243 CALL dbcsr_multiply(
"N",
"T", 1.0_dp, emat, emat, 0.0_dp, lri_env%ri_sinv(1)%matrix)
247 CALL dbcsr_create(lri_env%ri_sinv(1)%matrix, template=lri_env%ri_smat(1)%matrix)
248 CALL invert_hotelling(lri_env%ri_sinv(1)%matrix, lri_env%ri_smat(1)%matrix, &
249 threshold=1.e-5_dp, use_inv_as_guess=.false., &
250 norm_convergence=1.e-4_dp, filter_eps=1.e-4_dp, silent=.false.)
252 cpabort(
"Unknown RI_SINV type")
257 vecr=lri_env%ri_fit%nvec, &
258 vecx=lri_env%ri_fit%rm1n, &
259 matp=lri_env%ri_sinv(1)%matrix, &
260 solver=lri_env%ri_sinv_app, &
261 ptr=lri_env%ri_fit%bas_ptr)
264 lri_env%ri_fit%ntrm1n = sum(lri_env%ri_fit%nvec(:)*lri_env%ri_fit%rm1n(:))
267 IF (
ASSOCIATED(lri_env%o3c))
THEN
270 ALLOCATE (lri_env%o3c)
273 lri_env%orb_basis, lri_env%orb_basis, lri_env%ri_basis, &
274 lri_env%soo_list, lri_env%soa_list)
278 CALL timestop(handle)
280 END SUBROUTINE calculate_ri_integrals
293 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: vecr
294 REAL(kind=
dp),
DIMENSION(:),
INTENT(OUT) :: vecx
296 CHARACTER(LEN=*),
INTENT(IN) :: solver
297 INTEGER,
DIMENSION(:, :),
INTENT(IN) :: ptr
299 CHARACTER(LEN=*),
PARAMETER :: routinen =
'ri_metric_solver'
301 INTEGER :: handle, max_iter, n
303 REAL(kind=
dp) :: rerror, threshold
304 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: vect
306 CALL timeset(routinen, handle)
308 threshold = 1.e-10_dp
316 converged=converged, threshold=threshold, max_iter=max_iter)
317 CASE (
"INVS",
"INVF")
319 CALL ri_matvec(matp, vecr, vecx, ptr)
322 converged=converged, threshold=threshold, max_iter=max_iter)
324 cpabort(
"Unknown RI solver")
327 IF (.NOT. converged)
THEN
332 CALL ri_matvec(mat, vecx, vect, ptr)
333 vect(:) = vect(:) - vecr(:)
334 rerror = maxval(abs(vect(:)))
336 cpwarn_if(rerror > threshold,
"RI solver: CG did not converge properly")
339 CALL timestop(handle)
357 lri_rho_struct, atomic_kind_set, para_env)
366 CHARACTER(LEN=*),
PARAMETER :: routinen =
'calculate_ri_densities'
368 INTEGER :: atom_a, handle, i1, i2, iatom, ikind, &
369 ispin, n, natom, nspin
370 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: atom_of_kind, kind_of
371 INTEGER,
DIMENSION(:, :),
POINTER :: bas_ptr
372 REAL(kind=
dp),
DIMENSION(:),
POINTER :: tot_rho_r
373 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: avec
379 CALL timeset(routinen, handle)
381 nspin =
SIZE(pmatrix, 1)
383 CALL calculate_tvec_ri(lri_env, lri_env%o3c, para_env)
384 CALL calculate_avec_ri(lri_env, pmatrix)
386 CALL get_qs_env(qs_env, lri_density=lri_density, natom=natom)
387 IF (
ASSOCIATED(lri_density))
THEN
390 ALLOCATE (lri_density)
393 lri_density%nspin = nspin
397 avec => lri_env%ri_fit%avec
398 bas_ptr => lri_env%ri_fit%bas_ptr
401 lri_coef => lri_density%lri_coefs(ispin)%lri_kinds
403 ikind = kind_of(iatom)
404 atom_a = atom_of_kind(iatom)
405 i1 = bas_ptr(1, iatom)
406 i2 = bas_ptr(2, iatom)
408 lri_coef(ikind)%acoef(atom_a, 1:n) = avec(i1:i2, ispin)
411 CALL set_qs_env(qs_env, lri_density=lri_density)
412 DEALLOCATE (atom_of_kind, kind_of)
414 CALL qs_rho_get(lri_rho_struct, rho_r=rho_r, rho_g=rho_g, tot_rho_r=tot_rho_r)
416 lri_coef => lri_density%lri_coefs(ispin)%lri_kinds
418 lri_coef, tot_rho_r(ispin),
"RI_HXC", .false.)
421 CALL timestop(handle)
431 SUBROUTINE calculate_tvec_ri(lri_env, o3c, para_env)
437 CHARACTER(LEN=*),
PARAMETER :: routinen =
'calculate_tvec_ri'
438 INTEGER,
PARAMETER :: msweep = 32
440 INTEGER :: handle, i1, i2, ibl, ibu, il, ispin, &
441 isweep, it, iu, katom, m, ma, mba, &
442 mepos, natom, nspin, nsweep, nthread
443 INTEGER,
DIMENSION(2, msweep) :: nlimit
444 INTEGER,
DIMENSION(:, :),
POINTER :: bas_ptr
445 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: ta
446 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rm1t, tvec, tvl
449 CALL timeset(routinen, handle)
451 nspin =
SIZE(lri_env%ri_fit%tvec, 2)
452 bas_ptr => lri_env%ri_fit%bas_ptr
453 tvec => lri_env%ri_fit%tvec
455 natom =
SIZE(bas_ptr, 2)
459 IF (natom < 1000)
THEN
462 nsweep = min(nthread, msweep)
466 DO isweep = 1, nsweep
467 nlimit(1:2, isweep) =
get_limit(natom, nsweep, isweep - 1)
471 DO isweep = 1, nsweep
472 il = nlimit(1, isweep)
473 iu = nlimit(2, isweep)
479 ALLOCATE (ta(mba, nthread))
491 DO WHILE (
o3c_iterate(o3c_iterator, mepos=mepos) == 0)
493 IF (katom < il .OR. katom > iu) cycle
494 i1 = bas_ptr(1, katom) - ibl + 1
495 i2 = bas_ptr(2, katom) - ibl + 1
497 ta(i1:i2, mepos + 1) = ta(i1:i2, mepos + 1) + tvl(1:m, ispin)
504 tvec(ibl:ibu, ispin) = tvec(ibl:ibu, ispin) + ta(1:mba, it)
511 CALL para_env%sum(tvec)
513 rm1t => lri_env%ri_fit%rm1t
517 vecr=tvec(:, ispin), &
518 vecx=rm1t(:, ispin), &
519 matp=lri_env%ri_sinv(1)%matrix, &
520 solver=lri_env%ri_sinv_app, &
524 CALL timestop(handle)
526 END SUBROUTINE calculate_tvec_ri
534 SUBROUTINE calculate_avec_ri(lri_env, pmatrix)
539 CHARACTER(LEN=*),
PARAMETER :: routinen =
'calculate_avec_ri'
541 INTEGER :: handle, ispin, nspin
542 REAL(kind=
dp) :: etr, nelec, nrm1t
543 REAL(kind=
dp),
DIMENSION(:),
POINTER :: nvec, rm1n
544 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: avec, rm1t, tvec
547 CALL timeset(routinen, handle)
549 nspin =
SIZE(pmatrix)
551 smatrix => lri_env%ob_smat
554 CALL dbcsr_dot(smatrix(1)%matrix, pmatrix(ispin)%matrix, etr)
555 lri_env%ri_fit%echarge(ispin) = etr
558 tvec => lri_env%ri_fit%tvec
559 rm1t => lri_env%ri_fit%rm1t
560 nvec => lri_env%ri_fit%nvec
561 rm1n => lri_env%ri_fit%rm1n
565 nelec = lri_env%ri_fit%echarge(ispin)
566 nrm1t = sum(nvec(:)*rm1t(:, ispin))
567 lri_env%ri_fit%lambda(ispin) = 2.0_dp*(nrm1t - nelec)/lri_env%ri_fit%ntrm1n
571 avec => lri_env%ri_fit%avec
573 avec(:, ispin) = rm1t(:, ispin) - 0.5_dp*lri_env%ri_fit%lambda(ispin)*rm1n(:)
576 CALL timestop(handle)
578 END SUBROUTINE calculate_avec_ri
587 SUBROUTINE ri_matvec(mat, vi, vo, ptr)
590 REAL(kind=
dp),
DIMENSION(:),
INTENT(IN) :: vi
591 REAL(kind=
dp),
DIMENSION(:),
INTENT(OUT) :: vo
592 INTEGER,
DIMENSION(:, :),
INTENT(IN) :: ptr
594 CHARACTER(LEN=*),
PARAMETER :: routinen =
'ri_matvec'
596 CHARACTER :: matrix_type
597 INTEGER :: handle, iatom, jatom, m1, m2, mb, n1, &
600 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: block
604 CALL timeset(routinen, handle)
608 SELECT CASE (matrix_type)
609 CASE (dbcsr_type_no_symmetry)
611 CASE (dbcsr_type_symmetric)
613 CASE (dbcsr_type_antisymmetric)
614 cpabort(
"NYI, antisymmetric matrix not permitted")
616 cpabort(
"Unknown matrix type, ...")
629 cpassert(nb ==
SIZE(block, 1))
630 cpassert(mb ==
SIZE(block, 2))
631 vo(n1:n2) = vo(n1:n2) + matmul(block, vi(m1:m2))
632 IF (symm .AND. (iatom /= jatom))
THEN
633 vo(m1:m2) = vo(m1:m2) + matmul(transpose(block), vi(n1:n2))
640 CALL timestop(handle)
642 END SUBROUTINE ri_matvec
arnoldi iteration using dbcsr
subroutine, public arnoldi_conjugate_gradient(matrix_a, vec_x, matrix_p, converged, threshold, max_iter)
Wrapper for conjugated gradient algorithm for Ax=b.
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind_set(atomic_kind_set, atom_of_kind, kind_of, natom_of_kind, maxatom, natom, nshell, fist_potential_present, shell_present, shell_adiabatic, shell_check_distance, damping_present)
Get attributes of an atomic kind set.
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_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset)
...
logical function, public dbcsr_iterator_blocks_left(iterator)
...
subroutine, public dbcsr_iterator_stop(iterator)
...
subroutine, public dbcsr_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_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
subroutine, public dbcsr_dot(matrix_a, matrix_b, trace)
Computes the dot product of two matrices, also known as the trace of their matrix product.
subroutine, public dbcsr_scale_by_vector(matrix, alpha, side)
Scales the rows/columns of given 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
Interface to (sca)lapack for the Cholesky based procedures.
subroutine, public cp_dbcsr_syevd(matrix, eigenvectors, eigenvalues, para_env, blacs_env)
...
DBCSR operations in CP2K.
Routines useful for iterative matrix calculations.
subroutine, public invert_hotelling(matrix_inverse, matrix, threshold, use_inv_as_guess, norm_convergence, filter_eps, accelerator_order, max_iter_lanczos, eps_lanczos, silent)
invert a symmetric positive definite matrix by Hotelling's method explicit symmetrization makes this ...
Defines the basic variable types.
integer, parameter, public dp
contains the types and subroutines for dealing with the lri_env lri : local resolution of the identit...
subroutine, public allocate_lri_coefs(lri_env, lri_density, atomic_kind_set)
creates and initializes lri_coefs
subroutine, public lri_density_release(lri_density)
releases the given lri_density
subroutine, public lri_density_create(lri_density)
creates and initializes an lri_density environment
Interface to the message passing library MPI.
Calculate the plane wave density by collocating the primitive Gaussian functions (pgf).
subroutine, public calculate_lri_rho_elec(lri_rho_g, lri_rho_r, qs_env, lri_coef, total_rho, basis_type, exact_1c_terms, pmat, atomlist)
Collocates the fitted lri density on a grid.
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, 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.
Methods used with 3-center overlap type integrals containers.
subroutine, public calculate_o3c_integrals(o3c, calculate_forces, matrix_p)
...
subroutine, public contract12_o3c(o3c, matrix_p)
Contraction of 3-tensor over indices 1 and 2 (assuming symmetry) t(k) = sum_ij (ijk)*p(ij)
3-center overlap type integrals containers
subroutine, public get_o3c_iterator_info(o3c_iterator, mepos, iatom, jatom, katom, ikind, jkind, kkind, rij, rik, cellj, cellk, integral, tvec, force_i, force_j, force_k)
...
subroutine, public o3c_iterator_create(o3c, o3c_iterator, nthread)
...
subroutine, public release_o3c_container(o3c_container)
...
subroutine, public o3c_iterator_release(o3c_iterator)
...
integer function, public o3c_iterate(o3c_iterator, mepos)
...
subroutine, public init_o3c_container(o3c, nspin, basis_set_list_a, basis_set_list_b, basis_set_list_c, sab_nl, sac_nl, only_bc_same_center)
...
Calculation of overlap matrix, its derivatives and forces.
subroutine, public build_overlap_matrix(ks_env, matrix_s, matrixkp_s, matrix_name, nderivative, basis_type_a, basis_type_b, sab_nl, calculate_forces, matrix_p, matrixkp_p)
Calculation of the overlap matrix over Cartesian Gaussian functions.
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...
Calculates integral matrices for RIGPW method.
subroutine, public build_ri_matrices(lri_env, qs_env, calculate_forces)
creates and initializes an lri_env
subroutine, public ri_metric_solver(mat, vecr, vecx, matp, solver, ptr)
solver for RI systems (R*x=n)
subroutine, public calculate_ri_densities(lri_env, qs_env, pmatrix, lri_rho_struct, atomic_kind_set, para_env)
performs the fitting of the density and distributes the fitted density on the grid
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.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
stores all the informations relevant to an mpi environment
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.