Documentation for module dm_ls_scf_methods

lower level routines for linear scaling SCF

source: dm_ls_scf_methods.F
Loading...

public Subroutines/Functions:

apply a preconditioner either forward (precondition) inv(sqrt(bs)) * A * inv(sqrt(bs)) backward (restore to old form) sqrt(bs) * A * sqrt(bs)
compute the homo and lumo given a KS matrix and a density matrix in the orthonormalized basis and the eps_min and eps_max, min and max eigenvalue of the ks matrix
compute the density matrix with a trace that is close to nelectron. take a mu as input, and improve by bisection as needed.
for a fixed mu, compute the corresponding density matrix and its trace
compute the density matrix using a non monotonic trace conserving algorithm based on SIAM DOI. 10.1137/130911585. 2014.04 created [Jonathan Mullin]
compute the density matrix using a trace-resetting algorithm
initialize S matrix related properties (sqrt, inverse...) Might be factored-out since this seems common code with the other SCF.

SUBROUTINEapply_matrix_preconditioner(matrix, direction, matrix_bs_sqrt, matrix_bs_sqrt_inv)

apply a preconditioner either forward (precondition) inv(sqrt(bs)) * A * inv(sqrt(bs)) backward (restore to old form) sqrt(bs) * A * sqrt(bs)

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix ...
CHARACTER(*)
:: direction ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_bs_sqrt ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_bs_sqrt_inv ...

SUBROUTINEcompute_homo_lumo(matrix_k, matrix_p, eps_min, eps_max, threshold, max_iter_lanczos, eps_lanczos, homo, lumo, unit_nr)

compute the homo and lumo given a KS matrix and a density matrix in the orthonormalized basis and the eps_min and eps_max, min and max eigenvalue of the ks matrix

Arguments:
:: matrix_k ...
:: matrix_p ...
REAL(dp)
:: eps_min ...
REAL(dp)
:: eps_max ...
REAL(dp)
:: threshold ...
INTEGER,
INTENT(in)
:: max_iter_lanczos ...
REAL(dp),
INTENT(in)
:: eps_lanczos ...
REAL(dp)
:: homo ...
REAL(dp)
:: lumo ...
INTEGER
:: unit_nr ...

SUBROUTINEdensity_matrix_sign(matrix_p, mu, fixed_mu, matrix_ks, matrix_s, matrix_s_inv, nelectron, threshold)

compute the density matrix with a trace that is close to nelectron. take a mu as input, and improve by bisection as needed.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_p ...
REAL(dp),
INTENT(inout)
:: mu ...
LOGICAL
:: fixed_mu ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_ks ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_s ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_s_inv ...
INTEGER,
INTENT(in)
:: nelectron ...
REAL(dp),
INTENT(in)
:: threshold ...

SUBROUTINEdensity_matrix_sign_fixed_mu(matrix_p, trace, mu, matrix_ks, matrix_s, matrix_s_inv, threshold)

for a fixed mu, compute the corresponding density matrix and its trace

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_p ...
REAL(dp),
INTENT(out)
:: trace ...
REAL(dp),
INTENT(inout)
:: mu ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_ks ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_s ...
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_s_inv ...
REAL(dp),
INTENT(in)
:: threshold ...

SUBROUTINEdensity_matrix_tc2(matrix_p, matrix_ks, matrix_s_sqrt_inv, nelectron, threshold, e_homo, e_lumo, non_monotonic, eps_lanczos, max_iter_lanczos)

compute the density matrix using a non monotonic trace conserving algorithm based on SIAM DOI. 10.1137/130911585. 2014.04 created [Jonathan Mullin]

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_p ...
TYPE(dbcsr_type),
INTENT(in)
:: matrix_ks ...
TYPE(dbcsr_type),
INTENT(in)
:: matrix_s_sqrt_inv ...
INTEGER,
INTENT(in)
:: nelectron ...
REAL(dp),
INTENT(in)
:: threshold ...
REAL(dp),
INTENT(inout)
:: e_homo ...
REAL(dp),
INTENT(inout)
:: e_lumo ...
LOGICAL,
INTENT(in),
OPTIONAL
:: non_monotonic ...
REAL(dp),
INTENT(in)
:: eps_lanczos ...
INTEGER,
INTENT(in)
:: max_iter_lanczos ...

SUBROUTINEdensity_matrix_trs4(matrix_p, matrix_ks, matrix_s_sqrt_inv, nelectron, threshold, e_homo, e_lumo, e_mu, dynamic_threshold, matrix_ks_deviation, max_iter_lanczos, eps_lanczos, converged)

compute the density matrix using a trace-resetting algorithm

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix_p ...
TYPE(dbcsr_type),
INTENT(in)
:: matrix_ks ...
TYPE(dbcsr_type),
INTENT(in)
:: matrix_s_sqrt_inv ...
INTEGER,
INTENT(in)
:: nelectron ...
REAL(dp),
INTENT(in)
:: threshold ...
REAL(dp),
INTENT(inout)
:: e_homo ...
REAL(dp),
INTENT(inout)
:: e_lumo ...
REAL(dp),
INTENT(inout)
:: e_mu ...
LOGICAL,
INTENT(in),
OPTIONAL
:: dynamic_threshold ...
TYPE(dbcsr_type),
INTENT(inout),
OPTIONAL
:: matrix_ks_deviation ...
INTEGER,
INTENT(in)
:: max_iter_lanczos ...
REAL(dp),
INTENT(in)
:: eps_lanczos ...
LOGICAL,
INTENT(out),
OPTIONAL
:: converged ...

SUBROUTINEls_scf_init_matrix_s(matrix_s, ls_scf_env)

initialize S matrix related properties (sqrt, inverse...) Might be factored-out since this seems common code with the other SCF.

Arguments:
:: matrix_s ...
:: ls_scf_env ...