![]() |
(git:d18deda)
|
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. | |
subroutine, public | build_diagonal_jacobian (qs_env, used_history) |
Builds a strictly diagonal inverse Jacobian from MD/SCF history. | |
subroutine, public | restart_inverse_jacobian (qs_env) |
Restarts the finite difference inverse Jacobian. | |
subroutine, public | print_inverse_jacobian (logger, inv_jacobian, iter_count) |
Prints the finite difference inverse Jacobian to file. | |
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. | |
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. | |
Auxiliary routines for performing a constrained DFT SCF run with Quickstep.
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.
qs_env | the qs_env where to build the Jacobian |
output_unit | the output unit number |
nwork | the number of perturbations to take in the negative direction |
pwork | the number of perturbations to take in the positive direction |
coeff | list of coefficients that determine how to sum up the various perturbations |
step_multiplier | list of values that determine how large steps to take for each perturbatio |
dh | total length of the interval to use for computing the finite difference derivatives |
Definition at line 63 of file qs_cdft_scf_utils.F.
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.
qs_env | the qs_environment_type where to compute the Jacobian |
used_history | flag that determines if history was actually used to prepare the Jacobian |
Definition at line 204 of file qs_cdft_scf_utils.F.
subroutine, public qs_cdft_scf_utils::restart_inverse_jacobian | ( | type(qs_environment_type), pointer | qs_env | ) |
Restarts the finite difference inverse Jacobian.
qs_env | the qs_environment_type where to compute the Jacobian |
Definition at line 283 of file qs_cdft_scf_utils.F.
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.
logger | the default IO logger |
inv_jacobian | the inverse Jacobian matrix |
iter_count | the iteration number |
Definition at line 325 of file qs_cdft_scf_utils.F.
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.
para_env | the para_env |
project_name | the project basename |
suffix | the suffix |
output_unit | the default unit number for the newly created temporary logger |
tmp_logger | pointer to the newly created temporary logger |
Definition at line 363 of file qs_cdft_scf_utils.F.
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.
scf_control | the scf_control that holds the Jacobian settings |
scf_env | the scf_env that holds the CDFT iteration information |
explicit_jacobian | flag that determines if the finite difference Jacobian is needed |
should_build | flag that determines if the Jacobian should be built |
used_history | flag that determines if SCF history has been used to build a Jacobian |
Definition at line 397 of file qs_cdft_scf_utils.F.