Documentation for module qmmm_image_charge

Routines for image charge calculation within QM/MM

source: qmmm_image_charge.F
Loading...

public Subroutines/Functions:

Add potential of metal (image charge pot) to Hartree Potential
determines coefficients by solving image_matrix*coeff=-pot_const by Gaussian elimination or in an iterative fashion and calculates image/metal potential with these coefficients
calculate image matrix T depending on constraints on image atoms in case coefficients are estimated not iteratively
calculates the image forces on the MM atoms
Print image coefficients

SUBROUTINEadd_image_pot_to_hartree_pot(v_hartree, v_metal, qs_env)

Add potential of metal (image charge pot) to Hartree Potential

Arguments:
TYPE(pw_p_type),
INTENT(inout)
:: v_hartree Hartree potential (in real space)
TYPE(pw_p_type),
INTENT(in)
:: v_metal potential generated by rho_metal (in real space)
POINTER
:: qs_env qs environment

SUBROUTINEcalculate_image_pot(v_hartree_rspace, rho_hartree_gspace, energy, qmmm_env, qs_env)

determines coefficients by solving image_matrix*coeff=-pot_const by Gaussian elimination or in an iterative fashion and calculates image/metal potential with these coefficients

Arguments:
TYPE(pw_p_type),
INTENT(in)
:: v_hartree_rspace Hartree potential in real space
TYPE(pw_p_type),
INTENT(in)
:: rho_hartree_gspace Kohn Sham density in reciprocal space
POINTER
:: energy structure where energies are stored
POINTER
:: qmmm_env qmmm environment
POINTER
:: qs_env qs environment

SUBROUTINEconditional_calc_image_matrix(qs_env, qmmm_env)

calculate image matrix T depending on constraints on image atoms in case coefficients are estimated not iteratively

Arguments:
POINTER
:: qs_env qs environment
POINTER
:: qmmm_env qmmm environment

SUBROUTINEintegrate_potential_devga_rspace(potential, coeff, forces, qmmm_env, qs_env)

calculates the image forces on the MM atoms

Arguments:
TYPE(pw_p_type),
INTENT(in)
:: potential any potential, in this case: Hartree potential
REAL(dp),
POINTER
:: coeff(:) expansion coefficients of the image charge density, i.e. rho_metal=sum_a c_a*g_a
REAL(dp),
POINTER
:: forces(:,:) structure storing the force contribution of the image charges for the metal (MM) atoms
POINTER
:: qmmm_env qmmm environment
POINTER
:: qs_env qs environment