Documentation for module qs_collocate_density

Calculate the plane wave density by collocating the primitive Gaussian functions (pgf).

source: qs_collocate_density.F
Loading...

public Subroutines/Functions:

computes the gradient of the density corresponding to a given density matrix on the grid
Collocates the fitted lri density on a grid.
computes the local pseudopotential (without erf term) on the grid
computes the density of the core charges on the grid
computes the density corresponding to a given density matrix on the grid
computes the image charge density on the grid (including coeffcients)
computes the density of the non-linear core correction on the grid
computes the RESP charge density on a grid based on the RESP charges
collocate a single Gaussian on the grid for periodic RESP fitting
collocate a single Gaussian on the grid
maps a given wavefunction on the grid
low level collcation of primitive gaussian functions in g-space
low level collocation of primitive gaussian functions

SUBROUTINEcalculate_drho_elec(matrix_p, matrix_p_kp, drho, drho_gspace, qs_env, soft_valid, basis_type)

computes the gradient of the density corresponding to a given density matrix on the grid

Arguments:
TYPE(dbcsr_type),
OPTIONAL, POINTER
:: matrix_p ...
OPTIONAL, POINTER
:: matrix_p_kp(:) ...
TYPE(pw_p_type),
INTENT(inout)
:: drho(:) ...
TYPE(pw_p_type),
INTENT(inout)
:: drho_gspace(:) ...
POINTER
:: qs_env ...
LOGICAL,
INTENT(in),
OPTIONAL
:: soft_valid ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: basis_type ...

SUBROUTINEcalculate_lri_rho_elec(lri_rho_g, lri_rho_r, qs_env, lri_coef, total_rho, basis_type)

Collocates the fitted lri density on a grid.

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: lri_rho_g ...
TYPE(pw_p_type),
INTENT(inout)
:: lri_rho_r ...
POINTER
:: qs_env ...
POINTER
:: lri_coef(:) ...
REAL(dp),
INTENT(out)
:: total_rho ...
CHARACTER(*),
INTENT(in)
:: basis_type ...

SUBROUTINEcalculate_ppl_grid(vppl, qs_env)

computes the local pseudopotential (without erf term) on the grid

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: vppl ...
POINTER
:: qs_env ...

SUBROUTINEcalculate_rho_core(rho_core, total_rho, qs_env, only_nopaw)

computes the density of the core charges on the grid

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: rho_core ...
REAL(dp),
INTENT(out)
:: total_rho ...
POINTER
:: qs_env ...
LOGICAL,
INTENT(in),
OPTIONAL
:: only_nopaw ...

SUBROUTINEcalculate_rho_elec(matrix_p, matrix_p_kp, rho, rho_gspace, total_rho, ks_env, soft_valid, compute_tau, compute_grad, basis_type, der_type, idir, task_list_external, pw_env_external)

computes the density corresponding to a given density matrix on the grid

Arguments:
TYPE(dbcsr_type),
OPTIONAL, POINTER
:: matrix_p ...
OPTIONAL, POINTER
:: matrix_p_kp(:) ...
TYPE(pw_p_type),
INTENT(inout)
:: rho ...
TYPE(pw_p_type),
INTENT(inout)
:: rho_gspace ...
REAL(dp),
INTENT(out)
:: total_rho ...
POINTER
:: ks_env ...
LOGICAL,
INTENT(in),
OPTIONAL
:: soft_valid ...
LOGICAL,
INTENT(in),
OPTIONAL
:: compute_tau ...
LOGICAL,
INTENT(in),
OPTIONAL
:: compute_grad ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: basis_type ...
INTEGER,
INTENT(in),
OPTIONAL
:: der_type ...
INTEGER,
INTENT(in),
OPTIONAL
:: idir ...
OPTIONAL, POINTER
:: task_list_external ...
OPTIONAL, POINTER
:: pw_env_external ...

SUBROUTINEcalculate_rho_metal(rho_metal, coeff, total_rho_metal, qs_env)

computes the image charge density on the grid (including coeffcients)

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: rho_metal image charge density
REAL(dp),
POINTER
:: coeff(:) expansion coefficients of the image charge density, i.e. rho_metal=sum_a c_a*g_a
REAL(dp),
INTENT(out),
OPTIONAL
:: total_rho_metal total induced image charge density
POINTER
:: qs_env qs environment

SUBROUTINEcalculate_rho_nlcc(rho_nlcc, qs_env)

computes the density of the non-linear core correction on the grid

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: rho_nlcc ...
POINTER
:: qs_env ...

SUBROUTINEcalculate_rho_resp_all(rho_resp, coeff, natom, eta, qs_env)

computes the RESP charge density on a grid based on the RESP charges

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: rho_resp RESP charge density
REAL(dp),
POINTER
:: coeff(:) RESP charges, take care of normalization factor (eta/pi)**1.5 later
INTEGER,
INTENT(in)
:: natom number of atoms
REAL(dp),
INTENT(in)
:: eta width of single Gaussian
POINTER
:: qs_env qs environment

SUBROUTINEcalculate_rho_resp_single(rho_gb, qs_env, eta, iatom_in)

