CP2K 2.4 (Revision 12889)
Classes | Functions | Variables

qs_scf_methods Namespace Reference

groups fairly general SCF methods, so that modules other than qs_scf can use them too split off from qs_scf to reduce dependencies More...

Classes

interface  combine_ks_matrices

Functions

subroutine, public scf_env_density_mixing (p_mix_new, mixing_store, rho_ao, para_env, iter_delta, iter_count, diis, invert, error)
 perform (if requested) a density mixing
subroutine, public eigensolver (matrix_ks, mo_set, ortho, work, do_level_shift, level_shift, cholesky_method, use_jacobi, jacobi_threshold, error)
 Diagonalise the Kohn-Sham matrix to get a new set of MO eigen- vectors and MO eigenvalues. ks will be modified.
subroutine, public simple_eigensolver (matrix_ks, mo_set, work, do_level_shift, level_shift, use_jacobi, jacobi_threshold, error)
subroutine, public cp_sm_mix (m1, m2, p_mix, delta, para_env, m3, error)
 Perform a mixing of the given matrixes into the first matrix m1 = m2 + p_mix (m1-m2)
subroutine combine_ks_matrices_1 (ksa, ksb, occa, occb, roks_parameter, error)
subroutine combine_ks_matrices_2 (ksa, ksb, occa, occb, f, nalpha, nbeta, error)

Variables

CHARACTER(len=*), parameter,
private 
moduleN = 'qs_scf_methods'
REAL(KIND=dp), parameter ratio = 0.25_dp

Detailed Description

groups fairly general SCF methods, so that modules other than qs_scf can use them too split off from qs_scf to reduce dependencies

History
  • Joost VandeVondele (03.2006)
  • combine_ks_matrices added (05.04.06,MK)
  • second ROKS scheme added (15.04.06,MK)
  • MO occupation management moved (29.08.2008,MK)

Function Documentation

subroutine qs_scf_methods::combine_ks_matrices_1 ( TYPE(cp_fm_type),pointer  ksa,
TYPE(cp_fm_type),pointer  ksb,
REAL(KIND=dp),dimension(:),intent(in)  occa,
REAL(KIND=dp),dimension(:),intent(in)  occb,
REAL(KIND=dp),dimension(0:2, 0:2, 1:2),intent(in)  roks_parameter,
TYPE(cp_error_type),intent(inout)  error 
) [private]

Definition at line 411 of file qs_scf_methods.f90.

References cp_fm_struct::cp_fm_struct_equivalent(), and timings::timeset().

Here is the call graph for this function:

subroutine qs_scf_methods::combine_ks_matrices_2 ( TYPE(cp_fm_type),pointer  ksa,
TYPE(cp_fm_type),pointer  ksb,
REAL(KIND=dp),dimension(:),intent(in)  occa,
REAL(KIND=dp),dimension(:),intent(in)  occb,
REAL(KIND=dp),intent(in)  f,
INTEGER,intent(in)  nalpha,
INTEGER,intent(in)  nbeta,
TYPE(cp_error_type),intent(inout)  error 
) [private]

Definition at line 485 of file qs_scf_methods.f90.

References cp_fm_struct::cp_fm_struct_equivalent(), and timings::timeset().

Here is the call graph for this function:

subroutine,public qs_scf_methods::cp_sm_mix ( TYPE(cp_dbcsr_type),pointer  m1,
TYPE(cp_dbcsr_type),pointer  m2,
REAL(KIND=dp),intent(in)  p_mix,
REAL(KIND=dp),intent(out)  delta,
TYPE(cp_para_env_type),pointer  para_env,
TYPE(cp_dbcsr_type),optional,pointer  m3,
TYPE(cp_error_type),intent(inout)  error 
)

Perform a mixing of the given matrixes into the first matrix m1 = m2 + p_mix (m1-m2)

Parameters:
m1: first (new) matrix, is modified
m2: the second (old) matrix
p_mixhow much m1 is conserved (0: none, 1: all)
deltamaximum norm of m1-m2
errorvariable to control error logging, stopping,... see module cp_error_handling
Note:
if you what to store the result in m2 swap m1 and m2 an use (1-pmix) as pmix para_env should be removed (embedded in matrix)
History
02.2003 rewamped [fawzi]
Author:
fawzi

Definition at line 352 of file qs_scf_methods.f90.

References CPPostcondition, and timings::timeset().

Referenced by qs_gspace_mixing::gspace_density_mixing(), scf_env_density_mixing(), and qs_gspace_mixing::self_consistency_check().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public qs_scf_methods::eigensolver ( TYPE(cp_fm_type),pointer  matrix_ks,
TYPE(mo_set_type),pointer  mo_set,
TYPE(cp_fm_type),pointer  ortho,
TYPE(cp_fm_type),pointer  work,
LOGICAL,intent(in)  do_level_shift,
REAL(KIND=dp),intent(in)  level_shift,
INTEGER,intent(inout)  cholesky_method,
LOGICAL,intent(in)  use_jacobi,
REAL(KIND=dp),intent(in)  jacobi_threshold,
TYPE(cp_error_type),intent(inout)  error 
)

Diagonalise the Kohn-Sham matrix to get a new set of MO eigen- vectors and MO eigenvalues. ks will be modified.

Author:
Matthias Krack
Date:
01.05.2001
Version:
1.0

Definition at line 153 of file qs_scf_methods.f90.

References input_constants::cholesky_inverse, cp_fm_diag::choose_eigv_solver(), qs_mo_types::correct_mo_eigenvalues(), cp_fm_cholesky::cp_fm_cholesky_reduce(), cp_fm_basic_linalg::cp_fm_gemm(), cp_fm_types::cp_fm_get_element(), error, termination::stop_program(), and timings::timeset().

Referenced by qs_initial_guess::calculate_first_density_matrix(), and mp2::mp2_main().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public qs_scf_methods::scf_env_density_mixing ( TYPE(cp_dbcsr_p_type),dimension(:),pointer  p_mix_new,
TYPE(mixing_storage_type),pointer  mixing_store,
TYPE(cp_dbcsr_p_type),dimension(:),pointer  rho_ao,
TYPE(cp_para_env_type),pointer  para_env,
REAL(KIND=dp),intent(inout)  iter_delta,
INTEGER,intent(in)  iter_count,
LOGICAL,intent(in),optional  diis,
LOGICAL,intent(in),optional  invert,
TYPE(cp_error_type),intent(inout)  error 
)

perform (if requested) a density mixing

Parameters:
errorvariable to control error logging, stopping,... see module cp_error_handling
History
02.2003 created [fawzi]
Author:
fawzi

Definition at line 85 of file qs_scf_methods.f90.

References cp_sm_mix(), error, and timings::timeset().

Referenced by qs_scf::scf_env_do_scf(), and xas_tp_scf::xas_do_tp_scf().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public qs_scf_methods::simple_eigensolver ( TYPE(cp_fm_type),pointer  matrix_ks,
TYPE(mo_set_type),pointer  mo_set,
TYPE(cp_fm_type),pointer  work,
LOGICAL,intent(in)  do_level_shift,
REAL(KIND=dp),intent(in)  level_shift,
LOGICAL,intent(in)  use_jacobi,
REAL(KIND=dp),intent(in)  jacobi_threshold,
TYPE(cp_error_type),intent(inout)  error 
)

Variable Documentation

CHARACTER(len=*),parameter,private qs_scf_methods::moduleN = 'qs_scf_methods'

Definition at line 61 of file qs_scf_methods.f90.

REAL(KIND=dp),parameter qs_scf_methods::ratio = 0.25_dp

Definition at line 62 of file qs_scf_methods.f90.