(git:6a2e663)
qs_cdft_scf_utils Module Reference

Auxiliary routines for performing a constrained DFT SCF run with Quickstep. More...

Functions/Subroutines

subroutine, public prepare_jacobian_stencil (qs_env, output_unit, nwork, pwork, coeff, step_multiplier, dh)
 Prepares the finite difference stencil for computing the Jacobian. The constraints are re-evaluated by perturbing each constraint. More...
 
subroutine, public build_diagonal_jacobian (qs_env, used_history)
 Builds a strictly diagonal inverse Jacobian from MD/SCF history. More...
 
subroutine, public restart_inverse_jacobian (qs_env)
 Restarts the finite difference inverse Jacobian. More...
 
subroutine, public print_inverse_jacobian (logger, inv_jacobian, iter_count)
 Prints the finite difference inverse Jacobian to file. More...
 
subroutine, public create_tmp_logger (para_env, project_name, suffix, output_unit, tmp_logger)
 Creates a temporary logger for redirecting output to a new file. More...
 
subroutine, public initialize_inverse_jacobian (scf_control, scf_env, explicit_jacobian, should_build, used_history)
 Checks if the inverse Jacobian should be calculated and initializes the calculation. More...
 

Detailed Description

Auxiliary routines for performing a constrained DFT SCF run with Quickstep.

History
  • Separated some routines from qs_scf (03.2018) [Nico Holmberg]
Author
Nico Holmberg (03.2018)

Function/Subroutine Documentation

◆ prepare_jacobian_stencil()

subroutine, public qs_cdft_scf_utils::prepare_jacobian_stencil ( type(qs_environment_type), pointer  qs_env,
integer  output_unit,
integer  nwork,
integer  pwork,
real(kind=dp), dimension(:), allocatable  coeff,
real(kind=dp), dimension(:), allocatable  step_multiplier,
real(kind=dp), dimension(:), allocatable  dh 
)

Prepares the finite difference stencil for computing the Jacobian. The constraints are re-evaluated by perturbing each constraint.

Parameters
qs_envthe qs_env where to build the Jacobian
output_unitthe output unit number
nworkthe number of perturbations to take in the negative direction
pworkthe number of perturbations to take in the positive direction
coefflist of coefficients that determine how to sum up the various perturbations
step_multiplierlist of values that determine how large steps to take for each perturbatio
dhtotal length of the interval to use for computing the finite difference derivatives
History
03.2018 created [Nico Holmberg]

Definition at line 63 of file qs_cdft_scf_utils.F.

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

◆ build_diagonal_jacobian()

subroutine, public qs_cdft_scf_utils::build_diagonal_jacobian ( type(qs_environment_type), pointer  qs_env,
logical  used_history 
)

Builds a strictly diagonal inverse Jacobian from MD/SCF history.

Parameters
qs_envthe qs_environment_type where to compute the Jacobian
used_historyflag that determines if history was actually used to prepare the Jacobian
History
03.2018 created [Nico Holmberg]

Definition at line 204 of file qs_cdft_scf_utils.F.

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

◆ restart_inverse_jacobian()

subroutine, public qs_cdft_scf_utils::restart_inverse_jacobian ( type(qs_environment_type), pointer  qs_env)

Restarts the finite difference inverse Jacobian.

Parameters
qs_envthe qs_environment_type where to compute the Jacobian
History
03.2018 created [Nico Holmberg]

Definition at line 283 of file qs_cdft_scf_utils.F.

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

◆ print_inverse_jacobian()

subroutine, public qs_cdft_scf_utils::print_inverse_jacobian ( type(cp_logger_type), pointer  logger,
real(kind=dp), dimension(:, :), intent(in), pointer  inv_jacobian,
integer  iter_count 
)

Prints the finite difference inverse Jacobian to file.

Parameters
loggerthe default IO logger
inv_jacobianthe inverse Jacobian matrix
iter_countthe iteration number
History
03.2018 created [Nico Holmberg]

Definition at line 325 of file qs_cdft_scf_utils.F.

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

◆ create_tmp_logger()

subroutine, public qs_cdft_scf_utils::create_tmp_logger ( type(mp_para_env_type), pointer  para_env,
character(len=*)  project_name,
character(len=*)  suffix,
integer, intent(out)  output_unit,
type(cp_logger_type), intent(out), pointer  tmp_logger 
)

Creates a temporary logger for redirecting output to a new file.

Parameters
para_envthe para_env
project_namethe project basename
suffixthe suffix
output_unitthe default unit number for the newly created temporary logger
tmp_loggerpointer to the newly created temporary logger
History
03.2018 created [Nico Holmberg]

Definition at line 363 of file qs_cdft_scf_utils.F.

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

◆ initialize_inverse_jacobian()

subroutine, public qs_cdft_scf_utils::initialize_inverse_jacobian ( type(scf_control_type), pointer  scf_control,
type(qs_scf_env_type), pointer  scf_env,
logical  explicit_jacobian,
logical  should_build,
logical  used_history 
)

Checks if the inverse Jacobian should be calculated and initializes the calculation.

Parameters
scf_controlthe scf_control that holds the Jacobian settings
scf_envthe scf_env that holds the CDFT iteration information
explicit_jacobianflag that determines if the finite difference Jacobian is needed
should_buildflag that determines if the Jacobian should be built
used_historyflag that determines if SCF history has been used to build a Jacobian
History
03.2018 created [Nico Holmberg]

Definition at line 397 of file qs_cdft_scf_utils.F.

Here is the caller graph for this function: