Documentation for module qs_scf_methods

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

source: qs_scf_methods.F
Loading...

Generic procedures:

combine_ks_matrices

public Subroutines/Functions:

SUBROUTINE
cp_sm_mix (m1, m2, p_mix, delta, para_env, m3)
Perform a mixing of the given matrixes into the first matrix m1 = m2 + p_mix (m1-m2)
Diagonalise the Kohn-Sham matrix to get a new set of MO eigen- vectors and MO eigenvalues. ks will be modified
...
...
...
perform (if requested) a density mixing

Generic procedure combine_ks_matrices

...

TYPE(cp_fm_type),
POINTER
:: ksa × ×
TYPE(cp_fm_type),
POINTER
:: ksb × ×
REAL(dp),
INTENT(in)
:: occa(:) × ×
REAL(dp),
INTENT(in)
:: occb(:) × ×
REAL(dp),
INTENT(in)
:: roks_parameter(0:2,0:2,1:2) ×
REAL(dp),
INTENT(in)
:: f ×
INTEGER,
INTENT(in)
:: nalpha ×
INTEGER,
INTENT(in)
:: nbeta ×

SUBROUTINEcp_sm_mix(m1, m2, p_mix, delta, para_env, m3)

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

Arguments:
TYPE(dbcsr_type),
POINTER
:: m1 first (new) matrix, is modified
TYPE(dbcsr_type),
POINTER
:: m2 the second (old) matrix
REAL(dp),
INTENT(in)
:: p_mix how much m1 is conserved (0: none, 1: all)
REAL(dp),
INTENT(out)
:: delta maximum norm of m1-m2
POINTER
:: para_env ...
TYPE(dbcsr_type),
OPTIONAL, POINTER
:: m3 ...

SUBROUTINEeigensolver(matrix_ks_fm, mo_set, ortho, work, cholesky_method, do_level_shift, level_shift, matrix_u_fm, use_jacobi)

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

Arguments:
TYPE(cp_fm_type),
POINTER
:: matrix_ks_fm ...
POINTER
:: mo_set ...
TYPE(cp_fm_type),
POINTER
:: ortho ...
TYPE(cp_fm_type),
POINTER
:: work ...
INTEGER,
INTENT(inout)
:: cholesky_method ...
LOGICAL,
INTENT(in)
:: do_level_shift activate the level shifting technique
REAL(dp),
INTENT(in)
:: level_shift amount of shift applied (in a.u.)
TYPE(cp_fm_type),
POINTER
:: matrix_u_fm matrix U : S (overlap matrix) = U^T * U
LOGICAL,
INTENT(in)
:: use_jacobi ...

SUBROUTINEeigensolver_dbcsr(matrix_ks, matrix_ks_fm, mo_set, ortho_dbcsr, ksbuf1, ksbuf2)

...

Arguments:
TYPE(dbcsr_type),
POINTER
:: matrix_ks ...
TYPE(cp_fm_type),
POINTER
:: matrix_ks_fm ...
POINTER
:: mo_set ...
TYPE(dbcsr_type),
POINTER
:: ortho_dbcsr ...
TYPE(dbcsr_type),
POINTER
:: ksbuf1 ...
TYPE(dbcsr_type),
POINTER
:: ksbuf2 ...

SUBROUTINEeigensolver_simple(matrix_ks, mo_set, work, do_level_shift, level_shift, use_jacobi, jacobi_threshold)

...

Arguments:
TYPE(cp_fm_type),
POINTER
:: matrix_ks ...
POINTER
:: mo_set ...
TYPE(cp_fm_type),
POINTER
:: work ...
LOGICAL,
INTENT(in)
:: do_level_shift activate the level shifting technique
REAL(dp),
INTENT(in)
:: level_shift amount of shift applied (in a.u.)
LOGICAL,
INTENT(in)
:: use_jacobi ...
REAL(dp),
INTENT(in)
:: jacobi_threshold ...

SUBROUTINEeigensolver_symm(matrix_ks_fm, mo_set, ortho, work, do_level_shift, level_shift, matrix_u_fm, use_jacobi, jacobi_threshold)

...

Arguments:
TYPE(cp_fm_type),
POINTER
:: matrix_ks_fm ...
POINTER
:: mo_set ...
TYPE(cp_fm_type),
POINTER
:: ortho ...
TYPE(cp_fm_type),
POINTER
:: work ...
LOGICAL,
INTENT(in)
:: do_level_shift activate the level shifting technique
REAL(dp),
INTENT(in)
:: level_shift amount of shift applied (in a.u.)
TYPE(cp_fm_type),
POINTER
:: matrix_u_fm matrix U : S (overlap matrix) = U^T * U
LOGICAL,
INTENT(in)
:: use_jacobi ...
REAL(dp),
INTENT(in)
:: jacobi_threshold ...

SUBROUTINEscf_env_density_mixing(p_mix_new, mixing_store, rho_ao, para_env, iter_delta, iter_count, diis, invert)

perform (if requested) a density mixing

Arguments:
POINTER
:: p_mix_new(:,:) New density matrices
POINTER
:: mixing_store ...
POINTER
:: rho_ao(:,:) Density environment
POINTER
:: para_env ...
REAL(dp),
INTENT(inout)
:: iter_delta ...
INTEGER,
INTENT(in)
:: iter_count ...
LOGICAL,
INTENT(in),
OPTIONAL
:: diis ...
LOGICAL,
INTENT(in),
OPTIONAL
:: invert Invert mixing

SUBROUTINEcombine_ks_matrices_1(ksa, ksb, occa, occb, roks_parameter)

...

Arguments:
TYPE(cp_fm_type),
POINTER
:: ksa ...
TYPE(cp_fm_type),
POINTER
:: ksb ...
REAL(dp),
INTENT(in)
:: occa(:) ...
REAL(dp),
INTENT(in)
:: occb(:) ...
REAL(dp),
INTENT(in)
:: roks_parameter(0:2,0:2,1:2) ...

SUBROUTINEcombine_ks_matrices_2(ksa, ksb, occa, occb, f, nalpha, nbeta)

...

Arguments:
TYPE(cp_fm_type),
POINTER
:: ksa ...
TYPE(cp_fm_type),
POINTER
:: ksb ...
REAL(dp),
INTENT(in)
:: occa(:) ...
REAL(dp),
INTENT(in)
:: occb(:) ...
REAL(dp),
INTENT(in)
:: f ...
INTEGER,
INTENT(in)
:: nalpha ...
INTEGER,
INTENT(in)
:: nbeta ...