Documentation for module qs_p_env_methods

Utility functions for the perturbation calculations.

source: qs_p_env_methods.F
Loading...

public Subroutines/Functions:

allocates and initializes the perturbation environment (no setup)
To be called after the value of psi0 has changed. Recalculates the quantities S_psi0 and m_epsilon.
SUBROUTINE
p_op_l1 (p_env, qs_env, v, res)
Evaluates Fv (S_mo)^-1 - Sv(epsilon) and stores it in res
SUBROUTINE
p_op_l2 (p_env, qs_env, p1, res, alpha, beta)
evaluates res = alpha kpp1(v)*psi0 + beta res with kpp1 evaluated with p=qs_env%rho%rho_ao, p1=p1
SUBROUTINE
p_postortho (p_env, qs_env, v, n_cols)
does a postorthogonalization on the given matrix vector: v = (I-SP) v
SUBROUTINE
p_preortho (p_env, qs_env, v, n_cols)
does a preorthogonalization of the given matrix: v = (I-PS)v

SUBROUTINEp_env_create(p_env, qs_env, kpp1_env, p1_option, psi0d, orthogonal_orbitals, linres_control)

allocates and initializes the perturbation environment (no setup)

Arguments:
POINTER
:: p_env the environment to initialize
POINTER
:: qs_env the qs_environment for the system
OPTIONAL, POINTER
:: kpp1_env the environment that builds the second order perturbation kernel
OPTIONAL, POINTER
:: p1_option(:) ...
OPTIONAL, POINTER
:: psi0d(:) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: orthogonal_orbitals if the orbitals are orthogonal
OPTIONAL, POINTER
:: linres_control ...

SUBROUTINEp_env_psi0_changed(p_env, qs_env, psi0, hrho_psi0d)

To be called after the value of psi0 has changed. Recalculates the quantities S_psi0 and m_epsilon.

Arguments:
POINTER
:: p_env the perturbation environment to set
POINTER
:: qs_env ...
OPTIONAL, POINTER
:: psi0(:) the value of psi0, if not given defaults to the qs_env mos
INTENT(inout),
OPTIONAL
:: hrho_psi0d(:) is given, then the partial result Hrho_psi0d is stored in that vector

SUBROUTINEp_op_l1(p_env, qs_env, v, res)

Evaluates Fv (S_mo)^-1 - Sv(epsilon) and stores it in res

Arguments:
POINTER
:: p_env perturbation calculation environment
POINTER
:: qs_env the qs_env that is perturbed by this p_env
INTENT(in)
:: v(:) the matrix to operate on
INTENT(inout)
:: res(:) the result

SUBROUTINEp_op_l2(p_env, qs_env, p1, res, alpha, beta)

evaluates res = alpha kpp1(v)*psi0 + beta res with kpp1 evaluated with p=qs_env%rho%rho_ao, p1=p1

Arguments:
POINTER
:: p_env the perturbation environment
POINTER
:: qs_env the qs_env that is perturbed by this p_env
POINTER
:: p1(:) direction in which evaluate the second derivative
INTENT(inout)
:: res(:) place where to store the result
REAL(dp),
INTENT(in),
OPTIONAL
:: alpha scale factor of the result (defaults to 1.0)
REAL(dp),
INTENT(in),
OPTIONAL
:: beta scale factor of the old values (defaults to 0.0)

SUBROUTINEp_postortho(p_env, qs_env, v, n_cols)

does a postorthogonalization on the given matrix vector: v = (I-SP) v

Arguments:
POINTER
:: p_env the perturbation environment
POINTER
:: qs_env the qs_env that is perturbed by this p_env
INTENT(inout)
:: v(:) matrix to orthogonalize
INTEGER,
INTENT(in),
OPTIONAL
:: n_cols(:) the number of columns of C to multiply (defaults to size(v,2))

SUBROUTINEp_preortho(p_env, qs_env, v, n_cols)

does a preorthogonalization of the given matrix: v = (I-PS)v

Arguments:
POINTER
:: p_env the perturbation environment
POINTER
:: qs_env the qs_env that is perturbed by this p_env
INTENT(inout)
:: v(:) matrix to orthogonalize
INTEGER,
INTENT(in),
OPTIONAL
:: n_cols(:) the number of columns of C to multiply (defaults to size(v,2))