(git:691081d)
Loading...
Searching...
No Matches
qs_diis Module Reference

Apply the direct inversion in the iterative subspace (DIIS) of Pulay in the framework of an SCF iteration for convergence acceleration. More...

Functions/Subroutines

subroutine, public qs_diis_b_create (diis_buffer, nbuffer)
 Allocates an SCF DIIS buffer.
subroutine, public qs_diis_b_step (diis_buffer, mo_array, kc, sc, delta, error_max, diis_step, eps_diis, nmixing, s_matrix, scf_section, roks)
 Update the SCF DIIS buffer, and if appropriate does a diis step.
pure subroutine, public qs_diis_b_clear (diis_buffer)
 clears the buffer
subroutine, public qs_diis_b_step_4lscf (diis_buffer, qs_env, ls_scf_env, unit_nr, iscf, diis_step, eps_diis, nmixing, s_matrix, threshold)
 Update the SCF DIIS buffer in linear scaling SCF (LS-SCF), and if appropriate does a diis step.
pure subroutine, public qs_diis_b_clear_sparse (diis_buffer)
 clears the DIIS buffer in LS-SCF calculation
pure subroutine, public qs_diis_b_create_sparse (diis_buffer, nbuffer)
 Allocates an SCF DIIS buffer for LS-SCF calculation.
subroutine, public qs_diis_b_create_kp (diis_buffer, nbuffer)
 Allocates an SCF DIIS buffer for k-points.
subroutine, public qs_diis_b_check_i_alloc_kp (diis_buffer, matrix_struct, nspin, nkp, scf_section)
 Allocate and initialize a DIIS buffer for nao*nao parameter variables and with a buffer size of nbuffer, in the k-point case.
pure subroutine, public qs_diis_b_clear_kp (diis_buffer)
 clears the buffer
subroutine, public qs_diis_b_info_kp (diis_buffer, ib, nb)
 Update info about the current buffer step ib and the current number of buffers nb.
subroutine, public qs_diis_b_calc_err_kp (diis_buffer, ib, mos, kc, sc, ispin, ikp, nkp_local, scf_section, real_wfn)
 Calculate and store the error for a given k-point.
subroutine, public qs_diis_b_step_kp (diis_buffer, coeffs, ib, nb, delta, error_max, diis_step, eps_diis, nspin, nkp, nkp_local, nmixing, scf_section, para_env_inter_kp)
 Update the SCF DIIS buffer, and if appropriate does a diis step, for k-points.

Detailed Description

Apply the direct inversion in the iterative subspace (DIIS) of Pulay in the framework of an SCF iteration for convergence acceleration.

Literature
  • P. Pulay, Chem. Phys. Lett. 73, 393 (1980)
  • P. Pulay, J. Comput. Chem. 3, 556 (1982)
History
  • Changed to BLACS matrix usage (08.06.2001,MK)
  • rewritten to include LSD (1st attempt) (01.2003, Joost VandeVondele)
  • DIIS for ROKS (05.04.06,MK)
  • DIIS for k-points (04.2023, Augustin Bussy)
Author
Matthias Krack (28.06.2000)

Function/Subroutine Documentation

◆ qs_diis_b_create()

subroutine, public qs_diis::qs_diis_b_create ( type(qs_diis_buffer_type), intent(out) diis_buffer,
integer, intent(in) nbuffer )

Allocates an SCF DIIS buffer.

Parameters
diis_bufferthe buffer to create
nbuffer...
History
02.2003 created [fawzi]
Author
fawzi

Definition at line 104 of file qs_diis.F.

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

◆ qs_diis_b_step()

subroutine, public qs_diis::qs_diis_b_step ( type(qs_diis_buffer_type), pointer diis_buffer,
type(mo_set_type), dimension(:), intent(in) mo_array,
type(cp_fm_type), dimension(:), pointer kc,
type(cp_fm_type), intent(in) sc,
real(kind=dp), intent(in) delta,
real(kind=dp), intent(out) error_max,
logical, intent(out) diis_step,
real(kind=dp), intent(in) eps_diis,
integer, intent(in), optional nmixing,
type(dbcsr_p_type), dimension(:), optional, pointer s_matrix,
type(section_vals_type), pointer scf_section,
logical, intent(in), optional roks )

Update the SCF DIIS buffer, and if appropriate does a diis step.

Parameters
diis_buffer...
mo_array...
kc...
sc...
delta...
error_max...
diis_step...
eps_diis...
nmixing...
s_matrix...
scf_section...
roks...
History
  • Creation (07.05.2001, Matthias Krack)
  • Changed to BLACS matrix usage (08.06.2001, MK)
  • 03.2003 rewamped [fawzi]
  • Adapted for high-spin ROKS (08.04.06,MK)
Author
Matthias Krack

Definition at line 230 of file qs_diis.F.

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

◆ qs_diis_b_clear()

pure subroutine, public qs_diis::qs_diis_b_clear ( type(qs_diis_buffer_type), intent(inout) diis_buffer)

clears the buffer

Parameters
diis_bufferthe buffer to clear
History
02.2003 created [fawzi]
Author
fawzi

Definition at line 520 of file qs_diis.F.

Here is the caller graph for this function:

◆ qs_diis_b_step_4lscf()

subroutine, public qs_diis::qs_diis_b_step_4lscf ( type(qs_diis_buffer_type_sparse), pointer diis_buffer,
type(qs_environment_type), pointer qs_env,
type(ls_scf_env_type) ls_scf_env,
integer, intent(in) unit_nr,
integer, intent(in) iscf,
logical, intent(out) diis_step,
real(kind=dp), intent(in) eps_diis,
integer, intent(in), optional nmixing,
type(dbcsr_type), optional s_matrix,
real(kind=dp), intent(in) threshold )

Update the SCF DIIS buffer in linear scaling SCF (LS-SCF), and if appropriate does a diis step.

Parameters
diis_buffer...
qs_env...
ls_scf_env...
unit_nr...
iscf...
diis_step...
eps_diis...
nmixing...
s_matrix...
threshold...
History
  • Adapted for LS-SCF (10-11-14) from qs_diis_b_step
Author
Fredy W. Aquino

Definition at line 546 of file qs_diis.F.

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

◆ qs_diis_b_clear_sparse()

pure subroutine, public qs_diis::qs_diis_b_clear_sparse ( type(qs_diis_buffer_type_sparse), intent(inout) diis_buffer)

clears the DIIS buffer in LS-SCF calculation

Parameters
diis_bufferthe buffer to clear
History
10-11-14 created [FA] modified from qs_diis_b_clear
Author
Fredy W. Aquino

Definition at line 837 of file qs_diis.F.

Here is the caller graph for this function:

◆ qs_diis_b_create_sparse()

pure subroutine, public qs_diis::qs_diis_b_create_sparse ( type(qs_diis_buffer_type_sparse), intent(out) diis_buffer,
integer, intent(in) nbuffer )

Allocates an SCF DIIS buffer for LS-SCF calculation.

Parameters
diis_bufferthe buffer to create
nbuffer...
History
10-11-14 created [FA] modified from qs_diis_b_create
Author
Fredy W. Aquino

Definition at line 853 of file qs_diis.F.

Here is the caller graph for this function:

◆ qs_diis_b_create_kp()

subroutine, public qs_diis::qs_diis_b_create_kp ( type(qs_diis_buffer_type_kp), intent(out) diis_buffer,
integer, intent(in) nbuffer )

Allocates an SCF DIIS buffer for k-points.

Parameters
diis_bufferthe buffer to create
nbuffer...

Definition at line 871 of file qs_diis.F.

Here is the caller graph for this function:

◆ qs_diis_b_check_i_alloc_kp()

subroutine, public qs_diis::qs_diis_b_check_i_alloc_kp ( type(qs_diis_buffer_type_kp), intent(inout) diis_buffer,
type(cp_fm_struct_type), pointer matrix_struct,
integer, intent(in) nspin,
integer, intent(in) nkp,
type(section_vals_type), pointer scf_section )

Allocate and initialize a DIIS buffer for nao*nao parameter variables and with a buffer size of nbuffer, in the k-point case.

Parameters
diis_bufferthe buffer to initialize
matrix_structthe structure for the matrix of the buffer note: this is in the kp subgroup
nspin...
nkp...
scf_section...

Definition at line 894 of file qs_diis.F.

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

◆ qs_diis_b_clear_kp()

pure subroutine, public qs_diis::qs_diis_b_clear_kp ( type(qs_diis_buffer_type_kp), intent(inout) diis_buffer)

clears the buffer

Parameters
diis_bufferthe buffer to clear

Definition at line 979 of file qs_diis.F.

Here is the caller graph for this function:

◆ qs_diis_b_info_kp()

subroutine, public qs_diis::qs_diis_b_info_kp ( type(qs_diis_buffer_type_kp), pointer diis_buffer,
integer, intent(out) ib,
integer, intent(out) nb )

Update info about the current buffer step ib and the current number of buffers nb.

Parameters
diis_buffer...
ib...
nb...

Definition at line 993 of file qs_diis.F.

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

◆ qs_diis_b_calc_err_kp()

subroutine, public qs_diis::qs_diis_b_calc_err_kp ( type(qs_diis_buffer_type_kp), pointer diis_buffer,
integer, intent(in) ib,
type(mo_set_type), dimension(:, :), pointer mos,
type(cp_cfm_type), intent(inout) kc,
type(cp_cfm_type), intent(inout) sc,
integer, intent(in) ispin,
integer, intent(in) ikp,
integer, intent(in) nkp_local,
type(section_vals_type), pointer scf_section,
logical, intent(in), optional real_wfn )

Calculate and store the error for a given k-point.

Parameters
diis_buffer...
ib...
mos...
kc...
sc...
ispin...
ikp...
nkp_local...
scf_section...
real_wfn...
Note
We assume that we always have an overlap matrix. TODO: do we need to pass the kp weight for the back Fourier transform?

Definition at line 1018 of file qs_diis.F.

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

◆ qs_diis_b_step_kp()

subroutine, public qs_diis::qs_diis_b_step_kp ( type(qs_diis_buffer_type_kp), pointer diis_buffer,
complex(kind=dp), dimension(:), intent(inout) coeffs,
integer, intent(in) ib,
integer, intent(in) nb,
real(kind=dp), intent(in) delta,
real(kind=dp), intent(out) error_max,
logical, intent(out) diis_step,
real(kind=dp), intent(in) eps_diis,
integer, intent(in) nspin,
integer, intent(in) nkp,
integer, intent(in) nkp_local,
integer, intent(in), optional nmixing,
type(section_vals_type), pointer scf_section,
type(mp_para_env_type), pointer para_env_inter_kp )

Update the SCF DIIS buffer, and if appropriate does a diis step, for k-points.

Parameters
diis_buffer...
coeffs...
ib...
nb...
delta...
error_max...
diis_step...
eps_diis...
nspin...
nkp...
nkp_local...
nmixing...
scf_section...
para_env_inter_kpcommunicator connecting the k-point groups

Definition at line 1114 of file qs_diis.F.

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