Dear Jurg,<div><br /></div><div>Thank you for your answer. Does this mean that the final energy calculation in a geo opt uses slightly different coordinates than the ones reported in the restart file?<br />Otherwise I do not understand why an energy calculation from the restart file yields the same energy as the energy at step 11, and not the final energy from the geo opt.</div><div><br /></div><div>With kind regards,</div><div><br /></div><div>Bram<br /><br /></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">Op donderdag 5 december 2024 om 14:11:19 UTC+1 schreef Jürg Hutter:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi
<br>
<br>this is due to the very loose accuracy/convergence settings in this example.
<br>In the final calculation an additional SCF step is perfomed (the first energy
<br>is the same as  at the end of the geometry optimization).
<br>This single SCF step decreases the energy by another 10^-5 au.
<br>Tighter settings (e.g. EPS_SCF 10^-7) will decrease this difference.
<br>
<br>regards
<br>JH
<br>
<br>________________________________________
<br>From: <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>> on behalf of Bram Van der Linden <<a href data-email-masked rel="nofollow">bramvdl...@gmail.com</a>>
<br>Sent: Thursday, December 5, 2024 12:43 AM
<br>To: cp2k
<br>Subject: [CP2K:20945] Energy from restart file not equal to energy at the end of geo opt
<br>
<br>Dear all,
<br>
<br>I was following this tutorial: Geometry Optimisation — CP2K documentation<<a href="https://manual.cp2k.org/trunk/methods/optimization/geometry.html" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=nl&q=https://manual.cp2k.org/trunk/methods/optimization/geometry.html&source=gmail&ust=1733490790440000&usg=AOvVaw1B8TLpHMipo5krOcKnHqFK">https://manual.cp2k.org/trunk/methods/optimization/geometry.html</a>>
<br>If I perform the geo opt, I get the snippet below at the end of the output file.
<br>If I do an energy calculation from the restart file, I obtain that
<br>ENERGY| Total FORCE_EVAL ( QS ) energy [a.u.]:              -17.164620477328342a
<br>So, the energy of the energy calculation is equal to the energy at the last step (11), it is not equal to the energy that is recomputed after the last geometry optimization step.
<br>Could someone explain why this is the case?
<br>Many thanks in advance!
<br>Bram
<br>
<br>--------  Informations at step =    11 ------------
<br>  Optimization Method        =                   SD
<br>  Total Energy               =       -17.1646204773
<br>  Real energy change         =        -0.0000000529
<br>  Decrease in energy         =                  YES
<br>  Used time                  =                2.886
<br>
<br>  Convergence check :
<br>  Max. step size             =         0.0003393777
<br>  Conv. limit for step size  =         0.0010000000
<br>  Convergence in step size   =                  YES
<br>  RMS step size              =         0.0001493511
<br>  Conv. limit for RMS step   =         0.0010000000
<br>  Convergence in RMS step    =                  YES
<br>  Max. gradient              =         0.0001787811
<br>  Conv. limit for gradients  =         0.0010000000
<br>  Conv. in gradients         =                  YES
<br>  RMS gradient               =         0.0000786768
<br>  Conv. limit for RMS grad.  =         0.0010000000
<br>  Conv. in RMS gradients     =                  YES
<br> ---------------------------------------------------
<br>
<br> *******************************************************************************
<br> ***                    GEOMETRY OPTIMIZATION COMPLETED                      ***
<br> *******************************************************************************
<br>
<br>                    Reevaluating energy at the minimum
<br>
<br> Number of electrons:                                                          8
<br> Number of occupied orbitals:                                                  4
<br> Number of molecular orbitals:                                                 4
<br>
<br> Number of orbital functions:                                                 23
<br> Number of independent orbital functions:                                     23
<br>
<br> Extrapolation method: ASPC
<br>
<br>
<br> SCF WAVEFUNCTION OPTIMIZATION
<br>
<br>  Step     Update method      Time    Convergence         Total energy    Change
<br>  ------------------------------------------------------------------------------
<br>     1 Pulay/Diag. 0.50E+00    0.0     0.00005610       -17.1646204769 -1.72E+01
<br>     2 Pulay/Diag. 0.50E+00    0.1     0.00000563       -17.1646347273 -1.43E-05
<br>
<br>  *** SCF run converged in     2 steps ***
<br>
<br>
<br>  Electronic density on regular grids:         -8.0000016293       -0.0000016293
<br>  Core density on regular grids:                7.9999992519       -0.0000007481
<br>  Total charge density on r-space grids:       -0.0000023775
<br>  Total charge density g-space grids:          -0.0000023775
<br>
<br>  Overlap energy of the core charge distribution:               0.00000004555422
<br>  Self energy of the core charge distribution:                -43.83289054591484
<br>  Core Hamiltonian energy:                                     12.82175609863938
<br>  Hartree energy:                                              17.97395116248504
<br>  Exchange-correlation energy:                                 -4.12745148803461
<br>
<br>  Total energy:                                               -17.16463472727081
<br>
<br> ENERGY| Total FORCE_EVAL ( QS ) energy [a.u.]:              -17.164634727270808
<br>
<br>--
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a><mailto:<a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a>>.
<br>To view this discussion visit <a href="https://groups.google.com/d/msgid/cp2k/7bd75aef-e648-41ca-b4c0-cab444f39165n%40googlegroups.com" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=nl&q=https://groups.google.com/d/msgid/cp2k/7bd75aef-e648-41ca-b4c0-cab444f39165n%2540googlegroups.com&source=gmail&ust=1733490790440000&usg=AOvVaw05aprzQ8BPlXuO-nT7M1nD">https://groups.google.com/d/msgid/cp2k/7bd75aef-e648-41ca-b4c0-cab444f39165n%40googlegroups.com</a><<a href="https://groups.google.com/d/msgid/cp2k/7bd75aef-e648-41ca-b4c0-cab444f39165n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=nl&q=https://groups.google.com/d/msgid/cp2k/7bd75aef-e648-41ca-b4c0-cab444f39165n%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1733490790440000&usg=AOvVaw2-pABsOHskpcFe3a_tztDk">https://groups.google.com/d/msgid/cp2k/7bd75aef-e648-41ca-b4c0-cab444f39165n%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion visit <a href="https://groups.google.com/d/msgid/cp2k/9bedd1f9-89be-4bb9-8b1c-bf24d9baed98n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/9bedd1f9-89be-4bb9-8b1c-bf24d9baed98n%40googlegroups.com</a>.<br />