40#include "../base/base_uses.f90"
45 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'geo_opt'
58 SUBROUTINE cp_geo_opt(force_env, globenv, eval_opt_geo, rm_restart_info)
62 LOGICAL,
INTENT(IN),
OPTIONAL :: eval_opt_geo, rm_restart_info
64 CHARACTER(len=*),
PARAMETER :: routinen =
'cp_geo_opt'
66 INTEGER :: handle, step_start_val
67 LOGICAL :: my_rm_restart_info
68 REAL(kind=
dp),
DIMENSION(:),
POINTER :: x0
74 CALL timeset(routinen, handle)
77 cpassert(
ASSOCIATED(force_env))
78 cpassert(
ASSOCIATED(globenv))
79 NULLIFY (gopt_param, gopt_env, x0)
87 root_section => force_env%root_section
92 CALL gopt_f_create(gopt_env, gopt_param, force_env=force_env, globenv=globenv, &
93 geo_opt_section=geo_section, eval_opt_geo=eval_opt_geo)
94 gopt_env%dimer_rotation_optimizer => cp_rot_opt
99 CALL cp_iterate(logger%iter_info, iter_nr=step_start_val)
100 CALL cp_geo_opt_low(force_env, globenv, gopt_param, gopt_env, &
105 my_rm_restart_info = .true.
106 IF (
PRESENT(rm_restart_info)) my_rm_restart_info = rm_restart_info
107 IF (my_rm_restart_info)
THEN
113 DEALLOCATE (gopt_param)
114 CALL timestop(handle)
125 SUBROUTINE cp_rot_opt(gopt_env, x0, gopt_param, geo_section)
127 REAL(kind=
dp),
DIMENSION(:),
POINTER :: x0
131 CHARACTER(len=*),
PARAMETER :: routinen =
'cp_rot_opt'
133 INTEGER :: handle, step_start_val
136 CALL timeset(routinen, handle)
138 cpassert(
ASSOCIATED(gopt_env))
139 cpassert(
ASSOCIATED(gopt_env%force_env))
140 cpassert(
ASSOCIATED(gopt_env%globenv))
144 CALL cp_iterate(logger%iter_info, iter_nr=step_start_val)
145 CALL cp_geo_opt_low(gopt_env%force_env, gopt_env%globenv, gopt_param, gopt_env, &
151 CALL timestop(handle)
153 END SUBROUTINE cp_rot_opt
164 SUBROUTINE cp_geo_opt_low(force_env, globenv, gopt_param, gopt_env, &
171 REAL(kind=
dp),
DIMENSION(:),
POINTER :: x0
173 cpassert(
ASSOCIATED(force_env))
174 cpassert(
ASSOCIATED(globenv))
175 cpassert(
ASSOCIATED(gopt_param))
176 cpassert(
ASSOCIATED(gopt_env))
177 cpassert(
ASSOCIATED(x0))
178 cpassert(
ASSOCIATED(geo_section))
180 SELECT CASE (gopt_param%method_id)
183 geo_section, gopt_env, x0)
186 geo_section, gopt_env, x0)
188 CALL geoopt_cg(force_env, gopt_param, globenv, &
189 geo_section, gopt_env, x0)
191 cpabort(
"Invalid or not yet implemented method for optimization")
194 END SUBROUTINE cp_geo_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.
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.
performs geometry optimization
subroutine, public cp_geo_opt(force_env, globenv, eval_opt_geo, rm_restart_info)
Main driver to perform geometry optimization.
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
Adaptively Compressed Exchange (ACE) operator for HFX. Reference: Lin, J. Chem. Theory Comput....
subroutine, public hfx_ace_set_dynamic_mode(is_dynamic)
Mark this run as dynamic (GEO_OPT/MD) so Bypass C fires for geo step 0. Call this once from the geo_o...
Defines the basic variable types.
integer, parameter, public dp
type of a logger, at the moment it contains just a print level starting at which level it should be l...
wrapper to abstract the force evaluation of the various methods
contains the initially parsed file and the initial parallel environment
calculates the potential energy of a system, and its derivatives