39 #include "../base/base_uses.f90"
43 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cell_opt'
56 TYPE(force_env_type),
POINTER :: force_env
57 TYPE(global_environment_type),
POINTER :: globenv
59 CHARACTER(len=*),
PARAMETER :: routinen =
'cp_cell_opt'
61 INTEGER :: handle, step_start_val
62 REAL(kind=
dp),
DIMENSION(:),
POINTER :: x0
63 TYPE(cp_logger_type),
POINTER :: logger
64 TYPE(gopt_f_type),
POINTER :: gopt_env
65 TYPE(gopt_param_type),
POINTER :: gopt_param
66 TYPE(section_vals_type),
POINTER :: force_env_section, geo_section, &
69 CALL timeset(routinen, handle)
71 cpassert(
ASSOCIATED(force_env))
72 cpassert(
ASSOCIATED(globenv))
73 NULLIFY (gopt_param, force_env_section, gopt_env, x0)
74 root_section => force_env%root_section
75 force_env_section => force_env%force_env_section
80 CALL gopt_f_create(gopt_env, gopt_param, force_env=force_env, globenv=globenv, &
81 geo_opt_section=geo_section)
86 CALL cp_iterate(logger%iter_info, iter_nr=step_start_val)
87 CALL cp_cell_opt_low(force_env, globenv, gopt_param, gopt_env, &
88 force_env_section, geo_section, x0)
95 DEALLOCATE (gopt_param)
111 SUBROUTINE cp_cell_opt_low(force_env, globenv, gopt_param, gopt_env, force_env_section, &
113 TYPE(force_env_type),
POINTER :: force_env
114 TYPE(global_environment_type),
POINTER :: globenv
115 TYPE(gopt_param_type),
POINTER :: gopt_param
116 TYPE(gopt_f_type),
POINTER :: gopt_env
117 TYPE(section_vals_type),
POINTER :: force_env_section, geo_section
118 REAL(kind=
dp),
DIMENSION(:),
POINTER :: x0
120 cpassert(
ASSOCIATED(force_env))
121 cpassert(
ASSOCIATED(globenv))
122 cpassert(
ASSOCIATED(gopt_param))
123 cpassert(
ASSOCIATED(gopt_env))
124 cpassert(
ASSOCIATED(x0))
125 cpassert(
ASSOCIATED(force_env_section))
126 cpassert(
ASSOCIATED(geo_section))
127 mark_used(force_env_section)
129 SELECT CASE (gopt_param%method_id)
132 geo_section, gopt_env, x0)
135 geo_section, gopt_env, x0)
137 CALL geoopt_cg(force_env, gopt_param, globenv, &
138 geo_section, gopt_env, x0)
143 END SUBROUTINE cp_cell_opt_low
Routines for Geometry optimization using BFGS algorithm.
recursive subroutine, public geoopt_bfgs(force_env, gopt_param, globenv, geo_section, gopt_env, x0)
Main driver for BFGS geometry optimizations.
performs CELL optimization
subroutine, public cp_cell_opt(force_env, globenv)
Main driver to perform geometry optimization.
Routines for Geometry optimization using Conjugate Gradients.
recursive subroutine, public geoopt_cg(force_env, gopt_param, globenv, geo_section, gopt_env, x0, do_update)
Driver for conjugate gradient optimization technique.
Main driver for L-BFGS optimizer.
subroutine, public geoopt_lbfgs(force_env, gopt_param, globenv, geo_section, gopt_env, x0)
...
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
subroutine, public cp_iterate(iteration_info, last, iter_nr, increment, iter_nr_out)
adds one to the actual iteration
subroutine, public cp_rm_iter_level(iteration_info, level_name, n_rlevel_att)
Removes an iteration level.
subroutine, public cp_add_iter_level(iteration_info, level_name, n_rlevel_new)
Adds an iteration level.
Interface for the force calculations.
Define type storing the global information of a run. Keep the amount of stored data small....
contains a functional that calculates the energy and its derivatives for the geometry optimizer
subroutine, public gopt_f_create_x0(gopt_env, x0)
returns the value of the parameters for the actual configuration
contains a functional that calculates the energy and its derivatives for the geometry optimizer
recursive subroutine, public gopt_f_create(gopt_env, gopt_param, force_env, globenv, geo_opt_section, eval_opt_geo)
...
recursive subroutine, public gopt_f_release(gopt_env)
...
contains typo and related routines to handle parameters controlling the GEO_OPT module
subroutine, public gopt_param_read(gopt_param, gopt_section, type_id)
reads the parameters of the geopmetry optimizer
Defines the basic variable types.
integer, parameter, public dp