From 9fc00bd92e25925affddd848a45fbdf49b8d4864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Tue, 26 May 2026 00:10:40 +0200 Subject: [PATCH] Motion: Add citation for BFGS model Hessian (#5286) --- .../methods/optimization/geometry_and_cell_opt.md | 4 +++- src/common/bibliography.F | 15 +++++++++++---- src/motion/bfgs_optimizer.F | 9 +++++++-- src/start/input_cp2k_motion.F | 4 +++- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/methods/optimization/geometry_and_cell_opt.md b/docs/methods/optimization/geometry_and_cell_opt.md index b60b274507..ad126314bd 100644 --- a/docs/methods/optimization/geometry_and_cell_opt.md +++ b/docs/methods/optimization/geometry_and_cell_opt.md @@ -145,7 +145,9 @@ trust radius for quasi-Newton methods and the line-search settings for conjugate the optimization takes overly large steps, oscillates, or becomes unstable, the [TRUST_RADIUS](#CP2K_INPUT.MOTION.GEO_OPT.BFGS.TRUST_RADIUS) in the `BFGS` subsection is often the first parameter to reduce. A smaller trust radius makes the optimization more conservative; an - excessively small value can make convergence slow. + excessively small value can make convergence slow. The number of required iterations can often be + reduced by enabling the [USE_MODEL_HESSIAN](#CP2K_INPUT.MOTION.GEO_OPT.BFGS.USE_MODEL_HESSIAN) + option. - `LBFGS` is the limited-memory variant and is usually more suitable for large systems where storing a full approximate Hessian would be expensive. It also has a [TRUST_RADIUS](#CP2K_INPUT.MOTION.GEO_OPT.LBFGS.TRUST_RADIUS) control. This can be useful for diff --git a/src/common/bibliography.F b/src/common/bibliography.F index 338a5e798e..8cdcfd6b52 100644 --- a/src/common/bibliography.F +++ b/src/common/bibliography.F @@ -96,7 +96,7 @@ MODULE bibliography Hanasaki2025, Tan2025, Broyden1965, Johnson1988, Kerker1981, & FuHo1983, MethfesselPaxton1989, Marzari1999, dosSantos2023, Mermin1965, & KuhneHeskeProdan2020, Schreder2021, Schreder2024_1, Schreder2024_2, & - Shiga2022 + Shiga2022, Lindh1995 CONTAINS @@ -2055,6 +2055,7 @@ CONTAINS "the restricted subspace approximation", & source="Phys. Chem. Chem. Phys.", volume="23", pages="1835-1848", & year=2021, doi="10.1039/d0cp04726k") + CALL add_reference(key=Shiga2022, & authors=s2a("M. Shiga"), & title="Path integral Brownian chain molecular dynamics: A simple approximation "// & @@ -2149,7 +2150,7 @@ CONTAINS year=2023, doi="10.1103/PhysRevB.107.195122") CALL add_reference(key=Schreder2021, & - authors=s2a("L. Schreder, S. Luber"), & + authors=s2a("L. Schreder", "S. Luber"), & title="Local approaches for electric dipole moments in periodic "// & "systems and their application to real-time time-dependent density "// & "functional theory", & @@ -2157,19 +2158,25 @@ CONTAINS year=2021, doi="10.1063/5.0058793") CALL add_reference(key=Schreder2024_1, & - authors=s2a("L. Schreder, S. Luber"), & + authors=s2a("L. Schreder", "S. Luber"), & title="Chiral Spectroscopy of Bulk Systems with Propagated Localized "// & "Orbitals", & source="J. Chem. Theory Comput.", volume="20", pages="3894", & year=2024, doi="10.1021/acs.jctc.4c00235") CALL add_reference(key=Schreder2024_2, & - authors=s2a("L. Schreder, S. Luber"), & + authors=s2a("L. Schreder", "S. Luber"), & title="Propagated (fragment) Pipek–Mezey Wannier functions in "// & "real-time time-dependent density functional theory", & source="J. Chem. Phys.", volume="160", pages="214117", & year=2024, doi="10.1063/5.0203442") + CALL add_reference(key=Lindh1995, & + authors=s2a("R. Lindh", "A. Bernhardsson", "G. Karlström", "P.-Å. Malmqvist"), & + title="On the use of a Hessian model function in molecular geometry optimizations", & + source="Chem. Phys. Lett.", volume="241", pages="423-428", & + year=1995, doi="10.1016/0009-2614(95)00646-L") + END SUBROUTINE add_all_references END MODULE bibliography diff --git a/src/motion/bfgs_optimizer.F b/src/motion/bfgs_optimizer.F index 207e5189a4..ef6ae345ea 100644 --- a/src/motion/bfgs_optimizer.F +++ b/src/motion/bfgs_optimizer.F @@ -77,6 +77,9 @@ MODULE bfgs_optimizer spgr_apply_rotations_coord, & spgr_apply_rotations_force USE space_groups_types, ONLY: spgr_type + USE bibliography, ONLY: Lindh1995, & + cite_reference + #include "../base/base_uses.f90" IMPLICIT NONE @@ -1017,12 +1020,12 @@ CONTAINS CALL timestop(handle) END SUBROUTINE write_bfgs_hessian -! ************************************************************************************************** ! ************************************************************************************************** -!> \brief ... +!> \brief Constructs model Hessian as described in https://doi.org/10.1016/0009-2614(95)00646-L. !> \param force_env ... !> \param hess_mat ... +!> \author Florian Schiffmann ! ************************************************************************************************** SUBROUTINE construct_initial_hess(force_env, hess_mat) @@ -1042,6 +1045,8 @@ CONTAINS TYPE(cp_subsys_type), POINTER :: subsys TYPE(particle_list_type), POINTER :: particles + CALL cite_reference(Lindh1995) + CALL force_env_get(force_env=force_env, subsys=subsys, cell=cell) CALL cp_subsys_get(subsys, & particles=particles) diff --git a/src/start/input_cp2k_motion.F b/src/start/input_cp2k_motion.F index 2c4d3de062..1f016fc69b 100644 --- a/src/start/input_cp2k_motion.F +++ b/src/start/input_cp2k_motion.F @@ -19,7 +19,8 @@ MODULE input_cp2k_motion Ceriotti2014, & Henkelman1999, & Henkelman2014, & - Kapil2016 + Kapil2016, & + Lindh1995 USE cp_output_handling, ONLY: add_last_numeric, & cp_print_key_section_create, & debug_print_level, & @@ -1281,6 +1282,7 @@ CONTAINS description="Uses a model Hessian as initial guess instead of a unit matrix."// & " Should lead in general to improved convergence might be switched off for exotic cases", & usage="USE_MODEL_HESSIAN", & + citations=[Lindh1995], & default_l_val=use_model_hessian, lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword)