![]() |
(git:b77b4be)
|
Methods using the PEXSI library to calculate the density matrix and related quantities using the Kohn-Sham and overlap matrices from the linear scaling quickstep SCF environment. More...
Functions/Subroutines | |
subroutine, public | pexsi_init_read_input (pexsi_section, pexsi_env) |
Read CP2K input section PEXSI and pass it to the PEXSI environment. | |
subroutine, public | pexsi_init_scf (ks_env, pexsi_env, template_matrix) |
Initializations needed before SCF. | |
subroutine, public | pexsi_finalize_scf (pexsi_env, mu_spin) |
Deallocations and post-processing after SCF. | |
subroutine, public | density_matrix_pexsi (pexsi_env, matrix_p, matrix_w, kts, matrix_ks, matrix_s, nelectron_exact, mu, iscf, ispin) |
Calculate density matrix, energy-weighted density matrix and entropic energy contribution with the DFT driver of the PEXSI library. | |
subroutine, public | pexsi_set_convergence_tolerance (pexsi_env, delta_scf, eps_scf, initialize, check_convergence) |
Set PEXSI convergence tolerance (numElectronPEXSITolerance), adapted to the convergence error of the previous SCF step. The tolerance is calculated using an initial convergence threshold (tol_nel_initial) and a target convergence threshold (tol_nel_target): numElectronPEXSITolerance(delta_scf) = alpha*delta_scf+beta where alpha and beta are chosen such that numElectronPEXSITolerance(delta_scf_0) = tol_nel_initial numElectronPEXSITolerance(eps_scf) = tol_nel_target and delta_scf_0 is the initial SCF convergence error. | |
subroutine, public | pexsi_to_qs (ls_scf_env, qs_env, kts, matrix_w) |
Pass energy weighted density matrix and entropic energy contribution to QS environment. | |
Methods using the PEXSI library to calculate the density matrix and related quantities using the Kohn-Sham and overlap matrices from the linear scaling quickstep SCF environment.
subroutine, public pexsi_methods::pexsi_init_read_input | ( | type(section_vals_type), intent(in), pointer | pexsi_section, |
type(lib_pexsi_env), intent(inout) | pexsi_env | ||
) |
Read CP2K input section PEXSI and pass it to the PEXSI environment.
pexsi_section | ... |
pexsi_env | ... |
Definition at line 80 of file pexsi_methods.F.
subroutine, public pexsi_methods::pexsi_init_scf | ( | type(qs_ks_env_type), pointer | ks_env, |
type(lib_pexsi_env), intent(inout) | pexsi_env, | ||
type(dbcsr_type), intent(in) | template_matrix | ||
) |
Initializations needed before SCF.
ks_env | ... |
pexsi_env | ... |
template_matrix | DBCSR matrix that defines the block structure and sparsity pattern of all matrices that are sent to PEXSI |
Definition at line 164 of file pexsi_methods.F.
subroutine, public pexsi_methods::pexsi_finalize_scf | ( | type(lib_pexsi_env), intent(inout) | pexsi_env, |
real(kind=dp), dimension(2), intent(in) | mu_spin | ||
) |
Deallocations and post-processing after SCF.
pexsi_env | ... |
mu_spin | ... |
Definition at line 237 of file pexsi_methods.F.
subroutine, public pexsi_methods::density_matrix_pexsi | ( | type(lib_pexsi_env), intent(inout) | pexsi_env, |
type(dbcsr_type), intent(inout) | matrix_p, | ||
type(dbcsr_p_type), intent(inout) | matrix_w, | ||
real(kind=dp), intent(out) | kts, | ||
type(dbcsr_type), intent(in), target | matrix_ks, | ||
type(dbcsr_type), intent(in), target | matrix_s, | ||
integer, intent(in) | nelectron_exact, | ||
real(kind=dp), intent(out) | mu, | ||
integer, intent(in) | iscf, | ||
integer, intent(in) | ispin | ||
) |
Calculate density matrix, energy-weighted density matrix and entropic energy contribution with the DFT driver of the PEXSI library.
[in,out] | pexsi_env | PEXSI environment |
[in,out] | matrix_p | density matrix returned by PEXSI |
[in,out] | matrix_w | energy-weighted density matrix returned by PEXSI |
[out] | kTS | entropic energy contribution returned by PEXSI |
[in] | matrix_ks | Kohn-Sham matrix from linear scaling QS environment |
[in] | matrix_s | overlap matrix from linear scaling QS environment |
[in] | nelectron_exact | exact number of electrons |
[out] | mu | chemical potential calculated by PEXSI |
[in] | iscf | SCF step |
[in] | ispin | Number of spin |
Definition at line 300 of file pexsi_methods.F.
subroutine, public pexsi_methods::pexsi_set_convergence_tolerance | ( | type(lib_pexsi_env), intent(inout) | pexsi_env, |
real(kind=dp), intent(in) | delta_scf, | ||
real(kind=dp), intent(in) | eps_scf, | ||
logical, intent(in) | initialize, | ||
logical, intent(out) | check_convergence | ||
) |
Set PEXSI convergence tolerance (numElectronPEXSITolerance), adapted to the convergence error of the previous SCF step. The tolerance is calculated using an initial convergence threshold (tol_nel_initial) and a target convergence threshold (tol_nel_target): numElectronPEXSITolerance(delta_scf) = alpha*delta_scf+beta where alpha and beta are chosen such that numElectronPEXSITolerance(delta_scf_0) = tol_nel_initial numElectronPEXSITolerance(eps_scf) = tol_nel_target and delta_scf_0 is the initial SCF convergence error.
pexsi_env | ... |
delta_scf | convergence error of previous SCF step |
eps_scf | SCF convergence criterion |
initialize | whether or not adaptive thresholing should be initialized with delta_scf as initial convergence error |
check_convergence | is set to .FALSE. if convergence in number of electrons will not be achieved in next SCF step |
Definition at line 533 of file pexsi_methods.F.
subroutine, public pexsi_methods::pexsi_to_qs | ( | type(ls_scf_env_type) | ls_scf_env, |
type(qs_environment_type), intent(inout), pointer | qs_env, | ||
real(kind=dp), dimension(:), intent(in), optional | kts, | ||
type(dbcsr_p_type), dimension(:), intent(in), optional | matrix_w | ||
) |
Pass energy weighted density matrix and entropic energy contribution to QS environment.
ls_scf_env | ... |
qs_env | ... |
kTS | ... |
matrix_w | ... |
Definition at line 579 of file pexsi_methods.F.