<div>Hi Ari,</div><div><br /></div><div>I've refactored the input structure and added a new keyword:</div><div><br /></div><div>  https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/MD/REFTRAJ.html#EVAL</div><div><br /></div><div>The old keywords still work (with the known quirks), but are marked as deprecated.</div><div><br /></div><div>-Ole<br /> </div><br /><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Sunday, September 10, 2023 at 10:39:15 AM UTC+2 Krack Matthias wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">





<div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div>
<p class="MsoNormal"><span lang="DE-CH" style="font-size:11.0pt">Hi Ari<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="DE-CH" style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">The RUN_TYPE ENERGY_FORCE was introduced very early in CP2K. It never worked for me as one would expect intuitively. I guess (without having checked the archives), that
 the EVAL_FORCES keyword was introduced much later to fix the force output while keeping the EVAL_ENERGY_FORCES keyword, because removing a keyword breaks backward compatibility or might cause unexpected side effects in other parts of the code.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Greetings<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Matthias<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><u></u> <u></u></span></p>
<div>
<div></div></div></div></div><div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word"><div><div><div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><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 Ari Paavo Seitsonen (apsi) <<a href data-email-masked rel="nofollow">ari.p.s...@gmail.com</a>><br>
<b>Date: </b>Saturday, 9 September 2023 at 23:34<br>
<b>To: </b>cp2k <<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>><br>
<b>Subject: </b>Re: [CP2K:19239] Re: The force output of RETRAJ module under a r2scan functional is zero<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Hello Matthias et co,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">  Thank you, it indeed seems to work - this was exactly the same problem that I asked for one week ago.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">  Just one question: Why a new keyword, "EVAL_FORCES", has been introduced? Will the "EVAL_ENERGY_FORCES" be removed in the future? And was there a specific reason why the latter
 did not work since a long time? My test seems to indicate that both of them give the same output, with the present version.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">    Greetings from Paris,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">       apsi<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">Le jeudi 7 septembre 2023 à 15:50:49 UTC+2, Krack Matthias a écrit :<u></u><u></u></span></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="DE-CH" style="font-size:11.0pt">Hi</span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="DE-CH" style="font-size:11.0pt"> </span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="EN-US" style="font-size:11.0pt">Add the keyword EVAL_FORCES to the &REFTRAJ section or use the latest CP2K development version after
<a href="https://github.com/cp2k/cp2k/pull/2974" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://github.com/cp2k/cp2k/pull/2974&source=gmail&ust=1694606215344000&usg=AOvVaw0wCYPItzMQWwExWxAuyVtG">PR2974</a> has been merged successfully. Alternatively, you can apply the same patch to your local CP2K version.</span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="EN-US" style="font-size:11.0pt"> </span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="EN-US" style="font-size:11.0pt">HTH</span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="EN-US" style="font-size:11.0pt"> </span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="EN-US" style="font-size:11.0pt">Matthias </span><span style="font-size:11.0pt"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:36.0pt">
<span lang="EN-US" style="font-size:11.0pt"> </span><span style="font-size:11.0pt"><u></u><u></u></span></p>
</div>
</div>
<div>
<div>
<div>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt;margin-left:72.0pt">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><span><a href data-email-masked rel="nofollow">cp...@googlegroups.com</a></span> <<span><a href data-email-masked rel="nofollow">cp...@googlegroups.com</a></span>> on behalf of Tianhua Wang <<span><a href data-email-masked rel="nofollow">nju...@gmail.com</a></span>><br>
<b>Date: </b>Thursday, 7 September 2023 at 09:12<br>
<b>To: </b>cp2k <<span><a href data-email-masked rel="nofollow">cp...@googlegroups.com</a></span>><br>
<b>Subject: </b>[CP2K:19225] Re: The force output of RETRAJ module under a r2scan functional is zero</span><span style="font-size:11.0pt"><u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;margin-left:72.0pt">
<span style="font-size:11.0pt">In fact, according to my tests, this bug exists in almost all CP2K versions later than 6.1, i.e., 7.1, 8.1, 8.2, 9.1, 2022.1, and 2023.2 (I did not test 2023.1), for both SCAN and r2SCAN functionals. Instead, CP2K 6.1 can output
 the forces normally. It seems to be a systemic problem.<u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">在</span><span style="font-size:11.0pt">2023</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">年</span><span style="font-size:11.0pt">9</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">月</span><span style="font-size:11.0pt">7</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">日星期四</span><span style="font-size:11.0pt">
 UTC+8 11:20:17<qin li> </span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">写道:</span><span style="font-size:11.0pt"><u></u><u></u></span></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">The force output of the RETRAJ module works problematiclly in version cp2k2022.1.<u></u><u></u></span></p>
</div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt"> <u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">qin li <<span><a href data-email-masked rel="nofollow">flytomoo...@gmail.com</a></span>>
</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">于</span><span style="font-size:11.0pt">2023</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">年</span><span style="font-size:11.0pt">9</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">月</span><span style="font-size:11.0pt">7</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">日周四</span><span style="font-size:11.0pt">
 10:20</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"MS Gothic"">写道:</span><span style="font-size:11.0pt"><u></u><u></u></span></p>
</div>
</div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">Hi,<u></u><u></u></span></p>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">I'm trying to train a deep potential model of the MgCl2 solution based on r2scan functional, where the positions and forces are needed. I employed the r2scan functional to rerun the trajectory resulting from the BLYPD3 functional,
 but the force output of the RETRAJ module comes out to be all zero. However, the RETRAJ module works fine for the BLYPD3 functional. Does anyone have an idea of how to resolve this?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">The cp2k version is cp2k2022.1, inputs of the r2scan and force output are as follows and the attachment:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">&XC<br>
  &XC_FUNCTIONAL<br>
    &MGGA_X_R2SCAN<br>
    &END MGGA_X_R2SCAN<br>
    &MGGA_C_R2SCAN<br>
    &END MGGA_C_R2SCAN<br>
  &END XC_FUNCTIONAL<br>
  &XC_GRID<br>
    XC_DERIV SPLINE3<br>
    XC_SMOOTH_RHO NONE<br>
  &END XC_GRID<br>
&END XC<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">&REFTRAJ<br>
  EVAL_ENERGY_FORCES<br>
  TRAJ_FILE_NAME ${REFTRAJ}<br>
&END REFTRAJ<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">&PRINT<br>
  &FORCES<br>
    &EACH<br>
      MD 1<br>
    &END EACH<br>
  &END FORCES<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">&END PRINT<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt"> <u></u><u></u></span></p>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:72.0pt">
<span style="font-size:11.0pt">-- <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
<span><a href data-email-masked rel="nofollow">cp2k+uns...@googlegroups.com</a></span>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/760142b3-db53-4c9a-8ca2-882cccc136ban%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/760142b3-db53-4c9a-8ca2-882cccc136ban%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1694606215344000&usg=AOvVaw1lZaL2myqu6sqex89q-Pin">
https://groups.google.com/d/msgid/cp2k/760142b3-db53-4c9a-8ca2-882cccc136ban%40googlegroups.com</a>.<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div></div></div></div><div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word"><div><div><div><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">--
<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>.<br></span></p></div></div></div></div><div lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word"><div><div><div><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/27aff72e-a773-4aa2-b7ae-5b81753aa96en%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/27aff72e-a773-4aa2-b7ae-5b81753aa96en%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1694606215344000&usg=AOvVaw2IfW8qR0CqkCr8F2w5hzft">
https://groups.google.com/d/msgid/cp2k/27aff72e-a773-4aa2-b7ae-5b81753aa96en%40googlegroups.com</a>.<u></u><u></u></span></p>
</div>
</div>
</div>
</div>

</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 on the web visit <a href="https://groups.google.com/d/msgid/cp2k/74765acf-f317-4b30-988a-eb380aa8e727n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/74765acf-f317-4b30-988a-eb380aa8e727n%40googlegroups.com</a>.<br />