(git:6a2e663)
qs_p_env_methods Module Reference

Utility functions for the perturbation calculations. More...

Functions/Subroutines

subroutine, public p_env_create (p_env, qs_env, p1_option, p1_admm_option, orthogonal_orbitals, linres_control)
 allocates and initializes the perturbation environment (no setup) More...
 
subroutine, public p_env_check_i_alloc (p_env, qs_env)
 checks that the intenal storage is allocated, and allocs it if needed More...
 
subroutine, public p_env_update_rho (p_env, qs_env)
 ... More...
 
subroutine, public p_env_psi0_changed (p_env, qs_env)
 To be called after the value of psi0 has changed. Recalculates the quantities S_psi0 and m_epsilon. More...
 
subroutine, public p_op_l1 (p_env, qs_env, v, res)
 Evaluates Fv (S_mo)^-1 - Sv(epsilon) and stores it in res. More...
 
subroutine, public 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_envrhorho_ao, p1=p1 More...
 
subroutine, public p_preortho (p_env, qs_env, v, n_cols)
 does a preorthogonalization of the given matrix: v = (I-PS)v More...
 
subroutine, public p_postortho (p_env, qs_env, v, n_cols)
 does a postorthogonalization on the given matrix vector: v = (I-SP) v More...
 
subroutine, public p_env_finish_kpp1 (qs_env, p_env)
 ... More...
 

Detailed Description

Utility functions for the perturbation calculations.

Note
  • routines are programmed with spins in mind but are as of now not tested with them
History
22-08-2002, TCH, started development

Function/Subroutine Documentation

◆ p_env_create()

subroutine, public qs_p_env_methods::p_env_create ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env,
type(dbcsr_p_type), dimension(:), optional, pointer  p1_option,
type(dbcsr_p_type), dimension(:), optional, pointer  p1_admm_option,
logical, intent(in), optional  orthogonal_orbitals,
type(linres_control_type), optional, pointer  linres_control 
)

allocates and initializes the perturbation environment (no setup)

Parameters
p_envthe environment to initialize
qs_envthe qs_environment for the system
p1_option...
p1_admm_option...
orthogonal_orbitalsif the orbitals are orthogonal
linres_control...
History
07.2002 created [fawzi]
Author
Fawzi Mohamed

Definition at line 131 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_env_check_i_alloc()

subroutine, public qs_p_env_methods::p_env_check_i_alloc ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env 
)

checks that the intenal storage is allocated, and allocs it if needed

Parameters
p_envthe environment to check
qs_envthe qs environment this p_env lives in
History
12.2002 created [fawzi]
Author
Fawzi Mohamed
Note
private routine

Definition at line 316 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_env_update_rho()

subroutine, public qs_p_env_methods::p_env_update_rho ( type(qs_p_env_type), intent(in)  p_env,
type(qs_environment_type), intent(in), pointer  qs_env 
)

...

Parameters
p_env...
qs_env...

Definition at line 397 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_env_psi0_changed()

subroutine, public qs_p_env_methods::p_env_psi0_changed ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env 
)

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

Parameters
p_envthe perturbation environment to set
qs_env...
History
07.2002 created [fawzi]
Author
Fawzi Mohamed

Definition at line 481 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_op_l1()

subroutine, public qs_p_env_methods::p_op_l1 ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env,
type(cp_fm_type), dimension(:), intent(in)  v,
type(cp_fm_type), dimension(:), intent(inout)  res 
)

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

Parameters
p_envperturbation calculation environment
qs_envthe qs_env that is perturbed by this p_env
vthe matrix to operate on
resthe result
History
10.2002, TCH, extracted single spin calculation
Author
Thomas Chassaing

Definition at line 679 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_op_l2()

subroutine, public qs_p_env_methods::p_op_l2 ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env,
type(dbcsr_p_type), dimension(:), pointer  p1,
type(cp_fm_type), dimension(:), intent(inout)  res,
real(kind=dp), intent(in), optional  alpha,
real(kind=dp), intent(in), optional  beta 
)

evaluates res = alpha kpp1(v)*psi0 + beta res with kpp1 evaluated with p=qs_envrhorho_ao, p1=p1

Parameters
p_envthe perturbation environment
qs_envthe qs_env that is perturbed by this p_env
p1direction in which evaluate the second derivative
resplace where to store the result
alphascale factor of the result (defaults to 1.0)
betascale factor of the old values (defaults to 0.0)
History
02.09.2002 adapted for new qs_p_env_type (TC) 03.2003 extended for p1 not taken from v (TC)
Author
fawzi
Note
qs_envrho must be up to date it would be better to pass rho1, not p1

Definition at line 784 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_preortho()

subroutine, public qs_p_env_methods::p_preortho ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env,
type(cp_fm_type), dimension(:), intent(inout)  v,
integer, dimension(:), intent(in), optional  n_cols 
)

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

Parameters
p_envthe perturbation environment
qs_envthe qs_env that is perturbed by this p_env
vmatrix to orthogonalize
n_colsthe number of columns of C to multiply (defaults to size(v,2))
History
02.09.2002 adapted for new qs_p_env_type (TC)
Author
Fawzi Mohamed

Definition at line 865 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_postortho()

subroutine, public qs_p_env_methods::p_postortho ( type(qs_p_env_type)  p_env,
type(qs_environment_type), pointer  qs_env,
type(cp_fm_type), dimension(:), intent(inout)  v,
integer, dimension(:), intent(in), optional  n_cols 
)

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

Parameters
p_envthe perturbation environment
qs_envthe qs_env that is perturbed by this p_env
vmatrix to orthogonalize
n_colsthe number of columns of C to multiply (defaults to size(v,2))
History
07.2002 created [fawzi]
Author
Fawzi Mohamed

Definition at line 957 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_env_finish_kpp1()

subroutine, public qs_p_env_methods::p_env_finish_kpp1 ( type(qs_environment_type), intent(in), pointer  qs_env,
type(qs_p_env_type), intent(in)  p_env 
)

...

Parameters
qs_env...
p_env...

Definition at line 1043 of file qs_p_env_methods.F.

Here is the call graph for this function:
Here is the caller graph for this function: