(git:f2099e5)
Loading...
Searching...
No Matches
qs_scf_loop_utils Module Reference

Utility routines for qs_scf. More...

Functions/Subroutines

pure logical function, public qs_scf_kp_search_endpoint (method)
 identify an accepted OT search endpoint from its iteration label
pure logical function, public qs_scf_kp_ref_refresh_ready (accepted_searches, residual, eps_scf, base_state, allow_exit_window)
 decide whether a mature variable-occupation REF chart should be rebuilt
subroutine, public qs_scf_set_loop_flags (scf_env, diis_step, energy_only, just_energy, exit_inner_loop)
 computes properties for a given hamiltonian using the current wfn
subroutine, public qs_scf_new_mos (qs_env, scf_env, scf_control, scf_section, diis_step, energy_only, probe)
 takes known energy and derivatives and produces new wfns and or density matrix
subroutine, public qs_scf_new_mos_kp (qs_env, scf_env, scf_control, diis_step, probe, ot_kp_subspace_refresh, allow_ot_kp_subspace_refresh, allow_ot_kp_exit_refresh, accepted_ot_kp_searches, added_mos_auto_grow, energy_only)
 Updates MOs and density matrix using diagonalization Kpoint code.
subroutine, public qs_scf_candidate_density_delta (scf_env, rho, para_env, delta, kpoints)
 Measure the distance between the diagonalized candidate density and the current density.
subroutine, public qs_scf_commit_density_candidate (scf_env, rho)
 Commit the diagonalized candidate density without numerical mixing.
subroutine, public qs_scf_density_mixing (scf_env, rho, para_env, diis_step, kpoints)
 Performs the requested density mixing if any needed.
subroutine, public qs_scf_check_outer_exit (qs_env, scf_env, scf_control, should_stop, outer_loop_converged, exit_outer_loop)
 checks whether exit conditions for outer loop are satisfied
subroutine, public qs_scf_check_inner_exit (qs_env, scf_env, scf_control, should_stop, just_energy, exit_inner_loop, inner_loop_converged, output_unit, u_changed)
 checks whether exit conditions for inner loop are satisfied
subroutine, public qs_scf_rho_update (rho, qs_env, scf_env, ks_env, mix_rho)
 Performs the updates rho (takes care of mixing as well).
subroutine, public qs_scf_inner_finalize (scf_env, qs_env, diis_step, output_unit)
 Performs the necessary steps before leaving innner scf loop.

Detailed Description

Utility routines for qs_scf.

Function/Subroutine Documentation

◆ qs_scf_kp_search_endpoint()

pure logical function, public qs_scf_loop_utils::qs_scf_kp_search_endpoint ( character(len=*), intent(in) method)

identify an accepted OT search endpoint from its iteration label

Parameters
methodOT iteration label
Returns
true for the primary endpoint of every supported minimizer

Definition at line 169 of file qs_scf_loop_utils.F.

Here is the caller graph for this function:

◆ qs_scf_kp_ref_refresh_ready()

pure logical function, public qs_scf_loop_utils::qs_scf_kp_ref_refresh_ready ( integer, intent(in) accepted_searches,
real(kind=dp), intent(in) residual,
real(kind=dp), intent(in) eps_scf,
logical, intent(in) base_state,
logical, intent(in), optional allow_exit_window )

decide whether a mature variable-occupation REF chart should be rebuilt

Parameters
accepted_searchesaccepted search directions in the current REF chart
residualcurrent OT residual
eps_scfrequested SCF threshold
base_statewhether the current point can start a new search direction
allow_exit_windowwhether a prior physical REF rebuild permits an exit-only rebuild
Returns
true inside the asymptotic residual window after sufficient accepted history

Definition at line 192 of file qs_scf_loop_utils.F.

Here is the caller graph for this function:

◆ qs_scf_set_loop_flags()

subroutine, public qs_scf_loop_utils::qs_scf_set_loop_flags ( type(qs_scf_env_type), pointer scf_env,
logical diis_step,
logical energy_only,
logical just_energy,
logical exit_inner_loop )

computes properties for a given hamiltonian using the current wfn

Parameters
scf_env...
diis_step...
energy_only...
just_energy...
exit_inner_loop...

Definition at line 224 of file qs_scf_loop_utils.F.

Here is the caller graph for this function:

◆ qs_scf_new_mos()

subroutine, public qs_scf_loop_utils::qs_scf_new_mos ( type(qs_environment_type), pointer qs_env,
type(qs_scf_env_type), pointer scf_env,
type(scf_control_type), pointer scf_control,
type(section_vals_type), pointer scf_section,
logical diis_step,
logical energy_only,
type(hairy_probes_type), dimension(:), optional, pointer probe )

takes known energy and derivatives and produces new wfns and or density matrix

Parameters
qs_env...
scf_env...
scf_control...
scf_section...
diis_step...
energy_only...
probe...

Definition at line 261 of file qs_scf_loop_utils.F.

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

◆ qs_scf_new_mos_kp()

subroutine, public qs_scf_loop_utils::qs_scf_new_mos_kp ( type(qs_environment_type), pointer qs_env,
type(qs_scf_env_type), pointer scf_env,
type(scf_control_type), pointer scf_control,
logical diis_step,
type(hairy_probes_type), dimension(:), optional, pointer probe,
logical, intent(out), optional ot_kp_subspace_refresh,
logical, intent(in), optional allow_ot_kp_subspace_refresh,
logical, intent(in), optional allow_ot_kp_exit_refresh,
integer, intent(in), optional accepted_ot_kp_searches,
logical, intent(out), optional added_mos_auto_grow,
logical, intent(out), optional energy_only )

Updates MOs and density matrix using diagonalization Kpoint code.

Parameters
qs_env...
scf_env...
scf_control...
diis_step...
probe...
ot_kp_subspace_refresh...
allow_ot_kp_subspace_refresh...
allow_ot_kp_exit_refresh...
accepted_ot_kp_searches...
added_mos_auto_grow...
energy_only...

Definition at line 458 of file qs_scf_loop_utils.F.

Here is the caller graph for this function:

◆ qs_scf_candidate_density_delta()

subroutine, public qs_scf_loop_utils::qs_scf_candidate_density_delta ( type(qs_scf_env_type), pointer scf_env,
type(qs_rho_type), pointer rho,
type(mp_para_env_type), pointer para_env,
real(kind=dp), intent(out) delta,
type(kpoint_type), optional, pointer kpoints )

Measure the distance between the diagonalized candidate density and the current density.

Parameters
scf_envHolds SCF environment information.
rhoCurrent electron density.
para_envParallel environment.
deltaMaximum change of the density and any separately stored density coordinates.
kpointsOptional Bloch densities for the Lowdin convergence check.

Definition at line 3220 of file qs_scf_loop_utils.F.

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

◆ qs_scf_commit_density_candidate()

subroutine, public qs_scf_loop_utils::qs_scf_commit_density_candidate ( type(qs_scf_env_type), pointer scf_env,
type(qs_rho_type), pointer rho )

Commit the diagonalized candidate density without numerical mixing.

Parameters
scf_envHolds SCF environment information.
rhoElectron density to update.

Definition at line 3255 of file qs_scf_loop_utils.F.

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

◆ qs_scf_density_mixing()

subroutine, public qs_scf_loop_utils::qs_scf_density_mixing ( type(qs_scf_env_type), pointer scf_env,
type(qs_rho_type), pointer rho,
type(mp_para_env_type), pointer para_env,
logical diis_step,
type(kpoint_type), optional, pointer kpoints )

Performs the requested density mixing if any needed.

Parameters
scf_envHolds SCF environment information
rhoAll data for the electron density
para_envParallel environment
diis_stepDid we do a DIIS step?
kpointsOptional Bloch state with separate Lowdin density coordinates.

Definition at line 3284 of file qs_scf_loop_utils.F.

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

◆ qs_scf_check_outer_exit()

subroutine, public qs_scf_loop_utils::qs_scf_check_outer_exit ( type(qs_environment_type), pointer qs_env,
type(qs_scf_env_type), pointer scf_env,
type(scf_control_type), pointer scf_control,
logical should_stop,
logical outer_loop_converged,
logical exit_outer_loop )

checks whether exit conditions for outer loop are satisfied

Parameters
qs_env...
scf_env...
scf_control...
should_stop...
outer_loop_converged...
exit_outer_loop...

Definition at line 3336 of file qs_scf_loop_utils.F.

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

◆ qs_scf_check_inner_exit()

subroutine, public qs_scf_loop_utils::qs_scf_check_inner_exit ( type(qs_environment_type), pointer qs_env,
type(qs_scf_env_type), pointer scf_env,
type(scf_control_type), pointer scf_control,
logical should_stop,
logical just_energy,
logical exit_inner_loop,
logical inner_loop_converged,
integer output_unit,
logical, intent(out) u_changed )

checks whether exit conditions for inner loop are satisfied

Parameters
qs_env...
scf_env...
scf_control...
should_stop...
just_energy...
exit_inner_loop...
inner_loop_converged...
output_unit...
u_changedWhether a Lowdin k-point U step requires restarting the SCF history.

Definition at line 3376 of file qs_scf_loop_utils.F.

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

◆ qs_scf_rho_update()

subroutine, public qs_scf_loop_utils::qs_scf_rho_update ( type(qs_rho_type), pointer rho,
type(qs_environment_type), pointer qs_env,
type(qs_scf_env_type), pointer scf_env,
type(qs_ks_env_type), pointer ks_env,
logical, intent(in) mix_rho )

Performs the updates rho (takes care of mixing as well).

Parameters
rho...
qs_env...
scf_env...
ks_env...
mix_rho...

Definition at line 3533 of file qs_scf_loop_utils.F.

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

◆ qs_scf_inner_finalize()

subroutine, public qs_scf_loop_utils::qs_scf_inner_finalize ( type(qs_scf_env_type), pointer scf_env,
type(qs_environment_type), pointer qs_env,
logical diis_step,
integer, intent(in) output_unit )

Performs the necessary steps before leaving innner scf loop.

Parameters
scf_env...
qs_env...
diis_step...
output_unit...

Definition at line 3571 of file qs_scf_loop_utils.F.

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