(git:c5411e0)
Loading...
Searching...
No Matches
pexsi_methods Module Reference

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.
 

Detailed Description

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.

History
2014.11 created [Patrick Seewald]
Author
Patrick Seewald

Function/Subroutine Documentation

◆ pexsi_init_read_input()

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.

Parameters
pexsi_section...
pexsi_env...
History
11.2014 created [Patrick Seewald]
Author
Patrick Seewald

Definition at line 80 of file pexsi_methods.F.

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

◆ pexsi_init_scf()

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.

Parameters
ks_env...
pexsi_env...
template_matrixDBCSR 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.

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

◆ pexsi_finalize_scf()

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.

Parameters
pexsi_env...
mu_spin...

Definition at line 238 of file pexsi_methods.F.

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

◆ density_matrix_pexsi()

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.

Parameters
[in,out]pexsi_envPEXSI environment
[in,out]matrix_pdensity matrix returned by PEXSI
[in,out]matrix_wenergy-weighted density matrix returned by PEXSI
[out]kTSentropic energy contribution returned by PEXSI
[in]matrix_ksKohn-Sham matrix from linear scaling QS environment
[in]matrix_soverlap matrix from linear scaling QS environment
[in]nelectron_exactexact number of electrons
[out]muchemical potential calculated by PEXSI
[in]iscfSCF step
[in]ispinNumber of spin
History
11.2014 created [Patrick Seewald]
Author
Patrick Seewald

Definition at line 301 of file pexsi_methods.F.

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

◆ pexsi_set_convergence_tolerance()

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.

Parameters
pexsi_env...
delta_scfconvergence error of previous SCF step
eps_scfSCF convergence criterion
initializewhether or not adaptive thresholing should be initialized with delta_scf as initial convergence error
check_convergenceis set to .FALSE. if convergence in number of electrons will not be achieved in next SCF step

Definition at line 535 of file pexsi_methods.F.

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

◆ pexsi_to_qs()

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.

Parameters
ls_scf_env...
qs_env...
kTS...
matrix_w...
History
12.2014 created [Patrick Seewald]
Author
Patrick Seewald

Definition at line 581 of file pexsi_methods.F.

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