collocate a single Gaussian on the grid for periodic RESP fitting

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: rho_gb charge density generated by a single gaussian
POINTER
:: qs_env qs environment
REAL(dp),
INTENT(in)
:: eta width of single Gaussian
INTEGER,
INTENT(in)
:: iatom_in atom index

SUBROUTINEcalculate_rho_single_gaussian(rho_gb, qs_env, iatom_in)

collocate a single Gaussian on the grid

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: rho_gb charge density generated by a single gaussian
POINTER
:: qs_env qs environment
INTEGER,
INTENT(in)
:: iatom_in atom index

SUBROUTINEcalculate_wavefunction(mo_vectors, ivector, rho, rho_gspace, atomic_kind_set, qs_kind_set, cell, dft_control, particle_set, pw_env, basis_type, external_vector)

maps a given wavefunction on the grid

Arguments:
TYPE(cp_fm_type),
POINTER
:: mo_vectors ...
INTEGER
:: ivector ...
TYPE(pw_p_type),
INTENT(inout)
:: rho ...
TYPE(pw_p_type),
INTENT(inout)
:: rho_gspace ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: qs_kind_set(:) ...
TYPE(cell_type),
POINTER
:: cell ...
POINTER
:: dft_control ...
POINTER
:: particle_set(:) ...
POINTER
:: pw_env ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: basis_type ...
REAL(dp),
OPTIONAL
:: external_vector(:) ...

SUBROUTINEcollocate_pgf_product_gspace(la_max, zeta, la_min, lb_max, zetb, lb_min, ra, rab, rab2, scale, pab, na, nb, eps_rho_gspace, gsq_max, pw)

low level collcation of primitive gaussian functions in g-space

Arguments:
INTEGER,
INTENT(in)
:: la_max ...
REAL(dp),
INTENT(in)
:: zeta ...
INTEGER,
INTENT(in)
:: la_min ...
INTEGER,
INTENT(in)
:: lb_max ...
REAL(dp),
INTENT(in)
:: zetb ...
INTEGER,
INTENT(in)
:: lb_min ...
REAL(dp),
INTENT(in)
:: ra(3) ...
REAL(dp),
INTENT(in)
:: rab(3) ...
REAL(dp),
INTENT(in)
:: rab2 ...
REAL(dp),
INTENT(in)
:: scale ...
REAL(dp),
POINTER
:: pab(:,:) ...
INTEGER,
INTENT(in)
:: na ...
INTEGER,
INTENT(in)
:: nb ...
REAL(dp),
INTENT(in)
:: eps_rho_gspace ...
REAL(dp),
INTENT(in)
:: gsq_max ...
TYPE(pw_type),
POINTER
:: pw ...

SUBROUTINEcollocate_pgf_product_rspace(la_max, zeta, la_min, lb_max, zetb, lb_min, ra, rab, rab2, scale, pab, o1, o2, rsgrid, cell, cube_info, eps_rho_rspace, ga_gb_function, lgrid, ithread, map_consistent, collocate_rho0, rpgf0_s, idir, ir, rsgauge, rsbuf, use_subpatch, subpatch_pattern, lmax_global)

low level collocation of primitive gaussian functions

Arguments:
INTEGER,
INTENT(in)
:: la_max ...
REAL(dp),
INTENT(in)
:: zeta ...
INTEGER,
INTENT(in)
:: la_min ...
INTEGER,
INTENT(in)
:: lb_max ...
REAL(dp),
INTENT(in)
:: zetb ...
INTEGER,
INTENT(in)
:: lb_min ...
REAL(dp),
INTENT(in)
:: ra(3) ...
REAL(dp),
INTENT(in)
:: rab(3) ...
REAL(dp),
INTENT(in)
:: rab2 ...
REAL(dp),
INTENT(in)
:: scale ...
REAL(dp),
POINTER
:: pab(:,:) ...
INTEGER,
INTENT(in)
:: o1 ...
INTEGER,
INTENT(in)
:: o2 ...
POINTER
:: rsgrid ...
TYPE(cell_type),
POINTER
:: cell ...
INTENT(in)
:: cube_info ...
REAL(dp),
INTENT(in)
:: eps_rho_rspace ...
INTEGER,
INTENT(in)
:: ga_gb_function ...
TYPE(lgrid_type),
OPTIONAL
:: lgrid ...
INTEGER,
INTENT(in),
OPTIONAL
:: ithread ...
LOGICAL,
INTENT(in),
OPTIONAL
:: map_consistent ...
LOGICAL,
INTENT(in),
OPTIONAL
:: collocate_rho0 ...
REAL(dp),
INTENT(in),
OPTIONAL
:: rpgf0_s ...
INTEGER,
INTENT(in),
OPTIONAL
:: idir ...
INTEGER,
INTENT(in),
OPTIONAL
:: ir ...
POINTER, OPTIONAL
:: rsgauge ...
POINTER, OPTIONAL
:: rsbuf ...
LOGICAL,
OPTIONAL
:: use_subpatch ...
INTEGER(int_8),
INTENT(in),
OPTIONAL
:: subpatch_pattern ...
INTEGER,
INTENT(in)
:: lmax_global Maximum possible value of lmax used to dimension arrays